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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p00540 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <vector>
using namespace std;
int n, m, a, b, c[100000], D[100000], E[100000];
map<vector<int>, tuple<vector<int>, vector<int>, vector<int>>> M;
void make(int n) {
queue<vector<int>> Q;
for (int i = 1; i <= n; i++) {
vector<int> i... | #include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <vector>
using namespace std;
int n, m, a, b, c[100000], D[100000], E[100000];
map<vector<int>, tuple<vector<int>, vector<int>, vector<int>>> M;
void make(int n) {
queue<vector<int>> Q;
for (int i = 1; i <= n; i++) {
vector<int> i... | replace | 67 | 73 | 67 | 98 | TLE | |
p00541 | C++ | Memory Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
const int maxn = (int)4004;
int H, W, L, P;
int a[maxn][maxn];
int _up[maxn][maxn], _down[maxn][maxn], _left[maxn][maxn], _right[maxn][maxn];
long long res;
int BIT[maxn][2];
int get(int id, int x) {
int ret = 0;
while (x > 0) {
ret += BIT[x][id];
x -= x & (-... | #include <bits/stdc++.h>
using namespace std;
const int maxn = (int)4004;
int H, W, L, P;
bool a[maxn][maxn];
short _up[maxn][maxn], _down[maxn][maxn], _left[maxn][maxn], _right[maxn][maxn];
long long res;
int BIT[maxn][2];
int get(int id, int x) {
int ret = 0;
while (x > 0) {
ret += BIT[x][id];
x -= x &... | replace | 6 | 8 | 6 | 8 | MLE | |
p00541 | C++ | Memory Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
const int N = 4005;
int n, m, P, L;
int a[N][N];
int l[N][N], r[N][N], u[N][N], d[N][N];
long long ans;
int T[N];
void upd(int x, int v) {
for (; x <= n; x += x & -x)
T[x] += v;
}
int get(int x) {
int res = 0;
for (; x > 0; x -= x & -x)
res += T[x];
retur... | #include <bits/stdc++.h>
using namespace std;
const int N = 4005;
int n, m, P, L;
bool a[N][N];
short l[N][N], r[N][N], u[N][N], d[N][N];
long long ans;
int T[N];
void upd(int x, int v) {
for (; x <= n; x += x & -x)
T[x] += v;
}
int get(int x) {
int res = 0;
for (; x > 0; x -= x & -x)
res += T[x];
re... | replace | 6 | 8 | 6 | 8 | MLE | |
p00541 | C++ | Memory Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define st first
#define nd second
#define mp make_pair
#define space << " " <<
#define END << endl
#define pb push_back
#define fo(i, n) for (int i = 0; i < n; ++i)
#define ff(i, n) for (int i = 1; i < n; ++i)
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef p... | #include <bits/stdc++.h>
using namespace std;
#define st first
#define nd second
#define mp make_pair
#define space << " " <<
#define END << endl
#define pb push_back
#define fo(i, n) for (int i = 0; i < n; ++i)
#define ff(i, n) for (int i = 1; i < n; ++i)
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef p... | replace | 24 | 25 | 24 | 25 | MLE | |
p00542 | C++ | Runtime Error | #include <stdio.h>
int main(void) {
int e, f, x, y[4], z, i, j;
scanf("%d %d %d %d %d %d", y[0], y[1], y[2], y[3], &e, &f);
for (i = 0; i < 3; i++) {
for (j = i + 1; j < 4; j++) {
if (y[i] < y[j]) {
z = y[i];
y[i] = y[j];
y[j] = z;
}
}
}
x = y[0] + y[1] + y[2];
if... | #include <stdio.h>
int main(void) {
int e, f, x, y[4], z, i, j;
scanf("%d %d %d %d %d %d", &y[0], &y[1], &y[2], &y[3], &e, &f);
for (i = 0; i < 3; i++) {
for (j = i + 1; j < 4; j++) {
if (y[i] < y[j]) {
z = y[i];
y[i] = y[j];
y[j] = z;
}
}
}
x = y[0] + y[1] + y[2];
... | replace | 3 | 4 | 3 | 4 | -11 | |
p00542 | C++ | Runtime Error | #include <bits/stdc++.h>
#define GPA 4
#define ROLLMAN endl
using namespace std;
typedef int OTAKU;
OTAKU main() {
OTAKU roll[GPA], man[GPA];
for (OTAKU i = 0; i < 4; i++)
cin >> roll[i];
for (OTAKU i = 0; i < 2; i++)
cin >> man[i];
sort(roll, roll + 4);
sort(man, man + 2);
OTAKU Happy_Birthda... | #include <bits/stdc++.h>
#define GPA 4
#define ROLLMAN endl
using namespace std;
typedef int OTAKU;
OTAKU main() {
OTAKU roll[GPA], man[GPA];
for (OTAKU i = 0; i < 4; i++)
cin >> roll[i];
for (OTAKU i = 0; i < 2; i++)
cin >> man[i];
sort(roll, roll + 4);
sort(man, man + 2);
OTAKU Happy_Birthda... | replace | 26 | 27 | 26 | 27 | 4 | |
p00544 | C++ | Runtime Error | #include <algorithm>
#include <cstdlib>
#include <iostream>
#include <math.h>
#include <stdlib.h>
#include <vector>
using namespace std;
int a, b, ans = 0, W = 0, B = 0, R = 0;
int tansaku(int iti, int ryo, vector<string> c) {
int kariAns = 0;
for (int i = 0; i < b; i++) {
for (int j = 0; j < ryo; j++) {
... | #include <algorithm>
#include <cstdlib>
#include <iostream>
#include <math.h>
#include <stdlib.h>
#include <vector>
using namespace std;
int a, b, ans = 0, W = 0, B = 0, R = 0;
int tansaku(int iti, int ryo, vector<string> c) {
int kariAns = 0;
for (int i = 0; i < b; i++) {
for (int j = 0; j < ryo; j++) {
... | replace | 26 | 27 | 26 | 27 | -11 | |
p00544 | C++ | Runtime Error | #include <bits/stdc++.h>
#define int long long int
#define rep(a, b, c) for (int a = b; a < c; a++)
#define repm(a, b, c) for (int a = (b - 1); a >= c; a--)
#define pb push_back
#define str string
#define sf(a) scanfs("%d", &a)
#define pb push_back
#define mp make_pair
#define Fi first
#define Se second
#define ALL(v)... | #include <bits/stdc++.h>
#define int long long int
#define rep(a, b, c) for (int a = b; a < c; a++)
#define repm(a, b, c) for (int a = (b - 1); a >= c; a--)
#define pb push_back
#define str string
#define sf(a) scanfs("%d", &a)
#define pb push_back
#define mp make_pair
#define Fi first
#define Se second
#define ALL(v)... | replace | 51 | 52 | 51 | 52 | 0 | |
p00545 | C++ | Runtime Error |
#include <cstdio>
#include <vector>
using namespace std;
using ll = long long;
const ll inf = 4e18;
ll n, t, q;
ll a[123456];
bool d[123456];
ll x[1000];
vector<ll> talkp;
ll place[123456];
inline ll mean(ll a, ll b) { return a / 2 + b / 2; }
int main() {
scanf("%lld %lld %lld", &n, &t, &q);
a[0] = -inf;
d... |
#include <cstdio>
#include <vector>
using namespace std;
using ll = long long;
const ll inf = 4e18;
ll n, t, q;
ll a[123456];
bool d[123456];
ll x[1000];
vector<ll> talkp;
ll place[123456];
inline ll mean(ll a, ll b) { return a / 2 + b / 2; }
int main() {
scanf("%lld %lld %lld", &n, &t, &q);
a[0] = -inf;
d... | replace | 43 | 44 | 43 | 44 | 0 | |
p00545 | C++ | Runtime Error | #include <iostream>
#include <queue>
#include <set>
using namespace std;
struct person {
long long start;
long long end;
long long way;
bool finished;
};
person person[100005];
long long n, t, q, key[1005];
int main() {
// cout<<endl;
cin >> n >> t >> q;
priority_queue<long long> crash;
// crash.push(-... | #include <iostream>
#include <queue>
#include <set>
using namespace std;
struct person {
long long start;
long long end;
long long way;
bool finished;
};
person person[100005];
long long n, t, q, key[1005];
int main() {
// cout<<endl;
cin >> n >> t >> q;
priority_queue<long long> crash;
crash.push(-900... | replace | 17 | 18 | 17 | 18 | -11 | |
p00545 | C++ | Runtime Error | // Walking in JOI Kingdom
#include <iostream>
using namespace std;
typedef long long ll;
static const int MAX = 100;
enum DIRECTION { EAST = 1, WEST = 2 };
struct House {
ll a;
int d;
House() {}
House(ll a, int d) : a(a), d(d) {}
};
int N, Q;
ll T;
House H[MAX + 1];
ll A[MAX + 1];
bool Traced[MAX + 1];
ll... | // Walking in JOI Kingdom
#include <iostream>
using namespace std;
typedef long long ll;
static const int MAX = 100000;
enum DIRECTION { EAST = 1, WEST = 2 };
struct House {
ll a;
int d;
House() {}
House(ll a, int d) : a(a), d(d) {}
};
int N, Q;
ll T;
House H[MAX + 1];
ll A[MAX + 1];
bool Traced[MAX + 1];
... | replace | 6 | 7 | 6 | 7 | 0 | |
p00545 | C++ | Runtime Error | //============================================================================
// Name : JOI.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#include <algor... | //============================================================================
// Name : JOI.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#include <algor... | replace | 18 | 20 | 18 | 20 | 0 | |
p00545 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cstdio>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
int n;
ll t;
int q;
ll a[100000];
int d[100000];
int x[1000];
int main() {
scanf("%d%lld%d", &n, &t, &q);
rep(i, n) { scanf("%lld%d", &a[i], &d[i]); }
rep(i, q) { scanf("%d", &x[i... | #include <algorithm>
#include <cstdio>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
int n;
ll t;
int q;
ll a[100000];
int d[100000];
int x[1000];
int main() {
scanf("%d%lld%d", &n, &t, &q);
rep(i, n) { scanf("%lld%d", &a[i], &d[i]); }
rep(i, q) { scanf("%d", &x[i... | replace | 23 | 24 | 23 | 24 | TLE | |
p00545 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using LL = long long;
int main() {
int N, T, Q;
cin >> N >> T >> Q;
vector<LL> A(N), D(N);
set<LL> s[2];
for (auto i = 0; i < N; ++i) {
cin >> A[i] >> D[i];
s[--D[i]].emplace(A[i]);
}
s[0].emplace(-2e18);
s[1].emplace(2e18);
for (auto q = 0; q ... | #include <bits/stdc++.h>
using namespace std;
using LL = long long;
int main() {
LL N, T, Q;
cin >> N >> T >> Q;
vector<LL> A(N), D(N);
set<LL> s[2];
for (auto i = 0; i < N; ++i) {
cin >> A[i] >> D[i];
s[--D[i]].emplace(A[i]);
}
s[0].emplace(-2e18);
s[1].emplace(2e18);
for (auto q = 0; q <... | replace | 6 | 7 | 6 | 7 | 0 | |
p00545 | C++ | Runtime Error | #include <stdio.h>
int main() {
int N, Q, flag = 0;
long long int T, A[10000], D[10000], X[10000];
scanf("%d %lld %d", &N, &T, &Q);
for (int i = 1; i <= N; i++) {
scanf("%lld %lld", &A[i], &D[i]);
}
for (int i = 1; i <= Q; i++) {
scanf("%lld", &X[i]);
}
for (int i = 1; i <= Q; i++) {
if (D[... | #include <stdio.h>
int main() {
int N, Q, flag = 0;
long long int T, A[100000], D[100000], X[100000];
scanf("%d %lld %d", &N, &T, &Q);
for (int i = 1; i <= N; i++) {
scanf("%lld %lld", &A[i], &D[i]);
}
for (int i = 1; i <= Q; i++) {
scanf("%lld", &X[i]);
}
for (int i = 1; i <= Q; i++) {
if ... | replace | 4 | 5 | 4 | 5 | 0 | |
p00546 | C++ | Runtime Error | #include <bits/stdc++.h>
#define int long long int
#define rep(a, b, c) for (int a = b; a < c; a++)
#define repm(a, b, c) for (int a = (b - 1); a >= c; a--)
#define pb push_back
#define str string
#define sf(a) scanfs("%d", &a)
#define pb push_back
#define mp make_pair
#define Fi first
#define Se second
#define ALL(v)... | #include <bits/stdc++.h>
#define int long long int
#define rep(a, b, c) for (int a = b; a < c; a++)
#define repm(a, b, c) for (int a = (b - 1); a >= c; a--)
#define pb push_back
#define str string
#define sf(a) scanfs("%d", &a)
#define pb push_back
#define mp make_pair
#define Fi first
#define Se second
#define ALL(v)... | replace | 117 | 119 | 117 | 120 | 0 | |
p00546 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
typedef double db;
struct edge {
ll to;
ll cost;
};
ll N, M, K, S;
ll Pa... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
typedef double db;
struct edge {
ll to;
ll cost;
};
ll N, M, K, S;
ll Pa... | replace | 73 | 74 | 73 | 74 | TLE | |
p00546 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
const ll INF = 1LL << 60;
int main() {
ll n, m, k, t, b[2];
cin >> n >> m >> k >> t >> b[0] >> b[1];
int c[n];
ll d[n];
for (int i = 0; i < n; i++)
c[i] = 1 << 29, d[i] = INF;
queue<int> que2;
for (int i = 0; ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
const ll INF = 1LL << 60;
int main() {
ll n, m, k, t, b[2];
cin >> n >> m >> k >> t >> b[0] >> b[1];
int c[n];
ll d[n];
for (int i = 0; i < n; i++)
c[i] = 1 << 29, d[i] = INF;
queue<int> que2;
for (int i = 0; ... | replace | 54 | 55 | 54 | 55 | TLE | |
p00546 | C++ | Time Limit Exceeded | /* template.cpp [[[ */
#include <bits/stdc++.h>
using namespace std;
#define get_macro(a, b, c, d, name, ...) name
#define rep(...) get_macro(__VA_ARGS__, rep4, rep3, rep2, rep1)(__VA_ARGS__)
#define rrep(...) \
get_macro(__VA_ARGS__, rrep4, rrep3, rrep2, r... | /* template.cpp [[[ */
#include <bits/stdc++.h>
using namespace std;
#define get_macro(a, b, c, d, name, ...) name
#define rep(...) get_macro(__VA_ARGS__, rep4, rep3, rep2, rep1)(__VA_ARGS__)
#define rrep(...) \
get_macro(__VA_ARGS__, rrep4, rrep3, rrep2, r... | replace | 84 | 85 | 84 | 86 | TLE | |
p00546 | C++ | Runtime Error | #include <algorithm>
#include <functional>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<ll, int> Pair;
vector<vector<int>> e;
int N, M, S, K;
int P, Q;
int iszombi[100000];
int danger[100000];
ll d[100000];
void bfs() {
queue<Pair> q;
for (int i ... | #include <algorithm>
#include <functional>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<ll, int> Pair;
vector<vector<int>> e;
int N, M, S, K;
int P, Q;
int iszombi[100000];
int danger[100000];
ll d[100000];
void bfs() {
queue<Pair> q;
for (int i ... | replace | 30 | 31 | 30 | 31 | 0 | |
p00546 | C++ | Runtime Error | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <vector>
#define INF (1LL << 60)
#define ll long long
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
ll N, M, K, S;
cin >> N >> M >> K >> S;
ll P, Q;
cin >> P >> Q;
vector<vect... | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <vector>
#define INF (1LL << 60)
#define ll long long
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
ll N, M, K, S;
cin >> N >> M >> K >> S;
ll P, Q;
cin >> P >> Q;
vector<vect... | replace | 17 | 18 | 17 | 18 | 0 | |
p00546 | C++ | Time Limit Exceeded | #include <iostream>
#include <queue>
#include <set>
#include <vector>
using namespace std;
#define INF (1000000000000000000LL)
typedef pair<long long, int> PLLI;
int main() {
int N, M, K, S;
cin >> N >> M >> K >> S;
long long P, Q;
cin >> P >> Q;
vector<long long> town(N);
for (int i = 0; i < N; ++i)
... | #include <iostream>
#include <queue>
#include <set>
#include <vector>
using namespace std;
#define INF (1000000000000000000LL)
typedef pair<long long, int> PLLI;
int main() {
int N, M, K, S;
cin >> N >> M >> K >> S;
long long P, Q;
cin >> P >> Q;
vector<long long> town(N);
for (int i = 0; i < N; ++i)
... | replace | 83 | 84 | 83 | 84 | TLE | |
p00547 | C++ | Memory Limit Exceeded | #include <algorithm>
#include <iostream>
#include <map>
#include <tuple>
#include <vector>
using namespace std;
struct State {
bool x[3][3];
};
int p[1020][1020], H, W, dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
map<short, int> M[1020][1020];
State slide(int rx, int ry, State S) {
State T;
for (int i = 0; i <... | #include <algorithm>
#include <iostream>
#include <map>
#include <tuple>
#include <vector>
using namespace std;
struct State {
bool x[3][3];
};
int p[1020][1020], H, W, dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
int M[1020][1020][128];
State slide(int rx, int ry, State S) {
State T;
for (int i = 0; i < 9; i++... | replace | 10 | 11 | 10 | 11 | MLE | |
p00547 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
int dp[1002][1002][16];
const int dx[] = {1, 0, -1, 0};
const int dy[] = {0, 1, 0, -1};
int main() {
int H, W;
cin >> H >> W;
for (int i = 0; i < 1002; ++i)
for (int j = 0; j < 1002; ++j)
for (int k = 0; k < 16; ++k) {
dp[i][j][k] = 1e9;
}
... | #include "bits/stdc++.h"
using namespace std;
int dp[1002][1002][16];
const int dx[] = {1, 0, -1, 0};
const int dy[] = {0, 1, 0, -1};
int main() {
int H, W;
cin >> H >> W;
for (int i = 0; i < 1002; ++i)
for (int j = 0; j < 1002; ++j)
for (int k = 0; k < 16; ++k) {
dp[i][j][k] = 1e9;
}
... | replace | 17 | 18 | 17 | 18 | -11 | |
p00548 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll LLINF = 1LL << 60;
int main() {
ll N, M, K;
ll dp[20005];
ll A[20005];
fill_n(dp, 20005, LLINF);
cin >> N >> M >> K;
dp[0] = 0;
for (ll i = 0; i < N; i++)
cin >> A[i];
for (ll i = 0; i < N; i++) {
ll maxv = -1, minv = L... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll LLINF = 1LL << 60;
int main() {
ll N, M, K;
ll dp[20005];
ll A[20005];
fill_n(dp, 20005, LLINF);
cin >> N >> M >> K;
dp[0] = 0;
for (ll i = 0; i < N; i++)
cin >> A[i];
for (ll i = 0; i < N; i++) {
ll maxv = -1, minv = L... | insert | 16 | 16 | 16 | 18 | 0 | |
p00548 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
long long n, m, k, a[20005], dp[20005];
long long solve(long long p) {
if (p > n)
return 1LL << 62;
if (p == n)
return 0;
if (dp[p] >= 1)
return dp[p];
long long p1 = 1LL << 62, p2 = 0, ret = 1LL << 62;
for (int i = p + 1; i <= p + m; i++) {
p1 = m... | #include <bits/stdc++.h>
using namespace std;
long long n, m, k, a[100005], dp[100005];
long long solve(long long p) {
if (p > n)
return 1LL << 62;
if (p == n)
return 0;
if (dp[p] >= 1)
return dp[p];
long long p1 = 1LL << 62, p2 = 0, ret = 1LL << 62;
for (int i = p + 1; i <= p + m; i++) {
p1 =... | replace | 2 | 3 | 2 | 3 | 0 | |
p00548 | 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" > "D:... | #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" > "D:... | replace | 14 | 15 | 14 | 17 | -11 | |
p00548 | C++ | Runtime Error | #include <stdio.h>
#include <stdlib.h>
#define inf 10e18
typedef long long ll;
int main(void) {
ll i, j, k, n, m;
scanf("%lld%lld%lld", &n, &m, &k);
ll a[n], **sum, dp[n];
sum = (ll **)malloc(sizeof(ll *) * (n + 10));
for (i = 0; i < n; ++i)
sum[i] = (ll *)malloc(sizeof(ll) * (m + 10));
for (i = 0; i <... | #include <stdio.h>
#include <stdlib.h>
#define inf 10e18
typedef long long ll;
int main(void) {
ll i, j, k, n, m;
scanf("%lld%lld%lld", &n, &m, &k);
ll a[n], **sum, dp[n];
sum = (ll **)malloc(sizeof(ll *) * (n + 10));
for (i = 0; i < n; ++i)
sum[i] = (ll *)malloc(sizeof(ll) * (m + 10));
for (i = 0; i <... | replace | 19 | 20 | 19 | 20 | 0 | |
p00548 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll N, M, K;
ll A[100005];
ll dp[20005];
const ll INF = 1000000000000000000LL;
ll solve() {
fill(dp, dp + N + 1, INF);
dp[0] = 0;
for (ll i = 1; i <= N; i++) {
ll a = -INF, b = INF;
for (ll j = i - 1; j >= max(0LL, i - M); j--) {
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll N, M, K;
ll A[100005];
ll dp[20005];
const ll INF = 1000000000000000000LL;
ll solve() {
fill(dp, dp + N + 1, INF);
dp[0] = 0;
for (ll i = 1; i <= N; i++) {
ll a = -INF, b = INF;
for (ll j = i - 1; j >= max(0LL, i - M); j--) {
... | replace | 28 | 29 | 28 | 29 | 0 | |
p00548 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define MAX 200001
const int inf = 1e18;
int mn[2][1010], mx[2][1010];
int a[MAX], dp[2][1010];
signed main() {
int n, m, k;
fill((int *)dp, (int *)(dp + 2), inf);
fill((int *)mn, (int *)(mn + 2), inf);
scanf("%lld%lld%lld", &n, &m, &k);
for... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define MAX 200001
const int inf = 1e18;
int mn[2][1010], mx[2][1010];
int a[MAX], dp[2][1010];
signed main() {
int n, m, k;
fill((int *)dp, (int *)(dp + 2), inf);
fill((int *)mn, (int *)(mn + 2), inf);
scanf("%lld%lld%lld", &n, &m, &k);
for... | replace | 19 | 20 | 19 | 20 | 0 | |
p00548 | C++ | Runtime Error | //============================================================================
// Name : JOI.cpp
// Author :2015 ho3
// Version :???11:08
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
... | //============================================================================
// Name : JOI.cpp
// Author :2015 ho3
// Version :???11:08
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
... | replace | 40 | 41 | 40 | 41 | -11 | |
p00548 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
// #define DEBUG
#define int long long
#define INF 1000000000000000000
#define REP(i, n) for (int i = 1; i <= n; i++)
int n, m, k;
int a[20002];
int cs[20002][1002];
int sm[20002];
signed main() {
cin >> n >> m >> k;
REP(i, n) cin >> a[i];
REP(i, n) {
int mx = 0... | #include <bits/stdc++.h>
using namespace std;
// #define DEBUG
#define int long long
#define INF 1000000000000000000
#define REP(i, n) for (int i = 1; i <= n; i++)
int n, m, k;
int a[20002];
int cs[20002][1002];
int sm[20002];
signed main() {
cin >> n >> m >> k;
REP(i, n) cin >> a[i];
REP(i, n) {
int mx = 0... | insert | 19 | 19 | 19 | 21 | -11 | |
p00548 | C++ | Runtime Error | #include <iostream>
#define INF 1e+18
#define int long long
using namespace std;
signed main() {
int n, m, k, a[20000];
int dp[20001][1001];
cin >> n >> m >> k;
for (int i = 0; i <= n; i++) {
for (int j = 0; j <= 1000; j++)
dp[i][j] = INF;
}
dp[0][0] = 0;
dp[0][1000] = 0;
for (int i = 0; i < ... | #include <iostream>
#define INF 1e+18
#define int long long
using namespace std;
signed main() {
int n, m, k, a[20000];
static int dp[20001][1001];
cin >> n >> m >> k;
for (int i = 0; i <= n; i++) {
for (int j = 0; j <= 1000; j++)
dp[i][j] = INF;
}
dp[0][0] = 0;
dp[0][1000] = 0;
for (int i = ... | replace | 7 | 8 | 7 | 8 | -11 | |
p00549 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int N;
string S;
string ns;
const string JOI = "JOI#";
ll IC[100005];
ll JC[100005];
ll dp[10005][4];
ll solve(const string &s) {
memset(dp, 0, sizeof(dp));
dp[0][0] = 1;
for (int i = 0; i < s.size(); i++) {
for (int j = 0; j < 4; j++) {
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int N;
string S;
string ns;
const string JOI = "JOI#";
ll IC[100005];
ll JC[100005];
ll dp[100005][4];
ll solve(const string &s) {
memset(dp, 0, sizeof(dp));
dp[0][0] = 1;
for (int i = 0; i < s.size(); i++) {
for (int j = 0; j < 4; j++) {
... | replace | 11 | 12 | 11 | 12 | 0 | |
p00550 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#inc... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#inc... | insert | 61 | 61 | 61 | 68 | TLE | |
p00550 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define mygc(c) (c) = getchar_unlocked()
#define mypc(c) putchar_unlocked(c)
inline void reader(int &x) {
int k, m = 0;
x = 0;
for (;;) {
mygc(k);
if (k == '-') {
m = 1;
break;
}
if ('0' <= k && k <= '9') {
... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define mygc(c) (c) = getchar_unlocked()
#define mypc(c) putchar_unlocked(c)
inline void reader(int &x) {
int k, m = 0;
x = 0;
for (;;) {
mygc(k);
if (k == '-') {
m = 1;
break;
}
if ('0' <= k && k <= '9') {
... | replace | 71 | 72 | 71 | 72 | 0 | |
p00550 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <math.h>
#include <queue>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define pb push_back
#define fir first
#define sec second
int R[200002];
const int INF = 1001001001;
vector<pair<int, int>> edge[100002];
int d[100002];
int s[100002];
int sans[2... | #include <algorithm>
#include <cstdio>
#include <math.h>
#include <queue>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define pb push_back
#define fir first
#define sec second
int R[200002];
const int INF = 1001001001;
vector<pair<int, int>> edge[100002];
int d[100002];
int s[100002];
int sans[2... | replace | 66 | 67 | 66 | 67 | 0 | |
p00550 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <queue>
#include <unordered_set>
#define DEBUG
using std::endl;
constexpr int32_t INF = 1000000000;
std::unordered_set<int32_t> graph[100000];
int32_t path[100000][2];
int32_t N, M, Q;
int32_t D[100000];
void dij(int32_t s) {
using P = std::pair<int32_t, int32_t>;
... | #include <algorithm>
#include <iostream>
#include <queue>
#include <unordered_set>
#define DEBUG
using std::endl;
constexpr int32_t INF = 1000000000;
std::unordered_set<int32_t> graph[100000];
int32_t path[200000][2];
int32_t N, M, Q;
int32_t D[100000];
void dij(int32_t s) {
using P = std::pair<int32_t, int32_t>;
... | replace | 10 | 11 | 10 | 11 | 0 | |
p00550 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#inc... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#inc... | replace | 63 | 64 | 63 | 64 | 0 | |
p00550 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <queue>
#include <set>
#include <vector>
#pragma warning(disable : 4996)
using namespace std;
FILE *in = freopen("./input.txt", "r", stdin);
FILE *out = freopen("./output.txt", "w", stdout);
const int INF = 999999999;
int N, M, Q;
int main() {
scanf("%d%d%d", &N, &M, &Q... | #include <algorithm>
#include <cstdio>
#include <queue>
#include <set>
#include <vector>
#pragma warning(disable : 4996)
using namespace std;
const int INF = 999999999;
int N, M, Q;
int main() {
scanf("%d%d%d", &N, &M, &Q);
vector<vector<int>> G(N);
vector<int> s(M), t(M);
for (int i = 0; i < M; i++) {
scan... | delete | 7 | 9 | 7 | 7 | -11 | |
p00550 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
vector<int> x[1 << 17], d[1 << 17];
int a[1 << 17], b[1 << 17], ret[1 << 17], ans[1 << 17], n, m, q, dist[1 << 17];
vector<pair<int, int>> y[1 << 17];
map<pair<int, int>, int> M;
int main() {
cin >> n >> m >> q;
for (int i = 1; i <= m; i++) {
cin >> a[i] >> b[i];
... | #include <bits/stdc++.h>
using namespace std;
vector<int> x[1 << 17], d[1 << 17];
int a[1 << 18], b[1 << 18], ret[1 << 17], ans[1 << 18], n, m, q, dist[1 << 17];
vector<pair<int, int>> y[1 << 17];
map<pair<int, int>, int> M;
int main() {
cin >> n >> m >> q;
for (int i = 1; i <= m; i++) {
cin >> a[i] >> b[i];
... | replace | 3 | 4 | 3 | 4 | 0 | |
p00550 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using Int = long long;
signed main() {
cin.tie(0);
ios::sync_with_stdio(0);
Int n, m, q;
cin >> n >> m >> q;
vector<vector<Int>> G(n);
auto T = G;
vector<Int> u(m), v(m);
vector<map<Int, Int>> R(n);
for (Int i = 0; i < m; i++) {
cin >> u[i] >> v[i];
... | #include <bits/stdc++.h>
using namespace std;
using Int = long long;
signed main() {
cin.tie(0);
ios::sync_with_stdio(0);
Int n, m, q;
cin >> n >> m >> q;
vector<vector<Int>> G(n);
auto T = G;
vector<Int> u(m), v(m);
vector<map<Int, Int>> R(n);
for (Int i = 0; i < m; i++) {
cin >> u[i] >> v[i];
... | replace | 46 | 47 | 46 | 47 | TLE | |
p00552 | C++ | Runtime Error | #include <bits/stdc++.h>
#define int long long
using namespace std;
int seg = 1;
class RAQ {
vector<int> dat;
public:
RAQ() : dat(seg * 2 - 1) {}
void add(int a, int b, int x, int k = 0, int l = 0, int r = seg) {
if (b <= l || r <= a)
return;
if (a <= l && r <= b) {
dat[k] += x;
retur... | #include <bits/stdc++.h>
#define int long long
using namespace std;
int seg = 1;
class RAQ {
vector<int> dat;
public:
RAQ() : dat(seg * 2 - 1) {}
void add(int a, int b, int x, int k = 0, int l = 0, int r = seg) {
if (b <= l || r <= a)
return;
if (a <= l && r <= b) {
dat[k] += x;
retur... | replace | 34 | 35 | 34 | 35 | 0 | |
p00554 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
int n, m, a[100], b[100];
cin >> n >> m;
for (int i = 0; i < m; i++) {
cin >> a[i] >> b[i];
}
for (int i = 0; i < m; i++) {
for (int j = 0; j < m; j++) {
if (a[i] > a[j])
swap(a[i], a[j]);
}
}
int ans = 0;
for (int i = 0; i ... | #include <iostream>
using namespace std;
int main() {
int n, m, a[1001], b[1001];
cin >> n >> m;
for (int i = 0; i < m; i++) {
cin >> a[i] >> b[i];
}
for (int i = 0; i < m; i++) {
for (int j = 0; j < m; j++) {
if (a[i] > a[j])
swap(a[i], a[j]);
}
}
int ans = 0;
for (int i = 0; ... | replace | 3 | 4 | 3 | 4 | 0 | |
p00554 | C++ | Runtime Error | // q2.cpp
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include <cassert>
#include <functional>
typedef long long ll;
using namespace std;
#define... | // q2.cpp
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include <cassert>
#include <functional>
typedef long long ll;
using namespace std;
#define... | delete | 46 | 47 | 46 | 46 | 0 | s[i] = 0
s[i] = 0
s[i] = 1
s[i] = 3
|
p00555 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef... | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef... | replace | 73 | 75 | 73 | 75 | 0 | |
p00555 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
bool b[110][110];
int main() {
int n, m, d;
cin >> n >> m >> d;
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
char c;
cin >> c;
b[i][j] = (c == '.');
}
}
int ans = 0;
for (int i = 0; i < n; i++) {
for (int j = 0; j... | #include <bits/stdc++.h>
using namespace std;
bool b[256][256];
int main() {
int n, m, d;
cin >> n >> m >> d;
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
char c;
cin >> c;
b[i][j] = (c == '.');
}
}
int ans = 0;
for (int i = 0; i < n; i++) {
for (int j = 0; j... | replace | 3 | 4 | 3 | 4 | 0 | |
p00556 | C++ | Runtime Error | #include <iostream>
#define INF 1e+9
using namespace std;
int main() {
int n, m, a[100000], cnt[20] = {}, imos[100001][20] = {};
int dp[1 << 20] = {};
cin >> n >> m;
for (int i = 0; i < n; i++) {
cin >> a[i];
a[i]--;
cnt[a[i]]++;
for (int j = 0; j < m; j++)
imos[i + 1][j] = imos[i][j];
... | #include <iostream>
#define INF 1e+9
using namespace std;
int main() {
int n, m, a[100000], cnt[20] = {}, imos[100001][20] = {};
int dp[1 << 20] = {};
cin >> n >> m;
for (int i = 0; i < n; i++) {
cin >> a[i];
a[i]--;
cnt[a[i]]++;
for (int j = 0; j < m; j++)
imos[i + 1][j] = imos[i][j];
... | replace | 20 | 21 | 20 | 21 | -11 | |
p00557 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int H, W;
int M[1000][1000];
int reach[1000][1000];
int x[100000], y[100000];
const int vy[] = {0, 1, 0, -1}, vx[] = {1, 0, -1, 0};
int main() {
scanf("%d %d", &H, &W);
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
scanf("%d", &M[i][j]);
... | #include <bits/stdc++.h>
using namespace std;
int H, W;
int M[1000][1000];
int reach[1000][1000];
int x[1000000], y[1000000];
const int vy[] = {0, 1, 0, -1}, vx[] = {1, 0, -1, 0};
int main() {
scanf("%d %d", &H, &W);
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
scanf("%d", &M[i][j]);
... | replace | 7 | 8 | 7 | 8 | 0 | |
p00557 | C++ | Runtime Error | #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 dx[] = {-1, 0, 0, 1}, dy[] = {0, -1, 1, 0};
int a[1001][1001];
pint p[100002];
int b[100001], c[100001];
int m... | #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 dx[] = {-1, 0, 0, 1}, dy[] = {0, -1, 1, 0};
int a[1001][1001];
pint p[1000002];
int b[1000002], c[1000002];
in... | replace | 10 | 12 | 10 | 12 | 0 | |
p00557 | C++ | Time Limit Exceeded | #define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <functional>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
const int dx[4] = ... | #define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <functional>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
const int dx[4] = ... | replace | 30 | 31 | 30 | 31 | TLE | |
p00558 | C++ | Memory Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
struct st {
int p, d, c, h;
st() {}
st(int p, int d, int c, int h) : p(p), d(d), c(c), h(h) {}
bool operator<(const st &a) const { return d > a.d; }
};
struct edge {
int to, cost;
edge() {}
edge(int to, int cost) : to(to), cost(cost) {}
};
vector<edge> G[10001... | #include <bits/stdc++.h>
using namespace std;
struct st {
int p, d, c, h;
st() {}
st(int p, int d, int c, int h) : p(p), d(d), c(c), h(h) {}
bool operator<(const st &a) const { return d > a.d; }
};
struct edge {
int to, cost;
edge() {}
edge(int to, int cost) : to(to), cost(cost) {}
};
vector<edge> G[10001... | replace | 14 | 15 | 14 | 15 | MLE | |
p00558 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
// #define int long long
#define all(v) begin(v), end(v)
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define reps(i, s, n) for (int i = (int)(s); i < (int)(n); i++)
const int inf = 1 << 25; // 1LL << 55;
const int mod = 1e9 + 7;
struct edge {
int to, cost;
... | #include <bits/stdc++.h>
using namespace std;
// #define int long long
#define all(v) begin(v), end(v)
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define reps(i, s, n) for (int i = (int)(s); i < (int)(n); i++)
const int inf = 1 << 25; // 1LL << 55;
const int mod = 1e9 + 7;
struct edge {
int to, cost;
... | replace | 46 | 47 | 46 | 47 | 0 | |
p00559 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(void) {
ll N, Q, S, T;
cin >> N >> Q >> S >> T;
vector<ll> A(N + 1);
vector<ll> B(N);
for (ll i = 0; i <= N; i++) {
cin >> A[i];
}
for (ll i = 1; i <= N; i++) {
B[i - 1] = A[i] - A[i - 1];
}
ll ans = 0;
for (int ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(void) {
ll N, Q, S, T;
cin >> N >> Q >> S >> T;
vector<ll> A(N + 1);
vector<ll> B(N);
for (ll i = 0; i <= N; i++) {
cin >> A[i];
}
for (ll i = 1; i <= N; i++) {
B[i - 1] = A[i] - A[i - 1];
}
ll ans = 0;
for (int ... | replace | 44 | 45 | 44 | 46 | 0 | |
p00562 | C++ | Memory Limit Exceeded | #include <algorithm>
#include <functional>
#include <iostream>
#include <queue>
#include <vector>
#define PAIR pair<int, int>
using namespace std;
class point {
public:
vector<long long> dp;
long long fast;
point() {
dp.resize(5, ((long long)1 << 63) - 1);
fast = 10000000;
}
};
int H, W;
long long A, B,... | #include <algorithm>
#include <functional>
#include <iostream>
#include <queue>
#include <vector>
#define PAIR pair<int, int>
using namespace std;
class point {
public:
vector<long long> dp;
long long fast;
point() {
dp.resize(5, ((long long)1 << 63) - 1);
fast = 10000000;
}
};
int H, W;
long long A, B,... | replace | 158 | 159 | 158 | 159 | MLE | |
p00562 | C++ | Memory Limit Exceeded | #include <iostream>
#include <queue>
#include <vector>
using namespace std;
typedef long long ll;
struct edge {
int to;
ll cost;
};
struct state {
int pos;
ll cost;
};
bool operator<(const state &s1, const state &s2) { return s1.cost > s2.cost; }
int dx[] = {0, 1, 0, -1};
int dy[] = {1, 0, -1, 0};
int H, W, A, ... | #include <iostream>
#include <queue>
#include <vector>
using namespace std;
typedef long long ll;
struct edge {
int to;
ll cost;
};
struct state {
int pos;
ll cost;
};
bool operator<(const state &s1, const state &s2) { return s1.cost > s2.cost; }
int dx[] = {0, 1, 0, -1};
int dy[] = {1, 0, -1, 0};
int H, W, A, ... | replace | 36 | 37 | 36 | 37 | MLE | |
p00570 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
typedef long long int ll;
vector<ll> v;
int main(void) {
vector<ll> v;
int n, k;
ll t[10000];
cin >> n >> k;
for (int i = 0; i < n; i++) {
cin >> t[i];
if (i != 0) {
v.push_back(t[i] - t[i - 1] - 1);
}
}
sor... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
typedef long long int ll;
vector<ll> v;
int main(void) {
vector<ll> v;
int n, k;
ll t[1000000];
cin >> n >> k;
for (int i = 0; i < n; i++) {
cin >> t[i];
if (i != 0) {
v.push_back(t[i] - t[i - 1] - 1);
}
}
s... | replace | 10 | 11 | 10 | 11 | 0 | |
p00570 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
typedef long long int ll;
vector<ll> v;
int main(void) {
vector<ll> v;
int n, k;
ll t[10000];
cin >> n >> k;
for (int i = 0; i < n; i++) {
cin >> t[i];
if (i != 0) {
v.push_back(t[i] - t[i - 1] - 1);
}
}
sor... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
typedef long long int ll;
vector<ll> v;
int main(void) {
vector<ll> v;
int n, k;
ll t[100000];
cin >> n >> k;
for (int i = 0; i < n; i++) {
cin >> t[i];
if (i != 0) {
v.push_back(t[i] - t[i - 1] - 1);
}
}
so... | replace | 10 | 11 | 10 | 11 | 0 | |
p00570 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <math.h>
using namespace std;
int main() {
int temp, n, k, t[100000], m, s[100000];
cin >> n >> k;
m = n;
for (int i = 0; i < n; i++) {
cin >> t[i];
}
for (int i = 0; i < n - 1; i++) {
s[i] = t[i + 1] - t[i] - 1;
}
for (int i = ... | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <math.h>
using namespace std;
int main() {
int temp, n, k, t[100000], m, s[100000];
cin >> n >> k;
m = n;
for (int i = 0; i < n; i++) {
cin >> t[i];
}
for (int i = 0; i < n - 1; i++) {
s[i] = t[i + 1] - t[i] - 1;
}
sort(s, s + ... | replace | 15 | 24 | 15 | 18 | TLE | |
p00571 | C++ | Runtime Error | #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... | replace | 29 | 30 | 29 | 30 | 0 | |
p00572 | C++ | Runtime Error | #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... | replace | 50 | 51 | 50 | 51 | 0 | |
p00586 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
int a, b;
while (1) {
cin >> a >> b;
cout << a + b << endl;
}
return 0;
} | #include <iostream>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
cout << a + b << endl;
}
return 0;
} | replace | 5 | 7 | 5 | 6 | TLE | |
p00586 | C++ | Time Limit Exceeded | #include <cstdio>
using namespace std;
int main(int argc, const char *argv[]) {
// insert code here...
int a, b;
while (scanf("%d %d", &a, &b) != 0) {
printf("%d\n", a + b);
}
return 0;
} | #include <cstdio>
using namespace std;
int main(int argc, const char *argv[]) {
// insert code here...
int a, b;
while (scanf("%d %d", &a, &b) != EOF) {
printf("%d\n", a + b);
}
return 0;
} | replace | 6 | 7 | 6 | 7 | TLE | |
p00586 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main(void) {
int a, b;
while (cin >> a >> b, a + b)
cout << a + b << endl;
} | #include <iostream>
using namespace std;
int main(void) {
int a, b;
while (cin >> a >> b)
cout << a + b << endl;
} | replace | 4 | 5 | 4 | 5 | TLE | |
p00586 | C++ | Time Limit Exceeded | #include <stdio.h>
int main() {
int a, b;
while (scanf("%d %d", &a, &b)) {
printf("%d\n", a + b);
}
return 0;
} | #include <stdio.h>
int main() {
int a, b;
while (scanf("%d %d", &a, &b) != EOF) {
printf("%d\n", a + b);
}
return 0;
} | replace | 4 | 5 | 4 | 5 | TLE | |
p00586 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
int a, b;
while (true) {
cin >> a >> b;
cout << a + b << endl;
}
return 0;
} | #include <iostream>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
cout << a + b << endl;
}
return 0;
} | replace | 5 | 7 | 5 | 6 | TLE | |
p00586 | C++ | Time Limit Exceeded | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
int a, b;
while (scanf("%d %d", &a, &b)) {
for (int i = 0; i < b; i++)
a++;
cout << a << endl;
}
return 0;
} | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
int a, b, c;
while (scanf("%d %d", &a, &b) == 2) {
cout << a + b << endl;
}
return 0;
} | replace | 6 | 11 | 6 | 9 | TLE | |
p00586 | C++ | Time Limit Exceeded | #include <iostream>
#include <string>
using namespace std;
int main() {
while (1) {
int a, b;
std::cin >> a >> b;
std::cout << a + b << '\n';
}
}
| #include <iostream>
#include <string>
using namespace std;
int main() {
int a, b;
while (std::cin >> a >> b) {
std::cout << a + b << '\n';
}
}
| replace | 6 | 9 | 6 | 8 | TLE | |
p00586 | C++ | Time Limit Exceeded | #include <cmath>
#include <iostream>
using namespace std;
int a, b;
int main() {
while (cin >> a >> b) {
int c = 0;
while (c < 100000000 && c + c / 2 != 2)
c++;
cout << a + b + c % 9 - 1 << endl;
}
} | #include <cmath>
#include <iostream>
using namespace std;
int a, b;
int main() {
while (cin >> a >> b) {
int c = 0;
while (c < 10000000 && c + c / 2 != 2)
c++;
cout << a + b + c % 9 - 1 << endl;
}
} | replace | 9 | 10 | 9 | 10 | TLE | |
p00586 | C++ | Time Limit Exceeded | #include <functional>
#include <iostream>
#include <math.h>
#include <queue>
#include <stack>
#include <stdio.h>
#include <string>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
int main() {
stack<int> st; // スタックを宣言+初期化
int a, b, c, d, e, num;
int i, j, k;
int arr[100];
int arr... | #include <functional>
#include <iostream>
#include <math.h>
#include <queue>
#include <stack>
#include <stdio.h>
#include <string>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
int main() {
stack<int> st; // スタックを宣言+初期化
int a, b, c, d, e, num;
int i, j, k;
int arr[100];
int arr... | replace | 27 | 35 | 27 | 28 | TLE | |
p00586 | Python | Time Limit Exceeded | x = input()
while x:
a, b = x.split(" ")
print(int(a) + int(b))
| import sys
for line in sys.stdin:
if line == None or line == "/n":
break
a, b = line.split(" ")
print(int(a) + int(b))
| replace | 0 | 3 | 0 | 6 | TLE | |
p00587 | C++ | Runtime Error | #include <iostream>
#include <vector>
using namespace std;
struct Node {
Node *ch[2];
Node() { ch[0] = ch[1] = NULL; }
};
void build(Node *node, const string &s, int &i) {
if (s[i] == '(') {
i++; // (
node->ch[0] = new Node();
build(node->ch[0], s, i);
i++; // ,
node->ch[1] = new Node();
... | #include <iostream>
#include <vector>
using namespace std;
struct Node {
Node *ch[2];
Node() { ch[0] = ch[1] = NULL; }
};
void build(Node *node, const string &s, int &i) {
if (s[i] == '(') {
i++; // (
node->ch[0] = new Node();
build(node->ch[0], s, i);
i++; // ,
node->ch[1] = new Node();
... | replace | 50 | 51 | 50 | 51 | 0 | |
p00587 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <limits.h>
#include <queue>
#include <string>
// typedef pair<int,int> P;
using namespace std;
const int INF = INT_MAX / 3;
const int N = 1000;
int heap[N];
string output;
void parse(string &s, int id) {
// cout<<s<<":"<<id<<endl;
if (s.empty())
return;
... | #include <algorithm>
#include <iostream>
#include <limits.h>
#include <queue>
#include <string>
// typedef pair<int,int> P;
using namespace std;
const int INF = INT_MAX / 3;
const int N = 1000;
int heap[N];
string output;
void parse(string &s, int id) {
// cout<<s<<":"<<id<<endl;
if (s.empty())
return;
... | replace | 23 | 24 | 23 | 26 | 0 | |
p00588 | C++ | Runtime Error | #include <iostream>
#include <string>
using namespace std;
int main() {
int T, N;
cin >> T;
while (T--) {
cin >> N;
int book[128] = {0};
for (int k = 0; k < 2; k++) {
string str;
char c;
for (int i = 0; i < 2 * N; i++) {
cin >> c;
str += c;
}
str = "N" +... | #include <iostream>
#include <string>
using namespace std;
int main() {
int T, N;
cin >> T;
while (T--) {
cin >> N;
int book[10005] = {0};
for (int k = 0; k < 2; k++) {
string str;
char c;
for (int i = 0; i < 2 * N; i++) {
cin >> c;
str += c;
}
str = "N"... | replace | 9 | 10 | 9 | 10 | 0 | |
p00590 | C++ | Time Limit Exceeded | #include <iostream>
#include <vector>
#define MAX 10001
using namespace std;
bool prime[MAX];
void isPrime() {}
int main(void) {
// isPrime();
fill(prime, prime + MAX, true);
prime[0] = prime[1] = false;
for (int i = 0; i < MAX; i++)
if (prime[i])
for (int j = i + i; j < MAX; j += i)
prime[j]... | #include <iostream>
#include <vector>
#define MAX 10001
using namespace std;
bool prime[MAX];
void isPrime() {}
int main(void) {
// isPrime();
fill(prime, prime + MAX, true);
prime[0] = prime[1] = false;
for (int i = 0; i < MAX; i++)
if (prime[i])
for (int j = i + i; j < MAX; j += i)
prime[j]... | insert | 19 | 19 | 19 | 21 | TLE | |
p00590 | C++ | Runtime Error | #include <iostream>
#define LEN 10000
using namespace std;
int prime_pair(int N);
int is_prime(int p);
int prime_list(int MAX);
int prime[LEN];
int main(void) {
int input;
int j = 0;
prime_list(LEN);
while (cin >> input) {
cout << prime_pair(input) << endl;
}
return 0;
}
int prime_list(int MAX) {
i... | #include <iostream>
#define LEN 10000
using namespace std;
int prime_pair(int N);
int is_prime(int p);
int prime_list(int MAX);
int prime[LEN];
int main(void) {
int input;
int j = 0;
prime_list(LEN);
while (cin >> input) {
cout << prime_pair(input) << endl;
}
return 0;
}
int prime_list(int MAX) {
i... | replace | 42 | 46 | 42 | 44 | 0 | |
p00590 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace s... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace s... | replace | 39 | 40 | 39 | 40 | TLE | |
p00590 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll prime(ll x) {
ll i;
if (x < 2)
return 0;
else if (x == 2)
return 1;
if (x % 2 == 0)
return 0;
for (i = 3; i * i <= x; i += 2) {
if (x % i == 0)
return 0;
}
return 1;
}
int main() {
int N;
while (cin >> N, N) {... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll prime(ll x) {
ll i;
if (x < 2)
return 0;
else if (x == 2)
return 1;
if (x % 2 == 0)
return 0;
for (i = 3; i * i <= x; i += 2) {
if (x % i == 0)
return 0;
}
return 1;
}
int main() {
int N;
while (cin >> N) {
... | replace | 19 | 20 | 19 | 20 | TLE | |
p00591 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
// #define int long long
#define DEBUG 1
#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(a) (a).begin(), (a).end()
#define dump(o) \
i... | #include "bits/stdc++.h"
using namespace std;
// #define int long long
#define DEBUG 0
#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(a) (a).begin(), (a).end()
#define dump(o) \
i... | replace | 4 | 5 | 4 | 5 | 0 | r 1061109567 1061109567 1061109567 1061109567 1061109567 1061109567 1061109567 1061109567 1061109567 1061109567 1061109567 1061109567 1061109567 1061109567 1061109567 1061109567 1061109567 1061109567 1061109567 1061109567 1061109567 1061109567 1061109567 1061109567 1061109567 1061109567 1061109567 1061109567 1061109567... |
p00594 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cstdio>
#include <iostream>
using namespace std;
int getInt() {
int ret = 0, c;
c = getchar();
while (!isdigit(c))
c = getchar();
while (isdigit(c)) {
ret *= 10;
ret += c - '0';
c = getchar();
}
return ret;
}
const int mod = 109;
int cnt[mod];
int main() {
... | #include <algorithm>
#include <cstdio>
#include <iostream>
using namespace std;
int getInt() {
int ret = 0, c;
c = getchar();
while (!isdigit(c))
c = getchar();
while (isdigit(c)) {
ret *= 10;
ret += c - '0';
c = getchar();
}
return ret;
}
const int mod = 109;
int cnt[mod];
int main() {
... | replace | 36 | 39 | 36 | 38 | TLE | |
p00594 | C++ | Time Limit Exceeded | #include <stdio.h>
int main() {
int n, now, last, a[1000000];
while (1) {
scanf("%d%d", &n, &a[0]);
now = 1;
last = a[0];
for (int i = 1; i < n; i++) {
scanf("%d", &a[i]);
if (now == 0) {
last = a[i];
now++;
} else if (last != a[i]) {
now--;
} else
... | #include <stdio.h>
int main() {
int n, now, last, a[1000000];
while (1) {
scanf("%d%d", &n, &a[0]);
if (n == 0)
return 0;
now = 1;
last = a[0];
for (int i = 1; i < n; i++) {
scanf("%d", &a[i]);
if (now == 0) {
last = a[i];
now++;
} else if (last != a[i]) {... | insert | 5 | 5 | 5 | 7 | TLE | |
p00594 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
while (1) {
cin >> a;
map<int, int> mp;
int ans = -1;
for (int i = 0; i < a; i++) {
cin >> b;
mp[b]++;
if (mp[b] > (a / 2))
ans = b;
}
if (ans == -1)
cout << "NO COLOR" << endl;
else
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
while (1) {
cin >> a;
if (a == 0)
break;
map<int, int> mp;
int ans = -1;
for (int i = 0; i < a; i++) {
cin >> b;
mp[b]++;
if (mp[b] > (a / 2))
ans = b;
}
if (ans == -1)
cout << "N... | insert | 8 | 8 | 8 | 10 | TLE | |
p00595 | C++ | Runtime Error | #include <iostream>
using namespace std;
int gcm(int a, int b) {
if (a > b) {
int tmp = a;
a = b;
b = tmp;
cerr << 'a' << endl;
}
for (int i = 1;; ++i) {
if (a % i == 0 and b % (a / i) == 0) {
return a / i;
}
}
}
int main(void) {
int a, b;
while (cin >> a >> b) {
cout <<... | #include <iostream>
using namespace std;
int gcm(int a, int b) {
if (a > b) {
int tmp = a;
a = b;
b = tmp;
}
for (int i = 1;; ++i) {
if (a % i == 0 and b % (a / i) == 0) {
return a / i;
}
}
}
int main(void) {
int a, b;
while (cin >> a >> b) {
cout << gcm(a, b) << endl;
}
... | delete | 8 | 9 | 8 | 8 | 0 | a
|
p00595 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
int pgcd(int a, int b) { return b == 0 ? a : pgcd(b % a, a); }
int main() {
int a, b;
while (cin >> a >> b) {
cout << pgcd(a, b) << endl;
}
return 0;
} | #include <algorithm>
#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
int pgcd(int a, int b) { return a == 0 ? b : pgcd(b % a, a); }
int main() {
int a, b;
while (cin >> a >> b) {
cout << pgcd(a, b) << endl;
}
return 0;
} | replace | 7 | 8 | 7 | 8 | -8 | |
p00595 | C++ | Time Limit Exceeded | #include <cstdio>
#include <iostream>
using namespace std;
unsigned int euclid(unsigned int a, unsigned int b) {
if (b == 0)
return a;
return euclid(b, a % b);
}
int main(void) {
unsigned int a, b;
while (scanf("%u %u", &a, &b) != 0)
cout << euclid(a, b) << endl;
return 0;
} | #include <cstdio>
#include <iostream>
using namespace std;
unsigned int euclid(unsigned int a, unsigned int b) {
if (b == 0)
return a;
return euclid(b, a % b);
}
int main(void) {
unsigned int a, b;
while (fscanf(stdin, "%u %u", &a, &b) != EOF)
cout << euclid(a, b) << endl;
return 0;
} | replace | 12 | 13 | 12 | 13 | TLE | |
p00595 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
long long int n, m, a, b, c;
while (cin >> n >> m) {
a = max(n, m);
b = min(n, m);
c = a % b;
a = b;
b = c;
while (a % b != 0) {
c = a % b;
a = b;
b = c;
}
cout << b << endl;
}
} | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
long long int n, m, a, b, c;
while (cin >> n >> m) {
a = max(n, m);
b = min(n, m);
while (b != 0 && a % b != 0) {
c = a % b;
a = b;
b = c;
}
cout << b << endl;
}
} | replace | 11 | 15 | 11 | 13 | 0 | |
p00595 | C++ | Time Limit Exceeded | #include <iostream>
int eucgcd(int m, int n) {
int p = m % n;
while (p > 0) {
m = n;
n = p;
p = m % n;
}
return n;
}
int main() {
int m, n;
while (std::cin >> m >> n, (m != EOF && n != EOF)) {
if (m >= n)
std::cout << eucgcd(m, n) << std::endl;
else
std::cout << eucgcd(n... | #include <iostream>
int eucgcd(int m, int n) {
int p = m % n;
while (p > 0) {
m = n;
n = p;
p = m % n;
}
return n;
}
int main() {
int m, n;
while (std::cin >> m >> n && m && n) {
if (m >= n)
std::cout << eucgcd(m, n) << std::endl;
else
std::cout << eucgcd(n, m) << std::e... | replace | 17 | 18 | 17 | 18 | TLE | |
p00595 | C++ | Time Limit Exceeded | #include <stdio.h>
int gcd(int x, int y) { return x < y ? gcd(y, x) : y ? gcd(y, x - y) : x; }
int main(void) {
int x, y;
while (scanf("%d", &x), x != EOF) {
scanf("%d", &y);
printf("%d\n", gcd(x, y));
}
return 0;
} | #include <stdio.h>
int gcd(int x, int y) { return x < y ? gcd(y, x) : y ? gcd(y, x - y) : x; }
int main(void) {
int x, y;
while (scanf("%d%d", &x, &y) != EOF) {
printf("%d\n", gcd(x, y));
}
return 0;
} | replace | 7 | 9 | 7 | 8 | TLE | |
p00595 | C++ | Time Limit Exceeded | #include <cstdio>
#include <iostream>
using namespace std;
void change(int *, int *);
int main(void) {
int x, y;
while (1) {
scanf("%d %d", &x, &y);
if (x == 0 && y == 0)
break;
if (x < y)
change(&x, &y);
while (y) {
x %= y;
change(&x, &y);
}
cout << x << endl;
... | #include <cstdio>
#include <iostream>
using namespace std;
void change(int *, int *);
int main(void) {
int x, y;
while (scanf("%d %d", &x, &y) != EOF) {
if (x == 0 && y == 0)
break;
if (x < y)
change(&x, &y);
while (y) {
x %= y;
change(&x, &y);
}
cout << x << endl;
... | replace | 10 | 12 | 10 | 11 | TLE | |
p00596 | 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 | 71 | 72 | 71 | 72 | -11 | |
p00597 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#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
#... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#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
#... | replace | 29 | 30 | 29 | 30 | TLE | |
p00597 | C++ | Runtime Error | #include <iostream>
using namespace std;
int n, f[33];
int main() {
f[1] = 1, f[2] = 2, f[3] = 5;
for (int i = 4; i <= 30; i++) {
if (i & 1) {
f[i] = 4;
for (int j = 1; j < i / 2; j++)
f[i] *= 3;
f[i] += f[i - 2];
} else {
f[i] = 1;
for (int j = 1; j < i / 2; i++)
... | #include <iostream>
using namespace std;
int n, f[33];
int main() {
f[1] = 1, f[2] = 2, f[3] = 5;
for (int i = 4; i <= 30; i++) {
if (i & 1) {
f[i] = 4;
for (int j = 1; j < i / 2; j++)
f[i] *= 3;
f[i] += f[i - 2];
} else {
f[i] = 1;
for (int j = 1; j < i / 2; j++)
... | replace | 13 | 14 | 13 | 14 | -11 | |
p00598 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef vector<int> V;
V A[10], U;
string S;
V Union(V a, V b) {
for (int i = 0; i < (int)b.size(); i++)
a.push_back(b[i]);
sort(a.begin(), a.end());
a.erase(unique(a.begin(), a.end()), a.end());
return a;
}
V Inter(V a, V b) {
V res;
int n = a.size(), m =... | #include <bits/stdc++.h>
using namespace std;
typedef vector<int> V;
V A[10], U;
string S;
V Union(V a, V b) {
for (int i = 0; i < (int)b.size(); i++)
a.push_back(b[i]);
sort(a.begin(), a.end());
a.erase(unique(a.begin(), a.end()), a.end());
return a;
}
V Inter(V a, V b) {
V res;
int n = a.size(), m =... | delete | 107 | 108 | 107 | 107 | -6 | a7fec1d8-f7f0-4f97-a6c4-7d85e2638645.out: /home/alex/Documents/bug-detection/input/Project_CodeNet/data/p00598/C++/s320133090.cpp:89: int main(): Assertion `'A'<=ch&&ch<='E'' failed.
|
p00600 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#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) < (i... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#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) < (i... | replace | 28 | 29 | 28 | 29 | 0 | |
p00601 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cstring>
#include <iostream>
#include <vector>
using namespace std;
const int MAX_V = 10001;
int n, m;
vector<int> G[MAX_V];
bool used[MAX_V];
int mark[MAX_V];
int res;
void dfs(int s, int cnt) {
if (s == n) {
bool ok = true;
// 全てがmarkされているか
for (int i = 0; i < n; i++) {
... | #include <algorithm>
#include <cstring>
#include <iostream>
#include <vector>
using namespace std;
const int MAX_V = 10001;
int n, m;
vector<int> G[MAX_V];
bool used[MAX_V];
int mark[MAX_V];
int res;
void dfs(int s, int cnt) {
if (cnt >= res)
return;
if (s == n) {
bool ok = true;
// 全てがmarkされているか
... | insert | 14 | 14 | 14 | 16 | TLE | |
p00601 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace ... | #include <algorithm>
#include <bitset>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace ... | replace | 30 | 32 | 30 | 33 | TLE | |
p00601 | C++ | Time Limit Exceeded | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <vector>
using namespace std;
typedef ve... | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <vector>
using namespace std;
typedef ve... | replace | 49 | 50 | 49 | 50 | TLE | |
p00602 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <vector>
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define REP(i, j) FOR(i, 0, j)
#define mp std::make_pair
typedef long long ll;
typedef unsigned long long u... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <vector>
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define REP(i, j) FOR(i, 0, j)
#define mp std::make_pair
typedef long long ll;
typedef unsigned long long u... | insert | 46 | 46 | 46 | 52 | 0 | |
p00603 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define REP(i, a, b) for (int i = a; i < b; i++)
#define rep(i, n) REP(i, 0, n)
int main() {
int N, R;
while (cin >> N >> R) {
queue<int> A, B, C;
rep(i, N) { C.push(i); }
rep(_, R) {
int c;
cin >> c;
rep(i, N) {
if (N / 2 <= i)... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, a, b) for (int i = a; i < b; i++)
#define rep(i, n) REP(i, 0, n)
int main() {
int N, R;
while (cin >> N >> R) {
queue<int> A, B, C;
rep(i, N) { C.push(i); }
rep(_, R) {
int c;
cin >> c;
rep(i, N) {
if (N / 2 <= i)... | replace | 25 | 26 | 25 | 26 | 0 | |
p00603 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace ... | #include <algorithm>
#include <bitset>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace ... | replace | 31 | 47 | 31 | 44 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.