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
p01489
C++
Runtime Error
#include <bits/stdc++.h> #define int long long using namespace std; typedef vector<int> vec; typedef vector<vec> mat; const int M = 1000000007; mat mul(mat A, mat B) { mat C(A.size(), vec(B[0].size())); for (int i = 0; i < A.size(); i++) { for (int j = 0; j < B[0].size(); j++) { for (int k = 0; k < A[0].s...
#include <bits/stdc++.h> #define int long long using namespace std; typedef vector<int> vec; typedef vector<vec> mat; const int M = 1000000007; mat mul(mat A, mat B) { mat C(A.size(), vec(B[0].size())); for (int i = 0; i < A.size(); i++) { for (int j = 0; j < B[0].size(); j++) { for (int k = 0; k < A[0].s...
replace
90
91
90
91
0
p01490
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define int long long #define rep(i, n) for (int i = 0; i < (n); i++) #define pb push_back #define all(v) (v).begin(), (v).end() #define fi first #define se second typedef vector<int> vint; typedef pair<int, int> pint; typedef vector<pint> vpint; template <typename A, ty...
#include <bits/stdc++.h> using namespace std; #define int long long #define rep(i, n) for (int i = 0; i < (n); i++) #define pb push_back #define all(v) (v).begin(), (v).end() #define fi first #define se second typedef vector<int> vint; typedef pair<int, int> pint; typedef vector<pint> vpint; template <typename A, ty...
replace
25
26
25
26
TLE
p01490
C++
Time Limit Exceeded
#include <algorithm> #include <assert.h> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stdio.h> #include <string.h> #include <string> #include <vector> using namespace std; typedef long long ll; typedef unsigned int uint; typedef unsigned long long ull; static const dou...
#include <algorithm> #include <assert.h> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stdio.h> #include <string.h> #include <string> #include <vector> using namespace std; typedef long long ll; typedef unsigned int uint; typedef unsigned long long ull; static const dou...
replace
38
39
38
39
TLE
p01491
C++
Memory Limit Exceeded
#include <algorithm> #include <iostream> using namespace std; #define rep(i, n) for (ll i = 0; i < (n); ++i) typedef long long ll; ll a[2500000], b[2500000], sa[2500001], sb[2500001]; ll M, N, m0, md, n0, nd, ans = 1e18; ll val(ll i, ll j) { return (M - i) * (N - j) + sa[i] + sb[j]; } int main() { cin >> M >> N >> m0...
#include <algorithm> #include <iostream> using namespace std; #define rep(i, n) for (ll i = 0; i < (n); ++i) typedef long long ll; int a[2500000], b[2500000]; ll M, N, m0, md, n0, nd, ans = 1e18, sa[2500001], sb[2500001]; ll val(ll i, ll j) { return (M - i) * (N - j) + sa[i] + sb[j]; } int main() { cin >> M >> N >> m...
replace
5
7
5
7
MLE
p01491
C++
Memory Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define FOR(i, k, n) for (int i = (int)(k); i < (int)(n); i++) #define REP(i, n) FOR(i, 0, n) #define ALL(a) a.begin(), a.end() #define MS(m, v) memset(m, v, sizeof(m)) typedef long long ll; typedef long double ld; typedef vector<ll> vi; typedef vector<string> vs; typedef p...
#include <bits/stdc++.h> using namespace std; #define FOR(i, k, n) for (int i = (int)(k); i < (int)(n); i++) #define REP(i, n) FOR(i, 0, n) #define ALL(a) a.begin(), a.end() #define MS(m, v) memset(m, v, sizeof(m)) typedef long long ll; typedef long double ld; typedef vector<ll> vi; typedef vector<string> vs; typedef p...
replace
28
29
28
29
MLE
p01493
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <...
#include <algorithm> #include <bitset> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <...
replace
55
56
55
56
0
p01493
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define FOR(i, k, n) for (int i = (int)(k); i < (int)(n); i++) #define REP(i, n) FOR(i, 0, n) #define ALL(a) a.begin(), a.end() #define MS(m, v) memset(m, v, sizeof(m)) typedef long long ll; typedef long double ld; typedef vector<int> vi; typedef vector<string> vs; typedef ...
#include <bits/stdc++.h> using namespace std; #define FOR(i, k, n) for (int i = (int)(k); i < (int)(n); i++) #define REP(i, n) FOR(i, 0, n) #define ALL(a) a.begin(), a.end() #define MS(m, v) memset(m, v, sizeof(m)) typedef long long ll; typedef long double ld; typedef vector<int> vi; typedef vector<string> vs; typedef ...
replace
50
51
50
51
TLE
p01493
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int N; bool visited[100]; char a[100][100]; int cnt = 0, k = 0; int cc; int t[2]; void dfs(int pos) { if (visited[pos]) return; visited[pos] = true; cc++; for (int i = 0; i < N; i++) if (a[pos][i] == 'Y') dfs(i); } int main() { cin >> N; for (in...
#include <bits/stdc++.h> using namespace std; int N; bool visited[1005]; char a[1005][1005]; int cnt = 0, k = 0; int cc; int t[2]; void dfs(int pos) { if (visited[pos]) return; visited[pos] = true; cc++; for (int i = 0; i < N; i++) if (a[pos][i] == 'Y') dfs(i); } int main() { cin >> N; for ...
replace
4
6
4
6
0
p01493
C++
Time Limit Exceeded
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <complex> #include <cstdio> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #includ...
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <complex> #include <cstdio> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #includ...
insert
190
190
190
192
TLE
p01493
C++
Memory Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define rep(i, x, y) for (int i = (x); i < (y); ++i) #define debug(x) #x << "=" << (x) #ifdef DEBUG #define _GLIBCXX_DEBUG #define print(x) std::cerr << debug(x) << " (L:" << __LINE__ << ")" << std::endl #else #define print(x) #endif const int inf = 1e9; const int64_t in...
#include <bits/stdc++.h> using namespace std; #define rep(i, x, y) for (int i = (x); i < (y); ++i) #define debug(x) #x << "=" << (x) #ifdef DEBUG #define _GLIBCXX_DEBUG #define print(x) std::cerr << debug(x) << " (L:" << __LINE__ << ")" << std::endl #else #define print(x) #endif const int inf = 1e9; const int64_t in...
replace
64
69
64
65
MLE
p01497
C++
Runtime Error
#include <bits/stdc++.h> #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 all(c) c.begin(), c.end() #define pb push_back #define fs first #define sc second #define show(x) cout << #x << " = " << x << endl #define chmin(x, y) x = min(x, y) #define chmax(...
#include <bits/stdc++.h> #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 all(c) c.begin(), c.end() #define pb push_back #define fs first #define sc second #define show(x) cout << #x << " = " << x << endl #define chmin(x, y) x = min(x, y) #define chmax(...
insert
36
36
36
40
0
p01498
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> P; #define each(i, a) for (auto &&i : a) #define FOR(i, a, b) for (ll i = (a), __last_##i = (b); i < __last_##i; i++) #define RFOR(i, a, b) for (ll i = (b)-1, __last_##i = (a); i >= __last_##i; i--) #define REP(i, n) FOR(i, 0, n...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> P; #define each(i, a) for (auto &&i : a) #define FOR(i, a, b) for (ll i = (a), __last_##i = (b); i < __last_##i; i++) #define RFOR(i, a, b) for (ll i = (b)-1, __last_##i = (a); i >= __last_##i; i--) #define REP(i, n) FOR(i, 0, n...
replace
80
81
80
81
0
p01498
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define FOR(i, k, n) for (int i = (k); i < (int)(n); i++) #define REP(i, n) FOR(i, 0, n) #define ALL(a) a.begin(), a.end() #define MS(m, v) memset(m, v, sizeof(m)) #define D10 fixed << setprecision(10) typedef long long ll; typedef long double ld; typedef vector<int> vi; ty...
#include <bits/stdc++.h> using namespace std; #define FOR(i, k, n) for (int i = (k); i < (int)(n); i++) #define REP(i, n) FOR(i, 0, n) #define ALL(a) a.begin(), a.end() #define MS(m, v) memset(m, v, sizeof(m)) #define D10 fixed << setprecision(10) typedef long long ll; typedef long double ld; typedef vector<int> vi; ty...
replace
47
48
47
48
0
p01499
C++
Runtime Error
#include <algorithm> #include <assert.h> #include <deque> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stdio.h> #include <string.h> #include <string> #include <vector> using namespace std; typedef long long ll; typedef unsigned int uint; typedef unsigned long long ull;...
#include <algorithm> #include <assert.h> #include <deque> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stdio.h> #include <string.h> #include <string> #include <vector> using namespace std; typedef long long ll; typedef unsigned int uint; typedef unsigned long long ull;...
replace
28
29
28
29
0
p01499
C++
Runtime Error
#include <algorithm> #include <cassert> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < (int)n; i++) #define each(i, c) for (__ty...
#include <algorithm> #include <cassert> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < (int)n; i++) #define each(i, c) for (__ty...
replace
28
29
28
29
0
p01499
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cassert> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <v...
#include <algorithm> #include <bitset> #include <cassert> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <v...
replace
34
35
34
35
0
p01502
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < int(n); ++i) bool used[100]; long long c[101][101], R; int n; long long solve(int k, long long res) { if (res < 0) return 1e15; vector<pair<int, int>> next; rep(i, n) if (!used[i]) next.pu...
#include <algorithm> #include <iostream> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < int(n); ++i) bool used[100]; long long c[101][101], R; int n; long long solve(int k, long long res) { if (res <= 0) return 1e15; vector<pair<int, int>> next; rep(i, n) if (!used[i]) next.p...
replace
13
14
13
14
TLE
p01504
C++
Runtime Error
#include <bits/stdc++.h> #define int long long #define N 100010 using namespace std; const int INF = 1LL << 55; const int mod = (1e9) + 7; const double EPS = 1e-8; const double PI = 6.0 * asin(0.5); template <class T> T Max(T &a, T b) { return a = max(a, b); } template <class T> T Min(T &a, T b) { return a = min(a, b);...
#include <bits/stdc++.h> #define int long long #define N 100010 using namespace std; const int INF = 1LL << 55; const int mod = (1e9) + 7; const double EPS = 1e-8; const double PI = 6.0 * asin(0.5); template <class T> T Max(T &a, T b) { return a = max(a, b); } template <class T> T Min(T &a, T b) { return a = min(a, b);...
replace
101
102
101
102
0
p01504
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; struct unionfind { vector<int> parent; vector<int> size; void init(int n) { size.clear(); parent.clear(); size.resize(n); parent.resize(n); for (int i = 0; i < n; i++) { parent[i] = i; size[i] = 1; } } int find(int x) { ...
#include <bits/stdc++.h> using namespace std; struct unionfind { vector<int> parent; vector<int> size; void init(int n) { size.clear(); parent.clear(); size.resize(n); parent.resize(n); for (int i = 0; i < n; i++) { parent[i] = i; size[i] = 1; } } int find(int x) { ...
replace
23
24
23
24
-11
p01504
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define INF 1000000007 using namespace std; typedef long long ll; typedef pair<int, int> P; struct diameter { static const int MAX = 10000; vector<int> G[MAX]; int n; int d[MAX]; bool vis[MAX]; int d2[2][MAX]; void bfs(int s) { fill(d, d + n, INF); queue<int> que; qu...
#include <bits/stdc++.h> #define INF 1000000007 using namespace std; typedef long long ll; typedef pair<int, int> P; struct diameter { static const int MAX = 10000; vector<int> G[MAX]; int n; int d[MAX]; bool vis[MAX]; int d2[2][MAX]; void bfs(int s) { fill(d, d + n, INF); queue<int> que; qu...
replace
137
151
137
148
TLE
p01505
C++
Time Limit Exceeded
#include <algorithm> #include <assert.h> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stdio.h> #include <string.h> #include <string> #include <vector> using namespace std; typedef long long ll; typedef unsigned int uint; typedef unsigned long long ull; static const dou...
#include <algorithm> #include <assert.h> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stdio.h> #include <string.h> #include <string> #include <vector> using namespace std; typedef long long ll; typedef unsigned int uint; typedef unsigned long long ull; static const dou...
replace
26
27
26
27
TLE
p01505
C++
Memory Limit Exceeded
#include <algorithm> #include <assert.h> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stdio.h> #include <string.h> #include <string> #include <vector> using namespace std; typedef long long ll; typedef unsigned int uint; typedef unsigned long long ull; static const dou...
#include <algorithm> #include <assert.h> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stdio.h> #include <string.h> #include <string> #include <vector> using namespace std; typedef long long ll; typedef unsigned int uint; typedef unsigned long long ull; static const dou...
replace
26
27
26
27
MLE
p01507
C++
Runtime Error
#include <bits/stdc++.h> #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 all(c) c.begin(), c.end() #define pb push_back #define fs first #define sc second #define show(x) cout << #x << " = " << x << endl #define chmin(x, y) x = min(x, y) #define chmax(...
#include <bits/stdc++.h> #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 all(c) c.begin(), c.end() #define pb push_back #define fs first #define sc second #define show(x) cout << #x << " = " << x << endl #define chmin(x, y) x = min(x, y) #define chmax(...
insert
35
35
35
37
0
p01508
C++
Time Limit Exceeded
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #define sgn(v) (abs((v)) < eps ? 0 : ((v) < 0 ? -1 : 1)...
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #define sgn(v) (abs((v)) < eps ? 0 : ((v) < 0 ? -1 : 1)...
replace
76
80
76
78
TLE
p01511
C++
Runtime Error
#include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; #define FOR(i, k, n) for (int i = (k); i < (i...
#include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; #define FOR(i, k, n) for (int i = (k); i < (i...
replace
143
145
143
145
0
p01511
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using Int = long long; template <typename T1, typename T2> inline void chmin(T1 &a, T2 b) { if (a > b) a = b; } template <typename T1, typename T2> inline void chmax(T1 &a, T2 b) { if (a < b) a = b; } // BEGIN CUT HERE template <size_t N, typename R> struct Squ...
#include <bits/stdc++.h> using namespace std; using Int = long long; template <typename T1, typename T2> inline void chmin(T1 &a, T2 b) { if (a > b) a = b; } template <typename T1, typename T2> inline void chmax(T1 &a, T2 b) { if (a < b) a = b; } // BEGIN CUT HERE template <size_t N, typename R> struct Squ...
replace
326
327
326
327
TLE
p01511
C++
Runtime Error
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <fstream> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #define REP(i, n) for (int i = 0; i < n; ++i) #define FOR(i, a, b) for (int i = a; i...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <fstream> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #define REP(i, n) for (int i = 0; i < n; ++i) #define FOR(i, a, b) for (int i = a; i...
replace
89
90
89
90
0
p01511
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define int long long #define r(i, n) for (int i = 0; i < n; i++) using namespace std; typedef pair<int, int> P; typedef vector<vector<int>> mat; int h, w, n; inline void mat_mul(mat &A, mat &B, int M = 1000000009) { mat ret(w, vector<int>(w)); for (int i = 0; i < w; ++i) { for (int j =...
#include <bits/stdc++.h> #define int long long #define r(i, n) for (int i = 0; i < n; i++) using namespace std; typedef pair<int, int> P; typedef vector<vector<int>> mat; int h, w, n; inline void mat_mul(mat &A, mat &B, int M = 1000000009) { mat ret(w, vector<int>(w)); for (int i = 0; i < w; ++i) { for (int j =...
replace
21
22
21
22
TLE
p01511
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define int long long #define r(i, n) for (int i = 0; i < n; i++) using namespace std; typedef pair<int, int> P; typedef vector<vector<int>> mat; int h, w, n; inline void mat_mul(mat &A, mat &B, int M = 1000000009) { mat ret(w, vector<int>(w)); for (int i = 0; i < w; ++i) { for (int j =...
#include <bits/stdc++.h> #define int long long #define r(i, n) for (int i = 0; i < n; i++) using namespace std; typedef pair<int, int> P; typedef vector<vector<int>> mat; int h, w, n; inline void mat_mul(mat &A, mat &B, int M = 1000000009) { mat ret(w, vector<int>(w)); for (int i = 0; i < w; ++i) { for (int j =...
replace
21
22
21
22
TLE
p01520
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define rep(i, a, n) for (int i = a; i < n; i++) #define repb(i, a, b) for (int i = a; i >= b; i--) #define all(a) a.begin(), a.end() #define o(a) cout << a << endl #define int long long #define fi first #define se second using namespace std; typedef vector<int> vi; typedef vector<vi> vvi; type...
#include <bits/stdc++.h> #define rep(i, a, n) for (int i = a; i < n; i++) #define repb(i, a, b) for (int i = a; i >= b; i--) #define all(a) a.begin(), a.end() #define o(a) cout << a << endl #define int long long #define fi first #define se second using namespace std; typedef vector<int> vi; typedef vector<vi> vvi; type...
insert
24
24
24
25
TLE
p01522
C++
Runtime Error
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i+...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i+...
replace
90
91
90
91
0
p01522
C++
Runtime Error
#include <iostream> #include <set> using namespace std; int main() { int n, k, r; int m[50], p[50], q[50]; int bunny[50][50]; int count = 0; set<int> all, selected; cin >> n >> k; for (int i = 0; i < k; ++i) { cin >> m[i]; for (int j = 0; j < m[i]; ++j) { cin >> bunny[i][j]; } } ci...
#include <iostream> #include <set> using namespace std; int main() { int n, k, r; int m[50], p[5000], q[5000]; int bunny[50][50]; int count = 0; set<int> all, selected; cin >> n >> k; for (int i = 0; i < k; ++i) { cin >> m[i]; for (int j = 0; j < m[i]; ++j) { cin >> bunny[i][j]; } } ...
replace
7
8
7
8
0
p01523
C++
Time Limit Exceeded
#include <stdio.h> int n, m, a[100], b[100]; int main() { scanf("%d%d", &n, &m); for (int i = 0; i < m; i++) scanf("%d%d", &a[i], &b[i]); int l = 1, c = 0; while (l <= n) { int ptr = -1; for (int j = 0; j < m; j++) { if (a[j] <= l) ptr = j; } if (ptr == -1) { printf("Impo...
#include <stdio.h> int n, m, a[100], b[100]; int main() { scanf("%d%d", &n, &m); for (int i = 0; i < m; i++) scanf("%d%d", &a[i], &b[i]); int l = 1, c = 0; while (l <= n) { int ptr = -1; for (int j = 0; j < m; j++) { if (a[j] <= l && b[j] >= l && b[ptr] < b[j]) ptr = j; } if (p...
replace
10
11
10
11
TLE
p01523
C++
Time Limit Exceeded
#include <algorithm> #include <bitset> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <fstream> #include <iomanip> #include <iostream> #include <iterator> #include <map> #include <queue> #include <set> #include <sstream> #include...
#include <algorithm> #include <bitset> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <fstream> #include <iomanip> #include <iostream> #include <iterator> #include <map> #include <queue> #include <set> #include <sstream> #include...
replace
115
116
115
116
TLE
p01525
C++
Runtime Error
#define _USE_MATH_DEFINES #define INF 0x3f3f3f3f #include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <iostream> #include <limits> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #in...
#define _USE_MATH_DEFINES #define INF 0x3f3f3f3f #include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <iostream> #include <limits> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #in...
replace
34
35
34
35
0
p01526
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define EPS (1e-8) #define N_MAX 200005 using namespace std; typedef double ll; int N; ll R, x[N_MAX], y[N_MAX]; bool used[N_MAX]; struct node { vector<ll> Point; int l, r; node() {} node(vector<ll> a) { Point = a, l = r = -1; } }; const int K = 2; // K:テヲツャツ。テ・ツ?εヲツ閉ー int D; // D:テ」...
#include <bits/stdc++.h> #define EPS (1e-8) #define N_MAX 200005 using namespace std; typedef double ll; int N; ll R, x[N_MAX], y[N_MAX]; bool used[N_MAX]; struct node { vector<ll> Point; int l, r; node() {} node(vector<ll> a) { Point = a, l = r = -1; } }; const int K = 2; // K:テヲツャツ。テ・ツ?εヲツ閉ー int D; // D:テ」...
replace
23
24
23
24
TLE
p01529
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long int ll; int main() { ll N; cin >> N; vector<ll> w(N), sum(N, 0); for (ll i = 0; i < N; i++) { cin >> w[i]; sum[i + 1] = sum[i] + w[i]; } vector<vector<ll>> dp(N, vector<ll>(N, -1)), mo(N, vector<ll>(N)); for (ll i = 0; i < N; i++) { ...
#include <bits/stdc++.h> using namespace std; typedef long long int ll; int main() { ll N; cin >> N; vector<ll> w(N), sum(N + 1, 0); for (ll i = 0; i < N; i++) { cin >> w[i]; sum[i + 1] = sum[i] + w[i]; } vector<vector<ll>> dp(N, vector<ll>(N, -1)), mo(N, vector<ll>(N)); for (ll i = 0; i < N; i++...
replace
7
8
7
8
-6
Fatal glibc error: malloc assertion failure in sysmalloc: (old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)
p01529
C++
Runtime Error
#include <algorithm> #include <cstdio> #define MAX_N (100) using namespace std; typedef long long lint; int main() { int N; lint w[MAX_N], rSum[MAX_N]; static lint dp[MAX_N][MAX_N]; static int pos[MAX_N][MAX_N]; scanf("%d", &N); for (int i = 0; i < N; i++) { scanf("%lld", w + i); rSum[i] = i ?...
#include <algorithm> #include <cstdio> #define MAX_N (4000) using namespace std; typedef long long lint; int main() { int N; lint w[MAX_N], rSum[MAX_N]; static lint dp[MAX_N][MAX_N]; static int pos[MAX_N][MAX_N]; scanf("%d", &N); for (int i = 0; i < N; i++) { scanf("%lld", w + i); rSum[i] = i ...
replace
3
4
3
4
0
p01529
C++
Runtime Error
#include <algorithm> #include <iostream> #include <vector> #define INF (1LL << 61) using namespace std; typedef unsigned long long ull; int main(void) { int n; cin >> n; vector<ull> cost(n); for (int i = 0; i < n; i++) { cin >> cost[i]; if (i > 0) cost[i] += cost[i - 1]; } static ull dp[...
#include <algorithm> #include <iostream> #include <vector> #define INF (1LL << 61) using namespace std; typedef unsigned long long ull; int main(void) { int n; cin >> n; vector<ull> cost(n); for (int i = 0; i < n; i++) { cin >> cost[i]; if (i > 0) cost[i] += cost[i - 1]; } static ull dp[...
replace
21
24
21
23
-11
p01529
C++
Time Limit Exceeded
#include <algorithm> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <utility> #include <vector> #define ll long long int #define pb push_back #define mk make_pair #define pq priority_queue using namespace std; typedef pair<int, int> P...
#include <algorithm> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <utility> #include <vector> #define ll long long int #define pb push_back #define mk make_pair #define pq priority_queue using namespace std; typedef pair<int, int> P...
replace
45
46
45
47
TLE
p01529
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define DUMP(x) cerr << #x << "=" << x << endl #define DUMP2(x, y) \ cerr << "(" << #x << ", " << #y << ") = (" << x << ", " << y << ")" << endl #define BINARY(x) static_cast<bitset<16>>(x) #define rep(i, n) for...
#include <bits/stdc++.h> using namespace std; #define DUMP(x) cerr << #x << "=" << x << endl #define DUMP2(x, y) \ cerr << "(" << #x << ", " << #y << ") = (" << x << ", " << y << ")" << endl #define BINARY(x) static_cast<bitset<16>>(x) #define rep(i, n) for...
replace
26
29
26
29
-11
p01532
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> using namespace std; typedef pair<int, int> P; const int MAX = 100; P data[MAX]; int N, T, H, L; int mon; void solve() { int player = -1; while (1) { player++; if (player == N) player = 0; if (data[player].first > 0) { mon += 10; T++; ...
#include <algorithm> #include <iostream> using namespace std; typedef pair<int, int> P; const int MAX = 100; P data[MAX]; int N, T, H, L; int mon; void solve() { int player = -1; while (1) { player++; if (player == N) player = 0; if (data[player].first > 0) { mon += 10; T++; ...
replace
37
39
37
40
TLE
p01534
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> using namespace std; int n, m, a[55], b[55], c[55], dp[55][55][55][55]; bool vis[55][55][55][55]; int rec(int pos, int rem, int lv2, int lv1) { if (pos == n) return 0; if (vis[pos][rem][lv2][lv1]) return dp[pos][rem][lv2][lv1]; int ret = -999999999; for (int i = ...
#include <algorithm> #include <iostream> using namespace std; int n, m, a[55], b[55], c[55], dp[55][55][55][55]; bool vis[55][55][55][55]; int rec(int pos, int rem, int lv2, int lv1) { if (pos == n) return 0; if (vis[pos][rem][lv2][lv1]) return dp[pos][rem][lv2][lv1]; int ret = -999999999; for (int i = ...
insert
24
24
24
25
TLE
p01534
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <string> #include <vector> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (int)n; i++) int n, m...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <string> #include <vector> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (int)n; i++) int n, m...
replace
37
38
37
39
TLE
p01535
C++
Runtime Error
#include <assert.h> #include <iostream> #include <map> #include <stdio.h> #include <stdlib.h> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) struct Node; struct Fun; int h, w, cr, cc; char scr[512][512]; Node *lnk[512][512]; Fun *evt[512][512]; map<string, vector<pair<stri...
#include <assert.h> #include <iostream> #include <map> #include <stdio.h> #include <stdlib.h> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) struct Node; struct Fun; int h, w, cr, cc; char scr[512][512]; Node *lnk[512][512]; Fun *evt[512][512]; map<string, vector<pair<stri...
replace
71
72
71
72
0
p01538
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define iota(i, n, b, s) \ for (int i = int(b); i != int((b) + (s) * (n)); i += (s)) #define range(i, n, m) \ iota(i, (((n) > (m)) ? ((n) - (m)) : ((m) - (n)))...
#include <bits/stdc++.h> using namespace std; #define iota(i, n, b, s) \ for (int i = int(b); i != int((b) + (s) * (n)); i += (s)) #define range(i, n, m) \ iota(i, (((n) > (m)) ? ((n) - (m)) : ((m) - (n)))...
delete
74
75
74
74
0
>>> x = 81 >>> x = 8 >>> x = 36 >>> x = 18 >>> x = 8
p01538
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #includ...
#include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #includ...
replace
34
35
34
35
0
p01538
C++
Runtime Error
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; int inf = 1000000000; int main(void) { int q, n; cin >> q; ...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; int inf = 1000000000; int main(void) { int q, n; cin >> q; ...
replace
26
27
26
27
0
9 9 8 1 1 23 12 3 3 6 1 8
p01539
C++
Runtime Error
#include <algorithm> #include <cctype> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <fstream> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <...
#include <algorithm> #include <cctype> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <fstream> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <...
replace
66
67
66
67
0
p01539
C++
Runtime Error
#include <bits/stdc++.h> #define ll long long #define INF 1000000005 #define MOD 1000000007 #define EPS 1e-10 #define rep(i, n) for (int i = 0; i < (int)n; ++i) #define each(a, b) for (auto(a) : (b)) #define all(v) (v).begin(), (v).end() #define fi first #define se second #define pb push_back #define show(x) cout << #x...
#include <bits/stdc++.h> #define ll long long #define INF 1000000005 #define MOD 1000000007 #define EPS 1e-10 #define rep(i, n) for (int i = 0; i < (int)n; ++i) #define each(a, b) for (auto(a) : (b)) #define all(v) (v).begin(), (v).end() #define fi first #define se second #define pb push_back #define show(x) cout << #x...
replace
26
27
26
27
0
p01539
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (int i = a; i < b; i++) typedef long long ll; #define INF 1LL << 60 struct Comp { bool operator()(pair<int, ll> a, pair<int, ll> b) { return a.second > b.second; } }; int sx, sy, gx, gy; int lx, ly; bool box[300][300]; ll dist[300][300][6...
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (int i = a; i < b; i++) typedef long long ll; #define INF 1LL << 60 struct Comp { bool operator()(pair<int, ll> a, pair<int, ll> b) { return a.second > b.second; } }; int sx, sy, gx, gy; int lx, ly; bool box[300][300]; ll dist[300][300][6...
replace
23
26
23
25
0
p01539
C++
Runtime Error
// ?????¬???????????¬?????? #include <algorithm> #include <cassert> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <list> #include <ma...
// ?????¬???????????¬?????? #include <algorithm> #include <cassert> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <list> #include <ma...
replace
53
54
53
54
0
p01539
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define LOG(...) fprintf(stderr, __VA_ARGS__) // #define LOG(...) #define FOR(i, a, b) for (int i = (int)(a); i < (int)(b); ++i) #define RFOR(i, a, b) for (int i = (int)(b - 1); i >= (int)(a); --i) #define REP(i, n) for (int i = 0; i < (int)(n); ++i) #define RREP(i, n) fo...
#include <bits/stdc++.h> using namespace std; #define LOG(...) fprintf(stderr, __VA_ARGS__) // #define LOG(...) #define FOR(i, a, b) for (int i = (int)(a); i < (int)(b); ++i) #define RFOR(i, a, b) for (int i = (int)(b - 1); i >= (int)(a); --i) #define REP(i, n) for (int i = 0; i < (int)(n); ++i) #define RREP(i, n) fo...
delete
64
66
64
64
0
p01539
C++
Runtime Error
#include <bits/stdc++.h> #define FOR(i, k, n) for (int i = (k); i < (int)(n); ++i) #define REP(i, n) FOR(i, 0, n) #define ALL(x) begin(x), end(x) using namespace std; struct S { int x, y, t; }; bool operator==(S l, S r) { return l.x == r.x && l.y == r.y && l.t == r.t; } int to_i(const S &s) { return s.x + 100 + (s....
#include <bits/stdc++.h> #define FOR(i, k, n) for (int i = (k); i < (int)(n); ++i) #define REP(i, n) FOR(i, 0, n) #define ALL(x) begin(x), end(x) using namespace std; struct S { int x, y, t; }; bool operator==(S l, S r) { return l.x == r.x && l.y == r.y && l.t == r.t; } int to_i(const S &s) { return s.x + 100 + (s....
replace
84
85
84
85
-11
p01540
C++
Runtime Error
#include <algorithm> #include <iostream> #include <vector> using namespace std; int map[5001][5001] = {0}; int main() { long long int n, m, input_x, input_y; cin >> n >> m; vector<long long int> x, y, x_s, y_s; x_s.push_back(-10000000000); x_s.push_back(10000000000); y_s.push_back(-10000000000); y_s....
#include <algorithm> #include <iostream> #include <vector> using namespace std; int map[5003][5003] = {0}; int main() { long long int n, m, input_x, input_y; cin >> n >> m; vector<long long int> x, y, x_s, y_s; x_s.push_back(-10000000000); x_s.push_back(10000000000); y_s.push_back(-10000000000); y_s....
replace
5
6
5
6
127
/tmp/d54a2bfc-2a72-4aec-bbd4-6c4a1a530ed4.out: error while loading shared libraries: libc.so.6: failed to map segment from shared object
p01540
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef vector<int> VI; #define pb push_back #define all(vec) (vec).begin(), (vec).end() const int INF = 2000000000; int x[5000], y[5000]; int sx[500000], sy[500000], ex[500000], ey[500000]; short num[5000][5000]; int find(VI &zip, int key, int type = 0) { int l = 0, ...
#include <bits/stdc++.h> using namespace std; typedef vector<int> VI; #define pb push_back #define all(vec) (vec).begin(), (vec).end() const int INF = 2000000000; int x[5000], y[5000]; int sx[500000], sy[500000], ex[500000], ey[500000]; short num[5050][5050]; int find(VI &zip, int key, int type = 0) { int l = 0, ...
replace
11
12
11
12
0
p01540
C++
Runtime Error
#include <bits/stdc++.h> #define fi first #define se second #define show(x) cerr << #x << "=" << x << "\n" typedef long long ll; using namespace std; // const ll MOD=(ll)1e9+7; // const ll inf=(ll)1e14; const int dy[] = {1, 0, -1}; const int dx[] = {1, 0, -1}; int n, m, h, w; vector<int> x, y, xx, yy; int imos[5001][50...
#include <bits/stdc++.h> #define fi first #define se second #define show(x) cerr << #x << "=" << x << "\n" typedef long long ll; using namespace std; // const ll MOD=(ll)1e9+7; // const ll inf=(ll)1e14; const int dy[] = {1, 0, -1}; const int dx[] = {1, 0, -1}; int n, m, h, w; vector<int> x, y, xx, yy; int imos[5011][50...
replace
12
13
12
13
127
/tmp/6ed1569d-9e14-41da-9f60-4e7704f21ebf.out: error while loading shared libraries: libc.so.6: failed to map segment from shared object
p01540
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; int sum[5000][5000]; int X[5000], Y[5000]; int X1[500000], X2[500000], Y1[500000], Y2[500000]; int n, m; int compress(int *x, int *X1, int *X2) { vector<int> v; rep(i, n) v.push_back(x[i]); sort(v.begin(), v.end()); v....
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; int sum[6000][6000]; int X[6000], Y[6000]; int X1[600000], X2[600000], Y1[600000], Y2[600000]; int n, m; int compress(int *x, int *X1, int *X2) { vector<int> v; rep(i, n) v.push_back(x[i]); sort(v.begin(), v.end()); v....
replace
4
7
4
7
-11
p01540
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <cmath> #include <cstdio> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <...
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <cmath> #include <cstdio> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <...
replace
68
69
68
69
127
/tmp/675f7277-fc01-4638-8efe-0ac8a7d7c658.out: error while loading shared libraries: libc.so.6: failed to map segment from shared object
p01540
C++
Runtime Error
#include <algorithm> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <vector> using nam...
#include <algorithm> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <vector> using nam...
insert
136
136
136
141
127
/tmp/3d92c6e2-6fa2-407c-b0a8-80758dd77cb8.out: error while loading shared libraries: libc.so.6: failed to map segment from shared object
p01540
C++
Memory Limit Exceeded
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> using namespace std; typedef long long ll; int N, M; ll fie[5111][5111]; ll rui[5111][5111]; ll xy[2][5001]; ll X[5001], Y[5001]; int W, H; int compress(in...
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> using namespace std; typedef long long ll; int N, M; int fie[5005][5005]; int rui[5005][5005]; ll xy[2][5001]; ll X[5001], Y[5001]; int W, H; int compress(...
replace
14
16
14
16
MLE
p01540
C++
Memory Limit Exceeded
#include <algorithm> #include <bitset> #include <ciso646> #include <cmath> #include <cstdio> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <tuple> #include <vec...
#include <algorithm> #include <bitset> #include <ciso646> #include <cmath> #include <cstdio> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <tuple> #include <vec...
replace
69
70
69
70
MLE
p01540
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; typedef pair<int, int> P; P p[5000]; vector<int> dat[10000]; void init(int k, int l, int r) { if (r - l == 1) { dat[k].push_back(p[l].second); return; } int lb = k * 2 + 1, rb = k * 2 + 2; init(lb, l, (l + r) ...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; typedef pair<int, int> P; P p[5000]; vector<int> dat[50000]; void init(int k, int l, int r) { if (r - l == 1) { dat[k].push_back(p[l].second); return; } int lb = k * 2 + 1, rb = k * 2 + 2; init(lb, l, (l + r) ...
replace
6
7
6
7
0
p01540
C++
Runtime Error
#include <algorithm> #include <cassert> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <list> #include <map> #include <numeric> #includ...
#include <algorithm> #include <cassert> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <list> #include <map> #include <numeric> #includ...
replace
44
46
44
46
0
p01540
C++
Runtime Error
#include <bits/stdc++.h> // #define int long long using namespace std; using pii = pair<int, int>; #define REPF(i, a, n) for (int i = (a); i < (int)(n); ++i) #define REP(i, n) REPF(i, 0, n) #define ALL(c) begin(c), end(c) int sum[5100][5100]; signed main() { int n, m; cin >> n >> m; vector<int> x(n), y(n); vec...
#include <bits/stdc++.h> // #define int long long using namespace std; using pii = pair<int, int>; #define REPF(i, a, n) for (int i = (a); i < (int)(n); ++i) #define REP(i, n) REPF(i, 0, n) #define ALL(c) begin(c), end(c) int sum[5100][5100]; signed main() { int n, m; cin >> n >> m; vector<int> x(n), y(n); vec...
insert
51
51
51
56
127
/tmp/83b59fe4-28eb-4052-a34c-2ec923aa4c05.out: error while loading shared libraries: libstdc++.so.6: failed to map segment from shared object
p01540
C++
Memory Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll segN = (1LL << 32); vector<ll> G; struct data { vector<ll> *v; bool flg; data *ch[2]; void init() { v = new vector<ll>; flg = false; ch[0] = (data *)malloc(sizeof(data)); ch[1] = (data *)malloc(sizeof(data)); ch[0...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll segN = (1LL << 32); vector<ll> G; struct data { vector<ll> *v; bool flg; data *ch[2]; void init() { v = new vector<ll>; flg = false; ch[0] = (data *)malloc(sizeof(data)); ch[1] = (data *)malloc(sizeof(data)); ch[0...
replace
39
40
39
40
MLE
p01540
C++
Memory Limit Exceeded
#include <algorithm> #include <bits/stdc++.h> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <math.h> #include <queue> #include <string> #include <vector> // #include <boost/multiprecision/cpp_int.hpp> #include <functional> #define int long long #define inf 1000000007 #define pa pai...
#include <algorithm> #include <bits/stdc++.h> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <math.h> #include <queue> #include <string> #include <vector> // #include <boost/multiprecision/cpp_int.hpp> #include <functional> // #define int long long #define inf 1000000007 #define...
replace
12
13
12
13
MLE
p01540
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int mp[5005][5005], n, m; vector<int> x, y; // O(n * log n ) n=v.size() vector<int> compress(vector<int> v) { // v = {4,6,7,1,1,6} // -> res={1,2,3,0,0,2} vector<int> copy = v; sort(v.begin(), v.end()); v.erase(unique(v.begin(), v.end()), v.end()); vector<...
#include <bits/stdc++.h> using namespace std; int mp[5005][5005], n, m; vector<int> x, y; // O(n * log n ) n=v.size() vector<int> compress(vector<int> v) { // v = {4,6,7,1,1,6} // -> res={1,2,3,0,0,2} vector<int> copy = v; sort(v.begin(), v.end()); v.erase(unique(v.begin(), v.end()), v.end()); vector<...
insert
25
25
25
27
127
/tmp/b1377cd3-fdb6-485d-924d-3b07c602f107.out: error while loading shared libraries: libc.so.6: failed to map segment from shared object
p01542
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cctype> #include <complex> #include <cstring> #include <iomanip> #include <iostream> #include <limits.h> #include <map> #include <math.h> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdio.h> #include <string> #include <vector> #define V...
#include <algorithm> #include <bitset> #include <cctype> #include <complex> #include <cstring> #include <iomanip> #include <iostream> #include <limits.h> #include <map> #include <math.h> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdio.h> #include <string> #include <vector> #define V...
replace
172
174
172
174
0
Persing : 000 res : 0
p01543
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <ctime> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <tuple> #include <typeinfo> #include <vector> using namespace std; typedef long long ll; const int MAX_V = 110; co...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <ctime> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <tuple> #include <typeinfo> #include <vector> using namespace std; typedef long long ll; const int MAX_V = 110; co...
replace
71
72
71
72
TLE
p01543
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <ctime> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <tuple> #include <typeinfo> #include <vector> using namespace std; typedef long long ll; const int MAX_V = 110; co...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <ctime> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <tuple> #include <typeinfo> #include <vector> using namespace std; typedef long long ll; const int MAX_V = 110; co...
replace
98
99
98
99
TLE
p01543
C++
Runtime Error
#include <bits/stdc++.h> #define INF 1000000000 #define MAX_V 100 #define MAX_E 1000 using namespace std; typedef pair<int, int> P; struct edge { int to, cap, cost, rev; edge(int to_, int cap_, int cost_, int rev_) : to(to_), cap(cap_), cost(cost_), rev(rev_) {} }; int V; vector<edge> G[MAX_V]; int h[MAX_V];...
#include <bits/stdc++.h> #define INF 1000000000 #define MAX_V 202 using namespace std; typedef pair<int, int> P; struct edge { int to, cap, cost, rev; edge(int to_, int cap_, int cost_, int rev_) : to(to_), cap(cap_), cost(cost_), rev(rev_) {} }; int V; vector<edge> G[MAX_V]; int h[MAX_V]; int dist[MAX_V]; i...
replace
2
4
2
3
0
p01544
C++
Runtime Error
#include <algorithm> #include <cassert> #include <cstdio> #include <vector> using namespace std; const long long inf = 1e13; struct RMQ { int N; long long dat[8192]; void init(int N_) { N = 1; while (N < N_) N *= 2; for (int i = 1; i <= N * 2 - 1; i++) dat[i] = -inf; } void update(i...
#include <algorithm> #include <cassert> #include <cstdio> #include <vector> using namespace std; const long long inf = 1e13; struct RMQ { int N; long long dat[8192]; void init(int N_) { N = 1; while (N < N_) N *= 2; for (int i = 1; i <= N * 2 - 1; i++) dat[i] = -inf; } void update(i...
replace
90
93
90
95
-11
p01544
C++
Runtime Error
#include <algorithm> #include <array> #include <cmath> #include <complex> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <iterator> #include <map> #include <memory> #include <numeric> #include <queue> #include <random> #include <set> #include <stack> #include <string> #include <t...
#include <algorithm> #include <array> #include <cmath> #include <complex> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <iterator> #include <map> #include <memory> #include <numeric> #include <queue> #include <random> #include <set> #include <stack> #include <string> #include <t...
replace
659
660
659
660
0
p01544
C++
Time Limit Exceeded
#include <algorithm> #include <cstdio> using namespace std; int n, c, e, ans[4009], pre[4009], dp[4009], ps[4009][4009], l[8000009], r[8000009], p[8000009]; long long s[4009]; int main() { scanf("%d", &n); for (int i = 1; i <= n; i++) scanf("%lld", &s[i]), s[i] += s[i - 1]; for (int i = 0; i < n; i++) { ...
#include <algorithm> #include <cstdio> using namespace std; int n, c, e, ans[4009], pre[4009], dp[4009], ps[4009][4009], l[8002009], r[8002009], p[8002009]; long long s[4009]; int main() { scanf("%d", &n); for (int i = 1; i <= n; i++) scanf("%lld", &s[i]), s[i] += s[i - 1]; for (int i = 0; i < n; i++) { ...
replace
3
5
3
5
TLE
p01544
C++
Memory Limit Exceeded
#include <algorithm> #include <cstdio> #include <iostream> #include <queue> #include <vector> using namespace std; typedef long long ll; typedef pair<ll, int> P; #define rep(i, x) for (int i = 0; i < x; i++) #define rep1(i, x) for (int i = 1; i <= x; i++) #define pb push_back #define sor(vec) sort(vec.begin(), vec.en...
#include <algorithm> #include <cstdio> #include <iostream> #include <queue> #include <vector> using namespace std; typedef long long ll; typedef pair<ll, int> P; #define rep(i, x) for (int i = 0; i < x; i++) #define rep1(i, x) for (int i = 1; i <= x; i++) #define pb push_back #define sor(vec) sort(vec.begin(), vec.en...
replace
66
67
66
67
MLE
p01545
C++
Runtime Error
#include <bits/stdc++.h> #define int long long #define PB push_back #define FI first #define SE second using namespace std; static const int MAX_N = 1 << 17; static const int inf = 1ll << 6; typedef pair<int, int> PII; int N; vector<PII> V; class Segment { public: int dp[MAX_N]; int n; void init(int n_) { ...
#include <bits/stdc++.h> #define int long long #define PB push_back #define FI first #define SE second using namespace std; static const int MAX_N = 1 << 17; static const int inf = 1ll << 6; typedef pair<int, int> PII; int N; vector<PII> V; class Segment { public: int dp[2 * MAX_N]; int n; void init(int n_) { ...
replace
15
16
15
16
0
p01545
C++
Runtime Error
#include <algorithm> #include <climits> #include <iostream> #include <vector> const int MAX_N = 100000; typedef long long ll; using namespace std; ll n, dat[2 * MAX_N - 1]; void init(int n_) { n = 1; while (n < n_) n *= 2; } void update(int k, ll a) { k += n - 1; dat[k] = a; while (k > 0) { k =...
#include <algorithm> #include <climits> #include <iostream> #include <vector> const int MAX_N = 1000000; typedef long long ll; using namespace std; ll n, dat[2 * MAX_N - 1]; void init(int n_) { n = 1; while (n < n_) n *= 2; } void update(int k, ll a) { k += n - 1; dat[k] = a; while (k > 0) { k ...
replace
5
6
5
6
0
p01545
C++
Time Limit Exceeded
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <complex> #include <cstdio> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #includ...
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <complex> #include <cstdio> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #includ...
replace
175
188
175
184
TLE
p01545
C++
Runtime Error
#include <algorithm> #include <cassert> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> #define REP(i, s, n) for (int i ...
#include <algorithm> #include <cassert> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> #define REP(i, s, n) for (int i ...
replace
24
25
24
25
0
p01546
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using int64 = long long; const int64 LINF = 1LL << 60; const int INF = 1 << 30; int V, E, K; int64 g[31][150][150]; int main() { fill_n(**g, 31 * 150 * 150, -LINF); cin >> V >> E >> K; for (int i = 0; i < E; i++) { g[0][i][i] = 0; } for (int i = 0; i < E;...
#include <bits/stdc++.h> using namespace std; using int64 = long long; const int64 LINF = 1LL << 60; const int INF = 1 << 30; int V, E, K; int64 g[31][150][150]; int main() { fill_n(**g, 31 * 150 * 150, -LINF); cin >> V >> E >> K; for (int i = 0; i < V; i++) { g[0][i][i] = 0; } for (int i = 0; i < E;...
replace
15
16
15
16
0
p01547
C++
Runtime Error
#include <algorithm> #include <cfloat> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <utility> #include <vector> using namespace std; #define EPS 1e-7 typedef complex<double> P; typedef const P &rP; typedef vector<P> vP; typedef vector<int> vint; struct segment { P a, b; segme...
#include <algorithm> #include <cfloat> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <utility> #include <vector> using namespace std; #define EPS 1e-9 typedef complex<double> P; typedef const P &rP; typedef vector<P> vP; typedef vector<int> vint; struct segment { P a, b; segme...
replace
10
11
10
11
0
p01547
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define MAX 1000 #define inf 1 << 29 #define linf 1e16 #define eps (1e-8) #define mod 1000000007 #define pi acos(-1) #define phi (1.0 + sqrt(5)) / 2.0 #define f first #define s second #define mp make_pair #define pb push_back #define all(a) (a).begin(), (a).end() #define pd(a) printf("%.10f\n",...
#include <bits/stdc++.h> #define MAX 1000 #define inf 1 << 29 #define linf 1e16 #define eps (1e-8) #define mod 1000000007 #define pi acos(-1) #define phi (1.0 + sqrt(5)) / 2.0 #define f first #define s second #define mp make_pair #define pb push_back #define all(a) (a).begin(), (a).end() #define pd(a) printf("%.10f\n",...
replace
184
185
184
185
TLE
p01549
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef unsigned char uc; int main() { int m; cin >> m; int l[m], r[m]; map<string, int> ms; for (int i = 0; i < m; i++) { string s; cin >> s >> l[i] >> r[i]; ms[s] = i; } int n; cin >> n; string ss[n]; for (int i = 0; i < n; i++) cin >> ...
#include <bits/stdc++.h> using namespace std; typedef unsigned char uc; int main() { int m; cin >> m; int l[m], r[m]; map<string, int> ms; for (int i = 0; i < m; i++) { string s; cin >> s >> l[i] >> r[i]; ms[s] = i; } int n; cin >> n; string ss[n]; for (int i = 0; i < n; i++) cin >> ...
replace
26
27
26
29
0
p01549
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef pair<int, int> P; int main() { int n, m, mod = 256; cin >> n; map<string, P> ma; for (int i = 0; i < n; i++) { string s; P p; cin >> s >> p.first >> p.second; ma[s] = p; } queue<vector<int>> que; cin >> m; for (int i = 0; i < m; i++) ...
#include <bits/stdc++.h> using namespace std; typedef pair<int, int> P; int main() { int n, m, mod = 256; cin >> n; map<string, P> ma; for (int i = 0; i < n; i++) { string s; P p; cin >> s >> p.first >> p.second; ma[s] = p; } queue<vector<int>> que; cin >> m; for (int i = 0; i < m; i++) ...
replace
58
59
58
59
0
p01550
C++
Runtime Error
#include <iostream> #include <string> #include <vector> using namespace std; long long n, a[209], sz[209], ret, mod = 1000000007; long long dp[209][209][209], power[5] = {1, 10, 100, 1000, 10000}; long long solve(vector<long long> E, long long num, bool iszero) { for (int i = 0; i <= E.size(); i++) { for (int j...
#include <iostream> #include <string> #include <vector> using namespace std; long long n, a[209], sz[209], ret, mod = 1000000007; long long dp[209][209][209], power[5] = {1, 10, 100, 1000, 10000}; long long solve(vector<long long> E, long long num, bool iszero) { for (int i = 0; i <= E.size(); i++) { for (int j...
replace
28
29
28
29
-11
p01551
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define FOR(i, k, n) for (int i = (k); i < (n); i++) #define REP(i, n) FOR(i, 0, n) #define ALL(a) a.begin(), a.end() #define MS(m, v) memset(m, v, sizeof(m)) #define D10 fixed << setprecision(10) typedef long long ll; typedef long double ld; typedef vector<int> vi; typed...
#include <bits/stdc++.h> using namespace std; #define FOR(i, k, n) for (int i = (k); i < (n); i++) #define REP(i, n) FOR(i, 0, n) #define ALL(a) a.begin(), a.end() #define MS(m, v) memset(m, v, sizeof(m)) #define D10 fixed << setprecision(10) typedef long long ll; typedef long double ld; typedef vector<int> vi; typed...
insert
30
30
30
32
0
p01551
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const string buff = "ATGC"; const int mod = 1e9 + 7; vector<pair<int, int>> toto[50]; vector<int> order; int dp2[52][52][52]; int dp3[52][52][52]; void dfs(int idx) { for (auto &to : toto[idx]) { if (to.first) dfs(to.second); else order.push_back(...
#include <bits/stdc++.h> using namespace std; const string buff = "ATGC"; const int mod = 1e9 + 7; vector<pair<int, int>> toto[50]; vector<int> order; int dp2[52][52][52]; int dp3[52][52][52]; void dfs(int idx) { for (auto &to : toto[idx]) { if (to.first) dfs(to.second); else order.push_back(...
replace
75
78
75
78
0
p01551
C++
Runtime Error
#include <algorithm> #include <cstdio> #include <iostream> #include <map> #include <string> #include <utility> #include <vector> using namespace std; #define MOD 1000000007 int nsum; int rest(int x, int i, int k) { if (k == 3) { return nsum - (x & 077) - (x >> 6 & 077) - (x >> 12 & 077) - i; } return (x >>...
#include <algorithm> #include <cstdio> #include <iostream> #include <map> #include <string> #include <utility> #include <vector> using namespace std; #define MOD 1000000007 int nsum; int rest(int x, int i, int k) { if (k == 3) { return nsum - (x & 077) - (x >> 6 & 077) - (x >> 12 & 077) - i; } return (x >>...
replace
72
74
72
73
0
p01551
C++
Runtime Error
#include <algorithm> #include <assert.h> #include <bitset> #include <complex> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #defin...
#include <algorithm> #include <assert.h> #include <bitset> #include <complex> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #defin...
replace
101
102
101
102
0
p01551
C++
Memory Limit Exceeded
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int(i) = 0; (i) < (int)(n); ++(i)) #define all(x) (x).begin(), (x).end() #define pb push_back #define fi first #define se second #define dbg(x) cout << #x " = " << ((x)) << endl template <class T, class U> ostream &operator<<(ost...
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int(i) = 0; (i) < (int)(n); ++(i)) #define all(x) (x).begin(), (x).end() #define pb push_back #define fi first #define se second #define dbg(x) cout << #x " = " << ((x)) << endl template <class T, class U> ostream &operator<<(ost...
insert
89
89
89
109
MLE
p01551
C++
Memory Limit Exceeded
#include <iostream> #include <string> #include <vector> using namespace std; #define MAX_N 100 #define MOD 1000000007 int A, B, C, D, N; int dp1[MAX_N]; string S, U[MAX_N]; vector<string> T[MAX_N]; vector<string> W[MAX_N]; int X[200][4]; char DNA[5] = "ATGC"; int dp[300][70][70][70]; int solve() { for (int i = N -...
#include <iostream> #include <string> #include <vector> using namespace std; #define MAX_N 100 #define MOD 1000000007 int A, B, C, D, N; int dp1[MAX_N]; string S, U[MAX_N]; vector<string> T[MAX_N]; vector<string> W[MAX_N]; int X[200][4]; char DNA[5] = "ATGC"; int dp[216][54][54][54]; int solve() { for (int i = N -...
replace
15
16
15
16
MLE
p01551
C++
Runtime Error
#include <algorithm> #include <bits/stdc++.h> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <math.h> #include <queue> #include <string> #include <vector> // #include <boost/multiprecision/cpp_int.hpp> #include <functional> // #define int long long #define inf 1000000007 #define ...
#include <algorithm> #include <bits/stdc++.h> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <math.h> #include <queue> #include <string> #include <vector> // #include <boost/multiprecision/cpp_int.hpp> #include <functional> // #define int long long #define inf 1000000007 #define ...
insert
176
176
176
180
-11
p01551
C++
Runtime Error
#include <bits/stdc++.h> #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 all(c) c.begin(), c.end() #define pb push_back #define fs first #define sc second #define show(x) cout << #x << " = " << x << endl #define chmin(x, y) x = min(x, y) #define chmax(...
#include <bits/stdc++.h> #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 all(c) c.begin(), c.end() #define pb push_back #define fs first #define sc second #define show(x) cout << #x << " = " << x << endl #define chmin(x, y) x = min(x, y) #define chmax(...
replace
23
24
23
24
0
p01552
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #define repi(i, a, b) for (int i = (a); i < (b); ++i) #define rep(i, a) repi(i, 0, a) #...
#include <algorithm> #include <bitset> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #define repi(i, a, b) for (int i = (a); i < (b); ++i) #define rep(i, a) repi(i, 0, a) #...
replace
52
53
52
53
0
p01553
C++
Runtime Error
#include <iostream> #include <vector> using namespace std; #define MOD 1000000007 typedef long long ll; ll dp[201][201][201] = {0}; // dp[n][rest U][rest empty box] = ??´????????° int main() { int N; cin >> N; vector<int> v; for (int i = 0; i < N; ++i) { char c; cin >> c; if (c != '-') { ...
#include <iostream> #include <vector> using namespace std; #define MOD 1000000007 typedef long long ll; ll dp[201][201][201] = {0}; // dp[n][rest U][rest empty box] = ??´????????° int main() { int N; cin >> N; vector<int> v; for (int i = 0; i < N; ++i) { char c; cin >> c; if (c != '-') { ...
insert
24
24
24
28
0
p01553
C++
Runtime Error
#include <cstring> #include <iostream> using namespace std; typedef long long ll; ll dp[128][128][128]; int main() { int n; int const mod = 1000000007; while (cin >> n && n) { memset(dp, 0, sizeof(dp)); dp[0][0][0] = 1; for (int k = 0; k < n; k++) { char c; cin >> c; if (c == '-') {...
#include <cstring> #include <iostream> using namespace std; typedef long long ll; ll dp[256][256][256]; int main() { int n; int const mod = 1000000007; while (cin >> n && n) { memset(dp, 0, sizeof(dp)); dp[0][0][0] = 1; for (int k = 0; k < n; k++) { char c; cin >> c; if (c == '-') {...
replace
4
5
4
5
0
p01553
C++
Time Limit Exceeded
#include <iostream> using namespace std; typedef long long ll; int main() { ll dp[420] = {}, *dp0 = dp + 1, *dp1 = dp + 221; dp1[0] = 1; int n; cin >> n; while (n--) { char c; cin >> c; if (c == '-') continue; for (int j = 0; j < 210; j++) { dp0[j] = (j * dp1[j] + ...
#include <iostream> using namespace std; typedef long long ll; int main() { ll dp[700] = {}, *dp0 = dp + 100, *dp1 = dp + 400; dp1[0] = 1; int n; cin >> n; while (n--) { char c; cin >> c; if (c == '-') continue; for (int j = 0; j < 210; j++) { dp0[j] = (j * dp1[j] + ...
replace
6
7
6
7
TLE
p01554
C++
Runtime Error
#include <algorithm> #include <cmath> #include <complex> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; #define ll long long #define vvi vector<vector<int>> #define All(X) X.begin(), X.end() #define FOR...
#include <algorithm> #include <cmath> #include <complex> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; #define ll long long #define vvi vector<vector<int>> #define All(X) X.begin(), X.end() #define FOR...
replace
28
29
28
29
0
p01554
C++
Runtime Error
#include <cstdio> #include <iostream> #include <string> using namespace std; int main() { int n; cin >> n; string str[100]; for (int i = 0; i < n; i++) { cin >> str[i]; } int m; cin >> m; int cnt = 0; for (int j = 0; j < m; j++) { string str2; cin >> str2; for (int k = 0; k < n; k++)...
#include <cstdio> #include <iostream> #include <string> using namespace std; int main() { int n; cin >> n; string str[256]; for (int i = 0; i < n; i++) { cin >> str[i]; } int m; cin >> m; int cnt = 0; for (int j = 0; j < m; j++) { string str2; cin >> str2; for (int k = 0; k < n; k++)...
replace
9
10
9
10
0