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
p02599
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; struct point { int left, right, block, id; }; bool cmp(const point &lhs, const point &rhs) { if (lhs.block < rhs.block) return true; else if (lhs.block > rhs.block) return false; else return lhs.right < rhs.right; } int main() { int n, q; scanf("...
#include <bits/stdc++.h> using namespace std; struct point { int left, right, block, id; }; bool cmp(const point &lhs, const point &rhs) { if (lhs.block < rhs.block) return true; else if (lhs.block > rhs.block) return false; else return lhs.right < rhs.right; } int main() { int n, q; scanf("...
replace
25
26
25
26
TLE
p02599
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define reps(i, s, n) for (int i = s; i < n; i++) #define rep(i, n) reps(i, 0, n) #define Rreps(i, n, e) for (int i = n - 1; i >= e; --i) #define Rrep(i, n) Rreps(i, n, 0) #define ALL(a) a.begin(), a.end() #define fi first #define se second typedef long long ll; typedef vec...
#include <bits/stdc++.h> using namespace std; #define reps(i, s, n) for (int i = s; i < n; i++) #define rep(i, n) reps(i, 0, n) #define Rreps(i, n, e) for (int i = n - 1; i >= e; --i) #define Rrep(i, n) Rreps(i, n, 0) #define ALL(a) a.begin(), a.end() #define fi first #define se second typedef long long ll; typedef vec...
replace
45
46
45
49
0
p02599
C++
Time Limit Exceeded
#include <algorithm> #include <array> #include <bitset> #include <cmath> #include <complex> #include <cstdio> #include <deque> #include <fstream> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #define RE...
#include <algorithm> #include <array> #include <bitset> #include <cmath> #include <complex> #include <cstdio> #include <deque> #include <fstream> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #define RE...
replace
76
77
76
77
TLE
p02599
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int A[500000], K[500001], k = 1, CL = 0, CR = -1, n, B; void add(int I) { K[A[I]]++; if (K[A[I]] == 1) { k++; } } void Remove(int I) { K[A[I]]--; if (K[A[I]] == 0) { k--; } } int query(int L, int R) { while (CL < L) { Remove(CL); CL++; }...
#include <bits/stdc++.h> #pragma GCC optimize("Ofast") using namespace std; int A[500000], K[500001], k = 1, CL = 0, CR = -1, n, B; void add(int I) { K[A[I]]++; if (K[A[I]] == 1) { k++; } } void Remove(int I) { K[A[I]]--; if (K[A[I]] == 0) { k--; } } int query(int L, int R) { while (CL < L) {...
insert
1
1
1
2
TLE
p02599
C++
Runtime Error
// #define _GLIBCXX_DEBUG #define _USE_MATH_DEFINES #include <bits/stdc++.h> using namespace std; using ll = long long; using pii = pair<int, int>; using vi = vector<int>; using vvi = vector<vi>; using vl = vector<ll>; using vvl = vector<vl>; using vb = vector<bool>; using vvb = vector<vb>; #define rep0(TMS) for (int C...
// #define _GLIBCXX_DEBUG #define _USE_MATH_DEFINES #include <bits/stdc++.h> using namespace std; using ll = long long; using pii = pair<int, int>; using vi = vector<int>; using vvi = vector<vi>; using vl = vector<ll>; using vvl = vector<vl>; using vb = vector<bool>; using vvb = vector<vb>; #define rep0(TMS) for (int C...
replace
216
217
216
217
0
p02599
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; template <typename T> class FenwickTree { private: int n, mx; vector<T> bit; public: FenwickTree(int sz) : n(sz + 1), mx(1), bit(n, 0) { while (mx * 2 <= n) mx *= 2; } FenwickTree(const vector<T> &v) : n((int)v.size() + 1), mx(1), bit(n, 0) { for (...
#include <bits/stdc++.h> using namespace std; template <typename T> class FenwickTree { private: int n, mx; vector<T> bit; public: FenwickTree(int sz) : n(sz + 1), mx(1), bit(n, 0) { while (mx * 2 <= n) mx *= 2; } FenwickTree(const vector<T> &v) : n((int)v.size() + 1), mx(1), bit(n, 0) { for (...
replace
78
79
78
79
0
p02599
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; const ll MOD = 1000000007; const ld PI = acos(-1); const ld EPS = 0.0000000001; const ll LINF = 1LL << 60; const int INF = 1LL << 17; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define repd(i, n) for (ll i = n - 1; 0 <= ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; const ll MOD = 1000000007; const ld PI = acos(-1); const ld EPS = 0.0000000001; const ll LINF = 1LL << 60; const int INF = 1LL << 17; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define repd(i, n) for (ll i = n - 1; 0 <= ...
replace
54
55
54
55
0
p02599
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const int N = 30010; const int S = 200010; int arr[N]; int L[S]; int R[S]; int seg[4 * N]; int ans[S]; vector<pair<pair<int, int>, int>> Q; map<int, int> lst; bool cmp(pair<pair<int, int>, int> A, pair<pair<int, int>, int> B) { if (A.first.second == B.first.second) re...
#include <bits/stdc++.h> using namespace std; const int N = 5e5 + 2; const int S = 5e5 + 2; int arr[N]; int L[S]; int R[S]; int seg[4 * N]; int ans[S]; vector<pair<pair<int, int>, int>> Q; map<int, int> lst; bool cmp(pair<pair<int, int>, int> A, pair<pair<int, int>, int> B) { if (A.first.second == B.first.second) ...
replace
2
4
2
4
0
p02599
C++
Runtime Error
#include <bits/stdc++.h> #include <stdio.h> using namespace std; int val; bool comp(vector<int> &v1, vector<int> &v2) { int l1 = v1[0] / val; int l2 = v2[0] / val; if (l1 != l2) return (l1 < l2); return v1[1] < v2[1]; } int arr[300001]; int main() { int n, q; scanf("%d", &n); scanf("%d", &q); for ...
#include <bits/stdc++.h> #include <stdio.h> using namespace std; int val; bool comp(vector<int> &v1, vector<int> &v2) { int l1 = v1[0] / val; int l2 = v2[0] / val; if (l1 != l2) return (l1 < l2); return v1[1] < v2[1]; } int arr[500001]; int main() { int n, q; scanf("%d", &n); scanf("%d", &q); for ...
replace
13
14
13
14
0
p02599
C++
Runtime Error
#include <bits/stdc++.h> #define mp make_pair #define eb emplace_back #define ff first #define ss second using namespace std; typedef long long ll; typedef unsigned long long ull; const int MAXN = 100; // #define int long long const int INF = 1e9; int f[MAXN], last[MAXN]; void add(int i, int x) { for (; i < MAX...
#include <bits/stdc++.h> #define mp make_pair #define eb emplace_back #define ff first #define ss second using namespace std; typedef long long ll; typedef unsigned long long ull; const int MAXN = 5e5 + 5; // #define int long long const int INF = 1e9; int f[MAXN], last[MAXN]; void add(int i, int x) { for (; i <...
replace
12
13
12
13
0
p02599
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long tint; #define forsn(i, s, n) for (int i = s; i < int(n); i++) #define forn(i, n) forsn(i, 0, n) #define all(v) v.begin(), v.end() #define rall(v) v.rbegin(), v.rend() #define NACHO \ ios...
#include <bits/stdc++.h> using namespace std; typedef long long tint; #define forsn(i, s, n) for (int i = s; i < int(n); i++) #define forn(i, n) forsn(i, 0, n) #define all(v) v.begin(), v.end() #define rall(v) v.rbegin(), v.rend() #define NACHO \ ios...
replace
18
19
18
19
0
p02599
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 5e5 + 5; int n, m; struct Tree { int ls, rs; ll val; // 左右儿子的编号, 和维护的一个值. } tre[maxn * 20]; int idx = 0, root[maxn]; int build(int l, int r) { int nod = ++idx; tre[nod].val = 0; if (l == r) return nod; int mid = (l + r)...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 5e5 + 5; int n, m; struct Tree { int ls, rs; ll val; // 左右儿子的编号, 和维护的一个值. } tre[maxn * 100]; int idx = 0, root[maxn]; int build(int l, int r) { int nod = ++idx; tre[nod].val = 0; if (l == r) return nod; int mid = (l + r...
replace
8
9
8
9
-11
p02599
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef int ll; #define N 200000 #define mod1 1000000007 #define mod2 1000000009 #define mod3 998244353 #define endl '\n' #define IO \ ios_base::sync_with_stdio(false); ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define N 500000 #define mod1 1000000007 #define mod2 1000000009 #define mod3 998244353 #define endl '\n' #define IO \ ios_base::sync_with_stdio(false); ...
replace
2
4
2
4
0
p02599
C++
Runtime Error
#include <bits/stdc++.h> #define FASTIO using namespace std; using ll = long long; using Vi = vector<int>; using Vl = vector<ll>; using Pii = pair<int, int>; using Pll = pair<ll, ll>; constexpr int I_INF = numeric_limits<int>::max(); constexpr ll L_INF = numeric_limits<ll>::max(); class Prints { private: class __P...
#include <bits/stdc++.h> #define FASTIO using namespace std; using ll = long long; using Vi = vector<int>; using Vl = vector<ll>; using Pii = pair<int, int>; using Pll = pair<ll, ll>; constexpr int I_INF = numeric_limits<int>::max(); constexpr ll L_INF = numeric_limits<ll>::max(); class Prints { private: class __P...
replace
103
104
103
104
0
p02599
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const int N = 500000; int pre[N + 5]; template <int M, int SZ> struct Persistable_Segment_Tree { int tot, p, k, L, R; int rt[M + 5], lc[SZ + 5], rc[SZ + 5], cntv[SZ + 5]; void init() { tot = rt[0] = lc[0] = rc[0] = cntv[0] = 0; } int update(int pre, int l, int r,...
#include <bits/stdc++.h> using namespace std; const int N = 500000; int pre[N + 5]; template <int M, int SZ> struct Persistable_Segment_Tree { int tot, p, k, L, R; int rt[M + 5], lc[SZ + 5], rc[SZ + 5], cntv[SZ + 5]; void init() { tot = rt[0] = lc[0] = rc[0] = cntv[0] = 0; } int update(int pre, int l, int r,...
replace
41
42
41
42
-11
p02599
C++
Time Limit Exceeded
#include <algorithm> #include <cassert> #include <climits> #include <cmath> #include <cstring> #include <deque> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <vector> using namespace std; #define ll long long #define MAX 500000 #define MAX1 1148576 #define MAX2 100000 #d...
#include <algorithm> #include <cassert> #include <climits> #include <cmath> #include <cstring> #include <deque> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <vector> using namespace std; #define ll long long #define MAX 500000 #define MAX1 1148576 #define MAX2 100000 #d...
replace
29
30
29
30
TLE
p02599
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; #define REP(i, n) for (int i = 0; i < (int)(n); i++) #define FOR(i, m, n) for (int i = (m); i < (int)(n); i++) template <typename T> struct fenwick_tree { int n; vector<T> d; fenwick_tree(int n = 0) : n(n), d(n + 1) {} void add(int i, T x) ...
#include <bits/stdc++.h> using namespace std; using ll = long long; #define REP(i, n) for (int i = 0; i < (int)(n); i++) #define FOR(i, m, n) for (int i = (m); i < (int)(n); i++) template <typename T> struct fenwick_tree { int n; vector<T> d; fenwick_tree(int n = 0) : n(n), d(n + 1) {} void add(int i, T x) ...
replace
34
35
34
35
0
p02599
C++
Time Limit Exceeded
#pragma GCC optimize("O3") #include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include <prettyprint.hpp> #define debug(...) cerr << "[" << #__VA_ARGS__ << "]: ", d_err(__VA_ARGS__); #else #define debug(...) 83; #endif void d_err() { cerr << endl; } template <typename H, typename... T> void d_err(H h, T......
#pragma GCC optimize("O3") #include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include <prettyprint.hpp> #define debug(...) cerr << "[" << #__VA_ARGS__ << "]: ", d_err(__VA_ARGS__); #else #define debug(...) 83; #endif void d_err() { cerr << endl; } template <typename H, typename... T> void d_err(H h, T......
replace
120
121
120
121
TLE
p02599
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const int maxn = 3 * (int)1e4 + 100; int n, a[maxn], b[maxn], t[maxn * 40], lt[maxn * 40], rt[maxn * 40], tVal[maxn * 40], tot; int lst[maxn]; // 记录离散化后数组的上次出现位置 int q; void init() { tot = 0; memset(lst, -1, sizeof(lst)); } int build(int l, int r) { int node = ...
#include <bits/stdc++.h> using namespace std; const int maxn = 5 * (int)1e5 + 100; int n, a[maxn], b[maxn], t[maxn * 70], lt[maxn * 70], rt[maxn * 70], tVal[maxn * 70], tot; int lst[maxn]; // 记录离散化后数组的上次出现位置 int q; void init() { tot = 0; memset(lst, -1, sizeof(lst)); } int build(int l, int r) { int node = ...
replace
4
7
4
7
0
p02599
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; const int BLOCK = 707; int c[500005], ans[500005], res, cnt[500005]; struct dat { int l, r, id; bool operator<(const dat &T) const { if (l / BLOCK != T.l / BLOCK) return l / BLOCK < T.l / BLOCK; return r / BLOCK < T.r / BLOCK; } } a[500005]; void r...
#include <bits/stdc++.h> using namespace std; const int BLOCK = 707; int c[500005], ans[500005], res, cnt[500005]; struct dat { int l, r, id; bool operator<(const dat &T) const { if (l / BLOCK != T.l / BLOCK) return l / BLOCK < T.l / BLOCK; return r < T.r; } } a[500005]; void remove(int id) { ...
replace
14
15
14
15
TLE
p02599
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; template <typename T> class BIT { vector<T> tree_; public: BIT(int n) : tree_(n, 0) {} void Add(int i, T x) { for (i++; i <= tree_.size(); i += i & -i) { tree_[i - 1] += x; } } T Sum(int s) { T ans = 0; for (s++; s > 0; s -= s & -s) { ...
#include <bits/stdc++.h> using namespace std; template <typename T> class BIT { vector<T> tree_; public: BIT(int n) : tree_(n, 0) {} void Add(int i, T x) { for (i++; i <= tree_.size(); i += i & -i) { tree_[i - 1] += x; } } T Sum(int s) { T ans = 0; for (s++; s > 0; s -= s & -s) { ...
replace
37
38
37
38
0
p02599
C++
Time Limit Exceeded
#include <algorithm> #include <bitset> #include <cassert> #include <ciso646> #include <cmath> #include <complex> #include <cstdio> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <stack> #include <string> #include <tuple> #include <u...
#include <algorithm> #include <bitset> #include <cassert> #include <ciso646> #include <cmath> #include <complex> #include <cstdio> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <stack> #include <string> #include <tuple> #include <u...
replace
100
110
100
102
TLE
p02599
C++
Time Limit Exceeded
// Author : Prakhar Asaiya #include <bits/stdc++.h> using namespace std; #define REP(i, a, b) for (int i = a; i < b; ++i) #define REPN(i, a, b) for (int i = a; i <= b; ++i) #define REPV(i, a, b) for (int i = a; i >= b; --i) #define db1(x) cout << #x << "=" << x << '\n' #define db2(x, y) cout << #x << "=" << x << "," <<...
// Author : Prakhar Asaiya #include <bits/stdc++.h> using namespace std; #define REP(i, a, b) for (int i = a; i < b; ++i) #define REPN(i, a, b) for (int i = a; i <= b; ++i) #define REPV(i, a, b) for (int i = a; i >= b; --i) #define db1(x) cout << #x << "=" << x << '\n' #define db2(x, y) cout << #x << "=" << x << "," <<...
replace
20
21
20
21
TLE
p02599
C++
Runtime Error
// C++ code to find number of distinct numbers // in a subarray #include <bits/stdc++.h> using namespace std; const int MAX = 100001; // structure to store queries struct Query { int l, r, idx; }; // cmp function to sort queries according to r bool cmp(Query x, Query y) { return x.r < y.r; } // updating the bit a...
// C++ code to find number of distinct numbers // in a subarray #include <bits/stdc++.h> using namespace std; const int MAX = 500005; // structure to store queries struct Query { int l, r, idx; }; // cmp function to sort queries according to r bool cmp(Query x, Query y) { return x.r < y.r; } // updating the bit a...
replace
5
6
5
6
0
p02599
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define pf printf #define PF(a) printf("%d\n", (a)) #define PF2(a, b) printf("%d %d\n", (a), (b)) #define PF3(a, b, c) printf("%d %d %d\n", (a), (b), (c)) #define PFL(a) printf("%lld\n", (a)) #define PFL2(a, b) printf("%lld %lld\n", (a), (b)) #define PFL3(a, b, c) printf(...
#include <bits/stdc++.h> using namespace std; #define pf printf #define PF(a) printf("%d\n", (a)) #define PF2(a, b) printf("%d %d\n", (a), (b)) #define PF3(a, b, c) printf("%d %d %d\n", (a), (b), (c)) #define PFL(a) printf("%lld\n", (a)) #define PFL2(a, b) printf("%lld %lld\n", (a), (b)) #define PFL3(a, b, c) printf(...
replace
103
104
103
104
-11
p02599
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; // conversion //------------------------------------------ inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v; } template <class T> inline string toString(T x) { ostringstream sout; sout << x; return sout.str(); } // math //--------...
#include <bits/stdc++.h> using namespace std; // conversion //------------------------------------------ inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v; } template <class T> inline string toString(T x) { ostringstream sout; sout << x; return sout.str(); } // math //--------...
insert
299
299
299
300
TLE
p02599
C++
Runtime Error
#include <bits/stdc++.h> #define IOS ios::sync_with_stdio(false), cin.tie(0) #define ll long long #define prl pair<ll, ll> #define pri pair<int, int> #define rep(i, a, b) for (int i = (a); i < (b); i++) #define per(i, a, b) for (int i = (a); i >= (b); i--) #define sz(x) ((int)(x).size()) #define fi first #define se sec...
#include <bits/stdc++.h> #define IOS ios::sync_with_stdio(false), cin.tie(0) #define ll long long #define prl pair<ll, ll> #define pri pair<int, int> #define rep(i, a, b) for (int i = (a); i < (b); i++) #define per(i, a, b) for (int i = (a); i >= (b); i--) #define sz(x) ((int)(x).size()) #define fi first #define se sec...
replace
11
12
11
12
0
p02599
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define INF 0x3f3f3f3f #define rep(i, a, n) for (int i = (a); i < (n); i++) #define per(i, a, n) for (int i = (a); i > (n); i--) typedef long long ll; const int maxn = 5e5 + 5; const int mod = 1e9 + 7; using namespace std; int block, curl, curr, res; struct qry { int id, l, r; } q[maxn]; int...
#include <bits/stdc++.h> #define INF 0x3f3f3f3f #define rep(i, a, n) for (int i = (a); i < (n); i++) #define per(i, a, n) for (int i = (a); i > (n); i--) typedef long long ll; const int maxn = 5e5 + 5; const int mod = 1e9 + 7; using namespace std; int block, curl, curr, res; struct qry { int id, l, r; } q[maxn]; int...
replace
13
16
13
14
TLE
p02599
C++
Runtime Error
#include <bits/stdc++.h> #define ll long long #define all(v) v.begin(), v.end() #define PB push_back #define PI 3.1415926535897932384626433832795 #define what(x) cout << #x << " is " << x << endl; using namespace std; template <typename A, typename B> string to_string(pair<A, B> p); template <typename A, typename B, ...
#include <bits/stdc++.h> #define ll long long #define all(v) v.begin(), v.end() #define PB push_back #define PI 3.1415926535897932384626433832795 #define what(x) cout << #x << " is " << x << endl; using namespace std; template <typename A, typename B> string to_string(pair<A, B> p); template <typename A, typename B, ...
replace
97
98
97
98
0
p02599
C++
Time Limit Exceeded
#pragma GCC target("avx") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> #ifndef M_PI #define M_PI 3.14159265358979 #endif #define deg_to_rad(deg) (((deg) / 360) * 2 * M_PI) #define rad_to_deg(rad) (((rad) / 2 / M_PI) * 360) using namespace std; typedef long long ll; typedef...
#pragma GCC target("avx") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> #ifndef M_PI #define M_PI 3.14159265358979 #endif #define deg_to_rad(deg) (((deg) / 360) * 2 * M_PI) #define rad_to_deg(rad) (((rad) / 2 / M_PI) * 360) using namespace std; typedef long long ll; typedef...
replace
72
74
72
74
TLE
p02599
C++
Runtime Error
#include <bits/stdc++.h> #define Fast \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define Freed freopen("0in.txt", "r",...
#include <bits/stdc++.h> #define Fast \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define Freed freopen("0in.txt", "r",...
replace
11
12
11
12
0
p02599
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; // typedef __int128 lll; #define print(i) cout << "debug: " << i << endl #define close() ios::sync_with_stdio(0), cin.tie(0), cout.tie(0) #define mem(a, b) memset(a, b, sizeof(a)) const ll mod = 1e9 + 7; const int maxn = 5e5 + 10; const int inf = 0x3f3...
#include <bits/stdc++.h> using namespace std; typedef long long ll; // typedef __int128 lll; #define print(i) cout << "debug: " << i << endl #define close() ios::sync_with_stdio(0), cin.tie(0), cout.tie(0) #define mem(a, b) memset(a, b, sizeof(a)) const ll mod = 1e9 + 7; const int maxn = 5e5 + 10; const int inf = 0x3f3...
replace
53
54
53
54
-11
p02599
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const int maxn = 5e5 + 5; int n, m; struct Tree { int ls, rs, val; } tre[maxn * 40]; int idx = 0, root[maxn]; int build(int l, int r) { int nod = ++idx; tre[nod].val = 0; if (l == r) return nod; int mid = (l + r) >> 1; tre[nod].ls = build(l, mid); tre[nod]...
#include <bits/stdc++.h> using namespace std; const int maxn = 5e5 + 5; int n, m; struct Tree { int ls, rs, val; } tre[maxn * 50]; int idx = 0, root[maxn]; int build(int l, int r) { int nod = ++idx; tre[nod].val = 0; if (l == r) return nod; int mid = (l + r) >> 1; tre[nod].ls = build(l, mid); tre[nod]...
replace
6
7
6
7
-11
p02599
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; // int/long: -2,147,483,648 - 2,147,483,647 (-2^31 <= int < 2^31) // long/long long: -9,223,372,036,854,775,808 - 9,223,372,036,854,775,807 // (-2^63 <= long < 2^63) #define INF (1 << 30) // 1,073,741,824 //= 536,870,912 *2 #define MOD 1000000007 ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; // int/long: -2,147,483,648 - 2,147,483,647 (-2^31 <= int < 2^31) // long/long long: -9,223,372,036,854,775,808 - 9,223,372,036,854,775,807 // (-2^63 <= long < 2^63) #define INF (1 << 30) // 1,073,741,824 //= 536,870,912 *2 #define MOD 1000000007 ...
replace
66
67
66
67
0
p02599
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; constexpr int MAX_N = 502020; constexpr int MAX_ROOT = 20000000; // https://github.com/anh1l1ator/Spoj/blob/master/Desktop/Codes/DQUERY_Online.cpp struct Node { int cnt, L, R; Node() { cnt = 0; L = R = -1; } Node(int x, int y, int z) { L = x, R = y, cnt = ...
#include <bits/stdc++.h> using namespace std; constexpr int MAX_N = 502020; constexpr int MAX_ROOT = 23000000; // https://github.com/anh1l1ator/Spoj/blob/master/Desktop/Codes/DQUERY_Online.cpp struct Node { int cnt, L, R; Node() { cnt = 0; L = R = -1; } Node(int x, int y, int z) { L = x, R = y, cnt = ...
replace
4
5
4
5
-11
p02599
C++
Time Limit Exceeded
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define FIO \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); ...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define FIO \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); ...
replace
130
131
130
131
TLE
p02599
C++
Runtime Error
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <ctime> #include <iomanip> #include <iostream> #include <queue> #include <stack> using namespace std; const int maxn = 30005; const int maxq = 200005; const int maxm = 1000005; int n, sqr, Q; int a[maxn]; struct query { int l, r, lb, ...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <ctime> #include <iomanip> #include <iostream> #include <queue> #include <stack> using namespace std; const int maxn = 500005; const int maxq = 500005; const int maxm = 500005; int n, sqr, Q; int a[maxn]; struct query { int l, r, lb, ...
replace
10
13
10
13
0
p02599
C++
Runtime Error
/* /----- | / | | | / | | | /------ /---/ //// /---/ /--| /---/ \ / /---/ |----| |---- |---- | | | / / / / ...
/* /----- | / | | | / | | | /------ /---/ //// /---/ /--| /---/ \ / /---/ |----| |---- |---- | | | / / / / ...
replace
112
113
112
113
0
p02599
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; template <typename T> struct BinaryIndexedTree { vector<T> data; BinaryIndexedTree(int sz) { data.assign(++sz, 0); } T sum(int k) { T ret = 0; for (++k; k > 0; k -= k & -k) ret += data[k]; return (ret); } void add(int k,...
#include <bits/stdc++.h> using namespace std; using ll = long long; template <typename T> struct BinaryIndexedTree { vector<T> data; BinaryIndexedTree(int sz) { data.assign(++sz, 0); } T sum(int k) { T ret = 0; for (++k; k > 0; k -= k & -k) ret += data[k]; return (ret); } void add(int k,...
replace
44
45
44
45
0
p02599
C++
Runtime Error
/* ID: alec3 LANG: C++14 PROG: concom */ #include <bits/stdc++.h> #define check(x) cout << (#x) << ": " << x << " "; #define io \ ios_base::sync_with_stdio(0); \ cin.tie(0); ...
/* ID: alec3 LANG: C++14 PROG: concom */ #include <bits/stdc++.h> #define check(x) cout << (#x) << ": " << x << " "; #define io \ ios_base::sync_with_stdio(0); \ cin.tie(0); ...
replace
59
60
59
60
0
p02599
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; struct _IO { _IO() { ios::sync_with_stdio(0); cin.tie(0); } } _io; typedef long long ll; typedef long double db; const int N = 3e5 + 5, M = 1e9 + 7; typedef pair<int, int> pii; #define fi first #define se second int bit[N]; void add(int p, int v) { for (; p ...
#include <bits/stdc++.h> using namespace std; struct _IO { _IO() { ios::sync_with_stdio(0); cin.tie(0); } } _io; typedef long long ll; typedef long double db; const int N = 5e5 + 5, M = 1e9 + 7; typedef pair<int, int> pii; #define fi first #define se second int bit[N]; void add(int p, int v) { for (; p ...
replace
10
11
10
11
0
p02599
C++
Runtime Error
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <map> using namespace std; const int MAXN = 3e4 + 5; const int M = MAXN * 100; int n, q, tot; int a[MAXN]; int T[MAXN], lson[M], rson[M], c[M]; int build(int l, int r) { int root = tot++; c[root] = 0; if (l != r) { int mid...
#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], lson[M], rson[M], c[M]; int build(int l, int r) { int root = tot++; c[root] = 0; if (l != r) { int mid...
replace
6
7
6
7
0
p02599
C++
Time Limit Exceeded
#include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <complex> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <stack> #include <stdio.h> #include <string> #include <time.h> #include ...
#include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <complex> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <stack> #include <stdio.h> #include <string> #include <time.h> #include ...
insert
132
132
132
133
TLE
p02599
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; // #include <ext/pb_ds/assoc_container.hpp> // #include <ext/pb_ds/tree_policy.hpp> // using namespace __gnu_pbds; // #define ordered_set tree<int, null_type,less<int>, // rb_tree_tag,tree_order_statistics_node_update> #define fast ...
#include <bits/stdc++.h> using namespace std; // #include <ext/pb_ds/assoc_container.hpp> // #include <ext/pb_ds/tree_policy.hpp> // using namespace __gnu_pbds; // #define ordered_set tree<int, null_type,less<int>, // rb_tree_tag,tree_order_statistics_node_update> #define fast ...
replace
16
17
16
17
0
p02599
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (int i = a; i < (b); ++i) #define trav(a, x) for (auto &a : x) #define all(x) begin(x), end(x) #define sz(x) (int)(x).size() typedef long long ll; typedef pair<int, int> pii; typedef vector<int> vi; constexpr int B = 400; struct Q { int L, R, id...
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (int i = a; i < (b); ++i) #define trav(a, x) for (auto &a : x) #define all(x) begin(x), end(x) #define sz(x) (int)(x).size() typedef long long ll; typedef pair<int, int> pii; typedef vector<int> vi; constexpr int B = 900; struct Q { int L, R, id...
replace
11
12
11
12
TLE
p02599
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define ll long long #define endl '\n' #define FASTINOUT \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); ...
#include <bits/stdc++.h> using namespace std; #define ll long long #define endl '\n' #define FASTINOUT \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); ...
replace
15
20
15
19
TLE
p02599
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define ll long long #define pll pair<ll, ll> #define left 2 * node + 1 #define right left + 1 #define mid (s + e >> 1) const ll N = 5e5 + 5; vector<ll> T[4 * N]; void build(ll A[], ll node, ll s, ll e) { if (s == e) { T[node].push_back(A[s]); return; } bu...
#include <bits/stdc++.h> using namespace std; #define ll long long #define pll pair<ll, ll> #define left 2 * node + 1 #define right left + 1 #define mid (s + e >> 1) const ll N = 5e5 + 5; vector<ll> T[4 * N]; void build(ll A[], ll node, ll s, ll e) { if (s == e) { T[node].push_back(A[s]); return; } bu...
replace
63
64
63
64
TLE
p02599
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const int MAXN = 5e5 + 10; const int MAX_NODE_CNT = MAXN << 5; int n, m, lst[MAXN]; struct Persistent_Segment_Tree { #define mid ((l + r) >> 1) #define ls(_) t[_].ls #define rs(_) t[_].rs #define lq(_) t[_].ls, l, mid #define rq(_) t[_].rs, mid + 1, r int node_cnt, rt[...
#include <bits/stdc++.h> using namespace std; const int MAXN = 5e5 + 10; const int MAX_NODE_CNT = MAXN << 6; int n, m, lst[MAXN]; struct Persistent_Segment_Tree { #define mid ((l + r) >> 1) #define ls(_) t[_].ls #define rs(_) t[_].rs #define lq(_) t[_].ls, l, mid #define rq(_) t[_].rs, mid + 1, r int node_cnt, rt[...
replace
4
5
4
5
-11
p02600
C++
Time Limit Exceeded
#include <bits/stdc++.h> #include <cstdlib> #include <iostream> #include <numeric> #define ll long long int #define all(x) x.begin(), x.end() #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL)...
#include <bits/stdc++.h> #include <cstdlib> #include <iostream> #include <numeric> #define ll long long int #define all(x) x.begin(), x.end() #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL)...
replace
150
151
150
151
TLE
p02600
C++
Runtime Error
#include <stdio.h> int main() { int n; scanf("%d", n); if (n <= 1999 && n >= 1800) { printf("1"); } else if (n <= 1799 && n >= 1600) { printf("2"); } else if (n <= 1599 && n >= 1400) { printf("3"); } else if (n <= 1399 && n >= 1200) { printf("4"); } else if (n <= 1199 && n >= 1000) { p...
#include <stdio.h> int main() { int n; scanf("%d", &n); if (n <= 1999 && n >= 1800) { printf("1"); } else if (n <= 1799 && n >= 1600) { printf("2"); } else if (n <= 1599 && n >= 1400) { printf("3"); } else if (n <= 1399 && n >= 1200) { printf("4"); } else if (n <= 1199 && n >= 1000) { ...
replace
3
4
3
4
-11
p02600
C++
Runtime Error
#include <cassert> #include <iostream> #include <stdexcept> using namespace std; int main() { int X; cin >> X; assert(400 <= X && X <= 1999); int kyu; if (X < 600) kyu = 8; else if (X < 800) kyu = 7; else if (X < 1000) kyu = 6; else if (X < 1200) kyu = 5; else if (X < 1400) kyu =...
#include <cassert> #include <iostream> #include <stdexcept> using namespace std; int main() { int X; cin >> X; assert(400 <= X && X <= 1999); int kyu; if (X < 600) kyu = 8; else if (X < 800) kyu = 7; else if (X < 1000) kyu = 6; else if (X < 1200) kyu = 5; else if (X < 1400) kyu =...
replace
25
26
25
26
0
p02600
Python
Runtime Error
X = int(input()) if 400 <= X < 600: result = 8 elif X < 800: result = 7 elif X < 1000: result = 6 elif X < 1200: result = 5 elif X < 1400: result = 4 elif X < 1600: result = 3 elif X < 1800: result = 2 elif X < 200: result = 1 print(result)
X = int(input()) if 400 <= X < 600: result = 8 elif X < 800: result = 7 elif X < 1000: result = 6 elif X < 1200: result = 5 elif X < 1400: result = 4 elif X < 1600: result = 3 elif X < 1800: result = 2 elif X < 2000: result = 1 print(result)
replace
16
17
16
17
0
p02601
C++
Time Limit Exceeded
#include <iostream> using namespace std; int main() { int A, B, C, K; bool flag = false; for (int i = 0; i <= K; ++i) { for (int j = 0; j <= K; ++j) { for (int l = 0; l <= K; ++l) { int x = A * (1 << i), y = B * (1 << j), z = C * (1 << l); if (x < y && y < z && i + j + l <= K) ...
#include <iostream> using namespace std; int main() { int A, B, C, K; bool flag = false; cin >> A >> B >> C >> K; for (int i = 0; i <= K; ++i) { for (int j = 0; j <= K; ++j) { for (int l = 0; l <= K; ++l) { int x = A * (1 << i), y = B * (1 << j), z = C * (1 << l); if (x < y && y < z ...
replace
7
8
7
8
TLE
p02601
C++
Time Limit Exceeded
#include <algorithm> #include <chrono> #include <climits> #include <cmath> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <stack> #include <string> #include <unordered_map> #include <unordered_set> #include <utility>...
#include <algorithm> #include <chrono> #include <climits> #include <cmath> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <stack> #include <string> #include <unordered_map> #include <unordered_set> #include <utility>...
replace
45
46
45
47
TLE
p02601
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int A, B, C, K; cin >> A >> B >> C; cin >> K; while (K > 0) { if (B <= A) { B *= 2; K--; } else if (C <= B) { C *= 2; K--; } } if (B > A && C > B) { cout << "Yes" << endl; } else { cout << "No" << end...
#include <bits/stdc++.h> using namespace std; int main() { int A, B, C, K; cin >> A >> B >> C; cin >> K; while (K > 0) { if (B > A && C > B) { break; } if (B <= A) { B *= 2; K--; } else if (C <= B) { C *= 2; K--; } } if (B > A && C > B) { cout << "Ye...
insert
9
9
9
13
TLE
p02601
C++
Time Limit Exceeded
#include <iostream> #include <stdio.h> using namespace std; int main() { int A, B, C, K; cin >> A >> B >> C; cin >> K; int count = 0; while (count < K) { if (B <= A) { B = B * 2; count++; } else if (count < K && C <= B) { C = C * 2; count++; } } if (B > A && C > B) ...
#include <iostream> #include <stdio.h> using namespace std; int main() { int A, B, C, K; cin >> A >> B >> C; cin >> K; int count = 0; while (count < K && !(B > A && C > B)) { if (B <= A) { B = B * 2; count++; } else if (count < K && C <= B) { C = C * 2; count++; } } if...
replace
9
10
9
10
TLE
p02601
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; int main() { int A, B, C; cin >> A >> B >> C; int K; cin >> K; while ((B <= A) && (K > 0)) { B *= 2; K--; } while ((B > A) && (K > 0)) { C *= 2; } if ((C > B) && (B > A)) { cout << "Yes...
#include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; int main() { int A, B, C; cin >> A >> B >> C; int K; cin >> K; while ((B <= A) && (K > 0)) { B *= 2; K--; } while ((B > A) && (K > 0)) { C *= 2; K--; } if ((C > B) && (B > A)) { cou...
insert
16
16
16
17
TLE
p02601
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int v[3]; for (int i = 0; i < 3; ++i) cin >> v[i]; int k; cin >> k; int p = 1; while (k--) { if (v[p] <= v[p - 1]) v[p] *= 2; else p++, k++; } if (v[0] < v[1] and v[1] < v[2]) cout << "Yes\n"; else cout <...
#include <bits/stdc++.h> using namespace std; int main() { int v[3]; for (int i = 0; i < 3; ++i) cin >> v[i]; int k; cin >> k; int p = 1; while (k-- and p < 3) { if (v[p] <= v[p - 1]) v[p] *= 2; else p++, k++; } if (v[0] < v[1] and v[1] < v[2]) cout << "Yes\n"; else ...
replace
15
16
15
16
0
p02601
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cassert> #include <chrono> #include <cmath> #include <complex> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <iterator> #include <limits> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include...
#include <algorithm> #include <bitset> #include <cassert> #include <chrono> #include <cmath> #include <complex> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <iterator> #include <limits> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include...
replace
63
64
63
64
9
p02601
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define sws \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0) #define ll long ...
#include <bits/stdc++.h> using namespace std; #define sws \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0) #define ll long ...
replace
28
29
28
29
TLE
p02601
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define ll long long #define rep(i, n) for (int i = 0; i < (n); i++) #define REP(i, l, r) for (int i = (l); i < (r); i++) int main() { int A, B, C; cin >> A >> B >> C; int K; cin >> K; while (K) { if (A >= B) { B *= 2; K--; } else break;...
#include <bits/stdc++.h> using namespace std; #define ll long long #define rep(i, n) for (int i = 0; i < (n); i++) #define REP(i, l, r) for (int i = (l); i < (r); i++) int main() { int A, B, C; cin >> A >> B >> C; int K; cin >> K; while (K) { if (A >= B) { B *= 2; K--; } else break;...
replace
22
23
22
24
TLE
p02601
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; #define ll long long int int main() { int a, b, c; int k; cin >> a >> b >> c; cin >> k; int i = 0, x = 0; int flag = 0; while (...
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; #define ll long long int int main() { int a, b, c; int k; cin >> a >> b >> c; cin >> k; int i = 0, x = 0; int flag = 0; while (...
insert
34
34
34
35
TLE
p02601
C++
Time Limit Exceeded
#include <bits/stdc++.h> #include <string.h> typedef long long int ll; #define all(x) (x).begin(), (x).end() using namespace std; int nxt() { int x; cin >> x; return x; } ll nxtl() { ll x; cin >> x; return x; } void SieveOfEratosthenes(int n, vector<int> &primes) { // Create a boolean array "prime[0....
#include <bits/stdc++.h> #include <string.h> typedef long long int ll; #define all(x) (x).begin(), (x).end() using namespace std; int nxt() { int x; cin >> x; return x; } ll nxtl() { ll x; cin >> x; return x; } void SieveOfEratosthenes(int n, vector<int> &primes) { // Create a boolean array "prime[0....
replace
137
138
137
138
TLE
p02601
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; using pii = pair<int, int>; #define pb push_back #define mp make_pair #define eb emplace_back #define all(x) (x).begin(), (x).end() #define x first #define y second const int MOD = 1e9 + 7; void setIO() { ios_base::sync_with_stdio(0); cin.tie(0...
#include <bits/stdc++.h> using namespace std; using ll = long long; using pii = pair<int, int>; #define pb push_back #define mp make_pair #define eb emplace_back #define all(x) (x).begin(), (x).end() #define x first #define y second const int MOD = 1e9 + 7; void setIO() { ios_base::sync_with_stdio(0); cin.tie(0...
replace
37
38
37
38
-6
*** stack smashing detected ***: terminated
p02601
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; typedef long long ll; const int inf = 1001001001; int main() { int a, b, c, k; cin >> a >> b >> c >> k; while (k > 0) { if (b <= a) { b *= 2; k--; continue; } if (c <= b) { c *= 2; ...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; typedef long long ll; const int inf = 1001001001; int main() { int a, b, c, k; cin >> a >> b >> c >> k; while (k > 0) { if (b <= a) { b *= 2; k--; continue; } if (c <= b) { c *= 2; ...
insert
21
21
21
22
TLE
p02601
Python
Runtime Error
a, b, c = 7, 4, 2 k = int(input()) while a >= b and k > 0: b *= 2 k -= 1 while b >= c and k > 0: c *= 2 k -= 1 if a < b < c: print("Yes") else: print("No")
a, b, c = map(int, input().split()) k = int(input()) while a >= b and k > 0: b *= 2 k -= 1 while b >= c and k > 0: c *= 2 k -= 1 if a < b < c: print("Yes") else: print("No")
replace
0
1
0
1
ValueError: invalid literal for int() with base 10: '7 2 5'
Traceback (most recent call last): File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02601/Python/s393142125.py", line 3, in <module> k = int(input()) ValueError: invalid literal for int() with base 10: '7 2 5'
p02601
Python
Time Limit Exceeded
A, B, C = map(int, input().split()) K = int(input()) while K > 0: if A >= B: B *= 2 K -= 1 elif B >= C: C *= 2 K -= 1 if C > B and B > A: print("Yes") else: print("No")
A, B, C = map(int, input().split()) K = int(input()) while K > 0: if A >= B: B *= 2 K -= 1 elif B >= C: C *= 2 K -= 1 if C > B and B > A: break if C > B and B > A: print("Yes") else: print("No")
insert
10
10
10
12
TLE
p02601
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c, k; cin >> a >> b >> c >> k; while (k > 0) { if (c <= b || c <= a) { c *= 2; k--; } else if (b <= a) { b *= 2; k--; } } (c > b && b > a) ? cout << "Yes" << endl : cout << "No" << endl; retur...
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c, k; cin >> a >> b >> c >> k; while (k > 0) { if (c <= b || c <= a) { c *= 2; k--; } else if (b <= a) { b *= 2; k--; } else if (c > b && b > a) { break; } } (c > b && b > a) ? cout << ...
insert
18
18
18
20
TLE
p02601
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; int main(void) { int A, B, C, K; cin >> A >> B >> C >> K; vector<int> success; for (int r = 0; r <= K; r++) { for (int g = 0; g <= K; g++) { for (int b = 0; b <= K; b++) { int rval = A * (1 << r); int gval = B * (1 ...
#include <bits/stdc++.h> using namespace std; using ll = long long; int main(void) { int A, B, C, K; cin >> A >> B >> C >> K; vector<int> success; for (int r = 0; r <= K; r++) { for (int g = 0; g <= K; g++) { for (int b = 0; b <= K; b++) { int rval = A * (1 << r); int gval = B * (1 ...
replace
22
23
22
29
0
p02601
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; const int N = 1e5 + 5, mod = 1e9 + 7; void solve() { int r, g, b; cin >> r >> g >> b; int k; cin >> k; while (k) { if (g <= r) { g *= 2; --k; } else if (b <= g) { b *= 2; --k; ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; const int N = 1e5 + 5, mod = 1e9 + 7; void solve() { int r, g, b; cin >> r >> g >> b; int k; cin >> k; while (k) { if (g <= r) { g *= 2; --k; } else if (b <= g) { b *= 2; --k; ...
insert
21
21
21
24
TLE
p02601
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c, k; int cnt = 0; cin >> a >> b >> c >> k; while (a >= b) { cnt += 1; b *= 2; } while (b >= c) { cnt += 1; c * 2; } if (cnt <= k) cout << "Yes" << endl; else cout << "No" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c, k; int cnt = 0; cin >> a >> b >> c >> k; while (a >= b) { cnt += 1; b *= 2; } while (b >= c) { cnt += 1; c *= 2; } if (cnt <= k) cout << "Yes" << endl; else cout << "No" << endl; }
replace
12
13
12
13
TLE
p02602
C++
Runtime Error
#include <stdio.h> int main() { long long int n, k; scanf("%lld", &n); scanf("%lld", &k); long long int a[100]; for (long long int i = 0; i < n; i++) { scanf("%lld", &a[i]); } for (long long int j = 0; j < n - k; j++) { if (a[k + j] > a[j]) { printf("Yes\n"); } else printf("No\n"...
#include <stdio.h> int main() { long long int n, k; scanf("%lld", &n); scanf("%lld", &k); long long int a[200000]; for (long long int i = 0; i < n; i++) { scanf("%lld", &a[i]); } for (long long int j = 0; j < n - k; j++) { if (a[k + j] > a[j]) { printf("Yes\n"); } else printf("No...
replace
7
8
7
8
0
p02602
C++
Runtime Error
#include <iostream> #include <vector> using namespace std; int main() { long N; cin >> N; long K; cin >> K; vector<long> avec; vector<long> zeros; for (long i = 0; i < N; ++i) { long a; cin >> a; avec.emplace_back(a); if (a == 0) { zeros.emplace_back(i); } } unsigned int cur...
#include <iostream> #include <vector> using namespace std; int main() { long N; cin >> N; long K; cin >> K; vector<long> avec; vector<long> zeros; for (long i = 0; i < N; ++i) { long a; cin >> a; avec.emplace_back(a); if (a == 0) { zeros.emplace_back(i); } } unsigned int cur...
replace
25
26
25
26
-11
p02602
C++
Runtime Error
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound #include <bitset> // bitset #include <cctype> // isupper, islower, isdigit, toupper, tolower #include <climits> #include <cstdint> // int64_t, int*_t #include <cstdio> // printf #include <deque> // deque #include <functional> #incl...
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound #include <bitset> // bitset #include <cctype> // isupper, islower, isdigit, toupper, tolower #include <climits> #include <cstdint> // int64_t, int*_t #include <cstdio> // printf #include <deque> // deque #include <functional> #incl...
replace
39
40
39
40
0
p02602
C++
Runtime Error
#include <bits/stdc++.h> #include <numeric> using namespace std; int main() { int n, k; vector<int> a(n); cin >> n >> k; for (int i = 0; i < n; ++i) { cin >> a[i]; } for (int i = k; i < n; ++i) { if (a[i - k] < a[i]) cout << "Yes" << endl; else cout << "No" << endl; } }
#include <bits/stdc++.h> #include <numeric> using namespace std; int main() { int n, k; int a[200005]; cin >> n >> k; for (int i = 0; i < n; ++i) { cin >> a[i]; } for (int i = k; i < n; ++i) { if (a[i - k] < a[i]) cout << "Yes" << endl; else cout << "No" << endl; } }
replace
6
7
6
7
-6
terminate called after throwing an instance of 'std::length_error' what(): cannot create std::vector larger than max_size()
p02602
C++
Runtime Error
/* Author:zeke pass System Test! GET AC!! */ #include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include...
/* Author:zeke pass System Test! GET AC!! */ #include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include...
insert
76
76
76
77
0
p02602
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define ALL(v) v.begin(), v.end() #define V vector #define P pair using ll = long long; using ld = long double; const int MOD = 1000000007; const ll INF = 1LL << 60; int main() { int n, k; cin >> n >> k; V<ll> a(n); for (int i = 0; i < n; i++) cin >> a[i]; ...
#include <bits/stdc++.h> using namespace std; #define ALL(v) v.begin(), v.end() #define V vector #define P pair using ll = long long; using ld = long double; const int MOD = 1000000007; const ll INF = 1LL << 60; int main() { int n, k; cin >> n >> k; V<ll> a(n); for (int i = 0; i < n; i++) cin >> a[i]; f...
replace
17
28
17
19
0
p02602
C++
Runtime Error
#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>; #define int long long #define pb push_back #...
#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>; #define int long long #define pb push_back #...
replace
95
115
95
97
-6
terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc
p02602
C++
Runtime Error
/** ** author : Raghav ** codechef:raghav_456 ** codeforces:raghavramola7 **/ #pragma GCC optimize("Ofast") #pragma GCC target("avx,avx2,fma") #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; using namespace std; #define endl "\n" #define ff first #define ss second #define i...
/** ** author : Raghav ** codechef:raghav_456 ** codeforces:raghavramola7 **/ #pragma GCC optimize("Ofast") #pragma GCC target("avx,avx2,fma") #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; using namespace std; #define endl "\n" #define ff first #define ss second #define i...
replace
59
60
59
60
-6
terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc
p02602
C++
Runtime Error
#include <stdio.h> int main() { int n, k; scanf("%d %d", &n, &k); int lt[n]; for (int i = 0; i < n; i++) { scanf("%d", &lt[i]); } int c = n - k; for (int i = 0; i < c; i++) { if (lt[i] < lt[i + c]) { puts("Yes"); } else { puts("No"); } } return 0; }
#include <stdio.h> int main() { int n, k; scanf("%d %d", &n, &k); int lt[n]; for (int i = 0; i < n; i++) { scanf("%d", &lt[i]); } int c = n - k; for (int i = 0; i < c; i++) { if (lt[i] < lt[i + k]) { puts("Yes"); } else { puts("No"); } } return 0; }
replace
11
12
11
12
0
p02602
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; using ll = long long; int main() { int n, k; cin >> n >> k; vector<ll> a(n); rep(i, n) cin >> a[i]; vector<ll> s(n + 1); s[0] = 1; rep(i, n) s[i + 1] = s[i] * a[i]; for (int i = k + 1; i <= n; i++) { if (s...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; using ll = long long; int main() { int n, k; cin >> n >> k; vector<ll> a(n); rep(i, n) cin >> a[i]; for (int i = k; i < n; i++) { if (a[i - k] < a[i]) cout << "Yes" << endl; else cout << "No" << ...
replace
10
15
10
12
0
p02602
C++
Runtime Error
#define DEBUG 0 #include <bits/stdc++.h> #define all(v) (v).begin(), (v).end() #define pb push_back #define REP(i, n) for (int i = 0; i < (n); i++) #define REP2(i, x, n) for (int i = x; i < (n); i++) using namespace std; using ll = long long; using ld = long double; using pii = pair<int, int>; using pll = pair<ll, ll>;...
#define DEBUG 0 #include <bits/stdc++.h> #define all(v) (v).begin(), (v).end() #define pb push_back #define REP(i, n) for (int i = 0; i < (n); i++) #define REP2(i, x, n) for (int i = x; i < (n); i++) using namespace std; using ll = long long; using ld = long double; using pii = pair<int, int>; using pll = pair<ll, ll>;...
replace
76
88
76
78
0
p02602
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int a[20000]; int main() { int N, K, i; scanf("%d%d", &N, &K); for (i = 0; i < N; i++) scanf("%d", &a[i]); for (i = 0; i < N - K; i++) if (a[i] < a[K + i]) printf("Yes\n"); else printf("No\n"); return 0; }
#include <bits/stdc++.h> using namespace std; int a[200001]; int main() { int N, K, i; scanf("%d%d", &N, &K); for (i = 0; i < N; i++) scanf("%d", &a[i]); for (i = 0; i < N - K; i++) if (a[i] < a[K + i]) printf("Yes\n"); else printf("No\n"); return 0; }
replace
3
4
3
4
0
p02602
C++
Runtime Error
#include <bits/stdc++.h> #define ll long long using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define rrep(i, n) for (int i = 1; i <= n; i++) ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; } ll lcm(ll a, ll b) { return (a * b) / gcd(a, b); } using P = pair<int, int>; template <class T> bool chmax...
#include <bits/stdc++.h> #define ll long long using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define rrep(i, n) for (int i = 1; i <= n; i++) ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; } ll lcm(ll a, ll b) { return (a * b) / gcd(a, b); } using P = pair<int, int>; template <class T> bool chmax...
replace
31
32
31
32
-11
p02602
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const string YES = "Yes"; const string NO = "No"; void solve(long long N, long long K, std::vector<long long> A) { vector<long long> cumsum(N, 0); cumsum[0] = A[0]; for (long long i = 1; i <= N; ++i) { cumsum[i] = cumsum[i - 1] * A[i]; } // for(long long i =...
#include <bits/stdc++.h> using namespace std; const string YES = "Yes"; const string NO = "No"; void solve(long long N, long long K, std::vector<long long> A) { for (int i = K; i < N; ++i) { // cout << A[i] << ":" << A[i-K] << endl; if (A[i] > A[i - K]) cout << YES << endl; else cout << NO <...
replace
7
27
7
13
-6
malloc(): corrupted top size
p02602
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int64_t N, K; cin >> N >> K; vector<int64_t> A(N); for (int i = 0; i < N; i++) { cin >> A.at(i); } int64_t chk = N - K; for (int i = 0; i < chk; i++) { if (A.at(i) < A.at(i + chk - 1)) { cout << "Yes" << endl; } else { cou...
#include <bits/stdc++.h> using namespace std; int main() { int64_t N, K; cin >> N >> K; vector<int64_t> A(N); for (int i = 0; i < N; i++) { cin >> A.at(i); } for (int i = 0; i < N - K; i++) { if (A.at(i) < A.at(i + K)) { cout << "Yes" << endl; } else { cout << "No" << endl; } ...
replace
10
13
10
12
0
p02602
Python
Time Limit Exceeded
n, k = map(int, input().split(" ")) a = list(map(int, input().split(" "))) score: list = [] for i in range(k - 1, n): tmp_score = 1 for j in range(k): tmp_score *= a[i - j] score.append(tmp_score) for i in range(len(score) - 1): # print(score[i], score[i + 1]) if score[i + 1] > score[i]: ...
n, k = map(int, input().split(" ")) a = list(map(int, input().split(" "))) for i in range(k, n): if a[i - k] < a[i]: print("Yes") else: print("No")
replace
3
13
3
5
TLE
p02602
Python
Runtime Error
from collections import deque n, k = map(int, input().split()) a = list(map(int, input().split())) queue = deque() for i in range(n): if i < k - 1: queue.append(a[i]) elif i >= k: x = queue.popleft() if x < a[i]: print("Yes") else: print("No") que...
from collections import deque n, k = map(int, input().split()) a = list(map(int, input().split())) queue = deque() for i in range(n): if i <= k - 1: queue.append(a[i]) elif i >= k: x = queue.popleft() if x < a[i]: print("Yes") else: print("No") qu...
replace
6
7
6
7
0
p02602
Python
Time Limit Exceeded
n, k = map(int, input().split()) aa = tuple(map(int, input().split())) s = 1 ps = 1 for i in range(n): s *= aa[i] if i >= k: s //= aa[i - k] if ps < s: print("Yes") else: print("No") ps = s
n, k = map(int, input().split()) aa = tuple(map(int, input().split())) for i in range(k, n): if aa[i - k] < aa[i]: print("Yes") else: print("No")
replace
3
14
3
8
TLE
p02602
Python
Time Limit Exceeded
s = input().split() N = int(s[0]) K = int(s[1]) A = input().split() for i in range(K, N): m1 = 1 m2 = 1 for j in range(K): m1 *= int(A[i - j - 1]) m2 *= int(A[i - j - 0]) print("Yes" if m1 < m2 else "No")
s = input().split() N = int(s[0]) K = int(s[1]) A = input().split() for i in range(K, N): m1 = int(A[i - K]) m2 = int(A[i]) print("Yes" if m1 < m2 else "No")
replace
6
11
6
8
TLE
p02602
C++
Runtime Error
#include <bits/stdc++.h> #define ford(i, a, b) for (int i = (a); i >= b; i--) #define rep1(i, a, b) for (int i = (a); (i) <= (b); (i)++) #define rep(i, a, b) for (int i = (a); (i) < (b); (i)++) #define ll long long #define N 105 #define pql priority_queue<ll> #define all(v) (v).begin(), (v).end() #define rall(v) (v).rb...
#include <bits/stdc++.h> #define ford(i, a, b) for (int i = (a); i >= b; i--) #define rep1(i, a, b) for (int i = (a); (i) <= (b); (i)++) #define rep(i, a, b) for (int i = (a); (i) < (b); (i)++) #define ll long long #define N 200005 #define pql priority_queue<ll> #define all(v) (v).begin(), (v).end() #define rall(v) (v)...
replace
5
6
5
6
0
p02602
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int inf = 1e9, mod = 1e9 + 7; #define endl '\n' int a[20005]; void solve() {} int main() { ios::sync_with_stdio(0); cin.tie(0); int n, k; cin >> n >> k; for (int i = 1; i <= n; i++) cin >> a[i]; for (int i = 1; i <= n - k; i++) ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int inf = 1e9, mod = 1e9 + 7; #define endl '\n' int a[200005]; void solve() {} int main() { ios::sync_with_stdio(0); cin.tie(0); int n, k; cin >> n >> k; for (int i = 1; i <= n; i++) cin >> a[i]; for (int i = 1; i <= n - k; i++)...
replace
5
6
5
6
0
p02602
C++
Runtime Error
#include <bits/stdc++.h> #include <math.h> using namespace std; typedef long long ll; typedef vector<ll> vi; typedef pair<ll, ll> ii; #define pb push_back #define mp make_pair #define ff first #define ss second #define sz(vs) (ll)(vs.size()) #define rep(i, a, b) for (ll i = a; i < b; ++i) #define rep_(i, a, b) for (l...
#include <bits/stdc++.h> #include <math.h> using namespace std; typedef long long ll; typedef vector<ll> vi; typedef pair<ll, ll> ii; #define pb push_back #define mp make_pair #define ff first #define ss second #define sz(vs) (ll)(vs.size()) #define rep(i, a, b) for (ll i = a; i < b; ++i) #define rep_(i, a, b) for (l...
replace
19
20
19
20
0
p02602
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ll n, k; cin >> n >> k; vector<ll> a(n); for (ll i = 0; i < n; ++i) { cin >> a[i]; } vector<ll> s(n + 1); s[0] = 1; for (ll i = 0; i < n; ++i) { s[i + 1] = s[i] * a[i]; } for (ll i = k; i < n; ++i) { ll x =...
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ll n, k; cin >> n >> k; vector<ll> a(n); for (ll i = 0; i < n; ++i) { cin >> a[i]; } for (ll i = 0; i < n - k; ++i) { if (a[i] < a[i + k]) { cout << "Yes" << endl; } else { cout << "No" << endl; } ...
replace
11
20
11
13
0
p02602
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (ll i = 0; i < n; i++) #define per(i, n) for (ll i = n - 1; i >= 0; i--) #define REP(i, n) for (ll i = 1; i < n; i++) #define PER(i, n) for (ll i = n; i >= 1; i--) #define sz(x) int(x.size()) #define all(v) v.begin(), v.end() #define rall(v) v.rbegin(...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (ll i = 0; i < n; i++) #define per(i, n) for (ll i = n - 1; i >= 0; i--) #define REP(i, n) for (ll i = 1; i < n; i++) #define PER(i, n) for (ll i = n; i >= 1; i--) #define sz(x) int(x.size()) #define all(v) v.begin(), v.end() #define rall(v) v.rbegin(...
replace
54
55
54
55
0
p02602
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; using ll = long long; int main() { int n, k; cin >> n >> k; vector<ll> a(n); for (int i = 0; i < n; i++) { cin >> a[i]; } vector<ll> t(n + 1, 1); vector<ll> ans(n - k); int count = 0; for (int i...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; using ll = long long; int main() { int n, k; cin >> n >> k; vector<ll> a(n); for (int i = 0; i < n; i++) { cin >> a[i]; } for (int i = k; i < n; i++) { if (a[i - k] < a[i]) { cout << "Yes" <<...
replace
15
34
15
17
0
p02602
C++
Runtime Error
#include <stdio.h> int n, k; int a[100010]; int main() { scanf("%d%d", &n, &k); for (int i = 1; i <= n; i++) scanf("%d", a + i); for (int i = k + 1; i <= n; i++) { if (a[i] > a[i - k]) puts("Yes"); else puts("No"); } return 0; }
#include <stdio.h> int n, k; int a[200010]; int main() { scanf("%d%d", &n, &k); for (int i = 1; i <= n; i++) scanf("%d", a + i); for (int i = k + 1; i <= n; i++) { if (a[i] > a[i - k]) puts("Yes"); else puts("No"); } return 0; }
replace
2
3
2
3
0
p02602
C++
Runtime Error
#include <bits/stdc++.h> int main() { using namespace std; long long n, k, a[2000]; cin >> n >> k; for (long long j = 0; j < n; ++j) { cin >> a[j]; } for (long long i = 0; i < n - k; ++i) { if (a[i] < a[i + k]) cout << "Yes" << endl; else cout << "No" << endl; } return 0; }
#include <bits/stdc++.h> int main() { using namespace std; long long n, k, a[200000]; cin >> n >> k; for (long long j = 0; j < n; ++j) { cin >> a[j]; } for (long long i = 0; i < n - k; ++i) { if (a[i] < a[i + k]) cout << "Yes" << endl; else cout << "No" << endl; } return 0; }
replace
3
4
3
4
0
p02602
C++
Runtime Error
#include <bits/stdc++.h> #include <cstdlib> #include <iostream> #include <numeric> #define ll long long int #define all(x) x.begin(), x.end() #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL)...
#include <bits/stdc++.h> #include <cstdlib> #include <iostream> #include <numeric> #define ll long long int #define all(x) x.begin(), x.end() #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL)...
replace
150
151
150
151
0
p02602
C++
Time Limit Exceeded
#include <algorithm> #include <bits/stdc++.h> using namespace std; #define ll long long int #define ull unsigned long long int #define db double #define ld long double #define MOD 1000000007 #define inf (1LL << 62) #define pi acos(-1.0) #define si(a) scanf("%lld", &a) #define sd(n) scanf("%lf", &n) #define for1(i, sto...
#include <algorithm> #include <bits/stdc++.h> using namespace std; #define ll long long int #define ull unsigned long long int #define db double #define ld long double #define MOD 1000000007 #define inf (1LL << 62) #define pi acos(-1.0) #define si(a) scanf("%lld", &a) #define sd(n) scanf("%lf", &n) #define for1(i, sto...
replace
67
82
67
84
TLE