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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p00603 | C++ | Time Limit Exceeded | #include <algorithm>
#include <queue>
#include <stdio.h>
using namespace std;
int now[60];
int main() {
int a, b;
while (~scanf("%d%d", &a, &b), a) {
queue<int> A;
queue<int> B;
queue<int> C;
for (int i = 0; i < a; i++)
now[i] = i;
while (b--) {
int c;
scanf("%d", &c);
fo... | #include <algorithm>
#include <queue>
#include <stdio.h>
using namespace std;
int now[60];
int main() {
int a, b;
while (~scanf("%d%d", &a, &b)) {
queue<int> A;
queue<int> B;
queue<int> C;
for (int i = 0; i < a; i++)
now[i] = i;
while (b--) {
int c;
scanf("%d", &c);
for (... | replace | 7 | 8 | 7 | 8 | TLE | |
p00603 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
vector<int> RiffleShuffle(int, vector<int>);
int main() {
int i, n, r, c;
vector<int> data;
while (cin >> n >> r) {
for (i = 0; i < n; ++i)
data.push_back(i);
for (i = 0; i < r; ++i) {
cin >> c;
data = R... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
vector<int> RiffleShuffle(int, vector<int>);
int main() {
int i, n, r, c;
vector<int> data;
while (cin >> n >> r) {
for (i = 0; i < n; ++i)
data.push_back(i);
for (i = 0; i < r; ++i) {
cin >> c;
data = R... | replace | 34 | 38 | 34 | 40 | 0 | |
p00604 | C++ | Memory Limit Exceeded | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int n;
vector<int> time(n);
while (cin >> n) {
time.clear();
for (int i = 0; i < n; i++) {
int t;
cin >> t;
time.push_back(t);
}
sort(time.begin(), time.end());
int sum = 0;
for... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int n;
vector<int> time;
while (cin >> n) {
time.clear();
for (int i = 0; i < n; i++) {
int t;
cin >> t;
time.push_back(t);
}
sort(time.begin(), time.end());
int sum = 0;
for (i... | replace | 7 | 8 | 7 | 8 | MLE | |
p00605 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
int N, K;
while (cin >> N >> K, N || K) {
int s[N];
for (int i = 0; i < K; i++) {
cin >> s[i];
}
int temp;
bool flag = true;
for (int j = 0; j < N; j++) {
for (int i = 0; i < K; i++) {
cin >> temp;
s[i] -= tem... | #include <iostream>
using namespace std;
int main() {
int N, K;
while (cin >> N >> K, N || K) {
int s[K];
for (int i = 0; i < K; i++) {
cin >> s[i];
}
int temp;
bool flag = true;
for (int j = 0; j < N; j++) {
for (int i = 0; i < K; i++) {
cin >> temp;
s[i] -= tem... | replace | 6 | 7 | 6 | 7 | 0 | |
p00605 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define pb(n) push_back(n)
#... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define pb(n) push_back(n)
#... | replace | 49 | 50 | 49 | 50 | 0 | |
p00605 | C++ | Runtime Error | #include <iostream>
#include <string>
using namespace std;
int main() {
while (true) {
int N, K;
string ans = "Yes";
cin >> N >> K;
int S[N];
if (N == 0 && K == 0)
break;
for (int i = 0; i < K; ++i) {
cin >> S[i];
}
for (int i = 0; i < N; ++i) {
for (int j = 0; j < ... | #include <iostream>
#include <string>
using namespace std;
int main() {
while (true) {
int N, K;
string ans = "Yes";
cin >> N >> K;
int S[K];
if (N == 0 && K == 0)
break;
for (int i = 0; i < K; ++i) {
cin >> S[i];
}
for (int i = 0; i < N; ++i) {
for (int j = 0; j < ... | replace | 10 | 11 | 10 | 11 | 0 | |
p00605 | C++ | Runtime Error | #include <iostream>
using namespace std;
int n, m, x, s[100];
int main() {
while (cin >> n >> m, n + m) {
for (int i = 0; i < m; i++)
cin >> s[i];
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++)
cin >> x, s[x]--;
}
int f = 1;
for (int i = 0; i < m; i++) {
if (s[... | #include <iostream>
using namespace std;
int n, m, x, s[100];
int main() {
while (cin >> n >> m, n + m) {
for (int i = 0; i < m; i++)
cin >> s[i];
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++)
cin >> x, s[j] -= x;
}
int f = 1;
for (int i = 0; i < m; i++) {
if ... | replace | 9 | 10 | 9 | 10 | 0 | |
p00606 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define all(v) (v).begin(), (v).end()
#d... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define all(v) (v).begin(), (v).end()
#d... | replace | 48 | 49 | 48 | 49 | 0 | |
p00606 | C++ | Time Limit Exceeded | #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... | replace | 52 | 53 | 52 | 53 | TLE | |
p00608 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <cctype>
#include <cstdint>
#include <cstdio>
#include <string>
#include <vector>
#define fprintf(...) (void)0
int parse_int(std::string &s, size_t &i) {
assert(isdigit(s[i]));
int res = s[i++] - '0';
while (isdigit(s[i])) {
res = res * 10 + s[i++] - '0';
}... | #include <algorithm>
#include <cassert>
#include <cctype>
#include <cstdint>
#include <cstdio>
#include <string>
#include <vector>
#define fprintf(...) (void)0
int parse_int(std::string &s, size_t &i) {
assert(isdigit(s[i]));
int res = s[i++] - '0';
while (isdigit(s[i])) {
res = res * 10 + s[i++] - '0';
}... | replace | 41 | 42 | 41 | 42 | 0 | |
p00608 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
typedef long long ll;
const ll inf = 1e15;
int h, w, n;
string g[10];
char c[10];
bool use[10];
int l[10][10], r[10][10], u[10][10], d[10][10];
inline bool valid(const string &s) {
rep(i, s.size()) {
if (s[i] == ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
typedef long long ll;
const ll inf = 1e15;
int h, w, n;
string g[10];
char c[10];
bool use[10];
int l[10][10], r[10][10], u[10][10], d[10][10];
inline bool valid(const string &s) {
rep(i, s.size()) {
if (s[i] == ... | insert | 23 | 23 | 23 | 25 | 0 | |
p00608 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <cctype>
#include <cstdint>
#include <cstdio>
#include <string>
#include <vector>
constexpr int tsurai = 123456789;
int parse_int(const std::string &s, size_t &i) {
assert(isdigit(s[i]));
int res = s[i] - '0';
while (++i < s.length() && isdigit(s[i])) {
res =... | #include <algorithm>
#include <cassert>
#include <cctype>
#include <cstdint>
#include <cstdio>
#include <string>
#include <vector>
constexpr int tsurai = 123456789;
int parse_int(const std::string &s, size_t &i) {
assert(isdigit(s[i]));
int res = s[i] - '0';
while (++i < s.length() && isdigit(s[i])) {
res =... | replace | 54 | 55 | 54 | 55 | 0 | |
p00609 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespac... | #include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespac... | replace | 23 | 24 | 23 | 24 | TLE | |
p00609 | C++ | Time Limit Exceeded | #include <algorithm>
#include <assert.h>
#include <iostream>
#include <math.h>
#include <set>
#include <stdio.h>
#include <string.h>
#include <vector>
using namespace std;
typedef long long ll;
static const double EPS = 1e-9;
static const double PI = acos(-1.0);
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#d... | #include <algorithm>
#include <assert.h>
#include <iostream>
#include <math.h>
#include <set>
#include <stdio.h>
#include <string.h>
#include <vector>
using namespace std;
typedef long long ll;
static const double EPS = 1e-9;
static const double PI = acos(-1.0);
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#d... | replace | 70 | 72 | 70 | 72 | TLE | |
p00609 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <vector>
using namespace std;
int main() {
int a, b, R;
while (cin >> a >> b >> R, a || b) {
vector<long long int> A_x(a), A_y(a);
for (int i = 0; i < a; ++i)
cin >> A_x[i] >> A_y[i];
vector<vector<long long int>> M(... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <vector>
using namespace std;
int main() {
int a, b, R;
while (cin >> a >> b >> R, a || b) {
vector<long long int> A_x(a), A_y(a);
for (int i = 0; i < a; ++i)
cin >> A_x[i] >> A_y[i];
vector<vector<long long int>> M(... | replace | 23 | 24 | 23 | 25 | -11 | |
p00609 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define MAX 10005
set<int> G[MAX];
int n, m, x, y, R;
int main() {
while (1) {
scanf("%d %d %d", &n, &m, &R);
if (n == 0 && m == 0)
break;
for (int i = 0; i < MAX; i++)
G[i].clear();
for (int i = 0; i < n; i++) {
scanf("%d %d", &x, &y);
... | #include <bits/stdc++.h>
using namespace std;
#define MAX 10005
set<int> G[MAX];
int n, m, x, y, R;
int main() {
while (1) {
scanf("%d %d %d", &n, &m, &R);
if (n == 0 && m == 0)
break;
for (int i = 0; i < MAX; i++)
G[i].clear();
for (int i = 0; i < n; i++) {
scanf("%d %d", &x, &y);
... | insert | 23 | 23 | 23 | 26 | 0 | |
p00609 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int A, B, R;
vector<int> P[11000];
bool check(int x, int y, int x1, int y1) {
if ((x1 - x) * (x1 - x) + (y1 - y) * (y1 - y) > 16 * R * R)
return false;
return true;
}
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
while (cin >> A >> B >> R && (A ||... | #include <bits/stdc++.h>
using namespace std;
int A, B, R;
vector<int> P[11000];
bool check(int x, int y, int x1, int y1) {
if ((x1 - x) * (x1 - x) + (y1 - y) * (y1 - y) > 16 * R * R)
return false;
return true;
}
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
while (cin >> A >> B >> R && (A ||... | replace | 34 | 35 | 34 | 35 | -11 | |
p00612 | 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 | 24 | 37 | 24 | 37 | TLE | |
p00613 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
while (1) {
int K, c[10], sum = 0;
cin >> K;
if (0 == K)
break;
for (int i = 0; i < K * (K - 1) / 2; i++) {
cin >> c[i];
sum += c[i];
}
sum = sum / (K - 1);
cout << sum << endl;
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
while (1) {
int K, c[10000], sum = 0;
cin >> K;
if (0 == K)
break;
for (int i = 0; i < K * (K - 1) / 2; i++) {
cin >> c[i];
sum += c[i];
}
sum = sum / (K - 1);
cout << sum << endl;
}
return 0;
}
| replace | 5 | 6 | 5 | 6 | 0 | |
p00613 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
int k, l;
int p = 0;
int i = 0;
int a[101];
while (1) {
cin >> k;
l = k * (k - 1) / 2;
if (k == 0) {
break;
}
for (i = 0; i < l; i++) {
cin >> a[i];
p += a[i];
}
cout << p / (k - 1) << endl;
p = 0;
}
r... | #include <iostream>
using namespace std;
int main() {
int k, l;
int p = 0;
int i = 0;
int a[10000];
while (1) {
cin >> k;
l = k * (k - 1) / 2;
if (k == 0) {
break;
}
for (i = 0; i < l; i++) {
cin >> a[i];
p += a[i];
}
cout << p / (k - 1) << endl;
p = 0;
}
... | replace | 7 | 8 | 7 | 8 | 0 | |
p00614 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define REP(i, a, b) for (int i = a; i < (int)b; i++)
#define rep(i, n) REP(i, 0, n)
int main() {
// cout << 5 * 100000 + 100000 + 5 * 10000 + 10000 + 5 * 1000 + 1000 << endl;
while (1) {
int P, N[7] = {};
scanf("%d", &P);
if (P == 0)
break;
... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, a, b) for (int i = a; i < (int)b; i++)
#define rep(i, n) REP(i, 0, n)
int main() {
// cout << 5 * 100000 + 100000 + 5 * 10000 + 10000 + 5 * 1000 + 1000 << endl;
while (1) {
int P, N[7] = {};
scanf("%d", &P);
if (P == 0)
break;
... | replace | 20 | 21 | 20 | 21 | TLE | |
p00614 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <set>
#include <s... | #include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <set>
#include <s... | replace | 57 | 61 | 57 | 58 | TLE | |
p00614 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <map>
#include <numeric>
#include <string>
#include <vector>
using namespace std;
#define REP(i, n) for (int i = 0; i < (int)(n); ++i)
#define FOR(i, a, b) for (int i = (a); i < (int)(b); ++i)
#define FOREQ(i, a, b... | #include <algorithm>
#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <map>
#include <numeric>
#include <string>
#include <vector>
using namespace std;
#define REP(i, n) for (int i = 0; i < (int)(n); ++i)
#define FOR(i, a, b) for (int i = (a); i < (int)(b); ++i)
#define FOREQ(i, a, b... | replace | 40 | 41 | 40 | 43 | TLE | |
p00614 | C++ | Time Limit Exceeded | #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 | 39 | 45 | 39 | 42 | TLE | |
p00615 | C++ | Runtime Error | #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... | #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 | 27 | 28 | 27 | 28 | 0 | |
p00615 | C++ | Memory Limit Exceeded | #include <cstdio>
#include <iostream>
#define N 10000000
int tl[N];
using namespace std;
void sort(int, int);
int syori(int, int);
int main() {
int n, m, i, ans;
while (1) {
for (i = 0; i < N; i++) {
tl[i] = 0;
}
cin >> n;
cin >> m;
if (m == 0 && n == 0)
break;
for (i = 1; ... | #include <cstdio>
#include <iostream>
#define N 1000000
int tl[N];
using namespace std;
void sort(int, int);
int syori(int, int);
int main() {
int n, m, i, ans;
while (1) {
for (i = 0; i < N; i++) {
tl[i] = 0;
}
cin >> n;
cin >> m;
if (m == 0 && n == 0)
break;
for (i = 1; i... | replace | 2 | 3 | 2 | 3 | MLE | |
p00615 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
using namespace std;
#define FOR(i, b, n) for (int i = (b); i < (n); ++i)
#define rep(i, n) FOR(i, 0, n)
int main() {
int a, b, data[10000];
while (cin >> a >> b, a || b) {
rep(i, a + b) cin >> data[i];
sort(data, data + a + b);
int ans = data[0];
FOR(i, 1, a... | #include <algorithm>
#include <iostream>
using namespace std;
#define FOR(i, b, n) for (int i = (b); i < (n); ++i)
#define rep(i, n) FOR(i, 0, n)
int main() {
int a, b, data[20000];
while (cin >> a >> b, a || b) {
rep(i, a + b) cin >> data[i];
sort(data, data + a + b);
int ans = data[0];
FOR(i, 1, a... | replace | 6 | 7 | 6 | 7 | 0 | |
p00615 | C++ | Runtime Error | #include <cstring>
#include <iostream>
int max(int a, int b) {
if (a > b)
return a;
else
return b;
}
void bsort(int a[], int lim) {
int tmp;
for (int i = 0; i <= lim - 1; i++)
for (int j = lim; i < j; j--) {
if (a[j - 1] > a[j]) {
tmp = a[j];
a[j] = a[j - 1];
a[j - 1... | #include <cstring>
#include <iostream>
int max(int a, int b) {
if (a > b)
return a;
else
return b;
}
void bsort(int a[], int lim) {
int tmp;
for (int i = 0; i <= lim - 1; i++)
for (int j = lim; i < j; j--) {
if (a[j - 1] > a[j]) {
tmp = a[j];
a[j] = a[j - 1];
a[j - 1... | replace | 26 | 27 | 26 | 27 | 0 | |
p00616 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
bool t[3][200][200];
int n, h, x, y;
string s;
int main() {
while (cin >> n >> h && n + h) {
int cnt, ans = 0;
for (int i = 0; i < 3; i++) {
for (int j = 0; j < n; j++)
for (int k = 0; k < n; k++) {
t[i][j]... | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
bool t[3][500][500];
int n, h, x, y;
string s;
int main() {
while (cin >> n >> h && n + h) {
int cnt, ans = 0;
for (int i = 0; i < 3; i++) {
for (int j = 0; j < n; j++)
for (int k = 0; k < n; k++) {
t[i][j]... | replace | 4 | 5 | 4 | 5 | 0 | |
p00618 | C++ | Time Limit Exceeded | // 22:45~
#include <bits/stdc++.h>
using namespace std;
#define dump(...) cout << "# " << #__VA_ARGS__ << '=' << (__VA_ARGS__) << endl
#define repi(i, a, b) for (int i = int(a); i < int(b); i++)
#define peri(i, a, b) for (int i = int(b); i-- > int(a);)
#define rep(i, n) repi(i, 0, n)
#define per(i, n) peri(i, 0, n)
#... | // 22:45~
#include <bits/stdc++.h>
using namespace std;
#define dump(...) cout << "# " << #__VA_ARGS__ << '=' << (__VA_ARGS__) << endl
#define repi(i, a, b) for (int i = int(a); i < int(b); i++)
#define peri(i, a, b) for (int i = int(b); i-- > int(a);)
#define rep(i, n) repi(i, 0, n)
#define per(i, n) peri(i, 0, n)
#... | replace | 81 | 82 | 81 | 84 | TLE | |
p00618 | C++ | Memory Limit Exceeded | #include <algorithm>
#include <cstring>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
struct NODE {
int a, b, c;
NODE(int x, int y, int z) { a = x, b = y, c = z; }
};
#define INF (1 << 21)
int n, U, unit[20];
char done[1 << 20];
int main() {
while (cin >> n >> U, n) {
int grap... | #include <algorithm>
#include <cstring>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
struct NODE {
int a, b, c;
NODE(int x, int y, int z) { a = x, b = y, c = z; }
};
#define INF (1 << 21)
int n, U, unit[20];
char done[1 << 20];
int main() {
while (cin >> n >> U, n) {
int grap... | replace | 42 | 43 | 42 | 44 | MLE | |
p00618 | C++ | Time Limit Exceeded | #include <iostream>
#include <queue>
using namespace std;
struct Data {
int used;
int credit;
};
int n, U, c, k, r;
int credit[20], required[20];
int bitcount(int n) { return n ? (n & 1) + bitcount(n >> 1) : 0; }
int BFS() {
bool visited[1 << 20] = {0};
queue<Data> q;
Data now = {0, 0};
q.push(now);
wh... |
#include <iostream>
#include <queue>
using namespace std;
struct Data {
int used;
int credit;
};
int n, U, c, k, r;
int credit[20], required[20];
int bitcount(int n) { return n ? (n & 1) + bitcount(n >> 1) : 0; }
int BFS() {
bool visited[1 << 20] = {0};
queue<Data> q;
Data now = {0, 0};
q.push(now);
w... | insert | 0 | 0 | 0 | 1 | TLE | |
p00618 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int tani[21];
int needs[21];
// iÌóÔ©çUÈãÌPÊɽÇè
ŬC
int dp[1 << 20];
// s«æ
int U;
int n;
int dfs(int s, int sum) {
if (dp[s] != -1)
return dp[s];
else if (sum >= U) {
dp[s] = 0;
return dp[s];... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int tani[21];
int needs[21];
// iÌóÔ©çUÈãÌPÊɽÇè
ŬC
int dp[1 << 20];
// s«æ
int U;
int n;
int dfs(int s, int sum) {
if (dp[s] != -1)
return dp[s];
else if (sum >= U) {
dp[s] = 0;
return dp[s];... | delete | 72 | 73 | 72 | 72 | TLE | |
p00619 | C++ | Memory Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define EPS (1e-5)
#define equal(a, b) (fabs(a - b) < EPS)
#define lt(a, b) (a - b < -EPS)
#define MAX 252
#define INF (1e9)
#define PI acos(-1)
struct Point {
long double x, y;
Point() {}
Point(long double x, long double y) : x(x), y(y) {}
Point operator+(cons... | #include <bits/stdc++.h>
using namespace std;
#define EPS (1e-5)
#define equal(a, b) (fabs(a - b) < EPS)
#define lt(a, b) (a - b < -EPS)
#define MAX 252
#define INF (1e9)
#define PI acos(-1)
struct Point {
long double x, y;
Point() {}
Point(long double x, long double y) : x(x), y(y) {}
Point operator+(cons... | replace | 67 | 68 | 67 | 68 | MLE | |
p00620 | C++ | Time Limit Exceeded | #include <iostream>
#include <map>
#include <string>
#include <vector>
#define pb push_back
using namespace std;
typedef pair<int, int> P;
int n;
vector<P> rt;
// map<vector<vector<int> >,bool> mp;
int dx[] = {0, 0, 1, -1}, dy[] = {1, -1, 0, 0};
bool inf(int y, int x) {
if (y >= 0 && y < n && x >= 0 && x < n)
ret... | #include <iostream>
#include <map>
#include <string>
#include <vector>
#define pb push_back
using namespace std;
typedef pair<int, int> P;
int n;
vector<P> rt;
// map<vector<vector<int> >,bool> mp;
int dx[] = {0, 0, 1, -1}, dy[] = {1, -1, 0, 0};
bool inf(int y, int x) {
if (y >= 0 && y < n && x >= 0 && x < n)
ret... | replace | 17 | 18 | 17 | 18 | TLE | |
p00620 | C++ | Time Limit Exceeded | #include <iostream>
#include <vector>
using namespace std;
int dx[] = {1, -1, 0, 0};
int dy[] = {0, 0, 1, -1};
int field[8][8] = {{0}};
bool used[8][8] = {{false}};
vector<int> startX, startY;
bool dfs(int n, int x, int y, int r, int k) {
if (r == 0) {
if (k == startX.size()) {
return true;
}
x =... | #include <iostream>
#include <vector>
using namespace std;
int dx[] = {1, -1, 0, 0};
int dy[] = {0, 0, 1, -1};
int field[8][8] = {{0}};
bool used[8][8] = {{false}};
vector<int> startX, startY;
bool dfs(int n, int x, int y, int r, int k) {
if (r == 0) {
if (k == startX.size()) {
return true;
}
x =... | replace | 27 | 32 | 27 | 38 | TLE | |
p00620 | C++ | Time Limit Exceeded | #include <algorithm>
#include <functional>
#include <iostream>
#include <map>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (n); i++)
typedef pair<int, int> Point;
typedef pair<int, Point> SP;
typedef vector<vector<int>> Mat;
int... | #include <algorithm>
#include <functional>
#include <iostream>
#include <map>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (n); i++)
typedef pair<int, int> Point;
typedef pair<int, Point> SP;
typedef vector<vector<int>> Mat;
int... | delete | 73 | 75 | 73 | 73 | TLE | |
p00621 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, a, n) for (int i = a; i < n; i++)
#define all(a) a.begin(), a.end()
#define o(a) cout << a << endl
#define int long long
using namespace std;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> pii;
int d[110], w, q;
int check(int wide) {
int cnt = 0;
rep... | #include <bits/stdc++.h>
#define rep(i, a, n) for (int i = a; i < n; i++)
#define all(a) a.begin(), a.end()
#define o(a) cout << a << endl
#define int long long
using namespace std;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> pii;
int d[110], w, q;
int check(int wide) {
int cnt = 0;
rep... | replace | 20 | 21 | 20 | 21 | TLE | |
p00622 | C++ | Time Limit Exceeded | #include <iostream>
#include <string>
using namespace std;
string t, l, ad, ar, d, r;
int ct, cl;
char cc;
void push_right() {
r += cc;
cc = l[cl++];
}
void push_down() {
d += cc;
cc = t[ct++];
}
bool rec(int s) {
char tmpc;
if (s == t.length() + l.length() - 1) {
int f;
if (d.length() != t.leng... | #include <iostream>
#include <string>
using namespace std;
string t, l, ad, ar, d, r;
int ct, cl;
char cc;
void push_right() {
r += cc;
cc = l[cl++];
}
void push_down() {
d += cc;
cc = t[ct++];
}
bool rec(int s) {
char tmpc;
if (s == t.length() + l.length() - 1) {
int f;
if (d.length() != t.leng... | insert | 39 | 39 | 39 | 41 | TLE | |
p00622 | C++ | Runtime Error | /* 2012-09-03T10:37:02 */
#define DEBUG_ON
#define CONDITION true
using namespace std; /*{{{*/
#include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <iterator... | /* 2012-09-03T10:37:02 */
#define DEBUG_ON_
#define CONDITION true
using namespace std; /*{{{*/
#include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <iterato... | replace | 1 | 2 | 1 | 2 | 0 | [L127] down[nex] = c
[L129] hi = 0
[L130] hor[hi] = c
[L127] down[nex] = C
[L140] vi = 0
[L141] ver[vi] = C
[L127] down[nex] = a
[L129] hi = 1
[L130] hor[hi] = b
[L151] ans = Bb
[L156] ans = BbA
[L161] ans = BbA
[L127] down[nex] = Z
[L129] hi = 0
[L130] hor[hi] = Z
[L151] ans =
[L156] ans = X
[L161] ... |
p00622 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
queue<char> to_queue(string s) {
queue<char> q;
for (int i = 0; i < (int)s.size(); ++i) {
q.push(s[i]);
}
return q;
}
int main() {
string red, green, down;
while (cin >> red, red != "-") {
cin >> green >> down;
queue<char> r, g, d;
r = to_queu... | #include <bits/stdc++.h>
using namespace std;
queue<char> to_queue(string s) {
queue<char> q;
for (int i = 0; i < (int)s.size(); ++i) {
q.push(s[i]);
}
return q;
}
int main() {
string red, green, down;
while (cin >> red, red != "-") {
cin >> green >> down;
queue<char> r, g, d;
r = to_queu... | delete | 25 | 26 | 25 | 25 | 0 | |
p00623 | C++ | Runtime Error | #include <iostream>
#include <string>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
string expr;
int n, sweet[4], s, ans;
int eval(int b, int e) {
if (b + 1 == e)
return sweet[expr[b] - '1'];
int l, o, r, d;
for (o = b, d = 0; o < e; o++) {
char c = expr[o];
if (c == '(')
d+... | #include <iostream>
#include <string>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
string expr;
int n, sweet[10], s, ans;
int eval(int b, int e) {
if (b + 1 == e)
return sweet[expr[b] - '1'];
int l, o, r, d;
for (o = b, d = 0; o < e; o++) {
char c = expr[o];
if (c == '(')
d... | replace | 5 | 6 | 5 | 6 | 0 | |
p00623 | C++ | Runtime Error | #include <ctype.h>
#include <map>
#include <stdio.h>
#include <vector>
typedef std::map<int, int> M;
typedef M::iterator I;
typedef std::pair<int, int> P;
std::vector<P> v;
int x[10];
int F(char *&p, int n) {
if (isdigit(*p))
return -*p + '0';
v.push_back(P(0, 0));
int s = v.size();
v[n].first = F(++p, s);
... | #include <ctype.h>
#include <map>
#include <stdio.h>
#include <vector>
typedef std::map<int, int> M;
typedef M::iterator I;
typedef std::pair<int, int> P;
std::vector<P> v;
int x[10];
int F(char *&p, int n) {
if (isdigit(*p))
return -*p + '0';
v.push_back(P(0, 0));
int s = v.size();
v[n].first = F(++p, s);
... | insert | 39 | 39 | 39 | 40 | 0 | |
p00623 | C++ | Runtime Error | #include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
#ifdef _MSC_VER
#include <agents... | #include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
#ifdef _MSC_VER
#include <agents... | replace | 43 | 46 | 43 | 50 | 0 | |
p00625 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define EQ(a, b) (abs((a) - (b)) < EPS)
using namespace std;
typedef long double D;
const D EPS = 1e-8;
D getTime(D dx, D dy, D v, D fpx, D fpy, D fvx, D fvy) {
D px = fpx - dx, py = fpy - dy;
D a = fvx * fvx + fvy * fvy - v * v;
D b =... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define EQ(a, b) (abs((a) - (b)) < EPS)
using namespace std;
typedef long double D;
const D EPS = 1e-8;
D getTime(D dx, D dy, D v, D fpx, D fpy, D fvx, D fvy) {
D px = fpx - dx, py = fpy - dy;
D a = fvx * fvx + fvy * fvy - v * v;
D b =... | replace | 55 | 57 | 55 | 63 | 0 | |
p00626 | C++ | Memory Limit Exceeded | #include <algorithm>
#include <array>
#include <assert.h>
#include <bitset>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#incl... | #include <algorithm>
#include <array>
#include <assert.h>
#include <bitset>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#incl... | replace | 46 | 47 | 46 | 47 | MLE | |
p00626 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vec... | #include <algorithm>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vec... | replace | 199 | 200 | 199 | 200 | 0 | 6
7
8
9
1
3
4
|
p00627 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
int n;
while (cin >> n, n) {
int s = 0, a;
while (n--) {
cin >> a;
s += a;
}
cout << s << endl;
}
} | #include <iostream>
using namespace std;
int main() {
int n;
while (cin >> n, n) {
int s = 0, a;
while (n) {
n -= 4;
cin >> a;
s += a;
}
cout << s << endl;
}
} | replace | 6 | 7 | 6 | 8 | TLE | |
p00627 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
while (1) {
int n, k[5], ans = 0;
cin >> n;
if (n == 0) {
break;
}
for (int i = 0; i < n / 4; ++i) {
cin >> k[i];
ans += k[i];
}
cout << ans << endl;
}
}
| #include <iostream>
using namespace std;
int main() {
while (1) {
int n, k[100005], ans = 0;
cin >> n;
if (n == 0) {
break;
}
for (int i = 0; i < n / 4; ++i) {
cin >> k[i];
ans += k[i];
}
cout << ans << endl;
}
}
| replace | 4 | 5 | 4 | 5 | 0 | |
p00627 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int n, a, sum;
int main() {
while (true) {
sum = 0;
cin >> n;
n /= 4;
for (int i = 0; i < n; i++) {
cin >> a;
sum += a;
}
cout << sum << endl;
}
return 0;
} | #include <iostream>
using namespace std;
int n, a, sum;
int main() {
while (true) {
sum = 0;
cin >> n;
if (!n) {
break;
}
n /= 4;
for (int i = 0; i < n; i++) {
cin >> a;
sum += a;
}
cout << sum << endl;
}
return 0;
} | insert | 7 | 7 | 7 | 10 | TLE | |
p00627 | C++ | Time Limit Exceeded | #include <algorithm>
#include <climits>
#include <cmath>
#include <iostream>
#include <queue>
#include <stack>
#include <string.h>
#include <vector>
using namespace std;
const int mod = 1000000007;
int main() {
int n;
while (cin >> n, n) {
int a, b;
while (n--) {
cin >> a;
b += a;
}
c... | #include <algorithm>
#include <climits>
#include <cmath>
#include <iostream>
#include <queue>
#include <stack>
#include <string.h>
#include <vector>
using namespace std;
const int mod = 1000000007;
int main() {
int n;
while (cin >> n, n) {
int a = 0, b = 0;
n /= 4;
while (n--) {
cin >> a;
... | replace | 16 | 17 | 16 | 18 | TLE | |
p00627 | C++ | Time Limit Exceeded | #include <stdio.h>
int main(void) {
int s, n, i, x;
while (1) {
scanf("%d", &n);
s = 0;
for (i = 0; i < n / 4; i++) {
scanf("%d", &x);
s += x;
}
printf("%d\n", s);
}
return 0;
} | #include <stdio.h>
int main(void) {
int s, n, i, x;
while (1) {
scanf("%d", &n);
if (!n)
break;
s = 0;
for (i = 0; i < n / 4; i++) {
scanf("%d", &x);
s += x;
}
printf("%d\n", s);
}
return 0;
} | insert | 6 | 6 | 6 | 8 | TLE | |
p00627 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
int n;
for (; cin >> n, n;) {
int sum = 0;
for (;; n = n / 5) {
int tmp;
cin >> tmp;
sum += tmp;
}
cout << sum << endl;
}
} | #include <iostream>
using namespace std;
int main() {
int n;
for (; cin >> n, n;) {
int sum = 0;
for (; n > 0; n = n - 4) {
int tmp;
cin >> tmp;
sum += tmp;
}
cout << sum << endl;
}
} | replace | 6 | 7 | 6 | 7 | TLE | |
p00628 | C++ | Time Limit Exceeded | #include <iostream>
#include <string>
using namespace std;
string S, T;
int chain;
int main() {
while (true) {
getline(cin, S);
S += ' ';
T = "";
if (S == "END OF INPUT") {
break;
}
for (int i = 0; i < S.size(); i++) {
if (S[i] != ' ') {
chain++;
} else {
T +=... | #include <iostream>
#include <string>
using namespace std;
string S, T;
int chain;
int main() {
while (true) {
getline(cin, S);
S += ' ';
T = "";
if (S == "END OF INPUT ") {
break;
}
for (int i = 0; i < S.size(); i++) {
if (S[i] != ' ') {
chain++;
} else {
T +... | replace | 10 | 11 | 10 | 11 | TLE | |
p00629 | C++ | Runtime Error | #include <iostream>
#include <vector>
using namespace std;
int main() {
int N;
vector<int> I, U, A, P, C;
while (true) {
cin >> N;
if (N == 0) {
break;
}
for (int i = 0; i < N; i++) {
cin >> I[i] >> U[i] >> A[i] >> P[i];
}
C = vector<int>(1001, 0);
for (int i = 0; i ... | #include <iostream>
#include <vector>
using namespace std;
int main() {
int N;
vector<int> I, U, A, P, C;
while (true) {
cin >> N;
if (N == 0) {
break;
}
I = vector<int>(N);
U = vector<int>(N);
A = vector<int>(N);
P = vector<int>(N);
for (int i = 0; i < N; i++) {
... | insert | 15 | 15 | 15 | 20 | -11 | |
p00630 | C++ | Runtime Error | #include <algorithm>
#include <cctype>
#include <iostream>
#include <string>
using namespace std;
void UpperCamelCase(string &);
void LowerCamelCase(string &);
void UnderScoreCase(string &);
bool IsUpperCase(char);
int main() {
char c;
string str;
while (1) {
cin >> str >> c;
if (c == 'X')
brea... | #include <algorithm>
#include <cctype>
#include <iostream>
#include <string>
using namespace std;
void UpperCamelCase(string &);
void LowerCamelCase(string &);
void UnderScoreCase(string &);
bool IsUpperCase(char);
int main() {
char c;
string str;
while (1) {
cin >> str >> c;
if (c == 'X')
brea... | replace | 78 | 79 | 78 | 80 | 0 | |
p00630 | C++ | Runtime Error | #include <algorithm>
#include <cctype>
#include <functional>
#include <iostream>
#include <string>
using namespace std;
bool C(char c) { return isupper(c); }
int main() {
string s;
string::iterator i;
char c;
int x;
while (cin >> s >> c, c - 'X') {
s[0] = toupper(s[0]);
while (x = s.find('_'), x != st... | #include <algorithm>
#include <cctype>
#include <functional>
#include <iostream>
#include <string>
using namespace std;
bool C(char c) { return isupper(c); }
int main() {
string s;
string::iterator i;
char c;
int x;
while (cin >> s >> c, c - 'X') {
s[0] = toupper(s[0]);
while (x = s.find('_'), x != st... | replace | 20 | 21 | 20 | 21 | 0 | |
p00631 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int n, sum;
vector<int> a;
while (true) {
cin >> n;
if (n == 0) {
break;
}
a = vector<int>(n);
sum = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
sum += a[... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int n, sum;
vector<int> a;
while (true) {
cin >> n;
if (n == 0) {
break;
}
a = vector<int>(n);
sum = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
sum += a[... | delete | 37 | 39 | 37 | 37 | TLE | |
p00632 | C++ | Memory Limit Exceeded | // 35
#include <algorithm>
#include <iostream>
#include <queue>
#include <string>
#include <utility>
using namespace std;
char g[20][20];
int h, w;
int t[20][20];
struct S {
int t, x, y;
};
int main() {
while (cin >> h >> w, h | w) {
int ax, ay, bx, by;
for (int y = 0; y < h; y++) {
for (int x = 0... | // 35
#include <algorithm>
#include <iostream>
#include <queue>
#include <string>
#include <utility>
using namespace std;
char g[20][20];
int h, w;
int t[20][20];
struct S {
int t, x, y;
};
int main() {
while (cin >> h >> w, h | w) {
int ax, ay, bx, by;
for (int y = 0; y < h; y++) {
for (int x = 0... | insert | 41 | 41 | 41 | 43 | MLE | |
p00632 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <st... | #include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <st... | replace | 86 | 87 | 86 | 87 | TLE | |
p00632 | C++ | Memory Limit Exceeded | #include <algorithm>
#include <cstdint>
#include <cstdio>
#include <queue>
#include <string>
#include <vector>
const size_t di[] = {size_t(-1), 0, 1, 0};
const size_t dj[] = {0, size_t(-1), 0, 1};
const int INF = 1e9;
const size_t dti[] = {0, 0, 1, 0, 0, 0, 0, 0, size_t(-1)};
const size_t dtj[] = {0, 0, 0, 0, size_t(-... | #include <algorithm>
#include <cstdint>
#include <cstdio>
#include <queue>
#include <string>
#include <vector>
const size_t di[] = {size_t(-1), 0, 1, 0};
const size_t dj[] = {0, size_t(-1), 0, 1};
const int INF = 1e9;
const size_t dti[] = {0, 0, 1, 0, 0, 0, 0, 0, size_t(-1)};
const size_t dtj[] = {0, 0, 0, 0, size_t(-... | replace | 56 | 57 | 56 | 57 | MLE | |
p00632 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
#define REP(i, n) for (ll i = 0; i < n; i++)
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
int h, w, ax, ay, bx, by, t, flag;
char field[30][30];
char pattern[20];
int main() {
while (true) {
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
#define REP(i, n) for (ll i = 0; i < n; i++)
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
int h, w, ax, ay, bx, by, t, flag;
char field[30][30];
char pattern[20];
int main() {
while (true) {
... | replace | 57 | 58 | 57 | 59 | 0 | |
p00632 | C++ | Time Limit Exceeded | #import <queue>
#import <stdio.h>
int main() {
std::queue<int> q;
int w, h, f[484], i, j, a, b, t, x, z;
char p[15];
for (; scanf("%d%d ", &h, &w), h;) {
for (j = 0; j < w + 2; j++)
f[j] = f[j - ~h * 22] = -1;
for (i = 1; i <= h; i++) {
for (j = 1; j <= w; j++)
f[x = i * 22 + j] = -2... | #import <queue>
#import <stdio.h>
int main() {
std::queue<int> q;
int w, h, f[484], i, j, a, b, t, x, z;
char p[15];
for (; scanf("%d%d ", &h, &w), h;) {
for (j = 0; j < w + 2; j++)
f[j] = f[j - ~h * 22] = -1;
for (i = 1; i <= h; i++) {
for (j = 1; j <= w; j++)
f[x = i * 22 + j] = -2... | replace | 16 | 17 | 16 | 17 | TLE | |
p00633 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <valarray>
#include <vector>
using names... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <valarray>
#include <vector>
using names... | replace | 141 | 142 | 141 | 142 | TLE | |
p00633 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <complex>
#include <iomanip>
#include <iostream>
#include <vector>
using namespace std;
const double EPS = 1e-10;
const double INF = 1e12;
const double PI = acos(-1);
#define EQ(n, m) (abs((n) - (m)) < EPS)
#define X real()
#define Y imag()
typedef complex<double> P;
type... | #include <algorithm>
#include <cmath>
#include <complex>
#include <iomanip>
#include <iostream>
#include <vector>
using namespace std;
const double EPS = 1e-10;
const double INF = 1e12;
const double PI = acos(-1);
#define EQ(n, m) (abs((n) - (m)) < EPS)
#define X real()
#define Y imag()
typedef complex<double> P;
type... | replace | 51 | 52 | 51 | 52 | TLE | |
p00638 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
while (1) {
vector<pair<int, int>> v;
cin >> n;
if (n == 0)
break;
for (int i = 0; i < n; i++) {
cin >> v[i].second >> v[i].first;
}
sort(v.begin(), v.end());
int ans = 0;
int judge = 0;
for (int i ... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
while (1) {
vector<pair<int, int>> v;
cin >> n;
if (n == 0)
break;
v.resize(n);
for (int i = 0; i < n; i++) {
cin >> v[i].second >> v[i].first;
}
sort(v.begin(), v.end());
int ans = 0;
int judge = 0;... | replace | 11 | 12 | 11 | 12 | -11 | |
p00638 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <numeric>
#include <utility>
#include <vector>
using namespace std;
typedef pair<int, int> P;
int main() {
for (int N; cin >> N, N;) {
vector<P> v;
for (int i = 0; i < N; i++) {
int a, b;
cin >> a >> b;
v.push_back(make_pair(b, a));
}
... | #include <algorithm>
#include <iostream>
#include <numeric>
#include <utility>
#include <vector>
using namespace std;
typedef pair<int, int> P;
int main() {
for (int N; cin >> N, N;) {
vector<P> v;
for (int i = 0; i < N; i++) {
int a, b;
cin >> a >> b;
v.push_back(make_pair(b, a));
}
... | delete | 26 | 31 | 26 | 26 | 0 | -----
1
3
6
-----
-----
1
3
6
-----
|
p00640 | C++ | Runtime Error | // AOJ1054 Distorted Love
#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
int main() {
int n;
int buf[100];
string name[100];
int b[100], x1[100][100], y1[100][100], x2[100][100], y2[100][100],
ptr[100][100];
string link[100][100];
while (cin >> n, n) {
... | // AOJ1054 Distorted Love
#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
int main() {
int n;
int buf[1000000];
string name[100];
int b[100], x1[100][100], y1[100][100], x2[100][100], y2[100][100],
ptr[100][100];
string link[100][100];
while (cin >> n, n)... | replace | 11 | 12 | 11 | 12 | 0 | |
p00640 | C++ | Runtime Error | #include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
int N, W, H, Q, x, y, c[109], xa[109][109], ya[109][109], xb[109][109],
yb[109][109];
string s[109], t[109][109], tp;
int main() {
while (cin >> N, N) {
cin >> W >> H;
for (int i = 0; i < N; i++) {
cin >> s[i... | #include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
int N, W, H, Q, x, y, c[109], xa[109][109], ya[109][109], xb[109][109],
yb[109][109];
string s[109], t[109][109], tp;
int main() {
while (cin >> N, N) {
cin >> W >> H;
for (int i = 0; i < N; i++) {
cin >> s[i... | replace | 29 | 30 | 29 | 30 | 0 | |
p00640 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
#define all(c) (c).begin(), (c).end()... | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
#define all(c) (c).begin(), (c).end()... | replace | 83 | 85 | 83 | 85 | 0 | |
p00642 | C++ | Memory Limit Exceeded | #include "bits/stdc++.h"
#include <unordered_map>
#include <unordered_set>
#pragma warning(disable : 4996)
using namespace std;
using ld = long double;
const ld eps = 1e-9;
//// < "d:\d_download\visual studio
///2015\projects\programing_contest_c++\debug\a.txt" > "d:\d_download\visual
///studio 2015\projects\programin... | #include "bits/stdc++.h"
#include <unordered_map>
#include <unordered_set>
#pragma warning(disable : 4996)
using namespace std;
using ld = double;
const ld eps = 1e-9;
//// < "d:\d_download\visual studio
///2015\projects\programing_contest_c++\debug\a.txt" > "d:\d_download\visual
///studio 2015\projects\programing_con... | replace | 5 | 6 | 5 | 6 | MLE | |
p00642 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
int main() {
int n;
while (cin >> n, n) {
double memo1[40] = {};
double memo2[40] = {};
double ans = 0;
memo1[0] = 1;
for (int i = 0; i < n; i++) {
for (int j = 0; j < 39; j++) {
if... | #include <algorithm>
#include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
int main() {
int n;
while (cin >> n, n) {
double memo1[40] = {};
double memo2[40] = {};
double ans = 0;
memo1[0] = 1;
for (int i = 0; i < n; i++) {
for (int j = 0; j < 35; j++) {
if... | replace | 15 | 16 | 15 | 16 | TLE | |
p00642 | C++ | Time Limit Exceeded | #include <cstdio>
#include <iostream>
using namespace std;
#define NMAX 100000
double dp[NMAX + 1];
int main() {
int n = NMAX;
for (int i = 0; i < n + 1; i++) {
dp[i] = 0.0;
}
for (int i = 0; i < n; i++) {
long long int foo = 1;
int bar = 1;
for (int j = i + 1; j < n + 1 and j < n + 30; j++) {... | #include <cstdio>
#include <iostream>
using namespace std;
#define NMAX 100000
double dp[NMAX + 1];
int main() {
int n = NMAX;
for (int i = 0; i < n + 1; i++) {
dp[i] = 0.0;
}
for (int i = 0; i < n; i++) {
long long int foo = 1;
long long int bar = 1;
for (int j = i + 1; j < n + 1 and foo < 1e... | replace | 14 | 16 | 14 | 16 | TLE | |
p00642 | C++ | Time Limit Exceeded | #include <cstdio>
#include <iostream>
using namespace std;
#define NMAX 100000
double dp[NMAX + 1];
int main() {
int n = NMAX;
for (int i = 0; i < n + 1; i++) {
dp[i] = 0.0;
}
for (int i = 0; i < n; i++) {
int foo = 1;
int bar = 1;
for (int j = i + 1; j < n + 1 and foo < 1000000000; j++) {
... | #include <cstdio>
#include <iostream>
using namespace std;
#define NMAX 100000
double dp[NMAX + 1];
int main() {
int n = NMAX;
for (int i = 0; i < n + 1; i++) {
dp[i] = 0.0;
}
for (int i = 0; i < n; i++) {
long long int foo = 1;
int bar = 1;
for (int j = i + 1; j < n + 1 and foo < 1000000000; ... | replace | 13 | 14 | 13 | 14 | TLE | |
p00642 | C++ | Runtime Error | #include <iomanip>
#include <iostream>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
const int N = 10, ONE_KUURU = 12;
vector<double> E;
void init() {
E.assign(N + 1, 0.0);
vector<vector<double>> dp(N + 2, vector<double>(ONE_KUURU + 1));
dp[1][0] = 1.0;
for (int i = ... | #include <iomanip>
#include <iostream>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
const int N = 100000, ONE_KUURU = 12;
vector<double> E;
void init() {
E.assign(N + 1, 0.0);
vector<vector<double>> dp(N + 2, vector<double>(ONE_KUURU + 1));
dp[1][0] = 1.0;
for (int ... | replace | 7 | 8 | 7 | 8 | 0 | |
p00642 | C++ | Memory Limit Exceeded | #define _CRT_SECURE_NO_WARNINGS
// #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
// #define int ll
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> pii;
#define all(c) begin(c), end(c)
#define range(i, a, b) for (ll i = a; i < ll(b); i++)
#define rep(i,... | #define _CRT_SECURE_NO_WARNINGS
// #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
// #define int ll
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> pii;
#define all(c) begin(c), end(c)
#define range(i, a, b) for (ll i = a; i < ll(b); i++)
#define rep(i,... | replace | 65 | 66 | 65 | 66 | MLE | |
p00642 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <memory.h>
#include <memory>
#include <numeric>
#include <queue>
#include <set>
#include <s... | #include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <memory.h>
#include <memory>
#include <numeric>
#include <queue>
#include <set>
#include <s... | replace | 39 | 40 | 39 | 40 | -11 | |
p00643 | C++ | Memory Limit Exceeded | #include <iostream>
#include <queue>
#include <string.h>
using namespace std;
int dy[] = {-1, 0, 1, 0}, dx[] = {0, -1, 0, 1};
struct Dice {
int t, b, n, s, e, w;
int y, x;
int c;
Dice(int top, int bottom, int north, int south, int east, int west, int sx,
int sy, int cost) {
t = top, b = bottom, n ... | #include <iostream>
#include <queue>
#include <string.h>
using namespace std;
int dy[] = {-1, 0, 1, 0}, dx[] = {0, -1, 0, 1};
struct Dice {
int t, b, n, s, e, w;
int y, x;
int c;
Dice(int top, int bottom, int north, int south, int east, int west, int sx,
int sy, int cost) {
t = top, b = bottom, n ... | insert | 82 | 82 | 82 | 83 | MLE | |
p00643 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define dump(...) \
cout << 'L' << __LINE__ << ": " << #__VA_ARGS__ << '=' << (__VA_ARGS__) \
<< endl
template <typename Tuple> void print_tuple(ostream &, const Tuple &) {}
template <typename Car, ... | #include <bits/stdc++.h>
using namespace std;
#define dump(...) \
cout << 'L' << __LINE__ << ": " << #__VA_ARGS__ << '=' << (__VA_ARGS__) \
<< endl
template <typename Tuple> void print_tuple(ostream &, const Tuple &) {}
template <typename Car, ... | insert | 83 | 83 | 83 | 84 | 0 | |
p00646 | C++ | Time Limit Exceeded | // 00
#include <iostream>
#include <vector>
using namespace std;
int main() {
bool cmp[1000001] = {};
vector<int> prm;
for (int i = 2; i <= 1000000; i++) {
if (!cmp[i]) {
prm.push_back(i);
for (int j = 2; j * i <= 1000000; j++) {
cmp[i * j] = true;
}
}
}
for (long long l; c... | // 00
#include <iostream>
#include <vector>
using namespace std;
int main() {
bool cmp[1000001] = {};
vector<int> prm;
for (int i = 2; i <= 1000000; i++) {
if (!cmp[i]) {
prm.push_back(i);
for (int j = 2; j * i <= 1000000; j++) {
cmp[i * j] = true;
}
}
}
for (long long l; c... | replace | 19 | 20 | 19 | 20 | TLE | |
p00646 | C++ | Time Limit Exceeded | #include <algorithm>
#include <array>
#include <assert.h>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <iterator>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <... | #include <algorithm>
#include <array>
#include <assert.h>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <iterator>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <... | replace | 82 | 83 | 82 | 83 | TLE | |
p00646 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
int main() {
ios_base::sync_with_stdio(false);
vector<ll> divisors;
divisors.reserve(4096);
while (true) {
ll L;
cin >> L;
if (L == 0) {
break;
}
divisors.clear();
for (ll i = 1;... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
int main() {
ios_base::sync_with_stdio(false);
vector<ll> divisors;
divisors.reserve(4096);
while (true) {
ll L;
cin >> L;
if (L == 0) {
break;
}
divisors.clear();
for (ll i = 1;... | replace | 30 | 35 | 30 | 36 | TLE | |
p00646 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <map>
#include <vector>
using namespace std;
const long long int MAX_ = 10000000;
vector<long long int> prime;
bool is_prime[MAX_];
void sieve() {
fill(is_prime, is_prime + MAX_, true);
is_prime[0] = is_prime[1] = false;
for (long long int i = 2; i < MAX_; ++i) ... | #include <algorithm>
#include <iostream>
#include <map>
#include <vector>
using namespace std;
const long long int MAX_ = 1000000;
vector<long long int> prime;
bool is_prime[MAX_];
void sieve() {
fill(is_prime, is_prime + MAX_, true);
is_prime[0] = is_prime[1] = false;
for (long long int i = 2; i < MAX_; ++i) {... | replace | 6 | 7 | 6 | 7 | TLE | |
p00646 | 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... | insert | 57 | 57 | 57 | 61 | 0 | |
p00646 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#define f first
#define s second
#define mp make_pair
#define REP(i, n) for (int i = 0; i < (int... | #include <algorithm>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#define f first
#define s second
#define mp make_pair
#define REP(i, n) for (int i = 0; i < (int... | replace | 64 | 65 | 64 | 65 | 0 | |
p00646 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
vector<ll> so, v;
ll ans;
void dfs(int d, int t) {
if (d == v.size()) {
ans += t;
return;
}
for (int i = 0; i <= v[d]; i++) {
int nt = t;
if (v[d] == i)
nt *= i + 1;
dfs(d + 1, nt);
}
}
int main() {
ll n;
while (c... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
vector<ll> so, v;
ll ans;
void dfs(int d, int t) {
if (d == v.size()) {
ans += t;
return;
}
for (int i = 0; i <= v[d]; i++) {
int nt = t;
if (v[d] == i)
nt *= i + 1;
dfs(d + 1, nt);
}
}
int main() {
ll n;
while (c... | replace | 24 | 25 | 24 | 25 | TLE | |
p00650 | C++ | Time Limit Exceeded | #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 | 88 | 89 | 88 | 89 | TLE | |
p00650 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#includ... | #include <algorithm>
#include <bitset>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#includ... | replace | 108 | 109 | 108 | 109 | 0 | |
p00651 | C++ | Time Limit Exceeded | #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 | 120 | 121 | 120 | 121 | TLE | |
p00651 | C++ | Time Limit Exceeded | #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 | 59 | 60 | 59 | 60 | TLE | |
p00653 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pair<int, int>> vii;
#define rrep(i, m, n) for (int(i) = (m); (i) < (n); (i)++)
#define erep(i, m, n) for (int(i) = (m); (i) <= (n); (i)++)
#define rep(i, n) for (int(i) = 0; (i) <... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pair<int, int>> vii;
#define rrep(i, m, n) for (int(i) = (m); (i) < (n); (i)++)
#define erep(i, m, n) for (int(i) = (m); (i) <= (n); (i)++)
#define rep(i, n) for (int(i) = 0; (i) <... | replace | 43 | 44 | 43 | 44 | 0 | |
p00653 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#incl... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#incl... | replace | 94 | 96 | 94 | 102 | 0 | |
p00653 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <climits>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <vector>
using namespace std;
typedef int ll;
typedef unsigned long long ull;
typedef long double ld;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef pair<i... | #include <algorithm>
#include <cassert>
#include <climits>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <vector>
using namespace std;
typedef int ll;
typedef unsigned long long ull;
typedef long double ld;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef pair<i... | replace | 23 | 24 | 23 | 24 | 0 | |
p00653 | C++ | Runtime Error | // AOJ 1068
#include <algorithm>
#include <cstdio>
#include <vector>
#define rep(i, a) for (int i = 0; i != (a); ++i)
#define repi(i, a, b) for (int i = (a); i != (b); ++i)
#define all(a) (a).begin(), (a).end()
const int INF = (1 << 31) - 1;
int r, c, q;
std::vector<std::vector<int>> segR, segC;
void init(std::vecto... | // AOJ 1068
#include <algorithm>
#include <cstdio>
#include <vector>
#define rep(i, a) for (int i = 0; i != (a); ++i)
#define repi(i, a, b) for (int i = (a); i != (b); ++i)
#define all(a) (a).begin(), (a).end()
const int INF = (1 << 31) - 1;
int r, c, q;
std::vector<std::vector<int>> segR, segC;
void init(std::vecto... | replace | 15 | 16 | 15 | 16 | 0 | |
p00653 | C++ | Memory Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define INF ((1LL << 31) - 1)
#define D 6
struct SegTree {
int segSize, realSegSize, nodeSize;
vector<int> seg;
void init(int n) {
realSegSize = n;
nodeSize = 0;
for (segSize = 1; segSize < n; segSize *= D)
nodeSize += segSize;
seg = vector... | #include <bits/stdc++.h>
using namespace std;
#define INF ((1LL << 31) - 1)
#define D 16
struct SegTree {
int segSize, realSegSize, nodeSize;
vector<int> seg;
void init(int n) {
realSegSize = n;
nodeSize = 0;
for (segSize = 1; segSize < n; segSize *= D)
nodeSize += segSize;
seg = vecto... | replace | 5 | 6 | 5 | 6 | MLE | |
p00653 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#in... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#in... | replace | 81 | 82 | 81 | 85 | 0 | |
p00653 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int INF = (1LL << 31) - 1;
struct segtree {
int H, W, H_, W_;
int dat[4000000];
segtree() {}
segtree(vector<vector<int>> &f) { init(f); }
int x(int i, int j) { return i * W_ + j; }
void init(vector<vector<int>> &f) {
H = W = 1;... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int INF = (1LL << 31) - 1;
struct segtree {
int H, W, H_, W_;
int dat[9000000];
segtree() {}
segtree(vector<vector<int>> &f) { init(f); }
int x(int i, int j) { return i * W_ + j; }
void init(vector<vector<int>> &f) {
H = W = 1;... | replace | 8 | 9 | 8 | 9 | 0 | |
p00653 | C++ | Runtime Error | #include <algorithm>
#include <climits>
#include <cstdio>
#include <iostream>
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
int rc[1000 * 1000];
int w, h, q;
int mm;
bool sw;
int buff[1024 * 1024];
void gen() {
const int n = w * h;
int m = 1;
while (m < n)
m *= 2;
mm = m;
... | #include <algorithm>
#include <climits>
#include <cstdio>
#include <iostream>
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
int rc[1000 * 1000];
int w, h, q;
int mm;
bool sw;
int buff[2 * 1024 * 1024 + 10];
void gen() {
const int n = w * h;
int m = 1;
while (m < n)
m *= 2;
m... | replace | 14 | 15 | 14 | 15 | 0 | |
p00653 | C++ | Memory Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
const int MAX_N = 1 << 24;
const int INF = 1 << 28;
int r, c;
int w, h;
int seg[8 * MAX_N];
void init() {
for (w = 1; w < r; w <<= 1)
;
for (h = 1; h < c; h <<= 1)
;
fill_n(seg, 8 * MAX_N, INF);
}
void update(int x, int y, int v, int k = 0, int ax = 0, int ... | #include <bits/stdc++.h>
using namespace std;
const int MAX_N = 1 << 20;
const int INF = INT_MAX;
int r, c;
int w, h;
int seg[8 * MAX_N];
void init() {
for (w = 1; w < r; w <<= 1)
;
for (h = 1; h < c; h <<= 1)
;
fill_n(seg, 8 * MAX_N, INF);
}
void update(int x, int y, int v, int k = 0, int ax = 0, int ... | replace | 2 | 4 | 2 | 4 | MLE | |
p00654 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <iostream>
#include <vector>
#define all(a) (a).begin(), (a).end()
#define EPS 1e-8
using namespace std;
typedef long long ll;
int main() {
ll n, b;
vector<ll> odd, even;
while (cin >> n, n) {
odd.clear();
even.clear();
for (int i = 0; i < n * (n + 1) /... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <vector>
#define all(a) (a).begin(), (a).end()
#define EPS 1e-8
using namespace std;
typedef long long ll;
int main() {
ll n, b;
vector<ll> odd, even;
while (cin >> n, n) {
odd.clear();
even.clear();
for (int i = 0; i < n * (n + 1) /... | replace | 35 | 38 | 35 | 37 | TLE |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.