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
p02598
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef vector<ll> vl; typedef vector<int> vi; typedef vector<bool> vb; typedef vector<vl> vvl; typedef vector<vi> vvi; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef vector<pll> vpll; typedef vector<pii> vpii; t...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef vector<ll> vl; typedef vector<int> vi; typedef vector<bool> vb; typedef vector<vl> vvl; typedef vector<vi> vvi; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef vector<pll> vpll; typedef vector<pii> vpii; t...
replace
38
39
38
39
-11
p02598
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; void solve() { int n; ll k; cin >> n >> k; vector<ll> a(n); ll ma = 0; for (int i = 0; i < n; i++) { cin >> a[i]; ma = max(ma, a[i]); } ll left = -1; ll right = ma + 1; while (right - left > 1) {...
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; void solve() { int n; ll k; cin >> n >> k; vector<ll> a(n); ll ma = 0; for (int i = 0; i < n; i++) { cin >> a[i]; ma = max(ma, a[i]); } ll left = 0; ll right = ma + 1; while (right - left > 1) { ...
replace
18
19
18
19
0
p02598
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); int n, k; cin >> n >> k; vector<int> a(n); for (int &x : a) { cin >> x; } int l = 0, r = *max_element(a.begin(), a.end()); while (l < r) { int64_t m = (l + r) >> 1; int64_t tmp = 0; for (int x : a) { ...
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); int n, k; cin >> n >> k; vector<int> a(n); for (int &x : a) { cin >> x; } int l = 1, r = *max_element(a.begin(), a.end()); while (l < r) { int64_t m = (l + r) >> 1; int64_t tmp = 0; for (int x : a) { ...
replace
10
11
10
11
0
p02598
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <queue> #include <stack> #include <stdio.h> #include <string.h> typedef long long int ll; using namespace std; #define maxn 0x3f3f3f3f #define INF 0x3f3f3f3f3f3f3f3f const int mm = 2e5 + 100; ll d[mm]; ll n, m; ll check(double u) { int...
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <queue> #include <stack> #include <stdio.h> #include <string.h> typedef long long int ll; using namespace std; #define maxn 0x3f3f3f3f #define INF 0x3f3f3f3f3f3f3f3f const int mm = 2e5 + 100; ll d[mm]; ll n, m; ll check(double u) { int...
replace
37
38
37
38
TLE
p02598
C++
Runtime Error
/* * Created By: 'Present_Sir' * Created On: Monday 03 August 2020 08:11:06 PM IST */ #include <bits/stdc++.h> #define IOS \ ios_base::sync_with_stdio(false); \ cin.tie(NULL) #define int long long usin...
/* * Created By: 'Present_Sir' * Created On: Monday 03 August 2020 08:11:06 PM IST */ #include <bits/stdc++.h> #define IOS \ ios_base::sync_with_stdio(false); \ cin.tie(NULL) #define int long long usin...
insert
19
19
19
22
0
p02598
C++
Runtime Error
#include <cmath> #include <cstdio> #include <cstring> #include <iostream> #define Maxn 200010 #define LL long long using namespace std; const double eps = 0.00001; inline LL read() { LL x = 0, f = 1; char c = getchar(); while (c < '0' || c > '9') { if (c == '-') f = -1; c = getchar(); } whil...
#include <cmath> #include <cstdio> #include <cstring> #include <iostream> #define Maxn 200010 #define LL long long using namespace std; const double eps = 0.00001; inline LL read() { LL x = 0, f = 1; char c = getchar(); while (c < '0' || c > '9') { if (c == '-') f = -1; c = getchar(); } whil...
insert
30
30
30
32
0
p02598
C++
Runtime Error
#include <bits/stdc++.h> #define ss second #define ff first #define all(x) x.begin(), x.end() // #define DEBUG 100 using namespace std; using ll = long long; using pii = pair<int, int>; using pll = pair<ll, ll>; const ll oo = 1e9 + 7; const ll mod = 1e9 + 7, maxn = 2e6 + 100, maxm = 1e3 + 100; const double PI = acos...
#include <bits/stdc++.h> #define ss second #define ff first #define all(x) x.begin(), x.end() // #define DEBUG 100 using namespace std; using ll = long long; using pii = pair<int, int>; using pll = pair<ll, ll>; const ll oo = 1e9 + 7; const ll mod = 1e9 + 7, maxn = 2e6 + 100, maxm = 1e3 + 100; const double PI = acos...
replace
17
18
17
18
0
p02598
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)n; ++i) #define rrep(i, n) for (int i = (int)n - 1; i >= 0; --i) using namespace std; using ll = long long; template <typename T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template <typename T> inline bool...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)n; ++i) #define rrep(i, n) for (int i = (int)n - 1; i >= 0; --i) using namespace std; using ll = long long; template <typename T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template <typename T> inline bool...
replace
55
56
55
56
0
p02598
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef vector<int> VI; typedef vector<vector<int>> VVI; typedef vector<ll> VLL; typedef vector<vector<ll>> VVLL; typedef pair<ll, ll> Pair; template <class T> T input() { T t; cin >> t; return t; } #define FOR(i, ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef vector<int> VI; typedef vector<vector<int>> VVI; typedef vector<ll> VLL; typedef vector<vector<ll>> VVLL; typedef pair<ll, ll> Pair; template <class T> T input() { T t; cin >> t; return t; } #define FOR(i, ...
insert
66
66
66
70
0
p02598
C++
Runtime Error
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define ll long long int #define REP(i, x, n) for (ll i = x; i < n; i++) #define SZ(v) (ll) v.size() #define endl "\n" #define ff first #define ss second #define PQ_MIN priority_queue<ll, vector<ll>, greater<ll>> #def...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define ll long long int #define REP(i, x, n) for (ll i = x; i < n; i++) #define SZ(v) (ll) v.size() #define endl "\n" #define ff first #define ss second #define PQ_MIN priority_queue<ll, vector<ll>, greater<ll>> #def...
replace
98
99
98
99
0
p02598
C++
Runtime Error
// #pragma GCC optimize(2) // #pragma G++ optimize(2) // #pragma comment(linker,"/STACK:102400000,102400000") #include <bits/stdc++.h> using namespace std; typedef long long LL; typedef unsigned int ui; typedef unsigned long long ull; typedef float fl; typedef long double ld; typedef pair<int, int> pii; #if (WIN32) |...
// #pragma GCC optimize(2) // #pragma G++ optimize(2) // #pragma comment(linker,"/STACK:102400000,102400000") #include <bits/stdc++.h> using namespace std; typedef long long LL; typedef unsigned int ui; typedef unsigned long long ull; typedef float fl; typedef long double ld; typedef pair<int, int> pii; #if (WIN32) |...
replace
88
89
88
89
0
p02598
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define FILL0(x) memset(x, 0, sizeof(x)) #define FILL1(x) memset(x, -1, sizeof(x)) using namespace std; typedef long long ll; typedef pair<ll, ll> P; template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define FILL0(x) memset(x, 0, sizeof(x)) #define FILL1(x) memset(x, -1, sizeof(x)) using namespace std; typedef long long ll; typedef pair<ll, ll> P; template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1...
replace
39
40
39
40
0
p02598
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define inf 1001001001 #define mod 1000000007 #define mod2 998244353 #define pi acos(-1) #define all(v) v.begin(), v.end() int k; ll gcd(ll a, ll b) { if (b > a) swap(a, b); if (b == 0) ...
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define inf 1001001001 #define mod 1000000007 #define mod2 998244353 #define pi acos(-1) #define all(v) v.begin(), v.end() int k; ll gcd(ll a, ll b) { if (b > a) swap(a, b); if (b == 0) ...
replace
55
56
55
56
TLE
p02599
C++
Runtime Error
#include <bits/stdc++.h> #define ll long long #define scn(n) scanf("%d", &n) #define lscn(n) scanf("%lld", &n) #define lpri(n) printf("%lld", n) #define pri(n) printf("%d", n) #define pln() printf("\n") #define priln(n) printf("%d\n", n) #define lpriln(n) printf("%lld\n", n) #define rep(i, init, n) for (int i = init; i...
#include <bits/stdc++.h> #define ll long long #define scn(n) scanf("%d", &n) #define lscn(n) scanf("%lld", &n) #define lpri(n) printf("%lld", n) #define pri(n) printf("%d", n) #define pln() printf("\n") #define priln(n) printf("%d\n", n) #define lpriln(n) printf("%lld\n", n) #define rep(i, init, n) for (int i = init; i...
replace
19
20
19
20
0
p02599
C++
Runtime Error
#include <algorithm> #include <iostream> #include <math.h> #include <queue> #include <set> #include <stdio.h> #include <string.h> #include <vector> using namespace std; #define mp make_pair #define pb push_back #define X first #define Y second #define INF 5000005 int t, n, q, x, y; int a[100005], b[100005], tree[1000...
#include <algorithm> #include <iostream> #include <math.h> #include <queue> #include <set> #include <stdio.h> #include <string.h> #include <vector> using namespace std; #define mp make_pair #define pb push_back #define X first #define Y second #define INF 5000005 int t, n, q, x, y; int a[5000005], b[5000005], tree[50...
replace
17
19
17
19
0
p02599
C++
Runtime Error
#pragma GCC optimize("Ofast") #include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) #define cinf(n, x) \ for (int i = 0; i < (n); i++) \ cin >> x[i]; #define ft first #define sc second #defi...
#pragma GCC optimize("Ofast") #include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) #define cinf(n, x) \ for (int i = 0; i < (n); i++) \ cin >> x[i]; #define ft first #define sc second #defi...
insert
50
50
50
51
-11
p02599
C++
Time Limit Exceeded
// mai iss duniyaa ka sbse bada chutiyaaa huu #include <bits/stdc++.h> #include <chrono> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define mod 1000000007 #define mod2 998244353 #define int long long #define endl '\n' #define p_b push_back #define m_p make_pair #define fastIO ios_bas...
// mai iss duniyaa ka sbse bada chutiyaaa huu #include <bits/stdc++.h> #include <chrono> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define mod 1000000007 #define mod2 998244353 #define int long long #define endl '\n' #define p_b push_back #define m_p make_pair #define fastIO ios_bas...
replace
44
45
44
45
TLE
p02599
C++
Runtime Error
#include <algorithm> #include <iostream> #include <map> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <string> #include <vector> using namespace std; const int maxn = 10000; int n = 0, q = 0; struct Query { int id, l, r; bool operator<(Query a) const { return r < a.r; } } query[maxn]; int v[...
#include <algorithm> #include <iostream> #include <map> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <string> #include <vector> using namespace std; const int maxn = 1e6 + 7; int n = 0, q = 0; struct Query { int id, l, r; bool operator<(Query a) const { return r < a.r; } } query[maxn]; int ...
replace
9
10
9
10
0
p02599
C++
Runtime Error
// #pragma comment(linker, "/stack:200000000") // #pragma GCC optimize("Ofast") // #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx") // #pragma warning(disable : 4996) #include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using ull = unsigned long long; #define i...
// #pragma comment(linker, "/stack:200000000") // #pragma GCC optimize("Ofast") // #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx") // #pragma warning(disable : 4996) #include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using ull = unsigned long long; #define i...
replace
48
49
48
49
0
p02599
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <fstream> #include <iomanip> #include <iostream> #include <list> #include <map> #include <set> #include <string> #include <vector> #define fastio \ ios_base::sync_with_st...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <fstream> #include <iomanip> #include <iostream> #include <list> #include <map> #include <set> #include <string> #include <vector> #define fastio \ ios_base::sync_with_st...
replace
111
112
111
112
TLE
p02599
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define REP(i, m, n) for (ll i = (ll)(m); i < (ll)(n); i++) #define fi first #define se second long long mo = 1000000007; typedef long long ll; typedef long double ld; typedef pair<int, int> Pii; typedef pair<ll, ll> Pll; typede...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define REP(i, m, n) for (ll i = (ll)(m); i < (ll)(n); i++) #define fi first #define se second long long mo = 1000000007; typedef long long ll; typedef long double ld; typedef pair<int, int> Pii; typedef pair<ll, ll> Pll; typede...
replace
69
70
69
70
0
p02599
C++
Runtime Error
#include <algorithm> #include <cstdio> using namespace std; struct req { int l, r, val, idx; bool t; }; bool operator<(req a, req b) { if (a.r == b.r) { return a.t < b.t; } return a.r < b.r; } int bit[500001]; void add(int y, int val) { while (y <= 500000) { bit[y] += val; y += (y & -y); ...
#include <algorithm> #include <cstdio> using namespace std; struct req { int l, r, val, idx; bool t; }; bool operator<(req a, req b) { if (a.r == b.r) { return a.t < b.t; } return a.r < b.r; } int bit[500001]; void add(int y, int val) { while (y <= 500000) { bit[y] += val; y += (y & -y); ...
replace
36
37
36
37
0
p02599
C++
Runtime Error
// Patwari26 // #include template<t> as mine #include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define endl '\n' #define mii map<ll, ll> #define pii pair<ll, ll> #define vi vector<ll> #define all(a) (a).begin(), (a).end() #define x first #define y second #define sz(x) (ll) x.size(...
// Patwari26 // #include template<t> as mine #include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define endl '\n' #define mii map<ll, ll> #define pii pair<ll, ll> #define vi vector<ll> #define all(a) (a).begin(), (a).end() #define x first #define y second #define sz(x) (ll) x.size(...
replace
30
31
30
31
0
p02599
C++
Runtime Error
#include <bits/stdc++.h> // #pragma GCC optimize("Ofast") #define fi first #define se second #define ll long long #define dl double long using namespace std; const int NN = 1e9 + 7; const int N = 2e5 + 7; const int M = 26; const ll mod = 1e9 + 7; const int inf = 1e9 + 7; const dl rf = 1e-14; const int B = sqrt(N); ...
#include <bits/stdc++.h> // #pragma GCC optimize("Ofast") #define fi first #define se second #define ll long long #define dl double long using namespace std; const int NN = 1e9 + 7; const int N = 1e6 + 7; const int M = 26; const ll mod = 1e9 + 7; const int inf = 1e9 + 7; const dl rf = 1e-14; const int B = sqrt(N); ...
replace
12
13
12
13
0
p02599
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; // TEMPLATE #define pb push_back #define mp make_pair #define ll int #define ld long double #define pii pair<ll, ll> #define piii pair<ll, pii> #define F first #define S second #define newline printf("\n") #define minusone printf("-1\n") #define zeroo printf("0\n") #defin...
#include <bits/stdc++.h> using namespace std; // TEMPLATE #define pb push_back #define mp make_pair #define ll int #define ld long double #define pii pair<ll, ll> #define piii pair<ll, pii> #define F first #define S second #define newline printf("\n") #define minusone printf("-1\n") #define zeroo printf("0\n") #defin...
replace
108
109
108
109
TLE
p02599
C++
Time Limit Exceeded
#include <bits/stdc++.h> // #include <ext/pb_ds/assoc_container.hpp> // #include <ext/pb_ds/tree_policy.hpp> // using namespace __gnu_pbds; using namespace std; // template <typename T> // using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, // tree_order_statistics_node_update>; typedef long long ll; typede...
#include <bits/stdc++.h> // #include <ext/pb_ds/assoc_container.hpp> // #include <ext/pb_ds/tree_policy.hpp> // using namespace __gnu_pbds; using namespace std; // template <typename T> // using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, // tree_order_statistics_node_update>; typedef long long ll; typede...
replace
22
23
22
25
TLE
p02599
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define pii pair<ll, ll> #define SZ(x) ((int)(x).size()) #define endl "\n" #define vvi vector<vector<int>> #define vvl vector<vector<long long>> ll mod = 1e9 + 7; // const double pi = acos(-1.0); /* ll kmp(string x) { ll n= x....
#include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define pii pair<ll, ll> #define SZ(x) ((int)(x).size()) #define endl "\n" #define vvi vector<vector<int>> #define vvl vector<vector<long long>> ll mod = 1e9 + 7; // const double pi = acos(-1.0); /* ll kmp(string x) { ll n= x....
replace
90
91
90
91
0
p02599
C++
Runtime Error
#include <algorithm> #include <cstdio> #include <iostream> #define f first #define s second using namespace std; pair<int, pair<int, int>> q[200001]; int n, m, a[100001], ans[200001]; int st[5 * 100001], used[1000001]; int cmp(pair<int, pair<int, int>> a, pair<int, pair<int, int>> b) { if (a.s.f != b.s.f) retur...
#include <algorithm> #include <cstdio> #include <iostream> #define f first #define s second using namespace std; pair<int, pair<int, int>> q[500005]; int n, m, a[500005], ans[500005]; int st[25 * 100001], used[5000005]; int cmp(pair<int, pair<int, int>> a, pair<int, pair<int, int>> b) { if (a.s.f != b.s.f) retu...
replace
8
11
8
11
0
p02599
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const int MAXN = 200010; int A[MAXN], B[MAXN]; vector<int> T[4 * MAXN]; void build(int i, int l, int r) { if (l == r) T[i].push_back(B[r]); else { int m = (l + r) / 2; build(2 * i, l, m); build(2 * i + 1, m + 1, r); merge(T[2 * i].begin(), T[2 * ...
#include <bits/stdc++.h> using namespace std; const int MAXN = 500001; int A[MAXN], B[MAXN]; vector<int> T[4 * MAXN]; void build(int i, int l, int r) { if (l == r) T[i].push_back(B[r]); else { int m = (l + r) / 2; build(2 * i, l, m); build(2 * i + 1, m + 1, r); merge(T[2 * i].begin(), T[2 * ...
replace
4
5
4
5
0
p02599
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const int maxn = 1e5 + 5; const int inf = 0x3f3f3f3f; int c[maxn], vis[maxn], ans[maxn], tree[maxn]; vector<pair<int, int>> v[maxn]; int n, q; int lowbit(int x) { return x & (-x); } void add(int x, int k) { while (x <= n) { tree[x] += k; x += lowbit(x); } } int ...
#include <bits/stdc++.h> using namespace std; const int maxn = 5e5 + 5; const int inf = 0x3f3f3f3f; int c[maxn], vis[maxn], ans[maxn], tree[maxn]; vector<pair<int, int>> v[maxn]; int n, q; int lowbit(int x) { return x & (-x); } void add(int x, int k) { while (x <= n) { tree[x] += k; x += lowbit(x); } } int ...
replace
2
3
2
3
0
p02599
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define se second #define fr first #define int long long int #define pb push_back #define inf 1e18 #define slld(x) scanf("%lld", &x) #define plld(x) printf("%lld\n", x) #define all(v) v.begin(), v.end() #define CHAL_BAAP_KO_MT_SIKHA ...
#include <bits/stdc++.h> using namespace std; #define se second #define fr first #define int long long int #define pb push_back #define inf 1e18 #define slld(x) scanf("%lld", &x) #define plld(x) printf("%lld\n", x) #define all(v) v.begin(), v.end() #define CHAL_BAAP_KO_MT_SIKHA ...
replace
26
27
26
27
0
p02599
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int maxi = 2e5 + 5, n; vector<int> val(maxi), ano(maxi); vector<vector<int>> node; void init() { long long hei = ceil(log2(n)); hei = 2 * pow(2, hei); node.clear(); node.resize(hei); unordered_map<int, int> tmp; for (int i = n; i; i--) { if (tmp.find(val[i]...
#include <bits/stdc++.h> using namespace std; int maxi = 5e5 + 5, n; vector<int> val(maxi), ano(maxi); vector<vector<int>> node; void init() { long long hei = ceil(log2(n)); hei = 2 * pow(2, hei); node.clear(); node.resize(hei); unordered_map<int, int> tmp; for (int i = n; i; i--) { if (tmp.find(val[i]...
replace
2
3
2
3
0
p02599
C++
Runtime Error
#ifndef DEBUG #pragma GCC optimize("Ofast") #endif #include <bits/stdc++.h> using namespace std; #define hfor(var, s, e) \ for (int var = s; int(s) <= var && var < int(e); ++var) // half-opened range #define hfori(var, s, e) ...
#ifndef DEBUG #pragma GCC optimize("Ofast") #endif #include <bits/stdc++.h> using namespace std; #define hfor(var, s, e) \ for (int var = s; int(s) <= var && var < int(e); ++var) // half-opened range #define hfori(var, s, e) ...
replace
54
55
54
55
0
p02599
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const int N = 1e5 + 5; int bit[N], p[N], ans[N], a[N]; pair<int, pair<int, int>> pr[N]; void update(int idx, int val) { while (idx < N) { bit[idx] += val; idx += (idx & -idx); } } int read(int idx) { int sum = 0; while (idx > 0) { sum += bit[idx]; ...
#include <bits/stdc++.h> using namespace std; const int N = 5e5 + 5; int bit[N], p[N], ans[N], a[N]; pair<int, pair<int, int>> pr[N]; void update(int idx, int val) { while (idx < N) { bit[idx] += val; idx += (idx & -idx); } } int read(int idx) { int sum = 0; while (idx > 0) { sum += bit[idx]; ...
replace
2
3
2
3
0
p02599
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; /// ----------------------------- (Debug) ------------------------------ #define sim template <class c #define ris return *this #define dor > debug &operator<< #define eni(x) \ sim > typename enable_if<size...
#include <bits/stdc++.h> using namespace std; /// ----------------------------- (Debug) ------------------------------ #define sim template <class c #define ris return *this #define dor > debug &operator<< #define eni(x) \ sim > typename enable_if<size...
replace
89
91
89
91
0
[que: [((3, 1), 0), ((3, 3), 2), ((4, 2), 1)]] [ -->Line: 94]  [seg[1]: 1] [ -->Line: 101]  [seg[1]: 2] [ -->Line: 101]  [seg[1]: 2] [ -->Line: 101]  [que[j].second: 0] [ -->Line: 103]  [que[j].second: 2] [ -->Line: 103]  [seg[1]: 3] [ -->Line: 101]  [que[j].second: 1] [ -->...
p02599
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define all(x) x.begin(), x.end() #define sz(x) (int)x.size() #define pb push_back #define endl '\n' #define snd second #define fst first #define fastio cin.tie(NULL), cout.sync_with_stdio(true) typedef long long int ll; typedef unsigned long long int ull; typedef vector...
#include <bits/stdc++.h> using namespace std; #define all(x) x.begin(), x.end() #define sz(x) (int)x.size() #define pb push_back #define endl '\n' #define snd second #define fst first #define fastio cin.tie(NULL), cout.sync_with_stdio(true) typedef long long int ll; typedef unsigned long long int ull; typedef vector...
replace
38
43
38
44
TLE
p02599
C++
Runtime Error
#include <algorithm> #include <cstdio> #include <iostream> #define f first #define s second using namespace std; pair<int, pair<int, int>> q[200001]; int n, m, a[100001], ans[200001]; int st[5 * 100001], used[1000001]; int cmp(pair<int, pair<int, int>> a, pair<int, pair<int, int>> b) { if (a.s.f != b.s.f) retur...
#include <algorithm> #include <cstdio> #include <iostream> #define f first #define s second using namespace std; const int N = 500009; pair<int, pair<int, int>> q[N]; int n, m, a[N], ans[N]; int st[5 * N], used[5 * N]; int cmp(pair<int, pair<int, int>> a, pair<int, pair<int, int>> b) { if (a.s.f != b.s.f) return...
replace
7
11
7
11
0
p02599
C++
Time Limit Exceeded
#include <algorithm> #include <climits> #include <cmath> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> using namespace std; int c[500000]; int sqrtN = 710; struct SqrtDec...
#include <algorithm> #include <climits> #include <cmath> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> using namespace std; int c[500000]; int sqrtN = 710; struct SqrtDec...
insert
96
96
96
97
TLE
p02599
C++
Runtime Error
// Konrad Paluszek,University of Warsaw(former XIV LO Staszic) // #STAY AT HOME #ifndef LOCAL #pragma GCC optimize("O3") #endif #define TIME (chrono::steady_clock::now().time_since_epoch().count()) #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define xfm(a, b) a...
// Konrad Paluszek,University of Warsaw(former XIV LO Staszic) // #STAY AT HOME #ifndef LOCAL #pragma GCC optimize("O3") #endif #define TIME (chrono::steady_clock::now().time_since_epoch().count()) #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define xfm(a, b) a...
replace
262
263
262
263
0
p02599
C++
Time Limit Exceeded
// Konrad Paluszek,University of Warsaw(former XIV LO Staszic) // #STAY AT HOME #ifndef LOCAL #pragma GCC optimize("O3") #endif #define TIME (chrono::steady_clock::now().time_since_epoch().count()) #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define xfm(a, b) a...
// Konrad Paluszek,University of Warsaw(former XIV LO Staszic) // #STAY AT HOME #ifndef LOCAL #pragma GCC optimize("O3") #endif #define TIME (chrono::steady_clock::now().time_since_epoch().count()) #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define xfm(a, b) a...
replace
256
257
256
257
TLE
p02599
C++
Time Limit Exceeded
// Konrad Paluszek,University of Warsaw(former XIV LO Staszic) // #STAY AT HOME #ifndef LOCAL #pragma GCC optimize("O3") #endif #define TIME (chrono::steady_clock::now().time_since_epoch().count()) #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define xfm(a, b) a...
// Konrad Paluszek,University of Warsaw(former XIV LO Staszic) // #STAY AT HOME #ifndef LOCAL #pragma GCC optimize("O3") #endif #define TIME (chrono::steady_clock::now().time_since_epoch().count()) #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define xfm(a, b) a...
replace
202
203
202
204
TLE
p02599
C++
Time Limit Exceeded
// Konrad Paluszek,University of Warsaw(former XIV LO Staszic) // #STAY AT HOME #ifndef LOCAL #pragma GCC optimize("O3") #endif #define TIME (chrono::steady_clock::now().time_since_epoch().count()) #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define xfm(a, b) a...
// Konrad Paluszek,University of Warsaw(former XIV LO Staszic) // #STAY AT HOME #ifndef LOCAL #pragma GCC optimize("O3") #endif #define TIME (chrono::steady_clock::now().time_since_epoch().count()) #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define xfm(a, b) a...
replace
198
199
198
199
TLE
p02599
C++
Runtime Error
#include <bits/stdc++.h> #define ll long long #define endl '\n' #define rep(i, l, r) for (int i = l; i <= r; i++) #define per(i, r, l) for (int i = r; i >= l; i--) const int MX = 2e5 + 7; const int mod = 998244353; const double pi = 3.1415926535897932384; double isp = 1e-13; using namespace std; ll qpow(ll a, ll b, ll ...
#include <bits/stdc++.h> #define ll long long #define endl '\n' #define rep(i, l, r) for (int i = l; i <= r; i++) #define per(i, r, l) for (int i = r; i >= l; i--) const int MX = 5e5 + 7; const int mod = 998244353; const double pi = 3.1415926535897932384; double isp = 1e-13; using namespace std; ll qpow(ll a, ll b, ll ...
replace
5
6
5
6
0
p02599
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define C continue; #define R return #define D double #define I insert #define ll long long #define ld long double #define ull unsigned long long #define ui unsigned int #define pb push_back #define pf push_front #define vi vector<int> #define vc vector<char> #define v...
#include <bits/stdc++.h> using namespace std; #define C continue; #define R return #define D double #define I insert #define ll long long #define ld long double #define ull unsigned long long #define ui unsigned int #define pb push_back #define pf push_front #define vi vector<int> #define vc vector<char> #define v...
insert
111
111
111
114
TLE
p02599
C++
Runtime Error
/* Author:loceaner */ #include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #define lowbit(x) (x & (-x)); using namespace std; const int A = 1e5 + 11; const int B = 1e6 + 11; const int mod = 1e9 + 7; const int inf = 0x3f3f3f3f; inline int read() { char c = getchar(); int x...
/* Author:loceaner */ #include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #define lowbit(x) (x & (-x)); using namespace std; const int A = 1e6 + 11; const int B = 1e6 + 11; const int mod = 1e9 + 7; const int inf = 0x3f3f3f3f; inline int read() { char c = getchar(); int x...
replace
11
12
11
12
0
p02599
C++
Runtime Error
#include <bits/stdc++.h> #define SZ(x) ((int)(x).size()) #define REP(i, n) for (int i = 0; i < (int)(n); i++) #define REP1(i, a, b) for (int i = a; i <= (int)(b); i++) #define ALL(c) (c).begin(), (c).end() #define RALL(c) (c).rbegin(), (c).rend() #define PB push_back #define MP make_pair using namespace std; typedef lo...
#include <bits/stdc++.h> #define SZ(x) ((int)(x).size()) #define REP(i, n) for (int i = 0; i < (int)(n); i++) #define REP1(i, a, b) for (int i = a; i <= (int)(b); i++) #define ALL(c) (c).begin(), (c).end() #define RALL(c) (c).rbegin(), (c).rend() #define PB push_back #define MP make_pair using namespace std; typedef lo...
replace
24
25
24
25
-11
p02599
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define REP(i, m, n) for (int i = (m); i < (int)(n); i++) #define RREP(i, m, n) for (int i = (int)((n)-1); i >= m; i--) #define rep(i, n) REP(i, 0, n) #define rrep(i, n) RREP(i, 0, n) #define all(a) (a).begin(), (a).end() #define rall(a) (a).rbegin(), (a).rend() #define fi...
#include <bits/stdc++.h> using namespace std; #define REP(i, m, n) for (int i = (m); i < (int)(n); i++) #define RREP(i, m, n) for (int i = (int)((n)-1); i >= m; i--) #define rep(i, n) REP(i, 0, n) #define rrep(i, n) RREP(i, 0, n) #define all(a) (a).begin(), (a).end() #define rall(a) (a).rbegin(), (a).rend() #define fi...
replace
103
104
103
104
0
p02599
C++
Runtime Error
#include <algorithm> #include <cstdio> #include <iostream> #define f first #define s second using namespace std; pair<int, pair<int, int>> q[200001]; int n, m, a[100001], ans[200001]; int st[5 * 100001], used[1000001]; int cmp(pair<int, pair<int, int>> a, pair<int, pair<int, int>> b) { if (a.s.f != b.s.f) retur...
#include <algorithm> #include <cstdio> #include <iostream> #define f first #define s second using namespace std; pair<int, pair<int, int>> q[1000001]; int n, m, a[500001], ans[1000001]; int st[5 * 500001], used[1000001]; int cmp(pair<int, pair<int, int>> a, pair<int, pair<int, int>> b) { if (a.s.f != b.s.f) ret...
replace
8
11
8
11
0
p02599
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <iostream> #include <set> #include <stack> #include <string> #include <unordered_set> #include <vector> using namespace std; struct query { int l; int r; int i; int ans; }; signed main() { int n, t; cin >> n >> t; vector<int> a(n); for (int i = 0; i < n;...
#include <algorithm> #include <cmath> #include <iostream> #include <set> #include <stack> #include <string> #include <unordered_set> #include <vector> using namespace std; struct query { int l; int r; int i; int ans; }; signed main() { int n, t; cin >> n >> t; vector<int> a(n); for (int i = 0; i < n;...
replace
35
37
35
38
TLE
p02599
C++
Runtime Error
#include <algorithm> #include <iostream> #include <unordered_map> #include <vector> using namespace std; int k = 1000; bool cmp(pair<pair<int, int>, int> a, pair<pair<int, int>, int> b) { if (a.first.first / k < b.first.first / k) return true; if (a.first.first / k == b.first.first / k && a.first.second < b....
#include <algorithm> #include <iostream> #include <unordered_map> #include <vector> using namespace std; int k = 1000; bool cmp(pair<pair<int, int>, int> a, pair<pair<int, int>, int> b) { if (a.first.first / k < b.first.first / k) return true; if (a.first.first / k == b.first.first / k && a.first.second < b....
replace
17
20
17
20
0
p02599
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)n; ++i) #define rrep(i, n) for (int i = (int)n - 1; i >= 0; --i) using namespace std; using ll = long long; template <typename T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template <typename T> inline bool...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)n; ++i) #define rrep(i, n) for (int i = (int)n - 1; i >= 0; --i) using namespace std; using ll = long long; template <typename T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template <typename T> inline bool...
replace
46
47
46
47
TLE
p02599
C++
Runtime Error
#include <bits/stdc++.h> // ios::sync_with_stdio(false);cin.tie(0);cout.tie(0); // clock_t start=clock();clock_t // end=clock();cout<<(double)(end-start)/CLOCKS_PER_SEC<<endl; using namespace std; typedef long long ll; typedef unsigned long long ull; typedef unsigned int ui; typedef pair<int, int> pii; typedef pair<pii...
#include <bits/stdc++.h> // ios::sync_with_stdio(false);cin.tie(0);cout.tie(0); // clock_t start=clock();clock_t // end=clock();cout<<(double)(end-start)/CLOCKS_PER_SEC<<endl; using namespace std; typedef long long ll; typedef unsigned long long ull; typedef unsigned int ui; typedef pair<int, int> pii; typedef pair<pii...
replace
168
169
168
169
-11
p02599
C++
Time Limit Exceeded
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tag_and_trait.hpp> #include <ext/pb_ds/tree_policy.hpp> template <class Key> using rb_tree_set = __gnu_pbds::tree<Key, __gnu_pbds::null_type, std::less<Key>, __gnu_pbds::rb_tree_tag, __g...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tag_and_trait.hpp> #include <ext/pb_ds/tree_policy.hpp> template <class Key> using rb_tree_set = __gnu_pbds::tree<Key, __gnu_pbds::null_type, std::less<Key>, __gnu_pbds::rb_tree_tag, __g...
replace
62
63
62
66
TLE
p02599
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #pragma region Macros #define ios \ ios::sync_with_stdio(false); \ cin.tie(nullptr); #define VEC(type, name, size) ...
#include <bits/stdc++.h> using namespace std; #pragma region Macros #define ios \ ios::sync_with_stdio(false); \ cin.tie(nullptr); #define VEC(type, name, size) ...
insert
165
165
165
166
TLE
p02599
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using vi = vector<ll>; using vvi = vector<vi>; using pll = pair<ll, ll>; #define all(a) a.begin(), a.end() #define pb push_back #define mp make_pair template <typename T> using vv = vector<vector<T>>; void solve() { int n...
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using vi = vector<ll>; using vvi = vector<vi>; using pll = pair<ll, ll>; #define all(a) a.begin(), a.end() #define pb push_back #define mp make_pair template <typename T> using vv = vector<vector<T>>; void solve() { int n...
replace
31
32
31
32
0
p02599
C++
Runtime Error
// Author: HarshKumar #include <bits/stdc++.h> using namespace std; #define ll int const ll N = 1e6 + 1; ll root[N], L[16 * N], R[16 * N], sum[16 * N]; ll rt = 1, sz = 1; ll lpos[N]; ll copy(ll v, ll &u) { L[sz] = L[v]; R[sz] = R[v]; sum[sz] = sum[v]; return u = sz++; } void make_root() { copy(root[rt - 1], r...
// Author: HarshKumar #include <bits/stdc++.h> using namespace std; #define ll int const ll N = 15e5 + 1; ll root[N], L[16 * N], R[16 * N], sum[16 * N]; ll rt = 1, sz = 1; ll lpos[N]; ll copy(ll v, ll &u) { L[sz] = L[v]; R[sz] = R[v]; sum[sz] = sum[v]; return u = sz++; } void make_root() { copy(root[rt - 1], ...
replace
4
5
4
5
-11
p02599
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const int N = 200010; template <typename T> void inline read(T &x) { T f = 1; char ch = getchar(); for (; '0' > ch || ch > '9'; ch = getchar()) if (ch == '-') f = -1; for (x = 0; '0' <= ch && ch <= '9'; ch = getchar()) x = x * 10 + ch - '0'; x *= f; ...
#include <bits/stdc++.h> using namespace std; const int N = 500010; template <typename T> void inline read(T &x) { T f = 1; char ch = getchar(); for (; '0' > ch || ch > '9'; ch = getchar()) if (ch == '-') f = -1; for (x = 0; '0' <= ch && ch <= '9'; ch = getchar()) x = x * 10 + ch - '0'; x *= f; ...
replace
2
3
2
3
0
p02599
C++
Time Limit Exceeded
#include <bits/stdc++.h> // #include <ext/pb_ds/assoc_container.hpp> // #include <ext/pb_ds/tree_policy.hpp> using namespace std; // #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3") // #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") // using namespace __gnu_pbds; ...
#include <bits/stdc++.h> // #include <ext/pb_ds/assoc_container.hpp> // #include <ext/pb_ds/tree_policy.hpp> using namespace std; // #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3") // #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") // using namespace __gnu_pbds; ...
delete
24
25
24
24
TLE
p02599
C++
Time Limit Exceeded
// Program to compute sum of ranges for different range // queries #include <bits/stdc++.h> using namespace std; #define ll long long int ll block, n, m; ll a[500001]; struct Query { ll L, R, i; }; Query q[500001]; bool compare(Query x, Query y) { if (x.L / block != y.L / block) return x.L / block < y.L / bloc...
// Program to compute sum of ranges for different range // queries #include <bits/stdc++.h> using namespace std; #define ll int ll block, n, m; ll a[500001]; struct Query { ll L, R, i; }; Query q[500001]; bool compare(Query x, Query y) { if (x.L / block != y.L / block) return x.L / block < y.L / block; retur...
replace
4
5
4
5
TLE
p02599
C++
Runtime Error
/* #region header */ #ifdef LOCAL #include "/Users/takakurashokichi/Desktop/atcoder/cxx-prettyprint-master/prettyprint.hpp" #define debug(x) cout << x << endl #else #define debug(...) 42 #endif #pragma GCC optimize("Ofast") #include <bits/stdc++.h> // types using namespace std; using ll = long long; using ull = unsign...
/* #region header */ #ifdef LOCAL #include "/Users/takakurashokichi/Desktop/atcoder/cxx-prettyprint-master/prettyprint.hpp" #define debug(x) cout << x << endl #else #define debug(...) 42 #endif #pragma GCC optimize("Ofast") #include <bits/stdc++.h> // types using namespace std; using ll = long long; using ull = unsign...
replace
260
261
260
261
0
p02599
C++
Time Limit Exceeded
/* #region header */ #ifdef LOCAL #include "/Users/takakurashokichi/Desktop/atcoder/cxx-prettyprint-master/prettyprint.hpp" #define debug(x) cout << x << endl #else #define debug(...) 42 #endif #pragma GCC optimize("Ofast") #include <bits/stdc++.h> // types using namespace std; using ll = long long; using ull = unsign...
/* #region header */ #ifdef LOCAL #include "/Users/takakurashokichi/Desktop/atcoder/cxx-prettyprint-master/prettyprint.hpp" #define debug(x) cout << x << endl #else #define debug(...) 42 #endif #pragma GCC optimize("Ofast") #include <bits/stdc++.h> // types using namespace std; using ll = long long; using ull = unsign...
insert
273
273
273
274
TLE
p02599
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; namespace fast { const int BSZ = 1 << 15; ////// INPUT char ibuf[BSZ]; int ipos, ilen; char nc() { // next char if (ipos == ilen) { ipos = 0; ilen = fread(ibuf, 1, BSZ, stdin); if (!ilen) return EOF; } return ibuf[ipos++]; } void rs(string &x) { ...
#include <bits/stdc++.h> using namespace std; namespace fast { const int BSZ = 1 << 15; ////// INPUT char ibuf[BSZ]; int ipos, ilen; char nc() { // next char if (ipos == ilen) { ipos = 0; ilen = fread(ibuf, 1, BSZ, stdin); if (!ilen) return EOF; } return ibuf[ipos++]; } void rs(string &x) { ...
replace
81
82
81
82
0
p02599
C++
Runtime Error
// luogu-judger-enable-o2 #pragma GCC optimize(2) #include <bits/stdc++.h> using namespace std; #define rg register typedef long long ll; template <typename T> bool read(T &n) { T ans = 0, flag = 1; char ch; while ((ch = getchar()) < '0' || ch > '9') if (ch == '-') flag = -1; else if (ch == EOF) ...
// luogu-judger-enable-o2 #pragma GCC optimize(2) #include <bits/stdc++.h> using namespace std; #define rg register typedef long long ll; template <typename T> bool read(T &n) { T ans = 0, flag = 1; char ch; while ((ch = getchar()) < '0' || ch > '9') if (ch == '-') flag = -1; else if (ch == EOF) ...
replace
39
42
39
42
0
p02599
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using vi = vector<int>; using vvi = vector<vector<int>>; using vvvi = vector<vector<vector<int>>>; using vl = vector<ll>; using vvl = vector<vector<ll>>; using vvvl = vector<vector<vector<ll>>>; using vs = vector<string>; using...
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using vi = vector<int>; using vvi = vector<vector<int>>; using vvvi = vector<vector<vector<int>>>; using vl = vector<ll>; using vvl = vector<vector<ll>>; using vvvl = vector<vector<vector<ll>>>; using vs = vector<string>; using...
insert
122
122
122
123
TLE
p02599
C++
Time Limit Exceeded
#define _CRT_SECURE_NO_WARNINGS #include <bits/stdc++.h> #define fi first #define se second #define pb push_back #define E "\n" using namespace std; const long long MOD = (long long)1e9 + 7; int n, q, c[500009], l, r, ans[500009], cnt[500009]; pair<pair<int, int>, int> dat[500009]; int seg, cur; bool comp(const pair...
#define _CRT_SECURE_NO_WARNINGS #include <bits/stdc++.h> #define fi first #define se second #define pb push_back #define E "\n" using namespace std; const long long MOD = (long long)1e9 + 7; int n, q, c[500009], l, r, ans[500009], cnt[500009]; pair<pair<int, int>, int> dat[500009]; int seg, cur; bool comp(const pair...
replace
68
69
68
69
TLE
p02599
C++
Runtime Error
#include <algorithm> #include <bits/stdc++.h> #include <cmath> #include <iostream> #include <math.h> #include <queue> #include <set> #include <stack> #include <string> #define mem(x) memset(x, 0, sizeof(x)) #define sca(x) \ if (scanf("%d", &x)) { ...
#include <algorithm> #include <bits/stdc++.h> #include <cmath> #include <iostream> #include <math.h> #include <queue> #include <set> #include <stack> #include <string> #define mem(x) memset(x, 0, sizeof(x)) #define sca(x) \ if (scanf("%d", &x)) { ...
replace
19
20
19
20
-11
p02599
C++
Runtime Error
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; #define ff first #define ss second #define ll int64_t #define ld long double #define nl cout << "\n" #define all(v) v.begin(), v.end() #define mset(a, v) memset((a), ...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; #define ff first #define ss second #define ll int64_t #define ld long double #define nl cout << "\n" #define all(v) v.begin(), v.end() #define mset(a, v) memset((a), ...
replace
125
126
125
126
0
Time elapsed: 28ms
p02599
C++
Time Limit Exceeded
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; #define ff first #define ss second #define ll int64_t #define ld long double #define nl cout << "\n" #define dbg(x) cerr << #x << " = " << x << "\n" #define dbg2(x, y...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; #define ff first #define ss second #define ll int64_t #define ld long double #define nl cout << "\n" #define dbg(x) cerr << #x << " = " << x << "\n" #define dbg2(x, y...
delete
171
172
171
171
TLE
p02599
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define int long long #define pb push_back #define all(a) (a).begin(), (a).end() #define sz(x) (int)x.size() #define F first #define S second #define endl "\n" #define inf (long long)1000000007 #define FOR(i, a, b) for (int i = a; i < b; i++) #define bigint 1e18 mt19937 RNG...
#include <bits/stdc++.h> using namespace std; #define int long long #define pb push_back #define all(a) (a).begin(), (a).end() #define sz(x) (int)x.size() #define F first #define S second #define endl "\n" #define inf (long long)1000000007 #define FOR(i, a, b) for (int i = a; i < b; i++) #define bigint 1e18 mt19937 RNG...
replace
29
30
29
30
TLE
p02599
C++
Time Limit Exceeded
#include <bits/stdc++.h> // #undef DEBUG // Uncomment this line to forcefully disable debug print. #if DEBUG template <typename T> void debug(T value) { std::cerr << value; } template <typename T, typename... Ts> void debug(T value, Ts... args) { std::cerr << value << ", "; debug(args...); } #define dbg(...) ...
#include <bits/stdc++.h> // #undef DEBUG // Uncomment this line to forcefully disable debug print. #if DEBUG template <typename T> void debug(T value) { std::cerr << value; } template <typename T, typename... Ts> void debug(T value, Ts... args) { std::cerr << value << ", "; debug(args...); } #define dbg(...) ...
replace
58
59
58
59
TLE
p02599
C++
Time Limit Exceeded
#include <bits/stdc++.h> // #undef DEBUG // Uncomment this line to forcefully disable debug print. #if DEBUG template <typename T> void debug(T value) { std::cerr << value; } template <typename T, typename... Ts> void debug(T value, Ts... args) { std::cerr << value << ", "; debug(args...); } #define dbg(...) ...
#include <bits/stdc++.h> // #undef DEBUG // Uncomment this line to forcefully disable debug print. #if DEBUG template <typename T> void debug(T value) { std::cerr << value; } template <typename T, typename... Ts> void debug(T value, Ts... args) { std::cerr << value << ", "; debug(args...); } #define dbg(...) ...
replace
105
106
105
108
TLE
p02599
C++
Runtime Error
#include <bits/stdc++.h> #define ll long long int #define ld long double #define pi pair<int, int> #define all(x) x.begin(), x.end() #define allr(x) x.rbegin(), x.rend() #define sz(x) ((int)x.size()) #define ln(x) ((int)x.length()) #define mp make_pair #define pb push_back #define ff first #define ss second #define end...
#include <bits/stdc++.h> #define ll long long int #define ld long double #define pi pair<int, int> #define all(x) x.begin(), x.end() #define allr(x) x.rbegin(), x.rend() #define sz(x) ((int)x.size()) #define ln(x) ((int)x.length()) #define mp make_pair #define pb push_back #define ff first #define ss second #define end...
replace
32
33
32
33
0
p02599
C++
Runtime Error
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std; struct node { int l, r, s, d; } t[500005]; void pushup(int x) { t[x].s = t[x << 1]....
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std; struct node { int l, r, s, d; } t[2000005]; void pushup(int x) { t[x].s = t[x << 1]...
replace
14
15
14
15
0
p02599
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < n; i++) #define ll long long using namespace std; typedef pair<int, int> P; typedef pair<ll, ll> LP; const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1}; const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1}; const int INF = 1000000000; const ll LINF = 100000000000000000...
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < n; i++) #define ll long long using namespace std; typedef pair<int, int> P; typedef pair<ll, ll> LP; const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1}; const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1}; const int INF = 1000000000; const ll LINF = 100000000000000000...
replace
271
272
271
274
TLE
p02599
C++
Runtime Error
#include <bits/stdc++.h> #define rep(a, b, c) for (int a = b; a <= c; a++) #define per(a, b, c) for (int a = b; a >= c; a--) #define ios \ ; \ ios::sync_with_stdio(false); ...
#include <bits/stdc++.h> #define rep(a, b, c) for (int a = b; a <= c; a++) #define per(a, b, c) for (int a = b; a >= c; a--) #define ios \ ; \ ios::sync_with_stdio(false); ...
replace
26
27
26
27
0
p02599
C++
Time Limit Exceeded
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> using namespace std; typedef long long ll; const int N = 5e5 + 4; int n, m; int root[N], sum[N * 100], lc[N * 100], rc[N * 100]; int tim; int nxt[N]; inline int read() { int x = 0, f = 1; char c = getchar(); while (c < '0' || c > '9') {...
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> using namespace std; typedef long long ll; const int N = 5e5 + 4; int n, m; int root[N], sum[N * 100], lc[N * 100], rc[N * 100]; int tim; int nxt[N]; inline int read() { int x = 0, f = 1; char c = getchar(); while (c < '0' || c > '9') {...
replace
56
57
56
57
TLE
p02599
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const int MAX_N = 3e4, MAX_Q = 2e5, MAX_AI = 1e6, OFFSET = 10; int N, Q, BLOCK_SIZE, current_ans, arr[MAX_N + OFFSET], ans[MAX_Q + OFFSET], frec[MAX_AI + OFFSET]; struct Query { int left, right, idx; Query(){}; Query(int left_, int right_, int idx_) : le...
#include <bits/stdc++.h> using namespace std; const int MAX_N = 5e5 + 1, MAX_Q = 5e5 + 1, MAX_AI = 5e5 + 1, OFFSET = 10; int N, Q, BLOCK_SIZE, current_ans, arr[MAX_N + OFFSET], ans[MAX_Q + OFFSET], frec[MAX_AI + OFFSET]; struct Query { int left, right, idx; Query(){}; Query(int left_, int right_, int idx_...
replace
4
5
4
5
0
p02599
C++
Runtime Error
// This problem is the same as DQUERY: https://www.spoj.com/problems/DQUERY/ #include <bits/stdc++.h> using namespace std; typedef unsigned long long ull; typedef long long ll; typedef int Int; typedef pair<Int, Int> pii; typedef pair<Int, double> pid; typedef pair<double, double> pdd; typedef pair<Int, pii> pip; type...
// This problem is the same as DQUERY: https://www.spoj.com/problems/DQUERY/ #include <bits/stdc++.h> using namespace std; typedef unsigned long long ull; typedef long long ll; typedef int Int; typedef pair<Int, Int> pii; typedef pair<Int, double> pid; typedef pair<double, double> pdd; typedef pair<Int, pii> pip; type...
replace
81
83
81
83
-11
p02599
C++
Time Limit Exceeded
#include <bits/stdc++.h> int main() { using namespace std; unsigned long N, Q; cin >> N >> Q; vector<unsigned long> c(N); for (auto &&i : c) { cin >> i; --i; } vector<tuple<unsigned long, unsigned long, unsigned long>> queries(Q); { unsigned long cnt{0}; for (auto &&[i, l, r] : queries)...
#include <bits/stdc++.h> int main() { using namespace std; unsigned long N, Q; cin >> N >> Q; vector<unsigned long> c(N); for (auto &&i : c) { cin >> i; --i; } vector<tuple<unsigned long, unsigned long, unsigned long>> queries(Q); { unsigned long cnt{0}; for (auto &&[i, l, r] : queries)...
replace
20
21
20
21
TLE
p02599
C++
Runtime Error
#include <bits/stdc++.h> #pragma GCC optimize(2) using namespace std; const int N = 6e6 + 10; inline int read() { int x = 0; char c = getchar(); while (c < '0' || c > '9') c = getchar(); while (c >= '0' && c <= '9') x = (x << 3) + (x << 1) + (c ^ 48), c = getchar(); return x; } void write(int x) { i...
#include <bits/stdc++.h> #pragma GCC optimize(2) using namespace std; const int N = 3e7 + 10; inline int read() { int x = 0; char c = getchar(); while (c < '0' || c > '9') c = getchar(); while (c >= '0' && c <= '9') x = (x << 3) + (x << 1) + (c ^ 48), c = getchar(); return x; } void write(int x) { i...
replace
3
4
3
4
-11
p02599
C++
Runtime Error
#include <algorithm> #include <iostream> #include <numeric> #include <string> #include <tuple> #include <utility> #include <vector> #define REP(i, a, b) for (int i = int(a); i < int(b); i++) using namespace std; using ll = long long int; using P = pair<ll, ll>; // clang-format off #ifdef _DEBUG_ #define dump(...) do{...
#include <algorithm> #include <iostream> #include <numeric> #include <string> #include <tuple> #include <utility> #include <vector> #define REP(i, a, b) for (int i = int(a); i < int(b); i++) using namespace std; using ll = long long int; using P = pair<ll, ll>; // clang-format off #ifdef _DEBUG_ #define dump(...) do{...
replace
88
89
88
89
0
p02599
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define LL long long #define sc(a) scanf("%d", &a) #define sc2(a, b) scanf("%d%d", &a, &b) #define sc3(a, b, c) scanf("%d%d%d", &a, &b, &c) #define scl(a) scanf("%lld", &a) #define scl2(a, b) scanf("%lld%lld", &a, &b) #define ss(a) scanf("%s", a) #define mem(a, b) memset(a,...
#include <bits/stdc++.h> using namespace std; #define LL long long #define sc(a) scanf("%d", &a) #define sc2(a, b) scanf("%d%d", &a, &b) #define sc3(a, b, c) scanf("%d%d%d", &a, &b, &c) #define scl(a) scanf("%lld", &a) #define scl2(a, b) scanf("%lld%lld", &a, &b) #define ss(a) scanf("%s", a) #define mem(a, b) memset(a,...
replace
14
16
14
16
0
sh: 1: pause: not found
p02599
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define REP(i, n) for (int i = 1; i <= n; i++) #define mod 1000000007 #define pb push_back #define ff first #define ss second #define ii pair<int, int> #define vi vector<int> #define vii vector<ii> #define lli long long int #define INF 1000000000 #define endl '\n' #define BLOCK 555 const double...
#include <bits/stdc++.h> #define REP(i, n) for (int i = 1; i <= n; i++) #define mod 1000000007 #define pb push_back #define ff first #define ss second #define ii pair<int, int> #define vi vector<int> #define vii vector<ii> #define lli long long int #define INF 1000000000 #define endl '\n' #define BLOCK 710 const double...
replace
12
13
12
13
TLE
p02599
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int blk; struct node { int left, right; int index; }; static bool compare(node &p1, node &p2) { if (p1.left / blk == p2.left / blk) return p1.right < p2.right; return p1.left < p2.left; } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.t...
#include <bits/stdc++.h> using namespace std; int blk; struct node { int left, right; int index; }; static bool compare(node &p1, node &p2) { if (p1.left / blk == p2.left / blk) return p1.right < p2.right; return p1.left < p2.left; } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.t...
replace
32
33
32
33
TLE
p02599
C++
Time Limit Exceeded
#include <algorithm> #include <bitset> #include <cmath> #include <complex> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <sstream> #include <stack> #include <string.h> #include <string> #include <sys/time.h> #include...
#include <algorithm> #include <bitset> #include <cmath> #include <complex> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <sstream> #include <stack> #include <string.h> #include <string> #include <sys/time.h> #include...
replace
67
69
67
68
TLE
p02599
C++
Runtime Error
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <map> using namespace std; const int MAXN = 5e5 + 5; const int M = MAXN * 20; int n, q, tot; int a[MAXN]; int T[MAXN * 4], lson[M], rson[M], c[M]; int build(int l, int r) { int root = tot++; c[root] = 0; if (l != r) { int ...
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <map> using namespace std; const int MAXN = 5e5 + 5; const int M = MAXN * 100; int n, q, tot; int a[MAXN]; int T[MAXN * 4], lson[M], rson[M], c[M]; int build(int l, int r) { int root = tot++; c[root] = 0; if (l != r) { int...
replace
7
8
7
8
-11
p02599
C++
Runtime Error
#include <bits/stdc++.h> #include <map> using std::map; const int MAXN = 40000, MAXLGN = 16; int N, Q; map<int, int> pos; int tree[MAXN]; int cant; struct node { int val, L, R, size; } buff[2 * MAXN * MAXLGN]; int build(int lo, int hi) { if (lo > hi) return 0; int idx = ++cant; int mid = (lo + hi) / 2...
#include <bits/stdc++.h> #include <map> using std::map; const int MAXN = 500005, MAXLGN = 20; int N, Q; map<int, int> pos; int tree[MAXN]; int cant; struct node { int val, L, R, size; } buff[2 * MAXN * MAXLGN]; int build(int lo, int hi) { if (lo > hi) return 0; int idx = ++cant; int mid = (lo + hi) / ...
replace
5
6
5
6
0
p02599
C++
Runtime Error
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> using namespace std; const int N = 50010; int n, m, B, re, col[N], cnt[N], ans[N]; void add(int x) { re += !(cnt[x]++); } void del(int x) { re -= !(--cnt[x]); } struct Query { int l, r, id; bool operator<(Query &b) { return l / B == b.l...
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> using namespace std; const int N = 5e5 + 10; int n, m, B, re, col[N], cnt[N], ans[N]; void add(int x) { re += !(cnt[x]++); } void del(int x) { re -= !(--cnt[x]); } struct Query { int l, r, id; bool operator<(Query &b) { return l / B == ...
replace
7
8
7
8
0
p02599
C++
Runtime Error
#include <bits/stdc++.h> #define ll long long using namespace std; const int e = 5e5 + 6; const int e1 = 5e5 + 2; struct kien { ll i, j, id, type; }; kien a[e + e1]; ll n, q; ll Bit[e]; ll res[e1]; bool lf(kien u, kien v) { return (u.j < v.j || (u.j == v.j && u.type < v.type)); } ll bit(ll vitri, ll val) { f...
#include <bits/stdc++.h> #define ll long long using namespace std; const int e = 5e5 + 6; const int e1 = 5e5 + 2; struct kien { ll i, j, id, type; }; kien a[e + e1]; ll n, q; ll Bit[e]; ll res[e1]; bool lf(kien u, kien v) { return (u.j < v.j || (u.j == v.j && u.type < v.type)); } void bit(ll vitri, ll val) { ...
replace
20
21
20
21
0
p02599
C++
Runtime Error
// main.cpp // ABC174F2 #include <algorithm> #include <iostream> #include <map> #include <tuple> #include <vector> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; using P = pair<int, int>; // Binary Indexed Tree (Fenwick Tree) // 使い方 : BIT<int>bit // BIT...
// main.cpp // ABC174F2 #include <algorithm> #include <iostream> #include <map> #include <tuple> #include <vector> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; using P = pair<int, int>; // Binary Indexed Tree (Fenwick Tree) // 使い方 : BIT<int>bit // BIT...
replace
70
71
70
71
-6
terminate called after throwing an instance of 'std::out_of_range' what(): vector::_M_range_check: __n (which is 4) >= this->size() (which is 4)
p02599
C++
Runtime Error
#include <algorithm> #include <cstdio> #include <iostream> #define f first #define s second using namespace std; pair<int, pair<int, int>> q[200001]; int n, m, a[100001], ans[200001]; int st[5 * 100001], used[1000001]; int cmp(pair<int, pair<int, int>> a, pair<int, pair<int, int>> b) { if (a.s.f != b.s.f) retur...
#include <algorithm> #include <cstdio> #include <iostream> #define f first #define s second using namespace std; pair<int, pair<int, int>> q[500001]; int n, m, a[500001], ans[500001]; int st[25 * 100001], used[5000001]; int cmp(pair<int, pair<int, int>> a, pair<int, pair<int, int>> b) { if (a.s.f != b.s.f) retu...
replace
8
11
8
11
0
p02599
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define REP(i, a, n) for (int i = (a); i < (int)(n); i++) #define rep(i, n) REP(i, 0, n) #define FOR(it, c) \ for (__typeof((c).begin()) it = (c).begin(); it != (c).end(); ++it) #define ALLOF(c) (c).begin(), (c)....
#include <bits/stdc++.h> using namespace std; #define REP(i, a, n) for (int i = (a); i < (int)(n); i++) #define rep(i, n) REP(i, 0, n) #define FOR(it, c) \ for (__typeof((c).begin()) it = (c).begin(); it != (c).end(); ++it) #define ALLOF(c) (c).begin(), (c)....
insert
72
72
72
73
TLE
p02599
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using ll = long long; int block_size; struct Query { int l, r, idx; bool operator<(Query other) const { return make_pair(l / block_size, r) < make_pair(other.l / block_size, other.r); } }; int main() { ios_base::sync_with_stdio(false); cin.tie(0); ...
#include <bits/stdc++.h> using namespace std; using ll = long long; int block_size; struct Query { int l, r, idx; bool operator<(Query other) const { return make_pair(l / block_size, r) < make_pair(other.l / block_size, other.r); } }; int main() { ios_base::sync_with_stdio(false); cin.tie(0); ...
replace
31
32
31
32
TLE
p02599
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; int read() { char x; while ((x...
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; int read() { char x; while ((x...
replace
44
51
44
51
0
p02599
C++
Time Limit Exceeded
#include <bits/stdc++.h> typedef long long ll; typedef std::pair<ll, ll> P; #define rep(i, n) for (int i = 0; i < int(n); i++) using namespace std; template <class T> inline bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } template <class T> inline bool chmin(T &a, const T &b) ...
#include <bits/stdc++.h> typedef long long ll; typedef std::pair<ll, ll> P; #define rep(i, n) for (int i = 0; i < int(n); i++) using namespace std; template <class T> inline bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } template <class T> inline bool chmin(T &a, const T &b) ...
replace
52
53
52
53
TLE
p02599
C++
Runtime Error
// Author: Vinay Khilwani // Language: C++ // @vok8: Codeforces, AtCoder, LeetCode, HackerEarth, TopCoder, Google, FB, // CSES, Spoj, GitHub // @vok_8: CodeChef, GFG // @vok8_khilwani: HackerRank // Never Stop Trying. // Trying to be Better than Myself. // while(true) // { // if(AC) // { // break; //...
// Author: Vinay Khilwani // Language: C++ // @vok8: Codeforces, AtCoder, LeetCode, HackerEarth, TopCoder, Google, FB, // CSES, Spoj, GitHub // @vok_8: CodeChef, GFG // @vok8_khilwani: HackerRank // Never Stop Trying. // Trying to be Better than Myself. // while(true) // { // if(AC) // { // break; //...
replace
159
160
159
160
-11
p02599
C++
Runtime Error
#include <algorithm> #include <cstring> #include <iostream> #include <string> #include <unordered_map> #include <vector> using namespace std; const int N = 200003; struct query { int l, r, id; query() {} query(int ll, int rr, int d) { l = ll, r = rr, id = d; } bool operator<(const query &x) { return r < x.r; ...
#include <algorithm> #include <cstring> #include <iostream> #include <string> #include <unordered_map> #include <vector> using namespace std; const int N = 500003; struct query { int l, r, id; query() {} query(int ll, int rr, int d) { l = ll, r = rr, id = d; } bool operator<(const query &x) { return r < x.r; ...
replace
9
10
9
10
0
p02599
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; using vin = vector<int>; using vll = vector<long long>; using vvin = vector<vector<int>>; using vvll = vector<vector<long long>>; using vstr = vector<string>; using vvstr = vector<vector<string>>; using vch = vector<char>; using vvch = vector<vector<ch...
#include <bits/stdc++.h> using namespace std; using ll = long long; using vin = vector<int>; using vll = vector<long long>; using vvin = vector<vector<int>>; using vvll = vector<vector<long long>>; using vstr = vector<string>; using vvstr = vector<vector<string>>; using vch = vector<char>; using vvch = vector<vector<ch...
replace
23
24
23
24
0
p02599
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <cstdint> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #define rep(i, n) for (int(i) = 0; (i) < (n); (i)++) #define FOR(i, m, n) for (int(i)...
#include <algorithm> #include <cmath> #include <cstdint> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #define rep(i, n) for (int(i) = 0; (i) < (n); (i)++) #define FOR(i, m, n) for (int(i)...
insert
103
103
103
104
TLE
p02599
C++
Runtime Error
/**Which of the favors of your Lord will you deny ?**/ #include <bits/stdc++.h> using namespace std; #define LL long long #define PII pair<int, int> #define PLL pair<LL, LL> #define MP make_pair #define F first #define S second #define INF INT_MAX #define ALL(x) (x).begin(), (x).end() #define DBG(x) cerr << __LINE...
/**Which of the favors of your Lord will you deny ?**/ #include <bits/stdc++.h> using namespace std; #define LL long long #define PII pair<int, int> #define PLL pair<LL, LL> #define MP make_pair #define F first #define S second #define INF INT_MAX #define ALL(x) (x).begin(), (x).end() #define DBG(x) cerr << __LINE...
replace
42
44
42
44
0