problem_id
stringlengths
6
6
language
stringclasses
2 values
original_status
stringclasses
3 values
original_src
stringlengths
19
243k
changed_src
stringlengths
19
243k
change
stringclasses
3 values
i1
int64
0
8.44k
i2
int64
0
8.44k
j1
int64
0
8.44k
j2
int64
0
8.44k
error
stringclasses
270 values
stderr
stringlengths
0
226k
p03176
C++
Runtime Error
// Author : Rifayat Samee (Sanzee) // Problem : // Algorithm: /* */ #include <bits/stdc++.h> using namespace std; typedef long long ll; const int maxval = 200005; ll tree[2 * maxval + 5]; void make_tree(int i, int low, int high, const vector<int> &A) { if (low == high) { tree[i] = 0; return; } int mid =...
// Author : Rifayat Samee (Sanzee) // Problem : // Algorithm: /* */ #include <bits/stdc++.h> using namespace std; typedef long long ll; const int maxval = 200005; ll tree[4 * maxval + 5]; void make_tree(int i, int low, int high, const vector<int> &A) { if (low == high) { tree[i] = 0; return; } int mid =...
replace
11
12
11
12
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> // #include "rubo.h" // #define mp make_pair // #define pb push_back #define in int #define ll long long #define vc vector #define SQ(j) (j) * (j) // #define x first // #define y second // #define ld long double #define dbl long double #define pll pair<long long, long long> #define pii pair<i...
#include <bits/stdc++.h> // #include "rubo.h" // #define mp make_pair // #define pb push_back #define in int #define ll long long #define vc vector #define SQ(j) (j) * (j) // #define x first // #define y second // #define ld long double #define dbl long double #define pll pair<long long, long long> #define pii pair<i...
replace
35
36
35
36
0
p03176
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define f first #define s second #define sc(n) scanf("%d", &n) #define scl(n) scanf("%lld", &n) #define pr(n) printf("%d", n) #define prl(n) printf("%lld", n) #define nl printf("\n") #define fr(i, n) for (i = 0; i < n; i++) #define ...
#include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define f first #define s second #define sc(n) scanf("%d", &n) #define scl(n) scanf("%lld", &n) #define pr(n) printf("%d", n) #define prl(n) printf("%lld", n) #define nl printf("\n") #define fr(i, n) for (i = 0; i < n; i++) #define ...
replace
40
41
40
41
TLE
p03176
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define FASTIO \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL) #define vi vec...
#include <bits/stdc++.h> using namespace std; #define FASTIO \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL) #define vi vec...
replace
23
25
23
25
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> #define ll long long using namespace std; const int N = 2e5 + 123, MAXN = 1e9; int n; ll h[N], a[N], dp[N], ans, L[N], R[N], sz = 1, t[N * 40]; void upd(int pos, ll val, int v = 1, int tl = 1, int tr = MAXN) { if (tl == tr) { t[v] = max(val, t[v]); return; } int tm = (tl + t...
#include <bits/stdc++.h> #define ll long long using namespace std; const int N = 2e5 + 123, MAXN = 1e9; int n; ll h[N], a[N], dp[N], ans, L[N * 40], R[N * 40], sz = 1, t[N * 40]; void upd(int pos, ll val, int v = 1, int tl = 1, int tr = MAXN) { if (tl == tr) { t[v] = max(val, t[v]); return; } int tm...
replace
10
11
10
11
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define ll long long #define md 1000000007 #define mx 1e18 #define pb push_back #define endl '\n' #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL...
#include <bits/stdc++.h> using namespace std; #define ll long long #define md 1000000007 #define mx 1e18 #define pb push_back #define endl '\n' #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL...
replace
54
59
54
59
0
p03176
C++
Runtime Error
#pragma GCC optimize("-O3") #include <bits/stdc++.h> // #include <ext/pb_ds/assoc_container.hpp> // #include <ext/pb_ds/tree_policy.hpp> // using namespace __gnu_pbds; // #include <boost/multiprecision/cpp_int.hpp> // using namespace boost::multiprecision; using namespace std; #define all(c) (c).begin(), (c).end() #de...
#pragma GCC optimize("-O3") #include <bits/stdc++.h> // #include <ext/pb_ds/assoc_container.hpp> // #include <ext/pb_ds/tree_policy.hpp> // using namespace __gnu_pbds; // #include <boost/multiprecision/cpp_int.hpp> // using namespace boost::multiprecision; using namespace std; #define all(c) (c).begin(), (c).end() #de...
replace
46
47
46
47
-11
p03176
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define int long long #define sp ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL) #define cps CLOCKS_PER_SEC #define mod (int)(1000000007) #define f first #define s second #define debug1(x) cerr << x << "\n" #define debug2(x, y) cerr << x << " " << y << "\n...
#include <bits/stdc++.h> using namespace std; #define int long long #define sp ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL) #define cps CLOCKS_PER_SEC #define mod (int)(1000000007) #define f first #define s second #define debug1(x) cerr << x << "\n" #define debug2(x, y) cerr << x << " " << y << "\n...
replace
20
21
20
21
0
p03176
C++
Runtime Error
#include "bits/stdc++.h" using namespace std; #define show(x) cerr << #x << " = " << x << endl; #define input_from_file freopen("input.txt", "r", stdin) #define output_to_file freopen("output.txt", "w", stdout) #define fastio ios_base::sync_with_stdio(0) #define endl '\n' const int N = 1e5 + 1; long long tree[4 * N];...
#include "bits/stdc++.h" using namespace std; #define show(x) cerr << #x << " = " << x << endl; #define input_from_file freopen("input.txt", "r", stdin) #define output_to_file freopen("output.txt", "w", stdout) #define fastio ios_base::sync_with_stdio(0) #define endl '\n' const int N = 2e5 + 1; long long tree[4 * N];...
replace
9
10
9
10
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define ll long long vector<ll> height, dp, b; vector<ll> tree; // buildtree(int *arr,start,end,node){ // } // void treeupdate(int indx,int s,int e,int updi,int upd ){ // if(s==e) { // tree[indx]=upd; // } // else{ // int mid=(s+e)/2; // ...
#include <bits/stdc++.h> using namespace std; #define ll long long vector<ll> height, dp, b; vector<ll> tree; // buildtree(int *arr,start,end,node){ // } // void treeupdate(int indx,int s,int e,int updi,int upd ){ // if(s==e) { // tree[indx]=upd; // } // else{ // int mid=(s+e)/2; // ...
replace
72
73
72
73
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> #define F first #define S second #define PB push_back #define EB emplace_back #define ALL(a) a.begin(), a.end() #define RALL(a) a.rbegin(), a.rend() #define REP(i, a) for (int i(0), _##i(a); i < _##i; ++i) #define FOR(i, a, b) for (int i(a), _##i(b); i <= _##i; ++i) #ifdef LOCAL #define _NTH_A...
#include <bits/stdc++.h> #define F first #define S second #define PB push_back #define EB emplace_back #define ALL(a) a.begin(), a.end() #define RALL(a) a.rbegin(), a.rend() #define REP(i, a) for (int i(0), _##i(a); i < _##i; ++i) #define FOR(i, a, b) for (int i(a), _##i(b); i <= _##i; ++i) #ifdef LOCAL #define _NTH_A...
replace
47
48
47
48
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> #define fi first #define se second #define forn(i, n) for (int i = 0; i < (int)n; ++i) #define for1(i, n) for (int i = 1; i <= (int)n; ++i) #define fore(i, l, r) for (int i = (int)l; i <= (int)r; ++i) #define ford(i, n) for (int i = (int)(n)-1; i >= 0; --i) #define fored(i, l, r) for (int i = ...
#include <bits/stdc++.h> #define fi first #define se second #define forn(i, n) for (int i = 0; i < (int)n; ++i) #define for1(i, n) for (int i = 1; i <= (int)n; ++i) #define fore(i, l, r) for (int i = (int)l; i <= (int)r; ++i) #define ford(i, n) for (int i = (int)(n)-1; i >= 0; --i) #define fored(i, l, r) for (int i = ...
replace
24
25
24
25
0
p03176
C++
Runtime Error
#include <algorithm> #include <cctype> #include <cmath> #include <cstdlib> #include <cstring> #include <ctime> #include <fstream> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> #include <vecto...
#include <algorithm> #include <cctype> #include <cmath> #include <cstdlib> #include <cstring> #include <ctime> #include <fstream> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> #include <vecto...
replace
36
37
36
37
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> #define int long long #define ld long double #define fio() \ ios_base::sync_with_stdio(false); \ cin.tie(NULL) #define MOD 1000000007 #define nl '\n' #define pb push_back #define mp m...
#include <bits/stdc++.h> #define int long long #define ld long double #define fio() \ ios_base::sync_with_stdio(false); \ cin.tie(NULL) #define MOD 1000000007 #define nl '\n' #define pb push_back #define mp m...
replace
14
15
14
15
0
p03176
C++
Time Limit Exceeded
#ifndef bhartiya #pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #endif #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> pll; // not that imp typedef pair<pll, ll> plll; typedef vec...
#ifndef bhartiya #pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #endif #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> pll; // not that imp typedef pair<pll, ll> plll; typedef vec...
replace
85
86
85
86
TLE
p03176
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define ll long long int #define pb push_back #define mp make_pair #define deb(x) cout << #x << " " << x << "\n"; #define MAX 9223372036854775807 #define MIN -9223372036854775807 #define PI 3.141592653589 #define setbits(n) __builtin_popcountll(n) const ll mod = 1e9 + 7; c...
#include <bits/stdc++.h> using namespace std; #define ll long long int #define pb push_back #define mp make_pair #define deb(x) cout << #x << " " << x << "\n"; #define MAX 9223372036854775807 #define MIN -9223372036854775807 #define PI 3.141592653589 #define setbits(n) __builtin_popcountll(n) const ll mod = 1e9 + 7; c...
replace
12
13
12
13
0
TIME: 0.019961 sec
p03176
C++
Runtime Error
#include <algorithm> #include <cstring> #include <iostream> #include <limits.h> #include <map> #include <queue> #include <set> #include <stdio.h> #include <utility> #include <vector> #define MAX_DOUBLE 40000000000.0 #include <math.h> #include <unistd.h> using namespace std; const int N = 100010; int n; long long tr...
#include <algorithm> #include <cstring> #include <iostream> #include <limits.h> #include <map> #include <queue> #include <set> #include <stdio.h> #include <utility> #include <vector> #define MAX_DOUBLE 40000000000.0 #include <math.h> #include <unistd.h> using namespace std; const int N = 262144; int n; long long tr...
replace
16
17
16
17
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> #include <iostream> using namespace std; #define f first #define s second const int N = 1e5 + 100; long long int tree[4 * N]; long long int temp = -1e16; long long int power(long long int x, long long int y, long long int mod) { long long int res = 1LL; while (y > 0) { if (y & 1) ...
#include <bits/stdc++.h> #include <iostream> using namespace std; #define f first #define s second const int N = 2e5 + 100; long long int tree[4 * N]; long long int temp = -1e16; long long int power(long long int x, long long int y, long long int mod) { long long int res = 1LL; while (y > 0) { if (y & 1) ...
replace
5
6
5
6
0
p03176
C++
Runtime Error
#include <algorithm> #include <iomanip> #include <iostream> #include <map> #include <vector> using namespace std; const long long MAXN = 100100; const long long MOD = 1e9 + 7; vector<long long> v1[MAXN]; long long fenwick[MAXN + 2]; long long arr[MAXN]; long long h[MAXN]; long long n; void update(long long pos, long ...
#include <algorithm> #include <iomanip> #include <iostream> #include <map> #include <vector> using namespace std; const long long MAXN = 200100; const long long MOD = 1e9 + 7; vector<long long> v1[MAXN]; long long fenwick[MAXN + 2]; long long arr[MAXN]; long long h[MAXN]; long long n; void update(long long pos, long ...
replace
7
8
7
8
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; long long c[100001]; int h[100001], n; int lowbit(int x) { return x & (-x); } void updatemax(int index, long long value) { while (index <= n && value > c[index]) { c[index] = value; index += lowbit(index); } } long long maxrange(int index) { long long maxv = 0...
#include <bits/stdc++.h> using namespace std; long long c[200001]; int h[200001], n; int lowbit(int x) { return x & (-x); } void updatemax(int index, long long value) { while (index <= n && value > c[index]) { c[index] = value; index += lowbit(index); } } long long maxrange(int index) { long long maxv = 0...
replace
2
4
2
4
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> #define l long #define ll long long #define ld long double #define INF 1000000000000000 #define MOD 1000000007 #define MAX_N 100006 #define f first #define s second #define IOS \ ios_base::sync_with_stdio(false); ...
#include <bits/stdc++.h> #define l long #define ll long long #define ld long double #define INF 1000000000000000 #define MOD 1000000007 #define MAX_N 1000006 #define f first #define s second #define IOS \ ios_base::sync_with_stdio(false); ...
replace
6
7
6
7
0
p03176
C++
Runtime Error
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <vector> using namespace std; vector<pair<long long, int>> item; vector<long long> t; void update(int v, int tl, int tr, int...
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <vector> using namespace std; vector<pair<long long, int>> item; vector<long long> t; void update(int v, int tl, int tr, int...
replace
63
64
63
64
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long LL; const LL MAX = 1e5 + 5; LL a[MAX], b[MAX], dp[MAX]; LL ST[4 * MAX + 5]; LL query(LL start, LL end, LL node, LL s, LL e) { if (e < start || s > end || start > end) return 0; if (s <= start && e >= end) { return ST[node]; } LL mid = (sta...
#include <bits/stdc++.h> using namespace std; typedef long long LL; const LL MAX = 2e5 + 5; LL a[MAX], b[MAX], dp[MAX]; LL ST[4 * MAX + 5]; LL query(LL start, LL end, LL node, LL s, LL e) { if (e < start || s > end || start > end) return 0; if (s <= start && e >= end) { return ST[node]; } LL mid = (sta...
replace
3
4
3
4
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef vector<int> VI; typedef long long LL; typedef pair<int, int> PI; typedef pair<LL, LL> PLL; typedef unsigned long long ULL; typedef pair<double, double> PD; #define FOR(x, b, e) for (int x = b; x <= (e); x++) #define FORD(x, b, e) for (int x = b; x >= (e); x--) #de...
#include <bits/stdc++.h> using namespace std; typedef vector<int> VI; typedef long long LL; typedef pair<int, int> PI; typedef pair<LL, LL> PLL; typedef unsigned long long ULL; typedef pair<double, double> PD; #define FOR(x, b, e) for (int x = b; x <= (e); x++) #define FORD(x, b, e) for (int x = b; x >= (e); x--) #de...
replace
28
29
28
29
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef pair<int, int> pii; typedef long long ll; #define int ll const int N = 100000; int n, a[N], h[N], dp[N]; #define all(x) x.begin(), x.end() struct segment { int seg[200001 * 4] = {0}; int pull(int x, int y) { return max(seg[x], seg[y]); } void update(int id, in...
#include <bits/stdc++.h> using namespace std; typedef pair<int, int> pii; typedef long long ll; #define int ll const int N = 200001; int n, a[N], h[N], dp[N]; #define all(x) x.begin(), x.end() struct segment { int seg[200001 * 4] = {0}; int pull(int x, int y) { return max(seg[x], seg[y]); } void update(int id, in...
replace
5
6
5
6
0
p03176
C++
Time Limit Exceeded
#include <iostream> #include <stdio.h> #define Re register int #define LL long long int N, H[200005], A[200005]; LL f[200005], T[800005], ans; template <typename T> inline void read(T &var) { T x = 0; int w = 0; char ch = 0; while (!isdigit(ch)) w |= ch == '-', ch = getchar(); while (isdigit(ch)) x ...
#include <iostream> #include <stdio.h> #define Re register int #define LL long long int N, H[200005], A[200005]; LL f[200005], T[800005], ans; template <typename T> inline void read(T &var) { T x = 0; int w = 0; char ch = 0; while (!isdigit(ch)) w |= ch == '-', ch = getchar(); while (isdigit(ch)) x ...
delete
40
44
40
40
TLE
p03176
C++
Runtime Error
/* ░░░░░░░░░░░░░░░░▄▄█▀▀██▄▄░░░░░░░ ░░░░░░░░░░░░░▄█▀▀░░░░░░░▀█░░░░░░ ░░░░░░░░░░░▄▀░░░░░░░░░░░░░█░░░░░ ░░░░░░░░░▄█░░░░░░░░░░░░░░░█░░░░░ ░░░░░░░██▀░░░░░░░▄▄▄░░▄░█▄█▄░░░░ ░░░░░▄▀░░░░░░░░░░████░█▄██░▀▄░░░ ░░░░█▀░░░░░░░░▄▄██▀░░█████░██░░░ ░░░█▀░░░░░░░░░▀█░▀█▀█▀▀▄██▄█▀░░░ ░░░██░░░░░░░░░░█░░█░█░░▀▀▄█▀░░░░ ░░░░█░░░░░█░░░▀█░░░░...
/* ░░░░░░░░░░░░░░░░▄▄█▀▀██▄▄░░░░░░░ ░░░░░░░░░░░░░▄█▀▀░░░░░░░▀█░░░░░░ ░░░░░░░░░░░▄▀░░░░░░░░░░░░░█░░░░░ ░░░░░░░░░▄█░░░░░░░░░░░░░░░█░░░░░ ░░░░░░░██▀░░░░░░░▄▄▄░░▄░█▄█▄░░░░ ░░░░░▄▀░░░░░░░░░░████░█▄██░▀▄░░░ ░░░░█▀░░░░░░░░▄▄██▀░░█████░██░░░ ░░░█▀░░░░░░░░░▀█░▀█▀█▀▀▄██▄█▀░░░ ░░░██░░░░░░░░░░█░░█░█░░▀▀▄█▀░░░░ ░░░░█░░░░░█░░░▀█░░░░...
replace
34
35
34
35
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> #define MOD 1000000007 #define ll long long #define mp make_pair #define pb push_back #define N 100010 using namespace std; ll tree[4 * N], A[N], h[N]; void update(int low, int high, int ind, ll val, int node) { if (low == high) { tree[node] = val; return; } int mid = (low + high)...
#include <bits/stdc++.h> #define MOD 1000000007 #define ll long long #define mp make_pair #define pb push_back #define N 200010 using namespace std; ll tree[4 * N], A[N], h[N]; void update(int low, int high, int ind, ll val, int node) { if (low == high) { tree[node] = val; return; } int mid = (low + high)...
replace
5
6
5
6
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define lowbit(x) (x & -x) const int maxn = 100001; int n; ll h[maxn]; ll a[maxn]; ll dp[maxn]; ll bit[maxn]; ll query(ll x) { ll res = 0; for (; x; x -= lowbit(x)) { res = max(bit[x], res); } return res; } void update(ll x, ll y) { ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define lowbit(x) (x & -x) const int maxn = 200001; int n; ll h[maxn]; ll a[maxn]; ll dp[maxn]; ll bit[maxn]; ll query(ll x) { ll res = 0; for (; x; x -= lowbit(x)) { res = max(bit[x], res); } return res; } void update(ll x, ll y) { ...
replace
7
8
7
8
0
p03176
C++
Runtime Error
#include <algorithm> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std; #define INF (1ll << 60) int n; vector<vector<int>> G; class BIT { public: vector<lon...
#include <algorithm> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std; #define INF (1ll << 60) int n; vector<vector<int>> G; class BIT { public: vector<lon...
replace
41
42
41
42
-6
free(): invalid pointer
p03176
C++
Runtime Error
//****** @mdazmat9 ********** #include <bits/stdc++.h> using namespace std; #define ll long long #define int long long #define UB upper_bound #define LB lower_bound #define BS binary_search #define EB emplace_back #define PB push_back #define endl "\n" #define MOD 1000000007 #define MOD2 998244353 #define F first #defi...
//****** @mdazmat9 ********** #include <bits/stdc++.h> using namespace std; #define ll long long #define int long long #define UB upper_bound #define LB lower_bound #define BS binary_search #define EB emplace_back #define PB push_back #define endl "\n" #define MOD 1000000007 #define MOD2 998244353 #define F first #defi...
replace
95
99
95
96
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const int maxn = 1e5 + 5; typedef long long ll; ll abi[maxn]; int N; int h[maxn], b[maxn]; void update(int pos, ll v) { for (; pos <= N; pos += pos & -pos) abi[pos] = max(abi[pos], v); } ll query(int pos) { ll sum = 0; for (; pos; pos -= pos & -pos) sum = max(...
#include <bits/stdc++.h> using namespace std; const int maxn = 2e5 + 5; typedef long long ll; ll abi[maxn]; int N; int h[maxn], b[maxn]; void update(int pos, ll v) { for (; pos <= N; pos += pos & -pos) abi[pos] = max(abi[pos], v); } ll query(int pos) { ll sum = 0; for (; pos; pos -= pos & -pos) sum = max(...
replace
2
3
2
3
0
p03176
C++
Runtime Error
// template {{{ #include <bits/stdc++.h> using namespace std; #define all(c) (c).begin(), (c).end() #define sz(c) (static_cast<int>(c.size())) #define endl "\n" using ld = long double; using ll = long long; inline ll addm(ll __a, ll __b, ll __m); inline ll subm(ll __a, ll __b, ll __m); inline ll mulm(ll __a, ll __b...
// template {{{ #include <bits/stdc++.h> using namespace std; #define all(c) (c).begin(), (c).end() #define sz(c) (static_cast<int>(c.size())) #define endl "\n" using ld = long double; using ll = long long; inline ll addm(ll __a, ll __b, ll __m); inline ll subm(ll __a, ll __b, ll __m); inline ll mulm(ll __a, ll __b...
replace
23
24
23
24
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> #define F first #define S second #define pb push_back #define all(x) x.begin(), x.end() using namespace std; typedef long long ll; typedef pair<int, int> pii; const int N = 100010; const int MOD = 1000000007; const int LOG = 20; ll fen[N]; int n, h[N], a[N]; void add(int id, ll x) { id+...
#include <bits/stdc++.h> #define F first #define S second #define pb push_back #define all(x) x.begin(), x.end() using namespace std; typedef long long ll; typedef pair<int, int> pii; const int N = 200010; const int MOD = 1000000007; const int LOG = 20; ll fen[N]; int n, h[N], a[N]; void add(int id, ll x) { id+...
replace
12
13
12
13
0
p03176
C++
Runtime Error
// csjosh #include <bits/stdc++.h> // #include <ext/pb_ds/assoc_container.hpp> //required // #include <ext/pb_ds/tree_policy.hpp> //required // using namespace __gnu_pbds; //required using namespace std; #define ll long long #define loop(x) for (int i = 0; i < x; i++) #define llu unsigned long long #define pb push_b...
// csjosh #include <bits/stdc++.h> // #include <ext/pb_ds/assoc_container.hpp> //required // #include <ext/pb_ds/tree_policy.hpp> //required // using namespace __gnu_pbds; //required using namespace std; #define ll long long #define loop(x) for (int i = 0; i < x; i++) #define llu unsigned long long #define pb push_b...
replace
45
47
45
47
0
p03176
C++
Runtime Error
#include <algorithm> #include <bits/stdc++.h> #include <cmath> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<int, int> pii; typedef pair<ll, ll> pll; t...
#include <algorithm> #include <bits/stdc++.h> #include <cmath> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<int, int> pii; typedef pair<ll, ll> pll; t...
replace
123
125
123
124
-6
munmap_chunk(): invalid pointer
p03176
C++
Runtime Error
#include <cstdio> #include <iostream> #define MAXN 100500 using namespace std; int a[MAXN]; int h[MAXN]; long long ans[MAXN]; int n; long long answer; struct tree { int l; int r; long long maks; int left_child; int right_child; }; tree g[4 * MAXN]; void create_tree(int v) { if (g[v].l == g[v].r) { ret...
#include <cstdio> #include <iostream> #define MAXN 200500 using namespace std; int a[MAXN]; int h[MAXN]; long long ans[MAXN]; int n; long long answer; struct tree { int l; int r; long long maks; int left_child; int right_child; }; tree g[4 * MAXN]; void create_tree(int v) { if (g[v].l == g[v].r) { ret...
replace
2
3
2
3
0
p03176
C++
Runtime Error
#include "bits/stdc++.h" using namespace std; using lint = long long; struct RMQ { static const lint MAX_N = 1 << 17; lint n, dat[2 * MAX_N - 1]; RMQ() {} RMQ(lint n_) { init(n_); } void init(lint n_) { n = 1; while (n < n_) n *= 2; for (int i = 0; i < 2 * n - 1; i++) dat[i] = 0; } ...
#include "bits/stdc++.h" using namespace std; using lint = long long; struct RMQ { static const lint MAX_N = 3e5; lint n, dat[2 * MAX_N - 1]; RMQ() {} RMQ(lint n_) { init(n_); } void init(lint n_) { n = 1; while (n < n_) n *= 2; for (int i = 0; i < 2 * n - 1; i++) dat[i] = 0; } vo...
replace
5
6
5
6
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define pb push_back #define Int long long #define N 200 Int dp[N]; Int tree[2 * N + 1]; Int a[N], f[N]; void update(Int x, Int v, Int node, Int l, Int r) { if (l == r) { tree[node] = v; return; } Int mid = (l + r) / 2; if (x <= mid) { update(x, v, (2 ...
#include <bits/stdc++.h> using namespace std; #define pb push_back #define Int long long #define N 200200 Int dp[N]; Int tree[2 * N + 1]; Int a[N], f[N]; void update(Int x, Int v, Int node, Int l, Int r) { if (l == r) { tree[node] = v; return; } Int mid = (l + r) / 2; if (x <= mid) { update(x, v, ...
replace
4
5
4
5
0
p03176
C++
Runtime Error
#include "bits/stdc++.h" using namespace std; long long t[512000]; int h[200001]; int n; long long query(int index, int lb, int rb, int lq, int rq) { if (lb == rb) return t[index]; if (rb == rq && lb == lq) return t[index]; int mid = (lb + rb) / 2; if (rq <= mid) return query(index * 2, lb, mid, lq,...
#include "bits/stdc++.h" using namespace std; long long t[600000]; int h[200001]; int n; long long query(int index, int lb, int rb, int lq, int rq) { if (lb == rb) return t[index]; if (rb == rq && lb == lq) return t[index]; int mid = (lb + rb) / 2; if (rq <= mid) return query(index * 2, lb, mid, lq,...
replace
2
3
2
3
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef pair<int, int> PII; typedef pair<ll, ll> PLL; #define pb push_back // #all(x) (x).begin(),(x).end() // int const N = 1; int const MOD = 1e9 + 7; ll bigmod(ll a, ll b) { if (b == 0) return 1 % MOD; ll x = bigmod(a, b / 2); x = (x...
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef pair<int, int> PII; typedef pair<ll, ll> PLL; #define pb push_back // #all(x) (x).begin(),(x).end() // int const N = 1; int const MOD = 1e9 + 7; ll bigmod(ll a, ll b) { if (b == 0) return 1 % MOD; ll x = bigmod(a, b / 2); x = (x...
replace
21
22
21
22
0
p03176
C++
Runtime Error
// #pragma comment(linker, "/stack:200000000") // #pragma GCC optimize("Ofast,no-stack-protector") // #pragma GCC // target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native") // #pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> #ifdef PERVEEVM_LOCAL #define debug(x) std::cerr << (#x) << ":\t"...
// #pragma comment(linker, "/stack:200000000") // #pragma GCC optimize("Ofast,no-stack-protector") // #pragma GCC // target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native") // #pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> #ifdef PERVEEVM_LOCAL #define debug(x) std::cerr << (#x) << ":\t"...
replace
33
34
33
34
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define pb push_back #define eb emplace_back #define mp make_pair #define f first #define s second #define all(a) (a).begin(), (a).end() #define For(i, a, b) for (auto i = (a); i < (b); i++) #define FOR(i, b) For(i, 0, b) #define Rev(i, a, b) for (auto i = (a); i > (b); i--...
#include <bits/stdc++.h> using namespace std; #define pb push_back #define eb emplace_back #define mp make_pair #define f first #define s second #define all(a) (a).begin(), (a).end() #define For(i, a, b) for (auto i = (a); i < (b); i++) #define FOR(i, b) For(i, 0, b) #define Rev(i, a, b) for (auto i = (a); i > (b); i--...
replace
513
514
513
514
0
p03176
C++
Runtime Error
// Problem: Q - Flowers // Contest: AtCoder - Educational DP Contest // URL: https://atcoder.jp/contests/dp/tasks/dp_q // Memory Limit: 1024 MB // Time Limit: 2000 ms // Powered by CP Editor (https://github.com/cpeditor/cpeditor) #include <bits/stdc++.h> using namespace std; const int N = 800080; long long lc[N], rc...
// Problem: Q - Flowers // Contest: AtCoder - Educational DP Contest // URL: https://atcoder.jp/contests/dp/tasks/dp_q // Memory Limit: 1024 MB // Time Limit: 2000 ms // Powered by CP Editor (https://github.com/cpeditor/cpeditor) #include <bits/stdc++.h> using namespace std; const int N = 800080; long long lc[N], rc...
replace
31
32
31
32
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; long long segTree[1000000] = {}; int segSize; void init(int n) { segSize = 1; while (segSize < n) segSize *= 2; return; } void update(int i, long long val) { i = segSize - 1 + i; segTree[i] = val; while (i > 0) { i = (i - 1) / 2; segTree[i] = max...
#include <bits/stdc++.h> using namespace std; long long segTree[1000000] = {}; int segSize; void init(int n) { segSize = 1; while (segSize < n) segSize *= 2; return; } void update(int i, long long val) { i = segSize - 1 + i; segTree[i] = val; while (i > 0) { i = (i - 1) / 2; segTree[i] = max...
replace
36
38
36
38
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define ll long long #define de cout << "debuglandınız\n"; #define md 1000000007 #define MP make_pair ll int n, m; ll int ar[200005][2], vt[400005][3], i, j, mx, x, y; void bul(ll int node) { if (vt[node][1] >= x and vt[node][2] <= y) { mx = max(mx, vt[node][0]); ...
#include <bits/stdc++.h> using namespace std; #define ll long long #define de cout << "debuglandınız\n"; #define md 1000000007 #define MP make_pair ll int n, m; ll int ar[200005][2], vt[500010][3], i, j, mx, x, y; void bul(ll int node) { if (vt[node][1] >= x and vt[node][2] <= y) { mx = max(mx, vt[node][0]); ...
replace
7
8
7
8
0
p03176
C++
Runtime Error
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #define mid ((l + r) >> 1) #define lson (x << 1) #define rson ((x << 1) | 1) using namespace std; typedef long long LL; LL val[400005] = {0}; void pushup(LL x) { val[x] = max(val[lson], val[rson]); } void modify(LL x, LL l, LL r, LL L, LL ...
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #define mid ((l + r) >> 1) #define lson (x << 1) #define rson ((x << 1) | 1) using namespace std; typedef long long LL; LL val[800005] = {0}; void pushup(LL x) { val[x] = max(val[lson], val[rson]); } void modify(LL x, LL l, LL r, LL L, LL ...
replace
10
11
10
11
0
p03176
C++
Runtime Error
/* author: madhav_1999 aka orthodoxparadox 22-Jan-2019 00:04:07 */ #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/detail/standard_policies.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; #define dbl long double #define int ll #define ll...
/* author: madhav_1999 aka orthodoxparadox 22-Jan-2019 00:04:07 */ #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/detail/standard_policies.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; #define dbl long double #define int ll #define ll...
replace
94
95
94
95
0
time taken: 5.8e-05
p03176
C++
Runtime Error
#include <bits/stdc++.h> #define int long long #define pb push_back #define pii pair<int, int> #define vi vector<int> #define vii vector<pii> #define all(a) (a).begin(), (a).end() #define X first #define Y second #define inf 1e18 + 5 using namespace std; const int N = 1e5 + 5; int h[N], a[N]; int seg[4 * N]; void updat...
#include <bits/stdc++.h> #define int long long #define pb push_back #define pii pair<int, int> #define vi vector<int> #define vii vector<pii> #define all(a) (a).begin(), (a).end() #define X first #define Y second #define inf 1e18 + 5 using namespace std; const int N = 2e5 + 5; int h[N], a[N]; int seg[4 * N]; void updat...
replace
11
12
11
12
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; int n; ll h[100003], v[100003], f[100003], tree[400003]; pair<ll, pair<ll, int>> a[100003]; void Update(int node, int start, int endd, int id, ll val) { if (id < start || id > endd) { return; } if (start == endd) { tree[node] = val; ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; int n; ll h[200003], v[200003], f[200003], tree[900003]; pair<ll, pair<ll, int>> a[200003]; void Update(int node, int start, int endd, int id, ll val) { if (id < start || id > endd) { return; } if (start == endd) { tree[node] = val; ...
replace
5
7
5
7
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> #include <stdio.h> using namespace std; typedef long long int ll; typedef long double ld; #define rep(i, n) for (ll i = 0; i < (n); ++i) #define rep1(i, n) for (ll i = 1; i <= (n); ++i) #define repA(i, a, n) for (ll i = a; i <= (n); ++i) #define repD(i, a, n) for (ll i = a; i >= (n); --i) #de...
#include <bits/stdc++.h> #include <stdio.h> using namespace std; typedef long long int ll; typedef long double ld; #define rep(i, n) for (ll i = 0; i < (n); ++i) #define rep1(i, n) for (ll i = 1; i <= (n); ++i) #define repA(i, a, n) for (ll i = a; i <= (n); ++i) #define repD(i, a, n) for (ll i = a; i >= (n); --i) #de...
replace
20
21
20
21
0
p03176
C++
Runtime Error
#include <algorithm> #include <stdio.h> #include <stdlib.h> #define MAX_N (200000) // #define NUM_ELEM (1 << 18) #define NUM_ELEM (1 << 4) #define SIZE_BUF (2 * NUM_ELEM - 1) #define INF (1000000000000000000L) using namespace std; long buf[SIZE_BUF]; void st_init() { for (int i = 0; i < SIZE_BUF; i++) { buf[i...
#include <algorithm> #include <stdio.h> #include <stdlib.h> #define MAX_N (200000) #define NUM_ELEM (1 << 18) // #define NUM_ELEM (1 << 4) #define SIZE_BUF (2 * NUM_ELEM - 1) #define INF (1000000000000000000L) using namespace std; long buf[SIZE_BUF]; void st_init() { for (int i = 0; i < SIZE_BUF; i++) { buf[i...
replace
5
7
5
7
0
p03176
C++
Runtime Error
/****************************************************************************** Online C++ Compiler. Code, Compile, Run and Debug C++ program online. Write your code in this editor and press "Run" button to compile and execute it. ******************************************...
/****************************************************************************** Online C++ Compiler. Code, Compile, Run and Debug C++ program online. Write your code in this editor and press "Run" button to compile and execute it. ******************************************...
replace
35
36
35
36
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define mp make_pair #define pb push_back #define fi first #define se second int n, h[100007], x, a[100007]; long long it[400007]; void update(int k, int l, int r, int pos, long long val) { if (l > pos || r < pos) return; if (l == r) { it[k] = val; return;...
#include <bits/stdc++.h> using namespace std; #define mp make_pair #define pb push_back #define fi first #define se second int n, h[200007], x, a[200007]; long long it[800007]; void update(int k, int l, int r, int pos, long long val) { if (l > pos || r < pos) return; if (l == r) { it[k] = val; return;...
replace
7
9
7
9
0
p03176
C++
Time Limit Exceeded
#pragma GCC optimize(2) #pragma G++ optimize(2) #include <bits/stdc++.h> #define ll long long #define lowbit(x) (x & -x) using namespace std; const int N = 1e5 + 7, p = 1e9 + 7; ll tre[N]; int n, a[N], h[N]; void change(int p, ll v) { for (int i = p; i <= n; i += lowbit(i)) { tre[i] = max(tre[i], v); } return...
#pragma GCC optimize(2) #pragma G++ optimize(2) #include <bits/stdc++.h> #define ll long long #define lowbit(x) (x & -x) using namespace std; const int N = 2e5 + 7, p = 1e9 + 7; ll tre[N]; int n, a[N], h[N]; void change(int p, ll v) { for (int i = p; i <= n; i += lowbit(i)) { tre[i] = max(tre[i], v); } return...
replace
6
7
6
7
TLE
p03176
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define ll long long #define M 1000000007LL #define sz(a) (ll) a.size() #define rep(i, a, b) for (ll i = (ll)a; i < (ll)b; i++) #define sep(i, a, b) for (ll i = (ll)a; i >= (ll)b; i--) #define mll map<ll, ll> #define vl vector<ll> #define pb push_back #define lb lower_bound...
#include <bits/stdc++.h> using namespace std; #define ll long long #define M 1000000007LL #define sz(a) (ll) a.size() #define rep(i, a, b) for (ll i = (ll)a; i < (ll)b; i++) #define sep(i, a, b) for (ll i = (ll)a; i >= (ll)b; i--) #define mll map<ll, ll> #define vl vector<ll> #define pb push_back #define lb lower_bound...
replace
18
19
18
19
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> #define MAXN 100100 #define pii pair<int, int> #define pb push_back typedef long long ll; using namespace std; ll a[MAXN], h[MAXN], n, ans = 0; ll lo[4 * MAXN + 1], hi[4 * MAXN + 1], tree[4 * MAXN + 1], delta[4 * MAXN + 1]; void init(int i, int l, int r) { lo[i] = l; hi[i] = r; if (l =...
#include <bits/stdc++.h> #define MAXN 200100 #define pii pair<int, int> #define pb push_back typedef long long ll; using namespace std; ll a[MAXN], h[MAXN], n, ans = 0; ll lo[4 * MAXN + 1], hi[4 * MAXN + 1], tree[4 * MAXN + 1], delta[4 * MAXN + 1]; void init(int i, int l, int r) { lo[i] = l; hi[i] = r; if (l =...
replace
1
2
1
2
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define F first #define S second #define MP make_pair #define PB push_back #define ALL(x) x.begin(), x.end() #define DBG(x) cout << #x << ":" << x << endl typedef long long ll; typedef pair<ll, ll> P; typedef pair<ll, P> PP; const ll p = 1e9 + 7; const ll INF = 1LL << 60; #...
#include <bits/stdc++.h> using namespace std; #define F first #define S second #define MP make_pair #define PB push_back #define ALL(x) x.begin(), x.end() #define DBG(x) cout << #x << ":" << x << endl typedef long long ll; typedef pair<ll, ll> P; typedef pair<ll, P> PP; const ll p = 1e9 + 7; const ll INF = 1LL << 60; #...
replace
13
14
13
14
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; class kawaii { #define boi(X) (X & -X) public: kawaii(int N = 0) { poldo.resize(N + 1, 0); }; long long int qry(int pos) { long long int x = -1; for (; pos > 0; pos -= boi(pos)) { x = max(x, poldo[pos]); } return x; } void upd(int pos, long lon...
#include <bits/stdc++.h> using namespace std; class kawaii { #define boi(X) (X & -X) public: kawaii(int N = 0) { poldo.resize(N + 1, 0); }; long long int qry(int pos) { long long int x = -1; for (; pos > 0; pos -= boi(pos)) { x = max(x, poldo[pos]); } return x; } void upd(int pos, long lon...
replace
29
30
29
30
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> #define pb push_back #define f first #define s second #define ind(a) scanf("%d", &a) #define inlld(a) scanf("%lld", &a) #define ind2(a, b) scanf("%d%d", &a, &b) #define inlld2(a, b) scanf("%lld%lld", &a, &b) #define ind3(a, b, c) scanf("%d%d%d", &a, &b, &c) #define inlld3(a, b, c) scanf("%lld%l...
#include <bits/stdc++.h> #define pb push_back #define f first #define s second #define ind(a) scanf("%d", &a) #define inlld(a) scanf("%lld", &a) #define ind2(a, b) scanf("%d%d", &a, &b) #define inlld2(a, b) scanf("%lld%lld", &a, &b) #define ind3(a, b, c) scanf("%d%d%d", &a, &b, &c) #define inlld3(a, b, c) scanf("%lld%l...
replace
13
14
13
14
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> #pragma GCC optimize("O3") using namespace std; int n; long long a[100002], b[100002], aib[100002]; void upd(int poz, long long val) { for (; poz <= n; poz += poz & (-poz)) aib[poz] = max(aib[poz], val); } long long compute(int poz) { long long ans = 0; for (; poz; poz -= poz & (-poz)...
#include <bits/stdc++.h> #pragma GCC optimize("O3") using namespace std; int n; long long a[200002], b[200002], aib[200002]; void upd(int poz, long long val) { for (; poz <= n; poz += poz & (-poz)) aib[poz] = max(aib[poz], val); } long long compute(int poz) { long long ans = 0; for (; poz; poz -= poz & (-poz)...
replace
4
5
4
5
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> #define debug(x) cerr << #x << ": " << x << '\n' #define debugArray(x, n) \ for (long long hoge = 0; (hoge) < (n); ++(hoge)) \ cerr << #x << "[" << hoge << "]: " << x[hoge] << '\n' using namespace std; type...
#include <bits/stdc++.h> #define debug(x) cerr << #x << ": " << x << '\n' #define debugArray(x, n) \ for (long long hoge = 0; (hoge) < (n); ++(hoge)) \ cerr << #x << "[" << hoge << "]: " << x[hoge] << '\n' using namespace std; type...
replace
56
57
56
57
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> #define N_MAX 100002 #define ll long long using namespace std; int n; int h[N_MAX]; ll b[N_MAX]; ll aib[N_MAX]; void update(int pos, ll val) { for (int i = pos; i <= n; i += i & (-i)) aib[i] = max(aib[i], val); } ll query(int pos) { ll ans = 0; for (int i = pos - 1; i >= 1; i -...
#include <bits/stdc++.h> #define N_MAX 200002 #define ll long long using namespace std; int n; int h[N_MAX]; ll b[N_MAX]; ll aib[N_MAX]; void update(int pos, ll val) { for (int i = pos; i <= n; i += i & (-i)) aib[i] = max(aib[i], val); } ll query(int pos) { ll ans = 0; for (int i = pos - 1; i >= 1; i -...
replace
2
3
2
3
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> #define BPhuong "main" #define maxn 100005 #define maxm #define fi(i, a, b) for (int i = a; i <= b; i++) #define fid(i, a, b) for (int i = a; i >= b; i--) #define se second #define f first #define ll long long #define pii pair<int, int> #define pb push_back #define bit(x, i) ((x >> i) & 1) #def...
#include <bits/stdc++.h> #define BPhuong "main" #define maxn 200005 #define maxm #define fi(i, a, b) for (int i = a; i <= b; i++) #define fid(i, a, b) for (int i = a; i >= b; i--) #define se second #define f first #define ll long long #define pii pair<int, int> #define pb push_back #define bit(x, i) ((x >> i) & 1) #def...
replace
2
3
2
3
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define IOS \ cin.sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define rep(i, ...
#include <bits/stdc++.h> using namespace std; #define IOS \ cin.sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define rep(i, ...
replace
27
28
27
28
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long LL; const int N = 1e5; const LL INF = 1e7; int n; int h[N + 5]; LL a[N + 5]; LL ST[4 * N + 5]; void build(int node = 1, int l = 1, int r = n) { if (l == r) { ST[node] = -INF; return; } build(node * 2, l, (l + r) / 2); build(node * 2 + ...
#include <bits/stdc++.h> using namespace std; typedef long long LL; const int N = 2e5; const LL INF = 1e7; int n; int h[N + 5]; LL a[N + 5]; LL ST[4 * N + 5]; void build(int node = 1, int l = 1, int r = n) { if (l == r) { ST[node] = -INF; return; } build(node * 2, l, (l + r) / 2); build(node * 2 + ...
replace
5
6
5
6
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const int mx = 100005; int n, a, h[mx]; struct SegTree { int sz = 2; vector<long long> dat; SegTree(int n) { while (n >= sz) sz *= 2; dat.assign(sz * 2, 0); } void set(int x, long long n) { int l = sz, r = x - 1 + sz; long long res = 0; ...
#include <bits/stdc++.h> using namespace std; const int mx = 200005; int n, a, h[mx]; struct SegTree { int sz = 2; vector<long long> dat; SegTree(int n) { while (n >= sz) sz *= 2; dat.assign(sz * 2, 0); } void set(int x, long long n) { int l = sz, r = x - 1 + sz; long long res = 0; ...
replace
2
3
2
3
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define ll long long int bool sortinrev(const pair<ll, ll> &a, const pair<ll, ll> &b) { return (a.first > b.first); } ll query(ll tree[], ll index, ll qs, ll qe, ll s, ll e) { if (qs <= s && e <= qe) { return tree[index]; } if (e < qs || s > qe) { return 0...
#include <bits/stdc++.h> using namespace std; #define ll long long int bool sortinrev(const pair<ll, ll> &a, const pair<ll, ll> &b) { return (a.first > b.first); } ll query(ll tree[], ll index, ll qs, ll qe, ll s, ll e) { if (qs <= s && e <= qe) { return tree[index]; } if (e < qs || s > qe) { return 0...
replace
51
52
51
52
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> #include <unordered_map> using namespace std; #define forn(i, n) for (ll i = 0; i < (ll)(n); ++i) #define sz(a) static_cast<int>((a).size()) #define pb emplace_back #define mp make_pair #define endl '\n' #define f first #define s second #ifdef SEREZHKA #define dbg(...) _dbg(#__VA_ARGS__, __V...
#include <bits/stdc++.h> #include <unordered_map> using namespace std; #define forn(i, n) for (ll i = 0; i < (ll)(n); ++i) #define sz(a) static_cast<int>((a).size()) #define pb emplace_back #define mp make_pair #define endl '\n' #define f first #define s second #ifdef SEREZHKA #define dbg(...) _dbg(#__VA_ARGS__, __V...
replace
38
39
38
39
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> #define ll long long #define ld long double #define pii pair<int, int> #define F first #define S second const ll P = 1000000007; const int N = (1 << 17); using namespace std; int n; ll f[N + 1], h[N], a[N]; void add(int i, ll o) { for (; i <= N; i += i & -i) f[i] = max(f[i], o); } ll...
#include <bits/stdc++.h> #define ll long long #define ld long double #define pii pair<int, int> #define F first #define S second const ll P = 1000000007; const int N = (1 << 18); using namespace std; int n; ll f[N + 1], h[N], a[N]; void add(int i, ll o) { for (; i <= N; i += i & -i) f[i] = max(f[i], o); } ll...
replace
8
9
8
9
0
p03176
C++
Time Limit Exceeded
/*Saurav Paul*/ #include <bits/stdc++.h> #define endl '\n' #define ll long long int #define loop(i, a, b) for (ll i = a; i <= b; ++i) #define boost ios_base::sync_with_stdio(0); #define eb emplace_back #define mp make_pair #define clr(x) x.clear() #define MOD 1e9 + 7 #define itoc(c) ((char)(((int)'0') + c)) #define cto...
/*Saurav Paul*/ #include <bits/stdc++.h> #define endl '\n' #define ll long long int #define loop(i, a, b) for (ll i = a; i <= b; ++i) #define boost ios_base::sync_with_stdio(0); #define eb emplace_back #define mp make_pair #define clr(x) x.clear() #define MOD 1e9 + 7 #define itoc(c) ((char)(((int)'0') + c)) #define cto...
replace
120
123
120
123
TLE
p03176
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int64_t query(vector<int64_t> dp, int l, int r, int v, int b, int e) { if (b >= r || e <= l) return 0; if (b <= l && e >= r) return dp[v]; int h = (l + r) / 2; return max(query(dp, l, h, v * 2, b, e), query(dp, h, r, v * 2 + 1, b, e)); } void update(vector<i...
#include <bits/stdc++.h> using namespace std; int64_t query(vector<int64_t> &dp, int l, int r, int v, int b, int e) { if (b >= r || e <= l) return 0; if (b <= l && e >= r) return dp[v]; int h = (l + r) / 2; return max(query(dp, l, h, v * 2, b, e), query(dp, h, r, v * 2 + 1, b, e)); } void update(vector<...
replace
2
3
2
3
TLE
p03176
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define ll long long #define ld double #define mp make_pair #define pb push_back #define F first #define S second #define setpr(pp) fixed << setprecision(pp) #define FOR(I, N) for (I = 0; I < N; ++I) #define MS0(x) memset(x, 0, sizeof(x)) #define MS1(x) memset(x, -1, sizeo...
#include <bits/stdc++.h> using namespace std; #define ll long long #define ld double #define mp make_pair #define pb push_back #define F first #define S second #define setpr(pp) fixed << setprecision(pp) #define FOR(I, N) for (I = 0; I < N; ++I) #define MS0(x) memset(x, 0, sizeof(x)) #define MS1(x) memset(x, -1, sizeo...
replace
20
21
20
21
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int n; long long int dp[400005], a[100001]; int h[100001]; long long int maximum(int a, int b, int curr, int z) { if (a > z) return 0; if (b <= z) return dp[curr]; if (b == a) { if (a <= z) return dp[curr]; else return 0; } if (b > a)...
#include <bits/stdc++.h> using namespace std; int n; long long int dp[800005], a[200001]; int h[200001]; long long int maximum(int a, int b, int curr, int z) { if (a > z) return 0; if (b <= z) return dp[curr]; if (b == a) { if (a <= z) return dp[curr]; else return 0; } if (b > a)...
replace
4
6
4
6
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define int long long const int MAXN = 1 << 18; int arbre[MAXN]; void ajout(int noeud, int valeur) { noeud += MAXN; arbre[noeud] = valeur; while (noeud > 0) { noeud /= 2; arbre[noeud] = max(arbre[noeud * 2], arbre[noeud * 2 + 1]); } } int trouverMax(int ga...
#include <bits/stdc++.h> using namespace std; #define int long long const int MAXN = 1 << 18; int arbre[MAXN * 2]; void ajout(int noeud, int valeur) { noeud += MAXN; arbre[noeud] = valeur; while (noeud > 0) { noeud /= 2; arbre[noeud] = max(arbre[noeud * 2], arbre[noeud * 2 + 1]); } } int trouverMax(in...
replace
4
5
4
5
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> #define inp 20 #define check exit(0) #define nl cout << endl; #define mod 1000000007 #define ll long long int #define trace(x) cerr << #x << " : " << x << endl; #define jaldi \ ios_base::sync_with_stdio(false); ...
#include <bits/stdc++.h> #define inp 200005 #define check exit(0) #define nl cout << endl; #define mod 1000000007 #define ll long long int #define trace(x) cerr << #x << " : " << x << endl; #define jaldi \ ios_base::sync_with_stdio(false); ...
replace
2
3
2
3
0
p03176
C++
Runtime Error
#define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <bitset> #include <complex> #include <deque> #include <exception> #include <fstream> #include <functional> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <iterator> #include <limits> #include <list> #incl...
#define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <bitset> #include <complex> #include <deque> #include <exception> #include <fstream> #include <functional> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <iterator> #include <limits> #include <list> #incl...
replace
67
68
67
68
0
p03176
C++
Runtime Error
// {{{ #include <algorithm> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using n...
// {{{ #include <algorithm> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using n...
replace
116
117
116
117
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; long long t[600000]; int h[200001]; long long query(int index, int lb, int rb, int lq, int rq) { if (lb == rb || (lq == lb && rb == rq)) return t[index]; int mid = (lb + rb) / 2; if (lq > mid) return query(index * 2 + 1, mid + 1, rb, lq, rq); else if (rq <= ...
#include <bits/stdc++.h> using namespace std; long long t[600000]; int h[200001]; long long query(int index, int lb, int rb, int lq, int rq) { if (lb == rb || (lq == lb && rb == rq)) return t[index]; int mid = (lb + rb) / 2; if (lq > mid) return query(index * 2 + 1, mid + 1, rb, lq, rq); else if (rq <= ...
replace
18
19
18
19
-11
p03176
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define all(x) x.begin(), x.end() typedef vector<int> vi; typedef pair<int, int> ii; typedef long long ll; const int mod = 1e9 + 7; const ll inf = 3e18 + 5; const int MAXN = 1 << 18; // 2.6e5 int N = 200000; ll seg[2 * MAXN]; // root is seg[1] void update(int p, ll val...
#include <bits/stdc++.h> using namespace std; #define all(x) x.begin(), x.end() typedef vector<int> vi; typedef pair<int, int> ii; typedef long long ll; const int mod = 1e9 + 7; const ll inf = 3e18 + 5; const int MAXN = 1 << 18; // 2.6e5 int N = 200000; ll seg[2 * MAXN]; // root is seg[1] void update(int p, ll val...
delete
37
42
37
37
0
p03176
C++
Runtime Error
#pragma GCC optimize "-O3" #include <bits/stdc++.h> using namespace std; #define lo long const long long lmax = 1999999999; const long long lmx = 1999999999999999999; const long long MAXN = 100003; long long n, t[4 * MAXN]; void build(long long a[], long long v, long long tl, long long tr) { if (tl == tr) { t[v] ...
#pragma GCC optimize "-O3" #include <bits/stdc++.h> using namespace std; #define lo long const long long lmax = 1999999999; const long long lmx = 1999999999999999999; const long long MAXN = 200003; long long n, t[4 * MAXN]; void build(long long a[], long long v, long long tl, long long tr) { if (tl == tr) { t[v] ...
replace
6
7
6
7
0
p03176
C++
Runtime Error
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <queue> #include <vector> #define all(x) (x).begin(), (x).end() using namespace std; typedef long long LL; typedef unsigned int uii; typedef pair<int, int> pii; typedef unsigned long long uLL; typedef vector<int> vii...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <queue> #include <vector> #define all(x) (x).begin(), (x).end() using namespace std; typedef long long LL; typedef unsigned int uii; typedef pair<int, int> pii; typedef unsigned long long uLL; typedef vector<int> vii...
replace
15
16
15
16
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define fio \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0) #define per(i, n...
#include <bits/stdc++.h> using namespace std; #define fio \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0) #define per(i, n...
replace
29
30
29
30
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll segtree[500001], n, h[300001], a[300001]; void update(ll node, ll start, ll end, ll ix, ll val) { if (start == end) { segtree[node] = val; } else { ll mid = (start + end) / 2; if (ix <= mid) update(2 * node, start, mid, ix, v...
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll segtree[1000001], n, h[300001], a[300001]; void update(ll node, ll start, ll end, ll ix, ll val) { if (start == end) { segtree[node] = val; } else { ll mid = (start + end) / 2; if (ix <= mid) update(2 * node, start, mid, ix, ...
replace
4
5
4
5
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long LL; typedef pair<int, int> PII; typedef vector<int> VI; #define MP make_pair #define PB push_back #define X first #define Y second #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define RFOR(i, b, a) for (int i = (b)-1; i >= (a); --i) #define ITER(...
#include <bits/stdc++.h> using namespace std; typedef long long LL; typedef pair<int, int> PII; typedef vector<int> VI; #define MP make_pair #define PB push_back #define X first #define Y second #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define RFOR(i, b, a) for (int i = (b)-1; i >= (a); --i) #define ITER(...
replace
24
25
24
25
0
Time elapsed: 0.034482
p03176
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define ll long long #define PII pair<ll, ll> #define VI vector<ll> #define VB vector<bool> #define VC vector<char> #define VVI vector<vector<ll>> #define VVC vector<vector<char>> #define VS vector<string> #define VP vector<PII> #define lf(i, a, b) for (ll i = a; i <= b; i...
#include <bits/stdc++.h> using namespace std; #define ll long long #define PII pair<ll, ll> #define VI vector<ll> #define VB vector<bool> #define VC vector<char> #define VVI vector<vector<ll>> #define VVC vector<vector<char>> #define VS vector<string> #define VP vector<PII> #define lf(i, a, b) for (ll i = a; i <= b; i...
replace
48
49
48
49
0
p03176
C++
Runtime Error
/* _____ _ _ _ _ |_ _| |__ ___ / \ _ __ ___| |__ _ _| | | | | '_ \ / _ \ / _ \ | '_ \/ __| '_ \| | | | | | | | | | | __// ___ \| | | \__ \ | | | |_| | | |_| |_| |_|\___/_/ \_\_| |_|___/_| |_|\__,_|_| */ #include <bits/stdc++.h> #include <ext/pb_ds/assoc_containe...
/* _____ _ _ _ _ |_ _| |__ ___ / \ _ __ ___| |__ _ _| | | | | '_ \ / _ \ / _ \ | '_ \/ __| '_ \| | | | | | | | | | | __// ___ \| | | \__ \ | | | |_| | | |_| |_| |_|\___/_/ \_\_| |_|___/_| |_|\__,_|_| */ #include <bits/stdc++.h> #include <ext/pb_ds/assoc_containe...
replace
59
60
59
60
0
Time elapsed: 36.739ms
p03176
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define N 100005 typedef long long int ll; ll beauty[N]; ll bit[N]; ll height[N]; void update(int i, int n, ll w) { int k = i; ll sum = 0; while (k <= n) { bit[k] = max(bit[k], w); k = k + (k & (-k)); } } ll getsum(ll x) { ll sum = 0; while (x != 0) { ...
#include <bits/stdc++.h> using namespace std; #define N 200005 typedef long long int ll; ll beauty[N]; ll bit[N]; ll height[N]; void update(int i, int n, ll w) { int k = i; ll sum = 0; while (k <= n) { bit[k] = max(bit[k], w); k = k + (k & (-k)); } } ll getsum(ll x) { ll sum = 0; while (x != 0) { ...
replace
2
3
2
3
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long int; const int MAXN = 112345; int n, m, k; ll ft[MAXN]; ll get(int x) { ll ans = 0; for (; x; x -= x & -x) { ans = max(ans, ft[x]); } return ans; } void update(int x, ll v) { for (; x <= n; x += x & -x) { ft[x] = max(v, ft[x]); } } ...
#include <bits/stdc++.h> using namespace std; using ll = long long int; const int MAXN = 212345; int n, m, k; ll ft[MAXN]; ll get(int x) { ll ans = 0; for (; x; x -= x & -x) { ans = max(ans, ft[x]); } return ans; } void update(int x, ll v) { for (; x <= n; x += x & -x) { ft[x] = max(v, ft[x]); } } ...
replace
3
4
3
4
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define FOR(i, j, k, in) for (int i = j; i < k; i += in) #define RFOR(i, j, k, in) for (int i = j; i >= k; i -= in) #define REP(i, j) FOR(i, 0, j, 1) #define FOREACH(it, l) for (auto it = l.begin(); it != l.end(); it++) #define MP make_pair #define PB push_back #define P...
#include <bits/stdc++.h> using namespace std; #define FOR(i, j, k, in) for (int i = j; i < k; i += in) #define RFOR(i, j, k, in) for (int i = j; i >= k; i -= in) #define REP(i, j) FOR(i, 0, j, 1) #define FOREACH(it, l) for (auto it = l.begin(); it != l.end(); it++) #define MP make_pair #define PB push_back #define P...
replace
42
46
42
46
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define ll long long const int N = 2e5 + 5; vector<ll> dp(N); int main() { int n; cin >> n; int base = 1; while (base <= n) { base <<= 1; } vector<ll> tree(2 * N); int h[n], a[n]; for (int i = 0; i < n; i++) { cin >> h[i]; } for (int i = 0; i < n...
#include <bits/stdc++.h> using namespace std; #define ll long long const int N = 2e5 + 5; vector<ll> dp(N); int main() { int n; cin >> n; int base = 1; while (base <= n) { base <<= 1; } vector<ll> tree(2 * base); int h[n], a[n]; for (int i = 0; i < n; i++) { cin >> h[i]; } for (int i = 0; i ...
replace
12
13
12
13
0
p03176
C++
Runtime Error
// #include <boost/multiprecision/cpp_int.hpp> // using namespace boost::multiprecision; #include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define f first #define s second #define pb push_back #define REP(i, a, b) for (long long int i = a; i < b; i++) #define mp make_pair #define...
// #include <boost/multiprecision/cpp_int.hpp> // using namespace boost::multiprecision; #include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define f first #define s second #define pb push_back #define REP(i, a, b) for (long long int i = a; i < b; i++) #define mp make_pair #define...
replace
197
201
197
201
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define FOR(i, a, b) for (int i = (a); i < (b); i++) #define RFOR(i, a, b) for (int i = (b)-1; i >= (a); i--) #define REP(i, n) for (int i = 0; i < (n); i++) #define RREP(i, n) for (int i = (n)-1; i >= 0; i--) typedef long long LL; const int MAX_N = 1 << 17; // セグメント木を持つグロー...
#include <bits/stdc++.h> using namespace std; #define FOR(i, a, b) for (int i = (a); i < (b); i++) #define RFOR(i, a, b) for (int i = (b)-1; i >= (a); i--) #define REP(i, n) for (int i = 0; i < (n); i++) #define RREP(i, n) for (int i = (n)-1; i >= 0; i--) typedef long long LL; const int MAX_N = 1 << 20; // セグメント木を持つグロー...
replace
7
8
7
8
0
p03176
C++
Runtime Error
/*░ ░▄▀▀▀▄░Prashik░░ ▄███▀░◐░░░▌░░░░░░░░░ ░░░░▌░░░░░▐░░░░░░░░░ ░░░░▐░░░░░▐░░░░░░░░░ ░░░░▌░░░░░▐▄▄░░░░░░░ ░░░░▌░░░░▄▀▒▒▀▀▀▀▄ ░░░▐░░░░▐▒▒▒▒▒▒▒▒▀▀▄ ░░░▐░░░░▐▄▒▒▒▒▒▒▒▒▒▒▀▄ ░░░░▀▄░░░░▀▄▒▒▒▒▒▒▒▒▒▒▀▄ ░░░░░░▀▄▄▄▄▄█▄▄▄▄▄▄▄▄▄▄▄▀▄ ░░░░░░░░░░░▌▌░▌▌░░░░░ ░░░░░░░░░░░▌▌░▌▌░░░░░ ░░░░░░░░░▄▄▌▌▄▌▌░░░░░*/ #include <bits/stdc++.h> usin...
/*░ ░▄▀▀▀▄░Prashik░░ ▄███▀░◐░░░▌░░░░░░░░░ ░░░░▌░░░░░▐░░░░░░░░░ ░░░░▐░░░░░▐░░░░░░░░░ ░░░░▌░░░░░▐▄▄░░░░░░░ ░░░░▌░░░░▄▀▒▒▀▀▀▀▄ ░░░▐░░░░▐▒▒▒▒▒▒▒▒▀▀▄ ░░░▐░░░░▐▄▒▒▒▒▒▒▒▒▒▒▀▄ ░░░░▀▄░░░░▀▄▒▒▒▒▒▒▒▒▒▒▀▄ ░░░░░░▀▄▄▄▄▄█▄▄▄▄▄▄▄▄▄▄▄▀▄ ░░░░░░░░░░░▌▌░▌▌░░░░░ ░░░░░░░░░░░▌▌░▌▌░░░░░ ░░░░░░░░░▄▄▌▌▄▌▌░░░░░*/ #include <bits/stdc++.h> usin...
replace
45
46
45
46
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define int long long string s; int mo = 1000000007; struct stnode { int ma; }; stnode st[500005]; int h[200005]; int bty[200005]; int n; void merge(stnode &f, stnode &n1, stnode &n2) { f.ma = max(n1.ma, n2.ma); } void build(int node, int l, int r) { if (l == r) { ...
#include <bits/stdc++.h> using namespace std; #define int long long string s; int mo = 1000000007; struct stnode { int ma; }; stnode st[1000005]; int h[200005]; int bty[200005]; int n; void merge(stnode &f, stnode &n1, stnode &n2) { f.ma = max(n1.ma, n2.ma); } void build(int node, int l, int r) { if (l == r) { ...
replace
9
10
9
10
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define mp make_pair #define ff first #define ss second typedef long long ll; typedef unsigned long long ull; typedef double db; typedef long double ldb; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef pair<ll, int> pli; typedef pair<db, db> pdd; typedef vecto...
#include <bits/stdc++.h> using namespace std; #define mp make_pair #define ff first #define ss second typedef long long ll; typedef unsigned long long ull; typedef double db; typedef long double ldb; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef pair<ll, int> pli; typedef pair<db, db> pdd; typedef vecto...
replace
43
45
43
45
0
p03176
C++
Runtime Error
/* * * * * * * * * * * ** * * * saurabh8522 * * I will handle * * IT. * * * * * * * * * * * * * * **/ #include <bits/stdc++.h> #define mp(a, b) make_pair(a, b) #define pb push_back #define FastRead ...
/* * * * * * * * * * * ** * * * saurabh8522 * * I will handle * * IT. * * * * * * * * * * * * * * **/ #include <bits/stdc++.h> #define mp(a, b) make_pair(a, b) #define pb push_back #define FastRead ...
replace
47
48
47
48
0
p03176
C++
Time Limit Exceeded
/* JAI JAGANNATH! */ //@Author : zanj0 #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; using namespace std; typedef long long int lli; #define ff first #define ss second #define pb push_back #define mp make_pair #define pii pair<lli, lli> #define vi vector<lli> #define ...
/* JAI JAGANNATH! */ //@Author : zanj0 #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; using namespace std; typedef long long int lli; #define ff first #define ss second #define pb push_back #define mp make_pair #define pii pair<lli, lli> #define vi vector<lli> #define ...
replace
72
77
72
76
TLE
p03176
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const long long int N = 200000; long long int dp[N + 1], h[N + 1], v[N + 1], bit[N + 1]; long long int sgtr[4 * N + 5]; int n; void update(int s, int e, int node, int i, long long int y) { if (i < s || i > e) return; if (s == e && s == i) { sgtr[node] = y; r...
#include <bits/stdc++.h> using namespace std; const long long int N = 200000; long long int dp[N + 1], h[N + 1], v[N + 1], bit[N + 1]; long long int sgtr[4 * N + 5]; int n; void update(int s, int e, int node, int i, long long int y) { if (i < s || i > e) return; if (s == e && s == i) { sgtr[node] = y; r...
delete
35
39
35
35
0
p03176
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef unsigned long long ull; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef pair<double, double> pdd; const ull mod = 1e9 + 7; #define REP(i, n) for (int i = 0; i < (int)n; ++i) // debug #define dump(x) cerr << #x << " = " << (x) <<...
#include <bits/stdc++.h> using namespace std; typedef unsigned long long ull; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef pair<double, double> pdd; const ull mod = 1e9 + 7; #define REP(i, n) for (int i = 0; i < (int)n; ++i) // debug #define dump(x) cerr << #x << " = " << (x) <<...
replace
25
26
25
26
0