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
p02782
C++
Runtime Error
#include <bits/stdc++.h> #define pb push_back #define int long long #define It set<node>::iterator #define endl '\n' #define fastio \ ios::sync_with_stdio(false); \ cin.tie(NULL); ...
#include <bits/stdc++.h> #define pb push_back #define int long long #define It set<node>::iterator #define endl '\n' #define fastio \ ios::sync_with_stdio(false); \ cin.tie(NULL); ...
replace
13
14
13
14
0
p02782
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) ll ans = 0; const ll mo = 1000000007; auto mod = [](ll modx) { modx %= mo; modx += mo; modx %= mo; return modx; }; const ll MAX = 1000100; const ll MOD = 1000000007; long long fac[MAX], finv[MA...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) ll ans = 0; const ll mo = 1000000007; auto mod = [](ll modx) { modx %= mo; modx += mo; modx %= mo; return modx; }; const ll MAX = 2000100; const ll MOD = 1000000007; long long fac[MAX], finv[MA...
replace
12
13
12
13
0
p02782
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <limits.h> #include <list> #include <map> #include <numeric> #inclu...
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <limits.h> #include <list> #include <map> #include <numeric> #inclu...
replace
83
84
83
84
0
p02782
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; using P = pair<ll, ll>; using Graph = vector<vector<ll>>; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define rep2(i, m, n) for (ll i = m; i < (ll)(n); i++) #define rrep(i, n, m) for (ll i = n; i >= (ll)(m); i--) const int dx[4] = {1, 0, -1, 0...
#include <bits/stdc++.h> using namespace std; using ll = long long; using P = pair<ll, ll>; using Graph = vector<vector<ll>>; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define rep2(i, m, n) for (ll i = m; i < (ll)(n); i++) #define rrep(i, n, m) for (ll i = n; i >= (ll)(m); i--) const int dx[4] = {1, 0, -1, 0...
replace
26
27
26
27
0
p02782
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; using P = pair<ll, ll>; using Graph = vector<vector<ll>>; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define rep2(i, m, n) for (ll i = m; i < (ll)(n); i++) #define rrep(i, n, m) for (ll i = n; i >= (ll)(m); i--) const int dx[4] = {1, 0, -1, 0...
#include <bits/stdc++.h> using namespace std; using ll = long long; using P = pair<ll, ll>; using Graph = vector<vector<ll>>; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define rep2(i, m, n) for (ll i = m; i < (ll)(n); i++) #define rrep(i, n, m) for (ll i = n; i >= (ll)(m); i--) const int dx[4] = {1, 0, -1, 0...
replace
25
26
25
26
0
p02782
C++
Runtime Error
#include <bits/stdc++.h> #define fo(i, a, b) for (int i = (a); i <= (b); ++i) #define rv(i, a, b) for (int i = (a); i >= (b); --i) using namespace std; const int M = 1200000; const int md = 1e9 + 7; typedef long long ll; int n, m, k; int fac[M], inv[M]; void ini() { inv[0] = inv[1] = 1; fac[0] = fac[1] = 1; fo(i,...
#include <bits/stdc++.h> #define fo(i, a, b) for (int i = (a); i <= (b); ++i) #define rv(i, a, b) for (int i = (a); i >= (b); --i) using namespace std; const int M = 2200000; const int md = 1e9 + 7; typedef long long ll; int n, m, k; int fac[M], inv[M]; void ini() { inv[0] = inv[1] = 1; fac[0] = fac[1] = 1; fo(i,...
replace
4
5
4
5
0
p02782
C++
Runtime Error
#ifdef LOCAL #define _GLIBCXX_DEBUG #define __clock__ #else #pragma GCC optimize("Ofast") #endif #include <bits/stdc++.h> using namespace std; using ll = long long; using VI = vector<ll>; using VV = vector<VI>; using VS = vector<string>; using PII = pair<ll, ll>; // tourist set template <typename A, typename B> string...
#ifdef LOCAL #define _GLIBCXX_DEBUG #define __clock__ #else #pragma GCC optimize("Ofast") #endif #include <bits/stdc++.h> using namespace std; using ll = long long; using VI = vector<ll>; using VV = vector<VI>; using VS = vector<string>; using PII = pair<ll, ll>; // tourist set template <typename A, typename B> string...
replace
137
138
137
138
0
p02782
C++
Runtime Error
// in the name of god // if you read this code please search about imam hussain #include <bits/stdc++.h> using namespace std; typedef long long ll; #define pb push_back #define endl "\n" #define X first #define Y second #define pii pair<int, int> #define migmig ...
// in the name of god // if you read this code please search about imam hussain #include <bits/stdc++.h> using namespace std; typedef long long ll; #define pb push_back #define endl "\n" #define X first #define Y second #define pii pair<int, int> #define migmig ...
replace
21
22
21
22
0
p02782
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll MOD = 1000000007; inline ll add(ll x, ll y) { return (x + y) % MOD; } inline ll sub(ll x, ll y) { ll res = x - y; if (res < 0) res += MOD; return res; } const int MAX = 200005; ll fac[MAX], finv[MAX], inv[MAX]; void COMinit() { ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll MOD = 1000000007; inline ll add(ll x, ll y) { return (x + y) % MOD; } inline ll sub(ll x, ll y) { ll res = x - y; if (res < 0) res += MOD; return res; } const int MAX = 2000005; ll fac[MAX], finv[MAX], inv[MAX]; void COMinit() { ...
replace
13
14
13
14
0
p02782
C++
Runtime Error
#include <bits/stdc++.h> #define ll long long #define ld long double #define mp make_pair #define pb push_back #define in insert #define vll vector<ll> #define endl "\n" #define pll pair<ll, ll> #define all(x) (x).begin(), (x).end() #define f first #define s second #define pr(x) cout << x << endl; #define pr2(x, y) cou...
#include <bits/stdc++.h> #define ll long long #define ld long double #define mp make_pair #define pb push_back #define in insert #define vll vector<ll> #define endl "\n" #define pll pair<ll, ll> #define all(x) (x).begin(), (x).end() #define f first #define s second #define pr(x) cout << x << endl; #define pr2(x, y) cou...
replace
28
29
28
29
0
p02782
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 1000000 + 10; const int mod = 1e9 + 7; ll qpow(ll n, ll k) { ll res = 1; while (k) { if (k & 1) res = res * n % mod; n = n * n % mod; k >>= 1; } return res; } ll fac[N], inv[N]; ll C(int n, int k) { return fac[n]...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 2000000 + 10; const int mod = 1e9 + 7; ll qpow(ll n, ll k) { ll res = 1; while (k) { if (k & 1) res = res * n % mod; n = n * n % mod; k >>= 1; } return res; } ll fac[N], inv[N]; ll C(int n, int k) { return fac[n]...
replace
3
4
3
4
0
p02782
C++
Runtime Error
#include <algorithm> #include <bitset> #include <iostream> #include <queue> #include <set> #include <string> #include <unordered_map> #include <utility> #include <vector> using namespace std; using ll = long long; using Pii = pair<int, int>; using Pll = pair<ll, ll>; template <class T> using Vvec = vector<vector<T>>; ...
#include <algorithm> #include <bitset> #include <iostream> #include <queue> #include <set> #include <string> #include <unordered_map> #include <utility> #include <vector> using namespace std; using ll = long long; using Pii = pair<int, int>; using Pll = pair<ll, ll>; template <class T> using Vvec = vector<vector<T>>; ...
replace
248
249
248
249
0
p02782
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cassert> #include <climits> #include <cmath> #include <complex> #include <cstddef> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #inc...
#include <algorithm> #include <bitset> #include <cassert> #include <climits> #include <cmath> #include <complex> #include <cstddef> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #inc...
replace
75
76
75
76
0
p02782
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const int nmax = 1e6 + 5; const int mod = 1e9 + 7; int fact[nmax + 1], invfact[nmax + 1]; int modpow(int x, int y) { int ans = 1; while (y) { if (y & 1) ans = (1LL * ans * x) % mod; x = (1LL * x * x) % mod; y >>= 1; } return ans; } int nCr(int n, i...
#include <bits/stdc++.h> using namespace std; const int nmax = 2e6 + 5; const int mod = 1e9 + 7; int fact[nmax + 1], invfact[nmax + 1]; int modpow(int x, int y) { int ans = 1; while (y) { if (y & 1) ans = (1LL * ans * x) % mod; x = (1LL * x * x) % mod; y >>= 1; } return ans; } int nCr(int n, i...
replace
2
3
2
3
0
p02782
C++
Runtime Error
#include <algorithm> #include <iostream> #include <numeric> #include <string> #include <vector> #define REP(i, a, b) for (int i = int(a); i < int(b); i++) using namespace std; typedef long long int ll; // clang-format off #ifdef _DEBUG_ #define dump(...) do{ cerr << __LINE__ << ":\t" << #__VA_ARGS__ << " = "; PPPPP(_...
#include <algorithm> #include <iostream> #include <numeric> #include <string> #include <vector> #define REP(i, a, b) for (int i = int(a); i < int(b); i++) using namespace std; typedef long long int ll; // clang-format off #ifdef _DEBUG_ #define dump(...) do{ cerr << __LINE__ << ":\t" << #__VA_ARGS__ << " = "; PPPPP(_...
replace
87
88
87
88
0
p02782
C++
Runtime Error
#include "bits/stdc++.h" using namespace std; vector<long long> F, RF, R; long long MOD = 1000000007; void init(long long N) { F.resize(N + 1); RF.resize(N + 1); R.resize(N + 1); F[0] = F[1] = RF[0] = RF[1] = R[0] = R[1] = 1; for (int i = 2; i <= N; i++) { F[i] = (F[i - 1] * i) % MOD; R[i] = MOD - (...
#include "bits/stdc++.h" using namespace std; vector<long long> F, RF, R; long long MOD = 1000000007; void init(long long N) { F.resize(N + 1); RF.resize(N + 1); R.resize(N + 1); F[0] = F[1] = RF[0] = RF[1] = R[0] = R[1] = 1; for (int i = 2; i <= N; i++) { F[i] = (F[i - 1] * i) % MOD; R[i] = MOD - (...
replace
26
27
26
27
0
p02782
C++
Memory Limit Exceeded
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define sz(x) int(x.size()) using namespace std; typedef long long ll; // auto mod int // https://youtu.be/L8grWxBlIZ4?t=9858 // https://youtu.be/ERZuLAxZffQ?t=4807 : optimize // https://youtu.be/8uowVvQ_-Mo?t=1329 : division const int mod = 100...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define sz(x) int(x.size()) using namespace std; typedef long long ll; // auto mod int // https://youtu.be/L8grWxBlIZ4?t=9858 // https://youtu.be/ERZuLAxZffQ?t=4807 : optimize // https://youtu.be/8uowVvQ_-Mo?t=1329 : division const int mod = 100...
replace
77
78
77
78
MLE
p02782
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define sz(x) int(x.size()) using namespace std; typedef long long ll; typedef pair<int, int> P; const ll INF = 1LL << 60; const int mod = 1e9 + 7; struct mint { ll x; // typedef long long ll; mint(ll x = 0) : x((x % mod + mod) % mod) {} ...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define sz(x) int(x.size()) using namespace std; typedef long long ll; typedef pair<int, int> P; const ll INF = 1LL << 60; const int mod = 1e9 + 7; struct mint { ll x; // typedef long long ll; mint(ll x = 0) : x((x % mod + mod) % mod) {} ...
replace
66
67
66
67
0
p02782
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define REP(i, n) FOR(i, 0, (n)) #define FOR(i, a, b) for (int i = (a); i < (b); i++) #define LAR(a, b) ((a) = max((a), (b))) #define SML(a, b) ((a) = min((a), (b))) using ll = long long; using ld = long double; using vi = vector<int>; using vl = vector<ll>; using pii = pai...
#include <bits/stdc++.h> using namespace std; #define REP(i, n) FOR(i, 0, (n)) #define FOR(i, a, b) for (int i = (a); i < (b); i++) #define LAR(a, b) ((a) = max((a), (b))) #define SML(a, b) ((a) = min((a), (b))) using ll = long long; using ld = long double; using vi = vector<int>; using vl = vector<ll>; using pii = pai...
replace
24
25
24
25
0
p02782
C++
Runtime Error
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <vector> #define rep(i, n) for (int i = 0; ...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <vector> #define rep(i, n) for (int i = 0; ...
replace
84
85
84
85
0
p02782
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; namespace { constexpr size_t MOD = 1e9 + 7; constexpr size_t MAX = 1e6 + 2; size_t mod_pow(size_t x, size_t p) { size_t u = x; size_t t = 1; while (p) { if (p & 1) { t = t * u % MOD; } u = u * u % MOD; p >>= 1; } return t; } size_t mod_i...
#include <bits/stdc++.h> using namespace std; namespace { constexpr size_t MOD = 1e9 + 7; constexpr size_t MAX = 2e6 + 2; size_t mod_pow(size_t x, size_t p) { size_t u = x; size_t t = 1; while (p) { if (p & 1) { t = t * u % MOD; } u = u * u % MOD; p >>= 1; } return t; } size_t mod_i...
replace
7
8
7
8
0
p02782
C++
Runtime Error
#pragma GCC target("sse,sse2,sse3,ssse3,sse4") #pragma GCC optimize("Ofast") // #pragma GCC optimize("unroll-loops") #include <list> // hloya template v25 // ░░░░░░░▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄░░░░░░ // ░░░░░░█░░▄▀▀▀▀▀▀▀▀▀▀▀▀▀▄░░█░░░░░ // ░░░░░░█░█░▀░░░░░▀░░▀░░░░█░█░░░░░ // ░░░░░░█░█░░░░░░░░▄▀▀▄░▀░█░█▄▀▀▄░ // █▀▀█▄░█░█░░▀░░░░...
#pragma GCC target("sse,sse2,sse3,ssse3,sse4") #pragma GCC optimize("Ofast") // #pragma GCC optimize("unroll-loops") #include <list> // hloya template v25 // ░░░░░░░▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄░░░░░░ // ░░░░░░█░░▄▀▀▀▀▀▀▀▀▀▀▀▀▀▄░░█░░░░░ // ░░░░░░█░█░▀░░░░░▀░░▀░░░░█░█░░░░░ // ░░░░░░█░█░░░░░░░░▄▀▀▄░▀░█░█▄▀▀▄░ // █▀▀█▄░█░█░░▀░░░░...
replace
107
108
107
108
0
p02782
C++
Runtime Error
#include <bits/stdc++.h> #define REP(i, x, n) for (int i = x; i < (int)(n); i++) #define rep(i, n) REP(i, 0, n) #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define sz(x) (int)(x.size()) #define popcount(x) __builtin_popcount(x) #define popcountll(x) __builtin_popcountll(x) #define un...
#include <bits/stdc++.h> #define REP(i, x, n) for (int i = x; i < (int)(n); i++) #define rep(i, n) REP(i, 0, n) #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define sz(x) (int)(x.size()) #define popcount(x) __builtin_popcount(x) #define popcountll(x) __builtin_popcountll(x) #define un...
replace
26
27
26
27
0
p02782
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = int_fast64_t; using ld = long double; using pll = pair<ll, ll>; constexpr ll INF = 1LL << 60, MOD = 1e9 + 7; // 998244353; void solve(); int main() { cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(10); solve(); } #define SELE...
#include <bits/stdc++.h> using namespace std; using ll = int_fast64_t; using ld = long double; using pll = pair<ll, ll>; constexpr ll INF = 1LL << 60, MOD = 1e9 + 7; // 998244353; void solve(); int main() { cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(10); solve(); } #define SELE...
replace
142
143
142
143
0
p02782
C++
Runtime Error
#include <bits/stdc++.h> #define ll long long #define MAX 1000005 #define P ((ll)1e9 + 7) using namespace std; ll qpow(ll a, ll n) { ll res = 1; while (n) { if (n & 1) res = res * a % P; a = a * a % P; n >>= 1; } return res; } ll fac[MAX], inv[MAX]; void init() { fac[0] = 1; for (int i ...
#include <bits/stdc++.h> #define ll long long #define MAX 4000005 #define P ((ll)1e9 + 7) using namespace std; ll qpow(ll a, ll n) { ll res = 1; while (n) { if (n & 1) res = res * a % P; a = a * a % P; n >>= 1; } return res; } ll fac[MAX], inv[MAX]; void init() { fac[0] = 1; for (int i ...
replace
2
3
2
3
0
p02782
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; using P = pair<ll, ll>; using Graph = vector<vector<ll>>; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define rep2(i, m, n) for (ll i = m; i < (ll)(n); i++) #define rrep(i, n, m) for (ll i = n; i >= (ll)(m); i--) const int dx[4] = {1, 0, -1, 0...
#include <bits/stdc++.h> using namespace std; using ll = long long; using P = pair<ll, ll>; using Graph = vector<vector<ll>>; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define rep2(i, m, n) for (ll i = m; i < (ll)(n); i++) #define rrep(i, n, m) for (ll i = n; i >= (ll)(m); i--) const int dx[4] = {1, 0, -1, 0...
replace
26
27
26
27
0
p02782
C++
Runtime Error
#include "bits/stdc++.h" using namespace std; const int maxn = 1e6 + 5; const int MOD = 1e9 + 7; struct mi { long long v; explicit operator long long() const { return v; } mi() { v = 0; } mi(long long _v) { v = (-MOD < _v && _v < MOD) ? _v : _v % MOD; if (v < 0) { v += MOD; } } friend ...
#include "bits/stdc++.h" using namespace std; const int maxn = 5e6 + 5; const int MOD = 1e9 + 7; struct mi { long long v; explicit operator long long() const { return v; } mi() { v = 0; } mi(long long _v) { v = (-MOD < _v && _v < MOD) ? _v : _v % MOD; if (v < 0) { v += MOD; } } friend ...
replace
4
5
4
5
0
p02782
C++
Runtime Error
// #include <bits/stdc++.h> #include <algorithm> #include <iostream> #include <array> #include <bitset> #include <complex> #include <cstring> #include <deque> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <unordered_set> #include <utility> #include...
// #include <bits/stdc++.h> #include <algorithm> #include <iostream> #include <array> #include <bitset> #include <complex> #include <cstring> #include <deque> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <unordered_set> #include <utility> #include...
replace
155
156
155
156
0
p02782
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> Pii; typedef pair<ll, ll> Pll; #define rep(i, n) for (ll i = 0; i < (n); ++i) #define rep2(i, a, b) for (ll i = (a); i < (b); ++i) #define debug(x) cout << #x << '=' << x << endl #define all(v) (v).begin(), (v).end() const ll MOD...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> Pii; typedef pair<ll, ll> Pll; #define rep(i, n) for (ll i = 0; i < (n); ++i) #define rep2(i, a, b) for (ll i = (a); i < (b); ++i) #define debug(x) cout << #x << '=' << x << endl #define all(v) (v).begin(), (v).end() const ll MOD...
replace
118
119
118
119
0
p02782
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define F first #define S second #define pii pair<int, int> #define eb emplace_back #define all(v) v.begin(), v.end() #define rep(i, n) for (int i = 0; i < (n); ++i) #define rep3(i, l, n) for (int i = l; i < (n); ++i) #define sz(v) (int)v.size() const ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define F first #define S second #define pii pair<int, int> #define eb emplace_back #define all(v) v.begin(), v.end() #define rep(i, n) for (int i = 0; i < (n); ++i) #define rep3(i, l, n) for (int i = l; i < (n); ++i) #define sz(v) (int)v.size() const ...
replace
65
66
65
66
0
p02782
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define name "" #define ini \ freopen(name ".inp", "r", stdin); \ freopen(name ".out", "w", stdout) #define foe(it, c) for (__typeof(c.begin()) it = c.begin();...
#include <bits/stdc++.h> using namespace std; #define name "" #define ini \ freopen(name ".inp", "r", stdin); \ freopen(name ".out", "w", stdout) #define foe(it, c) for (__typeof(c.begin()) it = c.begin();...
replace
23
24
23
24
0
p02782
C++
Runtime Error
#include <bits/stdc++.h> #include <stdlib.h> #include <sys/time.h> #include <unistd.h> using namespace std; typedef long long ll; typedef pair<ll, ll> P; typedef pair<P, ll> T; long long int INF = 2e18; const ll fact_table = 1200008; double Pi = 3.1415926535897932384626; priority_queue<ll> pql; priority_queue<P> pq...
#include <bits/stdc++.h> #include <stdlib.h> #include <sys/time.h> #include <unistd.h> using namespace std; typedef long long ll; typedef pair<ll, ll> P; typedef pair<P, ll> T; long long int INF = 2e18; const ll fact_table = 3200008; double Pi = 3.1415926535897932384626; priority_queue<ll> pql; priority_queue<P> pq...
replace
12
13
12
13
0
p02782
C++
Runtime Error
#include <algorithm> #include <cmath> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <utility> #include <vector> typedef long long ll; typedef long double ld; using namespace std; ll mod = 1000000007; const int SIZE = 1000010; ll fac[SI...
#include <algorithm> #include <cmath> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <utility> #include <vector> typedef long long ll; typedef long double ld; using namespace std; ll mod = 1000000007; const int SIZE = 2000010; ll fac[SI...
replace
16
17
16
17
0
p02782
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (int i = (a); i < (b); i++) #define rrep(i, a, b) for (int i = (a); i >= (b); i--) typedef long long ll; const ll mod = 1000000007; const int MAX = 2100000; ll fac[MAX], finv[MAX], inv[MAX]; void cominit() { fac[0] = fac[1] = 1; finv[0] = finv...
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (int i = (a); i < (b); i++) #define rrep(i, a, b) for (int i = (a); i >= (b); i--) typedef long long ll; const ll mod = 1000000007; const int MAX = 2100000; ll fac[MAX], finv[MAX], inv[MAX]; void cominit() { fac[0] = fac[1] = 1; finv[0] = finv...
replace
34
42
34
39
TLE
p02782
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const int MAX = 1000001; const int MOD = 1000000007; long long fac[MAX], finv[MAX], inv[MAX]; void COMinit() { fac[0] = fac[1] = 1; finv[0] = finv[1] = 1; inv[1] = 1; for (int i = 2; i < MAX; i++) { fac[i] = fac[i - 1] * i % MOD; inv[i] = MOD - inv[MOD % i]...
#include <bits/stdc++.h> using namespace std; const int MAX = 2000003; const int MOD = 1000000007; long long fac[MAX], finv[MAX], inv[MAX]; void COMinit() { fac[0] = fac[1] = 1; finv[0] = finv[1] = 1; inv[1] = 1; for (int i = 2; i < MAX; i++) { fac[i] = fac[i - 1] * i % MOD; inv[i] = MOD - inv[MOD % i]...
replace
2
3
2
3
0
p02782
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, x, y) for (int i = x; i <= y; i++) using namespace std; const int N = 1e6 + 10, mod = 1e9 + 7; typedef long long ll; ll r1, c1, r2, c2, n; ll a1, a2, a3, a4; ll fac[N], inv[N]; ll quick_pow(ll a, ll b) { ll ret = 1; for (; b; b >>= 1) { if (b & 1) ret = ret * a % ...
#include <bits/stdc++.h> #define rep(i, x, y) for (int i = x; i <= y; i++) using namespace std; const int N = 2e6 + 10, mod = 1e9 + 7; typedef long long ll; ll r1, c1, r2, c2, n; ll a1, a2, a3, a4; ll fac[N], inv[N]; ll quick_pow(ll a, ll b) { ll ret = 1; for (; b; b >>= 1) { if (b & 1) ret = ret * a % ...
replace
4
5
4
5
0
p02782
C++
Runtime Error
#include "bits/stdc++.h" using namespace std; const int N = 1e6 + 20, MOD = (int)(1e9) + 7; int f[N], ie[N], n1, m1, n2, m2; int power(int a, int b) { int num = a, ans = 1; for (int i = 0; i < 31; i++) { if (b & (1 << i)) ans = (1ll * ans * num) % MOD; num = (1ll * num * num) % MOD; } return an...
#include "bits/stdc++.h" using namespace std; const int N = 2e6 + 20, MOD = (int)(1e9) + 7; int f[N], ie[N], n1, m1, n2, m2; int power(int a, int b) { int num = a, ans = 1; for (int i = 0; i < 31; i++) { if (b & (1 << i)) ans = (1ll * ans * num) % MOD; num = (1ll * num * num) % MOD; } return an...
replace
3
4
3
4
0
p02782
C++
Runtime Error
#include <bits/stdc++.h> template <long long mod> class Combination { std::vector<long long> fact, finv, inv; public: Combination(int sz) { fact.resize(sz); finv.resize(sz); inv.resize(sz); fact[0] = 1; for (int i = 1; i < sz; ++i) { fact[i] = fact[i - 1] * i % mod; } inv[0] = 0; ...
#include <bits/stdc++.h> template <long long mod> class Combination { std::vector<long long> fact, finv, inv; public: Combination(int sz) { fact.resize(sz); finv.resize(sz); inv.resize(sz); fact[0] = 1; for (int i = 1; i < sz; ++i) { fact[i] = fact[i - 1] * i % mod; } inv[0] = 0; ...
replace
74
75
74
75
0
p02782
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair<ll, ll> P; typedef pair<int, int> Pi; #define rep(i, n) for (ll i = 0; i < n; i++) #define FOR(i, a, b) for (ll i = a; i < b; i++) #define fi first #define se second #define endl "\n" template <typename T> inline b...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair<ll, ll> P; typedef pair<int, int> Pi; #define rep(i, n) for (ll i = 0; i < n; i++) #define FOR(i, a, b) for (ll i = a; i < b; i++) #define fi first #define se second #define endl "\n" template <typename T> inline b...
replace
140
141
140
141
0
p02782
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long LL; typedef pair<int, int> PII; template <class A, class B> ostream &operator<<(ostream &out, const pair<A, B> &p) { return out << "(" << p.first << ", " << p.second << ")"; } template <typename T, size_t N> ostream &operator<<(ostream &out, const array<...
#include <bits/stdc++.h> using namespace std; typedef long long LL; typedef pair<int, int> PII; template <class A, class B> ostream &operator<<(ostream &out, const pair<A, B> &p) { return out << "(" << p.first << ", " << p.second << ")"; } template <typename T, size_t N> ostream &operator<<(ostream &out, const array<...
replace
89
90
89
90
0
p02782
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL_DEBUG #include "LOCAL_DEBUG.hpp" #endif #define int long long struct Combination { const int MOD = 1e9 + 7; vector<int> fact; //  fact[i] = iの階乗 void init(int n) { fact.resize(n + 1); fact[0] = fact[1] = 1; for (int i = 2; i <= n; i++) { ...
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL_DEBUG #include "LOCAL_DEBUG.hpp" #endif #define int long long struct Combination { const int MOD = 1e9 + 7; vector<int> fact; //  fact[i] = iの階乗 void init(int n) { fact.resize(n + 1); fact[0] = fact[1] = 1; for (int i = 2; i <= n; i++) { ...
replace
44
48
44
48
0
p02782
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define FOR(i, l, r) for (long long i = (l); i < (r); ++i) #define REP(i, n) FOR(i, 0, n) #define REPS(i, n) FOR(i, 1, n + 1) #define RFOR(i, l, r) for (long long i = (l); i >= (r); --i) #define RREP(i, n) RFOR(i, n - 1, 0) #define RREPS(i, n) RFOR(i, n, 1) #define int long...
#include <bits/stdc++.h> using namespace std; #define FOR(i, l, r) for (long long i = (l); i < (r); ++i) #define REP(i, n) FOR(i, 0, n) #define REPS(i, n) FOR(i, 1, n + 1) #define RFOR(i, l, r) for (long long i = (l); i >= (r); --i) #define RREP(i, n) RFOR(i, n - 1, 0) #define RREPS(i, n) RFOR(i, n, 1) #define int long...
replace
30
31
30
31
0
p02782
C++
Runtime Error
#include <iostream> using namespace std; const int M = 1000000007; class ModComb { long long *fact, *facti; const int mod; public: explicit ModComb(int n, int m) : mod(m) { fact = new long long[n + 1]; facti = new long long[n + 1]; fact[0] = 1; facti[0] = 1; for (int i = 1; i <= n; i++) ...
#include <iostream> using namespace std; const int M = 1000000007; class ModComb { long long *fact, *facti; const int mod; public: explicit ModComb(int n, int m) : mod(m) { fact = new long long[n + 1]; facti = new long long[n + 1]; fact[0] = 1; facti[0] = 1; for (int i = 1; i <= n; i++) ...
replace
46
47
46
47
0
p02782
C++
Runtime Error
#include <bits/stdc++.h> #define int long long #define f first #define s second using namespace std; const int N = 1000009, mod = 1e9 + 7; int f[N], iv[N]; int pw(int a, int t = mod - 2) { int x = 1; while (t) { if (t & 1) x = x * a % mod; a = a * a % mod, t >>= 1; } return x; } int C(int n, int r...
#include <bits/stdc++.h> #define int long long #define f first #define s second using namespace std; const int N = 3000009, mod = 1e9 + 7; int f[N], iv[N]; int pw(int a, int t = mod - 2) { int x = 1; while (t) { if (t & 1) x = x * a % mod; a = a * a % mod, t >>= 1; } return x; } int C(int n, int r...
replace
5
6
5
6
0
p02782
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cassert> #include <chrono> #include <cmath> #include <complex> #include <cstdint> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <list> #include <map> #include <queue> #include <random> #include <regex> #include...
#include <algorithm> #include <bitset> #include <cassert> #include <chrono> #include <cmath> #include <complex> #include <cstdint> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <list> #include <map> #include <queue> #include <random> #include <regex> #include...
replace
357
358
357
358
0
p02782
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; using vb = vector<bool>; using vvb = vector<vb>; using vd = vector<double>; using vvd = vector<vd>; using vi = vector<int>; using vvi = vector<vi>; using vl = vector<ll>; using vvl = vector<vl>; using pll = pair<ll, ll>; using tll = tuple<ll, ll>; usin...
#include <bits/stdc++.h> using namespace std; using ll = long long; using vb = vector<bool>; using vvb = vector<vb>; using vd = vector<double>; using vvd = vector<vd>; using vi = vector<int>; using vvi = vector<vi>; using vl = vector<ll>; using vvl = vector<vl>; using pll = pair<ll, ll>; using tll = tuple<ll, ll>; usin...
replace
202
203
202
203
0
p02782
C++
Runtime Error
#include "bits/stdc++.h" using namespace std; using ll = long long; #define rep(i, begin, n) for (int i = begin; i < n; i++) #define repe(i, begin, n) for (int i = begin; i <= n; i++) #define repr(i, begin, n) for (int i = begin; i > begin - n; i--) #define repre(i, begin, end) for (int i = begin; i >= end; i--) templ...
#include "bits/stdc++.h" using namespace std; using ll = long long; #define rep(i, begin, n) for (int i = begin; i < n; i++) #define repe(i, begin, n) for (int i = begin; i <= n; i++) #define repr(i, begin, n) for (int i = begin; i > begin - n; i--) #define repre(i, begin, end) for (int i = begin; i >= end; i--) templ...
replace
29
30
29
30
0
p02782
C++
Runtime Error
#include <algorithm> #include <assert.h> #include <bitset> #include <cmath> #include <complex> #include <cstdio> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <random> #include <set> #include <string> #include <vector> // #include <prettyprint.hpp>...
#include <algorithm> #include <assert.h> #include <bitset> #include <cmath> #include <complex> #include <cstdio> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <random> #include <set> #include <string> #include <vector> // #include <prettyprint.hpp>...
replace
90
91
90
91
0
p02782
C++
Runtime Error
#include <bits/stdc++.h> #define ll long long #define ld long double #define fastio \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.t...
#include <bits/stdc++.h> #define ll long long #define ld long double #define fastio \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.t...
replace
18
19
18
19
0
p02782
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define rep(i, j, n) for (int i = (int)(j); i < (int)(n); i++) #define REP(i, j, n) for (int i = (int)(j); i <= (int)(n); i++) #define MOD 1000000007 #define int long long #define ALL(a) (a).begin(), (a).end() #define vi vector<int> #define vii vector<vi> #define pii pair<i...
#include <bits/stdc++.h> using namespace std; #define rep(i, j, n) for (int i = (int)(j); i < (int)(n); i++) #define REP(i, j, n) for (int i = (int)(j); i <= (int)(n); i++) #define MOD 1000000007 #define int long long #define ALL(a) (a).begin(), (a).end() #define vi vector<int> #define vii vector<vi> #define pii pair<i...
replace
18
19
18
19
0
p02782
C++
Runtime Error
// #define _GLIBCXX_DEBUG #include "bits/stdc++.h" using namespace std; //------------------------------- Type Names -------------------------------// using i64 = int_fast64_t; using seika = string; //{akari : 1D, yukari : 2D, maki : 3D} vector template <class kizuna> using akari = vector<kizuna>; template <class y...
// #define _GLIBCXX_DEBUG #include "bits/stdc++.h" using namespace std; //------------------------------- Type Names -------------------------------// using i64 = int_fast64_t; using seika = string; //{akari : 1D, yukari : 2D, maki : 3D} vector template <class kizuna> using akari = vector<kizuna>; template <class y...
replace
160
161
160
161
0
p02782
C++
Runtime Error
#include <bits/stdc++.h> #include <ext/hash_map> #include <ext/numeric> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/detail/standard_policies.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; using namespace __gnu_cxx; #define REP(i, n) for ((i) = 0; (i) < (n);...
#include <bits/stdc++.h> #include <ext/hash_map> #include <ext/numeric> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/detail/standard_policies.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; using namespace __gnu_cxx; #define REP(i, n) for ((i) = 0; (i) < (n);...
replace
56
57
56
57
0
p02783
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define ll long long int #define pb push_back #define F first #define S second #define mod 1000000007 #define all(a) a.begin(), a.end() #define dbg(n) cout << #n << ' ' << n << endl; #define dbg_v(v) \ cout << ...
#include <bits/stdc++.h> using namespace std; #define ll long long int #define pb push_back #define F first #define S second #define mod 1000000007 #define all(a) a.begin(), a.end() #define dbg(n) cout << #n << ' ' << n << endl; #define dbg_v(v) \ cout << ...
replace
34
35
34
35
0
p02783
C++
Runtime Error
#include <algorithm> #include <cmath> #include <iostream> #include <stdio.h> #include <vector> #define rep(i, cc, n) for (int i = cc; i <= n; ++i) #define drep(i, cc, n) for (int i = cc; i >= n; --i) typedef long long ll; using namespace std; int main() { int n, k; cin >> n >> k; int h[n]; rep(i, 0, n - 1) cin ...
#include <algorithm> #include <cmath> #include <iostream> #include <stdio.h> #include <vector> #define rep(i, cc, n) for (int i = cc; i <= n; ++i) #define drep(i, cc, n) for (int i = cc; i >= n; --i) typedef long long ll; using namespace std; int main() { int h, a; cin >> h >> a; if (h % a > 0) cout << h / a ...
replace
10
19
10
16
0
p02783
C++
Runtime Error
#include <bits/stdc++.h> #include <string.h> #define ll long long int #define fio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); #define MAX_LIMIT 10000000 #define haha(x) x.begin(), x.end() #define r...
#include <bits/stdc++.h> #include <string.h> #define ll long long int #define fio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); #define MAX_LIMIT 10000000 #define haha(x) x.begin(), x.end() #define r...
delete
311
315
311
311
0
p02783
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cassert> #include <chrono> #include <cmath> #include <complex> #include <cstdint> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <list> #include <map> #include <queue> #include <random> #include <regex> #include...
#include <algorithm> #include <bitset> #include <cassert> #include <chrono> #include <cmath> #include <complex> #include <cstdint> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <list> #include <map> #include <queue> #include <random> #include <regex> #include...
insert
310
310
310
311
0
p02783
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define vi vector<long long> #define vvi vector<vector<long long>> int main(void) { int H, A; cin >> H, A; cout << H / A + (H % A == 0) ? (0) : (1); return 0; }
#include <bits/stdc++.h> using namespace std; #define vi vector<long long> #define vvi vector<vector<long long>> int main(void) { int H, A; cin >> H; cin >> A; int q = H / A; int r = (H % A == 0) ? (0) : (1); cout << q + r; return 0; }
replace
6
8
6
11
0
p02783
C++
Runtime Error
#include <bits/stdc++.h> #include <cstdio> using namespace std; #define deb(x) cout << #x << " " << x << endl; typedef long long ll; const ll mod = 1000000007; #define For(i, n) for (int i = 0; i < n; i++) int main() { freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); int t, i, n, j; ci...
#include <bits/stdc++.h> #include <cstdio> using namespace std; #define deb(x) cout << #x << " " << x << endl; typedef long long ll; const ll mod = 1000000007; #define For(i, n) for (int i = 0; i < n; i++) int main() { // freopen("input.txt", "r", stdin); // freopen("output.txt", "w", stdout); int t, i, n, j...
replace
13
15
13
15
0
p02783
C++
Runtime Error
#pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; typedef long long ll; typedef pair<int, int> P; typ...
#pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; typedef long long ll; typedef pair<int, int> P; typ...
insert
28
28
28
29
-8
p02783
C++
Time Limit Exceeded
#include <iostream> using namespace std; int main() { int h, a, j = 0; cin >> h >> a; while (h > 0) { h = a, j++; } cout << j << endl; }
#include <iostream> using namespace std; int main() { int h, a, j = 0; cin >> h >> a; while (h > 0) { h -= a, j++; } cout << j << endl; }
replace
6
7
6
7
TLE
p02783
C++
Runtime Error
#include <iostream> using namespace std; int main() { int H, A; cin >> H, A; if (H % A == 0) { cout << H / A << endl; } else { cout << (H / A) + 1 << endl; } }
#include <iostream> using namespace std; int main() { int H, A; cin >> H >> A; if (H % A == 0) { cout << H / A << endl; } else { cout << (H / A) + 1 << endl; } }
replace
5
6
5
6
0
p02783
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define FAST_IO \ ios_base::sync_with_stdio(0); \ cin.tie(0) #define FOR(i, a, b) for (int i = (a); i <= (b); i++) #define REP(n) FOR(O, 1, (n)) #define pb pu...
#include <bits/stdc++.h> using namespace std; #define FAST_IO \ ios_base::sync_with_stdio(0); \ cin.tie(0) #define FOR(i, a, b) for (int i = (a); i <= (b); i++) #define REP(n) FOR(O, 1, (n)) #define pb pu...
insert
30
30
30
31
0
p02783
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define pb push_back #define eb emplace_back #define mp make_pair #define ll long long #define ull unsigned long long #define F first #define S second void __print(int x) { cerr << x; } void __print(long x) { cerr << x; } void __print(long long x) { cerr << x; } void __pri...
#include <bits/stdc++.h> using namespace std; #define pb push_back #define eb emplace_back #define mp make_pair #define ll long long #define ull unsigned long long #define F first #define S second void __print(int x) { cerr << x; } void __print(long x) { cerr << x; } void __print(long long x) { cerr << x; } void __pri...
replace
56
57
56
57
0
p02783
C++
Runtime Error
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <unistd.h> #define ll long long #define lst(x) x.size() - 1 #define ld long double #define pr pair<ll, ll> #define loop(i, n) for (int i = 0; i < n; ++i) #define rep(i, x, n) for (int i = x; i <= n; ++i) #define iteloop(type, data, name, it) ...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <unistd.h> #define ll long long #define lst(x) x.size() - 1 #define ld long double #define pr pair<ll, ll> #define loop(i, n) for (int i = 0; i < n; ++i) #define rep(i, x, n) for (int i = x; i <= n; ++i) #define iteloop(type, data, name, it) ...
replace
25
26
25
26
0
p02783
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int H, A; cin >> H, A; cout << (H + A - 1) / A << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int H, A; cin >> H >> A; cout << (H + A - 1) / A << endl; }
replace
5
6
5
6
0
p02783
C++
Runtime Error
#include <algorithm> #include <climits> #include <cmath> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std;...
#include <algorithm> #include <climits> #include <cmath> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std;...
replace
53
54
53
54
0
p02783
C++
Runtime Error
#include <algorithm> #include <bits/stdc++.h> #include <iostream> #define max(a, b) a > b ? a : b #define min(a, b) a < b ? a : b #define pb push_back #define IM_N00B \ ios_base::sync_with_stdio(false); \ cin.t...
#include <algorithm> #include <bits/stdc++.h> #include <iostream> #define max(a, b) a > b ? a : b #define min(a, b) a < b ? a : b #define pb push_back #define IM_N00B \ ios_base::sync_with_stdio(false); \ cin.t...
delete
15
21
15
15
0
p02783
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int i, n; cin >> i >> n; int result = 0; while (1) { i -= n; if (n <= 0) { break; } } cout << result << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int i, n; cin >> i >> n; int result = 0; while (1) { i -= n; result++; if (i <= 0) { break; } } cout << result << endl; }
replace
9
10
9
11
TLE
p02783
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int n, m, k; int main() { freopen("in.txt", "r", stdin); cin >> n >> m; cout << (n - 1) / m + 1 << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int n, m, k; int main() { // freopen("in.txt","r",stdin); cin >> n >> m; cout << (n - 1) / m + 1 << endl; return 0; }
replace
6
7
6
7
-8
p02783
C++
Runtime Error
#include <algorithm> #include <iostream> using namespace std; int main(void) { int h, a; cout << (h + (a - 1)) / a << endl; return 0; }
#include <algorithm> #include <iostream> using namespace std; int main(void) { int h, a; cin >> h >> a; cout << (h + (a - 1)) / a << endl; return 0; }
insert
6
6
6
7
0
p02783
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int n, a; cin >> n >> a; int c = 0; for (int i = n; i > 0;) { c++; n = n - a; } cout << c; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n, a; cin >> n >> a; int c = 0; while (n > 0) { c++; n = n - a; } cout << c; return 0; }
replace
6
7
6
7
TLE
p02783
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) int main() { int h, a; cout << (h + a - 1) / a; return 0; }
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) int main() { int h, a; cin >> h >> a; cout << (h + a - 1) / a; return 0; }
insert
6
6
6
7
0
p02783
Python
Runtime Error
h = int(input()) # Monster health a = int(input()) # Servant attack x = a attack = 1 while h > x: h -= x attack += 1 print(attack)
h, a = input().split() h = int(h) a = int(a) x = a attack = 1 while h > x: h -= x attack += 1 print(attack)
replace
0
2
0
3
ValueError: invalid literal for int() with base 10: '10 4'
Traceback (most recent call last): File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02783/Python/s514023585.py", line 1, in <module> h = int(input()) # Monster health ValueError: invalid literal for int() with base 10: '10 4'
p02783
C++
Time Limit Exceeded
// 2020.1.26.#153:A #include <cmath> #include <iostream> using namespace std; int main(int argc, char const *argv[]) { int i = 0; unsigned A, H; do { cin >> A, H; if (A <= 10000 && H <= 10000 && A >= 1 && H >= 1) { break; } } while (1); while (A * (++i) < H) { } cout << i << endl; re...
// 2020.1.26.#153:A #include <cmath> #include <iostream> using namespace std; int main(int argc, char const *argv[]) { int i = 0; unsigned A, H; do { cin >> H; cin >> A; if (A <= 10000 && H <= 10000 && A >= 1 && H >= 1) { break; } } while (1); while (A * (++i) < H) { } cout << i << ...
replace
9
10
9
11
TLE
p02783
C++
Time Limit Exceeded
#include <iostream> using namespace std; int main() { int H, A, b = 0; cin >> H >> A; while (H > 0) ; { H -= A; b++; } cout << b << endl; return 0; }
#include <iostream> using namespace std; int main() { int H, A, b = 0; cin >> H >> A; while (H > 0) { H -= A; b++; } cout << b << endl; return 0; }
replace
6
9
6
7
TLE
p02783
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <ve...
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <ve...
replace
27
28
27
31
0
p02783
C++
Runtime Error
/* author : masaow g++ : 17.3.20 */ #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define forn(i, a, b) for (i = a; i < b; i++) #define debug(x) cout << #x << " " << x << " -- \n " #define I__O ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL)...
/* author : masaow g++ : 17.3.20 */ #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define forn(i, a, b) for (i = a; i < b; i++) #define debug(x) cout << #x << " " << x << " -- \n " #define I__O ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL)...
replace
44
45
44
45
0
p02783
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long int lli; typedef pair<int, int> pii; typedef vector<int> vi; typedef vector<lli> vli; typedef priority_queue<int, vector<int>, greater<int>> min_pq; const int MOD = 1e9 + 7; #define fastio ...
#include <bits/stdc++.h> using namespace std; typedef long long int lli; typedef pair<int, int> pii; typedef vector<int> vi; typedef vector<lli> vli; typedef priority_queue<int, vector<int>, greater<int>> min_pq; const int MOD = 1e9 + 7; #define fastio ...
delete
37
41
37
37
0
p02783
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) int main() { int a, b, c; cin >> a, b; c = a / b; if (a % b != 0) { c++; } cout << c << endl; }
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) int main() { int a, b, c; cin >> a >> b; c = a / b; if (a % b != 0) { c++; } cout << c << endl; }
replace
5
6
5
6
0
p02783
Python
Runtime Error
H, A = map(int, input().split()) print(H // A + min(H % A))
H, A = map(int, input().split()) print(H // A + min(H % A, 1))
replace
2
3
2
3
TypeError: 'int' object is not iterable
Traceback (most recent call last): File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02783/Python/s363144861.py", line 3, in <module> print(H // A + min(H % A)) TypeError: 'int' object is not iterable
p02783
C++
Runtime Error
#define _CRT_SECURE_NO_WARNINGS #include <bits/stdc++.h> #include <unordered_map> #define endl "\n" #define all(v) v.begin(), v.end() #define allr(s) s.rbegin(), s.rend() #define RT(s) return cout << s, 0 #define watch(x) cout << (#x) << " = " << x << endl #define sz(s) (int)(s.size()) // #define PI acos(-1) #define EP...
#define _CRT_SECURE_NO_WARNINGS #include <bits/stdc++.h> #include <unordered_map> #define endl "\n" #define all(v) v.begin(), v.end() #define allr(s) s.rbegin(), s.rend() #define RT(s) return cout << s, 0 #define watch(x) cout << (#x) << " = " << x << endl #define sz(s) (int)(s.size()) // #define PI acos(-1) #define EP...
replace
35
36
35
36
0
p02783
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int h, a; cin >> h, a; cout << (h + (a - 1)) / a << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int h, a; cin >> h >> a; int ans = (h + (a - 1)) / a; cout << ans << endl; return 0; }
replace
4
6
4
8
0
p02783
C++
Runtime Error
#include <algorithm> #include <iomanip> #include <iostream> #include <vector> using namespace std; int main() { long long int a = 0, b = 0, c = 0, d = 0, n = 0, ans = 0, count = 0, h, w, up, down, end = 0, idx, m, kuso; string s; vector<long long int> x; vector<long long int>::iterator position;...
#include <algorithm> #include <iomanip> #include <iostream> #include <vector> using namespace std; int main() { long long int a = 0, b = 0, c = 0, d = 0, n = 0, ans = 0, count = 0, h, w, up, down, end = 0, idx, m, kuso; string s; vector<long long int> x; vector<long long int>::iterator position;...
replace
12
13
12
13
-8
p02783
C++
Runtime Error
#include <cmath> #include <cstdio> int main() { int h, a; scanf("%d", &h, &a); printf("%d", (int)ceil(h / a)); return 0; }
#include <cmath> #include <cstdio> int main() { int h, a; scanf("%d%d", &h, &a); printf("%d", (int)ceil((double)h / a)); return 0; }
replace
4
6
4
6
-8
p02783
C++
Runtime Error
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; const int N = 3e5 + 50; int n, m, a[N]; int main() { #ifdef ONLINE_JUDGE #else freopen("r.txt", "r", stdin); #endif ...
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; const int N = 3e5 + 50; int n, m, a[N]; int main() { ios::sync_with_stdio(false); cin >> n >> m; cout << (n + m -...
delete
18
22
18
18
-8
p02783
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int h, a; cin >> h >> a; return h % a ? h / a : ((h / a) + 1); }
#include <bits/stdc++.h> using namespace std; int main() { int h, a; cin >> h >> a; int ans = h % a ? ((h / a) + 1) : h / a; cout << ans << endl; return 0; }
replace
5
6
5
8
2
p02783
C++
Runtime Error
#define _CRT_SECURE_NO_WARNINGS #include <bits/stdc++.h> #include <unordered_map> #include <unordered_set> using namespace std; typedef long long ll; #define bay_bay return 0; #define fori(n) for (int i = 0; i < n; ++i) #define for1(n) for (int i = 1; i <= n; i += 3) #define all(v) ((v).begin()), ((v).end()) #define sz...
#define _CRT_SECURE_NO_WARNINGS #include <bits/stdc++.h> #include <unordered_map> #include <unordered_set> using namespace std; typedef long long ll; #define bay_bay return 0; #define fori(n) for (int i = 0; i < n; ++i) #define for1(n) for (int i = 1; i <= n; i += 3) #define all(v) ((v).begin()), ((v).end()) #define sz...
replace
29
30
29
30
0
p02783
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int H, A; cin >> H >> A; for (int i = 0;; i++) { H = H - i * A; if (H <= 0) { cout << i << endl; } } }
#include <bits/stdc++.h> using namespace std; int main() { int H, A; cin >> H >> A; if (H % A == 0) cout << H / A << endl; else cout << H / A + 1 << endl; }
replace
5
11
5
9
TLE
p02783
C++
Runtime Error
#define _USE_MATH_DEFINES #include <bits/stdc++.h> #define ll long long #define pb push_back #define mp make_pair #define ff first #define ss second #define vi vector<int> #define br cout << "\n"; #define all(x) (x).begin(), (x).end() #define tr(c, i) for (auto i : c) #define pii pair<int, int> #define fast_io() ...
#define _USE_MATH_DEFINES #include <bits/stdc++.h> #define ll long long #define pb push_back #define mp make_pair #define ff first #define ss second #define vi vector<int> #define br cout << "\n"; #define all(x) (x).begin(), (x).end() #define tr(c, i) for (auto i : c) #define pii pair<int, int> #define fast_io() ...
delete
30
34
30
30
0
p02784
Python
Runtime Error
H, N = map(int, input().split()) attacks = [*map(int, input().split())] if sum(attacks) >= H: print("Yes") else: print("No")
H, N = map(int, input().split()) attacks = list(map(int, input().split())) if sum(attacks) >= H: print("Yes") else: print("No")
replace
1
2
1
2
0
p02784
C++
Runtime Error
#include <stdio.h> int main(void) { int H; int N; int T = 0; int array[10000]; scanf("%d", &H); scanf("%d", &N); for (int i = 0; i < N; i++) { scanf("%d", &array[i]); T = T + array[i]; } if (T >= H) { printf("Yes"); } if (T < H) { printf("No"); } }
#include <stdio.h> int main(void) { int H; int N; int T = 0; int array[100000]; scanf("%d", &H); scanf("%d", &N); for (int i = 0; i < N; i++) { scanf("%d", &array[i]); T = T + array[i]; } if (T >= H) { printf("Yes"); } if (T < H) { printf("No"); } }
replace
5
6
5
6
0
p02784
C++
Runtime Error
#include <stdio.h> #include <string.h> int main(void) { int H, N, i; int A[N]; int s = 0; scanf("%d %d", &H, &N); for (i = 0; i < N; i++) { scanf("%d", &A[i]); } for (i = 0; i < N; i++) { s = s + A[i]; } if (s >= H) { printf("Yes\n"); } else { printf("No\n"); } return 0; }
#include <stdio.h> #include <string.h> int main(void) { int H, N, i; int A[1000001]; int s = 0; scanf("%d %d", &H, &N); for (i = 0; i < N; i++) { scanf("%d", &A[i]); } for (i = 0; i < N; i++) { s = s + A[i]; } if (s >= H) { printf("Yes\n"); } else { printf("No\n"); } return 0; }
replace
4
5
4
5
0
p02784
C++
Runtime Error
#include <stdio.h> int main(void) { int h, n, a[1000], i, m; m = 0; scanf("%d %d", &h, &n); for (i = 0; i < n; i++) { scanf("%d", &a[i]); } for (i = 0; i < n; i++) { m += a[i]; } if (m >= h) { printf("Yes\n"); } else { printf("No\n"); } return 0; }
#include <stdio.h> int main(void) { int h, n, a[100000], i, m; m = 0; scanf("%d %d", &h, &n); for (i = 0; i < n; i++) { scanf("%d", &a[i]); } for (i = 0; i < n; i++) { m += a[i]; } if (m >= h) { printf("Yes\n"); } else { printf("No\n"); } return 0; }
replace
2
3
2
3
0
p02784
C++
Runtime Error
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <vector> using namespace std; typedef pair<int, int> P; typedef long long ll; ll mod = 1e9 + 7; int main() { ll h; int n; ll a[10000]; cin >> h >> n; ...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <vector> using namespace std; typedef pair<int, int> P; typedef long long ll; ll mod = 1e9 + 7; int main() { ll h; int n; ll a[100000]; cin >> h >> n; ...
replace
20
21
20
21
0
p02784
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int h, N; int a[10000]; cin >> h >> N; for (int i = 0; i < N; ++i) cin >> a[i]; int sum; for (int i = 0; i < N; ++i) sum += a[i]; if (h <= sum) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { int h, N; int a[100000]; cin >> h >> N; for (int i = 0; i < N; ++i) cin >> a[i]; int sum; for (int i = 0; i < N; ++i) sum += a[i]; if (h <= sum) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
replace
5
6
5
6
0
p02784
C++
Runtime Error
#include <bits/stdc++.h> #define ll long long #define int long long #define MOD 1000000007 #define MAX 500005 #include <iomanip> #define Need_for_speed(activated) \ ios_base ::sync_with_stdio(0); \ cin.tie(NULL); ...
#include <bits/stdc++.h> #define ll long long #define int long long #define MOD 1000000007 #define MAX 500005 #include <iomanip> #define Need_for_speed(activated) \ ios_base ::sync_with_stdio(0); \ cin.tie(NULL); ...
replace
37
38
37
38
0
p02784
C++
Runtime Error
#include <algorithm> #include <iostream> #include <list> #include <map> #include <math.h> #include <stdio.h> #include <string> #include <vector> using namespace std; int main() { long long int h, sum = 0; int n, a[10000]; cin >> h >> n; for (int i = 0; i < n; i++) { cin >> a[i]; sum += a[i]; } if ...
#include <algorithm> #include <iostream> #include <list> #include <map> #include <math.h> #include <stdio.h> #include <string> #include <vector> using namespace std; int main() { long long int h, sum = 0; int n, a[100000]; cin >> h >> n; for (int i = 0; i < n; i++) { cin >> a[i]; sum += a[i]; } if...
replace
13
14
13
14
0
p02784
C++
Runtime Error
#include <iostream> #include <vector> using namespace std; int main() { long long h; long long n; cin >> h; cin >> n; long long A[10000 + 1]; long long sum = 0; for (long long i = 0; i < n; i++) { cin >> A[i]; sum += A[i]; } if (h - sum <= 0) { cout << "Yes" << endl; } else { cout <<...
#include <iostream> #include <vector> using namespace std; int main() { long long h; long long n; cin >> h; cin >> n; long long A[100000 + 1]; long long sum = 0; for (long long i = 0; i < n; i++) { cin >> A[i]; sum += A[i]; } if (h - sum <= 0) { cout << "Yes" << endl; } else { cout <...
replace
8
9
8
9
0
p02784
C++
Runtime Error
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; int main() { int h, n; cin >> h >> n; int a[n]; for (int i = 0; i < n; i++) cin >> n; string ans = "No"; sort(a, a + n, std::greater<int>()); for (int i = 0; i < n; i++) { h -= a[i]; if (h <= 0) ...
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; int main() { int h, n; cin >> h >> n; int a[n]; for (int i = 0; i < n; i++) cin >> a[i]; string ans = "No"; sort(a, a + n, std::greater<int>()); for (int i = 0; i < n; i++) { h -= a[i]; if (h <= ...
replace
11
12
11
12
0
p02784
C++
Runtime Error
#include <iostream> using namespace std; int main() { int n, KO, ACE = 0; cin >> n >> KO; int a[KO + 1]; for (int i = 1; i <= n; i++) { cin >> a[i]; ACE += a[i]; } if (ACE >= n) cout << "Yes" << endl; else cout << "No" << endl; return 0; }
#include <iostream> using namespace std; int main() { int n, KO, ACE = 0; cin >> n >> KO; int a[KO + 1]; for (int i = 1; i <= KO; i++) { cin >> a[i]; ACE += a[i]; } if (ACE >= n) cout << "Yes" << endl; else cout << "No" << endl; return 0; }
replace
8
9
8
9
0