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
p03231
C++
Time Limit Exceeded
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstdlib> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdio.h> #include <string.h> #include <...
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstdlib> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdio.h> #include <string.h> #include <...
replace
77
78
77
78
TLE
p03231
C++
Runtime Error
#include <bits/stdc++.h> #define PI 3.14159265358979323846 #define MAXINF (1e18L) #define INF (1e9L) #define EPS (1e-9) #define MOD ((ll)(1e9 + 7)) #define REP(i, n) for (int i = 0; i < int(n); ++i) #define Rep(i, sta, n) for (int i = sta; i < n; i++) #define RREP(i, n) for (int i = int(n) - 1; i >= 0; --i) #define ALL...
#include <bits/stdc++.h> #define PI 3.14159265358979323846 #define MAXINF (1e18L) #define INF (1e9L) #define EPS (1e-9) #define MOD ((ll)(1e9 + 7)) #define REP(i, n) for (int i = 0; i < int(n); ++i) #define Rep(i, sta, n) for (int i = sta; i < n; i++) #define RREP(i, n) for (int i = int(n) - 1; i >= 0; --i) #define ALL...
insert
70
70
70
72
0
p03231
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x, to) for (x = 0; x < (to); x++) #define FORR(x, arr) for (auto &x : arr) #define ITR(x, c) for (__typeof(c.begin()) x = c.begin(); x != c.end(); x++) #define ALL(a) (a.begin()),...
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x, to) for (x = 0; x < (to); x++) #define FORR(x, arr) for (auto &x : arr) #define ITR(x, c) for (__typeof(c.begin()) x = c.begin(); x != c.end(); x++) #define ALL(a) (a.begin()),...
replace
49
50
49
50
0
p03231
C++
Runtime Error
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <vector> using namespace std; char a[10005], b[10005]; map<long long, char> vis; long long gcd(long long x, long long y) { while (y) { x %= y; swap(x, y); } return x; } i...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <vector> using namespace std; char a[100005], b[100005]; map<long long, char> vis; long long gcd(long long x, long long y) { while (y) { x %= y; swap(x, y); } return x; }...
replace
9
10
9
10
0
p03231
C++
Runtime Error
#include "bits/stdc++.h" #include <set> using namespace std; #define FOR(i, a, b) for (int i = (a); i < (b); i++) #define RFOR(i, a, b) for (int i = (b)-1; i >= (a); i--) #define rep(i, n) for (int i = 0; i < (n); i++) #define rep1(i, n) for (int i = 1; i < (n); i++) #define rrep(i, n) for (int i = (n)-1; i >= 0; i--)...
#include "bits/stdc++.h" #include <set> using namespace std; #define FOR(i, a, b) for (int i = (a); i < (b); i++) #define RFOR(i, a, b) for (int i = (b)-1; i >= (a); i--) #define rep(i, n) for (int i = 0; i < (n); i++) #define rep1(i, n) for (int i = 1; i < (n); i++) #define rrep(i, n) for (int i = (n)-1; i >= 0; i--)...
replace
46
52
46
54
0
p03232
Python
Runtime Error
import sys fin = sys.stdin.readline def factorial(n, mod): if n == 0: return 1 else: return n * factorial(n - 1, mod) % mod MOD = 10**9 + 7 N = int(fin()) A_list = [int(elem) for elem in fin().split()] fac_N = factorial(N, MOD) inv_nums = [fac_N * pow(i, MOD - 2, MOD) % MOD for i in range(...
import sys fin = sys.stdin.readline sys.setrecursionlimit(200000) def factorial(n, mod): if n == 0: return 1 else: return n * factorial(n - 1, mod) % mod MOD = 10**9 + 7 N = int(fin()) A_list = [int(elem) for elem in fin().split()] fac_N = factorial(N, MOD) inv_nums = [fac_N * pow(i, MOD -...
insert
3
3
3
4
0
p03232
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, n) for ((i) = 1; (i) <= (n); (i)++) #define foreach(c, itr) \ for (__typeof((c).begin()) itr = (c).begin(); itr != (c).end(); ++itr) using namespace std; const int mod = 1e9 + 7; int n, i, j, f[100005], inv[100005], ans; in...
#include <bits/stdc++.h> #define rep(i, n) for ((i) = 1; (i) <= (n); (i)++) #define foreach(c, itr) \ for (__typeof((c).begin()) itr = (c).begin(); itr != (c).end(); ++itr) using namespace std; const int mod = 1e9 + 7; int n, i, j, f[100005], inv[100005], ans; in...
replace
17
18
17
18
0
p03232
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <vector> using namespace std; long long read() { long long x = 0, w = 1; char ch = getchar(); while (!isdigit(ch)) w = ch == '-' ? -1 : 1, ch = getchar(); wh...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <vector> using namespace std; long long read() { long long x = 0, w = 1; char ch = getchar(); while (!isdigit(ch)) w = ch == '-' ? -1 : 1, ch = getchar(); wh...
delete
26
30
26
26
TLE
p03232
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define MN 1000 #define MOD 1000000007 int a[MN + 5], r[MN + 5]; inline int inv(int x) { int y = MOD - 2, r = 1; for (; y; y >>= 1, x = 1LL * x * x % MOD) if (y & 1) r = 1LL * r * x % MOD; return r; } int main() { int n, i, ans = 0; scanf("%d", &n); fo...
#include <bits/stdc++.h> using namespace std; #define MN 100000 #define MOD 1000000007 int a[MN + 5], r[MN + 5]; inline int inv(int x) { int y = MOD - 2, r = 1; for (; y; y >>= 1, x = 1LL * x * x % MOD) if (y & 1) r = 1LL * r * x % MOD; return r; } int main() { int n, i, ans = 0; scanf("%d", &n); ...
replace
2
3
2
3
0
p03232
C++
Runtime Error
//~ while (clock()<=69*CLOCKS_PER_SEC) //~ #pragma comment(linker, "/stack:200000000") #pragma GCC optimize("O3") //~ #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/as...
//~ while (clock()<=69*CLOCKS_PER_SEC) //~ #pragma comment(linker, "/stack:200000000") #pragma GCC optimize("O3") //~ #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/as...
replace
60
61
60
61
0
p03232
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const long long mod = 1e9 + 7; int n; long long a[10010], ni[100010], s[100010], ans, jie[100010]; int main() { scanf("%d", &n); for (int i = 1; i <= n; ++i) scanf("%lld", &a[i]); ni[1] = 1; for (int i = 2; i <= n; ++i) ni[i] = (mod - mod / i) * ni[mod % i]...
#include <bits/stdc++.h> using namespace std; const long long mod = 1e9 + 7; int n; long long a[100010], ni[100010], s[100010], ans, jie[100010]; int main() { scanf("%d", &n); for (int i = 1; i <= n; ++i) scanf("%lld", &a[i]); ni[1] = 1; for (int i = 2; i <= n; ++i) ni[i] = (mod - mod / i) * ni[mod % i...
replace
5
6
5
6
0
p03232
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #includ...
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #includ...
replace
97
98
97
98
0
p03232
C++
Time Limit Exceeded
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> using namespace std; int read() { int x = 0, f = 1; char c = getchar(); while (!isdigit(c)) { if (c == '-') f = 0; c = getchar(); } while (isdigit(c)) { x = (x << 3) + (x << 1) + (c ^ 48); c = getchar(); } ...
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> using namespace std; int read() { int x = 0, f = 1; char c = getchar(); while (!isdigit(c)) { if (c == '-') f = 0; c = getchar(); } while (isdigit(c)) { x = (x << 3) + (x << 1) + (c ^ 48); c = getchar(); } ...
delete
27
31
27
27
TLE
p03232
C++
Runtime Error
/* _____ .' '. / 0 0 \ | ^ | | \ / | \ '---' / '._____.' */ #pragma GCC optimize("O3") #pragma GCC target("sse4") #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #include <ext/rope> using namespace std; using namespace __gnu_pbds;...
/* _____ .' '. / 0 0 \ | ^ | | \ / | \ '---' / '._____.' */ #pragma GCC optimize("O3") #pragma GCC target("sse4") #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #include <ext/rope> using namespace std; using namespace __gnu_pbds;...
replace
107
108
107
108
-11
p03232
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define DEBUG(...) fprintf(stderr, __VA_ARGS__) #define mp make_pair #define fst first #define snd second #define SZ(u) ((int)(u).size()) #define ALL(u) (u).begin(), (u).end() inline void proc_status() { ifstream t("/proc/self/status"); cerr << string(istreambuf_iter...
#include <bits/stdc++.h> using namespace std; #define DEBUG(...) fprintf(stderr, __VA_ARGS__) #define mp make_pair #define fst first #define snd second #define SZ(u) ((int)(u).size()) #define ALL(u) (u).begin(), (u).end() inline void proc_status() { ifstream t("/proc/self/status"); cerr << string(istreambuf_iter...
delete
81
86
81
81
TLE
p03232
C++
Runtime Error
// problem:agc028_b #include <bits/stdc++.h> using namespace std; #define pb push_back #define mk make_pair #define lob lower_bound #define upb upper_bound #define fst first #define scd second typedef long long ll; typedef unsigned long long ull; typedef pair<int, int> pii; typedef pair<ll, ll> pll; inline int read(...
// problem:agc028_b #include <bits/stdc++.h> using namespace std; #define pb push_back #define mk make_pair #define lob lower_bound #define upb upper_bound #define fst first #define scd second typedef long long ll; typedef unsigned long long ull; typedef pair<int, int> pii; typedef pair<ll, ll> pll; inline int read(...
insert
63
63
63
64
0
p03233
C++
Runtime Error
/**************************************************************** * Author: huhao * Email: 826538400@qq.com * Create time: 2020-02-17 15:23:07 ****************************************************************/ #include <algorithm> #include <math.h> #include <stdio.h> #include <string.h> #define fr(i, a, b) for (int ...
/**************************************************************** * Author: huhao * Email: 826538400@qq.com * Create time: 2020-02-17 15:23:07 ****************************************************************/ #include <algorithm> #include <math.h> #include <stdio.h> #include <string.h> #define fr(i, a, b) for (int ...
replace
24
25
24
25
0
p03233
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef vector<int> vi; typedef vector<ll> vl; typedef pair<int, int> pii; typedef pair<ll, ll> pll; #define REP(i, n) for (int i = 0; i < (n); ++i) #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define FORR(i,...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef vector<int> vi; typedef vector<ll> vl; typedef pair<int, int> pii; typedef pair<ll, ll> pll; #define REP(i, n) for (int i = 0; i < (n); ++i) #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define FORR(i,...
replace
38
39
38
39
0
p03233
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <functional> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <...
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <functional> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <...
replace
56
57
56
57
0
p03233
C++
Runtime Error
/*input 3 1 5 4 2 6 3 */ #include <bits/stdc++.h> #pragma GCC optimize("unroll-loops,no-stack-protector") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef pair<double, double> pdd; #defi...
/*input 3 1 5 4 2 6 3 */ #include <bits/stdc++.h> #pragma GCC optimize("unroll-loops,no-stack-protector") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef pair<double, double> pdd; #defi...
insert
76
76
76
82
0
p03233
C++
Runtime Error
#include <bits/stdc++.h> #define ll long long #define ull unsigned ll #define uint ungigned #define db double #define pii pair<int, int> #define pll pair<ll, ll> #define pli pair<ll, int> #define vi vector<int> #define vpi vector<pii> #define IT iterator #define PB push_back #define MK make_pair #define LB lower_bound...
#include <bits/stdc++.h> #define ll long long #define ull unsigned ll #define uint ungigned #define db double #define pii pair<int, int> #define pll pair<ll, ll> #define pli pair<ll, int> #define vi vector<int> #define vpi vector<pii> #define IT iterator #define PB push_back #define MK make_pair #define LB lower_bound...
replace
63
64
63
64
0
p03233
C++
Runtime Error
// In the Name of God #include <bits/stdc++.h> using namespace std; #define ll long long #define ull unsigned long long #define ld long double #define fi first #define se second #define pb push_back #define mp make_pair #define sz(a) int(a.size()) #define all(v) v.begin(), v.end() #define bpc(v) __builtin_popcountll...
// In the Name of God #include <bits/stdc++.h> using namespace std; #define ll long long #define ull unsigned long long #define ld long double #define fi first #define se second #define pb push_back #define mp make_pair #define sz(a) int(a.size()) #define all(v) v.begin(), v.end() #define bpc(v) __builtin_popcountll...
replace
22
23
22
23
0
p03233
C++
Runtime Error
#include <algorithm> #include <cstdio> #include <cstring> #define int long long const int Maxv = 100010; int sum[Maxv], val[Maxv], a[Maxv], b[Maxv], suma, sumb, ans; inline char fgc() { static char buf[1 << 15], *p1 = buf, *p2 = buf; return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1 << 15, stdin), p1 == p2)...
#include <algorithm> #include <cstdio> #include <cstring> #define int long long const int Maxv = 300010; int sum[Maxv], val[Maxv], a[Maxv], b[Maxv], suma, sumb, ans; inline char fgc() { static char buf[1 << 15], *p1 = buf, *p2 = buf; return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1 << 15, stdin), p1 == p2)...
replace
6
7
6
7
0
p03233
C++
Runtime Error
#include <bits/stdc++.h> #define x first #define y second #define y1 Y1 #define y2 Y2 #define mp make_pair #define pb push_back #define DEBUG(x) cout << #x << " = " << x << endl; using namespace std; typedef long long LL; typedef pair<int, int> pii; template <typename T> inline int Chkmax(T &a, T b) { return a < ...
#include <bits/stdc++.h> #define x first #define y second #define y1 Y1 #define y2 Y2 #define mp make_pair #define pb push_back #define DEBUG(x) cout << #x << " = " << x << endl; using namespace std; typedef long long LL; typedef pair<int, int> pii; template <typename T> inline int Chkmax(T &a, T b) { return a < ...
replace
38
39
38
39
0
p03233
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)n; i++) #define all(c) (c).begin(), (c).end() #define pb push_back #define dbg(...) \ do { \ cerr << __LINE__ <<...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)n; i++) #define all(c) (c).begin(), (c).end() #define pb push_back #define dbg(...) \ do { \ cerr << __LINE__ <<...
delete
97
98
97
97
0
32: use2= [ 1, 2 ] 2
p03233
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, x, y) for (int i = x; i <= y; i++) using namespace std; typedef long long ll; typedef pair<ll, int> pli; const int N = 1e5 + 10; int n, a[N], b[N]; ll tot, suma, sumb, sum, res; pli all[N]; bool vis[N]; int main() { cin >> n; rep(i, 1, n) { scanf("%d%d", &a[i], &b[i]); ...
#include <bits/stdc++.h> #define rep(i, x, y) for (int i = x; i <= y; i++) using namespace std; typedef long long ll; typedef pair<ll, int> pli; const int N = 2e5 + 10; int n, a[N], b[N]; ll tot, suma, sumb, sum, res; pli all[N]; bool vis[N]; int main() { cin >> n; rep(i, 1, n) { scanf("%d%d", &a[i], &b[i]); ...
replace
6
7
6
7
0
p03233
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < int(n); ++i) #define all(a) (a).begin(), (a).end() typedef long long ll; struct T { ll value; int id; bool isB; }; int main(void) { int n; cin >> n; vector<T> t; rep(i, n) { ll a, b; cin >> a >> b; t.push_ba...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < int(n); ++i) #define all(a) (a).begin(), (a).end() typedef long long ll; struct T { ll value; int id; bool isB; }; int main(void) { int n; cin >> n; vector<T> t; rep(i, n) { ll a, b; cin >> a >> b; t.push_ba...
delete
47
48
47
47
-6
2add7d32-9f3a-4329-9dbe-1592b7fe741c.out: /home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03233/C++/s311358863.cpp:48: int main(): Assertion `false' failed.
p03233
C++
Runtime Error
#include <algorithm> #include <assert.h> #include <bitset> #include <chrono> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <vector> #define LL long long #define mp(x, y) make_pair(x,...
#include <algorithm> #include <assert.h> #include <bitset> #include <chrono> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <vector> #define LL long long #define mp(x, y) make_pair(x,...
replace
63
64
63
64
0
p03233
C++
Runtime Error
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <vector> using namespace std; typedef long long LL; typedef pair<LL, LL> PI; const LL N = 100005; LL n; LL a[N], b[N]; LL ans = 0, sum = 0; PI c[N]; LL tot; bool cmp(PI x, PI y) { return x.first > y.first; } bool in[N]; int main() { ...
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <vector> using namespace std; typedef long long LL; typedef pair<LL, LL> PI; const LL N = 200005; LL n; LL a[N], b[N]; LL ans = 0, sum = 0; PI c[N]; LL tot; bool cmp(PI x, PI y) { return x.first > y.first; } bool in[N]; int main() { ...
replace
8
9
8
9
0
p03233
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; // #define int long long // #define double long double #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)...
#include <bits/stdc++.h> using namespace std; // #define int long long // #define double long double #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)...
replace
118
119
118
119
0
p03233
C++
Runtime Error
#include <bits/stdc++.h> typedef long long LL; const int N = 100005; int n; bool vis[N]; LL A, B, ans; std::pair<int, int> a[N]; int main() { std::ios::sync_with_stdio(0), std::cin.tie(0); std::cin >> n; for (int i = 0, x, y; i < n; ++i) std::cin >> x >> y, a[i] = {x, i}, a[i + n] = {y, i}, A += x, B += y;...
#include <bits/stdc++.h> typedef long long LL; const int N = 200005; int n; bool vis[N]; LL A, B, ans; std::pair<int, int> a[N]; int main() { std::ios::sync_with_stdio(0), std::cin.tie(0); std::cin >> n; for (int i = 0, x, y; i < n; ++i) std::cin >> x >> y, a[i] = {x, i}, a[i + n] = {y, i}, A += x, B += y;...
replace
3
4
3
4
0
p03233
C++
Runtime Error
/* author: JioFell ahihi */ #include <bits/stdc++.h> using namespace std; #define FOR(a, b, c) for (int a = b; a <= c; ++a) #define pb push_back #define fi first #define se second #define int long long typedef pair<int, int> ii; typedef pair<ii, int> pii; const int N = 4e5 + 10; int n, suma, sumb; int a[N], b...
/* author: JioFell ahihi */ #include <bits/stdc++.h> using namespace std; #define FOR(a, b, c) for (int a = b; a <= c; ++a) #define pb push_back #define fi first #define se second #define int long long typedef pair<int, int> ii; typedef pair<ii, int> pii; const int N = 4e5 + 10; int n, suma, sumb; int a[N], b...
replace
21
22
21
22
-11
p03234
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using lint = long long int; using pint = pair<int, int>; using plint = pair<lint, lint>; struct fast_ios { fast_ios() { cin.tie(0); ios::sync_with_stdio(false); cout << fixed << setprecision(20); }; } fast_ios_; #define FOR(i, begin, end) ...
#include <bits/stdc++.h> using namespace std; using lint = long long int; using pint = pair<int, int>; using plint = pair<lint, lint>; struct fast_ios { fast_ios() { cin.tie(0); ios::sync_with_stdio(false); cout << fixed << setprecision(20); }; } fast_ios_; #define FOR(i, begin, end) ...
replace
102
103
102
104
TLE
p03234
C++
Runtime Error
// problem:agc028_d #include <bits/stdc++.h> using namespace std; #define pb push_back #define mk make_pair #define lob lower_bound #define upb upper_bound #define fst first #define scd second typedef long long ll; typedef unsigned long long ull; typedef pair<int, int> pii; typedef pair<ll, ll> pll; inline int read(...
// problem:agc028_d #include <bits/stdc++.h> using namespace std; #define pb push_back #define mk make_pair #define lob lower_bound #define upb upper_bound #define fst first #define scd second typedef long long ll; typedef unsigned long long ull; typedef pair<int, int> pii; typedef pair<ll, ll> pll; inline int read(...
replace
45
46
45
46
0
p03234
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; const int N = 305; const int MOD = 1e9 + 7; int to[N], sum[N]; ll dp[N][N], g[N]; int main() { ios::sync_with_stdio(0); cin.tie(nullptr); int n, m; cin >> n >> m; for (int i = 0; i < m; i++) { int u, v; cin >> u >> v; to[u] = ...
#include <bits/stdc++.h> using namespace std; using ll = long long; const int N = 605; const int MOD = 1e9 + 7; int to[N], sum[N]; ll dp[N][N], g[N]; int main() { ios::sync_with_stdio(0); cin.tie(nullptr); int n, m; cin >> n >> m; for (int i = 0; i < m; i++) { int u, v; cin >> u >> v; to[u] = ...
replace
5
6
5
6
0
p03234
C++
Runtime Error
#include <algorithm> #include <cstdio> #include <cstring> #define w(i, j) (c[j] - c[(i)-1]) typedef long long L; const int N = 3e2 + 23, P = 1e9 + 7; struct mod_t { static int norm(int x) { return x + (x >> 31 & P); } static void norm2(int &x) { x += x >> 31 & P; } int x; mod_t() {} mod_t(int v) : x(v) {} ...
#include <algorithm> #include <cstdio> #include <cstring> #define w(i, j) (c[j] - c[(i)-1]) typedef long long L; const int N = 6e2 + 26, P = 1e9 + 7; struct mod_t { static int norm(int x) { return x + (x >> 31 & P); } static void norm2(int &x) { x += x >> 31 & P; } int x; mod_t() {} mod_t(int v) : x(v) {} ...
replace
6
7
6
7
0
p03234
C++
Runtime Error
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <vector> using namespace std; #define LL long long #define fgx cerr << "--------------" << endl; #define dgx cerr << "==============" << endl; inline int read() { int x = 0, f = 1; char c = getchar(); for (; !isdigit(c); c =...
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <vector> using namespace std; #define LL long long #define fgx cerr << "--------------" << endl; #define dgx cerr << "==============" << endl; inline int read() { int x = 0, f = 1; char c = getchar(); for (; !isdigit(c); c =...
replace
29
30
29
30
0
p03234
C++
Runtime Error
#include <bits/stdc++.h> #define mod 1000000007 typedef long long ll; ll gi() { ll x = 0, f = 1; char ch = getchar(); while (!isdigit(ch)) f ^= ch == '-', ch = getchar(); while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar(); return f ? x : -x; } int f[310], s[310], R[310], lnk[310], F[310][310]; ...
#include <bits/stdc++.h> #define mod 1000000007 typedef long long ll; ll gi() { ll x = 0, f = 1; char ch = getchar(); while (!isdigit(ch)) f ^= ch == '-', ch = getchar(); while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar(); return f ? x : -x; } int f[610], s[610], R[610], lnk[610], F[610][610]; ...
replace
12
13
12
13
0
p03234
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 4e2, mod = 1e9 + 7; ll n, m, k, f[maxn][maxn], g[maxn] = {1}, match[maxn], vis[maxn], pre[maxn], ans, u, v; signed main() { scanf("%lld%lld", &n, &m), n <<= 1; for (ll i = 1; i <= m; ++i) { scanf("%ll...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 1e3, mod = 1e9 + 7; ll n, m, k, f[maxn][maxn], g[maxn] = {1}, match[maxn], vis[maxn], pre[maxn], ans, u, v; signed main() { scanf("%lld%lld", &n, &m), n <<= 1; for (ll i = 1; i <= m; ++i) { scanf("%ll...
replace
3
4
3
4
0
p03234
C++
Runtime Error
#include <bits/stdc++.h> typedef long long int ll; typedef long double ld; #define pb push_back #define pii pair<int, int> #define F first #define S second #define endl '\n' #define int long long #define sync \ ios_base::sync_with_stdio(false); ...
#include <bits/stdc++.h> typedef long long int ll; typedef long double ld; #define pb push_back #define pii pair<int, int> #define F first #define S second #define endl '\n' #define int long long #define sync \ ios_base::sync_with_stdio(false); ...
replace
16
17
16
17
0
p03234
C++
Runtime Error
#include <cstdio> const int MaxN = 310, mod = 1000000007; int N, K, to[MaxN], pre[MaxN], f[MaxN * 2][MaxN * 2], fac[MaxN]; int main() { scanf("%d%d", &N, &K); for (int i = 0, a, b; i < K; i++) scanf("%d%d", &a, &b), to[a] = b, to[b] = a; for (int i = 1; i <= N * 2; i++) pre[i] = pre[i - 1] + !to[i]; fac...
#include <cstdio> const int MaxN = 310, mod = 1000000007; int N, K, to[MaxN * 2], pre[MaxN * 2], f[MaxN * 2][MaxN * 2], fac[MaxN * 2]; int main() { scanf("%d%d", &N, &K); for (int i = 0, a, b; i < K; i++) scanf("%d%d", &a, &b), to[a] = b, to[b] = a; for (int i = 1; i <= N * 2; i++) pre[i] = pre[i - 1] + !...
replace
2
3
2
3
0
p03234
C++
Runtime Error
#include <bits/stdc++.h> #define to edge[i].v #define mp make_pair #define rint register int #define debug(x) cerr << #x << "=" << x << endl #define fgx cerr << "-------------" << endl #define N 333 using namespace std; typedef long long ll; typedef long double db; typedef pair<int, int> pii; const int mod = 1e9 + 7; i...
#include <bits/stdc++.h> #define to edge[i].v #define mp make_pair #define rint register int #define debug(x) cerr << #x << "=" << x << endl #define fgx cerr << "-------------" << endl #define N 666 using namespace std; typedef long long ll; typedef long double db; typedef pair<int, int> pii; const int mod = 1e9 + 7; i...
replace
6
7
6
7
0
p03234
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const int N = 404, MOD = 1e9 + 7; namespace { int Mul(int x, int y) { return 1LL * x * y % MOD; } int Dec(int x, int y) { return (x -= y) < 0 ? x + MOD : x; } int Add(int x, int y) { return (x += y) >= MOD ? x - MOD : x; } int Kissme(int x, int y) { int c = 1; while (...
#include <bits/stdc++.h> using namespace std; const int N = 604, MOD = 1e9 + 7; namespace { int Mul(int x, int y) { return 1LL * x * y % MOD; } int Dec(int x, int y) { return (x -= y) < 0 ? x + MOD : x; } int Add(int x, int y) { return (x += y) >= MOD ? x - MOD : x; } int Kissme(int x, int y) { int c = 1; while (...
replace
3
4
3
4
0
p03234
C++
Runtime Error
#include <bits/stdc++.h> #define N 310 using namespace std; typedef long long ll; const int mod = 1000000007; char *p1, *p2, buf[100000]; #define nc() \ (p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 100000, stdin), p1 == p2) \ ? EOF ...
#include <bits/stdc++.h> #define N 1010 using namespace std; typedef long long ll; const int mod = 1000000007; char *p1, *p2, buf[100000]; #define nc() \ (p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 100000, stdin), p1 == p2) \ ? EOF ...
replace
2
3
2
3
0
p03234
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; const ll MOD = 1e9 + 7; ll dpL[301][301]; ll dpM[301][301]; ll dpR[301][301]; int main() { int n, k; cin >> n >> k; vector<int> a(k), b(k); for (int i = 0; i < k; i++) cin >> a[i] >> b[i], a[i]--, b[i]--; n = n * 2; vector<int> c(n,...
#include <bits/stdc++.h> using namespace std; using ll = long long; const ll MOD = 1e9 + 7; ll dpL[601][601]; ll dpM[601][601]; ll dpR[601][601]; int main() { int n, k; cin >> n >> k; vector<int> a(k), b(k); for (int i = 0; i < k; i++) cin >> a[i] >> b[i], a[i]--, b[i]--; n = n * 2; vector<int> c(n,...
replace
6
9
6
9
0
p03234
C++
Runtime Error
#include <bits/stdc++.h> #define reg register #define pr std::pair<int, int> #define fi first #define se second #define FIN(s) freopen(s, "r", stdin) #define FOUT(s) freopen(s, "w", stdout) #define debug(...) fprintf(stderr, __VA_ARGS__) #define rep(i, l, r) for (int i = l; i <= r; ++i) #define lep(i, l, r) for (int i...
#include <bits/stdc++.h> #define reg register #define pr std::pair<int, int> #define fi first #define se second #define FIN(s) freopen(s, "r", stdin) #define FOUT(s) freopen(s, "w", stdout) #define debug(...) fprintf(stderr, __VA_ARGS__) #define rep(i, l, r) for (int i = l; i <= r; ++i) #define lep(i, l, r) for (int i...
replace
96
99
96
97
0
p03234
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define REP(i, st, ed) for (register int i = st, i##end = ed; i <= i##end; ++i) #define DREP(i, st, ed) for (register int i = st, i##end = ed; i >= i##end; --i) typedef long long ll; template <typename T> inline bool chkmin(T &x, T y) { return (y < x) ? (x = y, 1) : 0; } ...
#include <bits/stdc++.h> using namespace std; #define REP(i, st, ed) for (register int i = st, i##end = ed; i <= i##end; ++i) #define DREP(i, st, ed) for (register int i = st, i##end = ed; i >= i##end; --i) typedef long long ll; template <typename T> inline bool chkmin(T &x, T y) { return (y < x) ? (x = y, 1) : 0; } ...
replace
37
38
37
38
0
p03234
C++
Runtime Error
#include <cstdio> #include <cstring> #include <iostream> #define N 510 #define ll long long #define mod 1000000007 using namespace std; int link[N], tot[N][N]; ll f[N][N], h[N << 1]; int main() { int n, k; scanf("%d%d", &n, &k); n <<= 1; for (int i = 1; i <= k; i++) { int u, v; scanf("%d%d", &u, &v); ...
#include <cstdio> #include <cstring> #include <iostream> #define N 610 #define ll long long #define mod 1000000007 using namespace std; int link[N], tot[N][N]; ll f[N][N], h[N << 1]; int main() { int n, k; scanf("%d%d", &n, &k); n <<= 1; for (int i = 1; i <= k; i++) { int u, v; scanf("%d%d", &u, &v); ...
replace
3
4
3
4
0
p03234
C++
Runtime Error
// This amazing code is by Eric Sunli Chen. #include <bits/stdc++.h> using namespace std; template <typename T> bool get_int(T &x) { char t = getchar(); bool neg = false; x = 0; for (; (t > '9' || t < '0') && t != '-' && t != EOF; t = getchar()) ; if (t == '-') neg = true, t = getchar(); if (t == EO...
// This amazing code is by Eric Sunli Chen. #include <bits/stdc++.h> using namespace std; template <typename T> bool get_int(T &x) { char t = getchar(); bool neg = false; x = 0; for (; (t > '9' || t < '0') && t != '-' && t != EOF; t = getchar()) ; if (t == '-') neg = true, t = getchar(); if (t == EO...
replace
46
47
46
47
0
p03234
C++
Runtime Error
#include <bits/stdc++.h> #define M 1000000007 #define maxn 303 using namespace std; typedef long long ll; inline ll add(ll a, ll b) { return a + b < M ? a + b : a + b - M; } inline ll sub(ll a, ll b) { return a - b < 0 ? a - b + M : a - b; } inline ll mult(ll a, ll b) { return a * b % M; } int n, k; int a[maxn], b[...
#include <bits/stdc++.h> #define M 1000000007 #define maxn 603 using namespace std; typedef long long ll; inline ll add(ll a, ll b) { return a + b < M ? a + b : a + b - M; } inline ll sub(ll a, ll b) { return a - b < 0 ? a - b + M : a - b; } inline ll mult(ll a, ll b) { return a * b % M; } int n, k; int a[maxn], b[...
replace
3
4
3
4
0
p03234
C++
Runtime Error
#include <bits/stdc++.h> #define mp make_pair #define fs first #define sc second #define pb push_back #define mod 1000000007 using namespace std; int n, k; int match[305]; long long f[305]; long long dp[305][305]; long long dp2[305][305]; long long cnt[305][305]; long long solve(int l, int r) { if (dp[l][r] != -1) ...
#include <bits/stdc++.h> #define mp make_pair #define fs first #define sc second #define pb push_back #define mod 1000000007 using namespace std; int n, k; int match[610]; long long f[610]; long long dp[610][610]; long long dp2[610][610]; long long cnt[610][610]; long long solve(int l, int r) { if (dp[l][r] != -1) ...
replace
9
14
9
14
0
p03234
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const int Maxn = 305, mod = 1e9 + 7; int p[Maxn], g[Maxn], f[Maxn][Maxn], cnt[Maxn][Maxn]; int main() { int n, k, ans = 0; cin >> n >> k; g[0] = 1; for (int i = 2; i <= 2 * n; i += 2) g[i] = 1ll * g[i - 2] * (i - 1) % mod; for (int i = 1; i <= k; i++) { in...
#include <bits/stdc++.h> using namespace std; const int Maxn = 605, mod = 1e9 + 7; int p[Maxn], g[Maxn], f[Maxn][Maxn], cnt[Maxn][Maxn]; int main() { int n, k, ans = 0; cin >> n >> k; g[0] = 1; for (int i = 2; i <= 2 * n; i += 2) g[i] = 1ll * g[i - 2] * (i - 1) % mod; for (int i = 1; i <= k; i++) { in...
replace
2
3
2
3
0
p03234
C++
Time Limit Exceeded
/******************************************************************************** Code by a weak man who named CYJian, and he hopes the code can get more scores. Algorithm: ********************************************************************************/ #include <bits/stdc++.h> using namespace s...
/******************************************************************************** Code by a weak man who named CYJian, and he hopes the code can get more scores. Algorithm: ********************************************************************************/ #include <bits/stdc++.h> using namespace s...
delete
73
77
73
73
TLE
p03234
C++
Runtime Error
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> typedef long long LL; using namespace std; const int maxn = 310, mod = 1e9 + 7; int read() { int x = 0, f = 1; char c = getchar(); while (!isdigit(c)) { if (c == '-') f = 0; c = getchar(); } while (isdigit(c)) { ...
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> typedef long long LL; using namespace std; const int maxn = 610, mod = 1e9 + 7; int read() { int x = 0, f = 1; char c = getchar(); while (!isdigit(c)) { if (c == '-') f = 0; c = getchar(); } while (isdigit(c)) { ...
replace
7
8
7
8
0
p03234
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, x, y) for (int i = (x); i <= (y); i++) #define ll long long using namespace std; const int N = 305, mod = 1e9 + 7; int n, m, a, b, f[N][N], cnt[N][N], p[N], g[N], ans; void upd(int &x, int y) { x += y; x -= x >= mod ? mod : 0; } int main() { scanf("%d%d", &n, &m); n *= 2;...
#include <bits/stdc++.h> #define rep(i, x, y) for (int i = (x); i <= (y); i++) #define ll long long using namespace std; const int N = 605, mod = 1e9 + 7; int n, m, a, b, f[N][N], cnt[N][N], p[N], g[N], ans; void upd(int &x, int y) { x += y; x -= x >= mod ? mod : 0; } int main() { scanf("%d%d", &n, &m); n *= 2;...
replace
4
5
4
5
0
p03235
C++
Time Limit Exceeded
#include <algorithm> #include <cstdio> #include <cstring> #include <string> #define fo(i, a, b) for (int i = a; i <= b; i++) #define fd(i, a, b) for (int i = a; i >= b; i--) using namespace std; int read() { char ch; for (ch = getchar(); ch < '0' || ch > '9'; ch = getchar()) ; int x = ch - '0'; for (ch = g...
#include <algorithm> #include <cstdio> #include <cstring> #include <string> #define fo(i, a, b) for (int i = a; i <= b; i++) #define fd(i, a, b) for (int i = a; i >= b; i--) using namespace std; int read() { char ch; for (ch = getchar(); ch < '0' || ch > '9'; ch = getchar()) ; int x = ch - '0'; for (ch = g...
delete
65
66
65
65
TLE
p03235
C++
Runtime Error
#include <bits/stdc++.h> #define il inline #define vd void typedef long long ll; il ll gi() { ll x = 0, f = 1; char ch = getchar(); while (!isdigit(ch)) f ^= ch == '-', ch = getchar(); while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar(); return f ? x : -x; } int n, p[200010]; int f[2][200010], i...
#include <bits/stdc++.h> #define il inline #define vd void typedef long long ll; il ll gi() { ll x = 0, f = 1; char ch = getchar(); while (!isdigit(ch)) f ^= ch == '-', ch = getchar(); while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar(); return f ? x : -x; } int n, p[200010]; int f[2][200010], i...
replace
17
18
17
18
0
p03235
C++
Runtime Error
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> using namespace std; const int maxn = 200100; struct Node { int mx[2]; Node *lch, *rch; Node() : mx(), lch(0), rch(0) {} } node[maxn * 20]; typedef Node *pnode; int tot = 0; pnode root[maxn]; void upd...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> using namespace std; const int maxn = 200100; struct Node { int mx[2]; Node *lch, *rch; Node() : mx(), lch(0), rch(0) {} } node[maxn * 41]; typedef Node *pnode; int tot = 0; pnode root[maxn]; void upd...
replace
12
13
12
13
127
/tmp/0dbcc59b-4c12-42ff-93ed-bf440029a0d2.out: error while loading shared libraries: libc.so.6: failed to map segment from shared object
p03235
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; namespace io { const int l = 1 << 20; char buf[l], *s, *t, c; inline void gc() { if (s == t) { t = (s = buf) + fread(buf, 1, l, stdin); c = s == t ? EOF : *s++; } else c = *s++; } template <class IT> inline void gi(IT &x) { x = 0; gc(); while (c < '0' ...
#include <bits/stdc++.h> using namespace std; namespace io { const int l = 1 << 20; char buf[l], *s, *t, c; inline void gc() { if (s == t) { t = (s = buf) + fread(buf, 1, l, stdin); c = s == t ? EOF : *s++; } else c = *s++; } template <class IT> inline void gi(IT &x) { x = 0; gc(); while (c < '0' ...
replace
72
73
72
73
0
p03235
C++
Runtime Error
#pragma GCC optimize("O3") #include <bits/stdc++.h> #define jizz ios::sync_with_stdio(0), cin.tie(0), cout.tie(0); #define pb push_back #define MP make_pair #define F first #define S second #define ET cout << "\n" #define MEM(i, j) memset(i, j, sizeof i) #define ALL(v) v.begin(), v.end() #define DB(a, s, e) ...
#pragma GCC optimize("O3") #include <bits/stdc++.h> #define jizz ios::sync_with_stdio(0), cin.tie(0), cout.tie(0); #define pb push_back #define MP make_pair #define F first #define S second #define ET cout << "\n" #define MEM(i, j) memset(i, j, sizeof i) #define ALL(v) v.begin(), v.end() #define DB(a, s, e) ...
replace
21
22
21
22
0
p03235
C++
Runtime Error
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> using namespace std; const int Q = 1 << 18; int tl = 0; int ls[Q * 18], rs[Q * 18]; int mx[Q * 18]; void MDF(int lst, int &now, int l, int r, int x, int v) { now = ++tl; mx[now] = -998244353; if (l == r) { mx[now] = max(mx[now], v);...
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> using namespace std; const int Q = 1 << 18; int tl = 0; int ls[Q * 36], rs[Q * 36]; int mx[Q * 36]; void MDF(int lst, int &now, int l, int r, int x, int v) { now = ++tl; mx[now] = -998244353; if (l == r) { mx[now] = max(mx[now], v);...
replace
7
9
7
9
0
p03235
C++
Runtime Error
#include <algorithm> #include <cassert> #include <cstdio> #include <cstring> #define FILL(a, n, x) memset((a), (x), sizeof((a)[0]) * (n)) #define FILLA(a, x) memset((a), (x), sizeof(a)) #define COPY(a, n, b) memcpy((b), (a), sizeof((a)[0]) * (n)) #define COPYA(a, b) memcpy((b), (a), sizeof(a)) using namespace std; typ...
#include <algorithm> #include <cassert> #include <cstdio> #include <cstring> #define FILL(a, n, x) memset((a), (x), sizeof((a)[0]) * (n)) #define FILLA(a, x) memset((a), (x), sizeof(a)) #define COPY(a, n, b) memcpy((b), (a), sizeof((a)[0]) * (n)) #define COPYA(a, b) memcpy((b), (a), sizeof(a)) using namespace std; typ...
replace
46
47
46
47
0
p03235
C++
Runtime Error
#include <algorithm> #include <stdio.h> using namespace std; int n; int p[131072]; bool mx[131072]; int c1[131072], c2[131072]; int wz1[2097152], wz2[2097152], pre1[2097152], pre2[2097152], tim1[2097152], tim2[2097152], num1 = 0, num2 = 0; void add(int wz, int val1, int val2, int tim) { for (int i = wz; i > 0; i ...
#include <algorithm> #include <stdio.h> using namespace std; int n; int p[262144]; bool mx[262144]; int c1[262144], c2[262144]; int wz1[4194304], wz2[4194304], pre1[4194304], pre2[4194304], tim1[4194304], tim2[4194304], num1 = 0, num2 = 0; void add(int wz, int val1, int val2, int tim) { for (int i = wz; i > 0; i ...
replace
4
9
4
9
0
p03235
C++
Runtime Error
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> using namespace std; struct Tree { int mx; int lch, rch; } T[6400010]; int tot; void update(int root) { int lc = T[root].lch; int rc = T[root].rch; T[root].mx = max(T[lc].mx, T[rc].mx); return; } void insert(int lstroot, int &nowr...
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> using namespace std; struct Tree { int mx; int lch, rch; } T[12800010]; int tot; void update(int root) { int lc = T[root].lch; int rc = T[root].rch; T[root].mx = max(T[lc].mx, T[rc].mx); return; } void insert(int lstroot, int &now...
replace
8
9
8
9
0
p03235
C++
Runtime Error
#ifndef BZ #pragma GCC optimize "Ofast" #endif #include <bits/stdc++.h> using namespace std; using ull = uint64_t; using ll = int64_t; using ld = long double; const int MAXN = 200228; int a[MAXN]; bool must[MAXN]; int mustcnt[MAXN]; int bef[MAXN][2]; int n; int fn; struct Fen { Fen() { fill(begin(fen), end(fen),...
#ifndef BZ #pragma GCC optimize "Ofast" #endif #include <bits/stdc++.h> using namespace std; using ull = uint64_t; using ll = int64_t; using ld = long double; const int MAXN = 200228; int a[MAXN]; bool must[MAXN]; int mustcnt[MAXN]; int bef[MAXN][2]; int n; int fn; struct Fen { Fen() { fill(begin(fen), end(fen),...
replace
59
60
59
60
0
p03235
C++
Runtime Error
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <queue> #include <vector> #define LL long long #define LD long double using namespace std; const int NN = 200000 + 117; const int MM = 200000 + 117; int read() { int fl = 1, x; char c; for (c...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <queue> #include <vector> #define LL long long #define LD long double using namespace std; const int NN = 200000 + 117; const int MM = 200000 + 117; int read() { int fl = 1, x; char c; for (c...
replace
41
42
41
42
0
p03235
C++
Runtime Error
#include <cstdio> #include <vector> #define N 700001 #include <cstring> using namespace std; vector<int> pans0[N], pans1[N]; int a[N], ans[N], ls1[N], ls2[N], rs1[N], rs2[N], hz[N], wei[N]; int f0l[N], f1l[N], f0r[N], f1r[N]; bool bz[N], used[N]; int X, Y, numX, numY, maxs, anss, newX, newY, n; int max(int x, int y) { ...
#include <cstdio> #include <vector> #define N 3000001 #include <cstring> using namespace std; vector<int> pans0[N], pans1[N]; int a[N], ans[N], ls1[N], ls2[N], rs1[N], rs2[N], hz[N], wei[N]; int f0l[N], f1l[N], f0r[N], f1r[N]; bool bz[N], used[N]; int X, Y, numX, numY, maxs, anss, newX, newY, n; int max(int x, int y) {...
replace
2
3
2
3
-6
terminate called after throwing an instance of 'St9bad_alloc' what(): std::bad_alloc
p03235
C++
Runtime Error
#include <bits/stdc++.h> #define mp make_pair #define pb push_back #define ph push #define ptc putchar #define enter putchar('\n') #define mod 998244353 using namespace std; typedef pair<int, int> pii; typedef double db; typedef long double ldb; typedef long long ll; typedef long long lnt; inline int read() { int x =...
#include <bits/stdc++.h> #define mp make_pair #define pb push_back #define ph push #define ptc putchar #define enter putchar('\n') #define mod 998244353 using namespace std; typedef pair<int, int> pii; typedef double db; typedef long double ldb; typedef long long ll; typedef long long lnt; inline int read() { int x =...
replace
59
60
59
60
0
p03235
C++
Runtime Error
#include <bits/stdc++.h> #define ll long long #define ld long double #define db double #define pint pair<int, int> #define mk(x, y) make_pair(x, y) #define fir first #define sec second #define Rep(x, y, z) for (int x = y; x <= z; x++) #define Red(x, y, z) for (int x = y; x >= z; x--) using namespace std; const int MAXN...
#include <bits/stdc++.h> #define ll long long #define ld long double #define db double #define pint pair<int, int> #define mk(x, y) make_pair(x, y) #define fir first #define sec second #define Rep(x, y, z) for (int x = y; x <= z; x++) #define Red(x, y, z) for (int x = y; x >= z; x--) using namespace std; const int MAXN...
replace
11
12
11
12
0
p03235
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const int inf = 0x3f3f3f3f; int n; int nu[200200]; struct SEG { int ma[200200]; void build(int rt, int l, int r) { ma[rt] = -inf; if (l == r) return; int mid = (l + r) / 2; build(rt * 2, l, mid); build(rt * 2 + 1, mid + 1, r); } void change...
#include <bits/stdc++.h> using namespace std; const int inf = 0x3f3f3f3f; int n; int nu[200200]; struct SEG { int ma[2000200]; void build(int rt, int l, int r) { ma[rt] = -inf; if (l == r) return; int mid = (l + r) / 2; build(rt * 2, l, mid); build(rt * 2 + 1, mid + 1, r); } void chang...
replace
6
7
6
7
0
p03236
C++
Time Limit Exceeded
#include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include ...
#include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include ...
replace
58
59
58
59
TLE
p03236
C++
Time Limit Exceeded
// 無理。 #include <bits/stdc++.h> using namespace std; using uint = unsigned int; using ll = long long; using ull = unsigned long long; constexpr ll TEN(int n) { return (n == 0) ? 1 : 10 * TEN(n - 1); } template <class T> using V = vector<T>; template <class T> using VV = V<V<T>>; const int MN = 1550; int N; using B =...
// 無理。 #include <bits/stdc++.h> using namespace std; using uint = unsigned int; using ll = long long; using ull = unsigned long long; constexpr ll TEN(int n) { return (n == 0) ? 1 : 10 * TEN(n - 1); } template <class T> using V = vector<T>; template <class T> using VV = V<V<T>>; const int MN = 550; int N; using B = ...
replace
12
13
12
13
TLE
p03237
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; namespace io { const int l = 1 << 20; char buf[l], *s, *t, c; inline void gc() { if (s == t) { t = (s = buf) + fread(buf, 1, l, stdin); c = s == t ? EOF : *s++; } else c = *s++; } template <class IT> inline void gi(IT &x) { x = 0; gc(); while (c < '0' ...
#include <bits/stdc++.h> using namespace std; namespace io { const int l = 1 << 20; char buf[l], *s, *t, c; inline void gc() { if (s == t) { t = (s = buf) + fread(buf, 1, l, stdin); c = s == t ? EOF : *s++; } else c = *s++; } template <class IT> inline void gi(IT &x) { x = 0; gc(); while (c < '0' ...
replace
91
92
91
92
0
p03237
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define ri register int const int N = 505; int a[N][N], f[N][N], l[N][N], r[N][N]; char s[N]; /* f[i][j] (i,j) 能走到的位置的权值和 l[i][j][k]/r[i][j][k] 表示 (i,j) 可以到达的第 k 行最左/右的位置 ,第一维省略 不能走到的点贡献相当于已经清零,因为 (i+1,j) (i,j+1) 共同能走到的点的递增序列里面不会出现这些位置, 且没有被计算到其左上的点的贡献中去 */ int main() { /...
#include <bits/stdc++.h> using namespace std; #define ri register int const int N = 1505; int a[N][N], f[N][N], l[N][N], r[N][N]; char s[N]; /* f[i][j] (i,j) 能走到的位置的权值和 l[i][j][k]/r[i][j][k] 表示 (i,j) 可以到达的第 k 行最左/右的位置 ,第一维省略 不能走到的点贡献相当于已经清零,因为 (i+1,j) (i,j+1) 共同能走到的点的递增序列里面不会出现这些位置, 且没有被计算到其左上的点的贡献中去 */ int main() { ...
replace
3
4
3
4
0
p03237
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x, to) for (x = 0; x < (to); x++) #define FORR(x, arr) for (auto &x : arr) #define ITR(x, c) for (__typeof(c.begin()) x = c.begin(); x != c.end(); x++) #define ALL(a) (a.begin()), ...
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x, to) for (x = 0; x < (to); x++) #define FORR(x, arr) for (auto &x : arr) #define ITR(x, c) for (__typeof(c.begin()) x = c.begin(); x != c.end(); x++) #define ALL(a) (a.begin()), ...
replace
16
18
16
18
0
p03237
C++
Runtime Error
#pragma GCC diagnostic ignored "-Wunused-result" #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; const int N = 502; // const ll INF = (ll)1e18 + 41; const int INF = (int)1e9 + 41; const ll MD = (ll)1e9 + 7; bool D = false; int sum[N][N], a[N][N]; int max_depth[N][N]; short i...
#pragma GCC diagnostic ignored "-Wunused-result" #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; const int N = 1502; // const ll INF = (ll)1e18 + 41; const int INF = (int)1e9 + 41; const ll MD = (ll)1e9 + 7; bool D = false; int sum[N][N], a[N][N]; int max_depth[N][N]; short ...
replace
5
6
5
6
0
p03238
C++
Runtime Error
#include <algorithm> #include <array> #include <iostream> #include <vector> using namespace std; int main(void) { // 歳入力 int N; cin >> N; // 条件分岐 if (N == 2) { // 2歳 int A = 0, B = 0; cin >> A; cin >> B; cout << A + B << endl; } else if (N == 1) { // 1歳 cout << "Hello World" <...
#include <algorithm> #include <array> #include <iostream> #include <vector> using namespace std; int main(void) { // 歳入力 int N; cin >> N; // 条件分岐 if (N == 2) { // 2歳 int A = 0, B = 0; cin >> A; cin >> B; cout << A + B << endl; return 0; } else if (N == 1) { // 1歳 cout << "...
insert
19
19
19
20
0
p03238
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define repr(i, n) for (int i = (n); i >= 0; --i) #define FOR(i, m, n) for (int i = (m); i < (n); ++i) #define FORR(i, m, n) for (int i = (m); i >= (n); --i) #define ifaxb(a, x, b) if (a < x && x < b) // 比較は昇順 #define toInt(x) (x - '0') #define vi...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define repr(i, n) for (int i = (n); i >= 0; --i) #define FOR(i, m, n) for (int i = (m); i < (n); ++i) #define FORR(i, m, n) for (int i = (m); i >= (n); --i) #define ifaxb(a, x, b) if (a < x && x < b) // 比較は昇順 #define toInt(x) (x - '0') #define vi...
replace
31
32
31
32
-8
p03238
Python
Runtime Error
def solve(string): flag, *ab = map(int, string.split()) return str(sum(ab)) if flag - 1 else "Hello World" if __name__ == "__main__": flag = int(input()) if flag - 1: flag = "{}\n".format(flag) + "\n".join([input(), input()]) print(solve(flag))
def solve(string): flag, *ab = map(int, string.split()) return str(sum(ab)) if flag - 1 else "Hello World" if __name__ == "__main__": flag = int(input()) if flag - 1: flag = "{}\n".format(flag) + "\n".join([input(), input()]) print(solve(str(flag)))
replace
9
10
9
10
AttributeError: 'int' object has no attribute 'split'
Traceback (most recent call last): File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03238/Python/s553677873.py", line 10, in <module> print(solve(flag)) File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03238/Python/s553677873.py", line 2, in solve flag, *ab = map(int,...
p03238
Python
Runtime Error
def solve(): age = int(input()) if age == 1: return "Hello World" a, b = map(int, input().split()) return a + b if __name__ == "__main__": print(solve())
def solve(): age = int(input()) if age == 1: return "Hello World" a, b = list(int(input()) for _ in range(2)) return a + b if __name__ == "__main__": print(solve())
replace
4
5
4
5
0
p03238
Python
Runtime Error
def programming_education(N: int) -> str: if N == 1: return "Hello World" A, B = map(int, input().split()) return str(A + B) if __name__ == "__main__": N = int(input()) ans = programming_education(N) print(ans)
def programming_education(N: int) -> str: if N == 1: return "Hello World" A = int(input()) B = int(input()) return str(A + B) if __name__ == "__main__": N = int(input()) ans = programming_education(N) print(ans)
replace
4
5
4
6
0
p03238
Python
Runtime Error
dat0 = input() if dat0 == 1: print("Hello World") else: dat1 = input() dat2 = input() ans = int(dat1) + int(dat2) print(ans)
dat0 = input() if dat0 == "1": print("Hello World") else: dat1 = input() dat2 = input() ans = int(dat1) + int(dat2) print(ans)
replace
1
2
1
2
EOFError: EOF when reading a line
Traceback (most recent call last): File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03238/Python/s913510472.py", line 5, in <module> dat1 = input() EOFError: EOF when reading a line
p03238
Python
Runtime Error
N = int(input()) if N == 1: print("Hello World") else: a, b = map(int, input().split()) print(a + b)
N = int(input()) if N == 1: print("Hello World") else: a = int(input()) b = int(input()) print(a + b)
replace
4
5
4
6
0
p03238
Python
Runtime Error
import sys N = int(sys.stdin.readline()) if N == 1: print("Hello World") sys.exit() if N == 2: ans = 0 for value in sys.stdin.readlines(): ans += value print(ans)
import sys N = int(sys.stdin.readline()) if N == 1: print("Hello World") sys.exit() if N == 2: ans = 0 for value in sys.stdin.readlines(): ans += int(value) print(ans)
replace
11
12
11
12
0
p03238
C++
Runtime Error
// Devarshi #include <bits/stdc++.h> using namespace std; #define mp make_pair #define mt make_tuple #define fi first #define se second #define pb push_back #define ll long long #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define rep(i, n) for (i = 0; i < n; i++) #define forn(i, n) ...
// Devarshi #include <bits/stdc++.h> using namespace std; #define mp make_pair #define mt make_tuple #define fi first #define se second #define pb push_back #define ll long long #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define rep(i, n) for (i = 0; i < n; i++) #define forn(i, n) ...
replace
43
52
43
52
0
p03238
Python
Runtime Error
N = int(input()) if N == 1: print("Hello World") elif N == 2: A, B = map(int, input().split()) print(A + B)
N = int(input()) if N == 1: print("Hello World") elif N == 2: A = int(input()) B = int(input()) print(A + B)
replace
5
7
5
7
0
p03238
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define fastIO \ ios_base::sync_with_stdio(false); \ cin.tie(NULL) #define pb push_back #define mp make_pair #define mod 1000000007 #define int long long int int...
#include <bits/stdc++.h> using namespace std; #define fastIO \ ios_base::sync_with_stdio(false); \ cin.tie(NULL) #define pb push_back #define mp make_pair #define mod 1000000007 #define int long long int int...
delete
13
17
13
13
0
p03238
Python
Runtime Error
N = int(input()) if N == 1: print("Hello World") else: A, B = map(int, input().split()) print(A + B)
N = int(input()) if N == 1: print("Hello World") else: A = int(input()) B = int(input()) print(A + B)
replace
4
5
4
6
0
p03238
Python
Runtime Error
N = int(input()) if N == 1: print("Hello World") else: A, B = map(int, input().split()) print(A + B)
N = int(input()) if N == 1: print("Hello World") else: A = int(input()) B = int(input()) print(A + B)
replace
5
6
5
7
0
p03239
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define all(a) a.begin(), a.end() using ll = long long; const int INF = 1 << 30; const ll INFll = 1LL << 62; const int mod = int(1e9) + 7; using P = pair<ll, ll>; using ld = long double; int main() { ll N, T; cin >> N >> T; vector<P> p; for (int i = 0; i < N; ++i)...
#include <bits/stdc++.h> using namespace std; #define all(a) a.begin(), a.end() using ll = long long; const int INF = 1 << 30; const ll INFll = 1LL << 62; const int mod = int(1e9) + 7; using P = pair<ll, ll>; using ld = long double; int main() { ll N, T; cin >> N >> T; vector<P> p; for (int i = 0; i < N; ++i)...
replace
23
25
23
27
0
p03239
Python
Runtime Error
import sys N, T = map(int, sys.stdin.readline().strip().split()) # N個の帰宅経路, T時間以内に cost = 1001 for line in sys.stdin.readlines(): c, t = line.strip().split() if T >= t: cost = min(cost, c) if cost == 1001: print("TLE") else: print(cost)
import sys N, T = map(int, sys.stdin.readline().strip().split()) # N個の帰宅経路, T時間以内に cost = 1001 for line in sys.stdin.readlines(): c, t = map(int, line.strip().split()) if T >= t: cost = min(cost, c) if cost == 1001: print("TLE") else: print(cost)
replace
6
7
6
7
TypeError: '>=' not supported between instances of 'int' and 'str'
Traceback (most recent call last): File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03239/Python/s756451792.py", line 7, in <module> if T >= t: TypeError: '>=' not supported between instances of 'int' and 'str'
p03239
Python
Runtime Error
N, T = map(int, input().split()) c = set() for i in range(0, N): ci, ti = map(int, input().split()) if ti > T: continue c.add(ci) print(min(c))
N, T = map(int, input().split()) c = set() for i in range(0, N): ci, ti = map(int, input().split()) if ti > T: continue c.add(ci) if c: print(min(c)) else: print("TLE")
replace
9
10
9
13
0
p03239
Python
Runtime Error
import sys input = sys.stdin.readline def main(): n, t = map(int, input().split()) routes = filter( lambda x: x[1] <= t, [list(map(int, input().split())) for _ in range(n)] ) if routes: print(min(routes)[0]) else: print("TLE") if __name__ == "__main__": main()
import sys input = sys.stdin.readline def main(): n, t = map(int, input().split()) routes = list( filter(lambda x: x[1] <= t, [list(map(int, input().split())) for _ in range(n)]) ) if routes: print(min(routes)[0]) else: print("TLE") if __name__ == "__main__": main()
replace
7
9
7
9
0
p03239
Python
Runtime Error
N, T = map(int, input().split()) a = 9999 for _ in N: c, t = map(int, input().split()) if t <= T: a = min(a, c) if a == 9999: print("TLE") else: print(a)
N, T = map(int, input().split()) a = 9999 for _ in range(N): c, t = map(int, input().split()) if t <= T: a = min(a, c) if a == 9999: print("TLE") else: print(a)
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/p03239/Python/s125957477.py", line 3, in <module> for _ in N: TypeError: 'int' object is not iterable
p03239
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int n, t; cin >> n >> t; vector<pair<int, int>> vp; for (int i = 0; i < n; ++i) { int ci, ti; cin >> ci >> ti; if (ti > t) continue; vp.push_back(make_pair(ci, ti)); } sort(vp.begin(), vp.end()); cout << vp[0].first << e...
#include <bits/stdc++.h> using namespace std; int main() { int n, t; cin >> n >> t; vector<pair<int, int>> vp; for (int i = 0; i < n; ++i) { int ci, ti; cin >> ci >> ti; if (ti > t) continue; vp.push_back(make_pair(ci, ti)); } sort(vp.begin(), vp.end()); if (vp.empty()) cout...
replace
19
20
19
23
0
p03239
Python
Runtime Error
N, T = map(int, input().split()) r = [tuple(map(int, input().split())) for _ in range(N)] f = [(c, t) for c, t in r if t <= T] print(min(f, key=lambda x: x[0])[0])
N, T = map(int, input().split()) r = [tuple(map(int, input().split())) for _ in range(N)] f = [(c, t) for c, t in r if t <= T] if len(f) == 0: print("TLE") else: print(min(f, key=lambda x: x[0])[0])
replace
3
4
3
7
0
p03239
Python
Runtime Error
def solve(string): n, t, *ct = map(int, string.split()) c = [_c for _c, _t in zip(ct[::2], ct[1::2]) if _t <= t] return str(min(c)) if len(c) else "TLE" if __name__ == "__main__": n, t = map(int, input().split()) print(solve("{} {}\n".format(n, t) + "\n".join([input() for _ in n])))
def solve(string): n, t, *ct = map(int, string.split()) c = [_c for _c, _t in zip(ct[::2], ct[1::2]) if _t <= t] return str(min(c)) if len(c) else "TLE" if __name__ == "__main__": n, t = map(int, input().split()) print(solve("{} {}\n".format(n, t) + "\n".join([input() for _ in range(n)])))
replace
8
9
8
9
TypeError: 'int' object is not iterable
Traceback (most recent call last): File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03239/Python/s779800450.py", line 9, in <module> print(solve("{} {}\n".format(n, t) + "\n".join([input() for _ in n]))) TypeError: 'int' object is not iterable
p03239
C++
Runtime Error
#include <algorithm> #include <cmath> #include <iostream> #include <string> #include <vector> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < n; i++) #define ALL(a) (a).begin(), (a).end() bool compare_pair(pair<int, int> a, pair<int, int> b) { if (a.first == b.first) { return a.f...
#include <algorithm> #include <cmath> #include <iostream> #include <string> #include <vector> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < n; i++) #define ALL(a) (a).begin(), (a).end() bool compare_pair(pair<int, int> a, pair<int, int> b) { if (a.first == b.first) { return a.f...
replace
28
29
28
29
0
p03239
C++
Runtime Error
#include <algorithm> #include <cmath> #include <functional> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; typedef long long ll; using P = pair<ll, ll>; templa...
#include <algorithm> #include <cmath> #include <functional> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; typedef long long ll; using P = pair<ll, ll>; templa...
insert
46
46
46
50
0
p03239
C++
Runtime Error
#include <algorithm> #include <iostream> #include <string> using namespace std; int main() { int N, T; cin >> N >> T; int c[T], t[N]; for (int i = 0; i < N; ++i) { cin >> c[i] >> t[i]; } int min = 1001; for (int i = 0; i < N; ++i) { if (t[i] <= T) { if (c[i] <= min) { min = c[i]; ...
#include <algorithm> #include <iostream> #include <string> using namespace std; int main() { int N, T; cin >> N >> T; int c[N], t[N]; for (int i = 0; i < N; ++i) { cin >> c[i] >> t[i]; } int min = 1001; for (int i = 0; i < N; ++i) { if (t[i] <= T) { if (c[i] <= min) { min = c[i]; ...
replace
8
9
8
9
0