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
p00741
C++
Time Limit Exceeded
#include <cstdio> #define f(n) for (int i = 0; i < n; i++) #define s(w) scanf("%d", &w) int a, n, m, d[99][99]; int u[16] = {-1, -1, -1, 0, 0, 1, 1, 1, -1, 0, 1, -1, 1, -1, 0, 1}; void k(int x, int y) { if (d[x][y]) { d[x][y] = 0; f(8) k(x + u[i], y + u[i + 8]); } } int main() { a = 0; s(n); s(m); f...
#include <cstdio> #define f(n) for (int i = 0; i < n; i++) #define s(w) scanf("%d", &w) int a, n, m, d[99][99]; int u[16] = {-1, -1, -1, 0, 0, 1, 1, 1, -1, 0, 1, -1, 1, -1, 0, 1}; void k(int x, int y) { if (d[x][y]) { d[x][y] = 0; f(8) k(x + u[i], y + u[i + 8]); } } int main() { a = 0; s(n); s(m); i...
insert
15
15
15
17
TLE
p00741
C++
Runtime Error
// 41 #include <iostream> using namespace std; int w, h; bool imap[50][50]; void ff(int y, int x) { imap[y][x] = false; for (int i = -1; i <= 1; i++) { for (int j = -1; j <= 1; j++) { if (imap[y + i][x + j]) { ff(y + i, x + j); } } } } int main() { for (; cin >> w >> h, w | h;) {...
// 41 #include <iostream> using namespace std; int w, h; bool imap[50][50]; void ff(int y, int x) { imap[y][x] = false; for (int i = -1; i <= 1; i++) { for (int j = -1; j <= 1; j++) { int ny = y + i, nx = x + j; if (0 <= ny && ny < h && 0 <= nx && nx < w && imap[ny][nx]) { ff(ny, nx); ...
replace
12
14
12
15
TLE
p00741
C++
Runtime Error
#include <iostream> #include <queue> using namespace std; int map[20][20]; typedef pair<int, int> pxy; int h, w, ans = 0; const int dx[] = {1, 0, -1, 0, 1, 1, -1, -1}, dy[] = {0, 1, 0, -1, -1, 1, 1, -1}; void bfs(int sx, int sy) { queue<pxy> q; q.push(pxy(sx, sy)); while (!q.empty()) { int x, y...
#include <iostream> #include <queue> using namespace std; int map[50][50]; typedef pair<int, int> pxy; int h, w, ans = 0; const int dx[] = {1, 0, -1, 0, 1, 1, -1, -1}, dy[] = {0, 1, 0, -1, -1, 1, 1, -1}; void bfs(int sx, int sy) { queue<pxy> q; q.push(pxy(sx, sy)); while (!q.empty()) { int x, y...
replace
4
5
4
5
0
p00741
C++
Runtime Error
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <ctime> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <string> #include <vector> using namespace std; const double eps = 1e-10; const int dy[] = {-1, -1, 0, 1, 1,...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <ctime> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <string> #include <vector> using namespace std; const double eps = 1e-10; const int dy[] = {-1, -1, 0, 1, 1,...
insert
48
48
48
53
0
p00741
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <sstream> #include <string> #include <utility> #include <vector> #define REP(i, n) for (int i = 0; i < n; i++) typedef long long ll; using namespace std; typedef vector<ll> vl; typedef pair<ll, ll> pll; typedef vecto...
#include <algorithm> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <sstream> #include <string> #include <utility> #include <vector> #define REP(i, n) for (int i = 0; i < n; i++) typedef long long ll; using namespace std; typedef vector<ll> vl; typedef pair<ll, ll> pll; typedef vecto...
replace
23
24
23
24
TLE
p00741
C++
Runtime Error
#define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <cmath> #include <deque> #include <fstream> #include <functional> #include <iostream> #include <iterator> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utili...
#define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <cmath> #include <deque> #include <fstream> #include <functional> #include <iostream> #include <iterator> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utili...
insert
71
71
71
72
0
p00741
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using namespace std::chrono; using ll = long long; using pii = pair<int, int>; using pll = pair<ll, ll>; using pdd = pair<double, double>; using pq_int = priority_queue<int, vector<int>, greater<int>>; const ll LINF = 0x3fffffffffffffff; const ll MOD = 1000000007; const ll ...
#include <bits/stdc++.h> using namespace std; using namespace std::chrono; using ll = long long; using pii = pair<int, int>; using pll = pair<ll, ll>; using pdd = pair<double, double>; using pq_int = priority_queue<int, vector<int>, greater<int>>; const ll LINF = 0x3fffffffffffffff; const ll MOD = 1000000007; const ll ...
insert
161
161
161
163
TLE
p00742
C++
Runtime Error
//================================= // Created on: 2018/07/04 15:12:12 //================================= #include <bits/stdc++.h> using namespace std; int main() { for (int N;;) { cin >> N; if (N == 0) { break; } vector<int> coeff1(10, 0); vector<int> coeff2(10, 0); set<int> nz; ma...
//================================= // Created on: 2018/07/04 15:12:12 //================================= #include <bits/stdc++.h> using namespace std; int main() { for (int N;;) { cin >> N; if (N == 0) { break; } vector<int> coeff1(10, 0); vector<int> coeff2(10, 0); set<int> nz; ma...
replace
22
23
22
24
TLE
p00742
C++
Runtime Error
// http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=1161&lang=jp #include <algorithm> #include <climits> #include <cmath> #include <cstring> #include <ctime> #include <iostream> #include <map> #include <numeric> #include <vector> #define ALL(v) (v).begin(), (v).end() #define REP(i, p, n) for (int i = p; i < ...
// http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=1161&lang=jp #include <algorithm> #include <climits> #include <cmath> #include <cstring> #include <ctime> #include <iostream> #include <map> #include <numeric> #include <vector> #define ALL(v) (v).begin(), (v).end() #define REP(i, p, n) for (int i = p; i < ...
replace
55
56
55
56
TLE
p00742
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < int(n); ++i) #define all(s) s.begin(), s.end() int main(void) { int n; while (cin >> n, n) { vector<string> s(n); map<char, int> a; map<char, bool> not_zero; rep(i, n) { cin >> s[i]; int k = s[i].size();...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < int(n); ++i) #define all(s) s.begin(), s.end() int main(void) { int n; while (cin >> n, n) { vector<string> s(n); // map<char,int> a; int a[256] = {}; // map<char,bool> not_zero; bool not_zero[256] = {}; rep...
replace
9
11
9
13
TLE
p00742
C++
Time Limit Exceeded
#include "bits/stdc++.h" using namespace std; #ifdef _DEBUG #include "dump.hpp" #else #define dump(...) #endif // #define int long long #define rep(i, a, b) for (int i = (a); i < (b); i++) #define rrep(i, a, b) for (int i = (b)-1; i >= (a); i--) #define all(c) begin(c), end(c) const int INF = sizeof(int) == sizeof...
#include "bits/stdc++.h" using namespace std; #ifdef _DEBUG #include "dump.hpp" #else #define dump(...) #endif // #define int long long #define rep(i, a, b) for (int i = (a); i < (b); i++) #define rrep(i, a, b) for (int i = (b)-1; i >= (a); i--) #define all(c) begin(c), end(c) const int INF = sizeof(int) == sizeof...
replace
67
68
67
68
TLE
p00742
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> #include <string> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; int m, coef[10]; bool zero[10]; int dfs(int idx, int sum, int used) { if (idx == m) return sum == 0; int cnt = 0; rep(i, 10) { if (used & (1 << i) || (i == 0 && !zero[idx]))...
#include <algorithm> #include <iostream> #include <string> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; int m, coef[10]; bool zero[10]; int dfs(int idx, int sum, int used) { if (idx == m) return sum == 0; int pr_max = 0, pr_min = 0; for (int i = idx; i < m; i++) { if (coef[i] ...
insert
14
14
14
26
TLE
p00742
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> #include <map> #include <stdio.h> #include <string.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int n, m, a[10], f[10], u[10]; int rec(int k, int t) { if (k == m) return t == 0 ? 1 : 0; int ans = 0; rep(i, 10) if (u[i] == 0) { if (...
#include <algorithm> #include <iostream> #include <map> #include <stdio.h> #include <string.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int n, m, a[10], f[10], u[10]; int rec(int k, int t) { if (k == m) return t == 0 ? 1 : 0; int mx = 0, mn = 0; for (int i = k; i < m; i++) {...
insert
13
13
13
22
TLE
p00742
C++
Runtime Error
#include <algorithm> #include <cassert> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> using namespac...
#include <algorithm> #include <cassert> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> using namespac...
replace
95
96
95
96
0
p00743
C++
Runtime Error
// #define DEBUG #include <bits/stdc++.h> using namespace std; /*{{{*/ // template #define REP(i, n) for (int i = 0; i < n; i++) #define rep(i, n) for (int i = 0; i < n; i++) #define INF 1 << 29 #define LINF LLONG_MAX / 3 #define MP make_pair #define PB push_back #define EB emplace_back #define ALL(v) (v).begin(), (v)....
// #define DEBUG #include <bits/stdc++.h> using namespace std; /*{{{*/ // template #define REP(i, n) for (int i = 0; i < n; i++) #define rep(i, n) for (int i = 0; i < n; i++) #define INF 1 << 29 #define LINF LLONG_MAX / 3 #define MP make_pair #define PB push_back #define EB emplace_back #define ALL(v) (v).begin(), (v)....
replace
120
121
120
121
TLE
p00743
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v; } template <class T> inline string toString(T x) { ostringstream sout; sout << x; return sout.str(); } template <class T> inline T sqr(T x) { return x * x; } typedef vector<int> v...
#include <bits/stdc++.h> using namespace std; inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v; } template <class T> inline string toString(T x) { ostringstream sout; sout << x; return sout.str(); } template <class T> inline T sqr(T x) { return x * x; } typedef vector<int> v...
delete
96
98
96
96
0
e.S.F = 2 (L80) /home/alex/Documents/bug-detection/input/Project_CodeNet/data/p00743/C++/s428986672.cpp next_power = 1 (L81) /home/alex/Documents/bug-detection/input/Project_CodeNet/data/p00743/C++/s428986672.cpp e.S.F = 2 (L80) /home/alex/Documents/bug-detection/input/Project_CodeNet/data/p00743/C++/s428986672.cpp nex...
p00743
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> using namespace std; #define REP(i, n) for (int i = 0; i < (int)n; ++i) #define FOR(i, c) ...
#include <algorithm> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> using namespace std; #define REP(i, n) for (int i = 0; i < (int)n; ++i) #define FOR(i, c) ...
replace
72
73
72
73
TLE
p00743
C++
Memory Limit Exceeded
// MLE #include <algorithm> #include <cstdio> #include <iostream> #include <queue> #include <vector> using namespace std; struct node { char pos; char prev; char speed; double dist; node(int pos_, int prev_, int speed_, double dist_) : pos(pos_), prev(prev_), speed(speed_), dist(dist_) {} bool ope...
#include <algorithm> #include <cstdio> #include <iostream> #include <queue> #include <vector> using namespace std; struct node { char pos; char prev; char speed; double dist; node(int pos_, int prev_, int speed_, double dist_) : pos(pos_), prev(prev_), speed(speed_), dist(dist_) {} bool operator<(c...
delete
0
2
0
0
MLE
p00743
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; int main() { int i, j; int n,...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; int main() { int i, j; int n,...
replace
59
60
59
60
TLE
p00743
C++
Time Limit Exceeded
#include <cstdio> #include <cstring> #include <map> #include <queue> #define fst first #define snd second using namespace std; typedef struct { int dis; int lim; } edge; typedef pair<int, int> pp; typedef pair<int, pp> node; // v, (x,y) typedef pair<double, node> que; // sum, (v, (x,y)) edge input[50][50]; ...
#include <cstdio> #include <cstring> #include <map> #include <queue> #define fst first #define snd second using namespace std; typedef struct { int dis; int lim; } edge; typedef pair<int, int> pp; typedef pair<int, pp> node; // v, (x,y) typedef pair<double, node> que; // sum, (v, (x,y)) edge input[50][50]; ...
replace
69
70
69
71
TLE
p00743
C++
Time Limit Exceeded
#include <cstdio> #include <map> #include <queue> #include <vector> using namespace std; struct E { int t, c, d; E(int t, int c, int d) : t(t), c(c), d(d) {} }; vector<E> e[30]; struct S { double t; int cur, last, s; S(double t, int cur, int last, int s) : t(t), cur(cur), last(last), s(s) {} }; struct Cmp { ...
#include <cstdio> #include <map> #include <queue> #include <vector> using namespace std; struct E { int t, c, d; E(int t, int c, int d) : t(t), c(c), d(d) {} }; vector<E> e[30]; struct S { double t; int cur, last, s; S(double t, int cur, int last, int s) : t(t), cur(cur), last(last), s(s) {} }; struct Cmp { ...
replace
40
41
40
42
TLE
p00743
C++
Time Limit Exceeded
#include <algorithm> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <fstream> #include <iostream> #include <iterator> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <ve...
#include <algorithm> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <fstream> #include <iostream> #include <iterator> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <ve...
replace
55
56
55
56
TLE
p00743
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) #define INF 100000000.0 #define EPS 1e-10 #define MOD 1000000007 using namespace std; typedef pair<double, int> P; int n, m; int s, g; double dp[40 * 900 + 30 * 30 + 30]; vector<P> e[40 * 900 + 30 * 30 + 30]; void solve() { cin >> s >> g; s--;...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) #define INF 100000000.0 #define EPS 1e-10 #define MOD 1000000007 using namespace std; typedef pair<double, int> P; int n, m; int s, g; double dp[40 * 900 + 30 * 30 + 30]; vector<P> e[40 * 900 + 30 * 30 + 30]; void solve() { cin >> s >> g; s--;...
replace
44
45
44
45
TLE
p00744
C++
Runtime Error
#include <algorithm> #include <cctype> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <vector> using namespace std; #define INF 100000000 typede...
#include <algorithm> #include <cctype> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <vector> using namespace std; #define INF 100000000 typede...
replace
23
24
23
24
0
p00744
C++
Runtime Error
#include <algorithm> #include <cassert> #include <cmath> #include <iostream> #include <limits> #include <vector> using namespace std; using ll = long long; template <typename T> constexpr T INF = numeric_limits<T>::max() / 100; class Flow { public: using T = ll; struct Edge { Edge(const int from_, const int t...
#include <algorithm> #include <cassert> #include <cmath> #include <iostream> #include <limits> #include <vector> using namespace std; using ll = long long; template <typename T> constexpr T INF = numeric_limits<T>::max() / 100; class Flow { public: using T = ll; struct Edge { Edge(const int from_, const int t...
replace
92
93
92
93
0
p00744
C++
Runtime Error
#include <algorithm> #include <cmath> #include <cstring> #include <iomanip> #include <iostream> #include <string> #include <vector> using namespace std; #define int long long #define rep(i, n) for (int i = 0; i < (n); i++) #define INF (long long)(1e18) #define MOD (int)(1e9 + 7) #define yn(f) ((f) ? "Yes" : "No") #d...
#include <algorithm> #include <cmath> #include <cstring> #include <iomanip> #include <iostream> #include <string> #include <vector> using namespace std; #define int long long #define rep(i, n) for (int i = 0; i < (n); i++) #define INF (long long)(1e18) #define MOD (int)(1e9 + 7) #define yn(f) ((f) ? "Yes" : "No") #d...
replace
17
18
17
18
0
p00744
C++
Runtime Error
#include <cstdio> #include <cstring> #include <queue> using namespace std; const int MAXV = 2005; const int MAXE = MAXV * MAXV; const int INF = 1 << 29; struct BiparateMatching { int N, M, E, match[MAXV + 1], dist[MAXV + 1]; int last[MAXE], prev[MAXE], to[MAXE]; BiparateMatching(int n, int m) : N(n), M(m), E(0)...
#include <cstdio> #include <cstring> #include <queue> using namespace std; const int MAXV = 2005; const int MAXE = 505 * 505; const int INF = 1 << 29; struct BiparateMatching { int N, M, E, match[MAXV + 1], dist[MAXV + 1]; int last[MAXE], prev[MAXE], to[MAXE]; BiparateMatching(int n, int m) : N(n), M(m), E(0) {...
replace
6
7
6
7
-11
p00744
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; // Max-Flow,?????§??? template <int V> struct MaxFlow { using T = double; const T INF = 1 << 28; struct Edge { int to, rev; T cap; }; vector<Edge> g[V]; int level[V]; int iter[V]; void add(int from, int to, T cap) { g[from].push_back(Edge{to,...
#include <bits/stdc++.h> using namespace std; // Max-Flow,?????§??? template <int V> struct MaxFlow { using T = double; const T INF = 1 << 28; struct Edge { int to, rev; T cap; }; vector<Edge> g[V]; int level[V]; int iter[V]; void add(int from, int to, T cap) { g[from].push_back(Edge{to,...
replace
90
91
90
91
0
p00744
C++
Runtime Error
// #include<bits/stdc++.h> #include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; typedef long long ll; typedef ll int__; #define rep(i, j)...
// #include<bits/stdc++.h> #include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; typedef long long ll; typedef ll int__; #define rep(i, j)...
replace
21
22
21
22
0
p00744
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cmath> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; int bipartiteMaximumMatchings(const vector<vector<bool>> &graph) { ...
#include <algorithm> #include <bitset> #include <cmath> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; int bipartiteMaximumMatchings(const vector<vector<bool>> &graph) { ...
insert
57
57
57
60
0
p00744
C++
Runtime Error
// Hopcroft-Karp Algorithm // O(|E| * |V|^(1/2)) // http://en.wikipedia.org/wiki/Hopcroft%E2%80%93Karp_algorithm // aoj 1163 #include <iostream> #include <queue> #include <vector> using namespace std; int NIL; const int inf = 1 << 29; typedef vector<int> vi; typedef vector<vector<int>> Graph; bool bfs(const Graph &...
// Hopcroft-Karp Algorithm // O(|E| * |V|^(1/2)) // http://en.wikipedia.org/wiki/Hopcroft%E2%80%93Karp_algorithm // aoj 1163 #include <iostream> #include <queue> #include <vector> using namespace std; int NIL; const int inf = 1 << 29; typedef vector<int> vi; typedef vector<vector<int>> Graph; bool bfs(const Graph &...
replace
47
48
47
48
-11
p00744
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; struct Bipartite_Matching { vector<vector<int>> graph; vector<int> dist, match; vector<bool> used, vv; Bipartite_Matching(int n, int m) { graph.resize(n); match.assign(m, -1); used.assign(n, false); } void add_edge(int u, int v) { graph[u].push_b...
#include <bits/stdc++.h> using namespace std; struct Bipartite_Matching { vector<vector<int>> graph; vector<int> dist, match; vector<bool> used, vv; Bipartite_Matching(int n, int m) { graph.resize(n); match.assign(m, -1); used.assign(n, false); } void add_edge(int u, int v) { graph[u].push_b...
replace
100
101
100
101
0
p00744
C++
Runtime Error
#include <algorithm> #include <cstdlib> #include <cstring> #include <iostream> #include <vector> using namespace std; const int MAX_V = 1100; const int INF = 100000000; // &#65533;&#65533;&#65533;_&#65533;&#65533; int V; // &#65533;O&#65533;&#65533;&#65533;t&#65533;&#771;&#65533;&#65533;X&#65533;g&#65533;\&#65533;&#...
#include <algorithm> #include <cstdlib> #include <cstring> #include <iostream> #include <vector> using namespace std; const int MAX_V = 1100; const int INF = 100000000; // &#65533;&#65533;&#65533;_&#65533;&#65533; int V; // &#65533;O&#65533;&#65533;&#65533;t&#65533;&#771;&#65533;&#65533;X&#65533;g&#65533;\&#65533;&#...
insert
72
72
72
74
0
p00744
C++
Runtime Error
// include //------------------------------------------ #include <algorithm> #include <bitset> #include <cctype> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #inc...
// include //------------------------------------------ #include <algorithm> #include <bitset> #include <cctype> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #inc...
replace
635
636
635
636
0
p00744
C++
Runtime Error
#include <list> #include <stdio.h> #include <string.h> int F(int x, int y) { if (!y) return x; return F(y, x % y); } typedef std::list<int> L; L e[1002]; int m, n; bool f[1002]; int G(int s, int d) { if (s == d) return 1; if (f[s]) return 0; f[s] = 1; for (L::iterator i = e[s].begin(); i != e[s]...
#include <list> #include <stdio.h> #include <string.h> int F(int x, int y) { if (!y) return x; return F(y, x % y); } typedef std::list<int> L; L e[1002]; int m, n; bool f[1002]; int G(int s, int d) { if (s == d) return 1; if (f[s]) return 0; f[s] = 1; for (L::iterator i = e[s].begin(); i != e[s]...
replace
28
29
28
29
0
p00744
C++
Runtime Error
#include <iostream> #include <vector> using namespace std; #define vec vector #define pb push_back #define FOR(i, c) \ for (__typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i) #define REP(i, n) for (int i = 0; i < (int)(n); i++) // typedef long lo...
#include <iostream> #include <vector> using namespace std; #define vec vector #define pb push_back #define FOR(i, c) \ for (__typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i) #define REP(i, n) for (int i = 0; i < (int)(n); i++) // typedef long lo...
replace
66
67
66
67
0
p00744
C++
Runtime Error
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <vector> using namespace std; typedef long long ll; #define rep(i, n) for (int i = 0; i < (n); i++) const int INF = 1e9; const int MAX_V = 300; int m, n; struct Flow { struct edge { int to, cap, rev; }; vector<edge> G[MAX_...
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <vector> using namespace std; typedef long long ll; #define rep(i, n) for (int i = 0; i < (n); i++) const int INF = 1e9; const int MAX_V = 300000; int m, n; struct Flow { struct edge { int to, cap, rev; }; vector<edge> G[M...
replace
9
10
9
10
0
p00744
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; int gcd(int a, int b) { if (!b) return a; return gcd(b, a % b); } int b[500], r[500]; vector<int> E[500]; bool used[1000]; int match[1000]; bool dfs(int u) { used[u] = true; for (int v : E[u]) { int w = match...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; int gcd(int a, int b) { if (!b) return a; return gcd(b, a % b); } int b[500], r[500]; vector<int> E[1000]; bool used[1000]; int match[1000]; bool dfs(int u) { used[u] = true; for (int v : E[u]) { int w = matc...
replace
10
11
10
11
-11
p00744
C++
Memory Limit Exceeded
#define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <iostream> #include <queue> #include <stack> #include <stdio.h> #include <vector> using namespace std; typedef long long ll; class pass { public: ll t; ll c; ll p; }; class scale { private: ll v, e; pass *p; vector<ll> *node; bool *used; ...
#define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <iostream> #include <queue> #include <stack> #include <stdio.h> #include <vector> using namespace std; typedef long long ll; class pass { public: ll t; ll c; ll p; }; class scale { private: ll v, e; pass *p; vector<ll> *node; bool *used; ...
insert
168
168
168
169
MLE
p00745
C++
Time Limit Exceeded
#include <algorithm> #include <assert.h> #include <bitset> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <iomanip> #include <iostream> #include <iterator> #include <list> #include <map> #include <queue> #include ...
#include <algorithm> #include <assert.h> #include <bitset> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <iomanip> #include <iostream> #include <iterator> #include <list> #include <map> #include <queue> #include ...
replace
101
102
101
102
TLE
p00746
C++
Runtime Error
#include <algorithm> #include <iostream> #include <vector> using namespace std; bool SortXPos(pair<int, int> pos1, pair<int, int> pos2) { return pos1.first < pos2.first ? true : false; } bool SortYPos(pair<int, int> pos1, pair<int, int> pos2) { return pos1.second < pos2.second ? true : false; } int main(void) { ...
#include <algorithm> #include <iostream> #include <vector> using namespace std; bool SortXPos(pair<int, int> pos1, pair<int, int> pos2) { return pos1.first < pos2.first ? true : false; } bool SortYPos(pair<int, int> pos1, pair<int, int> pos2) { return pos1.second < pos2.second ? true : false; } int main(void) { ...
insert
15
15
15
17
-11
p00746
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; struct POINT { int x; int y; }; int dx[] = {-1, 0, 1, 0}; int dy[] = {0, 1, 0, -1}; int main(void...
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; struct POINT { int x; int y; }; int dx[] = {-1, 0, 1, 0}; int dy[] = {0, 1, 0, -1}; int main(void...
replace
42
43
42
43
TLE
p00746
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using LL = long long; using P = pair<int, int>; using Tapris = tuple<int, int, int>; #define REP(i, n) for (LL i = 0; i < n; ++i) #define FOR(i, a, n) for (LL i = a; i < n; ++i) #define pb(a) push_back(a) #define all(x) (x).begin(), (x).end() const int INF = (int)1e9; co...
#include <bits/stdc++.h> using namespace std; using LL = long long; using P = pair<int, int>; using Tapris = tuple<int, int, int>; #define REP(i, n) for (LL i = 0; i < n; ++i) #define FOR(i, a, n) for (LL i = a; i < n; ++i) #define pb(a) push_back(a) #define all(x) (x).begin(), (x).end() const int INF = (int)1e9; co...
replace
24
25
24
25
0
p00746
C++
Time Limit Exceeded
#include "bits/stdc++.h" #pragma warning(disable : 4996) using namespace std; const int dx[4] = {-1, 0, 1, 0}; const int dy[4] = {0, 1, 0, -1}; int main() { while (1) { int N; cin >> N; vector<int> xs; vector<int> ys; xs.emplace_back(0); ys.emplace_back(0); for (int i = 0; i < N - 1; ++i)...
#include "bits/stdc++.h" #pragma warning(disable : 4996) using namespace std; const int dx[4] = {-1, 0, 1, 0}; const int dy[4] = {0, 1, 0, -1}; int main() { while (1) { int N; cin >> N; if (!N) break; vector<int> xs; vector<int> ys; xs.emplace_back(0); ys.emplace_back(0); for (i...
insert
10
10
10
12
TLE
p00748
C++
Runtime Error
#include <iostream> using namespace std; int dpt1[1000001]; int dpt2[1000001]; bool dpb1[1000001]; bool dpb2[1000001]; int tr[1000]; int sq[1000]; int dp1(int s) { if (dpb1[s]) return dpt1[s]; int m = 1000111000; int r; for (int i = 1; i < 1000; i++) { if (s - sq[i] < 0) break; r = dp1(s - ...
#include <iostream> using namespace std; int dpt1[1000001]; int dpt2[1000001]; bool dpb1[1000001]; bool dpb2[1000001]; int tr[1000]; int sq[1000]; int dp1(int s) { if (dpb1[s]) return dpt1[s]; int m = 1000111000; int r; for (int i = 1; i < 1000; i++) { if (s - sq[i] < 0) break; r = dp1(s - ...
insert
61
61
61
63
0
p00748
C++
Runtime Error
#include <algorithm> #include <iostream> #define INF 1 << 28 using namespace std; int p[222]; int memo[1000001]; int memo2[1000001]; int solve(int n) { if (!n) return 0; if (memo[n]) return memo[n]; int ans = INF; for (int i = 1; p[i] <= n; i++) ans = min(ans, solve(n - p[i]) + 1); return mem...
#include <algorithm> #include <iostream> #define INF 1 << 28 using namespace std; int p[222]; int memo[1000001]; int memo2[1000001]; int solve(int n) { if (!n) return 0; if (memo[n]) return memo[n]; int ans = INF; for (int i = 1; p[i] <= n; i++) ans = min(ans, solve(n - p[i]) + 1); return mem...
replace
45
46
45
47
0
p00748
C++
Runtime Error
#include <algorithm> #include <cmath> #include <deque> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> #define rep(i, j, k) for (int i = (int)j; i < (int)k; i++) #define itrep(i, x) for (auto i = (x).begin(); i != (x).end(); i++...
#include <algorithm> #include <cmath> #include <deque> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> #define rep(i, j, k) for (int i = (int)j; i < (int)k; i++) #define itrep(i, x) for (auto i = (x).begin(); i != (x).end(); i++...
replace
35
36
35
36
TLE
p00748
C++
Time Limit Exceeded
#include <algorithm> #include <cstdio> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #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 all(in) in.b...
#include <algorithm> #include <cstdio> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #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 all(in) in.b...
replace
40
53
40
53
TLE
p00748
C++
Runtime Error
#include <algorithm> #include <iostream> using namespace std; int dp[2][1000001]; int f(int n) { return n * (n + 1) * (n + 2) / 6; } int main() { int n; for (int k = 0; k < 2; k++) fill(dp[k], dp[k] + 1000001, 1000000); dp[0][0] = dp[1][0] = 0; for (int i = 1; i <= n; i++) { for (int k = 1;; k++) { ...
#include <algorithm> #include <iostream> using namespace std; int dp[2][1000001]; int f(int n) { return n * (n + 1) * (n + 2) / 6; } int main() { int n; for (int k = 0; k < 2; k++) fill(dp[k], dp[k] + 1000001, 1000000); dp[0][0] = dp[1][0] = 0; for (int i = 1; i <= 1000000; i++) { for (int k = 1;; k...
replace
14
15
14
15
TLE
p00748
C++
Runtime Error
#include <algorithm> #include <iostream> #include <vector> using namespace std; const int MAX = 100010; vector<int> tetras; vector<int> oddTetras; int dp[MAX]; int oddDp[MAX]; int main() { for (int i = 1; i < 200; i++) { int n = i * (i + 1) * (i + 2) / 6; tetras.push_back(n); if (n % 2 == 1) odd...
#include <algorithm> #include <iostream> #include <vector> using namespace std; const int MAX = 1000100; vector<int> tetras; vector<int> oddTetras; int dp[MAX]; int oddDp[MAX]; int main() { for (int i = 1; i < 200; i++) { int n = i * (i + 1) * (i + 2) / 6; tetras.push_back(n); if (n % 2 == 1) od...
replace
5
6
5
6
0
p00748
C++
Runtime Error
#include <algorithm> #include <cstdlib> #include <deque> #include <iomanip> #include <iostream> #include <list> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> #include <time.h> #include <vector> #define REP(i, N) for (ll i = 0; i < N; ++i) #define ...
#include <algorithm> #include <cstdlib> #include <deque> #include <iomanip> #include <iostream> #include <list> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> #include <time.h> #include <vector> #define REP(i, N) for (ll i = 0; i < N; ++i) #define ...
replace
40
41
40
42
TLE
p00748
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 REP(i, n) for (int i = 0; i < (int)(n); ++i) #define RREP(i, n) for (int i = (int)(n - 1); i >= 0; --i) #define RFOR(i, a, b) for (int ...
#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 REP(i, n) for (int i = 0; i < (int)(n); ++i) #define RREP(i, n) for (int i = (int)(n - 1); i >= 0; --i) #define RFOR(i, a, b) for (int ...
replace
41
43
41
43
0
p00748
C++
Runtime Error
#include <algorithm> #include <cstdio> #include <iostream> #include <math.h> #include <queue> #include <stdio.h> #include <string> #include <utility> #define pi 3.14159 #define Inf (int)pow(2., 12.) using namespace std; typedef std::pair<int, int> mypair; queue<mypair> qu; #define M 1000000 int odd[M], all[M]; void ...
#include <algorithm> #include <cstdio> #include <iostream> #include <math.h> #include <queue> #include <stdio.h> #include <string> #include <utility> #define pi 3.14159 #define Inf (int)pow(2., 12.) using namespace std; typedef std::pair<int, int> mypair; queue<mypair> qu; #define M 1000000 int odd[M + 10], all[M + 1...
replace
16
17
16
17
0
p00748
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int all[1000001]; int odd[1000001]; int const INF = 1 << 29; int main() { fill(all, all + 1000001, INF); fill(odd, odd + 1000001, INF); all[0] = odd[0] = 0; for (int i = 1;; i++) { int n = i * (i + 1) * (i + 2); for (int j = n; j <= 1000000; j++) { ...
#include <bits/stdc++.h> using namespace std; int all[1000001]; int odd[1000001]; int const INF = 1 << 29; int main() { fill(all, all + 1000001, INF); fill(odd, odd + 1000001, INF); all[0] = odd[0] = 0; for (int i = 1;; i++) { int n = i * (i + 1) * (i + 2) / 6; if (n > 1000000) break; f...
replace
17
18
17
20
-11
p00748
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define rep(i, n) FOR(i, 0, n) #define pb emplace_back typedef long long ll; typedef pair<int, int> pint; int a[201]; int dp1[1000001], dp2[1000001]; int main() { FOR(i, 1, 201) { a[i - 1] = i * (i + 1) * (i + 2) / 6; ...
#include <bits/stdc++.h> using namespace std; #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define rep(i, n) FOR(i, 0, n) #define pb emplace_back typedef long long ll; typedef pair<int, int> pint; int a[201]; int dp1[1000001], dp2[1000001]; int main() { FOR(i, 1, 201) { a[i - 1] = i * (i + 1) * (i + 2) / 6; ...
replace
16
20
16
19
TLE
p00748
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include "../dump.hpp" #else #define dump(...) #endif #define rep(i, n) for (ll i = 0, i##_cond = (n); i < i##_cond; ++i) #define FOR(i, a, b) for (ll i = (a), i##_cond = (b); i < i##_cond; ++i) #define ROF(i, a, b) for (ll i = (a)-1, i##_cond = (b); i >= i##...
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include "../dump.hpp" #else #define dump(...) #endif #define rep(i, n) for (ll i = 0, i##_cond = (n); i < i##_cond; ++i) #define FOR(i, a, b) for (ll i = (a), i##_cond = (b); i < i##_cond; ++i) #define ROF(i, a, b) for (ll i = (a)-1, i##_cond = (b); i >= i##...
replace
52
58
52
56
TLE
p00748
C++
Runtime Error
#include <iostream> #include <utility> #include <vector> using namespace std; int main(int argc, char *argv[]) { const int N = 100001; vector<int> full(N); vector<int> odd(N); for (int i = 0; i < N; i++) full[i] = i; for (int i = 0; i < N; i++) odd[i] = i; for (int n = 2;; n++) { const int t = (...
#include <iostream> #include <utility> #include <vector> using namespace std; int main(int argc, char *argv[]) { const int N = 1000001; vector<int> full(N); vector<int> odd(N); for (int i = 0; i < N; i++) full[i] = i; for (int i = 0; i < N; i++) odd[i] = i; for (int n = 2;; n++) { const int t = ...
replace
5
6
5
6
0
p00748
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using lint = long long; template <class T = int> using V = vector<T>; template <class T = int> using VV = V<V<T>>; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); constexpr int N = 1e4; V<> a, b; for (int i = 1;; ++i) { a.push_back(i * (i + 1) * (...
#include <bits/stdc++.h> using namespace std; using lint = long long; template <class T = int> using V = vector<T>; template <class T = int> using VV = V<V<T>>; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); constexpr int N = 1e6; V<> a, b; for (int i = 1;; ++i) { a.push_back(i * (i + 1) * (...
replace
9
10
9
10
0
p00748
C++
Runtime Error
#include <algorithm> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iostream> #include <map> #include <memory> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include...
#include <algorithm> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iostream> #include <map> #include <memory> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include...
replace
36
37
36
37
0
p00748
C++
Runtime Error
#include <algorithm> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <queue> #include <string> #include <utility> #include <vector> #define INF 1e9 #define llINF 9223372036854775807 #define pb push_back #define mp make_pair #define F first #define...
#include <algorithm> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <queue> #include <string> #include <utility> #include <vector> #define INF 1e9 #define llINF 9223372036854775807 #define pb push_back #define mp make_pair #define F first #define...
replace
36
37
36
37
-11
p00748
C++
Runtime Error
#include <iostream> using namespace std; int main() { int num[1000010], num2[1000010]; for (int i = 0; i < 1000010; i++) num[i] = num2[i] = 10e8; num[0] = num2[0] = 0; for (int j = 0; j < 1000010; j++) { for (int i = 0; i < 1500; i++) { int m = i * (i + 1) * (i + 2) / 6; if (1000010 <= m + ...
#include <iostream> using namespace std; int main() { int num[1000010], num2[1000010]; for (int i = 0; i < 1000010; i++) num[i] = num2[i] = 10e8; num[0] = num2[0] = 0; for (int j = 0; j < 1000010; j++) { for (int i = 0; i < 1200; i++) { int m = i * (i + 1) * (i + 2) / 6; if (1000010 <= m + ...
replace
9
10
9
10
-11
p00748
C++
Runtime Error
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <vector> using namespace std; #def...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <vector> using namespace std; #def...
replace
65
66
65
66
TLE
p00749
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define repl(i, a, b) for (int i = (int)(a); i < (int)(b); i++) #define repr(i, n) for (int i = (int)(n - 1); i >= 0; i--) #define rep(i, n) repl(i, 0, n) #define each(itr, v) for (auto itr : v) #define pb(s) push_back(s) #define all(x) (...
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define repl(i, a, b) for (int i = (int)(a); i < (int)(b); i++) #define repr(i, n) for (int i = (int)(n - 1); i >= 0; i--) #define rep(i, n) repl(i, 0, n) #define each(itr, v) for (auto itr : v) #define pb(s) push_back(s) #define all(x) (...
replace
43
44
43
44
0
p00749
C++
Memory Limit Exceeded
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> using namespace std; int dx[] = {1, -1, 0, 0}; int dy[] = {0, 0, 1, -1}; int w, h; struct node { vector<int> next; vector<pair<int, int>> blocks; double gx; double left...
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> using namespace std; int dx[] = {1, -1, 0, 0}; int dy[] = {0, 0, 1, -1}; int w, h; struct node { vector<int> next; vector<pair<int, int>> blocks; double gx; double left...
replace
80
81
80
81
MLE
p00749
C++
Runtime Error
#include <algorithm> #include <cctype> #include <cstdio> #include <cstring> #include <queue> using namespace std; char p[16][64]; bool visit[16][64]; int dy[] = {-1, 0, 1, 0}; int dx[] = {0, -1, 0, 1}; bool dfs(int y, int x, int &rn, int &rd) { int n = 0, d = 0; int xl = 100, xr = -100; char ch = p[y][x]; qu...
#include <algorithm> #include <cctype> #include <cstdio> #include <cstring> #include <queue> using namespace std; char p[64][16]; bool visit[64][16]; int dy[] = {-1, 0, 1, 0}; int dx[] = {0, -1, 0, 1}; bool dfs(int y, int x, int &rn, int &rd) { int n = 0, d = 0; int xl = 100, xr = -100; char ch = p[y][x]; qu...
replace
7
9
7
9
0
p00749
C++
Runtime Error
#include <algorithm>/*{{{*/ #include <cassert> #include <cctype> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <iterator> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #in...
#include <algorithm>/*{{{*/ #include <cassert> #include <cctype> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <iterator> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #in...
replace
119
120
119
120
0
p00750
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, a, b) for (int i = a; i < b; i++) using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); } //--------------------------------------------------------------------------------------------------- /*-----------------------------------...
#include <bits/stdc++.h> #define rep(i, a, b) for (int i = a; i < b; i++) using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); } //--------------------------------------------------------------------------------------------------- /*-----------------------------------...
replace
79
81
79
80
0
Finish : 1 Finish : 2 Finish : 3 Finish : 4
p00750
C++
Runtime Error
#include <algorithm> #include <cassert> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <fstream> #include <functional> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <...
#include <algorithm> #include <cassert> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <fstream> #include <functional> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <...
insert
79
79
79
81
-11
p00750
C++
Runtime Error
#include <fstream> #include <iostream> #include <queue> #include <string> #include <vector> using namespace std; #define MAX (6 * N) class Node { public: vector<int> to; vector<string> sp; Node() {} }; class State { public: int p; string str; State(int p, string str) : p(p), str(str) {} bool operator<...
#include <fstream> #include <iostream> #include <queue> #include <string> #include <vector> using namespace std; #define MAX (6 * N) class Node { public: vector<int> to; vector<string> sp; Node() {} }; class State { public: int p; string str; State(int p, string str) : p(p), str(str) {} bool operator<...
replace
27
29
27
29
0
p00750
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <string> #include <utility> #include <vector> using namespace std; #define rep(i, n) for ((i) = 0; (i) < (int)(n); (i)++) #def...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <string> #include <utility> #include <vector> using namespace std; #define rep(i, n) for ((i) = 0; (i) < (int)(n); (i)++) #def...
replace
81
82
81
82
TLE
p00752
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef complex<double> P; double eps = 1e-8; bool eq(double a, double b) { return (-eps < a - b && a - b < eps); } bool eq(P a, P b) { return (abs(a - b) < eps); } double dot(P a, P b) { return real(b * conj(a)); } double cross(P a, P b) { return imag(b * conj(a)); } ...
#include <bits/stdc++.h> using namespace std; typedef complex<double> P; double eps = 1e-8; bool eq(double a, double b) { return (-eps < a - b && a - b < eps); } bool eq(P a, P b) { return (abs(a - b) < eps); } double dot(P a, P b) { return real(b * conj(a)); } double cross(P a, P b) { return imag(b * conj(a)); } ...
replace
71
73
71
72
-6
8f9f62b6-27d5-484a-a174-141eb9b7f3c9.out: /home/alex/Documents/bug-detection/input/Project_CodeNet/data/p00752/C++/s688975210.cpp:113: double calc(P, P, int): Assertion `onSegment(seg,k)' failed.
p00752
C++
Time Limit Exceeded
#include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <vector> #define REP(i, s, n) for (int i = s; i < n; i++) #define rep(i, n) REP(i, 0, n) #define inf (1 << 29) #define EPS (1e-5) #define COUNTER_CLOCKWISE 1 #define CLOCKWISE -1 #define ONLINE_BA...
#include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <vector> #define REP(i, s, n) for (int i = s; i < n; i++) #define rep(i, n) REP(i, 0, n) #define inf (1 << 29) #define EPS (1e-5) #define COUNTER_CLOCKWISE 1 #define CLOCKWISE -1 #define ONLINE_BA...
replace
209
210
209
210
TLE
p00761
C++
Runtime Error
#include <algorithm> #include <iostream> #include <sstream> #include <string> #include <vector> using namespace std; vector<int> a; int L; string intString(int n) { stringstream ss; int keta = 1, tmp; tmp = n; while (tmp != 0) { tmp /= 10; keta++; } for (int i = 0; i <= (L - keta); i++) ss << 0...
#include <algorithm> #include <iostream> #include <sstream> #include <string> #include <vector> using namespace std; vector<int> a; int L; string intString(int n) { stringstream ss; int keta = 1, tmp; tmp = n; while (tmp != 0) { tmp /= 10; keta++; } for (int i = 0; i <= (L - keta); i++) ss << 0...
replace
37
38
37
38
0
p00761
C++
Runtime Error
// 18 #include <algorithm> #include <cstdlib> #include <iomanip> #include <iostream> #include <sstream> #include <string> using namespace std; int main() { for (int n, l; cin >> n >> l, n | l;) { stringstream ss; ss << setw(l) << setfill('0') << n; string a[20]; a[0] = ss.str(); for (int i = 1;;...
// 18 #include <algorithm> #include <cstdlib> #include <iomanip> #include <iostream> #include <sstream> #include <string> using namespace std; int main() { for (int n, l; cin >> n >> l, n | l;) { stringstream ss; ss << setw(l) << setfill('0') << n; string a[21]; a[0] = ss.str(); for (int i = 1;;...
replace
14
15
14
15
0
p00761
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; vector<string> tmp; int ans, cnt, n; string s; string rec(string x) { while (1) { // cout << x << endl; bool flag = false; sort(x.begin(), x.end()); string a = x; if (a.empty() == 1) while (a.front() ...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; vector<string> tmp; int ans, cnt, n; string s; string rec(string x) { while (1) { // cout << x << endl; bool flag = false; sort(x.begin(), x.end()); string a = x; if (a.empty() == 1) while (a.front() ...
replace
46
54
46
52
TLE
p00762
C++
Runtime Error
#include <iostream> using namespace std; int n; int dy[] = {1, 0, -1, 0}; int dx[] = {0, 1, 0, -1}; int t[300][300], u[300][300]; void roll(int d[], int dir) { int tmp[6], z; for (int i = 1; i <= 6; i++) { tmp[d[i]] = i; } if (dir == 0) { z = tmp[0]; tmp[0] = tmp[3]; tmp[3] = tmp[5]; tmp[5...
#include <iostream> using namespace std; int n; int dy[] = {1, 0, -1, 0}; int dx[] = {0, 1, 0, -1}; int t[300][300], u[300][300]; void roll(int d[], int dir) { int tmp[6], z; for (int i = 1; i <= 6; i++) { tmp[d[i]] = i; } if (dir == 0) { z = tmp[0]; tmp[0] = tmp[3]; tmp[3] = tmp[5]; tmp[5...
replace
126
127
126
127
0
p00762
C++
Runtime Error
#include <iostream> using namespace std; #define VAR 150 struct S { int U, D, R, L, F, B, h, x, y; }; int main() { int field[VAR][VAR][VAR]; int n; int t, f; int tmp; int cnt[7]; S dice; while (1) { cin >> n; if (n == 0) break; for (int i = 0; i < VAR; i++) { for (int j =...
#include <iostream> using namespace std; #define VAR 100 struct S { int U, D, R, L, F, B, h, x, y; }; int main() { int field[VAR][VAR][VAR]; int n; int t, f; int tmp; int cnt[7]; S dice; while (1) { cin >> n; if (n == 0) break; for (int i = 0; i < VAR; i++) { for (int j =...
replace
4
5
4
5
-11
p00762
C++
Memory 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 rep2(i, a, b) for (int i = (a); i < (b); i++) #define rrep(i, n) for (int i = (n)-1; i >= 0; i--) #define rrep2(i, a, b) for (int i = (b)-1; i >= (a); i--) #define al...
#include <bits/stdc++.h> using namespace std; // #define int long long // <-----!!!!!!!!!!!!!!!!!!! #define rep(i, n) for (int i = 0; i < (n); i++) #define rep2(i, a, b) for (int i = (a); i < (b); i++) #define rrep(i, n) for (int i = (n)-1; i >= 0; i--) #define rrep2(i, a, b) for (int i = (b)-1; i >= (a); i--) #defi...
replace
2
3
2
3
MLE
p00762
C++
Memory Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef pair<int, int> Pair; int getRightSide(Pair p) { if (p.first == 1 && p.second == 2) return 3; if (p.first == 1 && p.second == 3) return 5; if (p.first == 1 && p.second == 4) return 2; if (p.first == 1 && p.second == 5) return 4; if (p.first...
#include <bits/stdc++.h> using namespace std; typedef pair<int, int> Pair; int getRightSide(Pair p) { if (p.first == 1 && p.second == 2) return 3; if (p.first == 1 && p.second == 3) return 5; if (p.first == 1 && p.second == 4) return 2; if (p.first == 1 && p.second == 5) return 4; if (p.first...
replace
80
81
80
81
MLE
p00762
C++
Runtime Error
#include <algorithm> #include <cctype> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <stdlib.h> #include <string.h> #include <string> #include <utility> #include <vector> using namespace std; #define...
#include <algorithm> #include <cctype> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <stdlib.h> #include <string.h> #include <string> #include <utility> #include <vector> using namespace std; #define...
replace
117
118
117
120
-6
double free or corruption (out)
p00762
C++
Memory Limit Exceeded
#include <bits/stdc++.h> using namespace std; const int xRoll[4] = {0, 2, 5, 3}; const int yRoll[4] = {0, 4, 5, 1}; const int zRoll[4] = {1, 2, 4, 3}; const int dx[4] = {0, 1, 0, -1}; const int dy[4] = {-1, 0, 1, 0}; struct Dice { bool empty = true; vector<int> num; void rotate(int dir) { if (dx[dir] == 0) {...
#include <bits/stdc++.h> using namespace std; const int xRoll[4] = {0, 2, 5, 3}; const int yRoll[4] = {0, 4, 5, 1}; const int zRoll[4] = {1, 2, 4, 3}; const int dx[4] = {0, 1, 0, -1}; const int dy[4] = {-1, 0, 1, 0}; struct Dice { bool empty = true; vector<int> num; void rotate(int dir) { if (dx[dir] == 0) {...
replace
38
39
38
39
MLE
p00763
C++
Runtime Error
#include <bits/stdc++.h> #include <string> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); ++i) #define all(c) begin(c), end(c) int n, m, c, s, g; int d_dist[30][110][110]; int d_final[110][110]; int p[30], q[30][60], r[30][60]; const int inf = 1e9; int getcost(int dist, int *q, int *p) { if...
#include <bits/stdc++.h> #include <string> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); ++i) #define all(c) begin(c), end(c) int n, m, c, s, g; int d_dist[30][110][110]; int d_final[110][110]; int p[30], q[30][60], r[30][60]; const int inf = 1e9; int getcost(int dist, int *q, int *p) { if...
replace
38
40
38
40
0
p00763
C++
Runtime Error
#include <algorithm> #include <cassert> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <fstream> #include <functional> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <...
#include <algorithm> #include <cassert> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <fstream> #include <functional> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <...
replace
64
65
64
65
0
p00763
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define INF (1e9) #define M 10005 #define N 105 #define L 55 #define C 20 using namespace std; typedef pair<int, int> P; int n, m, c, s, g, x, y, id, ic, p[C], q[L], r[L]; int cost1[C][N][N]; int cost2[C][M]; int d[N]; int tocost(int a, int b) { if (b < M) return cost2[a][b]; while (1)...
#include <bits/stdc++.h> #define INF (1e9) #define M 10005 #define N 105 #define L 55 #define C 20 using namespace std; typedef pair<int, int> P; int n, m, c, s, g, x, y, id, ic, p[C], q[L], r[L]; int cost1[C][N][N]; int cost2[C][M]; int d[N]; int tocost(int a, int b) { if (b < M) return cost2[a][b]; return co...
replace
16
19
16
17
TLE
p00763
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef pair<int, int> P; int n, m, C, S, T, p[21], q[21][51], r[21][51]; int G[20][101][101]; void init() { for (int i = 0; i < 20; i++) for (int j = 0; j < 100; j++) for (int k = 0; k < 100; k++) G[i][j][k] = 1e9; } int calc(int c, int D) { int res...
#include <bits/stdc++.h> using namespace std; typedef pair<int, int> P; int n, m, C, S, T, p[21], q[21][51], r[21][51]; int G[20][101][101]; void init() { for (int i = 0; i < 20; i++) for (int j = 0; j < 100; j++) for (int k = 0; k < 100; k++) G[i][j][k] = 1e9; } int calc(int c, int D) { int res...
replace
46
48
46
48
0
p00763
C++
Runtime Error
#include <algorithm> #include <cstdio> using namespace std; #define INF (1 << 28) #define REP(i, n) for (int i = 0; i < n; i++) int a[110][110], wf[30][110][110], p[30], q[30][100], r[30][100]; int n, m, c, s, g, x, y, d, id, tmp; int main() { while (scanf("%d%d%d%d%d", &n, &m, &c, &s, &g), n) { REP(i, n) REP(...
#include <algorithm> #include <cstdio> using namespace std; #define INF (1 << 28) #define REP(i, n) for (int i = 0; i < n; i++) int a[110][110], wf[30][110][110], p[30], q[30][100], r[30][100]; int n, m, c, s, g, x, y, d, id, tmp; int main() { while (scanf("%d%d%d%d%d", &n, &m, &c, &s, &g), n) { REP(i, n) REP(...
replace
14
15
14
15
0
p00763
C++
Runtime Error
#include <algorithm> #include <cmath> #include <iostream> #include <queue> #include <set> #include <stack> #include <vector> using namespace std; #define inf 1000000000000 long long dp[101][101]; long long dist[101][101][21]; long long solve(int n, int m, int c, int s, int g) { for (int i = 0; i <= n; i++) { ...
#include <algorithm> #include <cmath> #include <iostream> #include <queue> #include <set> #include <stack> #include <vector> using namespace std; #define inf 1000000000000 long long dp[101][101]; long long dist[101][101][21]; long long solve(int n, int m, int c, int s, int g) { for (int i = 0; i <= n; i++) { ...
replace
46
47
46
47
0
p00763
C++
Memory Limit Exceeded
// 考察 //?単純な場合を求める // ・(今いる頂点i, // 前使った鉄道の種類j, 種類jの鉄道を連続で使った距離k)が同じなら、合計運賃(コスト)は小さいほうがよい // ・でもこれを状態とすると、状態数はO(n * c * 合計距離MAX ), // 合計距離MAXは最悪1万は軽く超えるので、TLE&MLE不可避。 // ・経路中で用いられる鉄道の種類はたくさん&複雑 // ・一つの鉄道を使ってある地点からある地点へ行く最適な経路自体は、頂点だけを状態とした最短経路問題を解けば求まる。 // ↑の場合、今までの合計距離 = // 前に使った鉄道と同じ種類の鉄道を連続で用いた距離なので、状態が減る。 // ただし、このと...
// 考察 //?単純な場合を求める // ・(今いる頂点i, // 前使った鉄道の種類j, 種類jの鉄道を連続で使った距離k)が同じなら、合計運賃(コスト)は小さいほうがよい // ・でもこれを状態とすると、状態数はO(n * c * 合計距離MAX ), // 合計距離MAXは最悪1万は軽く超えるので、TLE&MLE不可避。 // ・経路中で用いられる鉄道の種類はたくさん&複雑 // ・一つの鉄道を使ってある地点からある地点へ行く最適な経路自体は、頂点だけを状態とした最短経路問題を解けば求まる。 // ↑の場合、今までの合計距離 = // 前に使った鉄道と同じ種類の鉄道を連続で用いた距離なので、状態が減る。 // ただし、このと...
replace
165
168
165
169
MLE
p00765
C++
Time Limit Exceeded
#define _USE_MATH_DEFINES #define _CRT_SECURE_NO_DEPRECATE #include <algorithm> #include <bitset> #include <cassert> #include <cfloat> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <fstream> #include <functional> #include <iomanip> #include <iostr...
#define _USE_MATH_DEFINES #define _CRT_SECURE_NO_DEPRECATE #include <algorithm> #include <bitset> #include <cassert> #include <cfloat> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <fstream> #include <functional> #include <iomanip> #include <iostr...
replace
247
249
247
253
TLE
p00766
C++
Memory Limit Exceeded
#include <algorithm> #include <complex> #include <cstring> #include <iostream> #include <queue> #include <string> #include <vector> using namespace std; int dx[] = {-1, 0, 1, 0, -1, 0, 1, 0}; int dy[] = {0, -1, 0, -1, 0, 1, 0, 1}; int nx[] = {0, 1, 0, 1}; int ny[] = {0, 0, 1, 1}; typedef complex<double> point; struc...
#include <algorithm> #include <complex> #include <cstring> #include <iostream> #include <queue> #include <string> #include <vector> using namespace std; int dx[] = {-1, 0, 1, 0, -1, 0, 1, 0}; int dy[] = {0, -1, 0, -1, 0, 1, 0, 1}; int nx[] = {0, 1, 0, 1}; int ny[] = {0, 0, 1, 1}; typedef complex<double> point; struc...
replace
62
63
62
63
MLE
p00767
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define reep(i, a, b) for (int i = (a); i < (b); ++i) #define rep(i, n) reep((i), 0, (n)) typedef pair<int, int> pii; typedef pair<int, pii> P; int main() { int h, w; while (cin >> h >> w, h || w) { P in = make_pair(w * w + h * h, pii(h, w)); P ans = make_pair...
#include <bits/stdc++.h> using namespace std; #define reep(i, a, b) for (int i = (a); i < (b); ++i) #define rep(i, n) reep((i), 0, (n)) typedef pair<int, int> pii; typedef pair<int, pii> P; int main() { int h, w; while (cin >> h >> w, h || w) { P in = make_pair(w * w + h * h, pii(h, w)); P ans = make_pair...
replace
13
15
13
15
TLE
p00767
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define INF 1e9 int len(int i, int j) { int res = i * i + j * j; return res; } signed main() { ios::sync_with_stdio(false); cin.tie(0); while (1) { int h, w; cin >> h >> w; int L = len(h, w); pair<int, int> ans = {10000, 10000}; for (in...
#include <bits/stdc++.h> using namespace std; #define INF 1e9 int len(int i, int j) { int res = i * i + j * j; return res; } signed main() { ios::sync_with_stdio(false); cin.tie(0); while (1) { int h, w; cin >> h >> w; if (h == 0) break; int L = len(h, w); pair<int, int> ans ...
insert
18
18
18
21
TLE
p00768
C++
Runtime Error
#include <algorithm> #include <iostream> #include <vector> using namespace std; struct Info { int id, cost, ac; }; bool operator<(const Info &a, const Info &b) { if (a.ac != b.ac) return a.ac > b.ac; if (a.cost != b.cost) return a.cost < b.cost; return a.id > b.id; } int main() { int M, T, P, R; ...
#include <algorithm> #include <iostream> #include <vector> using namespace std; struct Info { int id, cost, ac; }; bool operator<(const Info &a, const Info &b) { if (a.ac != b.ac) return a.ac > b.ac; if (a.cost != b.cost) return a.cost < b.cost; return a.id > b.id; } int main() { int M, T, P, R; ...
insert
29
29
29
30
0
p00768
C++
Runtime Error
#include <algorithm> #include <iostream> #include <vector> using namespace std; class team { public: int num, ans, time; team(int n) { num = n; ans = time = 0; } bool operator<(const team &t2) const { if (ans != t2.ans) return ans > t2.ans; else if (time != t2.time) return time < t2...
#include <algorithm> #include <iostream> #include <vector> using namespace std; class team { public: int num, ans, time; team(int n) { num = n; ans = time = 0; } bool operator<(const team &t2) const { if (ans != t2.ans) return ans > t2.ans; else if (time != t2.time) return time < t2...
delete
68
69
68
68
-6
free(): double free detected in tcache 2
p00768
C++
Runtime Error
#include <algorithm> #include <iostream> #include <vector> using namespace std; void swapp(int *, int *); int main() { while (1) { int M, T, P, R; cin >> M >> T >> P >> R; if (M == 0 && T == 0 && P == 0 && R == 0) break; int te[51]; int tr[51]; int tp[51] = {}; int tt[51] = {}; v...
#include <algorithm> #include <iostream> #include <vector> using namespace std; void swapp(int *, int *); int main() { while (1) { int M, T, P, R; cin >> M >> T >> P >> R; if (M == 0 && T == 0 && P == 0 && R == 0) break; int te[51]; int tr[51]; int tp[51] = {}; int tt[51] = {}; v...
replace
15
16
15
16
0
p00768
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 REP(i, n) for (int i = 0; i < (int)(n); ++i) #define RREP(i, n) for (int i = (int)(n - 1); i >= 0; --i) #define ALL(a) (a...
/* * * */ #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 REP(i, n) for (int i = 0; i < (int)(n); ++i) #define RREP(i, n) for (int i = (int)(n - 1); i >= 0; --i) #define ALL(a) (a...
replace
62
63
62
63
-11
p00768
C++
Runtime Error
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < (int)(n); i++) #define ALL(x) (x).begin(), (x).end() using namespace std; int main() { int M, T, P, R; while (true) { cin >> M >> T >> P >> R; if (M == 0) return 0; vector<int> m(R), t(R), p(R), j(R); REP(i, R) { cin >> m[...
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < (int)(n); i++) #define ALL(x) (x).begin(), (x).end() using namespace std; int main() { int M, T, P, R; while (true) { cin >> M >> T >> P >> R; if (M == 0) return 0; vector<int> m(R), t(R), p(R), j(R); REP(i, R) { cin >> m[...
insert
17
17
17
18
0
p00768
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int M, T, P, R; while (scanf("%d %d %d %d", &M, &T, &P, &R) && M) { vector<pair<pair<int, int>, int>> record(T); int wa[16][64] = {0}; for (int i = 0; i < T; i++) record[i].second = -(i + 1); for (int i = 0; i < R; i++) { in...
#include <bits/stdc++.h> using namespace std; int main() { int M, T, P, R; while (scanf("%d %d %d %d", &M, &T, &P, &R) && M) { vector<pair<pair<int, int>, int>> record(T); int wa[64][16] = {0}; for (int i = 0; i < T; i++) record[i].second = -(i + 1); for (int i = 0; i < R; i++) { in...
replace
9
10
9
10
0
p00768
C++
Runtime Error
#include <algorithm> #include <cstdio> #include <iostream> #include <set> #include <string> #include <vector> using namespace std; #define reps(i, f, n) for (int i = f; i < int(n); i++) #define rep(i, n) reps(i, 0, n) typedef pair<int, int> pii; typedef pair<pii, int> piii; piii mk(int a, int b, int c) { return pii...
#include <algorithm> #include <cstdio> #include <iostream> #include <set> #include <string> #include <vector> using namespace std; #define reps(i, f, n) for (int i = f; i < int(n); i++) #define rep(i, n) reps(i, 0, n) typedef pair<int, int> pii; typedef pair<pii, int> piii; piii mk(int a, int b, int c) { return pii...
replace
21
23
21
23
0
p00768
C++
Runtime Error
#include <algorithm> #include <cstdio> #include <functional> #include <iostream> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; typedef pair<int, int> P; typedef pair<P, int> PP; int main() { while (true) { int m, t, p, r; scanf("%d%d%d%d", &m, &t, &p, &r); if (m == 0...
#include <algorithm> #include <cstdio> #include <functional> #include <iostream> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; typedef pair<int, int> P; typedef pair<P, int> PP; int main() { while (true) { int m, t, p, r; scanf("%d%d%d%d", &m, &t, &p, &r); if (m == 0...
replace
26
27
26
27
0