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
p02602
C++
Runtime Error
// https://atcoder.jp/contests/m-solutions2020/tasks/m_solutions2020_c #include <bits/stdc++.h> using namespace std; int main() { long long n, k; cin >> n >> k; vector<long long> a(n + 1); a[0] = 1; for (int i = 1; i <= n; i++) { cin >> a[i]; a[i] *= a[i - 1]; } for (int i = k + 1; i <= n; i++) ...
// https://atcoder.jp/contests/m-solutions2020/tasks/m_solutions2020_c #include <bits/stdc++.h> using namespace std; int main() { long long n, k; cin >> n >> k; vector<long long> a(n + 1); a[0] = 1; for (int i = 1; i <= n; i++) { cin >> a[i]; if (i <= k) ; else { if (a[i] > a[i - k])...
replace
12
19
12
20
0
p02602
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) #define rrep(i, n) for (int i = n - 1; i >= 0; i--) using namespace std; #define INF ((1 << 30) - 1) #define LINF (1LL << 60) #define EPS (1e-10) typedef long long ll; typedef pair<ll, ll> P; const int MOD = 1000000007; const int MOD2 = 998244353; ...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) #define rrep(i, n) for (int i = n - 1; i >= 0; i--) using namespace std; #define INF ((1 << 30) - 1) #define LINF (1LL << 60) #define EPS (1e-10) typedef long long ll; typedef pair<ll, ll> P; const int MOD = 1000000007; const int MOD2 = 998244353; ...
replace
12
13
12
13
0
p02602
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int N, K; cin >> N >> K; vector<int> A(N); for (int i = 0; i < N; i++) { cin >> A.at(i); } for (int i = K + 1; i <= N; i++) { if (A.at(i - K) < A.at(i)) { cout << "Yes" << endl; } else { cout << "No" << endl; } } }
#include <bits/stdc++.h> using namespace std; int main() { int N, K; cin >> N >> K; vector<int> A(N); for (int i = 0; i < N; i++) { cin >> A.at(i); } for (int i = K; i < N; i++) { if (A.at(i - K) < A.at(i)) { cout << "Yes" << endl; } else { cout << "No" << endl; } } }
replace
10
11
10
11
-6
terminate called after throwing an instance of 'std::out_of_range' what(): vector::_M_range_check: __n (which is 5) >= this->size() (which is 5)
p02602
C++
Runtime Error
/*~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~= *$* WRITER:kakitamasziru/OxOmisosiru *$* ~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=*/ #ifdef LOCAL_JUDGE #define _GLIBCXX_DEBUG #endif #include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound #include <cstdint> // int64_t, int*_t #include <iomanip> #include ...
/*~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~= *$* WRITER:kakitamasziru/OxOmisosiru *$* ~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=*/ #ifdef LOCAL_JUDGE #define _GLIBCXX_DEBUG #endif #include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound #include <cstdint> // int64_t, int*_t #include <iomanip> #include ...
insert
69
69
69
70
0
p02602
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int i, j, k, n; cin >> n >> k; long long a[n + 1]; for (i = 0; i < n; i++) { cin >> a[i]; } i = 0; j = k; while (j < n) { if (a[j] > a[i]) { cout << "Yes" << endl; } else { cout << "No" << endl; } } }
#include <bits/stdc++.h> using namespace std; int main() { int i, j, k, n; cin >> n >> k; long long a[n + 1]; for (i = 0; i < n; i++) { cin >> a[i]; } i = 0; j = k; while (j < n) { if (a[j] > a[i]) { cout << "Yes" << endl; } else { cout << "No" << endl; } i++; j++; ...
insert
17
17
17
19
TLE
p02602
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> Pii; typedef pair<int, ll> Pil; typedef pair<ll, ll> Pll; typedef pair<ll, int> Pli; #define fi first #define se second const ll MOD = 1e9 + 7; const ll MOD2 = 998244353; const ll MOD3 = 1812447359; co...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> Pii; typedef pair<int, ll> Pil; typedef pair<ll, ll> Pll; typedef pair<ll, int> Pli; #define fi first #define se second const ll MOD = 1e9 + 7; const ll MOD2 = 998244353; const ll MOD3 = 1812447359; co...
replace
28
29
28
29
0
p02602
C++
Runtime Error
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <ctype.h> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <stack> #include <stdio.h> #include <string.h> #include <string> #include <unordered_map> #include <vector> using...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <ctype.h> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <stack> #include <stdio.h> #include <string.h> #include <string> #include <unordered_map> #include <vector> using...
replace
53
54
53
54
0
p02602
C++
Runtime Error
#include <bits/stdc++.h> #define pb push_back #define pf push_front #define in insert #define ff first #define ss second #define int long long #define rep(i, x, m) for (int i = x; i < m; i++) #define repr(i, x, m) for (int i = x; i >= m; i--) #define MOD 1000000007 #define endl "\n" #define all(v) v.begin(), v.end() #d...
#include <bits/stdc++.h> #define pb push_back #define pf push_front #define in insert #define ff first #define ss second #define int long long #define rep(i, x, m) for (int i = x; i < m; i++) #define repr(i, x, m) for (int i = x; i >= m; i--) #define MOD 1000000007 #define endl "\n" #define all(v) v.begin(), v.end() #d...
replace
53
78
53
57
0
22.244 ms
p02602
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { int N, K; cin >> N >> K; vector<ll> A(N); for (int i = 0; i < N; ++i) { cin >> A[i]; } deque<ll> inter; for (int i = 0; i < K; ++i) { inter.push_back(A[i]); } for (int i = K; i < N; ++i) { ll first = inter.fr...
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { int N, K; cin >> N >> K; vector<ll> A(N); for (int i = 0; i < N; ++i) { cin >> A[i]; } deque<ll> inter; for (int i = 0; i < K; ++i) { inter.push_back(A[i]); } for (int i = K; i < N; ++i) { ll first = inter.fr...
insert
19
19
19
20
0
p02602
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { long long int n, k; cin >> n >> k; vector<int> v; for (int i = 0; i < n; i++) cin >> v[i]; for (int i = 0; i < n - k; i++) { if (v[i + k] > v[i]) cout << "Yes"; else cout << "No"; cout << endl; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { long long int n, k; cin >> n >> k; vector<int> v(n); for (int i = 0; i < n; i++) cin >> v[i]; for (int i = 0; i < n - k; i++) { if (v[i + k] > v[i]) cout << "Yes"; else cout << "No"; cout << endl; } return 0; }
replace
6
7
6
7
-11
p02602
C++
Runtime Error
#include <algorithm> #include <assert.h> #include <cmath> #include <complex> #include <cstring> #include <deque> #include <fstream> #include <functional> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <string.h> #include <unordered_map> #include <vector> using namespace s...
#include <algorithm> #include <assert.h> #include <cmath> #include <complex> #include <cstring> #include <deque> #include <fstream> #include <functional> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <string.h> #include <unordered_map> #include <vector> using namespace s...
replace
19
20
19
20
0
p02602
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) #define INF 1001001001 using ll = long long; using dd = long double; const int D = 60; const int MAX_N = 200005; int to[D][MAX_N]; int main() { std::ifstream in("input.txt"); std::cin.rdbuf(in.rdbuf()); ll n, k; cin...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) #define INF 1001001001 using ll = long long; using dd = long double; const int D = 60; const int MAX_N = 200005; int to[D][MAX_N]; int main() { ll n, k; cin >> n >> k; vector<ll> v(n + 10, 1); vector<ll> A(n); for ...
delete
12
15
12
12
0
p02602
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; bool cmp(long long int x, long long int y) { return x > y; } int main(void) { long long int t, n, m, k, x, y, a[100001]; vector<long long int> v, v1, v2; vector<pair<long long int, long long int>> p, p1, p2; set<long long int> st; priority_queue<long long int> pq;...
#include <bits/stdc++.h> using namespace std; bool cmp(long long int x, long long int y) { return x > y; } int main(void) { long long int t, n, m, k, x, y, a[200001]; vector<long long int> v, v1, v2; vector<pair<long long int, long long int>> p, p1, p2; set<long long int> st; priority_queue<long long int> pq;...
replace
4
5
4
5
0
p02602
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> P; ll n, k; ll a[100005]; int main(void) { cin >> n >> k; for (int i = 0; i < n; i++) { cin >> a[i]; if (i >= k) { if (a[i] > a[i - k]) { cout << "Yes" << endl; } else { cout << "No" << endl;...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> P; ll n, k; ll a[200005]; int main(void) { cin >> n >> k; for (int i = 0; i < n; i++) { cin >> a[i]; if (i >= k) { if (a[i] > a[i - k]) { cout << "Yes" << endl; } else { cout << "No" << endl;...
replace
5
6
5
6
0
p02602
C++
Runtime Error
#include <bits/stdc++.h> // #include <ext/pb_ds/assoc_container.hpp> // #include <ext/pb_ds/tree_poizcy.hpp> typedef long long ll; #define pb push_back #define mp make_pair #define all(a) (a).begin(), (a).end() #define clr(a, h) memset(a, (h), sizeof(a)) #define mem(a, h) memset(a, (h), sizeof(a)) #define fi first #def...
#include <bits/stdc++.h> // #include <ext/pb_ds/assoc_container.hpp> // #include <ext/pb_ds/tree_poizcy.hpp> typedef long long ll; #define pb push_back #define mp make_pair #define all(a) (a).begin(), (a).end() #define clr(a, h) memset(a, (h), sizeof(a)) #define mem(a, h) memset(a, (h), sizeof(a)) #define fi first #def...
replace
34
35
34
35
0
p02602
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; namespace AC { #define ll long long #define PLL pair<ll, ll> #define PDD pair<double, double> #define PDPLL pair<double, PLL> #define PLPLL pair<ll, PLL> #define pb push_back #define fi first #define se second #define ls rt << 1 #define rs rt << 1 | 1 const ll N = 1e5 + 6...
#include <bits/stdc++.h> using namespace std; namespace AC { #define ll long long #define PLL pair<ll, ll> #define PDD pair<double, double> #define PDPLL pair<double, PLL> #define PLPLL pair<ll, PLL> #define pb push_back #define fi first #define se second #define ls rt << 1 #define rs rt << 1 | 1 const ll N = 2e5 + 6...
replace
15
16
15
16
0
p02602
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #include <iomanip> #include <math.h> template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return 1; } return 0; } const int INF = 10010...
#include <bits/stdc++.h> using namespace std; #include <iomanip> #include <math.h> template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return 1; } return 0; } const int INF = 10010...
replace
43
53
43
45
0
p02602
C++
Runtime Error
#include <bits/stdc++.h> #pragma GCC optimize("unroll-loops,no-stack-protector") #pragma GCC target("sse,sse2,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #define watch(x) cout << (#x) << " is " << (x) << endl #define debug cout << "hi" << endl using namespace std; typedef long long ll; typedef long double ld; typedef p...
#include <bits/stdc++.h> #pragma GCC optimize("unroll-loops,no-stack-protector") #pragma GCC target("sse,sse2,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #define watch(x) cout << (#x) << " is " << (x) << endl #define debug cout << "hi" << endl using namespace std; typedef long long ll; typedef long double ld; typedef p...
replace
31
35
31
32
0
p02602
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { long long N, K; cin >> N >> K; long long A[N + 1]; for (int i = 1; i <= N; i++) { cin >> A[i]; } long long past = 0; long long current = 0; for (int i = 1; i <= K; i++) { past += A[i]; } for (int i = K + 1; i <= N; i++) { c...
#include <bits/stdc++.h> using namespace std; int main() { long long N, K; cin >> N >> K; long long A[N + 1]; for (int i = 1; i <= N; i++) { cin >> A[i]; } long long past = 0; long long current = 0; for (int i = 1; i <= K; i++) { past += A[i]; } for (int i = K + 1; i <= N; i++) { c...
replace
21
25
21
22
TLE
p02602
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; template <typename T> inline void read(T &x) { x = 0; int f = 1; char ch = getchar(); while (ch < '0' || ch > '9') { if (ch == '-') f = -1; ch = getchar(); } while (ch >= '0' && ch <= '9') x = x * 10 + (ch ^ 48), ch = getchar(); x *= f; ret...
#include <bits/stdc++.h> using namespace std; template <typename T> inline void read(T &x) { x = 0; int f = 1; char ch = getchar(); while (ch < '0' || ch > '9') { if (ch == '-') f = -1; ch = getchar(); } while (ch >= '0' && ch <= '9') x = x * 10 + (ch ^ 48), ch = getchar(); x *= f; ret...
replace
24
25
24
25
0
p02602
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long lld; int main() { std::ios::sync_with_stdio(false); lld tc = 1; // cin >> tc; while (tc--) { lld n, k; cin >> n >> k; vector<lld> v(n); for (lld i = 0; i < n; i++) { cin >> v[i]; } map<lld, lld> mp; for (lld i = 0...
#include <bits/stdc++.h> using namespace std; typedef long long lld; int main() { std::ios::sync_with_stdio(false); lld tc = 1; // cin >> tc; while (tc--) { lld n, k; cin >> n >> k; vector<lld> v(n); for (lld i = 0; i < n; i++) { cin >> v[i]; } map<lld, lld> mp; for (lld i = 0...
delete
20
21
20
20
TLE
p02602
C++
Runtime Error
#include <iostream> using namespace std; int main() { int a[2000], n, k; cin >> n >> k; for (int i = 1; i <= n; i++) { cin >> a[i]; } for (int i = 1; i <= n - k; i++) { if (a[i] / a[i + k] > 0) cout << "No" << endl; else { cout << "Yes" << endl; } } return 0; }
#include <iostream> using namespace std; int main() { int a[200005], n, k; cin >> n >> k; for (int i = 1; i <= n; i++) { cin >> a[i]; } for (int i = 1; i <= n - k; i++) { if (a[i] / a[i + k] > 0) cout << "No" << endl; else { cout << "Yes" << endl; } } return 0; }
replace
4
5
4
5
0
p02602
C++
Runtime Error
/***** author : C0d1ngPhenomena *****/ #include <bits/stdc++.h> #define endl "\n" #define ll long long int #define TestCases \ int T; \ cin >> T; ...
/***** author : C0d1ngPhenomena *****/ #include <bits/stdc++.h> #define endl "\n" #define ll long long int #define TestCases \ int T; \ cin >> T; ...
replace
40
41
40
41
0
p02603
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; typedef long long ll; using vi = vector<int>; int main() { int n; cin >> n; vi a(n); rep(i, n) cin >> a.at(i); ll money = 1000; ll kabu = 0; int start = a.at(0); for (int i = 1; i < n; i++) { if (s...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; typedef long long ll; using vi = vector<int>; int main() { int n; cin >> n; vi a(n); rep(i, n) cin >> a.at(i); ll money = 1000; ll kabu = 0; int start = a.at(0); for (int i = 1; i < n; i++) { if (s...
replace
19
27
19
24
TLE
p02603
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) #define contains(v, t) (find(v.begin(), v.end(), t) != v.end()) #define MOD 1000000007 using ll = long long; using ull = unsigned long long; using Pii = pair<int, int>; int main() { int n; cin >> n; vector<int> a(n + 1...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) #define contains(v, t) (find(v.begin(), v.end(), t) != v.end()) #define MOD 1000000007 using ll = long long; using ull = unsigned long long; using Pii = pair<int, int>; int main() { int n; cin >> n; vector<int> a(n + 1...
replace
13
14
13
14
0
p02603
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { int N; cin >> N; vector<ll> A(N); for (ll &i : A) cin >> i; ll money = 1000; ll beat = 0; vector<bool> B(N); // BY(0),SE(0); for (ll i = 0; i < N - 1; i++) { if ((long double)A[i + 1] / A[i] > 1) B[i] = true;...
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { int N; cin >> N; vector<ll> A(N); for (ll &i : A) cin >> i; ll money = 1000; ll beat = 0; vector<bool> B(N); // BY(0),SE(0); for (ll i = 0; i < N - 1; i++) { if ((long double)A[i + 1] / A[i] > 1) B[i] = true;...
replace
22
26
22
28
TLE
p02603
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define ll long long #define ull unsigned long long #define debug(n) cout << "DEBUG1 " << n << "\n"; #define debug2(n, m) cout << "DEBUG2 " << n << ' ' << m << "\n"; #define debug3(n, m, x) cout << "DEBUG3 " << n << ' ' << m << ' ' << x << "\n"; #define debug4(n, m, x, y) ...
#include <bits/stdc++.h> #define ll long long #define ull unsigned long long #define debug(n) cout << "DEBUG1 " << n << "\n"; #define debug2(n, m) cout << "DEBUG2 " << n << ' ' << m << "\n"; #define debug3(n, m, x) cout << "DEBUG3 " << n << ' ' << m << ' ' << x << "\n"; #define debug4(n, m, x, y) ...
replace
161
167
161
163
TLE
p02603
C++
Runtime Error
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> // #include <boost/multiprecision/cpp_int.hpp> // // using namespace boost::multiprecision; using namespace __gnu_pbds; using namespace std; typedef tree<int, null_type, less_equal<int>, rb_tree_tag, tree...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> // #include <boost/multiprecision/cpp_int.hpp> // // using namespace boost::multiprecision; using namespace __gnu_pbds; using namespace std; typedef tree<int, null_type, less_equal<int>, rb_tree_tag, tree...
replace
371
372
371
372
0
p02603
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <vector> using namespace std; int main() { int N; cin >> N; vector<int> A(N, 0); for (int i = 0; i < N; i++) cin >> A[i]; long long int money = 1000, stock = 0; A.push_back(0); for (int i = 0; i < N; i++) { if (A...
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <vector> using namespace std; int main() { int N; cin >> N; vector<int> A(N, 0); for (int i = 0; i < N; i++) cin >> A[i]; long long int money = 1000, stock = 0; A.push_back(0); for (int i = 0; i < N; i++) { if (A...
replace
18
22
18
21
TLE
p02603
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(x) x.begin(), x.end() #define mod 1000000007 typedef long long ll; int main() { ll money = 1000; ll kabu = 0; ll n; cin >> n; vector<ll> vec(n); rep(i, n) cin >> vec[i]; bool up = false; rep(i...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(x) x.begin(), x.end() #define mod 1000000007 typedef long long ll; int main() { ll money = 1000; ll kabu = 0; ll n; cin >> n; vector<ll> vec(n); rep(i, n) cin >> vec[i]; bool up = false; rep(i...
replace
28
32
28
30
TLE
p02603
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using ll = long long; const int mod = 1000000007; const double PI = acos(-1); int main() { ll n; cin >> n; vector<ll> a(n); for (ll i = 0; i < n; i++) cin >> a[i]; ll money = 1000; ll stock = 0; for (ll i = 0; i < n; i++) { money += a[i] * stock; ...
#include <bits/stdc++.h> using namespace std; using ll = long long; const int mod = 1000000007; const double PI = acos(-1); int main() { ll n; cin >> n; vector<ll> a(n); for (ll i = 0; i < n; i++) cin >> a[i]; ll money = 1000; ll stock = 0; for (ll i = 0; i < n; i++) { money += a[i] * stock; ...
replace
20
24
20
22
TLE
p02603
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define ll long long int #define mod 1000000007 #define pi 3.14159265358979323846264338327950288419716939937510 #define setbit(x) __builtin_popcountll(x) #define db long double #define pp(x) pair<x, x> #define ff first #define ss second #define FIO ...
#include <bits/stdc++.h> #define ll long long int #define mod 1000000007 #define pi 3.14159265358979323846264338327950288419716939937510 #define setbit(x) __builtin_popcountll(x) #define db long double #define pp(x) pair<x, x> #define ff first #define ss second #define FIO ...
replace
97
99
97
118
TLE
p02603
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (long long i = 0; i < (long long)(n); i++) #define rep2(i, s, n) for (long long i = (s); i < (long long)(n); i++) #define repi(i, n) for (int i = 0; i < (int)(n); i++) #define rep2i(i, s, n) for (int i = (s); i < (int)(n); i++) #define all(v) v.begin(...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (long long i = 0; i < (long long)(n); i++) #define rep2(i, s, n) for (long long i = (s); i < (long long)(n); i++) #define repi(i, n) for (int i = 0; i < (int)(n); i++) #define rep2i(i, s, n) for (int i = (s); i < (int)(n); i++) #define all(v) v.begin(...
replace
116
119
116
119
TLE
p02603
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define MOD (long long)(1e9 + 7) #define INF (1LL << 60) #define rep(i, n) for (ll i = 0; i < (n); i++) #define rep1(i, n) for (ll i = 1; i <= (n); i++) template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; }...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define MOD (long long)(1e9 + 7) #define INF (1LL << 60) #define rep(i, n) for (ll i = 0; i < (n); i++) #define rep1(i, n) for (ll i = 1; i <= (n); i++) template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; }...
insert
99
99
99
101
TLE
p02603
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll n, a[87] = {0}; cin >> n; for (int i = 0; i < n; i++) cin >> a[i]; ll money = 1000; ll cnt = 0; for (int i = 0; i < n; i++) { if (a[i] < a[i + 1]) { cnt += money / a[i]; while (money >= a[i]) mon...
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll n, a[87] = {0}; cin >> n; for (int i = 0; i < n; i++) cin >> a[i]; ll money = 1000; ll cnt = 0; for (int i = 0; i < n; i++) { if (a[i] < a[i + 1]) { cnt += money / a[i]; ll num = money / a[i]; mone...
replace
14
16
14
16
TLE
p02603
C++
Time Limit Exceeded
#include <algorithm> //sort,二分探索,など #include <bitset> //固定長bit集合 #include <cmath> //pow,logなど #include <complex> //複素数 #include <deque> //両端アクセスのキュー #include <functional> //sortのgreater #include <iomanip> //setprecision(浮動小数点の出力の誤差) #include <iostream> //入出力 #include <iter...
#include <algorithm> //sort,二分探索,など #include <bitset> //固定長bit集合 #include <cmath> //pow,logなど #include <complex> //複素数 #include <deque> //両端アクセスのキュー #include <functional> //sortのgreater #include <iomanip> //setprecision(浮動小数点の出力の誤差) #include <iostream> //入出力 #include <iter...
insert
71
71
71
76
TLE
p02603
Python
Time Limit Exceeded
n = int(input()) A = list(map(int, input().split())) ans = 1000 for ii in range(2**n): tmp = 1000 kab = 0 action = "buy" for i in range(n): if (ii >> i) & 1: if action == "buy": if tmp < A[i]: break kab += tmp // A[i] ...
n = int(input()) A = list(map(int, input().split())) ans = 1000 for i in range(n - 1): if A[i] < A[i + 1]: ans += ans // A[i] * (A[i + 1] - A[i]) print(ans)
replace
3
25
3
6
TLE
p02603
C++
Time Limit Exceeded
#include <algorithm> #include <bitset> #include <chrono> #include <cmath> #include <cstdint> #include <functional> #include <iomanip> #include <iostream> #include <iterator> #include <list> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <sstream> #include <stack> #include <...
#include <algorithm> #include <bitset> #include <chrono> #include <cmath> #include <cstdint> #include <functional> #include <iomanip> #include <iostream> #include <iterator> #include <list> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <sstream> #include <stack> #include <...
replace
47
48
47
48
TLE
p02603
C++
Runtime Error
#include <algorithm> #include <iomanip> // std::setprecision() #include <iostream> #include <map> #include <math.h> #include <queue> #include <string> #include <utility> #include <vector> using namespace std; using ll = long long; #define rep(i, a, b) for (ll i = (a); i < (b); i++) #define YES cout << "YES" << endl; #d...
#include <algorithm> #include <iomanip> // std::setprecision() #include <iostream> #include <map> #include <math.h> #include <queue> #include <string> #include <utility> #include <vector> using namespace std; using ll = long long; #define rep(i, a, b) for (ll i = (a); i < (b); i++) #define YES cout << "YES" << endl; #d...
replace
32
33
32
33
-6
Fatal glibc error: malloc assertion failure in sysmalloc: (old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)
p02603
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int64_t> data(n); for (int i = 0; i < n; ++i) { cin >> data[i]; } int fin = 0; for (int i = 0; i < n - 1; ++i) { if (data[i] < data[i + 1]) { fin = i; } } int64_t g = 1000LL; int64_t k = 0LL; f...
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int64_t> data(n); for (int i = 0; i < n; ++i) { cin >> data[i]; } int fin = 0; for (int i = 0; i < n - 1; ++i) { if (data[i] < data[i + 1]) { fin = i; } } int64_t g = 1000LL; int64_t k = 0LL; f...
replace
27
34
27
35
TLE
p02603
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define d(x) cerr << #x ":" << x << endl; #define dd(x, y) cerr << "(" #x "," #y "):(" << x << "," << y << ")" << endl #define rep(i, n) for (int i = (int)(0); i < (int)(n); i++) #define repp(i, a, b) for (int i = (int)(a); i < (int)(b); i++) #define all(v) v.begin(), v.en...
#include <bits/stdc++.h> using namespace std; #define d(x) cerr << #x ":" << x << endl; #define dd(x, y) cerr << "(" #x "," #y "):(" << x << "," << y << ")" << endl #define rep(i, n) for (int i = (int)(0); i < (int)(n); i++) #define repp(i, a, b) for (int i = (int)(a); i < (int)(b); i++) #define all(v) v.begin(), v.en...
replace
43
44
43
44
TLE
p02603
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { // your code goes here long long n; cin >> n; vector<long long> a; for (int i = 0; i < n; i++) { long long b; cin >> b; a.push_back(b); } long long num = 0; long long money = 1000; decltype(a)::iterator result = std::unique(a.beg...
#include <bits/stdc++.h> using namespace std; int main() { // your code goes here long long n; cin >> n; vector<long long> a; for (int i = 0; i < n; i++) { long long b; cin >> b; a.push_back(b); } long long num = 0; long long money = 1000; decltype(a)::iterator result = std::unique(a.beg...
insert
21
21
21
26
0
p02603
C++
Time Limit Exceeded
// TO KAISE HAI AAP LOG!! // #include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define lb lower_bound #define ub upper_bound #define bs binary_search #define F first #define S second #define all(v) v.begin(), v.end() ll mod = 1e9 + 7; /*/----------------------------- Code begin...
// TO KAISE HAI AAP LOG!! // #include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define lb lower_bound #define ub upper_bound #define bs binary_search #define F first #define S second #define all(v) v.begin(), v.end() ll mod = 1e9 + 7; /*/----------------------------- Code begin...
replace
46
53
46
49
TLE
p02603
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define ll long long #define FAST \ { \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); ...
#include <bits/stdc++.h> #define ll long long #define FAST \ { \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); ...
replace
43
45
43
45
TLE
p02603
C++
Runtime Error
/*input 7 100 130 130 130 115 115 150 */ // #include<bits/stdc++.h> #include <algorithm> #include <bitset> #include <complex> #include <deque> #include <exception> #include <fstream> #include <functional> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <iterator> #in...
/*input 7 100 130 130 130 115 115 150 */ // #include<bits/stdc++.h> #include <algorithm> #include <bitset> #include <complex> #include <deque> #include <exception> #include <fstream> #include <functional> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <iterator> #in...
insert
112
112
112
113
-11
p02603
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #if __has_include(<boost/multiprecision/cpp_int.hpp>) #include <boost/multiprecision/cpp_int.hpp> #include <boost/multiprecision/cpp_dec_float.hpp> using bll = boost::multiprecision::cpp_int; using bdouble = boost::multiprecision::number<boost::multiprecision::cpp_dec_f...
#include <bits/stdc++.h> using namespace std; #if __has_include(<boost/multiprecision/cpp_int.hpp>) #include <boost/multiprecision/cpp_int.hpp> #include <boost/multiprecision/cpp_dec_float.hpp> using bll = boost::multiprecision::cpp_int; using bdouble = boost::multiprecision::number<boost::multiprecision::cpp_dec_f...
replace
343
379
343
351
0
p02603
C++
Time Limit Exceeded
// g++ .cpp && ./a.out #include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; typedef pair<int, int> p; typedef long long ll; const int mod = 1000000007; const int inf = 1000000007; int main() { int n; cin >> n; vector<ll> a(n); rep(i, n) cin >> a[i]; ll ans = 0; ll...
// g++ .cpp && ./a.out #include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; typedef pair<int, int> p; typedef long long ll; const int mod = 1000000007; const int inf = 1000000007; int main() { int n; cin >> n; vector<ll> a(n); rep(i, n) cin >> a[i]; ll ans = 0; ll...
replace
20
25
20
22
TLE
p02603
C++
Time Limit Exceeded
#include <iostream> using namespace std; int a[86]; int main() { int N; cin >> N; for (int i = 0; i < N; i++) { cin >> a[i]; } long long int sum = 1000, stk = 0; for (int i = 0; i < N; i++) { if (a[i] < a[i + 1]) { while (sum > 0) { if (sum - a[i] >= 0) { sum -= a[i]; ...
#include <iostream> using namespace std; int a[86]; int main() { int N; cin >> N; for (int i = 0; i < N; i++) { cin >> a[i]; } long long int sum = 1000, stk = 0; for (int i = 0; i < N; i++) { if (a[i] < a[i + 1]) { stk += sum / a[i]; sum = sum - (sum / a[i] * a[i]); } else { su...
replace
12
20
12
14
TLE
p02603
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { int n, i, j, k; cin >> n; vector<int> a(n, 0); j = 0; for (i = 0; i < n; i++) { cin >> a.at(j); if (j == 0 || a.at(j) != a.at(j - 1)) { j++; } } n = j; /*for(i=0;i<n;i++){ cout << a.at(i) << endl; }*...
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { int n, i, j, k; cin >> n; vector<int> a(n, 0); j = 0; for (i = 0; i < n; i++) { cin >> a.at(j); if (j == 0 || a.at(j) != a.at(j - 1)) { j++; } } n = j; if (n == 1) { cout << 1000 << endl; return 0;...
insert
16
16
16
20
0
p02603
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long LL; const int N = 100; int a[N]; int main() { LL n, num = 1000, num1 = 0; scanf("%d", &n); for (int i = 0; i < n; i++) scanf("%d", a + i); a[n] = 0; for (int i = 0; i < n; i++) { if (a[i] < a[i + 1]) num1 += num / a[i], num %= a[i];...
#include <bits/stdc++.h> using namespace std; typedef long long LL; const int N = 100; int a[N]; int main() { LL n = 0, num = 1000, num1 = 0; scanf("%d", &n); for (int i = 0; i < n; i++) scanf("%d", a + i); a[n] = 0; for (int i = 0; i < n; i++) { if (a[i] < a[i + 1]) num1 += num / a[i], num %= a...
replace
6
7
6
7
TLE
p02603
C++
Time Limit Exceeded
#include <cassert> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <iostream> #include <deque> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <unordered_map> #include <unordered_set> #include <vector> #inc...
#include <cassert> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <iostream> #include <deque> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <unordered_map> #include <unordered_set> #include <vector> #inc...
replace
257
277
257
264
TLE
p02604
C++
Time Limit Exceeded
#define _USE_MATH_DEFINES #include <bits/stdc++.h> using namespace std; #define $(x) (int)((x).size()) #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define endl '\n' #define x first #define y second #define int long long #define double long double #define pii pair<int, int> #define pb...
#define _USE_MATH_DEFINES #include <bits/stdc++.h> using namespace std; #define $(x) (int)((x).size()) #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define endl '\n' #define x first #define y second #define int long long #define double long double #define pii pair<int, int> #define pb...
insert
84
84
84
86
TLE
p02604
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (long long i = 0; i < n; i++) #define Rep(i, m, n) for (long long i = m; i < n; i++) #define REP(i, m, n, p) for (long long i = m; i < n; i += p) #define all(v) v.begin(), v.end() #define pq priority_queue #define bcnt(n) __builtin_popcountll(n) const...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (long long i = 0; i < n; i++) #define Rep(i, m, n) for (long long i = m; i < n; i++) #define REP(i, m, n, p) for (long long i = m; i < n; i += p) #define all(v) v.begin(), v.end() #define pq priority_queue #define bcnt(n) __builtin_popcountll(n) const...
replace
877
878
877
878
-6
free(): invalid pointer
p02604
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; using ll = long long; using P = pair<int, int>; const ll INF = 1LL << 62; int main() { ll n; cin >> n; vector<ll> x(n), y(n), p(n); rep(i, n) cin >> x[i] >> y[i] >> p[i]; vector<vector<ll>> xsel(1 << n, vecto...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; using ll = long long; using P = pair<int, int>; const ll INF = 1LL << 62; int main() { ll n; cin >> n; vector<ll> x(n), y(n), p(n); rep(i, n) cin >> x[i] >> y[i] >> p[i]; vector<vector<ll>> xsel(1 << n, vecto...
replace
30
47
30
42
TLE
p02604
C++
Time Limit Exceeded
// #include <cstdio> #include <algorithm> #include <iostream> #include <map> #include <set> #include <string> #include <vector> // #include <queue> // #include <stack> #include <cassert> #include <cstring> #include <cstdlib> using namespace std; #ifdef LOCAL_DEBUG #include <local_debug.h> #define DEBUG(...) DBG2::pr...
// #include <cstdio> #include <algorithm> #include <iostream> #include <map> #include <set> #include <string> #include <vector> // #include <queue> // #include <stack> #include <cassert> #include <cstring> #include <cstdlib> using namespace std; #ifdef LOCAL_DEBUG #include <local_debug.h> #define DEBUG(...) DBG2::pr...
replace
100
102
100
102
TLE
p02604
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define F first #define S second #define R cin >> #define ll long long #define ln cout << '\n' #define in(a) insert(a) #define pb(a) push_back(a) #define pd(a) printf("%.10f\n", a) #define mem(a) memset(a, 0, sizeof(a)) #define all(c) (c).begin(), (c).end() #define iter(c) ...
#include <bits/stdc++.h> using namespace std; #define F first #define S second #define R cin >> #define ll long long #define ln cout << '\n' #define in(a) insert(a) #define pb(a) push_back(a) #define pd(a) printf("%.10f\n", a) #define mem(a) memset(a, 0, sizeof(a)) #define all(c) (c).begin(), (c).end() #define iter(c) ...
replace
58
59
58
59
TLE
p02604
C++
Time Limit Exceeded
#include <algorithm> #include <cassert> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <vector> #define syosu(x) fixed << setprecision(x) using namespace std; typedef long long ll; typedef unsigned int uint; typedef unsigned long long u...
#include <algorithm> #include <cassert> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <vector> #define syosu(x) fixed << setprecision(x) using namespace std; typedef long long ll; typedef unsigned int uint; typedef unsigned long long u...
replace
71
72
71
72
TLE
p02604
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; #define REP(i, n) for (ll i = 0; i < (n); ++i) #define RREP(i, n) for (ll i = (n)-1; i >= 0; --i) #define ALL(v) (v).begin(), (v).end() template <class T> using reverse_priority_queue = priority_queue<T, vector<T>, great...
#include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; #define REP(i, n) for (ll i = 0; i < (n); ++i) #define RREP(i, n) for (ll i = (n)-1; i >= 0; --i) #define ALL(v) (v).begin(), (v).end() template <class T> using reverse_priority_queue = priority_queue<T, vector<T>, great...
replace
16
17
16
17
TLE
p02604
C++
Runtime Error
#include <bits/stdc++.h> #define M_PI 3.14159265358979323846 // pi using namespace std; typedef long long ll; typedef unsigned long long ull; typedef vector<ll> VI; typedef pair<ll, ll> P; typedef tuple<ll, ll, ll> t3; typedef tuple<ll, ll, ll, ll> t4; typedef tuple<ll, ll, ll, ll, ll> t5; #define rep(a, n) for (ll ...
#include <bits/stdc++.h> #define M_PI 3.14159265358979323846 // pi using namespace std; typedef long long ll; typedef unsigned long long ull; typedef vector<ll> VI; typedef pair<ll, ll> P; typedef tuple<ll, ll, ll> t3; typedef tuple<ll, ll, ll, ll> t4; typedef tuple<ll, ll, ll, ll, ll> t5; #define rep(a, n) for (ll ...
replace
103
105
103
105
-11
p02604
Python
Time Limit Exceeded
# 解説と 提出 #15122924 を参考に作成. # 遅い. PyPyで出すと通る. はず. # import sys # sys.setrecursionlimit(10 ** 6) # import bisect # from collections import deque # from decorator import stop_watch # # # @stop_watch def solve(N, X, Y, P): inf = 10**18 cnb_N = 2**N # 前計算 # # 集落の部分集合毎の、Y軸X軸へのそれぞれの最短経路 to_x = [[0] * N f...
# 解説と 提出 #15122924 を参考に作成. # 遅い. PyPyで出すと通る. はず. # import sys # sys.setrecursionlimit(10 ** 6) # import bisect # from collections import deque # from decorator import stop_watch # # # @stop_watch def solve(N, X, Y, P): inf = 10**18 cnb_N = 2**N # 前計算 # # 集落の部分集合毎の、Y軸X軸へのそれぞれの最短経路 to_x = [[0] * N f...
replace
40
42
40
42
TLE
p02604
C++
Time Limit Exceeded
#pragma G++ optimize(O2) #pragma G++ optimize(O3) #include <bits/stdc++.h> using namespace std; typedef long long LL; const int N = 16; LL res[N]; struct node { int x, y, p; } a[N]; int vis[N]; int dis[N]; void solve() { int n; scanf("%d", &n); for (int i = 1; i <= n; i++) { scanf("%d%d%d", &a[i].x, &a[i]...
#pragma G++ optimize(O2) #pragma G++ optimize(O3) #pragma GCC optimize(2) #pragma GCC optimize(3) #include <bits/stdc++.h> using namespace std; typedef long long LL; const int N = 16; LL res[N]; struct node { int x, y, p; } a[N]; int vis[N]; int dis[N]; void solve() { int n; scanf("%d", &n); for (int i = 1; i...
insert
2
2
2
4
TLE
p02604
C++
Time Limit Exceeded
#include <bits/stdc++.h> #pragma GCC optimize(2) // 手动O2开关 using namespace std; const int maxn = 30; typedef long long ll; int x[maxn], y[maxn], r[maxn], d[maxn], dd[maxn], cun[maxn]; ll ans[maxn]; int cnt; int main() { int n; scanf("%d", &n); for (int i = 1; i <= n; i++) { scanf("%d%d%d", &x[i], &y[i], &r[...
#include <bits/stdc++.h> #pragma GCC optimize(2) // 手动O2开关 using namespace std; const int maxn = 17; typedef long long ll; int x[maxn], y[maxn], r[maxn], d[maxn], dd[maxn], cun[maxn]; ll ans[maxn]; int cnt; int main() { int n; scanf("%d", &n); for (int i = 1; i <= n; i++) { scanf("%d%d%d", &x[i], &y[i], &r[...
replace
3
4
3
4
TLE
p02604
C++
Runtime Error
#define taskname "test" #include <bits/stdc++.h> using namespace std; #define sz(x) (int)x.size() #define fi first #define se second typedef long long lli; typedef pair<int, int> pii; const int maxn = 15; const lli inf = 1e18 + 7; int n; int x[maxn], y[maxn], p[maxn]; lli dp[maxn][(1 << maxn) + 5]; lli pre[maxn...
#define taskname "test" #include <bits/stdc++.h> using namespace std; #define sz(x) (int)x.size() #define fi first #define se second typedef long long lli; typedef pair<int, int> pii; const int maxn = 16; const lli inf = 1e18 + 7; int n; int x[maxn], y[maxn], p[maxn]; lli dp[maxn][(1 << maxn) + 5]; lli pre[maxn...
replace
13
14
13
14
0
p02604
C++
Time Limit Exceeded
#include <stdio.h> short x[16], y[16]; int p[16]; long long ans[16]; short mi[16], m1[16]; short px[16][16], py[16][16]; int ppk, st; short cnt, now; int main(void) { char n; scanf("%hd", &n); for (char i = 0; i < n; i++) scanf("%hd%hd%d", &x[i], &y[i], &p[i]); int ma = 1; for (char i = 0; i <= n; ++i) ...
#include <stdio.h> #pragma GCC optimize(2) short x[16], y[16]; int p[16]; long long ans[16]; short mi[16], m1[16]; short px[16][16], py[16][16]; int ppk, st; short cnt, now; int main(void) { char n; scanf("%hd", &n); for (char i = 0; i < n; i++) scanf("%hd%hd%d", &x[i], &y[i], &p[i]); int ma = 1; for (ch...
insert
1
1
1
2
TLE
p02604
C++
Time Limit Exceeded
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> #define PI 3.14159265359 using namespace std; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define bit(n, k) (((ll)n >> (ll)k) & 1) /*nのk bit目*/ #define pb push_back #define eb emplace_back #define SZ(x) ((ll)(x).size()) #define all(x) (x).begin(), (x).end() #defin...
// #define _GLIBCXX_DEBUG #include <bits/stdc++.h> #define PI 3.14159265359 using namespace std; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define bit(n, k) (((ll)n >> (ll)k) & 1) /*nのk bit目*/ #define pb push_back #define eb emplace_back #define SZ(x) ((ll)(x).size()) #define all(x) (x).begin(), (x).end() #de...
replace
0
1
0
1
TLE
p02604
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define chmax(a, b) a = max(a, b); #define chmin(a, b) a = min(a, b); #define all(x) x.begin(), x.end() using namespace std; using ll = long long; using P = pair<int, int>; using vi = vector<int>; using vvi = vector<vi>; int n, x[15], y[15], p[15...
#pragma GCC target("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define chmax(a, b) a = max(a, b); #define chmin(a, b) a = min(a, b); #define all(x) x.begin(), x.end() using namespace std; using ll = long long; using P ...
insert
0
0
0
4
TLE
p02605
C++
Runtime Error
#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 X[100000]; int Y[100000]; char U[100000]; ...
#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 X[200000]; int Y[200000]; char U[200000]; ...
replace
15
18
15
18
-11
p02605
C++
Runtime Error
#include <algorithm> #include <complex> #include <cstdint> #include <functional> #include <iomanip> #include <iostream> #include <iterator> #include <limits> #include <list> #include <map> #include <math.h> #include <queue> #include <regex> #include <set> #include <stack> #include <stdio.h> #include <string> #include <...
#include <algorithm> #include <complex> #include <cstdint> #include <functional> #include <iomanip> #include <iostream> #include <iterator> #include <limits> #include <list> #include <map> #include <math.h> #include <queue> #include <regex> #include <set> #include <stack> #include <stdio.h> #include <string> #include <...
replace
154
155
154
155
-6
terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc
p02605
C++
Runtime Error
#include <algorithm> #include <array> #include <bitset> #include <cmath> #include <complex> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <unordered_set...
#include <algorithm> #include <array> #include <bitset> #include <cmath> #include <complex> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <unordered_set...
delete
434
436
434
434
0
p02605
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define NDEBUG #include <cassert> typedef long long ll; typedef long double Double; typedef unsigned long long ull; typedef pair<int, int> ii; typedef pair<ll, ll> llll; typedef pair<double, double> dd; typedef vector<int> vi; typedef vector<vector<int>> vvi; typedef vec...
#include <bits/stdc++.h> using namespace std; #define NDEBUG #include <cassert> typedef long long ll; typedef long double Double; typedef unsigned long long ull; typedef pair<int, int> ii; typedef pair<ll, ll> llll; typedef pair<double, double> dd; typedef vector<int> vi; typedef vector<vector<int>> vvi; typedef vec...
replace
240
241
240
241
0
p02605
C++
Runtime Error
#include <bits/stdc++.h> #define endl "\n" using namespace std; typedef long long ll; typedef vector<ll> vl; typedef pair<ll, ll> PP; #define rep(i, n) for (ll i = 0; i < ll(n); i++) #define rrep(i, n) for (ll i = n - 1; i > -1; i--) #define all(v) v.begin(), v.end() #define pb push_back #define fi first #define se sec...
#include <bits/stdc++.h> #define endl "\n" using namespace std; typedef long long ll; typedef vector<ll> vl; typedef pair<ll, ll> PP; #define rep(i, n) for (ll i = 0; i < ll(n); i++) #define rrep(i, n) for (ll i = n - 1; i > -1; i--) #define all(v) v.begin(), v.end() #define pb push_back #define fi first #define se sec...
replace
67
70
67
70
0
p02605
C++
Runtime Error
#define _USE_MATH_DEFINES #include <bits/stdc++.h> using namespace std; int n; vector<vector<long long>> points; void rotate() { for (auto &p : points) { int nx = p[1]; int ny = 202020 - p[0]; p[0] = nx; p[1] = ny; p[2]++; p[2] %= 4; } } signed main() { ios::sync_with_stdio(false); cin.t...
#define _USE_MATH_DEFINES #include <bits/stdc++.h> using namespace std; int n; vector<vector<long long>> points; void rotate() { for (auto &p : points) { int nx = p[1]; int ny = 200005 - p[0]; p[0] = nx; p[1] = ny; p[2]++; p[2] %= 4; } } signed main() { ios::sync_with_stdio(false); cin.t...
replace
8
9
8
9
0
p02605
C++
Time Limit Exceeded
#include <algorithm> #include <bitset> #include <cmath> #include <complex> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string.h> #include <string> #include <vector> #define SPBR(w, n) std::cout << (w + 1 == n ...
#include <algorithm> #include <bitset> #include <cmath> #include <complex> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string.h> #include <string> #include <vector> #define SPBR(w, n) std::cout << (w + 1 == n ...
replace
98
99
98
99
TLE
p02605
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using i64 = long long; using u64 = unsigned long long; #define REP(i, n) for (int i = 0; (i64)(i) < (i64)(n); ++i) #ifdef ENABLE_DEBUG template <typename T> void debug(T value) { cerr << value; } template <typename T, typename... Ts> void debug(T value, Ts... args) { cer...
#include <bits/stdc++.h> using namespace std; using i64 = long long; using u64 = unsigned long long; #define REP(i, n) for (int i = 0; (i64)(i) < (i64)(n); ++i) #ifdef ENABLE_DEBUG template <typename T> void debug(T value) { cerr << value; } template <typename T, typename... Ts> void debug(T value, Ts... args) { cer...
replace
76
77
76
77
0
p02605
C++
Time Limit Exceeded
// #pragma GCC // target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,avx512f") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <complex> #include <f...
// #pragma GCC // target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,avx512f") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <complex> #include <f...
replace
304
306
304
306
TLE
p02605
C++
Runtime Error
#include <algorithm> #include <cassert> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <vector> #define syosu(x) fixed << setprecision(x) using namespace std; typedef long long ll; typedef unsigned int uint; typedef unsigned long long u...
#include <algorithm> #include <cassert> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <vector> #define syosu(x) fixed << setprecision(x) using namespace std; typedef long long ll; typedef unsigned int uint; typedef unsigned long long u...
replace
109
110
109
110
0
p02605
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using LL = long long int; #define incID(i, l, r) for (int i = (l); i < (r); ++i) #define decID(i, l, r) for (int i = (r)-1; i >= (l); --i) #define incII(i, l, r) for (int i = (l); i <= (r); ++i) #define decII(i, l, r) for (int i = (r); i >= (l); --i) #define inc(i, n) incID...
#include <bits/stdc++.h> using namespace std; using LL = long long int; #define incID(i, l, r) for (int i = (l); i < (r); ++i) #define decID(i, l, r) for (int i = (r)-1; i >= (l); --i) #define incII(i, l, r) for (int i = (l); i <= (r); ++i) #define decII(i, l, r) for (int i = (r); i >= (l); --i) #define inc(i, n) incID...
replace
101
102
101
102
0
p02606
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define ll long long #define lvector vector<ll> #define P pair<ll, ll> #define ALL(a) a.begin(), a.end() #define YESNO(i) puts((i) ? "YES" : "NO"); #define YesNo(i) puts((i) ? "Yes" : "No"); #define yesno(i) puts((i) ? "yes" : "no"); #define rep(i, n) for (ll i = 0; i < n; ...
#include <bits/stdc++.h> using namespace std; #define ll long long #define lvector vector<ll> #define P pair<ll, ll> #define ALL(a) a.begin(), a.end() #define YESNO(i) puts((i) ? "YES" : "NO"); #define YesNo(i) puts((i) ? "Yes" : "No"); #define yesno(i) puts((i) ? "yes" : "no"); #define rep(i, n) for (ll i = 0; i < n; ...
insert
16
16
16
17
0
p02606
C++
Time Limit Exceeded
#include <iostream> using namespace std; int main() { // your code goes here int l, r, d; cin >> l >> r >> d; int cnt = 0; while (l <= r) { if (l % d == 0) cnt++; } cout << cnt; return 0; }
#include <iostream> using namespace std; int main() { // your code goes here int l, r, d; cin >> l >> r >> d; int cnt = 0; while (l <= r) { if (l % d == 0) cnt++; l++; } cout << cnt; return 0; }
insert
11
11
11
12
TLE
p02606
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; // #define int long long typedef pair<int, int> ii; typedef tuple<int, int, int> iii; #define ll long long #define iiMPQ priority_queue<ii, vector<ii>, greater<ii>> #define MPQ priority_queue<int, vector<int>, greater<int>> #define PQ priority_queue<int> #define iiPQ priori...
#include <bits/stdc++.h> using namespace std; // #define int long long typedef pair<int, int> ii; typedef tuple<int, int, int> iii; #define ll long long #define iiMPQ priority_queue<ii, vector<ii>, greater<ii>> #define MPQ priority_queue<int, vector<int>, greater<int>> #define PQ priority_queue<int> #define iiPQ priori...
insert
45
45
45
46
TLE
p02606
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int l, r, d; cin >> l, r, d; cout << r / d - l / d << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int l, r, d; cin >> l >> r >> d; cout << r / d - (l - 1) / d << endl; }
replace
4
6
4
6
0
p02606
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define IO \ ios::sync_with_stdio(false); \ cin.tie(0); \ cout.tie(0); typedef long lo...
#include <bits/stdc++.h> using namespace std; #define IO \ ios::sync_with_stdio(false); \ cin.tie(0); \ cout.tie(0); typedef long lo...
replace
10
11
10
11
TLE
p02606
C++
Runtime Error
// #include <tourist> #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> p; const ll INF = 1e9; const ll LINF = ll(1e18); const ll MOD = 1000000007; const ll dx[4] = {0, 1, 0, -1}, dy[4] = {-1, 0, 1, 0}; const ll Dx[8] = {0, 1, 1, 1, 0, -1, -1, -1}, Dy[8] = {-1, -1, 0, 1, ...
// #include <tourist> #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> p; const ll INF = 1e9; const ll LINF = ll(1e18); const ll MOD = 1000000007; const ll dx[4] = {0, 1, 0, -1}, dy[4] = {-1, 0, 1, 0}; const ll Dx[8] = {0, 1, 1, 1, 0, -1, -1, -1}, Dy[8] = {-1, -1, 0, 1, ...
insert
46
46
46
47
0
p02606
C++
Runtime Error
#include <bits/stdc++.h> #define ll long long using namespace std; int main() { ll l, r, d, cnt = 0; cin >> l >> r; for (ll i = l; i <= r; i++) { if (i % d == 0) cnt++; } cout << cnt << endl; return 0; }
#include <bits/stdc++.h> #define ll long long using namespace std; int main() { ll l, r, d, cnt = 0; cin >> l >> r >> d; for (ll i = l; i <= r; i++) { if (i % d == 0) cnt++; } cout << cnt << endl; return 0; }
replace
5
6
5
6
0
p02606
C++
Runtime Error
#include <bits/stdc++.h> #define ll long long using namespace std; int main() { ll l, r, d, cnt = 0; cin >> l >> r; if (l % d == 0 || r % d == 0) cnt++; cnt += ((r - l) / d); cout << cnt << endl; return 0; }
#include <bits/stdc++.h> #define ll long long using namespace std; int main() { ll l, r, d, cnt = 0; cin >> l >> r >> d; if (l % d == 0 || r % d == 0) cnt++; cnt += ((r - l) / d); cout << cnt << endl; return 0; }
replace
5
6
5
6
0
p02606
C++
Runtime Error
#include <cstdint> #include <iostream> #include <string> int main(int argc, char *argv[]) { const int32_t L = std::atoi(argv[1]); const int32_t R = std::atoi(argv[2]); const int32_t d = std::atoi(argv[3]); std::cout << (R - L) / d << std::endl; return 0; }
#include <cstdint> #include <iostream> #include <string> int main(int argc, char *argv[]) { int32_t L, R, d; std::cin >> L; std::cin >> R; std::cin >> d; int cnt = 0; for (int i = L; i <= R; ++i) { cnt += (i % d == 0) ? 1 : 0; } std::cout << cnt << std::endl; return 0; }
replace
6
10
6
16
-11
p02606
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define rep(i, N) for (int i = 0; i < N; i++) typedef long long ll; #define dump(x) cerr << #x << "=" << x << endl using P = pair<int, int>; int main() { int l, r, d; cin >> l >> r, d; int cnt = 0; for (int i = l; i <= r; i++) { if (i % d == 0) cnt++; }...
#include <bits/stdc++.h> using namespace std; #define rep(i, N) for (int i = 0; i < N; i++) typedef long long ll; #define dump(x) cerr << #x << "=" << x << endl using P = pair<int, int>; int main() { int l, r, d; cin >> l >> r >> d; int cnt = 0; for (int i = l; i <= r; i++) { if (i % d == 0) cnt++; ...
replace
9
10
9
10
0
p02606
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { long long l, r, d; l--; long long ans = 0; ans += r / d; ans -= l / d; cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; int main() { long long l, r, d; cin >> l >> r >> d; l--; long long ans = 0; ans += r / d; ans -= l / d; cout << ans << endl; }
insert
6
6
6
7
0
p02606
C++
Time Limit Exceeded
#include <bits/stdc++.h> // #include <boost/functional/hash.hpp> using namespace std; typedef long long ll; // typedef int long long int; typedef unsigned long long ull; typedef map<int, int> mii; typedef map<ll, ll> mll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef vector<int> vi; typedef vector<ll> v...
#include <bits/stdc++.h> // #include <boost/functional/hash.hpp> using namespace std; typedef long long ll; // typedef int long long int; typedef unsigned long long ull; typedef map<int, int> mii; typedef map<ll, ll> mll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef vector<int> vi; typedef vector<ll> v...
insert
106
106
106
107
TLE
p02606
C++
Runtime Error
#include <iostream> using namespace std; int main() { int x, y, z; cin >> x >> y; int cntr = 0; for (int i = x; i <= y; i++) { if (i % z == 0) cntr++; } cout << cntr; }
#include <iostream> using namespace std; int main() { int x, y, z; cin >> x >> y >> z; int cntr = 0; for (int i = x; i <= y; i++) { if (i % z == 0) cntr++; } cout << cntr; }
replace
6
7
6
7
0
p02606
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int L, R, d; int ans = 0; for (int i = L; i <= R; i++) { if (i % d == 0) ans++; } cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int L, R, d; cin >> L >> R >> d; int ans = 0; for (int i = L; i <= R; i++) { if (i % d == 0) ans++; } cout << ans << endl; }
insert
4
4
4
5
0
p02606
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int l, r, d; int sum = 0; for (int i = l; i <= r; i++) { if (i % d == 0) { sum++; } } cout << sum << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int l, r, d; cin >> l >> r >> d; int sum = 0; for (int i = l; i <= r; i++) { if (i % d == 0) { sum++; } } cout << sum << endl; return 0; }
insert
4
4
4
5
0
p02606
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define loop(i, x, z) for (int i = x; i < z; i++) int cnt = 0, l, r, d; int main() { cin >> l >> r; loop(i, l, r + 1) { if (i % d == 0) cnt++; } cout << cnt; }
#include <bits/stdc++.h> using namespace std; #define loop(i, x, z) for (int i = x; i < z; i++) int cnt = 0, l, r, d; int main() { cin >> l >> r >> d; loop(i, l, r + 1) { if (i % d == 0) cnt++; } cout << cnt; }
replace
5
6
5
6
-8
p02606
C++
Runtime Error
#include <algorithm> #include <cmath> #include <cstring> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; typedef long long ll; #define fi first #define se second #define mp make_pair #define r...
#include <algorithm> #include <cmath> #include <cstring> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; typedef long long ll; #define fi first #define se second #define mp make_pair #define r...
insert
27
27
27
28
0
p02606
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) #define repi(i, a, b) for (int i = (a); i <= (b); i++) #define repA(i, n) for (int i = n; i >= 0; i--) #define all(x) x.begin(), x.end() #define pb push_back #define mp make_pair #define ff first #define ss second #define sz(...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) #define repi(i, a, b) for (int i = (a); i <= (b); i++) #define repA(i, n) for (int i = n; i >= 0; i--) #define all(x) x.begin(), x.end() #define pb push_back #define mp make_pair #define ff first #define ss second #define sz(...
replace
38
39
38
39
0
p02606
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int l, r, d; cin >> l >> r >> d; int ans = 0; for (int i = l; i <= r; i = i++) { if (i % d == 0) ans++; } cout << ans; }
#include <bits/stdc++.h> using namespace std; int main() { int l, r, d; cin >> l >> r >> d; cout << r / d - (l - 1) / d; }
replace
6
12
6
7
TLE
p02606
C++
Runtime Error
#include <iostream> using namespace std; int main() { int L, R, d; int ans = 0; for (int i = L; i <= R; ++i) if (i % d == 0) ans++; cout << ans << "\n"; }
#include <iostream> using namespace std; int main() { int L, R, d; cin >> L >> R >> d; int ans = 0; for (int i = L; i <= R; ++i) if (i % d == 0) ans++; cout << ans << "\n"; }
insert
4
4
4
5
TLE
p02606
C++
Runtime Error
#include <iostream> #include <vector> using namespace std; int main() { int l, r, d; int ans = 0; for (int i = l; i <= r; i++) { if (i % d == 0) ans++; } cout << ans; }
#include <iostream> #include <vector> using namespace std; int main() { int l, r, d; int ans = 0; cin >> l >> r >> d; for (int i = l; i <= r; i++) { if (i % d == 0) ans++; } cout << ans; }
insert
8
8
8
9
0
p02606
C++
Runtime Error
#include <iostream> using namespace std; int main() { int L, R, d; cout << R / d - (L - 1) / d; return 0; }
#include <iostream> using namespace std; int main() { int L, R, d; cin >> L >> R >> d; cout << R / d - (L - 1) / d; return 0; }
insert
6
6
6
7
0
p02606
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int l, r, d; cin >> l >> r >> d; int ans = 0; for (int i = l; l <= r; ++i) { if (i % d == 0) ans++; } cout << ans << '\n'; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int l, r, d; cin >> l >> r >> d; int ans = 0; for (int i = l; i <= r; ++i) { if (i % d == 0) ans++; } cout << ans << '\n'; return 0; }
replace
8
9
8
9
TLE