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
p00935
C++
Memory Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef pair<int, int> P; typedef pair<ll, ll> Pll; typedef vector<int> Vi; // typedef tuple<int, int, int> T; #define FOR(i, s, x) for (int i = s; i < (int)(x); i++) #define REP(i, x) FOR(i, 0, x) #define ALL(c) c.begin(), c.end() #define DUMP(x)...
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef pair<int, int> P; typedef pair<ll, ll> Pll; typedef vector<int> Vi; // typedef tuple<int, int, int> T; #define FOR(i, s, x) for (int i = s; i < (int)(x); i++) #define REP(i, x) FOR(i, 0, x) #define ALL(c) c.begin(), c.end() #define DUMP(x)...
insert
30
30
30
32
MLE
p00935
C++
Memory Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(n) begin(n), end(n) int a[1010]; int n; string solve() { set<string> S; for (int i = 0; i < n; i++) { string cur; for (int j = i; j < n; j++) { cur += (char)(a[j] + '0'); S.insert(cur...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(n) begin(n), end(n) int a[1010]; int n; string solve() { set<string> S; for (int i = 0; i < n; i++) { string cur; for (int j = i; j < n; j++) { cur += (char)(a[j] + '0'); if (cur.size...
insert
14
14
14
16
MLE
p00935
C++
Runtime Error
#include <bits/stdc++.h> #define r(i, n) for (int i = 0; i < n; i++) using namespace std; bool p[1001]; int main() { int n, c; cin >> n; int a[n]; r(i, n) cin >> a[i]; r(i, n) p[a[i]] = true; if (n > 1) r(i, n - 1) { int s = a[i] * 10 + a[i + 1]; p[s] = true; } if (n > 2) r(i, n - ...
#include <bits/stdc++.h> #define r(i, n) for (int i = 0; i < n; i++) using namespace std; bool p[10000]; int main() { int n, c; cin >> n; int a[n]; r(i, n) cin >> a[i]; r(i, n) p[a[i]] = true; if (n > 1) r(i, n - 1) { int s = a[i] * 10 + a[i + 1]; p[s] = true; } if (n > 2) r(i, n -...
replace
3
4
3
4
0
p00936
C++
Time Limit Exceeded
// aoj-VolumeICPCOOC2015-B / 2015-11-30 #include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <vector> using namespace std; typedef long long ll; typ...
// aoj-VolumeICPCOOC2015-B / 2015-11-30 #include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <vector> using namespace std; typedef long long ll; typ...
replace
78
79
78
79
TLE
p00936
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define REP(i, n) for (int i = 0; i < (int)(n); ++i) #define DEBUG(x) cerr << #x << " = " << x << endl #define int long long signed main() { int N; cin >> N; vector<int> R(N); REP(i, N) cin >> R[i]; // double ans = 0.0; // ans += R[0] + R[N - 1]; // for(int i ...
#include <bits/stdc++.h> using namespace std; #define REP(i, n) for (int i = 0; i < (int)(n); ++i) #define DEBUG(x) cerr << #x << " = " << x << endl #define int long long signed main() { int N; cin >> N; vector<int> R(N); REP(i, N) cin >> R[i]; // double ans = 0.0; // ans += R[0] + R[N - 1]; // for(int i ...
replace
34
35
34
35
0
pos[1] = 30
p00936
C++
Runtime Error
#include <cassert> #include <cmath> #include <iostream> #define rep(i, n) for (int i = 0; i < n; ++i) using namespace std; double r[1010], x[1010]; const double eps = 1e-11; const double inf = 1e9; bool cross(int m, double cx, double cy) { rep(i, m) { double dd = 0.0; dd += 1.0 * (x[i] - cx) * (x[i] - cx);...
#include <cassert> #include <cmath> #include <iostream> #define rep(i, n) for (int i = 0; i < n; ++i) using namespace std; double r[1010], x[1010]; const double eps = 1e-5; const double inf = 1e9; bool cross(int m, double cx, double cy) { rep(i, m) { double dd = 0.0; dd += 1.0 * (x[i] - cx) * (x[i] - cx); ...
replace
8
9
8
9
0
p00936
C++
Time Limit Exceeded
#include <algorithm> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <vector> #define _USE_MATH_DEFINES #include <cassert> #include <cctype> #include <cfloat> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #in...
#include <algorithm> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <vector> #define _USE_MATH_DEFINES #include <cassert> #include <cctype> #include <cfloat> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #in...
insert
117
117
117
118
TLE
p00937
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int n, m, a[3]; vector<int> rG[50]; int d[50], c[50]; bool dp[101][50][50]; void init(int si) { dp[0][si][si] = true; for (int i = 0; i <= 100; i++) { for (int j = 0; j < n; j++) { if (!dp[i][si][j]) continue; for (int k = 0; k < (int)rG[j].siz...
#include <bits/stdc++.h> using namespace std; int n, m, a[3]; vector<int> rG[50]; int d[50], c[50]; bool dp[101][50][50]; void init(int si) { dp[0][si][si] = true; for (int i = 0; i < 100; i++) { for (int j = 0; j < n; j++) { if (!dp[i][si][j]) continue; for (int k = 0; k < (int)rG[j].size...
replace
10
11
10
11
0
p00937
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using vi = vector<int>; using vvi = vector<vi>; #define rep(i, n) for (int i = 0; i < n; i++) #define all(a) a.begin(), a.end() vvi matmul(vvi a, vvi b) { int n = a.size(); vvi d(n, vi(n, 0)); rep(i, n) rep(j, n) rep(k, n) d[i][j] |= a[i][k] & b[k][j]; return d; } ...
#include <bits/stdc++.h> using namespace std; using vi = vector<int>; using vvi = vector<vi>; #define rep(i, n) for (int i = 0; i < n; i++) #define all(a) a.begin(), a.end() vvi matmul(vvi a, vvi b) { int n = a.size(); vvi d(n, vi(n, 0)); rep(i, n) rep(j, n) rep(k, n) d[i][j] |= a[i][k] & b[k][j]; return d; } ...
replace
16
17
16
17
-11
p00937
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <vector> using namespace std; // Brute Force Attack! int main(int argc, char *argv[]) { int n, m, a, b, c; cin >> n >> m >> a >> b >> c; vector<int> abc = {a, b, c}; sort(abc.begin(), abc.end()); vector<vector<bool>> step(n,...
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <vector> using namespace std; // Brute Force Attack! int main(int argc, char *argv[]) { int n, m, a, b, c; cin >> n >> m >> a >> b >> c; vector<int> abc = {a, b, c}; sort(abc.begin(), abc.end()); vector<vector<bool>> step(n,...
replace
101
102
101
102
TLE
p00937
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 mp make_pair #define pb push_back #define each(i, c) \ for (__typeof((c).begin()) i = (c).begin(); i != (c).end(); i++) #define dbg(x) ...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)n; i++) #define all(c) (c).begin(), (c).end() #define mp make_pair #define pb push_back #define each(i, c) \ for (__typeof((c).begin()) i = (c).begin(); i != (c).end(); i++) #define dbg(x) ...
replace
19
20
19
20
0
p00938
C++
Runtime Error
#include "bits/stdc++.h" #include <unordered_map> #include <unordered_set> #pragma warning(disable : 4996) using namespace std; using ld = long double; template <class T> using Table = vector<vector<T>>; const ld eps = 1e-9; //// < "D:\D_Download\Visual Studio ///2015\Projects\programing_contest_c++\Debug\a.txt" #inc...
#include "bits/stdc++.h" #include <unordered_map> #include <unordered_set> #pragma warning(disable : 4996) using namespace std; using ld = long double; template <class T> using Table = vector<vector<T>>; const ld eps = 1e-9; //// < "D:\D_Download\Visual Studio ///2015\Projects\programing_contest_c++\Debug\a.txt" #inc...
delete
566
568
566
566
0
p00940
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int N, M, K; int a[300]; int b[300][300]; int cnt[300]; int s[200000], t[200000]; int A[300]; int B[300][300]; bool check(int x) { for (int i = 0; i < M; i++) { A[i] = a[i]; } for (int i = 0; i < N; i++) { cnt[i] = 0; for (int j = 0; j < M; j++) { ...
#include <bits/stdc++.h> using namespace std; int N, M, K; int a[300]; int b[300][300]; int cnt[300]; int s[200000], t[200000]; int A[300]; int B[300][300]; bool check(int x) { for (int i = 0; i < M; i++) { A[i] = a[i]; } for (int i = 0; i < N; i++) { cnt[i] = 0; for (int j = 0; j < M; j++) { ...
replace
89
90
89
90
0
p00946
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) #define MAX_N 40 #define INF 1000000000 #define MOD 1000000007 using namespace std; typedef long long ll; typedef pair<int, int> P; int n, m; vector<int> ans; bool saw[100001]; int main() { cin >> n >> m; rep(i, m) { int x; cin >> x; ...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) #define MAX_N 40 #define INF 1000000000 #define MOD 1000000007 using namespace std; typedef long long ll; typedef pair<int, int> P; int n, m; vector<int> ans; bool saw[200001]; int main() { cin >> n >> m; rep(i, m) { int x; cin >> x; ...
replace
11
12
11
12
0
p00946
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #define repl(i, a, b) for (int i = (int)(a); i < (int)(b); i++) #d...
#include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #define repl(i, a, b) for (int i = (int)(a); i < (int)(b); i++) #d...
replace
29
30
29
30
0
p00946
C++
Runtime Error
#include <iostream> using namespace std; int n, m; int e[200000]; int main() { int i; cin >> n >> m; for (i = 0; i < m; i++) cin >> e[i]; bool used[100001] = {false}; for (i = m - 1; i >= 0; i--) { if (!used[e[i]]) { used[e[i]] = true; cout << e[i] << endl; } } for (i = 1; i <=...
#include <iostream> using namespace std; int n, m; int e[200000]; int main() { int i; cin >> n >> m; for (i = 0; i < m; i++) cin >> e[i]; static bool used[200001] = {false}; for (i = m - 1; i >= 0; i--) { if (!used[e[i]]) { used[e[i]] = true; cout << e[i] << endl; } } for (i = ...
replace
13
14
13
14
0
p00946
C++
Runtime Error
#include "bits/stdc++.h" using namespace std; int main() { int n, m; cin >> n >> m; vector<int> used(n + 1, 0); vector<int> ans(m); for (int i = 0; i < m; i++) { int a; cin >> a; ans[i] = a; used[a] = 1; } vector<int> syu(m + 1, 0); for (int i = 0; i < m; i++) { if (syu[ans[m - i...
#include "bits/stdc++.h" using namespace std; int main() { int n, m; cin >> n >> m; vector<int> used(n + 1, 0); vector<int> ans(m); for (int i = 0; i < m; i++) { int a; cin >> a; ans[i] = a; used[a] = 1; } vector<int> syu(n + 1, 0); for (int i = 0; i < m; i++) { if (syu[ans[m - i...
replace
16
17
16
17
0
p00946
C++
Runtime Error
#include <algorithm> #include <climits> #include <cstdio> #include <cstring> #include <iostream> using namespace std; int N, M; //?度? n 的序列,有 m 个操作 int F[20500]; bool Jud[20500]; int main() { cin >> N >> M; memset(Jud, true, sizeof(Jud)); for (int i = 1; i <= M; i++) cin >> F[i]; for (int i = M; i >= 1; i...
#include <algorithm> #include <climits> #include <cstdio> #include <cstring> #include <iostream> using namespace std; int N, M; //?度? n 的序列,有 m 个操作 int F[205000]; bool Jud[205000]; int main() { cin >> N >> M; memset(Jud, true, sizeof(Jud)); for (int i = 1; i <= M; i++) cin >> F[i]; for (int i = M; i >= 1;...
replace
8
10
8
10
0
p00946
C++
Runtime Error
#include <algorithm> #include <iostream> #include <vector> using namespace std; bool b[114514]; int n, m; vector<int> l; int main() { cin >> n >> m; for (int i = 1; i <= n; i++) b[i] = false; for (int i = 0; i < m; i++) { int a; cin >> a; l.push_back(a); } for (int i = 1; i <= m; i++) { if...
#include <algorithm> #include <iostream> #include <vector> using namespace std; bool b[229028]; int n, m; vector<int> l; int main() { cin >> n >> m; for (int i = 1; i <= n; i++) b[i] = false; for (int i = 0; i < m; i++) { int a; cin >> a; l.push_back(a); } for (int i = 1; i <= m; i++) { if...
replace
4
5
4
5
0
p00946
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cassert> #include <climits> #include <cmath> #include <complex> #include <cstddef> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <fstream> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #includ...
#include <algorithm> #include <bitset> #include <cassert> #include <climits> #include <cmath> #include <complex> #include <cstddef> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <fstream> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #includ...
replace
81
82
81
82
0
p00948
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> using namespace std; struct Pos { int y, x; Pos() {} Pos(int y, int x) { this->y = y; this->x = x; } bool operator<(const Pos &r) const { return (y != r.y) ? y < r.y : x < r.x; } }; int n, m; Pos arm[100000]; int dp[2][100000]; //?§??????????(dir=0:???, dir=...
#include <algorithm> #include <iostream> using namespace std; struct Pos { int y, x; Pos() {} Pos(int y, int x) { this->y = y; this->x = x; } bool operator<(const Pos &r) const { return (y != r.y) ? y < r.y : x < r.x; } }; int n, m; Pos arm[100000]; int dp[2][100000]; //?§??????????(dir=0:???, dir=...
insert
22
22
22
26
TLE
p00949
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; if (S.length() > T.length()) { swap(S, T); } vector<vector<int>> memo(S.length() + 1, vector<int>(26)); for (int i = 0; i < S.length(); i++) { memo[i + 1] = memo[i]; memo[i + 1][S[i] - 'a']++; } vector<v...
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; if (S.length() > T.length()) { swap(S, T); } vector<vector<int>> memo(S.length() + 1, vector<int>(26)); for (int i = 0; i < S.length(); i++) { memo[i + 1] = memo[i]; memo[i + 1][S[i] - 'a']++; } vector<v...
replace
36
51
36
51
TLE
p00949
C++
Memory Limit Exceeded
#include <algorithm> #include <cstdio> #include <iostream> #include <map> #include <queue> #include <set> #include <vector> using namespace std; typedef long long ll; #define rep(i, n) for (int i = 0; i < (n); i++) const int INF = 1e9; set<vector<int>> m1; string s1, s2; vector<int> memo(26); int ans = 0; void hashh(...
#include <algorithm> #include <cstdio> #include <iostream> #include <map> #include <queue> #include <set> #include <vector> using namespace std; typedef long long ll; #define rep(i, n) for (int i = 0; i < (n); i++) const int INF = 1e9; set<vector<int>> m1; string s1, s2; vector<int> memo(26); int ans = 0; void hashh(...
insert
71
71
71
72
MLE
p00950
C++
Runtime Error
#include <bits/stdc++.h> #define _overload(_1, _2, _3, name, ...) name #define _rep(i, n) _range(i, 0, n) #define _range(i, a, b) for (int i = (int)(a); i < (int)(b); ++i) #define rep(...) _overload(__VA_ARGS__, _range, _rep, )(__VA_ARGS__) #define _rrep(i, n) _rrange(i, n, 0) #define _rrange(i, a, b) for (int i = (i...
#include <bits/stdc++.h> #define _overload(_1, _2, _3, name, ...) name #define _rep(i, n) _range(i, 0, n) #define _range(i, a, b) for (int i = (int)(a); i < (int)(b); ++i) #define rep(...) _overload(__VA_ARGS__, _range, _rep, )(__VA_ARGS__) #define _rrep(i, n) _rrange(i, n, 0) #define _rrange(i, a, b) for (int i = (i...
replace
173
174
173
177
0
p00951
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using Int = long long; struct edge { int from, to; edge() {} edge(int from, int to) : from(from), to(to) {} }; const int MAX = 333; using BS = bitset<MAX>; vector<BS> G(MAX); vector<vector<int>> rG(MAX); vector<int> vis(MAX); void dfs(int v, int r) { if (vis[v]) ...
#include <bits/stdc++.h> using namespace std; using Int = long long; struct edge { int from, to; edge() {} edge(int from, int to) : from(from), to(to) {} }; const int MAX = 333; using BS = bitset<MAX>; vector<BS> G(MAX); vector<vector<int>> rG(MAX); vector<int> vis(MAX); void dfs(int v, int r) { if (vis[v]) ...
delete
98
99
98
98
TLE
p00952
C++
Runtime Error
#define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <array> #include <bitset> #include <cassert> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iostream> #include <map> #include <numeric> #include <queue> #include <random> #include <...
#define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <array> #include <bitset> #include <cassert> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iostream> #include <map> #include <numeric> #include <queue> #include <random> #include <...
replace
52
53
52
53
0
p00952
C++
Time Limit Exceeded
#include "bits/stdc++.h" using namespace std; int b[500000], p = 1, cnt = 0; int main() { int n; cin >> n; for (int i = 0; i < n; i++) { int x; cin >> x; if (b[0] == 1 || x < p - 1) { cout << "No" << endl; continue; } if (p - 1 == x && cnt > x) { cout << "No" << endl; c...
#include "bits/stdc++.h" using namespace std; int b[500000], p = 1, cnt = 0; int main() { int n; cin >> n; for (int i = 0; i < n; i++) { int x; cin >> x; if (b[0] == 1 || x < p - 1) { cout << "No" << endl; continue; } if (p - 1 == x && cnt > x) { cout << "No" << endl; c...
replace
22
26
22
24
TLE
p00953
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const int INF = 1 << 29; struct UnionFind { vector<int> data; UnionFind(int sz) { data.assign(sz, -1); } int find(int k) { return (data[k] < 0 ? k : data[k] = find(data[k])); } void unite(int x, int y) { x = find(x); y = find(y); if (x == y) ...
#include <bits/stdc++.h> using namespace std; const int INF = 1 << 29; struct UnionFind { vector<int> data; UnionFind(int sz) { data.assign(sz, -1); } int find(int k) { return (data[k] < 0 ? k : data[k] = find(data[k])); } void unite(int x, int y) { x = find(x); y = find(y); if (x == y) ...
replace
94
96
94
96
0
p00957
C++
Runtime Error
#include <iostream> #include <stdlib.h> #define SHIRO 0 #define USUI 1 #define ATSUI 2 using namespace std; int l, k; double array[200]; void print(int *pole) { for (int i = 0; i < l; i++) printf("%d ", pole[i]); printf("\n"); } bool check(int *pole, int len) { // l ?????????????¶???????????????? if (l ...
#include <iostream> #include <stdlib.h> #define SHIRO 0 #define USUI 1 #define ATSUI 2 using namespace std; int l, k; double array[200]; void print(int *pole) { for (int i = 0; i < l; i++) printf("%d ", pole[i]); printf("\n"); } bool check(int *pole, int len) { // l ?????????????¶???????????????? if (l ...
replace
70
75
70
77
0
p00958
C++
Memory Limit Exceeded
#include <bits/stdc++.h> using namespace std; using Int = long long; short dp[16][16][10][1 << 16]; template <typename T1, typename T2> void chmax(T1 &a, T2 b) { if (a < b) a = b; } signed main() { cin.tie(0); ios::sync_with_stdio(0); Int n; cin >> n; using P = pair<Int, Int>; vector<P> v; for (Int ...
#include <bits/stdc++.h> using namespace std; using Int = long long; signed char dp[16][16][10][1 << 16]; template <typename T1, typename T2> void chmax(T1 &a, T2 b) { if (a < b) a = b; } signed main() { cin.tie(0); ios::sync_with_stdio(0); Int n; cin >> n; using P = pair<Int, Int>; vector<P> v; for...
replace
3
4
3
4
MLE
p00959
C++
Runtime Error
#include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <algorithm> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> #include <complex> #include <cassert> #include <funct...
#include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <algorithm> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> #include <complex> #include <cassert> #include <funct...
delete
46
47
46
46
0
i = 1
p00960
C++
Runtime Error
#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>>; using D = double; const D PI = acos(D(-1)), E...
#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>>; using D = double; const D PI = acos(D(-1)), E...
replace
150
152
150
152
0
p00962
C++
Runtime Error
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; (i) < int(n); ++(i)) using ll = long long; using namespace std; constexpr ll inf = ll(1e18) + 9; vector<ll> dijkstra(vector<vector<pair<int, ll>>> const &g, int root) { vector<ll> dist(g.size(), inf); priority_queue<pair<ll, int>> que; dist[root] = 0; ...
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; (i) < int(n); ++(i)) using ll = long long; using namespace std; constexpr ll inf = ll(1e18) + 9; vector<ll> dijkstra(vector<vector<pair<int, ll>>> const &g, int root) { vector<ll> dist(g.size(), inf); priority_queue<pair<ll, int>> que; dist[root] = 0; ...
delete
113
114
113
113
0
1 0 2 3 3 1 4 2
p00965
C++
Runtime Error
#include <algorithm> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #define FRER() freopen("i.txt", "r", stdin); using namespace std; const int maxn = 100000 + 5; int l[maxn], r[maxn], ml[maxn] = {0}, mr[maxn] = {0}, sum[maxn] = {0}; int main() { int n, ans1 = 0, ans2 = 0; scanf("%...
#include <algorithm> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #define FRER() freopen("i.txt", "r", stdin); using namespace std; const int maxn = 200000 + 5; int l[maxn], r[maxn], ml[maxn] = {0}, mr[maxn] = {0}, sum[maxn] = {0}; int main() { int n, ans1 = 0, ans2 = 0; scanf("%...
replace
10
11
10
11
0
p00967
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
82
83
82
83
TLE
p00967
C++
Runtime Error
#include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <algorithm> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> #include <complex> #include <cassert> #include <funct...
#include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <algorithm> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> #include <complex> #include <cassert> #include <funct...
replace
163
164
163
164
0
cprSize = 5
p00991
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) #define MOD 100000007 using namespace std; typedef pair<int, int> P; int d[1000][1000], ans[1000][1000]; int dx[]{1, -1, 0, 0}, dy[]{0, 0, 1, -1}; int main() { int r, c, x1, y1, x2, y2; cin >> r >> c >> x1 >> y1 >> x2 >> y2; queue<P> que; ...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) #define MOD 100000007 using namespace std; typedef pair<int, int> P; int d[1000][1000], ans[1000][1000]; int dx[]{1, -1, 0, 0}, dy[]{0, 0, 1, -1}; int main() { int r, c, x1, y1, x2, y2; cin >> r >> c >> x1 >> y1 >> x2 >> y2; queue<P> que; ...
replace
20
29
20
21
0
p00993
C++
Memory Limit Exceeded
#include <iostream> using namespace std; #define MAX_P 50000 int n; int dp[5010][MAX_P]; void fact(int n) { dp[0][0] = 1; for (int i = 1; i <= n; i++) { for (int j = 0; j < MAX_P; j++) { dp[i][j] += dp[i - 1][j] * i; if (dp[i][j] >= 10) { dp[i][j + 1] += dp[i][j] / 10; dp[i][j] %= 10...
#include <iostream> using namespace std; #define MAX_P 20000 int n; int dp[5010][MAX_P]; void fact(int n) { dp[0][0] = 1; for (int i = 1; i <= n; i++) { for (int j = 0; j < MAX_P; j++) { dp[i][j] += dp[i - 1][j] * i; if (dp[i][j] >= 10) { dp[i][j + 1] += dp[i][j] / 10; dp[i][j] %= 10...
replace
2
3
2
3
MLE
p00997
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define MAX 100000 class Union_Find { public: int par[MAX], rnk[MAX], sz[MAX], gnum; Union_Find(int N) { gnum = N; for (int i = 0; i < N; i++) { par[i] = i; rnk[i] = 0; sz[i] = 1; } } int find(int x) { if (par[x] == x) { ...
#include <bits/stdc++.h> using namespace std; #define MAX 252521 class Union_Find { public: int par[MAX], rnk[MAX], sz[MAX], gnum; Union_Find(int N) { gnum = N; for (int i = 0; i < N; i++) { par[i] = i; rnk[i] = 0; sz[i] = 1; } } int find(int x) { if (par[x] == x) { ...
replace
4
5
4
5
0
p00997
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
76
77
76
77
0
p00998
C++
Time Limit Exceeded
#define _USE_MATH_DEFINES #include <algorithm> #include <cassert> #include <cfloat> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <sstream> #include <stack> #...
#define _USE_MATH_DEFINES #include <algorithm> #include <cassert> #include <cfloat> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <sstream> #include <stack> #...
replace
99
103
99
106
TLE
p00998
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; template <typename T> constexpr T INF = numeric_limits<T>::max() / 10; template <typename Monoid> struct AccRandomizedBinarySearchTree { public: static constexpr int POOL_SIZE = 200000; private: struct Node { using BaseMonoid = Monoid; using T = typename BaseMo...
#include <bits/stdc++.h> using namespace std; template <typename T> constexpr T INF = numeric_limits<T>::max() / 10; template <typename Monoid> struct AccRandomizedBinarySearchTree { public: static constexpr int POOL_SIZE = 200000; private: struct Node { using BaseMonoid = Monoid; using T = typename BaseMo...
replace
308
309
308
309
0
p00998
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; template <typename T> constexpr T INF = numeric_limits<T>::max() / 10; template <typename Monoid> struct AccRandomizedBinarySearchTree { public: static constexpr int POOL_SIZE = 200001; private: struct Node { using BaseMonoid = Monoid; using T = typename BaseMo...
#include <bits/stdc++.h> using namespace std; template <typename T> constexpr T INF = numeric_limits<T>::max() / 10; template <typename Monoid> struct AccRandomizedBinarySearchTree { public: static constexpr int POOL_SIZE = 400000; private: struct Node { using BaseMonoid = Monoid; using T = typename BaseMo...
replace
5
6
5
6
0
p00998
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; template <class Monoid, class OperatorMonoid = Monoid> struct RandomizedBinarySearchTree { using F = function<Monoid(Monoid, Monoid)>; using G = function<Monoid(Monoid, OperatorMonoid)>; using H = function<OperatorMonoid(OperatorMonoid, OperatorMonoid)>; using P =...
#include <bits/stdc++.h> using namespace std; template <class Monoid, class OperatorMonoid = Monoid> struct RandomizedBinarySearchTree { using F = function<Monoid(Monoid, Monoid)>; using G = function<Monoid(Monoid, OperatorMonoid)>; using H = function<OperatorMonoid(OperatorMonoid, OperatorMonoid)>; using P =...
replace
190
191
190
191
0
p00998
C++
Time Limit Exceeded
#define NDEBUG 1 #include <bits/stdc++.h> using key_type = int; enum { L, R }; struct node { key_type key; std::array<node *, 2> ch; int size; int height; int min; static node *const nil; node() : node(-1) {} node(key_type key) : node(key, nil, nil, 1, 1, key) {} node(const key_type key, node *l...
#define NDEBUG 1 #include <bits/stdc++.h> using key_type = int; enum { L, R }; struct node { key_type key; std::array<node *, 2> ch; int size; int height; int min; static node *const nil; node() : node(-1) {} node(key_type key) : node(key, nil, nil, 1, 1, key) {} node(const key_type key, node *l...
replace
342
343
342
343
TLE
p00998
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using int64 = long long; template <class T> struct ArrayPool { vector<T> pool; vector<T *> stock; int ptr; ArrayPool(int sz) : pool(sz), stock(sz) {} inline T *alloc() { return stock[--ptr]; } inline void free(T *t) { stock[ptr++] = t; } void clear() { ...
#include <bits/stdc++.h> using namespace std; using int64 = long long; template <class T> struct ArrayPool { vector<T> pool; vector<T *> stock; int ptr; ArrayPool(int sz) : pool(sz), stock(sz) {} inline T *alloc() { return stock[--ptr]; } inline void free(T *t) { stock[ptr++] = t; } void clear() { ...
replace
294
295
294
295
-6
terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc
p00998
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; const int INF = 1 << 30; inline int xor32() { static int y = 2463534242; y = y ^ (y << 13); y = y ^ (y >> 17); return (y = y ^ (y << 5)); } struct Node { int Value; int SubTreeSize; Node *Lch, *Rch; int RMQ; Node(int V) : Value(V), SubTreeSize(1), RMQ(...
#include <bits/stdc++.h> using namespace std; const int INF = 1 << 30; inline int xor32() { static int y = 2463534242; y = y ^ (y << 13); y = y ^ (y >> 17); return (y = y ^ (y << 5)); } struct Node { int Value; int SubTreeSize; Node *Lch, *Rch; int RMQ; Node(int V) : Value(V), SubTreeSize(1), RMQ(...
replace
53
54
53
54
TLE
p00998
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; // RBST (平衡二分探索木) // データ型・最大値用の単位元を指定して使う // TODO: 使い方をまとめる (わすれるので) inline uint32_t xor128() { static uint32_t x = 123456789; static uint32_t y = 362436069; static uint32_t z = 521288629; static uint32_t w = 88675123; uint32_t t; t = x ^ (x << 11); x = y; ...
#include <bits/stdc++.h> using namespace std; // RBST (平衡二分探索木) // データ型・最大値用の単位元を指定して使う // TODO: 使い方をまとめる (わすれるので) inline uint32_t xor128() { static uint32_t x = 123456789; static uint32_t y = 362436069; static uint32_t z = 521288629; static uint32_t w = 88675123; uint32_t t; t = x ^ (x << 11); x = y; ...
replace
69
70
69
71
TLE
p00998
C++
Time Limit Exceeded
#include <algorithm> #include <cassert> #include <cstdio> using namespace std; const int INF = int(1.05e9); class Random { private: unsigned int x, y, z, w, t; public: unsigned int rand() { t = x ^ (x << 11); x = y; y = z; z = w; return w = ((w ^ (w >> 19)) ^ (t ^ (t >> 8))); } }; Random r...
#include <algorithm> #include <cassert> #include <cstdio> using namespace std; const int INF = int(1.05e9); class Random { private: unsigned int x, y, z, w, t; public: unsigned int rand() { t = x ^ (x << 11); x = y; y = z; z = w; return w = ((w ^ (w >> 19)) ^ (t ^ (t >> 8))); } Random() ...
insert
18
18
18
30
TLE
p00998
C++
Time Limit Exceeded
#include <iostream> #include <random> #include <string> #include <vector> #define REP(i, n) for (int i = 0; i < (n); ++i) using namespace std; struct Myrand { random_device rd; mt19937 mt; Myrand() : rd(), mt(rd()) {} int operator()() { return mt(); } } my_rand; typedef int Data; const int INF = 1e8; stru...
#include <iostream> #include <random> #include <string> #include <vector> #define REP(i, n) for (int i = 0; i < (n); ++i) using namespace std; struct Myrand { uint64_t val; Myrand() : val(859238598) {} uint64_t operator()() { return val = val * val + 737598437; } } my_rand; typedef int Data; const int INF = ...
replace
10
14
10
13
TLE
p00998
C++
Time Limit Exceeded
#define _CRT_SECURE_NO_WARNINGS #include "bits/stdc++.h" using namespace std; #define int long long #define CHOOSE(a) CHOOSE2 a #define CHOOSE2(a0, a1, a2, a3, x, ...) x #define REP1(i, s, cond, cal) for (signed i = signed(s); i cond; i cal) #define REP2(i, s, n) REP1(i, s, < signed(n), ++) #define REP3(i, n) REP2(i,...
#define _CRT_SECURE_NO_WARNINGS #include "bits/stdc++.h" using namespace std; #define int long long #define CHOOSE(a) CHOOSE2 a #define CHOOSE2(a0, a1, a2, a3, x, ...) x #define REP1(i, s, cond, cal) for (signed i = signed(s); i cond; i cal) #define REP2(i, s, n) REP1(i, s, < signed(n), ++) #define REP3(i, n) REP2(i,...
replace
179
180
179
184
TLE
p00998
C++
Runtime Error
#include <bits/stdc++.h> #define FOR(i, a, b) for (int i = a; i < b; i++) #define REP(i, b) FOR(i, 0, b) #define MP make_pair using namespace std; struct Node { Node *l, *r; int d, s, mn; }; using NP = Node *; const int poolSize = 1000000; Node buf[poolSize]; stack<NP> pool; void InitPool() { REP(i, poolSize...
#include <bits/stdc++.h> #define FOR(i, a, b) for (int i = a; i < b; i++) #define REP(i, b) FOR(i, 0, b) #define MP make_pair using namespace std; struct Node { Node *l, *r; int d, s, mn; }; using NP = Node *; const int poolSize = 1000000; Node buf[poolSize]; stack<NP> pool; void InitPool() { REP(i, poolSize...
replace
112
113
112
113
0
p00998
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; typedef pair<int, int> P;...
#include <algorithm> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; typedef pair<int, int> P;...
replace
31
32
31
32
TLE
p00998
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; const int PMAX = 350000; struct RMQ { using type = int; static type id() { return INT_MAX; } static type op(type l, type r) { return min(l, r); } }; template <typename M> class avl_tree { using T = typename M::type; struct node { T val...
#include <bits/stdc++.h> using namespace std; using ll = long long; const int PMAX = 400000; struct RMQ { using type = int; static type id() { return INT_MAX; } static type op(type l, type r) { return min(l, r); } }; template <typename M> class avl_tree { using T = typename M::type; struct node { T val...
replace
4
5
4
5
0
p00998
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using T = int; const T id = INT_MAX; T op(T l, T r) { return min(l, r); } enum COL { BLACK, RED }; struct node; node *update(node *t); struct node { T val, all; node *ch[2]; COL color; int level; int size; node() {} void init(T v) { val = v; all = v...
#include <bits/stdc++.h> using namespace std; using T = int; const T id = INT_MAX; T op(T l, T r) { return min(l, r); } enum COL { BLACK, RED }; struct node; node *update(node *t); struct node { T val, all; node *ch[2]; COL color; int level; int size; node() {} void init(T v) { val = v; all = v...
replace
35
36
35
36
0
p00998
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using T = int; const T id = INT_MAX; T op(T l, T r) { return min(l, r); } struct node; node *update(node *t); struct node { T val, all; node *ch[2]; int dep, size; node() {} void init(T v) { val = all = v; dep = size = 1; ch[0] = ch[1] = nullptr; ...
#include <bits/stdc++.h> using namespace std; using T = int; const T id = INT_MAX; T op(T l, T r) { return min(l, r); } struct node; node *update(node *t); struct node { T val, all; node *ch[2]; int dep, size; node() {} void init(T v) { val = all = v; dep = size = 1; ch[0] = ch[1] = nullptr; ...
replace
27
28
27
28
0
p00998
C++
Runtime Error
#include <algorithm> #include <cassert> #include <cstdio> #include <cstdlib> #include <ctime> #include <tuple> #include <utility> #include <vector> #define loop(i, a, b) for (int i = (a); i < int(b); i++) #define rep(i, n) loop(i, 0, n) using namespace std; int const inf = 1e9; #define np nullptr struct Node { int...
#include <algorithm> #include <cassert> #include <cstdio> #include <cstdlib> #include <ctime> #include <tuple> #include <utility> #include <vector> #define loop(i, a, b) for (int i = (a); i < int(b); i++) #define rep(i, n) loop(i, 0, n) using namespace std; int const inf = 1e9; #define np nullptr struct Node { int...
replace
30
31
30
31
0
p00998
C++
Runtime Error
#include <algorithm> #include <cassert> #include <cstdio> #include <cstdlib> #include <ctime> #include <tuple> #include <utility> #include <vector> #define loop(i, a, b) for (int i = (a); i < int(b); i++) #define rep(i, n) loop(i, 0, n) using namespace std; int const inf = 1e9; #define np (Node *)nullptr unsigned in...
#include <algorithm> #include <cassert> #include <cstdio> #include <cstdlib> #include <ctime> #include <tuple> #include <utility> #include <vector> #define loop(i, a, b) for (int i = (a); i < int(b); i++) #define rep(i, n) loop(i, 0, n) using namespace std; int const inf = 1e9; #define np (Node *)nullptr unsigned in...
replace
99
100
99
100
-6
munmap_chunk(): invalid pointer
p00998
C++
Time Limit Exceeded
#include <algorithm> #include <cassert> #include <cstdio> #include <cstdlib> #include <ctime> #include <iostream> #include <tuple> #include <utility> #include <vector> #define loop(i, a, b) for (int i = (a); i < int(b); i++) #define rep(i, n) loop(i, 0, n) using namespace std; int const inf = 1e9; unsigned int xor12...
#include <algorithm> #include <cassert> #include <cstdio> #include <cstdlib> #include <ctime> #include <iostream> #include <tuple> #include <utility> #include <vector> #define loop(i, a, b) for (int i = (a); i < int(b); i++) #define rep(i, n) loop(i, 0, n) using namespace std; int const inf = 1e9; unsigned int xor12...
insert
115
115
115
117
TLE
p00998
C++
Time Limit Exceeded
#include <algorithm> #include <array> #include <bitset> #include <cassert> #include <cctype> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <forward_list> #include <functional> #include <initiali...
#include <algorithm> #include <array> #include <bitset> #include <cassert> #include <cctype> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <forward_list> #include <functional> #include <initiali...
replace
118
119
118
119
TLE
p00998
C++
Time Limit Exceeded
#include <algorithm> #include <cassert> #include <cctype> #include <ctime> #include <iostream> #include <queue> #include <string> #include <tuple> #include <vector> #define dump(x) std::cerr << __LINE__ << ":\t" #x " = " << x << std::endl using Key = int; const Key INF = 1e9; const int MAX_N = 1000010; // ?????\??????...
#include <algorithm> #include <cassert> #include <cctype> #include <ctime> #include <iostream> #include <queue> #include <string> #include <tuple> #include <vector> #define dump(x) std::cerr << __LINE__ << ":\t" #x " = " << x << std::endl using Key = int; const Key INF = 1e9; const int MAX_N = 1000010; // ?????\??????...
insert
180
180
180
189
TLE
p00998
C++
Runtime Error
#include <algorithm> #include <cassert> #include <ctime> #include <iostream> #include <string> #include <tuple> #include <vector> #define dump(x) std::cerr << __LINE__ << ":\t" #x " = " << x << std::endl using key_t = int; const key_t INF = 1000000000; const int MAX_N = 1000010; // ?????\???????????° + EPS enum { L, R...
#include <algorithm> #include <cassert> #include <ctime> #include <iostream> #include <string> #include <tuple> #include <vector> #define dump(x) std::cerr << __LINE__ << ":\t" #x " = " << x << std::endl using key_t = int; const key_t INF = 1000000000; const int MAX_N = 5000010; // ?????\???????????° + EPS enum { L, R...
replace
10
11
10
11
0
p00998
C++
Runtime Error
#define NDEBUG 1 #include <bits/stdc++.h> using key_type = int; enum { L, R }; struct avl_node { key_type key; std::array<avl_node *, 2> ch; int size; int height; int min; static avl_node *const nil; avl_node() : avl_node(-1) {} avl_node(key_type key) : avl_node(key, nil, nil, 1, 1, key) {} avl_...
#define NDEBUG 1 #include <bits/stdc++.h> using key_type = int; enum { L, R }; struct avl_node { key_type key; std::array<avl_node *, 2> ch; int size; int height; int min; static avl_node *const nil; avl_node() : avl_node(-1) {} avl_node(key_type key) : avl_node(key, nil, nil, 1, 1, key) {} avl_...
replace
25
26
25
26
0
p00998
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using int64 = long long; template <class T> struct ArrayPool { vector<T> pool; vector<T *> stock; int ptr; ArrayPool(int sz) : pool(sz), stock(sz) {} inline T *alloc() { return stock[--ptr]; } inline void free(T *t) { stock[ptr++] = t; } void clear() { ...
#include <bits/stdc++.h> using namespace std; using int64 = long long; template <class T> struct ArrayPool { vector<T> pool; vector<T *> stock; int ptr; ArrayPool(int sz) : pool(sz), stock(sz) {} inline T *alloc() { return stock[--ptr]; } inline void free(T *t) { stock[ptr++] = t; } void clear() { ...
replace
295
296
295
296
TLE
p01001
C++
Memory Limit Exceeded
#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> #inc...
#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> #inc...
replace
32
33
32
33
MLE
p01002
C++
Runtime Error
#include <iostream> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; int n; int a[5][5]; int s[5]; int dy[] = {-1, 0, 1, 0}, dx[] = {0, 1, 0, -1}; int check(void) { int res = 0; for (int d = 1;; d++) { bool dis[5][5], f = false; rep(i, 5) rep(j, 5) dis[i][j] = false; rep(i, 5) rep(j...
#include <iostream> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; int n; int a[5][5]; int s[5]; int dy[] = {-1, 0, 1, 0}, dx[] = {0, 1, 0, -1}; int check(void) { int res = 0; for (int d = 1;; d++) { bool dis[5][5], f = false; rep(i, 5) rep(j, 5) dis[i][j] = false; rep(i, 5) rep(j...
replace
75
76
75
76
0
p01006
C++
Runtime Error
#include <iostream> #include <string> using namespace std; string s[3] = {"ABC", "DEF", "GHI"}, pass; int vx[4] = {-1, 0, 1, 0}, vy[4] = {0, -1, 0, 1}; bool search(int cnt, int n) { if (cnt == pass.size() - 1) return true; bool ret = false; for (int i = 0; i < 4; ++i) { int nx = n / 3 + vx[i], ny = n ...
#include <iostream> #include <string> using namespace std; string s[3] = {"ABC", "DEF", "GHI"}, pass; int vx[4] = {-1, 0, 1, 0}, vy[4] = {0, -1, 0, 1}; bool search(int cnt, int n) { if (cnt == pass.size() - 1) return true; bool ret = false; for (int i = 0; i < 4; ++i) { int nx = n / 3 + vx[i], ny = n ...
replace
16
17
16
17
0
p01007
C++
Runtime Error
#include <algorithm> #include <cassert> #include <cstdint> #include <cstdio> #include <queue> #include <utility> #include <vector> using Matrix = std::vector<std::vector<int>>; void rotate(Matrix &a) { size_t r, c, size; int angle; scanf("%zu %zu %zu %d", &r, &c, &size, &angle); --r, --c; if (angle == 0 ||...
#include <algorithm> #include <cassert> #include <cstdint> #include <cstdio> #include <queue> #include <utility> #include <vector> using Matrix = std::vector<std::vector<int>>; void rotate(Matrix &a) { size_t r, c, size; int angle; scanf("%zu %zu %zu %d", &r, &c, &size, &angle); --r, --c; if (angle == 0 ||...
replace
64
65
64
65
0
p01007
C++
Time Limit Exceeded
#include <stdio.h> #include <string.h> #define MAX_N 15 void rotate90(int r, int c, int size, int a[MAX_N][MAX_N]) { int b[MAX_N][MAX_N], i, j; for (i = 0; i < size; i++) { for (j = 0; j < size; j++) { b[r + i][c + j] = a[r + i][c + j]; } } for (i = 0; i < size; i++) { for (j = 0; j < size;...
#include <stdio.h> #include <string.h> #define MAX_N 15 void rotate90(int r, int c, int size, int a[MAX_N][MAX_N]) { int b[MAX_N][MAX_N], i, j; for (i = 0; i < size; i++) { for (j = 0; j < size; j++) { b[r + i][c + j] = a[r + i][c + j]; } } for (i = 0; i < size; i++) { for (j = 0; j < size;...
delete
125
128
125
125
TLE
p01012
C++
Time Limit Exceeded
#include "bits/stdc++.h" #include <unordered_map> #include <unordered_set> #pragma warning(disable : 4996) using namespace std; using ld = long double; const ld eps = 1e-8; //// < "d:\d_download\visual studio ///2015\projects\programing_contest_c++\debug\a.txt" > "d:\d_download\visual ///studio 2015\projects\programin...
#include "bits/stdc++.h" #include <unordered_map> #include <unordered_set> #pragma warning(disable : 4996) using namespace std; using ld = long double; const ld eps = 1e-7; //// < "d:\d_download\visual studio ///2015\projects\programing_contest_c++\debug\a.txt" > "d:\d_download\visual ///studio 2015\projects\programin...
replace
6
7
6
7
TLE
p01048
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define Int long long int #define REP(i, n) for (int i = 0; i < (n); i++) #define REAP(i, a, n) for (int i = (a); i < (n); i++) #define YES cout << "Yes" << endl #define NO cout << "No" << endl #define fr first #define sc second #define pb push_back #define All(v) v.begin(...
#include <bits/stdc++.h> using namespace std; #define Int long long int #define REP(i, n) for (int i = 0; i < (n); i++) #define REAP(i, a, n) for (int i = (a); i < (n); i++) #define YES cout << "Yes" << endl #define NO cout << "No" << endl #define fr first #define sc second #define pb push_back #define All(v) v.begin(...
replace
21
22
21
22
TLE
p01052
C++
Runtime Error
#include <iostream> #define N 101 #define INF (1e9) using namespace std; int n, a[N], b[N], ans, c; bool used[N]; int main() { cin >> n; for (int i = 0; i < n; i++) cin >> a[i] >> b[i]; for (int i = 1; i <= 31; i++) { c = INF; for (int j = 0; j < n; j++) if (!used[j] && a[j] <= i && i <= b[j] &...
#include <iostream> #define N 101 #define INF (1e9) using namespace std; int n, a[N], b[N], ans, c; bool used[N]; int main() { cin >> n; for (int i = 0; i < n; i++) cin >> a[i] >> b[i]; for (int i = 1; i <= 31; i++) { c = INF; for (int j = 0; j < n; j++) if (!used[j] && a[j] <= i && i <= b[j]) ...
replace
14
16
14
20
-11
p01057
C++
Memory Limit Exceeded
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <time.h> #include <vector> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> P; typedef pair<...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <time.h> #include <vector> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> P; typedef pair<...
replace
45
47
45
47
MLE
p01057
C++
Runtime Error
#include <algorithm> #include <array> #include <cassert> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <unordered_map> #include <unordered_set> #include <valarray> #include <vector> using namespace ...
#include <algorithm> #include <array> #include <cassert> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <unordered_map> #include <unordered_set> #include <valarray> #include <vector> using namespace ...
replace
128
129
128
129
0
p01057
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; namespace RBST { // root = insert(root,k,hoge) // ???????????????????????????????????¨????????§?????? struct T { T *l, *r; int size; char v; T() { l = r = NULL; size = 1; } T(T *a) { *this = *a; } T(char v) : v(v) { l = r = NULL; size = 1; }...
#include <bits/stdc++.h> using namespace std; namespace RBST { // root = insert(root,k,hoge) // ???????????????????????????????????¨????????§?????? struct T { T *l, *r; int size; char v; T() { l = r = NULL; size = 1; } T(T *a) { *this = *a; } T(char v) : v(v) { l = r = NULL; size = 1; }...
replace
94
95
94
95
0
p01057
C++
Memory Limit Exceeded
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <time.h> #include <vector> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> P; typedef pair<...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <time.h> #include <vector> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> P; typedef pair<...
replace
45
47
45
47
MLE
p01057
C++
Runtime Error
#include <bits/stdc++.h> #include <ext/rope> #define REP(x, y, z) for (int x = y; x <= z; x++) #define FORD(x, y, z) for (int x = y; x >= z; x--) #define MSET(x, y) memset(x, y, sizeof(x)) #define FOR(x, y) for (__typeof(y.begin()) x = y.begin(); x != y.end(); x++) #define F first #define S second #define MP make_pair ...
#include <bits/stdc++.h> #include <ext/rope> #define REP(x, y, z) for (int x = y; x <= z; x++) #define FORD(x, y, z) for (int x = y; x >= z; x--) #define MSET(x, y) memset(x, y, sizeof(x)) #define FOR(x, y) for (__typeof(y.begin()) x = y.begin(); x != y.end(); x++) #define F first #define S second #define MP make_pair ...
replace
11
12
11
12
0
p01061
C++
Runtime Error
#include <algorithm> #include <fstream> #include <iomanip> #include <iostream> #include <vector> using namespace std; #define ALL(c) (c).begin(), (c).end() #define REP(i, n) for (ll i = 0; i < (n); ++i) using ll = long long; using vl = vector<ll>; struct union_find { vl v; union_find(ll n) : v(n, -1) {} ll find...
#include <algorithm> #include <fstream> #include <iomanip> #include <iostream> #include <vector> using namespace std; #define ALL(c) (c).begin(), (c).end() #define REP(i, n) for (ll i = 0; i < (n); ++i) using ll = long long; using vl = vector<ll>; struct union_find { vl v; union_find(ll n) : v(n, -1) {} ll find...
replace
39
40
39
40
0
p01061
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; struct UnionFind { vector<int> data; UnionFind(int size) { data.assign(size, -1); } int Find(int k) { if (data[k] < 0) return (k); return (data[k] = Find(data[k])); } void unite(int x, int y) { x = Find(x); y = Find(y); if (x == y) ...
#include <bits/stdc++.h> using namespace std; struct UnionFind { vector<int> data; UnionFind(int size) { data.assign(size, -1); } int Find(int k) { if (data[k] < 0) return (k); return (data[k] = Find(data[k])); } void unite(int x, int y) { x = Find(x); y = Find(y); if (x == y) ...
replace
33
34
33
34
0
p01062
C++
Time Limit Exceeded
#include <algorithm> #include <cfloat> #include <cmath> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> #include <time.h> #include <vector> typedef long long int ll; typedef unsigned long long int ull; #define BIG_NUM 2000000000 #define MOD 100000...
#include <algorithm> #include <cfloat> #include <cmath> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> #include <time.h> #include <vector> typedef long long int ll; typedef unsigned long long int ull; #define BIG_NUM 2000000000 #define MOD 100000...
insert
84
84
84
99
TLE
p01062
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <utility> #include <vector> #define loop(i, a, b) for (int i = a; i < b; i++) #define rep(i, a) loop(i, 0, a) #define pb push_back #define mp make_pair...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <utility> #include <vector> #define loop(i, a, b) for (int i = a; i < b; i++) #define rep(i, a) loop(i, 0, a) #define pb push_back #define mp make_pair...
insert
73
73
73
85
TLE
p01062
C++
Time Limit Exceeded
#include "bits/stdc++.h" using namespace std; typedef long long ll; typedef pair<int, int> pii; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define all(a) (a).begin(), (a).end() #define pb push_back #define INF 999999999 vector<int> G[100003]; int N; bool dfs(int pa, int pb, int number, bool used[100003]) { ...
#include "bits/stdc++.h" using namespace std; typedef long long ll; typedef pair<int, int> pii; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define all(a) (a).begin(), (a).end() #define pb push_back #define INF 999999999 vector<int> G[100003]; int N; bool dfs(int pa, int pb, int number, bool used[100003]) { ...
insert
58
58
58
65
TLE
p01063
C++
Time Limit Exceeded
#include <algorithm> #include <cassert> #include <iostream> #include <tuple> #include <vector> using namespace std; using vi = vector<int>; using ll = long long; const ll inf = 1e9; inline int dist(int x1, int y1, int z1, int x2, int y2, int z2) { return abs(x1 - y1) + abs(y1 - y2) + abs(z1 - z2); } int dx[] = {0...
#include <algorithm> #include <cassert> #include <iostream> #include <tuple> #include <vector> using namespace std; using vi = vector<int>; using ll = long long; const ll inf = 1e9; inline int dist(int x1, int y1, int z1, int x2, int y2, int z2) { return abs(x1 - y1) + abs(y1 - y2) + abs(z1 - z2); } int dx[] = {0...
replace
47
48
47
48
TLE
p01064
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define _MACRO(_1, _2, _3, NAME, ...) NAME #define _repl(i, a, b) for (int i = (int)(a); i < (int)(b); i++) #define _rep(i, n) _repl(i, 0, n) #define rep(...) _MACRO(__VA_ARGS__, _repl, _rep)(__VA_ARGS__) #define mp make_pair #define pb push_back #define all(x) begin(x), en...
#include <bits/stdc++.h> using namespace std; #define _MACRO(_1, _2, _3, NAME, ...) NAME #define _repl(i, a, b) for (int i = (int)(a); i < (int)(b); i++) #define _rep(i, n) _repl(i, 0, n) #define rep(...) _MACRO(__VA_ARGS__, _repl, _rep)(__VA_ARGS__) #define mp make_pair #define pb push_back #define all(x) begin(x), en...
replace
59
60
59
60
0
p01064
C++
Runtime Error
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <set> #include <string> #include <utility> #include <vector> #define loop(i, a, b) for (int i = a; i < b; i++) #define rep(i, a) loop(i, 0, a) #define pb push_back #define mp make_pair #define all(in) ...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <set> #include <string> #include <utility> #include <vector> #define loop(i, a, b) for (int i = a; i < b; i++) #define rep(i, a) loop(i, 0, a) #define pb push_back #define mp make_pair #define all(in) ...
replace
29
30
29
30
0
p01065
C++
Runtime Error
#include <iostream> #include <vector> constexpr int MAXA = 300; constexpr int MAXB = 600; constexpr int OFFSET = 300; void chmax(int &a, int b) { a = (a < b ? b : a); } int main() { int n, x, y; std::cin >> n >> x >> y; std::vector<int> a(n), b(n), c(n), d(n); for (int i = 0; i < n; i++) { std::cin >> a...
#include <iostream> #include <vector> constexpr int MAXA = 350; constexpr int MAXB = 700; constexpr int OFFSET = 350; void chmax(int &a, int b) { a = (a < b ? b : a); } int main() { int n, x, y; std::cin >> n >> x >> y; std::vector<int> a(n), b(n), c(n), d(n); for (int i = 0; i < n; i++) { std::cin >> a...
replace
3
6
3
6
0
p01065
C++
Runtime Error
/* _ooOoo_ o8888888o 88" . "88 (| -_- |) O\ = /O ____/`---'\____ .' \\| |// `. / \\||| : |||// \ / _||||| -:- |||||- \ | | \\\ - /// | | ...
/* _ooOoo_ o8888888o 88" . "88 (| -_- |) O\ = /O ____/`---'\____ .' \\| |// `. / \\||| : |||// \ / _||||| -:- |||||- \ | | \\\ - /// | | ...
replace
58
59
58
59
0
p01065
C++
Runtime Error
#include <algorithm> #include <iostream> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return true; } return false; } int n, x, y; int a[102], b[102], c[102], d[102]; // idx, umaka, fugashi int dp[102][302][700...
#include <algorithm> #include <iostream> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return true; } return false; } int n, x, y; int a[102], b[102], c[102], d[102]; // idx, umaka, fugashi int dp[102][302][700...
replace
35
36
35
36
-11
p01069
C++
Time Limit Exceeded
#include <climits> #include <cmath> #include <complex> #include <iostream> #include <map> #include <vector> using namespace std; typedef pair<int, int> i_i; typedef long double D; typedef complex<D> P; typedef long long ll; D pi = acos(-1.0); void FFT(vector<P> &a, int N, double t) { for (int m = N; m >= 2; m /= 2)...
#include <climits> #include <cmath> #include <complex> #include <iostream> #include <map> #include <vector> using namespace std; typedef pair<int, int> i_i; typedef double D; typedef complex<D> P; typedef long long ll; D pi = acos(-1.0); void FFT(vector<P> &a, int N, double t) { for (int m = N; m >= 2; m /= 2) { ...
replace
9
10
9
10
TLE
p01075
C++
Time Limit Exceeded
#include "bits/stdc++.h" using namespace std; typedef long long ll; typedef pair<int, int> pii; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define all(a) (a).begin(), (a).end() #define vi vector<int> #define pb push_back #define INF 999999999 // #define INF (1LL<<59) struct edge { int to, cost; }; #define M...
#include "bits/stdc++.h" using namespace std; typedef long long ll; typedef pair<int, int> pii; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define all(a) (a).begin(), (a).end() #define vi vector<int> #define pb push_back #define INF 999999999 // #define INF (1LL<<59) struct edge { int to, cost; }; #define M...
replace
29
30
29
31
TLE
p01075
C++
Time Limit Exceeded
#include "bits/stdc++.h" #include <unordered_map> #include <unordered_set> #pragma warning(disable : 4996) using namespace std; int main() { int N, M; cin >> N >> M; vector<vector<pair<int, int>>> edges(N); vector<int> memo(N - 1, 1e9 + 1e7); memo[0] = 0; for (int i = 0; i < M; ++i) { int a, b, c; ...
#include "bits/stdc++.h" #include <unordered_map> #include <unordered_set> #pragma warning(disable : 4996) using namespace std; int main() { int N, M; cin >> N >> M; vector<vector<pair<int, int>>> edges(N); vector<int> memo(N - 1, 1e9 + 1e7); memo[0] = 0; for (int i = 0; i < M; ++i) { int a, b, c; ...
insert
30
30
30
32
TLE
p01080
C++
Runtime Error
#include <bits/stdc++.h> #define ll long long #define REP(i, n) for (ll i = 0, max_i = (n); i < max_i; i++) #define REPI(i, a, b) for (ll i = (a), max_i = (b); i < max_i; i++) #define ALL(obj) (obj).begin(), (obj).end() #define RALL(obj) (obj).rbegin(), (obj).rend() #define fi first #define se second #define pb push_ba...
#include <bits/stdc++.h> #define ll long long #define REP(i, n) for (ll i = 0, max_i = (n); i < max_i; i++) #define REPI(i, a, b) for (ll i = (a), max_i = (b); i < max_i; i++) #define ALL(obj) (obj).begin(), (obj).end() #define RALL(obj) (obj).rbegin(), (obj).rend() #define fi first #define se second #define pb push_ba...
delete
84
85
84
84
0
tmp: 0
p01081
C++
Runtime Error
#include <cstdio> #include <cstring> #include <deque> #include <iostream> const int N = 200000; int n; char string[N + 1]; std::deque<int> letters[26]; int count[N]; bool present[N]; void modify(int k, int v) { for (; k < n; k += ~k & k + 1) { count[k] += v; } } int query(int k) { int ret = 0; for (; k...
#include <cstdio> #include <cstring> #include <deque> #include <iostream> const int N = 1000000; int n; char string[N + 1]; std::deque<int> letters[26]; int count[N]; bool present[N]; void modify(int k, int v) { for (; k < n; k += ~k & k + 1) { count[k] += v; } } int query(int k) { int ret = 0; for (; ...
replace
5
6
5
6
0
p01085
C++
Runtime Error
#include <cstdio> int main() { while (1) { int m, nmin, nmax, p[201], maxg = 0, n; scanf("%d %d %d", &m, &nmin, &nmax); for (int i = 1; i < m; i++) { scanf("%d", &p[i]); } for (int j = nmin; j <= nmax; j++) { if (p[j] - p[j + 1] >= maxg) { maxg = p[j] - p[j + 1]; n = j...
#include <cstdio> int main() { while (1) { int m, nmin, nmax, p[201], maxg = 0, n; scanf("%d %d %d", &m, &nmin, &nmax); for (int i = 1; i <= m; i++) { scanf("%d", &p[i]); } for (int j = nmin; j <= nmax; j++) { if (p[j] - p[j + 1] >= maxg) { maxg = p[j] - p[j + 1]; n = ...
replace
6
7
6
7
TLE
p01085
C++
Runtime Error
// #include <bits/stdc++.h> #include <algorithm> #include <cstdio> #include <vector> #define ll long long #define all(a) (a).begin(), (a).end() int main(int argc, char const *argv[]) { while (1) { int m = 0, nmin = 0, nmax = 0; scanf("%d%d%d", &m, &nmin, &nmax); if (m == 0 && nmin == 0 && nmax == 0) { ...
// #include <bits/stdc++.h> #include <algorithm> #include <cstdio> #include <vector> #define ll long long #define all(a) (a).begin(), (a).end() int main(int argc, char const *argv[]) { while (1) { int m = 0, nmin = 0, nmax = 0; scanf("%d%d%d", &m, &nmin, &nmax); if (m == 0 && nmin == 0 && nmax == 0) { ...
replace
14
15
14
15
0
p01086
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> #include <numeric> #include <string> #include <vector> using namespace std; int main() { while (true) { int n; cin >> n; if (n == 0) { return 0; } string str; int nums[41]; for (int i = 0; i < n; i++) { cin >> str; nums[i] = ...
#include <algorithm> #include <iostream> #include <numeric> #include <string> #include <vector> using namespace std; int main() { while (true) { int n; cin >> n; if (n == 0) { return 0; } string str; int nums[41]; for (int i = 0; i < n; i++) { cin >> str; nums[i] = ...
replace
61
68
61
65
TLE
p01086
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
47
48
47
48
-6
*** stack smashing detected ***: terminated
p01086
C++
Runtime Error
#ifdef _MSVC_LANG #define _SCL_SECURE_NO_WARNINGS #pragma error(disable : 0325) // inline namespace Error #endif #include <algorithm> #include <array> #include <bitset> #include <cstdio> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <rando...
#ifdef _MSVC_LANG #define _SCL_SECURE_NO_WARNINGS #pragma error(disable : 0325) // inline namespace Error #endif #include <algorithm> #include <array> #include <bitset> #include <cstdio> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <rando...
delete
474
476
474
474
0
p01086
C++
Runtime Error
// // main.cpp // Short Phrase // // Created by x15071xx on 2017/06/18. // Copyright ?? 2017??´ AIT. All rights reserved. // #include <cstdio> #include <iostream> #include <string> #include <vector> using namespace std; int main(int argc, const char *argv[]) { while (1) { int n, i, j; vector<string> st...
// // main.cpp // Short Phrase // // Created by x15071xx on 2017/06/18. // Copyright ?? 2017??´ AIT. All rights reserved. // #include <cstdio> #include <iostream> #include <string> #include <vector> using namespace std; int main(int argc, const char *argv[]) { while (1) { int n, i, j; vector<string> st...
replace
34
35
34
35
-11
p01086
C++
Time Limit Exceeded
#include <cstdio> #include <cstring> int n, len[40]; char word[11]; int solve(int pos) { int rest; rest = 5; while (rest > 0) { rest -= len[pos++]; if (rest < 0) return 0; } rest = 7; while (rest > 0) { rest -= len[pos++]; if (rest < 0) return 0; } rest = 5; while (rest >...
#include <cstdio> #include <cstring> int n, len[40]; char word[11]; int solve(int pos) { int rest; rest = 5; while (rest > 0) { rest -= len[pos++]; if (rest < 0) return 0; } rest = 7; while (rest > 0) { rest -= len[pos++]; if (rest < 0) return 0; } rest = 5; while (rest >...
insert
44
44
44
46
TLE