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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p00013 | C++ | Runtime Error | #include <iostream>
#include <vector>
using namespace std;
int main() {
vector<int> car;
int n;
while (1) {
if (cin >> n, n) {
car.push_back(n);
} else {
cout << car.back() << endl;
car.pop_back();
}
}
return 0;
} | #include <iostream>
#include <vector>
using namespace std;
int main() {
vector<int> car;
int n;
while (cin >> n) {
if (n) {
car.push_back(n);
} else {
cout << car.back() << endl;
car.pop_back();
}
}
return 0;
} | replace | 8 | 10 | 8 | 10 | -11 | |
p00013 | C++ | Runtime Error | #include <iostream>
#include <stack>
using namespace std;
int main(void) {
stack<int> s;
int buf;
while (1) {
cin >> buf;
if (buf == 0) {
cout << s.top() << endl;
s.pop();
} else {
s.push(buf);
}
}
} | #include <iostream>
#include <stack>
using namespace std;
int main(void) {
stack<int> s;
int buf;
while (cin >> buf) {
if (buf == 0) {
cout << s.top() << endl;
s.pop();
} else {
s.push(buf);
}
}
} | replace | 8 | 10 | 8 | 9 | -11 | |
p00013 | C++ | Runtime Error | #include <cstdio>
#include <iostream>
#include <stack>
using namespace std;
stack<int> sta;
int main(void) {
int a;
while (1) {
cin >> a;
if (a)
sta.push(a);
else {
cout << sta.top() << endl;
sta.pop();
}
}
return 0;
} | #include <cstdio>
#include <iostream>
#include <stack>
using namespace std;
stack<int> sta;
int main(void) {
int a;
while (scanf("%d", &a) != EOF) {
if (a)
sta.push(a);
else {
cout << sta.top() << endl;
sta.pop();
}
}
return 0;
} | replace | 9 | 11 | 9 | 10 | -11 | |
p00013 | C++ | Runtime Error | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
int a[10], i = 0, n;
while (scanf("%d", n) == 1) {
if (n != 0) {
a[i] = n;
i++;
} else {
i--;
cout << a[i] << endl;
}
}
return 0;
} | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
int a[10], i = 0, n;
while (scanf("%d", &n) == 1) {
if (n != 0) {
a[i] = n;
i++;
} else {
i--;
cout << a[i] << endl;
}
}
return 0;
} | replace | 5 | 6 | 5 | 6 | -11 | |
p00013 | C++ | Runtime Error | #include <iostream>
#include <stack>
using namespace std;
int main() {
int a;
stack<int> syaryo;
while (cin >> a) {
cin >> a;
if (a != 0) {
syaryo.push(a);
}
else {
cout << syaryo.top() << endl;
syaryo.pop();
}
}
return 0;
} | #include <iostream>
#include <stack>
using namespace std;
int main() {
int a;
stack<int> syaryo;
while (cin >> a) {
if (a != 0) {
syaryo.push(a);
}
else {
cout << syaryo.top() << endl;
syaryo.pop();
}
}
return 0;
} | delete | 11 | 12 | 11 | 11 | 0 | |
p00013 | C++ | Runtime Error | #include <algorithm>
#include <cctype>
#include <cstdio>
#include <iostream>
#include <math.h>
using namespace std;
int main() {
int c[10], e[10], m, n = 0, k = 0;
for (int i = 0; i < 10; i++) {
c[i] = 0;
e[i] = 0;
}
while (cin >> m) {
if (m == 0) {
e[k] = c[n - 1];
k++;
c[n - 1... | #include <algorithm>
#include <cctype>
#include <cstdio>
#include <iostream>
#include <math.h>
using namespace std;
int main() {
int c[256], e[256], m, n = 0, k = 0;
for (int i = 0; i < 10; i++) {
c[i] = 0;
e[i] = 0;
}
while (cin >> m) {
if (m == 0) {
e[k] = c[n - 1];
k++;
c[n -... | replace | 9 | 10 | 9 | 10 | 0 | |
p00013 | C++ | Time Limit Exceeded | #include <cstdio>
using namespace std;
int main() {
int in[10];
int i = 0;
while (scanf("%d", &in[i])) {
if (in[i] == 0) {
i--;
printf("%d\n", in[i]);
} else {
i++;
}
}
} | #include <cstdio>
using namespace std;
int main() {
int in[10];
int i = 0;
while (scanf("%d", &in[i]) != EOF) {
if (in[i] == 0) {
i--;
printf("%d\n", in[i]);
} else {
i++;
}
}
} | replace | 8 | 9 | 8 | 9 | TLE | |
p00013 | C++ | Runtime Error | #include <iostream>
#include <malloc.h>
using namespace std;
struct stack {
int element;
struct stack *next;
};
int top(struct stack *s) { return s->element; }
struct stack *pop(struct stack *s) {
struct stack *p, *q;
q = s;
p = s->next;
free(q);
s = p;
return s;
}
struct stack *push(struct stack *s, i... | #include <iostream>
#include <malloc.h>
using namespace std;
struct stack {
int element;
struct stack *next;
};
int top(struct stack *s) { return s->element; }
struct stack *pop(struct stack *s) {
struct stack *p, *q;
q = s;
p = s->next;
free(q);
s = p;
return s;
}
struct stack *push(struct stack *s, i... | replace | 30 | 32 | 30 | 31 | -11 | |
p00013 | C++ | Runtime Error | #include <cstdio>
int main() {
int g[10];
int i = 0;
int t;
while (scanf("%d", &t)) {
if (t) {
g[i] = t;
i++;
} else {
i--;
printf("%d\n", g[i]);
}
}
return 0;
} | #include <cstdio>
int main() {
int g[10];
int i = 0;
int t;
while (scanf("%d", &t) + 1) {
if (t) {
g[i] = t;
i++;
} else {
i--;
printf("%d\n", g[i]);
}
}
return 0;
} | replace | 6 | 7 | 6 | 7 | -11 | |
p00014 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define fi first
#define se second
using namespace std;
bool value(int y, int x, int R, int C) {
retu... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define fi first
#define se second
using namespace std;
bool value(int y, int x, int R, int C) {
retu... | replace | 29 | 31 | 29 | 30 | TLE | |
p00014 | C++ | Time Limit Exceeded | #include <iostream>
#include <math.h>
using namespace std;
double y(double x) {
double y;
y = x * x;
return y;
}
int main() {
int i, d, s;
while (cin >> d) {
s = 0;
for (i = 0; i < 600; i += d) {
s += d * y(i);
}
cout << s << endl;
}
while (1)
;
return 0;
} | #include <iostream>
#include <math.h>
using namespace std;
double y(double x) {
double y;
y = x * x;
return y;
}
int main() {
int i, d, s;
while (cin >> d) {
s = 0;
for (i = 0; i < 600; i += d) {
s += d * y(i);
}
cout << s << endl;
}
return 0;
} | delete | 20 | 22 | 20 | 20 | TLE | |
p00014 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main(void) {
int n;
while (cin >> n, n) {
long long res = 0;
for (int i = 0; i < 600; i += n) {
res += n * i * i;
}
cout << res << endl;
}
return 0;
} | #include <iostream>
using namespace std;
int main(void) {
int n;
while (cin >> n) {
long long res = 0;
for (int i = 0; i < 600; i += n) {
res += n * i * i;
}
cout << res << endl;
}
return 0;
} | replace | 5 | 6 | 5 | 6 | TLE | |
p00014 | C++ | Time Limit Exceeded | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
int w;
while (scanf("%d", &w) && w) {
int i;
long long area = 0;
for (i = w; i < 600; i += w) {
area += w * i * i;
}
printf("%lld\n", area);
}
} | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
int w;
while (scanf("%d", &w) != EOF) {
int i;
long long area = 0;
for (i = w; i < 600; i += w) {
area += w * i * i;
}
printf("%lld\n", area);
}
} | replace | 5 | 6 | 5 | 6 | TLE | |
p00015 | C++ | Runtime Error | #include <algorithm>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
for (int i = 0; i < N; i++) {
char str1[82];
char str2[82];
string ans = "";
cin >> str1;
cin >> str2;
int m1 = strlen(str1) - 1, m2 = strlen(str2) - 1, pre = 0;
int m = max(... | #include <algorithm>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
for (int i = 0; i < N; i++) {
char str1[1000];
char str2[1000];
string ans = "";
cin >> str1;
cin >> str2;
int m1 = strlen(str1) - 1, m2 = strlen(str2) - 1, pre = 0;
int m = ... | replace | 9 | 11 | 9 | 11 | 0 | |
p00015 | C++ | Time Limit Exceeded | #include <iostream>
#include <string>
using namespace std;
int main() {
int n, l1, l2, i;
string a, b;
char ans[80];
int ia, ib, sum;
cin >> n;
while (n--) {
cin >> a >> b;
if (a.length() > 80 || b.length() > 80) {
cout << "overflow" << endl;
continue;
}
if (a.length() == 80 ||... | #include <iostream>
#include <string>
using namespace std;
int main() {
int n, l1, l2, i;
string a, b;
char ans[80];
int ia, ib, sum;
cin >> n;
while (n--) {
cin >> a >> b;
if (a.length() > 80 || b.length() > 80) {
cout << "overflow" << endl;
continue;
}
if (a.length() == 80 ||... | delete | 55 | 57 | 55 | 55 | TLE | |
p00015 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bits/stdc++.h>
#include <list>
#include <queue>
#include <stack>
#include <vector>
using namespace std;
int main() {
int t;
scanf("%d", &t);
while (t--) {
char c1[80], c2[80];
scanf("%s", &c1);
scanf("%s", &c2);
string s1, s2;
s1 = c1, s2 = c2;
if (s1 == "0"... | #include <algorithm>
#include <bits/stdc++.h>
#include <list>
#include <queue>
#include <stack>
#include <vector>
using namespace std;
int main() {
int t;
scanf("%d", &t);
while (t--) {
char c1[1000], c2[1000];
scanf("%s", &c1);
scanf("%s", &c2);
string s1, s2;
s1 = c1, s2 = c2;
if (s1 ==... | replace | 12 | 13 | 12 | 13 | TLE | |
p00015 | C++ | Runtime Error | #include <cstdio>
#include <cstring>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
while (n-- > 0) {
string num1, num2;
cin >> num1 >> num2;
int sum[101];
int degit = 0;
for (int i = 0; i < 101; i++)
sum[i] = 0;
for (int i = 0; i < num1.siz... | #include <cstdio>
#include <cstring>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
while (n-- > 0) {
string num1, num2;
cin >> num1 >> num2;
if (num1.size() > 80 || num2.size() > 80) {
cout << "overflow" << endl;
continue;
}
int sum[101];... | insert | 12 | 12 | 12 | 16 | 0 | |
p00015 | C++ | Runtime Error | #include <cstring>
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
for (int i = 0; i < n; i++) {
char num[2][90];
int ans[90], up = 0, t, l;
cin >> num[0] >> num[1];
int a = strlen(num[0]), b = strlen(num[1]), max = (b > a) ? b : a,
min = (b > a) ? a : b;
for (l ... | #include <cstring>
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
for (int i = 0; i < n; i++) {
char num[2][900];
int ans[900], up = 0, t, l;
cin >> num[0] >> num[1];
int a = strlen(num[0]), b = strlen(num[1]), max = (b > a) ? b : a,
min = (b > a) ? a : b;
for (... | replace | 7 | 9 | 7 | 9 | 0 | |
p00015 | C++ | Runtime Error | #include <cstdio>
#include <cstring>
#define MAX_NUM 100
using namespace std;
void array_add(int *a, int *b) {
int i;
for (i = MAX_NUM - 1; i > 0; i--) {
a[i] = a[i] + b[i];
a[i - 1] = a[i - 1] + a[i] / 10;
a[i] %= 10;
}
}
int main(void) {
int n, i, j, len1, len2, val1[MAX_NUM], val2[MAX_NUM];
... | #include <cstdio>
#include <cstring>
#define MAX_NUM 32767
using namespace std;
void array_add(int *a, int *b) {
int i;
for (i = MAX_NUM - 1; i > 0; i--) {
a[i] = a[i] + b[i];
a[i - 1] = a[i - 1] + a[i] / 10;
a[i] %= 10;
}
}
int main(void) {
int n, i, j, len1, len2, val1[MAX_NUM], val2[MAX_NUM];
... | replace | 2 | 3 | 2 | 3 | 0 | |
p00015 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
typedef long long int ll;
int main() {
int n;
cin >> n;
for (int i = 0; i < n; i++) {
int a[80];
string sa1, sa2, s1 = "", s2 = "";
for (int i = 0; i < 80; i++)
... | #include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
typedef long long int ll;
int main() {
int n;
cin >> n;
for (int i = 0; i < n; i++) {
int a[80];
string sa1, sa2, s1 = "", s2 = "";
for (int i = 0; i < 80; i++)
... | insert | 18 | 18 | 18 | 22 | -6 | terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
|
p00015 | C++ | Runtime Error | // 2012/10/28 Tazoe
#include <iostream>
#include <string>
using namespace std;
int main() {
int N;
cin >> N;
for (int i = 0; i < N; i++) {
string S1, S2;
cin >> S1;
cin >> S2;
if (S1.size() < S2.size()) {
string tmp = S1;
S1 = S2;
S2 = tmp;
}
int A[80];
int C = 0... | // 2012/10/28 Tazoe
#include <iostream>
#include <string>
using namespace std;
int main() {
int N;
cin >> N;
for (int i = 0; i < N; i++) {
string S1, S2;
cin >> S1;
cin >> S2;
if (S1.size() < S2.size()) {
string tmp = S1;
S1 = S2;
S2 = tmp;
}
if (S1.size() > 80) {
... | insert | 19 | 19 | 19 | 24 | 0 | |
p00015 | C++ | Runtime Error | #include <iostream>
#include <string>
using namespace std;
int charToInt(char);
string sumStr(string, string);
int charToInt(char c) { return (int)c - (int)'0'; }
string sumStr(string a, string b) {
int pa = a.length() - 1, pb = b.length() - 1;
string str(83, '0');
int pstr = str.length() - 1;
int next = 0;
... | #include <iostream>
#include <string>
using namespace std;
int charToInt(char);
string sumStr(string, string);
int charToInt(char c) { return (int)c - (int)'0'; }
string sumStr(string a, string b) {
int pa = a.length() - 1, pb = b.length() - 1;
string str(83, '0');
int pstr = str.length() - 1;
int next = 0;
... | replace | 59 | 60 | 59 | 61 | 0 | |
p00015 | C++ | Time Limit Exceeded | #include <stdio.h>
#include <string.h>
int main(void) {
int N;
scanf("%d", &N);
int i, j, k;
for (i = 0; i < N; ++i) {
int digits[2][80];
for (j = 0; j < 2; ++j) {
for (k = 0; k < 80; ++k) {
digits[j][k] = 0;
}
}
int overflow = 0;
for (j = 0; j < 2; ++j) {
char... | #include <stdio.h>
#include <string.h>
int main(void) {
int N;
scanf("%d", &N);
int i, j, k;
for (i = 0; i < N; ++i) {
int digits[2][80];
for (j = 0; j < 2; ++j) {
for (k = 0; k < 80; ++k) {
digits[j][k] = 0;
}
}
int overflow = 0;
for (j = 0; j < 2; ++j) {
char... | replace | 21 | 22 | 21 | 22 | TLE | |
p00015 | C++ | Runtime Error | #include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int main(void) {
char a[256], b[256];
int n, flag, count1, count2, count3, daisyo = 0, miss = 0;
cin >> n;
for (int i = 0; i < n; i++) {
flag = 0;
daisyo = 0;
miss = 0;
cin >> a >> b;
count1 = strlen(a);
co... | #include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int main(void) {
char a[1000] = {0}, b[1000] = {0};
int n, flag, count1, count2, count3, daisyo = 0, miss = 0;
cin >> n;
for (int i = 0; i < n; i++) {
flag = 0;
daisyo = 0;
miss = 0;
cin >> a >> b;
count1 = str... | replace | 7 | 8 | 7 | 8 | 0 | |
p00015 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int T;
cin >> T;
while (T--) {
// char s[100] = "abc";
string a, b;
cin >> a >> b;
reverse(a.begin(), a.end());
reverse(b.begin(), b.end());
while (a.size() < 100)
a += "0";
while (b.siz... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int T;
cin >> T;
while (T--) {
// char s[100] = "abc";
string a, b;
cin >> a >> b;
if (a == b) {
if (a == "0") {
cout << "0" << endl;
continue;
}
}
reverse(a.begin(), a... | insert | 12 | 12 | 12 | 18 | 0 | |
p00015 | C++ | Time Limit Exceeded | #include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int main(void) {
int N, j, k = 0;
cin >> N;
char strA[300], strB[300];
while (1) {
k++;
if (k == N + 1) {
break;
}
cin >> strA >> strB;
int ans[81] = {0};
ans[0] = 11111;
if (strlen(strA) > 80 || str... | #include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int main(void) {
int N, j, k = 0;
cin >> N;
char strA[100000], strB[100000];
while (1) {
k++;
if (k == N + 1) {
break;
}
cin >> strA >> strB;
int ans[81] = {0};
ans[0] = 11111;
if (strlen(strA) > 80 ... | replace | 8 | 9 | 8 | 9 | TLE | |
p00015 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define times(n, i) uptil(0, n, i)
#define upto(f, t, i) \
for (auto _##i = (t), i = decltype(_##i)(f) poi i <= _##i poi i++)
#define uptil(f, t, i) \
for (... | #include <bits/stdc++.h>
using namespace std;
#define times(n, i) uptil(0, n, i)
#define upto(f, t, i) \
for (auto _##i = (t), i = decltype(_##i)(f) poi i <= _##i poi i++)
#define uptil(f, t, i) \
for (... | replace | 33 | 34 | 33 | 39 | -6 | double free or corruption (out)
|
p00015 | C++ | Runtime Error | #include <algorithm>
#include <cctype>
#include <cstdio>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <string>
using namespace std;
int N, ans[82], a, b, la, lb, up, deg;
string sta, stb;
int main() {
cin >> N;
for (int i = 0; i < N; i++) {
cin >> sta >> stb;
la = sta.siz... | #include <algorithm>
#include <cctype>
#include <cstdio>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <string>
using namespace std;
int N, ans[82], a, b, la, lb, up, deg;
string sta, stb;
int main() {
cin >> N;
for (int i = 0; i < N; i++) {
cin >> sta >> stb;
la = sta.siz... | insert | 30 | 30 | 30 | 34 | 0 | |
p00016 | C++ | Time Limit Exceeded | #include <iostream>
#include <math.h>
#include <string>
#include <vector>
using namespace std;
int main() {
int dis1, rad1, dis2 = 0, rad2 = 0;
double x = 0, y = 0, PI = 3.141592653589793;
scanf("%d , %d", &dis1, &rad1);
y += dis1;
rad2 = rad1;
while (scanf("%d , %d", &dis1, &rad1)) {
if (dis1 != 0) {
... | #include <iostream>
#include <math.h>
#include <string>
#include <vector>
using namespace std;
int main() {
int dis1, rad1, dis2 = 0, rad2 = 0;
double x = 0, y = 0, PI = 3.141592653589793;
scanf("%d , %d", &dis1, &rad1);
y += dis1;
rad2 = rad1;
while (scanf("%d , %d", &dis1, &rad1)) {
if (dis1 != 0) {
... | insert | 20 | 20 | 20 | 21 | TLE | |
p00016 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <vector>
using namespace std;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long ... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <vector>
using namespace std;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long ... | delete | 43 | 44 | 43 | 43 | 0 | (L37) theta = 1.5708
(L37) theta = 0.436332
(L37) theta = -0.506145
(L37) theta = -0.436332
(L37) theta = -1.76278
(L37) theta = -1.29154
(L37) theta = -2.68781
(L37) theta = -1.18682
(L37) theta = -1.0821
(L37) theta = -1.67552
|
p00016 | C++ | Time Limit Exceeded | #include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
int d, t;
double x = 0, y = 0;
double angle = 90;
while (1) {
cin >> d >> t;
if (d == 0 && t == 0)
break;
x += d * cos(angle / 180 * acos(-1));
y += d * sin(angle / 180 * acos(-1));
angle -= t;
... | #include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
int d, t;
double x = 0, y = 0;
double angle = 90;
while (1) {
char c;
cin >> d >> c >> t;
if (d == 0 && t == 0)
break;
x += d * cos(angle / 180 * acos(-1));
y += d * sin(angle / 180 * acos(-1));
... | replace | 10 | 11 | 10 | 12 | TLE | |
p00016 | C++ | Time Limit Exceeded | #include <algorithm>
#include <fstream>
#include <iostream>
#include <math.h>
#include <queue>
#include <utility>
#include <vector>
#define PI 3.141592
using namespace std;
int main() {
ifstream cin("../test.txt");
double x, y, ca, a, l;
x = 0;
y = 0;
ca = PI / 2;
char c;
while (true) {
cin >> l >> c... | #include <algorithm>
#include <fstream>
#include <iostream>
#include <math.h>
#include <queue>
#include <utility>
#include <vector>
#define PI 3.141592
using namespace std;
int main() {
// ifstream cin("../test.txt");
double x, y, ca, a, l;
x = 0;
y = 0;
ca = PI / 2;
char c;
while (true) {
cin >> l >... | replace | 11 | 12 | 11 | 12 | TLE | |
p00016 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
double x = 0, y = 0, s = 90, a, b;
while (scanf("%f,%f", &a, &b), a) {
x += a * cos(s * M_PI / 180);
y += a * sin(s * M_PI / 180);
s -= b;
}
cout << (int)x << endl;
cout << (int)y << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
double x = 0, y = 0, s = 90;
int a, b;
while (scanf("%d,%d", &a, &b), a) {
x += a * cos(s * M_PI / 180);
y += a * sin(s * M_PI / 180);
s -= b;
}
cout << (int)x << endl;
cout << (int)y << endl;
} | replace | 3 | 5 | 3 | 6 | TLE | |
p00017 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
string str;
while (getline(cin, str)) {
while (1) {
if (str.find("the") != -1 || str.find("that") != -1 ||
str.find("this") != -1)
break;
for (int i = 0; i < str.size(); i++) {
if (str[i] == '.' || str[i] == ' ') {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
string str;
while (getline(cin, str)) {
while (1) {
if (str.find("the") != -1 || str.find("that") != -1 ||
str.find("this") != -1)
break;
for (int i = 0; i < str.size(); i++) {
if (str[i] == '.' || str[i] == ' ') {
... | replace | 11 | 12 | 11 | 14 | TLE | |
p00017 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <list>
#include <set>
#include <stack>
#include <vector>
using namespace std;
#define REP(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define FOR(i, a, b) for (int(i) = (a); (i) < (b); (i)++)
#define PUSH(n, v) ... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <list>
#include <set>
#include <stack>
#include <vector>
using namespace std;
#define REP(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define FOR(i, a, b) for (int(i) = (a); (i) < (b); (i)++)
#define PUSH(n, v) ... | replace | 23 | 24 | 23 | 24 | TLE | |
p00017 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
string s;
for (; getline(cin, s);) {
cin.ignore();
bool f = 0;
for (; !f;) {
for (int i = 0; i < s.size(); i++) {
if (s[i] >= 'a' && s[i] <= 'z') {
s[i]--;
if (s[i] < 'a')
s[i] = 'z';
}
}
... | #include <iostream>
using namespace std;
int main() {
string s;
for (; getline(cin, s);) {
bool f = 0;
for (; !f;) {
for (int i = 0; i < s.size(); i++) {
if (s[i] >= 'a' && s[i] <= 'z') {
s[i]--;
if (s[i] < 'a')
s[i] = 'z';
}
}
string t[3] = ... | delete | 5 | 6 | 5 | 5 | TLE | |
p00017 | C++ | Runtime Error | #include <iostream>
#include <string>
using namespace std;
int main() {
string stro, str;
while (getline(cin, stro)) {
for (int i = 0; i < 26; i++) {
str = stro;
for (int j = 0; j < stro.length(); j++) {
if (str[j] >= 'a' && str[j] <= 'z')
if (str[j] + i > 'z')
str[j]... | #include <iostream>
#include <string>
using namespace std;
int main() {
string stro, str;
while (getline(cin, stro)) {
for (int i = 0; i < 26; i++) {
str = stro;
for (int j = 0; j < stro.length(); j++) {
if (str[j] >= 'a' && str[j] <= 'z')
if (str[j] + i > 'z')
str[j]... | replace | 17 | 20 | 17 | 20 | -11 | |
p00017 | C++ | Time Limit Exceeded | #include <iostream>
#include <string>
char chshift(char ch) {
if (ch >= 'a' && ch <= 'z') {
return (ch - 'a' + 1) % 26 + 'a';
} else {
return ch;
}
}
std::string strshift(std::string s) {
for (int i = 0; i < s.length(); i++) {
s[i] = chshift(s[i]);
}
return s;
}
bool valid_text_p(std::string ... | #include <iostream>
#include <string>
char chshift(char ch) {
if (ch >= 'a' && ch <= 'z') {
return (ch - 'a' + 1) % 26 + 'a';
} else {
return ch;
}
}
std::string strshift(std::string s) {
for (int i = 0; i < s.length(); i++) {
s[i] = chshift(s[i]);
}
return s;
}
bool valid_text_p(std::string ... | replace | 19 | 20 | 19 | 20 | TLE | |
p00017 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
void f(string &s) {
for (char &c : s) {
if ('a' <= c && c <= 'z')
c = (c + 25) % 26 + 'a';
}
}
int main() {
string s;
while (getline(cin, s)) {
if (s.empty())
break;
while (s.find("the") == string::npos && s.find("this") == string::npos &... | #include <bits/stdc++.h>
using namespace std;
void f(string &s) {
for (char &c : s) {
if ('a' <= c && c <= 'z')
c = (c - 'a' + 25) % 26 + 'a';
}
}
int main() {
string s;
while (getline(cin, s)) {
if (s.empty())
break;
while (s.find("the") == string::npos && s.find("this") == string::... | replace | 7 | 8 | 7 | 8 | TLE | |
p00017 | C++ | Time Limit Exceeded | #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, a, b) for ((i) = (a); (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, a, b) for ((i) = (a); (i)... | replace | 36 | 37 | 36 | 41 | TLE | |
p00017 | C++ | Time Limit Exceeded | #include <cstring>
#include <iostream>
using namespace std;
int main(void) {
while (true) {
string str;
if (!getline(cin, str))
break;
;
while (true) {
for (int i = 0; i < str.size(); i++) {
if (isalpha(str[i]) && str[i] == 'z') {
str[i] = 'a';
} else if (isalpha... | #include <cstring>
#include <iostream>
using namespace std;
int main(void) {
while (true) {
string str;
if (!getline(cin, str))
break;
;
while (true) {
for (int i = 0; i < str.size(); i++) {
if (isalpha(str[i]) && str[i] == 'z') {
str[i] = 'a';
} else if (isalpha... | replace | 18 | 20 | 18 | 20 | TLE | |
p00017 | C++ | Time Limit Exceeded | #include <iostream>
#include <string>
bool NotMatch(const std::string &str) {
return str.find("the") == std::string::npos &&
str.find("this") == std::string::npos &&
str.find("that") == std::string::npos;
}
int main() {
std::string str;
while (getline(std::cin, str)) {
while (NotMatch(str)... | #include <iostream>
#include <string>
bool NotMatch(const std::string &str) {
return str.find("the") == std::string::npos &&
str.find("this") == std::string::npos &&
str.find("that") == std::string::npos;
}
int main() {
std::string str;
while (getline(std::cin, str)) {
while (NotMatch(str)... | replace | 21 | 22 | 21 | 22 | TLE | |
p00017 | C++ | Time Limit Exceeded | #include <cctype>
#include <cstdio>
#include <cstring>
char str[1000000] = {0};
using namespace std;
int main() {
int f = 0;
while (scanf("%[^\n]", str) != EOF) {
fflush(stdin);
for (int i = 0; i <= 25; i++) {
for (int j = 0; j < strlen(str); j++) {
if (str[j] == ' ' || str[j] == '.')
... | #include <cctype>
#include <cstdio>
#include <cstring>
char str[1000000] = {0};
using namespace std;
int main() {
int f = 0;
while (scanf("%[^\n]", str) != EOF) {
getchar();
for (int i = 0; i <= 25; i++) {
for (int j = 0; j < strlen(str); j++) {
if (str[j] == ' ' || str[j] == '.')
co... | replace | 8 | 9 | 8 | 9 | TLE | |
p00017 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <ctype.h>
#include <deque>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <time.h>
#include <utility>
#include <v... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <ctype.h>
#include <deque>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <time.h>
#include <utility>
#include <v... | replace | 47 | 48 | 47 | 48 | TLE | |
p00017 | C++ | Time Limit Exceeded | #include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
int f = 0, i;
for (;;) {
char word[100] = {0};
for (i = 0;; i++) {
if (scanf("%c", &word[i]) == EOF) {
f = 1;
word[i] = 10;
break;
}
if (word[i] == 10) {
break;
... | #include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
int f = 0, i;
for (;;) {
char word[100] = {0};
for (i = 0;; i++) {
if (scanf("%c", &word[i]) == EOF) {
f = 1;
word[i] = 10;
break;
}
if (word[i] == 10) {
break;
... | replace | 18 | 19 | 18 | 19 | TLE | |
p00017 | C++ | Time Limit Exceeded | #include <iostream>
#include <string>
using namespace std;
int main() {
string s;
while (getline(cin, s)) {
string dec = s;
while (true) {
if (dec.find("the") != -1 || dec.find("this") != -1 ||
dec.find("that") != -1) {
cout << dec << endl;
break;
}
for (int i = ... | #include <iostream>
#include <string>
using namespace std;
int main() {
string s;
while (getline(cin, s)) {
string dec = s;
while (true) {
if (dec.find("the") != -1 || dec.find("this") != -1 ||
dec.find("that") != -1) {
cout << dec << endl;
break;
}
for (int i = ... | replace | 17 | 18 | 17 | 18 | TLE | |
p00017 | C++ | Runtime Error | #include <cassert>
#include <iostream>
#include <string>
using namespace std;
bool IncludeKeyWords(const string &Sentence) {
if (Sentence.find("the") <= 80)
return true;
if (Sentence.find("this") <= 80)
return true;
if (Sentence.find("that") <= 80)
return true;
return false;
}
string OneShift(stri... | #include <cassert>
#include <iostream>
#include <string>
using namespace std;
bool IncludeKeyWords(const string &Sentence) {
if (Sentence.find("the") <= 80)
return true;
if (Sentence.find("this") <= 80)
return true;
if (Sentence.find("that") <= 80)
return true;
return false;
}
string OneShift(stri... | replace | 20 | 21 | 20 | 21 | 0 | |
p00017 | C++ | Time Limit Exceeded | #include <iostream>
#include <string>
using namespace std;
int main() {
string str;
while (getline(cin, str)) {
while (str.find("this", 0) == string::npos ||
str.find("that", 0) == string::npos ||
str.find("the", 0) == string::npos) {
for (int i = 0; i < str.size(); ++i) {
i... | #include <iostream>
#include <string>
using namespace std;
int main() {
string str;
while (getline(cin, str)) {
while (str.find("this", 0) == string::npos &&
str.find("that", 0) == string::npos &&
str.find("the", 0) == string::npos) {
for (int i = 0; i < str.size(); ++i) {
i... | replace | 7 | 9 | 7 | 9 | TLE | |
p00017 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
void f(string &s) {
for (char &c : s) {
if ('a' <= c && c <= 'z')
c = (c - 'a' + 25) % 26 + 'a';
}
}
int main() {
string s;
while (getline(cin, s)) {
if (s == "")
break;
while (s.find("the") == string::npos || s.find("this") == string::np... | #include <bits/stdc++.h>
using namespace std;
void f(string &s) {
for (char &c : s) {
if ('a' <= c && c <= 'z')
c = (c - 'a' + 25) % 26 + 'a';
}
}
int main() {
string s;
while (getline(cin, s)) {
if (s == "")
break;
while (s.find("the") == string::npos && s.find("this") == string::np... | replace | 17 | 18 | 17 | 18 | TLE | |
p00018 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int num[5];
for (int i = 0; i = 4; i++)
cin >> num[i];
sort(num, num + 5);
for (int i = 4; i = 1; i--)
cout << num[i] << " ";
cout << num[0] << "\n";
} | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int in[5];
for (int i = 0; i < 5; i++)
cin >> in[i];
sort(in, in + 5, greater<int>());
for (int i = 0; i < 4; i++)
cout << in[i] << " ";
cout << in[4] << endl;
} | replace | 4 | 15 | 4 | 11 | TLE | |
p00018 | Python | Runtime Error | print(*sorted(map(int, input().spilt()))[::-1])
| print(*sorted(map(int, input().split()))[::-1])
| replace | 0 | 1 | 0 | 1 | AttributeError: 'str' object has no attribute 'spilt'. Did you mean: 'split'? | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p00018/Python/s371735785.py", line 1, in <module>
print(*sorted(map(int, input().spilt()))[::-1])
AttributeError: 'str' object has no attribute 'spilt'. Did you mean: 'split'?
|
p00019 | C++ | Time Limit Exceeded | #include "bits/stdc++.h"
#include <unordered_map>
#include <unordered_set>
#pragma warning(disable : 4996)
using namespace std;
using ld = long double;
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 | 16 | 17 | 16 | 17 | TLE | |
p00019 | C++ | Time Limit Exceeded |
#include <algorithm>
#include <cctype>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
int main() {
long long int n;
long long result = 1;
c... |
#include <algorithm>
#include <cctype>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
int main() {
long long int n;
long long result = 1;
c... | insert | 23 | 23 | 23 | 24 | TLE | |
p00020 | C++ | Runtime Error | #include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
char cent[100];
for (int i = 0;; i++) {
if (scanf("%c", ¢[i]) == EOF) {
break;
}
if (cent[i] >= 97 && cent[i] <= 122) {
cent[i] -= 32;
}
}
cout << cent;
return 0;
} | #include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
char cent[10000];
for (int i = 0;; i++) {
if (scanf("%c", ¢[i]) == EOF) {
break;
}
if (cent[i] >= 97 && cent[i] <= 122) {
cent[i] -= 32;
}
}
cout << cent;
return 0;
} | replace | 5 | 6 | 5 | 6 | 0 | |
p00020 | C++ | Time Limit Exceeded | #include <stdio.h>
int main(void) {
char a;
while ((a = getchar()) != '\0') {
if ('a' <= a && a <= 'z')
a -= 32;
putchar(a);
}
return 0;
} | #include <stdio.h>
int main(void) {
char a;
while ((a = getchar()) != EOF) {
if ('a' <= a && a <= 'z')
a -= 32;
putchar(a);
}
return 0;
} | replace | 5 | 6 | 5 | 6 | TLE | |
p00020 | C++ | Time Limit Exceeded | #include <iostream>
#include <stdio.h>
using namespace std;
int main() {
char ch;
while (1) {
scanf("%c", &ch);
if (ch == '\n') {
cout << endl;
}
ch = toupper(ch);
cout << ch;
}
return 0;
} | #include <iostream>
#include <stdio.h>
using namespace std;
int main() {
char ch;
while (1) {
scanf("%c", &ch);
if (ch == '\n') {
cout << endl;
break;
}
ch = toupper(ch);
cout << ch;
}
return 0;
} | insert | 15 | 15 | 15 | 16 | TLE | |
p00020 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <functional>
using namespace std;
int main() {
char str[100];
scanf("%[a-z .]", str);
for (int i = 0; str[i]; i++) {
if ('a' <= str[i] && str[i] <= 'z')
str[i] += 'A' - 'a';
}
printf("%s\n", str);
return 0;
} | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <functional>
using namespace std;
int main() {
static char str[100000];
scanf("%[a-z .]", str);
for (int i = 0; str[i]; i++) {
if ('a' <= str[i] && str[i] <= 'z')
str[i] += 'A' - 'a';
}
printf("%s\n", str);
return 0;
} | replace | 7 | 8 | 7 | 8 | 0 | |
p00020 | C++ | Time Limit Exceeded | #include <stdio.h>
int main() {
char c;
while (scanf("%c", &c)) {
if (c == ' ')
printf(" ");
else if (c == '.')
printf(".");
else if (c == '\n')
printf("\n");
else
printf("%c", c - 32);
}
} | #include <stdio.h>
int main() {
for (char c; scanf("%c", &c) != -1;)
putchar((c > 96) ? (c - 32) : c);
} | replace | 2 | 13 | 2 | 4 | TLE | |
p00022 | C++ | Time Limit Exceeded | #include <iostream>
int maxSum(int *a, int n) {
int sum, max = a[0];
for (int num = 1; num <= n; ++num) {
for (int i = 0; i < n - num + 1; ++i) {
sum = 0;
for (int j = 0; j < num; ++j) {
sum += a[i + j];
}
if (sum > max) {
max = sum;
}
}
}
return max;
}
in... | #include <iostream>
int maxSum(int *a, int n) {
int sum, max = a[0];
for (int i = 0; i < n; ++i) {
sum = 0;
for (int j = i; j < n; ++j) {
sum += a[j];
if (sum > max) {
max = sum;
}
}
}
return max;
}
int main() {
int n;
int *a;
for (;;) {
std::cin >> n;
if (n... | replace | 4 | 10 | 4 | 8 | TLE | |
p00022 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (i = 0; i < n; ++i)
#define each(itr, c) \
for (__typeof(c.begin()) itr = c.begin(); itr != c.end(); itr++)
#define mp make_pair
#define pb push_back
#define fi first
#d... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (i = 0; i < n; ++i)
#define each(itr, c) \
for (__typeof(c.begin()) itr = c.begin(); itr != c.end(); itr++)
#define mp make_pair
#define pb push_back
#define fi first
#d... | replace | 24 | 25 | 24 | 25 | -6 | Fatal glibc error: malloc assertion failure in sysmalloc: (old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)
|
p00022 | C++ | Runtime Error | #include <stdio.h>
int main() {
int n, a[5000];
while (scanf("%d", &n) != EOF) {
int max = -10001;
scanf("%d", &n);
if (n == 0)
break;
for (int i = 0; i < n; i++)
scanf("%d", &a[i]);
for (int i = 0; i < n; i++) {
int sum = 0;
for (int j = i; j < n; j++) {
sum += a... | #include <stdio.h>
int main() {
int n, a[5000];
while (1) {
int max = -100001;
scanf("%d", &n);
if (n == 0)
break;
for (int i = 0; i < n; i++)
scanf("%d", &a[i]);
for (int i = 0; i < n; i++) {
int sum = 0;
for (int j = i; j < n; j++) {
sum += a[j];
if (max... | replace | 3 | 5 | 3 | 5 | 0 | |
p00022 | C++ | Runtime Error | #include <climits>
#include <iostream>
using namespace std;
template <typename Type> long long Maximum_Sum_Sequence(Type N[], int size) {
long long max = LLONG_MIN;
for (int i = 0; i < size; i++) {
long long sum = 0;
for (int j = i; j < size; j++) {
sum += N[j];
if (sum > max) {
max... | #include <climits>
#include <iostream>
using namespace std;
template <typename Type> long long Maximum_Sum_Sequence(Type N[], int size) {
long long max = LLONG_MIN;
for (int i = 0; i < size; i++) {
long long sum = 0;
for (int j = i; j < size; j++) {
sum += N[j];
if (sum > max) {
max... | replace | 24 | 25 | 24 | 25 | -11 | |
p00022 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include... | replace | 41 | 42 | 41 | 42 | 0 | |
p00022 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include... | replace | 41 | 42 | 41 | 42 | 0 | |
p00022 | C++ | Time Limit Exceeded | #include <iostream>
#include <vector>
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
// ?¨±?????????????????
#define EPS (1e-10)
int main() {
int n;
while (cin >> n && n != 0) {
vector<int> a(n);
REP(i, n) cin >> a[i];
int ret ... | #include <iostream>
#include <vector>
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
// ?¨±?????????????????
#define EPS (1e-10)
int main() {
int n;
while (cin >> n && n != 0) {
vector<int> a(n);
REP(i, n) cin >> a[i];
vector<i... | replace | 14 | 22 | 14 | 21 | TLE | |
p00022 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define INF 1000000000
int main() {
while (1) {
int n;
cin >> n;
if (!n)
break;
vector<int> a(n);
for (int i = 1; i <= n; i++) {
cin >> a[i];
if (i > 0)
a[i] += a[i - 1];
}
a[0] = 0;
int ans = a[1];
for (int ... | #include <bits/stdc++.h>
using namespace std;
#define INF 1000000000
int main() {
while (1) {
int n;
cin >> n;
if (!n)
break;
vector<int> a(n + 1);
for (int i = 1; i <= n; i++) {
cin >> a[i];
if (i > 0)
a[i] += a[i - 1];
}
a[0] = 0;
int ans = a[1];
for (... | replace | 11 | 12 | 11 | 12 | 0 | |
p00022 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <stdio.h>
using namespace std;
int main(void) {
int n, a[1000];
while (1) {
cin >> n;
if (n == 0)
break;
for (int i = 1; i <= n; i++)
cin >> a[i];
int goukei = 0, led = -10000000;
for (int i = 1; i <= n; i++) {
goukei = 0;
... | #include <algorithm>
#include <iostream>
#include <stdio.h>
using namespace std;
int main(void) {
int n, a[10000];
while (1) {
cin >> n;
if (n == 0)
break;
for (int i = 1; i <= n; i++)
cin >> a[i];
int goukei = 0, led = -10000000;
for (int i = 1; i <= n; i++) {
goukei = 0;
... | replace | 6 | 7 | 6 | 7 | 0 | |
p00022 | C++ | Time Limit Exceeded | #include <math.h>
#include <stdio.h>
using namespace std;
int main() {
int n, maximum, sum;
while (true) {
scanf("%d", &n);
if (n == 0)
break;
int array[n];
for (int i = 0; i < n; i++)
scanf("%d", &array[i]);
maximum = -600000000;
for (int k = 0; k < n; k++) { //?§???????????... | #include <math.h>
#include <stdio.h>
using namespace std;
int main() {
int n, maximum, sum;
while (true) {
scanf("%d", &n);
if (n == 0)
break;
int array[n];
for (int i = 0; i < n; i++)
scanf("%d", &array[i]);
maximum = -600000000;
for (int k = 0; k < n; k++) { //?§?????????????... | replace | 15 | 21 | 15 | 19 | TLE | |
p00022 | C++ | Time Limit Exceeded | #include <iostream>
#include <vector>
using namespace std;
int main() {
int n;
while (cin >> n, n) {
vector<int> vec;
for (int i = 0; i < n; i++) {
int a;
cin >> a;
vec.push_back(a);
}
int max = vec[0] + vec[1];
for (int i = 0; i < vec.size(); i++) {
for (int j = i + 1;... | #include <iostream>
#include <vector>
using namespace std;
int main() {
int n;
while (cin >> n, n) {
vector<int> vec;
for (int i = 0; i < n; i++) {
int a;
cin >> a;
vec.push_back(a);
}
int max = vec[0] + vec[1];
for (int i = 0; i < vec.size(); i++) {
int add = 0;
... | replace | 16 | 21 | 16 | 19 | TLE | |
p00022 | C++ | Runtime Error | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define LOOP(i, x, n) for (int i = x; i < n; i++)
#define ALL(v) (v).begin(), (v).end()
#define PB push_back
#define MP make_pair
#define FR first
#define SC second
#define int long long
using namespace std;
const int MOD = 1000000007;
const int IN... | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define LOOP(i, x, n) for (int i = x; i < n; i++)
#define ALL(v) (v).begin(), (v).end()
#define PB push_back
#define MP make_pair
#define FR first
#define SC second
#define int long long
using namespace std;
const int MOD = 1000000007;
const int IN... | replace | 18 | 19 | 18 | 19 | -6 | Fatal glibc error: malloc assertion failure in sysmalloc: (old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)
|
p00022 | C++ | Runtime Error | #include <algorithm>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define ALL(c) c.begin(), c.end()
#define RALL(c) c.rbegin(), c.rend()
#define REP(i, x, y) for... | #include <algorithm>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define ALL(c) c.begin(), c.end()
#define RALL(c) c.rbegin(), c.rend()
#define REP(i, x, y) for... | replace | 32 | 33 | 32 | 33 | 0 | |
p00022 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
int n, i, j, k, max, sum;
while (1) {
int max = -100000;
cin >> n;
int a[n];
if (n == 0)
break;
for (i = 0; i < n; i++) {
cin >> a[i];
}
for (i = 0; i < n; i++) {
for (j = 1; j <= n - i; j++) {
sum = 0;
... | #include <iostream>
using namespace std;
int main() {
int n, i, j, k, max, sum;
while (1) {
int max = -100000;
cin >> n;
int a[n];
if (n == 0)
break;
for (i = 0; i < n; i++) {
cin >> a[i];
}
for (i = 0; i < n; i++) {
sum = 0;
for (j = 0; j < n - i; j++) {
... | replace | 15 | 20 | 15 | 18 | TLE | |
p00023 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
struct circle {
double r, x, y... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
struct circle {
double r, x, y... | replace | 23 | 37 | 23 | 36 | TLE | |
p00024 | C++ | Time Limit Exceeded | #include <stdio.h>
int main(void) {
double N;
double v;
while (scanf("%lf", &v)) {
// 1/2*v^2=g*5(N-1)
//??????????????§?????????????????¨?????????????????????
N = v * v / (10.0 * 9.8) + 1.0;
printf("%d\n", (int)(N) + 1);
}
return 0;
} | #include <stdio.h>
int main(void) {
double N;
double v;
while (scanf("%lf", &v) != EOF) {
N = v * v / (10.0 * 9.8) + 1.0;
printf("%d\n", (int)(N) + 1);
}
return 0;
} | replace | 5 | 8 | 5 | 6 | TLE | |
p00024 | C++ | Time Limit Exceeded | #include <cmath>
#include <iostream>
using namespace std;
void solve() {
double v;
while (cin >> v, v) {
int N = 2;
while (true) {
double velocity = 1.4 * sqrt(10.0 * (5 * N - 5));
if (velocity >= v) {
cout << N << endl;
break;
}
++N;
}
}
}
int main() {
sol... | #include <cmath>
#include <iostream>
using namespace std;
void solve() {
double v;
while (cin >> v) {
int N = 2;
while (true) {
double velocity = 1.4 * sqrt(10.0 * (5 * N - 5));
if (velocity >= v) {
cout << N << endl;
break;
}
++N;
}
}
}
int main() {
solve(... | replace | 7 | 8 | 7 | 8 | TLE | |
p00024 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main(void) {
int c, n;
double v, y;
while (cin >> v, v != '\0') {
y = 4.9 * ((v * v) / (9.8 * 9.8));
n = 1;
while (1) {
if (y < 5 * n - 5)
break;
n++;
}
cout << n << endl;
}
} | #include <iostream>
using namespace std;
int main(void) {
int c, n;
double v, y;
while (cin >> v) {
y = 4.9 * ((v * v) / (9.8 * 9.8));
n = 1;
while (1) {
if (y < 5 * n - 5)
break;
n++;
}
cout << n << endl;
}
} | replace | 5 | 6 | 5 | 6 | TLE | |
p00024 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
while (1) {
double v, t, h;
int ans;
cin >> v;
t = v / 9.8;
h = 4.9 * t * t;
for (int i = 1; i < 100000; i++) {
if (h < 5 * i - 5) {
ans = i;
break;
}
}
cout << ans << endl;
}
return 0;
} | #include <iostream>
using namespace std;
int main() {
double v, t, h;
int ans;
while (cin >> v) {
t = v / 9.8;
h = 4.9 * t * t;
for (int i = 1; i < 100000; i++) {
if (h < 5 * i - 5) {
ans = i;
break;
}
}
cout << ans << endl;
}
return 0;
} | replace | 4 | 8 | 4 | 7 | TLE | |
p00024 | C++ | Time Limit Exceeded | #include <iostream>
#include <math.h>
using namespace std;
int main() {
double a;
while (cin >> a, a) {
double t = a / 9.8;
double y = 4.9 * t * t;
int y_c = ceil(y);
int N = y_c / 5 + (y_c % 5 > 0);
cout << N + 1 << endl;
}
return 0;
} | #include <iostream>
#include <math.h>
using namespace std;
int main() {
double a;
while (cin >> a) {
double t = a / 9.8;
double y = 4.9 * t * t;
int y_c = ceil(y);
int N = y_c / 5 + (y_c % 5 > 0);
cout << N + 1 << endl;
}
return 0;
} | replace | 6 | 7 | 6 | 7 | TLE | |
p00024 | C++ | Time Limit Exceeded | #include "bits/stdc++.h"
using namespace std;
int main() {
double v;
while (cin >> v, v) {
int N = 0;
double V = 0;
do {
N++;
double h = 5 * N - 5;
V = 9.8 * pow(h / 4.9, 0.5);
} while (V < v);
cout << N << endl;
}
} | #include "bits/stdc++.h"
using namespace std;
int main() {
double v;
while (cin >> v) {
int N = 0;
double V = 0;
do {
N++;
double h = 5 * N - 5;
V = 9.8 * pow(h / 4.9, 0.5);
} while (V < v);
cout << N << endl;
}
} | replace | 4 | 5 | 4 | 5 | TLE | |
p00025 | C++ | Time Limit Exceeded | #include <cstdio>
#include <iostream>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
int main() {
int a[4], b[4];
while (1) {
rep(i, 4) cin >> a[i];
rep(i, 4) cin >> b[i];
int blow = 0, hit = 0;
rep(i, 4) {
if (a[i] == b[i])
hit++;
}
rep(i, 4) for (int j ... | #include <cstdio>
#include <iostream>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
int main() {
int a[4], b[4];
while (1) {
rep(i, 4) cin >> a[i];
rep(i, 4) cin >> b[i];
if (cin.eof())
break;
int blow = 0, hit = 0;
rep(i, 4) {
if (a[i] == b[i])
hit++;... | insert | 10 | 10 | 10 | 12 | TLE | |
p00025 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
int a[4], b[4];
while (1) {
for (int i = 0; i < 4; i++)
cin >> a[i];
for (int i = 0; i < 4; i++)
cin >> b[i];
// hit
int hit = 0;
for (int i = 0; i < 4; i++)
hit += (a[i] == b[i]);
// blow
int blow = 0;
for ... | #include <iostream>
using namespace std;
int main() {
int a[4], b[4];
while (cin >> a[0] >> a[1] >> a[2] >> a[3] >> b[0] >> b[1] >> b[2] >> b[3]) {
// hit
int hit = 0;
for (int i = 0; i < 4; i++)
hit += (a[i] == b[i]);
// blow
int blow = 0;
for (int i = 0; i < 4; i++)
blow +=... | replace | 7 | 13 | 7 | 8 | TLE | |
p00025 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define INF 1000000
using namespace std;
int main() {
while (1) {
vector<int> a(4);
vector<int> b(4);
rep(i, 4) cin >> a[i];
rep(i, 4) cin >> b[i];
int hit = 0, blow = 0;
rep(i, 4) {
if (a[i] == b[i])
hit++;
... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define INF 1000000
using namespace std;
int main() {
vector<int> a(4);
vector<int> b(4);
while (cin >> a[0] >> a[1] >> a[2] >> a[3]) {
rep(i, 4) cin >> b[i];
int hit = 0, blow = 0;
rep(i, 4) {
if (a[i] == b[i])
hit++... | replace | 5 | 9 | 5 | 8 | TLE | |
p00025 | C++ | Time Limit Exceeded | #include <iostream>
#include <vector>
using namespace std;
int main() {
while (true) {
vector<int> a(4);
for (int i = 0; i < 4; i++)
cin >> a[i];
int hit = 0, blow = 0;
for (int i = 0; i < 4; i++) {
int b;
cin >> b;
for (int j = 0; j < 4; j++) {
if (a[j] == b) {
... | #include <iostream>
#include <vector>
using namespace std;
int main() {
vector<int> a(4);
while (cin >> a[0] >> a[1] >> a[2] >> a[3]) {
int hit = 0, blow = 0;
for (int i = 0; i < 4; i++) {
int b;
cin >> b;
for (int j = 0; j < 4; j++) {
if (a[j] == b) {
if (i == j)
... | replace | 4 | 8 | 4 | 6 | TLE | |
p00025 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
int a[4], b[4];
int hit, blow;
while (cin >> a[0] >> a[1] >> a[2] >> a[3] >> b[0] >> b[1] >> b[2] >> b[3]) {
hit = blow = 0;
for (int i = 0; i < 4; i++) {
if (a[i] == b[i]) {
hit++;
}
for (int j = 0; i < 4; j++) {
if ... | #include <iostream>
using namespace std;
int main() {
int a[4], b[4];
int hit, blow;
while (cin >> a[0] >> a[1] >> a[2] >> a[3] >> b[0] >> b[1] >> b[2] >> b[3]) {
hit = blow = 0;
for (int i = 0; i < 4; i++) {
if (a[i] == b[i]) {
hit++;
}
for (int j = 0; j < 4; j++) {
if ... | replace | 12 | 13 | 12 | 13 | TLE | |
p00025 | C++ | Time Limit Exceeded | #include <iostream>
int main(int argc, char **argv) {
while (true) {
int a[4];
int b[4];
std::cin >> a[0] >> a[1] >> a[2] >> a[3];
std::cin >> b[0] >> b[1] >> b[2] >> b[3];
int hit = 0, blow = 0;
for (int i = 0; i < 4; i++) {
if (a[i] == b[i]) {
hit++;
} else {
for... | #include <iostream>
int main(int argc, char **argv) {
int a[4];
int b[4];
while (std::cin >> a[0] >> a[1] >> a[2] >> a[3]) {
std::cin >> b[0] >> b[1] >> b[2] >> b[3];
int hit = 0, blow = 0;
for (int i = 0; i < 4; i++) {
if (a[i] == b[i]) {
hit++;
} else {
for (int j = 0; j... | replace | 3 | 7 | 3 | 6 | TLE | |
p00025 | C++ | Time Limit Exceeded | #include <array>
#include <iostream>
/*This function is a counter for "hit" and "blow".*/
void counter(int *n_a, int *n_b, int *hit, int *blow) {
*hit = 0;
*blow = 0;
for (int i = 0; i < 4; ++i) {
for (int j = 0; j < 4; ++j) {
// the case of factor and place are same
if (n_a[i] == n_b[j] && i =... | #include <array>
#include <iostream>
/*This function is a counter for "hit" and "blow".*/
void counter(int *n_a, int *n_b, int *hit, int *blow) {
*hit = 0;
*blow = 0;
for (int i = 0; i < 4; ++i) {
for (int j = 0; j < 4; ++j) {
// the case of factor and place are same
if (n_a[i] == n_b[j] && i =... | replace | 28 | 31 | 28 | 32 | TLE | |
p00025 | C++ | Time Limit Exceeded | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
int a[4], b[4];
while (scanf("%d %d %d %d %d %d %d %d", &a[0], &a[1], &a[2], &a[3], &b[0],
&b[1], &b[2], &b[3])) {
int hit = 0;
int blow = 0;
for (int i = 0; i < 4; i++)
for (int j = 0; j < 4; j++)
if ... | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
int a[4], b[4];
while (scanf("%d %d %d %d %d %d %d %d", &a[0], &a[1], &a[2], &a[3], &b[0],
&b[1], &b[2], &b[3]) != EOF) {
int hit = 0;
int blow = 0;
for (int i = 0; i < 4; i++)
for (int j = 0; j < 4; j++)
... | replace | 8 | 9 | 8 | 9 | TLE | |
p00025 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
for (;;) {
vector<int> a(4), b(4);
for (int i = 0; i < 4; i++) {
cin >> a.at(i);
}
for (int i = 0; i < 4; i++) {
cin >> b.at(i);
}
int hit = 0, blow = 0;
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) ... | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> a(4), b(4);
while (cin >> a.at(0) >> a.at(1) >> a.at(2) >> a.at(3) >> b.at(0) >>
b.at(1) >> b.at(2) >> b.at(3)) {
int hit = 0, blow = 0;
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
if (a.at(i) == ... | replace | 4 | 12 | 4 | 8 | TLE | |
p00026 | C++ | Runtime Error | #include <iostream>
#include <string>
using namespace std;
int main() {
int area[10][10] = {0};
int x, nx, ny, y, size;
int count = 0;
int max = 0;
char ch1, ch2;
while (cin >> x >> ch1 >> y >> ch2 >> size) {
nx = x + 2;
ny = y + 2;
switch (size) {
case 3:
area[nx - 2][ny]++;
ar... | #include <iostream>
#include <string>
using namespace std;
int main() {
int area[14][14] = {0};
int x, nx, ny, y, size;
int count = 0;
int max = 0;
char ch1, ch2;
while (cin >> x >> ch1 >> y >> ch2 >> size) {
nx = x + 2;
ny = y + 2;
switch (size) {
case 3:
area[nx - 2][ny]++;
ar... | replace | 5 | 6 | 5 | 6 | 0 | |
p00026 | C++ | Time Limit Exceeded | #include <fstream>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#define _USE_MATH_DEFINES
#include <algorithm>
#include <cmath>
#include <complex>
#include <map>
#include <math.h>
#include <queue>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define li long... | #include <fstream>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#define _USE_MATH_DEFINES
#include <algorithm>
#include <cmath>
#include <complex>
#include <map>
#include <math.h>
#include <queue>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define li long... | replace | 46 | 47 | 46 | 47 | TLE | |
p00026 | C++ | Time Limit Exceeded | #include <iostream>
#include <stdio.h>
using namespace std;
void solve() {
int dx[] = {1, 0, -1, 0, 1, 1, -1, -1, 2, 0, -2, 0};
int dy[] = {0, -1, 0, 1, 1, -1, 1, -1, 0, -2, 0, 2};
int field[10][10] = {0};
int x, y, size;
while (scanf("%d,%d,%d", &x, &y, &size)) {
++field[x][y];
int n = 4 * size;
... | #include <iostream>
#include <stdio.h>
using namespace std;
void solve() {
int dx[] = {1, 0, -1, 0, 1, 1, -1, -1, 2, 0, -2, 0};
int dy[] = {0, -1, 0, 1, 1, -1, 1, -1, 0, -2, 0, 2};
int field[10][10] = {0};
int x, y, size;
while (scanf("%d,%d,%d", &x, &y, &size) != EOF) {
++field[x][y];
int n = 4 * si... | replace | 9 | 10 | 9 | 10 | TLE | |
p00026 | C++ | Time Limit Exceeded | #include <cstdio>
#include <iostream>
int paper[10][10] = {};
void drop(int x, int y) {
if (x >= 0 && y >= 0 && x <= 9 && y <= 9) {
++paper[x][y];
}
}
void ink(int x, int y, int s) {
switch (s) {
case 3:
drop(x + 2, y);
drop(x - 2, y);
drop(x, y + 2);
drop(x, y - 2);
case 2:
drop(x ... | #include <cstdio>
#include <iostream>
int paper[10][10] = {};
void drop(int x, int y) {
if (x >= 0 && y >= 0 && x <= 9 && y <= 9) {
++paper[x][y];
}
}
void ink(int x, int y, int s) {
switch (s) {
case 3:
drop(x + 2, y);
drop(x - 2, y);
drop(x, y + 2);
drop(x, y - 2);
case 2:
drop(x ... | replace | 43 | 44 | 43 | 44 | TLE | |
p00026 | C++ | Time Limit Exceeded | #include <cstring>
#include <iostream>
using namespace std;
int small_x[4] = {-1, 0, 0, 1};
int small_y[4] = {0, -1, 1, 0};
int medium_x[8] = {-1, -1, -1, 0, 0, 1, 1, 1};
int medium_y[8] = {-1, 0, 1, -1, 1, -1, 0, 1};
int large_x[12] = {-2, -1, -1, -1, 0, 0, 0, 0, 1, 1, 1, 2};
int large_y[12] = {0, -1, 0, 1, -2, -1... | #include <cstring>
#include <iostream>
using namespace std;
int small_x[4] = {-1, 0, 0, 1};
int small_y[4] = {0, -1, 1, 0};
int medium_x[8] = {-1, -1, -1, 0, 0, 1, 1, 1};
int medium_y[8] = {-1, 0, 1, -1, 1, -1, 0, 1};
int large_x[12] = {-2, -1, -1, -1, 0, 0, 0, 0, 1, 1, 1, 2};
int large_y[12] = {0, -1, 0, 1, -2, -1... | replace | 18 | 19 | 18 | 19 | TLE | |
p00026 | C++ | Time Limit Exceeded | #include <iostream>
#include <stdio.h>
using namespace std;
int m[10][10];
void small(int x, int y, int r) {
if (y - r >= 0)
m[x][y - r]++;
if (x - r >= 0)
m[x - r][y]++;
if (x + r <= 9)
m[x + r][y]++;
if (y + r <= 9)
m[x][y + r]++;
m[x][y]++;
}
void middle(int x, int y) {
for (int i = -1; i... | #include <iostream>
#include <stdio.h>
using namespace std;
int m[10][10];
void small(int x, int y, int r) {
if (y - r >= 0)
m[x][y - r]++;
if (x - r >= 0)
m[x - r][y]++;
if (x + r <= 9)
m[x + r][y]++;
if (y + r <= 9)
m[x][y + r]++;
m[x][y]++;
}
void middle(int x, int y) {
for (int i = -1; i... | replace | 29 | 30 | 29 | 30 | TLE | |
p00026 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <functional>
#include <iostream>
#include <map>
#include <set>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
const double eps = 1e-10;
int main() {
int x, y, s, c[14][14] = {0};
whil... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <functional>
#include <iostream>
#include <map>
#include <set>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
const double eps = 1e-10;
int main() {
int x, y, s, c[14][14] = {0};
char... | replace | 19 | 20 | 19 | 21 | -11 | |
p00026 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define REP(i, a) FOR(i, 0, a)
int f[10][10];
int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
int main() {
int x, y, size;
while (scanf("%d,%d,%d", &x, &y, &size)) {
int x2, y2;
switch (size) {
case... | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define REP(i, a) FOR(i, 0, a)
int f[10][10];
int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
int main() {
int x, y, size;
while (scanf("%d,%d,%d", &x, &y, &size) != -1) {
int x2, y2;
switch (size) {
... | replace | 13 | 14 | 13 | 14 | TLE | |
p00026 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <list>
#include <set>
#include <stack>
#include <vector>
using namespace std;
#define REP(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define FOR(i, a, b) for (int(i) = (a); (i) < (b); (i)++)
#define PUSH(n, v) ... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <list>
#include <set>
#include <stack>
#include <vector>
using namespace std;
#define REP(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define FOR(i, a, b) for (int(i) = (a); (i) < (b); (i)++)
#define PUSH(n, v) ... | replace | 83 | 84 | 83 | 88 | TLE | |
p00027 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
int dayNum[12] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
string day[7] = {"Monday", "Tuesday", "Wednesday",
"Thursday", // ... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
int dayNum[12] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
string day[7] = {"Monday", "Tuesday", "Wednesday",
"Thursday", // ... | replace | 30 | 31 | 30 | 31 | 0 | |
p00027 | C++ | Runtime Error | #define _USE_MATH_DEFINES
#include <algorithm>
#include <cctype>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <queue>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define INF (1 << 20)
#define EPS (1e-10)
#define EQ(a, b) (fabs((a) - (b)) < EPS)
int... | #define _USE_MATH_DEFINES
#include <algorithm>
#include <cctype>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <queue>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define INF (1 << 20)
#define EPS (1e-10)
#define EQ(a, b) (fabs((a) - (b)) < EPS)
int... | replace | 30 | 31 | 30 | 31 | 0 | |
p00027 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string.h>
#include <string>
using namespace std;
#define REP(i, n) for (int i = 0; i < n; i++)
#define RREP(i, n) for (int i = (n)... | #include <algorithm>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string.h>
#include <string>
using namespace std;
#define REP(i, n) for (int i = 0; i < n; i++)
#define RREP(i, n) for (int i = (n)... | insert | 292 | 292 | 292 | 294 | -11 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.