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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p02839 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int table[80][80];
bool dp[80][80][15000] = {};
int main() {
int H, W;
cin >> H >> W;
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
cin >> table[i][j];
}
}
int m = 0;
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
... | #include <bits/stdc++.h>
using namespace std;
int table[80][80];
bool dp[80][80][15000] = {};
int main() {
int H, W;
cin >> H >> W;
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
cin >> table[i][j];
}
}
int m = 0;
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
... | replace | 26 | 27 | 26 | 27 | TLE | |
p02839 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> Pii;
#define pb push_back
#define mp make_pair
#define MOD 1000000007
#define INF 1000000000
#define rep(i, a, b) for (int i = (a); i < (b); i++)
#define fs first
#define ss second
inline int Scan() {
in... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> Pii;
#define pb push_back
#define mp make_pair
#define MOD 1000000007
#define INF 1000000000
#define rep(i, a, b) for (int i = (a); i < (b); i++)
#define fs first
#define ss second
inline int Scan() {
in... | replace | 41 | 43 | 41 | 43 | -11 | |
p02839 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ALL(obj) (obj).begin(), (obj).end()
#define RALL(obj) (obj).rbegin(), (obj).rend()
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define RANGE(i, a, b) for (int i = (a); i < (b); ++i)
#define RREP(i, n) for (int i = (n)-1; i >= 0; --i)
#define endl '\n'
#define p... | #include <bits/stdc++.h>
using namespace std;
#define ALL(obj) (obj).begin(), (obj).end()
#define RALL(obj) (obj).rbegin(), (obj).rend()
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define RANGE(i, a, b) for (int i = (a); i < (b); ++i)
#define RREP(i, n) for (int i = (n)-1; i >= 0; --i)
#define endl '\n'
#define p... | insert | 98 | 98 | 98 | 102 | -11 | |
p02839 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <functional>
#include <iostream>
#include <queue>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define ll long long
const int mod = 1000000007;
const ll INF = 1000000000000000000;
typedef pair<int, int> P;
bool dp[100][100][10000];
int A[100][... | #include <algorithm>
#include <cmath>
#include <functional>
#include <iostream>
#include <queue>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define ll long long
const int mod = 1000000007;
const ll INF = 1000000000000000000;
typedef pair<int, int> P;
bool dp[100][100][20000];
int A[100][... | replace | 14 | 15 | 14 | 15 | 127 | /tmp/f6cffec1-f856-4a76-a59f-3b7c23df2e3f.out: error while loading shared libraries: libc.so.6: failed to map segment from shared object
|
p02839 | C++ | Runtime Error | // By Mohit Gupta
#include <bits/stdc++.h>
using namespace std;
#define printint(v) copy(begin(v), end(v), ostream_iterator<int>(cout, " "))
#define printintv(s, e) copy(s, e, ostream_iterator<int>(cout, " "))
#define forstl(i, v) for (auto &i : v)
#define forn(i, e) for (int i = 0; i < e; i++)
#define forsn(i, s, e) f... | // By Mohit Gupta
#include <bits/stdc++.h>
using namespace std;
#define printint(v) copy(begin(v), end(v), ostream_iterator<int>(cout, " "))
#define printintv(s, e) copy(s, e, ostream_iterator<int>(cout, " "))
#define forstl(i, v) for (auto &i : v)
#define forn(i, e) for (int i = 0; i < e; i++)
#define forsn(i, s, e) f... | replace | 39 | 40 | 39 | 40 | -11 | |
p02839 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = int_fast64_t;
using ld = long double;
using pll = pair<ll, ll>;
using pld = pair<ld, ld>;
const ll INF = 1LL << 60;
void solve();
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
cout << fixed << setprecision(10);
solve();
}
#define foreach(i, a) for... | #include <bits/stdc++.h>
using namespace std;
using ll = int_fast64_t;
using ld = long double;
using pll = pair<ll, ll>;
using pld = pair<ld, ld>;
const ll INF = 1LL << 60;
void solve();
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
cout << fixed << setprecision(10);
solve();
}
#define foreach(i, a) for... | replace | 47 | 48 | 47 | 48 | 0 | |
p02839 | C++ | Runtime Error | #include <algorithm>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
// マクロ&定数&関数 ===========... | #include <algorithm>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
// マクロ&定数&関数 ===========... | replace | 441 | 442 | 441 | 442 | 0 | |
p02839 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int(i) = 0; i < (n); ++(i))
typedef long long ll;
const ll MOD = 1e9 + 7;
int main() {
int H, W;
std::cin >> H >> W;
static std::vector<std::vector<int>> A(H, std::vector<int>(W));
static std::vector<std::vector<int>> B(H, std::vector<int>(W));
rep(i, H) {
... | #include <bits/stdc++.h>
#define rep(i, n) for (int(i) = 0; i < (n); ++(i))
typedef long long ll;
const ll MOD = 1e9 + 7;
int main() {
int H, W;
std::cin >> H >> W;
static std::vector<std::vector<int>> A(H, std::vector<int>(W));
static std::vector<std::vector<int>> B(H, std::vector<int>(W));
rep(i, H) {
... | replace | 21 | 23 | 21 | 26 | TLE | |
p02839 | C++ | Memory Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
#define fi first
#define se second
typedef pair<ll, ll> P;
using VP = vector<P>;
using VVP = vector<VP>;
using VI = vector<ll>;
using VVI = vector<VI>;
using VVVI = vector<VVI>;
const int inf = 1e9 + 7;
const ll INF = 1LL << 58;
co... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
#define fi first
#define se second
typedef pair<ll, ll> P;
using VP = vector<P>;
using VVP = vector<VP>;
using VI = vector<bool>;
using VVI = vector<VI>;
using VVVI = vector<VVI>;
const int inf = 1e9 + 7;
const ll INF = 1LL << 58;
... | replace | 9 | 10 | 9 | 10 | MLE | |
p02839 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
long long h, w;
cin >> h >> w;
vector<vector<long long>> a(h + 1, vector<long long>(w + 1, 0));
vector<vector<long long>> b(h + 1, vector<long long>(w + 1, 0));
vector<vector<long long>> sa(h + 1, vector<long long>(w + 1, 0));
for (int i = 1; i < h... | #include <bits/stdc++.h>
using namespace std;
int main() {
long long h, w;
cin >> h >> w;
vector<vector<long long>> a(h + 1, vector<long long>(w + 1, 0));
vector<vector<long long>> b(h + 1, vector<long long>(w + 1, 0));
vector<vector<long long>> sa(h + 1, vector<long long>(w + 1, 0));
for (int i = 1; i < h... | replace | 22 | 23 | 22 | 23 | TLE | |
p02839 | C++ | Runtime Error | #include <algorithm>
#include <cinttypes>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define FSCNd64 "%" SCNd64
#define FPRId64 "%" PRId64
using namespace std;
using l... | #include <algorithm>
#include <cinttypes>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define FSCNd64 "%" SCNd64
#define FPRId64 "%" PRId64
using namespace std;
using l... | replace | 59 | 60 | 59 | 60 | 0 | |
p02839 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int H, W;
vector<vector<int>> A, B, C;
using mybit = bitset<12800>;
int main() {
int ans = 0;
cin >> H;
cin >> W;
A = B = C = vector<vector<int>>(H, vector<int>(W));
for (int i = 0; i < H; i... | #include <algorithm>
#include <bitset>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int H, W;
vector<vector<int>> A, B, C;
using mybit = bitset<12800>;
int main() {
int ans = 0;
cin >> H;
cin >> W;
A = B = C = vector<vector<int>>(H, vector<int>(W));
for (int i = 0; i < H; i... | replace | 35 | 38 | 35 | 40 | -6 | double free or corruption (!prev)
|
p02839 | C++ | Runtime Error | // https://youtu.be/telPDj1VQjQ
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef long long unsigned llu;
typedef pair<long long, long long> pll;
const long long inf = 2000000000000000000LL; // 2e18
#define pi acos(-1.0)
#define fast ... | // https://youtu.be/telPDj1VQjQ
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef long long unsigned llu;
typedef pair<long long, long long> pll;
const long long inf = 2000000000000000000LL; // 2e18
#define pi acos(-1.0)
#define fast ... | replace | 56 | 57 | 56 | 57 | 0 | |
p02839 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef pair<int, int> P;
typedef long long ll;
bool dp[81][81][80 * 160 + 200];
int a[80][80];
int b[80][80];
int main() {
int h, w;
cin >> h >> w;
rep(i, h) {
rep(j, w) { cin >> a[i][j]; }
}
rep(i, h) {
... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef pair<int, int> P;
typedef long long ll;
bool dp[81][81][80 * 160 + 200];
int a[80][80];
int b[80][80];
int main() {
int h, w;
cin >> h >> w;
rep(i, h) {
rep(j, w) { cin >> a[i][j]; }
}
rep(i, h) {
... | replace | 20 | 21 | 20 | 21 | TLE | |
p02839 | C++ | Runtime Error | #include <iostream>
using namespace std;
bool d[81][81][12900];
int main() {
int h, w;
cin >> h >> w;
int a[81][81], b[81][81];
int c[81][81];
for (int i = 0; i < h; i++)
for (int j = 0; j < w; j++)
cin >> a[i][j];
for (int i = 0; i < h; i++)
for (int j = 0; j < w; j++)
cin >> b[i][j];... | #include <iostream>
using namespace std;
bool d[81][81][12900];
int main() {
int h, w;
cin >> h >> w;
int a[81][81], b[81][81];
int c[81][81];
for (int i = 0; i < h; i++)
for (int j = 0; j < w; j++)
cin >> a[i][j];
for (int i = 0; i < h; i++)
for (int j = 0; j < w; j++)
cin >> b[i][j];... | replace | 24 | 28 | 24 | 32 | 0 | |
p02839 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <ios>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
#define rep(i, N) for (int(i) = 0; (i) < (N); (i)++)
#define revrep(i, N) for (int(i) ... | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <ios>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
#define rep(i, N) for (int(i) = 0; (i) < (N); (i)++)
#define revrep(i, N) for (int(i) ... | replace | 27 | 28 | 27 | 28 | TLE | |
p02839 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int dp[81][81][6400 * 2 + 2];
int find_it(int dif_sum, int i, int j, int &n, int &m,
vector<vector<pair<int, int>>> &matrix) {
if (i == n - 1 && j == m - 1) {
return min(abs(dif_sum + matrix[i][j].first - matrix[i][j].second),
abs(dif_sum + ... | #include <bits/stdc++.h>
using namespace std;
int dp[81][81][6400 * 2 + 2];
int find_it(int dif_sum, int i, int j, int &n, int &m,
vector<vector<pair<int, int>>> &matrix) {
if (i == n - 1 && j == m - 1) {
return min(abs(dif_sum + matrix[i][j].first - matrix[i][j].second),
abs(dif_sum + ... | replace | 9 | 10 | 9 | 10 | TLE | |
p02839 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define fs first
#define sc second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define ALL(A) A.begin(), A.end()
#define RALL(A) A.rbegin(), A.rend()
typedef long long LL;
typedef pair<LL, LL> P;
const LL mod = 1000000007;
const LL LINF = 1LL << 60;
co... | #include <bits/stdc++.h>
using namespace std;
#define fs first
#define sc second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define ALL(A) A.begin(), A.end()
#define RALL(A) A.rbegin(), A.rend()
typedef long long LL;
typedef pair<LL, LL> P;
const LL mod = 1000000007;
const LL LINF = 1LL << 60;
co... | replace | 33 | 34 | 33 | 34 | 0 | |
p02839 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#pragma GCC target("sse,sse2,sse3,sse4.1,sse4.2,popcnt,abm,mmx,avx")
#pragma comment(linker, "/STACK:102400000,102400000")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("inline")
#pragma GCC optimize("-fgcse")
#pragma GCC optimize("-fgcse-lm")
#pragma GCC optimize("-fipa-sra")
#pragma GCC ... | #include <bits/stdc++.h>
using namespace std;
inline int read() {
int ret = 0, w = 1;
char ch = getchar();
while (ch < '0' || ch > '9') {
if (ch == '-')
w = -1;
ch = getchar();
}
while (ch >= '0' && ch <= '9')
ret = ret * 10 + ch - '0', ch = getchar();
return w * ret;
}
int h, w;
bitset<25... | delete | 1 | 48 | 1 | 1 | TLE | |
p02839 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int dp[81][81][13000];
int find_it(int dif_sum, int i, int j, int &n, int &m,
vector<vector<pair<int, int>>> &matrix) {
if (i == n - 1 && j == m - 1) {
return min(abs(dif_sum + matrix[i][j].first - matrix[i][j].second),
abs(dif_sum + matrix[... | #include <bits/stdc++.h>
using namespace std;
int dp[81][81][6400 * 2 + 2];
int find_it(int dif_sum, int i, int j, int &n, int &m,
vector<vector<pair<int, int>>> &matrix) {
if (i == n - 1 && j == m - 1) {
return min(abs(dif_sum + matrix[i][j].first - matrix[i][j].second),
abs(dif_sum + ... | replace | 2 | 3 | 2 | 3 | TLE | |
p02840 | C++ | Runtime Error | #include <algorithm>
#include <cinttypes>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define FSCNd64 "%" SCNd64
#define FPRId64 "%" PRId64
using namespace std;
using l... | #include <algorithm>
#include <cinttypes>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define FSCNd64 "%" SCNd64
#define FPRId64 "%" PRId64
using namespace std;
using l... | insert | 50 | 50 | 50 | 55 | 0 | |
p02840 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
map<int, vector<pair<long long, long long>>> l;
long long sum(long long x) { return x * (x + 1) / 2; }
int main() {
long long n, x, d, ans = 0;
cin >> n >> x >> d;
if (!d) {
if (!x)
cout << 1;
else
cout << n + 1;
}
for (int i = 0; i <= n; i++) ... | #include <bits/stdc++.h>
using namespace std;
map<int, vector<pair<long long, long long>>> l;
long long sum(long long x) { return x * (x + 1) / 2; }
int main() {
long long n, x, d, ans = 0;
cin >> n >> x >> d;
if (!d) {
if (!x)
cout << 1;
else
cout << n + 1;
return 0;
}
for (int i = 0;... | insert | 12 | 12 | 12 | 13 | 0 | |
p02840 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using PP = pair<long, long>;
int n;
long a, b;
unordered_map<long, vector<PP>> mp;
int main() {
cin >> n >> b >> a;
if (a < 0) {
a = -a;
b = -b;
}
long mn = 0;
long mx = 0;
for (int i = 0; i <= n; ++i) {
long k = b * i % a;
mp[k].push_back(PP(... | #include <bits/stdc++.h>
using namespace std;
using PP = pair<long, long>;
int n;
long a, b;
unordered_map<long, vector<PP>> mp;
int main() {
cin >> n >> b >> a;
if (a < 0) {
a = -a;
b = -b;
}
long mn = 0;
long mx = 0;
for (int i = 0; i <= n; ++i) {
long k = a == 0 ? 0 : b * i % a;
mp[k].... | replace | 18 | 19 | 18 | 19 | 0 | |
p02840 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
inline int toInt(string s) {
int v;
istringstream sin(s);
sin >> v;
return v;
}
template <class T> inline string toString(T x) {
ostringstream sout;
sout << x;
return sout.str();
}
typedef long long ll;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef... | #include <bits/stdc++.h>
using namespace std;
inline int toInt(string s) {
int v;
istringstream sin(s);
sin >> v;
return v;
}
template <class T> inline string toString(T x) {
ostringstream sout;
sout << x;
return sout.str();
}
typedef long long ll;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef... | insert | 82 | 82 | 82 | 85 | 0 | |
p02840 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <deque>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <stdio.h>
#include <vector>
using namespace std;
#define int long long
#define rep(s, i, n) for (int i = s; i < n; i++)
#define c(n) cout << n << endl;
#define ic(n) ... | #include <algorithm>
#include <cmath>
#include <deque>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <stdio.h>
#include <vector>
using namespace std;
#define int long long
#define rep(s, i, n) for (int i = s; i < n; i++)
#define c(n) cout << n << endl;
#define ic(n) ... | replace | 333 | 334 | 333 | 334 | 0 | |
p02840 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#ifdef DGC
#include "debug.h"
#else
#define debug(...) 9715
#endif
typedef long long ll;
typedef long double ld;
typedef complex<ld> point;
#define F first
#define S second
int main() {
#ifdef DGC
// freopen("a.in", "r", stdin);
// freopen("b.out", "w", stdout);
#end... | #include <bits/stdc++.h>
using namespace std;
#ifdef DGC
#include "debug.h"
#else
#define debug(...) 9715
#endif
typedef long long ll;
typedef long double ld;
typedef complex<ld> point;
#define F first
#define S second
int main() {
#ifdef DGC
// freopen("a.in", "r", stdin);
// freopen("b.out", "w", stdout);
#end... | insert | 26 | 26 | 26 | 34 | 0 | |
p02840 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using LL = long long;
#define fs first
#define sc second
const LL MOD = 1e9 + 7;
const double EPS = 1e-10;
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> bool chmin(T &a, const T &b) {... | #include <bits/stdc++.h>
using namespace std;
using LL = long long;
#define fs first
#define sc second
const LL MOD = 1e9 + 7;
const double EPS = 1e-10;
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> bool chmin(T &a, const T &b) {... | insert | 183 | 183 | 183 | 192 | 0 | |
p02840 | C++ | Runtime Error | #include <algorithm>
#include <cmath> //ABC 147-F
#include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
#define LL long long
#define MAXN 400001
#define MOD 1000000007ll
using namespace std;
LL N, X, D;
int stk[MAXN], sum;
bool vis[MAXN];
LL gcd(LL x, LL y) { return y ? gcd(y, x % y) : x; }
struct D... | #include <algorithm>
#include <cmath> //ABC 147-F
#include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
#define LL long long
#define MAXN 400001
#define MOD 1000000007ll
using namespace std;
LL N, X, D;
int stk[MAXN], sum;
bool vis[MAXN];
LL gcd(LL x, LL y) { return y ? gcd(y, x % y) : x; }
struct D... | insert | 24 | 24 | 24 | 32 | 0 | |
p02840 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
using Vec = vector<ll>;
using VecP = vector<P>;
#define REP(i, m, n) for (ll(i) = (m); (i) < (n); ++(i))
#define REPN(i, m, n) for (ll(i) = (m); (i) <= (n); ++(i))
#define REPR(i, m, n) for (ll(i) = (m); (i) >= (n); --(i))
#defi... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
using Vec = vector<ll>;
using VecP = vector<P>;
#define REP(i, m, n) for (ll(i) = (m); (i) < (n); ++(i))
#define REPN(i, m, n) for (ll(i) = (m); (i) <= (n); ++(i))
#define REPR(i, m, n) for (ll(i) = (m); (i) >= (n); --(i))
#defi... | replace | 71 | 73 | 71 | 73 | TLE | |
p02840 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int(i) = 0; i < (n); ++(i))
typedef long long ll;
const ll MOD = 1e9 + 7;
const ll INF = 1LL << 62;
int main() {
int N;
ll X, D;
std::cin >> N >> X >> D;
std::map<ll, std::vector<std::pair<ll, ll>>> ranges;
for (ll k = 0; k <= N; ++k) {
ll L = k * (k - ... | #include <bits/stdc++.h>
#define rep(i, n) for (int(i) = 0; i < (n); ++(i))
typedef long long ll;
const ll MOD = 1e9 + 7;
const ll INF = 1LL << 62;
int main() {
int N;
ll X, D;
std::cin >> N >> X >> D;
if (D == 0) {
if (X == 0) {
std::cout << "1" << '\n';
return 0;
} else {
std::co... | insert | 12 | 12 | 12 | 22 | 0 | |
p02840 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using LL = long long;
using PLL = pair<LL, LL>;
const LL INF = 1e18;
LL sum(LL n) { return (n * (n - 1)) / 2; }
int main() {
#ifdef LOCAL_EXEC
// freopen("sample.in", "r", stdin);
// freopen("sample.out", "w", stdout);
#else
ios_base::sync_with_stdio(false);
cin.tie(N... | #include <bits/stdc++.h>
using namespace std;
using LL = long long;
using PLL = pair<LL, LL>;
const LL INF = 1e18;
LL sum(LL n) { return (n * (n - 1)) / 2; }
int main() {
#ifdef LOCAL_EXEC
// freopen("sample.in", "r", stdin);
// freopen("sample.out", "w", stdout);
#else
ios_base::sync_with_stdio(false);
cin.tie(N... | insert | 19 | 19 | 19 | 27 | 0 | |
p02840 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<double, double> pdd;
const ull mod = 1e9 + 7;
#define REP(i, n) for (int i = 0; i < (int)n; ++i)
// debug
#define dump(x) cerr << #x << " = " << (x) <<... | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<double, double> pdd;
const ull mod = 1e9 + 7;
#define REP(i, n) for (int i = 0; i < (int)n; ++i)
// debug
#define dump(x) cerr << #x << " = " << (x) <<... | insert | 56 | 56 | 56 | 60 | 0 | |
p02840 | C++ | Runtime Error | #include <bits/stdc++.h>
#define all(vec) vec.begin(), vec.end()
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
constexpr ll INF = (1LL << 30) - 1LL;
constexpr ll LINF = (1LL << 60) - 1LL;
constexpr ll MOD = 1e9 + 7;
template <typename T> void chmin(T &a, T b) { a = min(a, b); }
template <typename T... | #include <bits/stdc++.h>
#define all(vec) vec.begin(), vec.end()
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
constexpr ll INF = (1LL << 30) - 1LL;
constexpr ll LINF = (1LL << 60) - 1LL;
constexpr ll MOD = 1e9 + 7;
template <typename T> void chmin(T &a, T b) { a = min(a, b); }
template <typename T... | insert | 23 | 23 | 23 | 24 | 0 | |
p02840 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vi = vector<int>;
using vl = vector<ll>;
using vvi = vector<vi>;
using vvl = vector<vl>;
const ll INF = 1LL << 60;
const ll MOD = 1000000007;
template <class T> bool chmax(T &a, const T &b) {
... | #include "bits/stdc++.h"
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vi = vector<int>;
using vl = vector<ll>;
using vvi = vector<vi>;
using vvl = vector<vl>;
const ll INF = 1LL << 60;
const ll MOD = 1000000007;
template <class T> bool chmax(T &a, const T &b) {
... | replace | 50 | 55 | 50 | 59 | 0 | |
p02840 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vi = vector<int>;
using vl = vector<ll>;
using vvi = vector<vi>;
using vvl = vector<vl>;
const ll INF = 1LL << 60;
const ll MOD = 1000000007;
template <class T> bool chmax(T &a, const T &b) {
... | #include "bits/stdc++.h"
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vi = vector<int>;
using vl = vector<ll>;
using vvi = vector<vi>;
using vvl = vector<vl>;
const ll INF = 1LL << 60;
const ll MOD = 1000000007;
template <class T> bool chmax(T &a, const T &b) {
... | insert | 29 | 29 | 29 | 31 | 0 | |
p02840 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
const ll MOD = 1000000007;
// const ll MOD = 998244353;
const ll INF = MOD * MOD;
const long double EPS = 1e-12;
struct mint {
ll x;
mint(ll x = 0) : x((x % MOD + MOD) % MOD) {}
mint operator-() const { return mint(-x); }... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
const ll MOD = 1000000007;
// const ll MOD = 998244353;
const ll INF = MOD * MOD;
const long double EPS = 1e-12;
struct mint {
ll x;
mint(ll x = 0) : x((x % MOD + MOD) % MOD) {}
mint operator-() const { return mint(-x); }... | replace | 2,026 | 2,027 | 2,026 | 2,028 | 0 | |
p02840 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
ll gcd(ll a, ll b) {
if (b == 0)
return a;
return gcd(b, a % b);
}
ll mod = 1e9 + 7;
int main() {
ll N, X, D;
cin >> N >> X >> D;
ll ans = 0;
ll p = D / gcd(X, D);
for (ll M = 0; M <= N; M++) {
// cout << ans << endl;
if (M ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
ll gcd(ll a, ll b) {
if (b == 0)
return a;
return gcd(b, a % b);
}
ll mod = 1e9 + 7;
int main() {
ll N, X, D;
cin >> N >> X >> D;
if (D == 0) {
if (X == 0)
cout << 1 << endl;
else
cout << (N + 1) << endl;
return ... | insert | 15 | 15 | 15 | 22 | 0 | |
p02840 | C++ | Runtime Error | //----------------------------templates
#pragma GCC optimize("Ofast")
#pragma GCC target("tune=native")
#pragma GCC target("avx")
//----------------------------
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define int ll
#define FOR(i, j, n) for (int i = (int)(j)... | //----------------------------templates
#pragma GCC optimize("Ofast")
#pragma GCC target("tune=native")
#pragma GCC target("avx")
//----------------------------
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define int ll
#define FOR(i, j, n) for (int i = (int)(j)... | insert | 47 | 47 | 47 | 51 | 0 | |
p02840 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int(i) = 0; (i) < (int)(n); ++(i))
#define repl(i, s, n) for (int i = s; i <= n; ++i)
#define rer(i, l, u) for (int(i) = (int)(l); (i) <= (int)(u); ++(i))
#define reu(i, l, u) for (int(i) = (int)(l); (i) < (int)(u); ++(i))
#if defined(_MSC_VER) || __... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int(i) = 0; (i) < (int)(n); ++(i))
#define repl(i, s, n) for (int i = s; i <= n; ++i)
#define rer(i, l, u) for (int(i) = (int)(l); (i) <= (int)(u); ++(i))
#define reu(i, l, u) for (int(i) = (int)(l); (i) < (int)(u); ++(i))
#if defined(_MSC_VER) || __... | insert | 67 | 67 | 67 | 74 | 0 | |
p02840 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define rep2(i, a, b) for (ll i = (a); i < (b); i++)
#define chmax(x, v) \
do { \
x = max(x, v); ... | #include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define rep2(i, a, b) for (ll i = (a); i < (b); i++)
#define chmax(x, v) \
do { \
x = max(x, v); ... | replace | 20 | 24 | 20 | 32 | TLE | |
p02840 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using int32 = int_fast32_t;
using int64 = int_fast64_t;
const int32 INF = 1e9;
const int32 MOD = 1e9 + 7;
const int64 LLINF = 1e18;
#define YES(n) cout << ((n) ? "YES\n" : "NO\n")
#define Yes(n) cout << ((n) ? "Yes\n" : "No\n")
#define POSSIBLE cout << ((n) ? "POSSIBLE\n... | #include <bits/stdc++.h>
using namespace std;
using int32 = int_fast32_t;
using int64 = int_fast64_t;
const int32 INF = 1e9;
const int32 MOD = 1e9 + 7;
const int64 LLINF = 1e18;
#define YES(n) cout << ((n) ? "YES\n" : "NO\n")
#define Yes(n) cout << ((n) ? "Yes\n" : "No\n")
#define POSSIBLE cout << ((n) ? "POSSIBLE\n... | insert | 27 | 27 | 27 | 37 | 0 | |
p02840 | C++ | Runtime Error | #include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <deque>
#include <fstream>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <st... | #include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <deque>
#include <fstream>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <st... | insert | 32 | 32 | 32 | 40 | 0 | |
p02840 | C++ | Runtime Error | // #pragma GCC target("avx") // CPU 処理並列化
// #pragma GCC optimize("O3") // CPU 処理並列化
// #pragma GCC optimize("unroll-loops") // 条件処理の呼び出しを減らす
#include <algorithm>
#include <bitset>
#include <cassert>
#include <complex>
#include <deque>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <se... | // #pragma GCC target("avx") // CPU 処理並列化
// #pragma GCC optimize("O3") // CPU 処理並列化
// #pragma GCC optimize("unroll-loops") // 条件処理の呼び出しを減らす
#include <algorithm>
#include <bitset>
#include <cassert>
#include <complex>
#include <deque>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <se... | insert | 124 | 124 | 124 | 132 | 0 | |
p02840 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define FOR(i, n, m) for (int i = (int)(n); i <= (int)(m); i++)
#define RFOR(i, n, m) for (int i = (int)(n); i >= (int)(m); i--)
#define ITR(x, c) for (__typeof(c.begin()) x = c.begin(); x != c.end(); x++)
#define RITR(x, c) for (__typeof(c.... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define FOR(i, n, m) for (int i = (int)(n); i <= (int)(m); i++)
#define RFOR(i, n, m) for (int i = (int)(n); i >= (int)(m); i--)
#define ITR(x, c) for (__typeof(c.begin()) x = c.begin(); x != c.end(); x++)
#define RITR(x, c) for (__typeof(c.... | replace | 51 | 52 | 51 | 56 | 0 | |
p02840 | C++ | Runtime Error | #pragma region
#include <bits/stdc++.h>
using namespace std;
/*
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
*/
#define int long long
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define RREP(i, n) for (int i = (int)n - 1; i >= 0; i--)
#define FOR(i, s,... | #pragma region
#include <bits/stdc++.h>
using namespace std;
/*
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
*/
#define int long long
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define RREP(i, n) for (int i = (int)n - 1; i >= 0; i--)
#define FOR(i, s,... | replace | 177 | 181 | 177 | 187 | 0 | |
p02840 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
// const ll MOD = 1000000007;
const ll MOD = 998244353;
const ll INF = MOD * MOD;
const long double EPS = 1e-12;
struct mint {
ll x;
mint(ll x = 0) : x((x % MOD + MOD) % MOD) {}
mint operator-() const { return mint(-x); }... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
// const ll MOD = 1000000007;
const ll MOD = 998244353;
const ll INF = MOD * MOD;
const long double EPS = 1e-12;
struct mint {
ll x;
mint(ll x = 0) : x((x % MOD + MOD) % MOD) {}
mint operator-() const { return mint(-x); }... | replace | 2,008 | 2,009 | 2,008 | 2,013 | 0 | |
p02840 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <set>
#include <vector>
using namespace std;
long long n, x, d;
long long smin[500000];
long long smax[500000];
map<int, vector<pair<long long, long long>>> st;
int main() {
ios_... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <set>
#include <vector>
using namespace std;
long long n, x, d;
long long smin[500000];
long long smax[500000];
map<int, vector<pair<long long, long long>>> st;
int main() {
ios_... | insert | 22 | 22 | 22 | 30 | 0 | |
p02840 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
typedef long double ld;
ll mod = 1e9 + 7;
const ld error = 1e-5;
const ld PI = acosl(-1); // const ld PI = acosl(-1)
#define FASTIO \
ios_base::... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
typedef long double ld;
ll mod = 1e9 + 7;
const ld error = 1e-5;
const ld PI = acosl(-1); // const ld PI = acosl(-1)
#define FASTIO \
ios_base::... | insert | 46 | 46 | 46 | 55 | 0 | |
p02840 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
// #define int long long
// TEMPLATE
// START---------------8<---------------8<---------------8<---------------8<---------------//
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<ll> ... | #include <bits/stdc++.h>
using namespace std;
// #define int long long
// TEMPLATE
// START---------------8<---------------8<---------------8<---------------8<---------------//
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<ll> ... | replace | 326 | 328 | 326 | 330 | 0 | |
p02840 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
const ll M = 1e9 + 7;
const ll INF ... | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
const ll M = 1e9 + 7;
const ll INF ... | insert | 27 | 27 | 27 | 37 | 0 | |
p02840 | C++ | Runtime Error | #ifdef LOCAL
#define _GLIBCXX_DEBUG
#endif
#include <bits/stdc++.h>
using namespace std;
#define rep(i, s, t) for (ll i = (ll)(s); i < (ll)(t); i++)
#define rrep(i, s, t) for (ll i = (ll)(s - 1); (ll)(t) <= i; i--)
#define all(x) (x).begin(), (x).end()
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> ... | #ifdef LOCAL
#define _GLIBCXX_DEBUG
#endif
#include <bits/stdc++.h>
using namespace std;
#define rep(i, s, t) for (ll i = (ll)(s); i < (ll)(t); i++)
#define rrep(i, s, t) for (ll i = (ll)(s - 1); (ll)(t) <= i; i--)
#define all(x) (x).begin(), (x).end()
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> ... | replace | 77 | 79 | 77 | 81 | 0 | |
p02840 | C++ | Runtime Error | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
long long int gcd(long long int a, long long int b) {
if ((a % b) == 0)
return b;
return gcd(b, a % b);
}
long long int kansu(long long int p, long long int q, long long int pp,
... | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
long long int gcd(long long int a, long long int b) {
if ((a % b) == 0)
return b;
return gcd(b, a % b);
}
long long int kansu(long long int p, long long int q, long long int pp,
... | replace | 41 | 43 | 41 | 44 | 0 | |
p02840 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<ll, int> P;
const int INF = (1 << 30);
const ll INFLL = (1ll << 60);
const ll MOD = (ll)(1e9 + 7);
#define l_ength size
void mul_mod(ll &a, ll b) {
a *= b;
a %= MOD;
}
void add_mod(ll &a, ll b) {
a = (a < MOD) ? a : (a - MOD);
b... | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<ll, int> P;
const int INF = (1 << 30);
const ll INFLL = (1ll << 60);
const ll MOD = (ll)(1e9 + 7);
#define l_ength size
void mul_mod(ll &a, ll b) {
a *= b;
a %= MOD;
}
void add_mod(ll &a, ll b) {
a = (a < MOD) ? a : (a - MOD);
b... | insert | 33 | 33 | 33 | 37 | 0 | |
p02840 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
using namespace std;
struct line {
ll l, r;
bool operator<(const line &rhs) const { return r < rhs.l; }
};
unordered_map<int, set<line>> eq;
void add(int ind, ll l, ll r) {
line x = {l, r};
while (1) {
auto it = eq[ind].find(x);
if (it == eq[ind].end())
... | #include <bits/stdc++.h>
#define ll long long
using namespace std;
struct line {
ll l, r;
bool operator<(const line &rhs) const { return r < rhs.l; }
};
unordered_map<int, set<line>> eq;
void add(int ind, ll l, ll r) {
line x = {l, r};
while (1) {
auto it = eq[ind].find(x);
if (it == eq[ind].end())
... | insert | 22 | 22 | 22 | 26 | 0 | |
p02840 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define Fast_IO ios::sync_with_stdio(false);
#define int long long
inline int read() {
char ch = getchar();
int nega = 1;
while (!isdigit(ch)) {
if (ch == '-')
nega = -1;
ch = getchar();
}
int ans = 0;
whil... | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define Fast_IO ios::sync_with_stdio(false);
#define int long long
inline int read() {
char ch = getchar();
int nega = 1;
while (!isdigit(ch)) {
if (ch == '-')
nega = -1;
ch = getchar();
}
int ans = 0;
whil... | insert | 31 | 31 | 31 | 35 | 0 | |
p02840 | C++ | Runtime Error | #include <iostream>
#include <list>
#include <map>
#include <utility>
#include <vector>
using namespace std;
void merge(list<pair<long long, long long>> &L, long long mn, long long mx) {
for (auto p = L.begin(); p != L.end();) {
if (mn <= p->first && p->second <= mx) {
p = L.erase(p);
} else if (p->fir... | #include <iostream>
#include <list>
#include <map>
#include <utility>
#include <vector>
using namespace std;
void merge(list<pair<long long, long long>> &L, long long mn, long long mx) {
for (auto p = L.begin(); p != L.end();) {
if (mn <= p->first && p->second <= mx) {
p = L.erase(p);
} else if (p->fir... | insert | 36 | 36 | 36 | 41 | 0 | |
p02840 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define Inf 1000000000000000000
#define nmax_def 110000
#define mod 1000000007
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
using na... | #include <algorithm>
#include <cmath>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define Inf 1000000000000000000
#define nmax_def 110000
#define mod 1000000007
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
using na... | replace | 53 | 54 | 53 | 54 | 0 | |
p02840 | C++ | Runtime Error | // clang-format off
#include <iostream>
#include <iomanip>
#include <fstream>
#include <sstream>
#include <string>
#include <algorithm>
#include <numeric>
#include <limits>
#include <chrono>
#include <functional>
#include <iterator>
#include <random>
#include <complex>
#include <utility>
#include <type_traits>
#includ... | // clang-format off
#include <iostream>
#include <iomanip>
#include <fstream>
#include <sstream>
#include <string>
#include <algorithm>
#include <numeric>
#include <limits>
#include <chrono>
#include <functional>
#include <iterator>
#include <random>
#include <complex>
#include <utility>
#include <type_traits>
#includ... | replace | 100 | 101 | 100 | 104 | 0 | |
p02840 | C++ | Runtime Error | // warm heart, wagging tail,and a smile just for you!
// ███████████
// ███╬╬╬╬╬╬╬╬╬╬███
// ███╬╬╬╬╬████╬╬╬╬╬╬███
// ... | // warm heart, wagging tail,and a smile just for you!
// ███████████
// ███╬╬╬╬╬╬╬╬╬╬███
// ███╬╬╬╬╬████╬╬╬╬╬╬███
// ... | insert | 88 | 88 | 88 | 96 | 0 | |
p02840 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <ciso646>
#include <cmath>
#include <complex>
#include <cstdio>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#incl... | #include <algorithm>
#include <bitset>
#include <ciso646>
#include <cmath>
#include <complex>
#include <cstdio>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#incl... | insert | 46 | 46 | 46 | 54 | 0 | |
p02840 | C++ | Runtime Error | #include <algorithm>
#include <map>
#include <stdio.h>
using namespace std;
long long N, X, D;
int main() {
scanf("%lld %lld %lld", &N, &X, &D);
map<long long, map<long long, int>> cnt;
for (long long i = 0; i <= N; i++) {
long long r = i * X % D;
long long s = (i * X / D) + i * (i - 1) / 2;
long lo... | #include <algorithm>
#include <map>
#include <stdio.h>
using namespace std;
long long N, X, D;
int main() {
scanf("%lld %lld %lld", &N, &X, &D);
if (D == 0) {
if (X)
printf("%lld\n", N + 1);
else
puts("1");
return 0;
}
map<long long, map<long long, int>> cnt;
for (long long i = 0; i... | insert | 9 | 9 | 9 | 17 | 0 | |
p02840 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, int> ii;
unordered_map<ll, vector<ii>> m;
ll gcd(ll a, ll b) { return a == 0 ? b : gcd(b % a, a); }
int main() {
ll n, x, d;
scanf("%lld%lld%lld", &n, &x, &d);
ll l = 0, r = 0;
for (int i = 0; i <= n; i++) {
ll k = (i * x) ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, int> ii;
unordered_map<ll, vector<ii>> m;
ll gcd(ll a, ll b) { return a == 0 ? b : gcd(b % a, a); }
int main() {
ll n, x, d;
scanf("%lld%lld%lld", &n, &x, &d);
ll l = 0, r = 0;
if (d == 0) {
if (x == 0) {
printf("1");... | insert | 10 | 10 | 10 | 18 | 0 | |
p02840 | C++ | Runtime Error | #include <bits/stdc++.h>
#define long long long int
using namespace std;
// @author: pashka
long prog(long x) { return x * (x - 1) / 2; }
int main() {
ios::sync_with_stdio(false);
int n;
long x, d;
cin >> n >> x >> d;
if (d < 0) {
x = -x;
d = -d;
}
map<int, vector<pair<long, long>>> seg;
f... | #include <bits/stdc++.h>
#define long long long int
using namespace std;
// @author: pashka
long prog(long x) { return x * (x - 1) / 2; }
int main() {
ios::sync_with_stdio(false);
int n;
long x, d;
cin >> n >> x >> d;
if (d < 0) {
x = -x;
d = -d;
}
if (d == 0) {
if (x == 0) {
cout <... | insert | 17 | 17 | 17 | 26 | 0 | |
p02840 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
#define x first
#define y second
#ifdef LOCAL
#include "/Users/swad/Desktop/CP/debug.h"
#endif
const int N = int(2e5) + 10;
ll n, x, d;
ll pref[N], suff[N];
map<ll, ll> series_from;
int main() {
#ifdef LOCAL
freopen(... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
#define x first
#define y second
#ifdef LOCAL
#include "/Users/swad/Desktop/CP/debug.h"
#endif
const int N = int(2e5) + 10;
ll n, x, d;
ll pref[N], suff[N];
map<ll, ll> series_from;
int main() {
#ifdef LOCAL
freopen(... | insert | 26 | 26 | 26 | 34 | 0 | |
p02840 | C++ | Runtime Error | #include <bits/stdc++.h>
#define MAX_N 200000
using namespace std;
typedef long long lint;
int n;
struct elem {
lint r;
lint st, dr;
};
int m;
elem v[MAX_N + 1];
lint x, d;
struct cmp {
bool operator()(const elem &a, const elem &b) const {
if (a.r != b.r)
return a.r < b.r;
return a.st < b.s... | #include <bits/stdc++.h>
#define MAX_N 200000
using namespace std;
typedef long long lint;
int n;
struct elem {
lint r;
lint st, dr;
};
int m;
elem v[MAX_N + 1 + 1];
lint x, d;
struct cmp {
bool operator()(const elem &a, const elem &b) const {
if (a.r != b.r)
return a.r < b.r;
return a.st <... | replace | 16 | 17 | 16 | 17 | 0 | |
p02840 | C++ | Runtime Error | #define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define rep1(i, n) for (int i = 1; i < (int)(n); ++i)
#define repeq(i, n) for (int i = 0; i <= (int)(n); ++i)
#define rep1eq(i, n) for (int i = 1; i <= (int)(n); ++i)
#define rrep(i, n) for (int ... | #define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define rep1(i, n) for (int i = 1; i < (int)(n); ++i)
#define repeq(i, n) for (int i = 0; i <= (int)(n); ++i)
#define rep1eq(i, n) for (int i = 1; i <= (int)(n); ++i)
#define rrep(i, n) for (int ... | replace | 120 | 121 | 120 | 121 | 0 | |
p02840 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using lli = long long int;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
lli X, D;
lli n, i, j, k;
cin >> n >> X >> D;
if (D < 0) {
X = X + (n - 1) * D;
D = -D;
}
/*
cout << "n = " << n << " X = " << X << " D = " << D << end... | #include <bits/stdc++.h>
using namespace std;
using lli = long long int;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
lli X, D;
lli n, i, j, k;
cin >> n >> X >> D;
if (D < 0) {
X = X + (n - 1) * D;
D = -D;
}
if (D == 0) {
if (X == 0) {
cout << 1;
} else {
... | insert | 19 | 19 | 19 | 28 | 0 | |
p02840 | C++ | Runtime Error | #line 1 "base.hpp" // 6
#ifndef __clang__
#pragma GCC optimize("O3")
#endif
void solve(
#ifdef GCJ_CASE
long long case_id
#endif
);
#if defined(EBUG) && !defined(ONLINE_JUDGE)
#define debug true
#define _GLIBCXX_DEBUG
// #define _LIBCPP_DEBUG 0
#define _LIBCPP_DEBUG2 0
#else
#define NDEBUG
#define debug false
#endi... | #line 1 "base.hpp" // 6
#ifndef __clang__
#pragma GCC optimize("O3")
#endif
void solve(
#ifdef GCJ_CASE
long long case_id
#endif
);
#if defined(EBUG) && !defined(ONLINE_JUDGE)
#define debug true
#define _GLIBCXX_DEBUG
// #define _LIBCPP_DEBUG 0
#define _LIBCPP_DEBUG2 0
#else
#define NDEBUG
#define debug false
#endi... | replace | 284 | 285 | 284 | 285 | 0 | |
p02840 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <vector>
using namespace std;
int main() {
const long long L = 100000000LL * 200000 + 199999LL * 100000LL * 100000000LL;
int N;
long long X, sD;
while (cin >> N >> X >> sD) {
map<int, vector<pair<long long, long long>>> mp;
... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <vector>
using namespace std;
int main() {
const long long L = 100000000LL * 200000 + 199999LL * 100000LL * 100000000LL;
int N;
long long X, sD;
while (cin >> N >> X >> sD) {
map<int, vector<pair<long long, long long>>> mp;
... | insert | 15 | 15 | 15 | 19 | 0 | |
p02840 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define INF_LL (int64)1e18
#define INF (int32)1e9
#define REP(i, n) for (int64 i = 0; i < (n); i++)
#define FOR(i, a, b) for (int64 i = (a); i < (b); i++)
#define all(x) x.begin(), x.end()
#define fs first
#define sc second
using int32 = int_fast32_t;
using uint32 = uint_... | #include <bits/stdc++.h>
using namespace std;
#define INF_LL (int64)1e18
#define INF (int32)1e9
#define REP(i, n) for (int64 i = 0; i < (n); i++)
#define FOR(i, a, b) for (int64 i = (a); i < (b); i++)
#define all(x) x.begin(), x.end()
#define fs first
#define sc second
using int32 = int_fast32_t;
using uint32 = uint_... | replace | 139 | 140 | 139 | 140 | 0 | |
p02840 | C++ | Runtime Error | #ifndef DEBUG
#define NDEBUG
#endif
#include <algorithm>
#include <cassert>
#include <iostream>
#include <iterator>
#include <limits>
#include <numeric>
#include <set>
#include <string>
#include <type_traits>
#include <utility>
#include <vector>
using namespace std;
// template {{{
// misc {{{
using Z = long long;
[[... | #ifndef DEBUG
#define NDEBUG
#endif
#include <algorithm>
#include <cassert>
#include <iostream>
#include <iterator>
#include <limits>
#include <numeric>
#include <set>
#include <string>
#include <type_traits>
#include <utility>
#include <vector>
using namespace std;
// template {{{
// misc {{{
using Z = long long;
[[... | insert | 134 | 134 | 134 | 138 | 0 | |
p02840 | C++ | Runtime Error | // includes
#include <bits/stdc++.h>
using namespace std;
// macros
#define pb emplace_back
#define mk make_pair
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define rep(i, n) FOR(i, 0, n)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--)
#define irep(itr, st) for (auto itr = (st).begin(); itr != (st)... | // includes
#include <bits/stdc++.h>
using namespace std;
// macros
#define pb emplace_back
#define mk make_pair
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define rep(i, n) FOR(i, 0, n)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--)
#define irep(itr, st) for (auto itr = (st).begin(); itr != (st)... | insert | 169 | 169 | 169 | 175 | 0 | |
p02840 | C++ | Runtime Error | #include <bits/stdc++.h>
#define pi 3.1415926535897932384626
using namespace std;
struct P {
long long x, y;
bool operator<(const P &a) const {
// if(y!=a.y)
return y > a.y;
};
};
int a, b, c, d, i, k, n, m, e, dx[10] = {1, 0, -1, 0, 1, 1, -1, -1},
dy[10] = {0, 1, 0, -1, 1... | #include <bits/stdc++.h>
#define pi 3.1415926535897932384626
using namespace std;
struct P {
long long x, y;
bool operator<(const P &a) const {
// if(y!=a.y)
return y > a.y;
};
};
int a, b, c, d, i, k, n, m, e, dx[10] = {1, 0, -1, 0, 1, 1, -1, -1},
dy[10] = {0, 1, 0, -1, 1... | insert | 45 | 45 | 45 | 52 | 0 | |
p02840 | C++ | Runtime Error | #include <bits/stdc++.h>
#define syosu(x) fixed << setprecision(x)
using namespace std;
typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
typedef pair<int, int> P;
typedef pair<double, double> pdd;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<do... | #include <bits/stdc++.h>
#define syosu(x) fixed << setprecision(x)
using namespace std;
typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
typedef pair<int, int> P;
typedef pair<double, double> pdd;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<do... | insert | 43 | 43 | 43 | 44 | 0 | |
p02840 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef pair<LL, LL> pll;
#define pb push_back
#define mp make_pair
const int N = 2e5 + 10;
int n;
LL X, D;
stack<pll> V[N];
unordered_map<LL, int> MP;
int getidx(LL v) {
if (MP.count(v)) {
return MP[v];
}
int m = MP.size();
return MP[... | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef pair<LL, LL> pll;
#define pb push_back
#define mp make_pair
const int N = 2e5 + 10;
int n;
LL X, D;
stack<pll> V[N];
unordered_map<LL, int> MP;
int getidx(LL v) {
if (MP.count(v)) {
return MP[v];
}
int m = MP.size();
return MP[... | insert | 28 | 28 | 28 | 38 | -6 | terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
|
p02840 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
const ll INF = 1ll << 60;
typedef pair<ll, ll> P;
int main() {
ll n, x, d;
cin >> n >> x >> d;
map<int, vector<P>> mp;
rep(i, n + 1) {
ll s = x * i;
ll l = (ll)i * (i - 1) / 2;
ll r... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
const ll INF = 1ll << 60;
typedef pair<ll, ll> P;
int main() {
ll n, x, d;
cin >> n >> x >> d;
if (d == 0) {
if (x == 0) {
cout << 1 << endl;
} else {
cout << n + 1 << endl;
... | insert | 12 | 12 | 12 | 22 | 0 | |
p02840 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <ciso646>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <ciso646>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <... | insert | 66 | 66 | 66 | 74 | 0 | |
p02840 | C++ | Runtime Error | // template version 1.14
using namespace std;
#include <bits/stdc++.h>
// varibable settings
#define int long long
const int INF = 1e18;
const int MOD = 1e9 + 7;
// define basic macro {{{
#define _overload3(_1, _2, _3, name, ...) name
#define _rep(i, n) repi(i, 0, n)
#define repi(i, a, b) for (int i = (int)(a); i < (... | // template version 1.14
using namespace std;
#include <bits/stdc++.h>
// varibable settings
#define int long long
const int INF = 1e18;
const int MOD = 1e9 + 7;
// define basic macro {{{
#define _overload3(_1, _2, _3, name, ...) name
#define _rep(i, n) repi(i, 0, n)
#define repi(i, a, b) for (int i = (int)(a); i < (... | insert | 71 | 71 | 71 | 81 | 0 | |
p02841 | C++ | Time Limit Exceeded |
#include <algorithm>
#include <array>
#include <bitset>
#include <cstdlib>
#include <ctime>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <type_traits>
#include <utility>
#incl... |
#include <algorithm>
#include <array>
#include <bitset>
#include <cstdlib>
#include <ctime>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <type_traits>
#include <utility>
#incl... | replace | 61 | 62 | 61 | 62 | TLE | |
p02841 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define lld long long int
void deepu() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
freopen("error.txt", "w", stderr);
#endif
}
int main() {
deepu();
int... | #include <bits/stdc++.h>
using namespace std;
#define lld long long int
void deepu() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
freopen("error.txt", "w", stderr);
#endif
}
int main() {
// deepu();
... | replace | 15 | 16 | 15 | 16 | 0 | |
p02841 | C++ | Runtime Error | #include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define fst first
#define snd second
#define all(cont) cont.begin(), cont.end()
#define foreach(it, l) for (auto it = l.begin(); it != l.end(); it++)
#define fore(i, a, b) for (int i = a, almo5t = b; i < almo5t; ++i)
#define SZ(x) ((int)x.size())
#defin... | #include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define fst first
#define snd second
#define all(cont) cont.begin(), cont.end()
#define foreach(it, l) for (auto it = l.begin(); it != l.end(); it++)
#define fore(i, a, b) for (int i = a, almo5t = b; i < almo5t; ++i)
#define SZ(x) ((int)x.size())
#defin... | replace | 25 | 29 | 25 | 26 | 0 | |
p02841 | C++ | Time Limit Exceeded | #include "bits/stdc++.h"
#include <string>
using namespace std;
using ll = long long int;
using ull = unsigned long long int;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
const double PI = acos(-1.0);
const int MOD = pow(10, 9) + 7;
#define YES(n) cout << ((n) ? "YES" : "NO") << endl... | #include "bits/stdc++.h"
#include <string>
using namespace std;
using ll = long long int;
using ull = unsigned long long int;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
const double PI = acos(-1.0);
const int MOD = pow(10, 9) + 7;
#define YES(n) cout << ((n) ? "YES" : "NO") << endl... | replace | 94 | 95 | 94 | 95 | TLE | |
p02841 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define fi first
#define se second
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define repp(i, a, b) for (int i = a; i <= (b); ++i)
#define repr(i, a, b) for (int i = a; i >= (b); --i)
#defi... | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define fi first
#define se second
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define repp(i, a, b) for (int i = a; i <= (b); ++i)
#define repr(i, a, b) for (int i = a; i >= (b); --i)
#defi... | replace | 39 | 50 | 39 | 40 | TLE | |
p02841 | Python | Runtime Error | m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())
if m1 != m2:
print("1")
exit(1)
print("0")
| m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())
if m1 != m2:
print("1")
else:
print("0")
| replace | 5 | 8 | 5 | 7 | 0 | |
p02841 | Python | Runtime Error | M1 = int(input())
D1 = int(input())
M2 = int(input())
D2 = int(input())
if D2 == 1:
print(1)
else:
print(0)
| date_entry_1 = input()
M1, D1 = map(int, date_entry_1.split(" "))
date_entry_2 = input()
M2, D2 = map(int, date_entry_2.split(" "))
if D2 == 1:
print(1)
else:
print(0)
| replace | 0 | 4 | 0 | 4 | ValueError: invalid literal for int() with base 10: '11 16' | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02841/Python/s700613660.py", line 1, in <module>
M1 = int(input())
ValueError: invalid literal for int() with base 10: '11 16'
|
p02841 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define PI 3.14159265
using namespace std;
using ll = long long;
void self_max(int &a, int b) { a = max(a, b); }
void self_min(ll &a, ll b) { a = min(a, b); }
int main() {
int m1, d1;
cin >> m1 >> d1;
int m2, d2;
cin >> m2 >> d2;
if (m... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define PI 3.14159265
using namespace std;
using ll = long long;
void self_max(int &a, int b) { a = max(a, b); }
void self_min(ll &a, ll b) { a = min(a, b); }
int main() {
int m1, d1;
cin >> m1 >> d1;
int m2, d2;
cin >> m2 >> d2;
if (m... | replace | 15 | 16 | 15 | 18 | 0 | |
p02842 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
int k = N;
while (k >= N / 2) {
int kj = k * 108;
kj /= 100;
if (kj == N) {
cout << k << endl;
return 0;
}
}
cout << ":(" << endl;
}
| #include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
int k = N;
while (k >= N / 2) {
int kj = k * 108;
kj /= 100;
if (kj == N) {
cout << k << endl;
return 0;
}
k--;
}
cout << ":(" << endl;
}
| insert | 13 | 13 | 13 | 14 | TLE | |
p02842 | C++ | Runtime Error | #include <iostream>
int main(void) {
int n;
std::cin >> n;
for (int i = n / 2; i < n; i++) {
if (static_cast<int>(i * 1.08) == n) {
std::cout << i << std::endl;
return 1;
}
}
std::cout << ":(" << std::endl;
} | #include <iostream>
int main(void) {
int n;
std::cin >> n;
int a = n / 1.08;
int b = a * 1.08;
int c = (a + 1) * 1.08;
if (b == n)
std::cout << a << std::endl;
else if (c == n)
std::cout << a + 1 << std::endl;
else
std::cout << ":(" << std::endl;
} | replace | 4 | 11 | 4 | 13 | 1 | |
p02842 | C++ | Time Limit Exceeded | #include <iostream>
int main() {
int N;
std::cin >> N;
int X = N * 25 / 27;
for (;;) {
int n = 27 * X / 25;
if (n == N)
break;
if (n > N) {
std::cout << ":(" << std::endl;
return 0;
}
}
std::cout << X << std::endl;
return 0;
}
| #include <iostream>
int main() {
int N;
std::cin >> N;
int X = N * 25 / 27;
for (;; ++X) {
int n = 27 * X / 25;
if (n == N)
break;
if (n > N) {
std::cout << ":(" << std::endl;
return 0;
}
}
std::cout << X << std::endl;
return 0;
}
| replace | 6 | 7 | 6 | 7 | TLE | |
p02842 | C++ | Runtime Error | #include <bits/stdc++.h>
#define fr(i, n) for (int i = 0; i < (n); ++i)
#define foor(i, a, b) for (int i = (a); i <= (b); ++i)
#define rf(i, n) for (int i = (n); i-- > 0;)
#define roof(i, b, a) for (int i = (b); i >= (a); --i)
#define elsif else if
#define all(x) x.begin(), x.end()
#define Sort(x) sort(all(x))
#define ... | #include <bits/stdc++.h>
#define fr(i, n) for (int i = 0; i < (n); ++i)
#define foor(i, a, b) for (int i = (a); i <= (b); ++i)
#define rf(i, n) for (int i = (n); i-- > 0;)
#define roof(i, b, a) for (int i = (b); i >= (a); --i)
#define elsif else if
#define all(x) x.begin(), x.end()
#define Sort(x) sort(all(x))
#define ... | replace | 684 | 685 | 684 | 688 | -6 | double free or corruption (!prev)
|
p02842 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
typedef unsigned long long int ll;
#define fastio ios_base::sync_with_stdio(false);
#define rep(i, start, end) for (int i = start; i < end; i++)
using namespace std;
// debugger template
#define error(args...) \
{ ... | #include <bits/stdc++.h>
typedef unsigned long long int ll;
#define fastio ios_base::sync_with_stdio(false);
#define rep(i, start, end) for (int i = start; i < end; i++)
using namespace std;
// debugger template
#define error(args...) \
{ ... | insert | 36 | 36 | 36 | 39 | TLE | |
p02842 | Python | Runtime Error | N = int(input())
for x in range(1, 50_000):
if int(x * 1.08) == N:
print(x)
exit()
print(":(")
| N = int(input())
for x in range(1, 50000):
if int(x * 1.08) == N:
print(x)
exit()
print(":(")
| replace | 1 | 2 | 1 | 2 | 0 | |
p02842 | C++ | Runtime Error | #include <iostream>
#define ALL(a) (a).begin(), (a).end()
#define FOR(i, m, n) for (int(i) = (m); (i) < (n); i++)
#define REP(i, n) for (int(i) = 0; (i) < (n); (i)++)
//------
#define R2(i, in, j, jn) REP(i, in) REP(j, jn)
using namespace std;
int main(void) {
int I;
cin >> I;
int z;
z = (I / 1.08); // zeinuk... | #include <iostream>
#define ALL(a) (a).begin(), (a).end()
#define FOR(i, m, n) for (int(i) = (m); (i) < (n); i++)
#define REP(i, n) for (int(i) = 0; (i) < (n); (i)++)
//------
#define R2(i, in, j, jn) REP(i, in) REP(j, jn)
using namespace std;
int main(void) {
int I;
cin >> I;
int z;
z = (I / 1.08); // zeinuk... | replace | 23 | 24 | 23 | 24 | 0 | |
p02843 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define ll long long
#define P pair<ll, ll>
#define all(v) (v).begin(), (v).end()
const ll mod = 1e9 + 7;
const ll INF = 1e18;
const double pi = acos(-1.0);
int main(void) {
ll x;
cin >> x;
bool ... | #include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define ll long long
#define P pair<ll, ll>
#define all(v) (v).begin(), (v).end()
const ll mod = 1e9 + 7;
const ll INF = 1e18;
const double pi = acos(-1.0);
int main(void) {
ll x;
cin >> x;
bool ... | replace | 15 | 16 | 15 | 16 | 0 | |
p02843 | C++ | Runtime Error | #include <bits/stdc++.h>
using u32 = uint32_t;
using u64 = uint64_t;
using i32 = int32_t;
using i64 = int64_t;
int main() {
std::ios_base::sync_with_stdio(0);
u32 price101 = 101, price102 = 102, price103 = 103, price104 = 104,
price105 = 105;
i32 money;
std::cin >> money;
std::stringstream stream;
... | #include <bits/stdc++.h>
using u32 = uint32_t;
using u64 = uint64_t;
using i32 = int32_t;
using i64 = int64_t;
int main() {
std::ios_base::sync_with_stdio(0);
u32 price101 = 101, price102 = 102, price103 = 103, price104 = 104,
price105 = 105;
i32 money;
std::cin >> money;
if (money < 100) {
std... | insert | 15 | 15 | 15 | 20 | 0 | |
p02843 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; ++i)
typedef long long ll;
const ll MOD = 1e9 + 7;
int main() {
int x;
cin >> x;
int n = x / 100;
x %= 100;
for (int a0 = 0; a0 <= n; ++a0) {
for (int a1 = 0; a0 + a1 <= n; ++a1) {
for (int a2 = 0; a0 + a1 + a2 <... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; ++i)
typedef long long ll;
const ll MOD = 1e9 + 7;
int main() {
int x;
cin >> x;
int n = x / 100;
x %= 100;
for (int a0 = 0; a0 <= n; ++a0) {
for (int a1 = 0; a0 + a1 <= n && a1 <= x; ++a1) {
for (int a2 = 0; a0 ... | replace | 12 | 16 | 12 | 21 | TLE | |
p02843 | C++ | Runtime Error | #include "bits/stdc++.h"
#define rep(i, a) for (int i = 0; i < (a); ++i)
#define REP(i, a, b) for (int i = (a); i < (b); ++i)
#define FORV(a, A) for (auto &a : A)
using namespace std;
using ll = long long;
using P = pair<int, int>;
void Main() {
int x;
cin >> x;
int n = x / 100;
if ((x % 100) / n < 5) {
... | #include "bits/stdc++.h"
#define rep(i, a) for (int i = 0; i < (a); ++i)
#define REP(i, a, b) for (int i = (a); i < (b); ++i)
#define FORV(a, A) for (auto &a : A)
using namespace std;
using ll = long long;
using P = pair<int, int>;
void Main() {
int x;
cin >> x;
int n = x / 100;
if (n == 0) {
cout << 0 <... | insert | 14 | 14 | 14 | 18 | 0 | |
p02843 | C++ | Runtime Error | // #pragma GCC target("avx2")
// #pragma GCC optimization("O3")
// #pragma GCC optimization("unroll-loops")
// assert(q==w) если q!=w --> runtime error
#include <bits/stdc++.h>
#define pb push_back
#define F first
#define S second
#define all(x) x.begin(), x.end()
#define ub upper_bound
#define lb lower_bound
#define ... | // #pragma GCC target("avx2")
// #pragma GCC optimization("O3")
// #pragma GCC optimization("unroll-loops")
// assert(q==w) если q!=w --> runtime error
#include <bits/stdc++.h>
#define pb push_back
#define F first
#define S second
#define all(x) x.begin(), x.end()
#define ub upper_bound
#define lb lower_bound
#define ... | replace | 47 | 48 | 47 | 52 | 0 | |
p02843 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
bool dfs(int k, int r, int cnt) {
bool res = false;
if (cnt == 0) {
if (r == 0 && k >= 0)
return 1;
else
return 0;
}
for (int i = 0; i <= k; i++) {
res |= dfs(k - i, r - cnt * i, cnt - 1);
}
return res;
}
int main(... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
bool dfs(int k, int r, int cnt) {
bool res = false;
if (cnt == 0) {
if (r == 0 && k >= 0)
return 1;
else
return 0;
}
for (int i = k; i >= 0; i--) {
if (r - cnt * i >= 0)
res |= dfs(k - i, r - cnt * i, cnt - 1);
... | replace | 12 | 14 | 12 | 17 | TLE | |
p02843 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
bool b = 0;
void dfs(int X) {
if (X == 100) {
b = 1;
return;
} else if (X == 101) {
b = 1;
return;
} else if (X == 102) {
b = 1;
return;
} else if (X == 103) {
b = 1;
return;
} else if (X == 104) {
b = 1;
return;
} else if... | #include <bits/stdc++.h>
using namespace std;
bool b = 0;
void dfs(int X) {
if (X == 100) {
b = 1;
return;
} else if (X == 101) {
b = 1;
return;
} else if (X == 102) {
b = 1;
return;
} else if (X == 103) {
b = 1;
return;
} else if (X == 104) {
b = 1;
return;
} else if... | replace | 36 | 38 | 36 | 55 | TLE |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.