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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p02403 | C++ | Runtime Error | #include <stdio.h>
int main(void) {
int H, W, i, j;
while (1) {
scanf("%d %d\n", H, W);
if (H == 0 && W == 0) {
break;
}
for (i = 0; i < H; i++) {
for (j = 0; j < W; j++) {
printf("#");
}
printf("\n");
}
printf("\n");
}
return 0;
}
| #include <stdio.h>
int main(void) {
int H, W, i, j;
while (1) {
scanf("%d %d", &H, &W);
if (H == 0 && W == 0) {
break;
}
for (i = 0; i < H; i++) {
for (j = 0; j < W; j++) {
printf("#");
}
printf("\n");
}
printf("\n");
}
return 0;
}
| replace | 5 | 6 | 5 | 6 | -11 | |
p02403 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
while (1) {
int H, W;
cin >> H >> W;
if (H == 0 && W == 0)
break;
for (int i = 0; i = H; i++) {
for (int j = 0; j < W; j++) {
cout << "#";
}
cout << endl;
}
cout << endl;
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
while (1) {
int H, W;
cin >> H >> W;
if (H == 0 && W == 0)
break;
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
cout << "#";
}
cout << endl;
}
cout << endl;
}
return 0;
}
| replace | 10 | 11 | 10 | 11 | TLE | |
p02403 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#include <math.h>
using namespace std;
long long a[10005];
int main() {
int H, W, i, j;
cin >> H >> W;
i = 0;
j = 0;
while (H != 0 || W != 0) {
for (i = 0; i < H; i++) {
for (j = 0; j < W; j++) {
cout << "#";
}
cout << endl;
}
}
}
| #include <bits/stdc++.h>
#include <math.h>
using namespace std;
long long a[10005];
int main() {
int H, W, i = 0, j = 0;
bool b = false;
while (cin >> H >> W) {
if (H == 0 && W == 0) {
cout << endl;
break;
}
if (b == true)
cout << endl;
b = true;
for (i = 0; i < H; i++) {
... | replace | 5 | 10 | 5 | 15 | TLE | |
p02403 | C++ | Runtime Error | #include <stdio.h>
int main() {
int i, j;
int h, w;
while (1) {
scanf("%d %d", h, w);
if (!(h || w))
break;
for (i = 0; i < h; i++) {
for (j = 0; j < w; j++)
printf("#");
printf("\n");
}
printf("\n");
}
return 0;
} | #include <stdio.h>
int main() {
int i, j;
int h, w;
while (1) {
scanf("%d %d", &h, &w);
if (!(h || w))
break;
for (i = 0; i < h; i++) {
for (j = 0; j < w; j++)
printf("#");
printf("\n");
}
printf("\n");
}
return 0;
} | replace | 7 | 8 | 7 | 8 | -11 | |
p02403 | C++ | Time Limit Exceeded | #include <iostream>
#include <math.h>
#include <stdio.h>
#define PI 3.1415926535897932384626433832795028841971
using namespace std;
int main() {
int w, h;
while (true) {
cin >> w >> h;
for (int hh = 0; hh < h; hh++) {
for (int ww = 0; ww < w; ww++) {
cout << '#';
}
cout << endl;... | #include <iostream>
#include <math.h>
#include <stdio.h>
#define PI 3.1415926535897932384626433832795028841971
using namespace std;
int main() {
int w, h;
while (true) {
cin >> h >> w;
if (w == 0 && h == 0) {
break;
}
for (int hh = 0; hh < h; hh++) {
for (int ww = 0; ww < w; ww++) {
... | replace | 10 | 11 | 10 | 14 | TLE | |
p02403 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <numeric>
#include <string>
#include <vector>
typedef long long ll;
#define REP(i, n) for (int(i) = 0; (i) < (n); (i)++)
using namespace std;
int main() {
int H, W;
while (true) {
cin >> H >> W;
if ((H != 0) || (W != 0)) ... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <numeric>
#include <string>
#include <vector>
typedef long long ll;
#define REP(i, n) for (int(i) = 0; (i) < (n); (i)++)
using namespace std;
int main() {
int H, W;
while (true) {
cin >> H >> W;
if ((H != 0) || (W != 0)) ... | replace | 22 | 23 | 22 | 24 | TLE | |
p02403 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
int H, W;
while (true) {
cin >> H >> W;
if (H == 0 && W == 0)
break;
for (int i = 0; i < H; ++i) {
for (int j = 0; i < W; ++j) {
cout << '#';
}
cout << endl;
}
cout << endl;
}
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int H, W;
while (true) {
cin >> H >> W;
if (H == 0 && W == 0)
break;
for (int i = 0; i < H; ++i) {
for (int j = 0; j < W; ++j) {
cout << '#';
}
cout << endl;
}
cout << endl;
}
return 0;
}
| replace | 11 | 12 | 11 | 12 | TLE | |
p02403 | C++ | Runtime Error | #include <stdio.h>
int main() {
int h, w;
while (scanf("%d %d", h, w) && (h != 0 || w != 0)) {
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
printf("#");
}
printf("\n");
}
printf("\n");
}
return 0;
}
| #include <stdio.h>
int main() {
int h, w;
while (scanf("%d %d", &h, &w) && (h != 0 || w != 0)) {
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
printf("#");
}
printf("\n");
}
printf("\n");
}
return 0;
}
| replace | 4 | 5 | 4 | 5 | -11 | |
p02403 | C++ | Time Limit Exceeded | #include <stdio.h>
int main(void) {
int x, y;
int i, j;
while (1) {
scanf("%d %d\n", &x, &y);
for (i = 0; i < x; i++) {
for (j = 0; j < y; j++) {
printf("#");
}
printf("\n");
}
printf("\n");
}
return 0;
}
| #include <stdio.h>
int main(void) {
int x, y;
int i, j;
while (1) {
scanf("%d %d\n", &x, &y);
if (x == 0 && y == 0)
break;
for (i = 0; i < x; i++) {
for (j = 0; j < y; j++) {
printf("#");
}
printf("\n");
}
printf("\n");
}
return 0;
}
| insert | 7 | 7 | 7 | 9 | TLE | |
p02403 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
while ((H != 0) || (W != 0)) {
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
cout << "#";
}
cout << endl;
}
cout << endl;
}
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
while ((H != 0) || (W != 0)) {
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
cout << "#";
}
cout << endl;
}
cout << endl;
cin >> H >> W;
}
return 0;
}
| insert | 14 | 14 | 14 | 15 | TLE | |
p02403 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
int H, W;
while (1) {
cin >> H >> W;
if (H == 0 || W == 0) {
H = W = -1;
if (H == 0 && W == 0) {
break;
}
}
for (int i = 0; i < H; i++) {
for (int ii = 0; ii < W; ii++) {
cout << "#";
}
cout << ... | #include <iostream>
using namespace std;
int main() {
int H, W;
while (1) {
cin >> H >> W;
if (H == 0 && W == 0) {
break;
}
for (int i = 0; i < H; i++) {
for (int ii = 0; ii < W; ii++) {
cout << "#";
}
cout << endl;
}
cout << endl;
}
return 0;
} | replace | 6 | 11 | 6 | 9 | TLE | |
p02403 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
while (1) {
int H, W;
cin >> H >> W;
if (H == 0 && W == 0)
break;
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; i++) {
cout << "#";
}
cout << endl;
}
cout << endl;
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
while (1) {
int H, W;
cin >> H >> W;
if (H == 0 && W == 0)
break;
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
cout << "#";
}
cout << endl;
}
cout << endl;
}
return 0;
}
| replace | 9 | 10 | 9 | 10 | TLE | |
p02403 | C++ | Time Limit Exceeded | #include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int h, w, i, j;
for (;;) {
cin >> h >> w;
for (i = 0; i < h; i++) {
for (j = 0; j < w; j++) {
cout << "#";
}
cout << endl;
}
cout << endl;
}
return 0;
} | #include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int h, w, i, j;
for (;;) {
cin >> h >> w;
if (h == 0 && w == 0) {
break;
}
for (i = 0; i < h; i++) {
for (j = 0; j < w; j++) {
cout << "#";
}
cout << endl;
}
cout << endl;
}
return 0;... | insert | 7 | 7 | 7 | 10 | TLE | |
p02404 | C++ | Time Limit Exceeded | #include <cstdio>
#include <cstring>
int main() {
char ss[101];
int h, w, i, j;
while (true) {
scanf("%d %d", &h, &w);
if ((h == 0) && (w == 0))
break;
strcpy(ss, "#");
for (i = 0; i < w - 2; i++)
strcat(ss, ".");
strcat(ss, "#\n");
for (i = 0; i < w; i++)
printf("#");
... | #include <cstdio>
#include <cstring>
int main() {
char ss[301];
int h, w, i, j;
while (true) {
scanf("%d %d", &h, &w);
if ((h == 0) && (w == 0))
break;
strcpy(ss, "#");
for (i = 0; i < w - 2; i++)
strcat(ss, ".");
strcat(ss, "#\n");
for (i = 0; i < w; i++)
printf("#");
... | replace | 3 | 4 | 3 | 4 | TLE | |
p02404 | C++ | Time Limit Exceeded | #include <cmath>
#include <cstdlib>
#include <ctime>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <string>
using namespace std;
int main() {
std::ifstream in("input.txt");
std::cin.rdbuf(in.rdbuf());
int h, w;
while (true) {
cin >> h >> w;
if (h == 0 and w == 0) {
break;
... | #include <cmath>
#include <cstdlib>
#include <ctime>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <string>
using namespace std;
int main() {
int h, w;
while (true) {
cin >> h >> w;
if (h == 0 and w == 0) {
break;
}
for (int i = 0; i < h; i++) {
for (int j = 0; j ... | delete | 11 | 13 | 11 | 11 | TLE | |
p02404 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
int H, W;
while (1) {
cin >> H >> W;
for (int i = 0; i < W; i++)
cout << "#";
cout << endl;
for (int i = 1; i < H - 1; i++) {
cout << "#";
for (int i = 1; i < W - 1; i++)
cout << ".";
cout << "#" << endl;
}
... | #include <iostream>
using namespace std;
int main() {
int H, W;
while (1) {
cin >> H >> W;
if (W == 0 && H == 0)
break;
for (int i = 0; i < W; i++)
cout << "#";
cout << endl;
for (int i = 1; i < H - 1; i++) {
cout << "#";
for (int i = 1; i < W - 1; i++)
cout << "... | insert | 7 | 7 | 7 | 9 | TLE | |
p02404 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
int a, b;
while (1) {
cin >> a >> b;
for (int i = 1; i <= a; i++) {
for (int j = 1; j <= b; j++) {
if (i == 1 || j == 1 || i == a || j == b) {
cout << "#";
} else {
cout << ".";
}
}
cout << e... | #include <iostream>
using namespace std;
int main() {
int a, b;
while (1) {
cin >> a >> b;
if (a == 0 && b == 0) {
break;
}
for (int i = 1; i <= a; i++) {
for (int j = 1; j <= b; j++) {
if (i == 1 || j == 1 || i == a || j == b) {
cout << "#";
} else {
... | insert | 7 | 7 | 7 | 10 | TLE | |
p02404 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
while (h || w) {
for (int i = 0; i < w; ++i) {
cout << "#";
}
cout << endl;
for (int i = 1; i < h - 1; ++i) {
cout << "#";
for (int j = 1; j < w - 1; ++j) {
cout << ".";
}
cout <<... | #include <iostream>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
while (h || w) {
for (int i = 0; i < w; ++i) {
cout << "#";
}
cout << endl;
for (int i = 1; i < h - 1; ++i) {
cout << "#";
for (int j = 1; j < w - 1; ++j) {
cout << ".";
}
cout <<... | insert | 23 | 23 | 23 | 24 | TLE | |
p02404 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
int H, W;
int i, j;
while (1) {
char fig1[101] = {0};
char fig2[101] = {0};
cin >> H >> W;
if (H == 0 && W == 0)
break;
for (i = 0; i < W; i++) {
fig1[i] = '#';
}
fig2[0] = '#';
fig2[W - 1] = '#';
for (i = 1; i ... | #include <iostream>
using namespace std;
int main() {
int H, W;
int i, j;
while (1) {
char fig1[301] = {0};
char fig2[301] = {0};
cin >> H >> W;
if (H == 0 && W == 0)
break;
for (i = 0; i < W; i++) {
fig1[i] = '#';
}
fig2[0] = '#';
fig2[W - 1] = '#';
for (i = 1; i ... | replace | 7 | 9 | 7 | 9 | TLE | |
p02404 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
int h, w;
while (true) {
cin >> h >> w;
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
if (i == 0 || i == h - 1)
cout << "#";
else {
if (j == 0 || j == w - 1)
cout << "#";
else... | #include <iostream>
using namespace std;
int main() {
int h, w;
while (true) {
cin >> h >> w;
if (h == 0 && w == 0)
break;
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
if (i == 0 || i == h - 1)
cout << "#";
else {
if (j == 0 || j == w - 1... | insert | 7 | 7 | 7 | 11 | TLE | |
p02404 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
while (true) {
int h, w;
cin >> h >> w;
for (int i = 0; i < w; i++)
cout << '#';
cout << endl;
for (int i = 2; i < h; i++) {
cout << '#';
for (int j = 2; j < w; j++)
cout << '.';
cout << '#' << endl;
}
... | #include <bits/stdc++.h>
using namespace std;
int main() {
while (true) {
int h, w;
cin >> h >> w;
if (h == 0 && w == 0)
break;
for (int i = 0; i < w; i++)
cout << '#';
cout << endl;
for (int i = 2; i < h; i++) {
cout << '#';
for (int j = 2; j < w; j++)
cout << ... | insert | 6 | 6 | 6 | 8 | TLE | |
p02404 | C++ | Time Limit Exceeded | #include <stdio.h>
int main() {
int h, w;
while (scanf("%d %d", &h, &w) && (h != 0 || w != 0)) {
for (int i = 0; i < h; i++) {
printf("#");
for (int j = 0; i < h - 2; j++) {
printf(".");
}
printf("#\n");
}
printf("\n");
}
return 0;
}
| #include <stdio.h>
int main() {
int h, w;
while (scanf("%d %d", &h, &w) && (h != 0 || w != 0)) {
for (int i = 0; i < h; i++) {
printf("#");
for (int j = 0; j < w - 2; j++) {
if (i == 0 || i == h - 1) {
printf("#");
} else {
printf(".");
}
}
pr... | replace | 7 | 9 | 7 | 13 | TLE | |
p02404 | C++ | Time Limit Exceeded | #include <iostream>
int main(int argc, char const *argv[]) {
int h, w;
std::cin >> h >> w;
while (!(h == 0 && h == w)) {
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; i++) {
if (i == 0 || i == h - 1 || j == 0 || j == w - 1) {
std::cout << "#";
} else {
std::co... | #include <iostream>
int main(int argc, char const *argv[]) {
int h, w;
std::cin >> h >> w;
while (!(h == 0 && h == w)) {
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
if (i == 0 || i == h - 1 || j == 0 || j == w - 1) {
std::cout << "#";
} else {
std::co... | replace | 7 | 8 | 7 | 8 | TLE | |
p02404 | C++ | Runtime Error | #include <stdio.h>
int main() {
int H, W;
while (1) {
scanf("%d %d", H, W);
if (H == 0 && W == 0)
break;
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
if (i == 0 || i == H - 1) {
printf("#");
} else {
if (j == 0 || j == W - 1) {
p... | #include <stdio.h>
int main() {
int H, W;
while (1) {
scanf("%d %d", &H, &W);
if (H == 0 && W == 0)
break;
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
if (i == 0 || i == H - 1) {
printf("#");
} else {
if (j == 0 || j == W - 1) {
... | replace | 4 | 5 | 4 | 5 | -11 | |
p02404 | C++ | Time Limit Exceeded | #include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int H, W;
while (1) {
cin >> H >> W;
for (int i = 0; i < W; i++) {
cout << "#";
}
cout << endl;
for (int i = 0; i < H - 2; i++) {
cout << "#";
for (int i = 0; i < W - 2; i++) {
cout << ".";
... | #include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int H, W;
while (1) {
cin >> H >> W;
if (H == 0 && W == 0)
return 0;
for (int i = 0; i < W; i++) {
cout << "#";
}
cout << endl;
for (int i = 0; i < H - 2; i++) {
cout << "#";
for (int i = 0; i <... | insert | 8 | 8 | 8 | 10 | TLE | |
p02405 | C++ | Time Limit Exceeded | #include <stdio.h>
int main() {
int H, W;
while (1) {
scanf("%d %d", &H, &W);
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
if (i % 2 == 0) {
if (j % 2 == 0) {
printf("#");
} else {
printf(".");
}
} else {
if... | #include <stdio.h>
int main() {
int H, W;
while (1) {
scanf("%d %d", &H, &W);
if (H == 0 && W == 0)
break;
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
if (i % 2 == 0) {
if (j % 2 == 0) {
printf("#");
} else {
printf(".");
... | insert | 5 | 5 | 5 | 7 | TLE | |
p02405 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
while (h != 0 || w != 0) {
int i, j, k;
for (i = 0; i < h; i++) {
for (j = 0; j < w; j++) {
k = i + j;
if (k % 2 == 0)
cout << "#";
else
cout << ".";
}
cout << endl;... | #include <iostream>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
while (h != 0 || w != 0) {
int i, j, k;
for (i = 0; i < h; i++) {
for (j = 0; j < w; j++) {
k = i + j;
if (k % 2 == 0)
cout << "#";
else
cout << ".";
}
cout << endl;... | insert | 18 | 18 | 18 | 19 | TLE | |
p02405 | C++ | Time Limit Exceeded | #include <stdio.h>
int main() {
int a, b;
while (1) {
scanf("%d %d", &a, &b);
for (int i = 0; i < a; i++) {
for (int j = 0; j < b; j++) {
if (i % 2 == 0) {
if (j % 2 == 0)
printf("#");
else
printf(".");
} else {
if (j % 2 == 0)
... | #include <stdio.h>
int main() {
int a, b;
while (1) {
scanf("%d %d", &a, &b);
if (a == 0 || b == 0)
break;
for (int i = 0; i < a; i++) {
for (int j = 0; j < b; j++) {
if (i % 2 == 0) {
if (j % 2 == 0)
printf("#");
else
printf(".");
... | insert | 6 | 6 | 6 | 8 | TLE | |
p02405 | C++ | Time Limit Exceeded | #include <iomanip>
#include <iostream>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
while (h != 0 || w != 0) {
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
if ((i + j) % 2 == 0) {
cout << "#";
} else {
cout << ".";
}
}
... | #include <iomanip>
#include <iostream>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
while (h != 0 || w != 0) {
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
if ((i + j) % 2 == 0) {
cout << "#";
} else {
cout << ".";
}
}
... | insert | 19 | 19 | 19 | 20 | TLE | |
p02405 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
int H = 0, W = 0;
while (1) {
cin >> H >> W;
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
if (i % 2 == 0 && j % 2 == 0)
cout << "#";
if (i % 2 == 0 && j % 2 != 0)
cout << ".";
if (i % 2 !=... | #include <iostream>
using namespace std;
int main() {
int H = 0, W = 0;
while (1) {
cin >> H >> W;
if (H == 0 && W == 0)
break;
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
if (i % 2 == 0 && j % 2 == 0)
cout << "#";
if (i % 2 == 0 && j % 2 != 0)
... | insert | 7 | 7 | 7 | 9 | TLE | |
p02405 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
int W, H = 0;
char c = '#';
cin >> H >> W;
do {
for (int i = 0; i < H; i++) {
if (i % 2 == 0) {
c = '#';
} else {
c = '.';
}
for (int j = 0; j < W; j++) {
cout << c;
if (c == '#') {
c = '... | #include <iostream>
using namespace std;
int main() {
int W, H = 0;
char c = '#';
cin >> H >> W;
do {
for (int i = 0; i < H; i++) {
if (i % 2 == 0) {
c = '#';
} else {
c = '.';
}
for (int j = 0; j < W; j++) {
cout << c;
if (c == '#') {
c = '... | insert | 24 | 24 | 24 | 26 | TLE | |
p02405 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
while (1) {
int h, w;
cin >> h >> w;
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
if ((i + j) % 2 == 0) {
cout << "#";
} else {
cout << ".";
}
}
cout << endl;
}
cout <... | #include <iostream>
using namespace std;
int main() {
while (1) {
int h, w;
cin >> h >> w;
if (h == 0 && w == 0) {
break;
}
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
if ((i + j) % 2 == 0) {
cout << "#";
} else {
cout << ".";
... | insert | 6 | 6 | 6 | 9 | TLE | |
p02405 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
for (int x = 0; true; x++) {
int h, w;
cin >> h >> w;
for (int i = 1; i <= h; i++) {
for (int j = 1; j <= w; j++) {
if ((i + j) % 2 == 0) {
cout << "#";
} else {
cout << ".";
}
if (j == w) {... | #include <iostream>
using namespace std;
int main() {
for (int x = 0; true; x++) {
int h, w;
cin >> h >> w;
if (h == 0 && w == 0)
break;
for (int i = 1; i <= h; i++) {
for (int j = 1; j <= w; j++) {
if ((i + j) % 2 == 0) {
cout << "#";
} else {
cout ... | insert | 8 | 8 | 8 | 11 | TLE | |
p02406 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
for (int i = 1; i <= n; ++i) {
int x = i;
if (x % 3 == 0) {
cout << " " << i;
continue;
} else {
while (x) {
if (x % 10 == 3) {
cout << " " << i;
continue;
}
x /= 10;... | #include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
for (int i = 1; i <= n; ++i) {
int x = i;
if (x % 3 == 0) {
cout << " " << i;
continue;
} else {
while (x) {
if (x % 10 == 3) {
cout << " " << i;
break;
}
x /= 10;
... | replace | 17 | 18 | 17 | 18 | TLE | |
p02406 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int n;
int main() {
cin >> n;
for (int i = 1; i <= n; ++i) {
int x = i;
if (x % 3 == 0) {
cout << " " << i;
} else {
while (x >= 0) {
if (x % 10 == 3) {
cout << " " << i;
break;
}
x = x / 10;
}
}... | #include <iostream>
using namespace std;
int n;
int main() {
cin >> n;
for (int i = 1; i <= n; ++i) {
int x = i;
if (x % 3 == 0) {
cout << " " << i;
} else {
while (x > 0) {
if (x % 10 == 3) {
cout << " " << i;
break;
}
x = x / 10;
}
}
... | replace | 12 | 13 | 12 | 13 | TLE | |
p02406 | C++ | Time Limit Exceeded | #include <iostream>
#include <stdio.h>
using namespace std;
int main(void) {
int n;
cin >> n;
for (int i = 1; i <= n; i++) {
int x = i;
if (x % 3 == 0) {
cout << " " << i;
} else {
do {
if (x % 10 == 3) {
cout << " " << i;
break;
}
x /= 10;
... | #include <iostream>
#include <stdio.h>
using namespace std;
int main(void) {
int n;
cin >> n;
for (int i = 1; i <= n; i++) {
int x = i;
if (x % 3 == 0) {
cout << " " << i;
} else {
do {
if (x % 10 == 3) {
cout << " " << i;
break;
}
x /= 10;
... | replace | 18 | 19 | 18 | 19 | TLE | |
p02406 | C++ | Time Limit Exceeded | #include <cstdio>
#include <iomanip>
#include <iostream>
using namespace std;
const int M = 100000;
const double pi = 3.141592653589;
int main() {
int n;
cin >> n;
for (int i = 1; i <= n; i++) {
if (i % 3 == 0) {
cout << " " << i;
} else {
int x = i;
while ((x % 10) != 3 || x != 0) {
... | #include <cstdio>
#include <iomanip>
#include <iostream>
using namespace std;
const int M = 100000;
const double pi = 3.141592653589;
int main() {
int n;
cin >> n;
for (int i = 1; i <= n; i++) {
if (i % 3 == 0) {
cout << " " << i;
} else {
int x = i;
while ((x % 10) != 3 && x != 0) {
... | replace | 15 | 16 | 15 | 16 | TLE | |
p02406 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
for (int i = 1; i <= n; i++) {
int x = i;
while (x > 0) {
if (x % 3 == 0 || x % 10 == 3) {
cout << " " << i;
} else {
x /= 10;
}
}
}
cout << endl;
return 0;
} | #include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
for (int i = 1; i <= n; i++) {
if (i % 3 == 0) {
cout << " " << i;
} else {
for (int x = i; x != 0; x /= 10) {
if (x % 10 == 3) {
cout << " " << i;
break;
}
}
}
}
cout << e... | replace | 7 | 13 | 7 | 15 | TLE | |
p02406 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <iostream>
#include <limits>
#include <math.h>
#include <sstream>
#include <stdio.h>
#include <string.h>
#include <string>
using namespace std;
int main(void) {
long n, q[1000];
cin >> n;
for (long i = 1; i < n + 1; i++) {
if (i % 3 == 0) {
cout << " " ... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <limits>
#include <math.h>
#include <sstream>
#include <stdio.h>
#include <string.h>
#include <string>
using namespace std;
int main(void) {
long n, q[10000];
cin >> n;
for (long i = 1; i < n + 1; i++) {
if (i % 3 == 0) {
cout << " "... | replace | 13 | 14 | 13 | 14 | 0 | |
p02406 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int i = 1;
for (int i = 1; i <= n; i++) {
int x = i;
if (x % 3 == 0) {
cout << " " << i;
continue;
}
do {
if (x % 10 == 3) {
cout << " " << i;
continue;
}
x /= 10;
} while (x... | #include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int i = 1;
for (int i = 1; i <= n; i++) {
int x = i;
if (x % 3 == 0) {
cout << " " << i;
continue;
}
do {
if (x % 10 == 3) {
cout << " " << i;
break;
}
x /= 10;
} while (x);
... | replace | 16 | 17 | 16 | 17 | TLE | |
p02406 | C++ | Time Limit Exceeded | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
for (int i = 1; i <= n; i++) {
if (i % 3 == 0) {
cout << " " << i;
} else if (i % 10 == 3) {
cout << " " << i;
} else if ((i /= 10) % 10 == 3) {
cout << " " << i;
}
}
... | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
for (int i = 1; i <= n; i++) {
if (i % 3 == 0) {
cout << " " << i;
} else if (i % 10 == 3) {
cout << " " << i;
} else if ((i / 10) % 10 == 3) {
cout << " " << i;
} else i... | replace | 14 | 15 | 14 | 20 | TLE | |
p02406 | C++ | Runtime Error | #include <iostream>
#include <stdio.h>
int main(void) {
int n;
scanf("%d", n);
int i = 1;
while (++i <= n) {
int x = i;
if (x % 3 == 0) {
std::cout << " " << i;
continue;
}
while (x) {
if (x % 10 == 3) {
std::cout << " " << i;
break;
}
x /= 10;
... | #include <iostream>
#include <stdio.h>
int main(void) {
int n;
scanf("%d", &n);
int i = 1;
while (++i <= n) {
int x = i;
if (x % 3 == 0) {
std::cout << " " << i;
continue;
}
while (x) {
if (x % 10 == 3) {
std::cout << " " << i;
break;
}
x /= 10;
... | replace | 6 | 7 | 6 | 7 | -11 | |
p02406 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
bool has3(int x) {
while (1) {
if (x % 10 == 3)
return true;
x /= 10;
}
return false;
}
void call(int n) {
for (int x = 1; x <= n; x++) {
if (x % 3 == 0 || has3(x)) {
cout << " " << x;
}
}
cout << endl;
}
int main() {
int n;
cin >> ... | #include <iostream>
using namespace std;
bool has3(int x) {
while (x) {
if (x % 10 == 3)
return true;
x /= 10;
}
return false;
}
void call(int n) {
for (int x = 1; x <= n; x++) {
if (x % 3 == 0 || has3(x)) {
cout << " " << x;
}
}
cout << endl;
}
int main() {
int n;
cin >> ... | replace | 4 | 5 | 4 | 5 | TLE | |
p02406 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
int a = 1, b, c, count = 0;
cin >> b;
for (; count < b; count++) {
if (a % 3 == 0 || a % 10 == 3) {
cout << ' ' << a;
} else {
for (c = 1; c != 0;) {
c = a / 10;
if (c % 10 == 3) {
cout << ' ' << a;
break... | #include <iostream>
using namespace std;
int main() {
int a = 1, b, c, count = 0;
cin >> b;
for (; count < b; count++) {
if (a % 3 == 0 || a % 10 == 3) {
cout << ' ' << a;
} else {
for (c = a; c != 0;) {
c /= 10;
if (c % 10 == 3) {
cout << ' ' << a;
break;
... | replace | 9 | 11 | 9 | 11 | TLE | |
p02406 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
void call(int n);
void call(int n) {
int x;
for (int i = 1; i <= n; i++) {
x = i;
if (x % 3 == 0) {
cout << " " << i;
} else {
do {
if (x % 10 == 3) {
cout << " " << i;
break;
}
x / 10;
} while (x);... | #include <iostream>
using namespace std;
void call(int n);
void call(int n) {
int x;
for (int i = 1; i <= n; i++) {
x = i;
if (x % 3 == 0) {
cout << " " << i;
} else {
do {
if (x % 10 == 3) {
cout << " " << i;
break;
}
x /= 10;
} while (x)... | replace | 18 | 19 | 18 | 19 | TLE | |
p02406 | C++ | Runtime Error | #include <iostream>
using namespace std;
void CHECK_NUM(int, int);
void INCLUDE3(int, int, int);
void END_CHECK_NUM(int, int);
int main() {
int n;
cin >> n;
CHECK_NUM(n, 1);
return 0;
}
void CHECK_NUM(int n, int i) {
int x = i;
if (x % 3 == 0) {
cout << " " << i;
END_CHECK_NUM(n, i);
}
INCL... | #include <iostream>
using namespace std;
void CHECK_NUM(int, int);
void INCLUDE3(int, int, int);
void END_CHECK_NUM(int, int);
int main() {
int n;
cin >> n;
CHECK_NUM(n, 1);
return 0;
}
void CHECK_NUM(int n, int i) {
int x = i;
if (x % 3 == 0) {
cout << " " << i;
END_CHECK_NUM(n, i);
}
INCL... | replace | 43 | 44 | 43 | 44 | 1 | |
p02406 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
void nabeatsu(int n) {
int x;
for (int i = 1; i <= n; i++) {
x = i;
if (x % 3 == 0) {
cout << " " << i;
} else if (x % 10 == 3) {
cout << " " << i;
} else {
x /= 10;
if (x % 10 == 3) {
cout << " " << i;
} else if (x / 1... | #include <iostream>
using namespace std;
void nabeatsu(int n) {
int x;
for (int i = 1; i <= n; i++) {
x = i;
if (x % 3 == 0) {
cout << " " << i;
} else if (x % 10 == 3) {
cout << " " << i;
} else {
x /= 10;
if (x % 10 == 3) {
cout << " " << i;
} else if (x / 1... | delete | 29 | 31 | 29 | 29 | TLE | |
p02406 | C++ | Time Limit Exceeded | #include <iostream>
int main() {
int n;
std::cin >> n;
for (int i = 1; i <= n; i++) {
int x = i;
if (i % 3 == 0) {
std::cout << " " << i;
continue;
} else
while (x) {
if (x % 10 == 3) {
std::cout << " " << i;
continue;
}
x /= 10;
}
... | #include <iostream>
int main() {
int n;
std::cin >> n;
for (int i = 1; i <= n; i++) {
int x = i;
if (i % 3 == 0) {
std::cout << " " << i;
continue;
} else
while (x) {
if (x % 10 == 3) {
std::cout << " " << i;
break;
}
x /= 10;
}
}
... | replace | 14 | 15 | 14 | 15 | TLE | |
p02406 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int a;
cin >> a;
for (int i = 1; i <= a; i++) {
if (i % 3 == 0) {
cout << " " << i;
} else {
for (int j = 0;; j++) {
if (i == 0)
break;
if (i % 10 == 3) {
cout << " " << i;
} else {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int a;
cin >> a;
for (int i = 1; i <= a; i++) {
if (i % 3 == 0) {
cout << " " << i;
} else if (i % 10 == 3) {
cout << " " << i;
} else if ((i / 10) % 10 == 3) {
cout << " " << i;
} else if ((i / 100) % 10 == 3) {
c... | replace | 9 | 19 | 9 | 20 | TLE | |
p02406 | C++ | Time Limit Exceeded | #include <iomanip>
#include <iostream>
using namespace std;
int main() {
int n, x;
cin >> n;
for (int i = 1; i <= n; i++) {
if (i % 3 == 0) {
cout << " " << i;
} else {
x = i;
while (x > 0) {
if (x % 10 == 3) {
cout << " " << i;
} else {
x = x / 10;
... | #include <iomanip>
#include <iostream>
using namespace std;
int main() {
int n, x;
cin >> n;
for (int i = 1; i <= n; i++) {
if (i % 3 == 0) {
cout << " " << i;
} else {
x = i;
while (x > 0) {
if (x % 10 == 3) {
cout << " " << i;
break;
} else {
... | insert | 15 | 15 | 15 | 16 | TLE | |
p02407 | Python | Runtime Error | n = int(input)
lst = list(map(int, input().split()))
print(" ".join(lst[::-1]))
| input()
print(" ".join(input().split()[::-1]))
| replace | 0 | 3 | 0 | 2 | TypeError: int() argument must be a string, a bytes-like object or a real number, not 'builtin_function_or_method' | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02407/Python/s871236231.py", line 1, in <module>
n = int(input)
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'builtin_function_or_method'
|
p02407 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <functional>
#include <iomanip>
#include <iostream>
#include <stdlib.h>
#include <string>
#include <vector>
using namespace std;
int main() {
int n, m;
int maximum;
int a[1000];
while (true) {
cin >> n >> m;
if (n == 0 && m == 0)
... | #include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <functional>
#include <iomanip>
#include <iostream>
#include <stdlib.h>
#include <string>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> a(n);
for (int i = 0; i < n; i++)
cin >> a[i];
for (int i = n - 1; ... | replace | 12 | 36 | 12 | 20 | TLE | |
p02407 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int a[105];
int main() {
int n;
cin >> n;
for (int i = 0; i < n; i++)
cin >> a[i];
for (int i = n - 1; i > 0; i++)
cout << a[i] << " ";
cout << a[0] << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int a[105];
int main() {
int n;
cin >> n;
for (int i = 0; i < n; i++)
cin >> a[i];
for (int i = n - 1; i > 0; i--)
cout << a[i] << " ";
cout << a[0] << endl;
}
| replace | 8 | 9 | 8 | 9 | -11 | |
p02407 | C++ | Runtime Error | #include <iostream>
#include <vector>
#define loop(i, a, b) for (int i = a; i < b; i++)
#define rep(i, a) loop(i, 0, a)
using namespace std;
int main() {
int n;
vector<int> in(n);
rep(i, n) cin >> in[i];
rep(i, n - 1) cout << in[n - i - 1] << " ";
cout << in[0] << endl;
} | #include <iostream>
#include <vector>
#define loop(i, a, b) for (int i = a; i < b; i++)
#define rep(i, a) loop(i, 0, a)
using namespace std;
int main() {
int n;
cin >> n;
vector<int> in(n);
rep(i, n) cin >> in[i];
rep(i, n - 1) cout << in[n - i - 1] << " ";
cout << in[0] << endl;
} | insert | 7 | 7 | 7 | 8 | 0 | |
p02407 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main(void) {
int n, a[5] = {0};
cin >> n;
for (int i = 0; i < n; i++) {
cin >> a[i];
}
for (int i = n - 1; i >= 0; i--) {
if (i == n - 1) {
cout << a[i];
} else {
cout << " " << a[i];
}
}
cout << endl;
}
| #include <iostream>
using namespace std;
int main(void) {
int n, a[100] = {0};
cin >> n;
for (int i = 0; i < n; i++) {
cin >> a[i];
}
for (int i = n - 1; i >= 0; i--) {
if (i == n - 1) {
cout << a[i];
} else {
cout << " " << a[i];
}
}
cout << endl;
}
| replace | 3 | 4 | 3 | 4 | 0 | |
p02407 | C++ | Runtime Error | #include <iostream>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> numbers(n - 1);
for (int i = 0; i < n; i++) {
cin >> numbers[i];
}
for (int i = n; i > 1; i--) {
cout << numbers[i - 1] << ' ';
}
cout << numbers[0] << endl;
return 0;
} | #include <iostream>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> numbers(n);
for (int i = 0; i < n; i++) {
cin >> numbers[i];
}
for (int i = n; i > 1; i--) {
cout << numbers[i - 1] << ' ';
}
cout << numbers[0] << endl;
return 0;
} | replace | 7 | 8 | 7 | 8 | 0 | |
p02407 | C++ | Time Limit Exceeded | #include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int n;
cin >> n;
int a[100];
for (int i = 0; i < n; i++) {
cin >> a[i];
if (i == n - 1) {
cout << a[i];
for (i = n - 2; i >= 0; i--) {
cout << " " << a[i];
}
}
}
return 0;
}
| #include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int n;
cin >> n;
int a[100];
for (int i = 0; i < n; i++) {
cin >> a[i];
if (i == n - 1) {
cout << a[i];
for (i = n - 2; i >= 0; i--) {
cout << " " << a[i];
}
cout << endl;
break;
}
}
... | insert | 16 | 16 | 16 | 18 | TLE | |
p02407 | Python | Runtime Error | n = int(input())
a = list(map(int, input().split()))
a.reverse()
print(" ".join(a))
| n = int(input())
a = list(input().split())
a.reverse()
print(" ".join(a))
| replace | 1 | 2 | 1 | 2 | TypeError: sequence item 0: expected str instance, int found | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02407/Python/s100431651.py", line 4, in <module>
print(' '.join(a))
TypeError: sequence item 0: expected str instance, int found
|
p02407 | C++ | Time Limit Exceeded | #include <cstdio>
#include <iostream>
using namespace std;
#define MAX 100
int main(void) {
int n, a[MAX], i = 0;
do {
cin >> n;
} while (n > MAX || n < 0);
for (int i = 0; i < n; i++) {
cin >> a[i];
}
while (1) {
printf("%d", a[n - i]);
if (i == n)
break;
printf(" ");
}
pri... | #include <cstdio>
#include <iostream>
using namespace std;
#define MAX 100
int main(void) {
int n, a[MAX], i = 0;
do {
cin >> n;
} while (n > MAX || n < 0);
for (int i = 0; i < n; i++) {
cin >> a[i];
}
while (1) {
printf("%d", a[n - i - 1]);
if (i++ == n - 1)
break;
printf(" ");... | replace | 16 | 18 | 16 | 18 | TLE | |
p02407 | C++ | Runtime Error | #include <iostream>
// #include <stdio.h>
using namespace std;
int main() {
int n, m;
int a[10];
cin >> n;
// a = (int *)malloc(sizeof(int) * n);
for (int i = 0; i < n; i++) {
cin >> m;
a[i] = m;
}
for (int i = n - 1; i > 0; i--) {
cout << a[i] << " ";
}
cout << a[0];
cout << endl;
... | #include <iostream>
// #include <stdio.h>
using namespace std;
int main() {
int n, m;
int a[1000];
cin >> n;
// a = (int *)malloc(sizeof(int) * n);
for (int i = 0; i < n; i++) {
cin >> m;
a[i] = m;
}
for (int i = n - 1; i > 0; i--) {
cout << a[i] << " ";
}
cout << a[0];
cout << endl;
... | replace | 6 | 7 | 6 | 7 | 0 | |
p02407 | C++ | Runtime Error | #include <stdio.h>
int main(void) {
int i, n;
int arr[] = {};
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%d", &arr[i]);
}
for (i = 0; i < (n / 2); i++) {
int temp = arr[i];
arr[i] = arr[(n - 1) - i];
arr[(n - 1) - i] = temp;
}
for (i = 0; i < n; i++) {
if (i) {
prin... | #include <stdio.h>
int main(void) {
int i, n;
int arr[100] = {0};
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%d", &arr[i]);
}
for (i = 0; i < (n / 2); i++) {
int temp = arr[i];
arr[i] = arr[(n - 1) - i];
arr[(n - 1) - i] = temp;
}
for (i = 0; i < n; i++) {
if (i) {
... | replace | 4 | 5 | 4 | 5 | -6 | *** stack smashing detected ***: terminated
|
p02407 | C++ | Runtime Error | #define _USE_MATH_DEFINES
#include <algorithm>
#include <climits>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <stdio.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define ll long long
const int MOD = 1000000007; // 10^9+7
const string SPACE = " ";
ll... | #define _USE_MATH_DEFINES
#include <algorithm>
#include <climits>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <stdio.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define ll long long
const int MOD = 1000000007; // 10^9+7
const string SPACE = " ";
ll... | replace | 135 | 136 | 135 | 136 | -11 | |
p02407 | C++ | Runtime Error | #include <stdio.h>
int main(void) {
int i, n;
scanf("%d", &n);
int a[n];
for (i = 0; i < n; ++i)
scanf("%d", a[i]);
for (i = n - 1; i >= 0; --i) {
if (i)
printf("%d ", a[i]);
else
printf("%d\n", a[i]);
}
return 0;
}
| #include <stdio.h>
int main(void) {
int i, n;
scanf("%d", &n);
int a[n];
for (i = 0; i < n; ++i)
scanf("%d", &a[i]);
for (i = n - 1; i >= 0; --i) {
if (i)
printf("%d ", a[i]);
else
printf("%d\n", a[i]);
}
return 0;
}
| replace | 7 | 8 | 7 | 8 | -11 | |
p02407 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#define _USE_MATH_DEFINES
#include <functional>
#include <math.h>
#include <stdio.h>
#include <vector>
using namespace std;
int n;
vector<int> v;
int main() {
cin >> n;
for (int i = 0; i < n; ++i) {
int buf;
cin >> buf;
v.push_back(buf);
}
// sort(v.begin(... | #include <algorithm>
#include <iostream>
#define _USE_MATH_DEFINES
#include <functional>
#include <math.h>
#include <stdio.h>
#include <vector>
using namespace std;
int n;
vector<int> v;
int main() {
cin >> n;
for (int i = 0; i < n; ++i) {
int buf;
cin >> buf;
v.push_back(buf);
}
// sort(v.begin(... | replace | 23 | 25 | 23 | 28 | -11 | |
p02407 | C++ | Time Limit Exceeded | #include <stdio.h>
int main() {
int n = 0;
scanf("%d", &n);
int a[n + 1];
for (int i = 0; i < n; i++) {
scanf("%d", &a[i]);
}
for (int i = n - 1; i = 1; i--) {
printf("%d ", a[i]);
}
printf("%d\n", a[0]);
return 0;
}
| #include <stdio.h>
int main() {
int n = 0;
scanf("%d", &n);
int a[n + 1];
for (int i = 0; i < n; i++) {
scanf("%d", &a[i]);
}
for (int i = n - 1; i >= 1; i--) {
printf("%d ", a[i]);
}
printf("%d\n", a[0]);
return 0;
}
| replace | 10 | 11 | 10 | 11 | TLE | |
p02407 | C++ | Runtime Error | #include <cstdio>
int main(void) {
int n;
int a[1000];
scanf("%d", &n);
for (int i = 0; i < n; i++) {
scanf("%d", &a[i]);
}
for (int i = n - 1; i > 0; i++) {
printf("%d ", a[i]);
}
printf("%d\n", a[0]);
return 0;
} | #include <cstdio>
int main(void) {
int n;
int a[1000];
scanf("%d", &n);
for (int i = 0; i < n; i++) {
scanf("%d", &a[i]);
}
for (int i = n - 1; i > 0; i--) {
printf("%d ", a[i]);
}
printf("%d\n", a[0]);
return 0;
} | replace | 8 | 9 | 8 | 9 | -11 | |
p02408 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
int cards[3][12] = {0};
int num, i, x, y;
char ch;
cin >> num;
for (i = 0; i < num; i++) {
cin >> ch >> y;
if (ch == 'S')
x = 0;
else if (ch == 'H')
x = 1;
else if (ch == 'C')
x = 2;
else
x = 3;
cards[x][y - ... | #include <iostream>
using namespace std;
int main() {
int cards[4][13] = {0};
int num, i, x, y;
char ch;
cin >> num;
for (i = 0; i < num; i++) {
cin >> ch >> y;
if (ch == 'S')
x = 0;
else if (ch == 'H')
x = 1;
else if (ch == 'C')
x = 2;
else
x = 3;
cards[x][y - ... | replace | 3 | 4 | 3 | 4 | -6 | *** stack smashing detected ***: terminated
|
p02408 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
int cards[4][13] = {};
int n;
cin >> n;
for (int i = 0; i < n; i++) {
char c;
int a;
cin >> c >> a;
for (int j = 0; j < n; j++) {
if (c == 'S') {
cards[0][a] = 1;
} else if (c == 'H') {
cards[1][a] = 1;
} els... | #include <iostream>
using namespace std;
int main() {
int cards[4][14] = {};
int n;
cin >> n;
for (int i = 0; i < n; i++) {
char c;
int a;
cin >> c >> a;
for (int j = 0; j < n; j++) {
if (c == 'S') {
cards[0][a] = 1;
} else if (c == 'H') {
cards[1][a] = 1;
} els... | replace | 3 | 4 | 3 | 4 | 0 | |
p02408 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
char ch, card[4][13] = {false};
int n, i, a, j, k;
cin >> n;
for (i = 0; i < n; i++) {
cin >> ch >> a;
if (ch == 'S') {
card[0][a] = true;
}
if (ch == 'H') {
card[1][a] = true;
}
if (ch == 'C') {
card[2][a] = true;
... | #include <iostream>
using namespace std;
int main() {
char ch, card[4][14] = {false};
int n, i, a, j, k;
cin >> n;
for (i = 0; i < n; i++) {
cin >> ch >> a;
if (ch == 'S') {
card[0][a] = true;
}
if (ch == 'H') {
card[1][a] = true;
}
if (ch == 'C') {
card[2][a] = true;
... | replace | 3 | 4 | 3 | 4 | 0 | |
p02408 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
int n, x;
int card[4][13] = {0};
char t;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> t >> x;
switch (t) {
case 'S':
card[0][x] = 1;
break;
case 'H':
card[1][x] = 1;
break;
case 'C':
card[2][x] = 1;
... | #include <iostream>
using namespace std;
int main() {
int n, x;
int card[5][14] = {0};
char t;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> t >> x;
switch (t) {
case 'S':
card[0][x] = 1;
break;
case 'H':
card[1][x] = 1;
break;
case 'C':
card[2][x] = 1;
... | replace | 4 | 5 | 4 | 5 | 0 | |
p02408 | C++ | Runtime Error | #include <iostream>
int main() {
char si;
int n, mi;
int v[4][13] = {};
std::cin >> n;
for (int a = 0; a < n; a++) {
std::cin >> si >> mi;
if (si == 'S')
v[0][mi] = 1;
if (si == 'H')
v[1][mi] = 1;
if (si == 'C')
v[2][mi] = 1;
if (si == 'D')
v[3][mi] = 1;
}
for (... | #include <iostream>
int main() {
char si;
int n, mi;
int v[4][14] = {0};
std::cin >> n;
for (int a = 0; a < n; a++) {
std::cin >> si >> mi;
if (si == 'S')
v[0][mi] = 1;
if (si == 'H')
v[1][mi] = 1;
if (si == 'C')
v[2][mi] = 1;
if (si == 'D')
v[3][mi] = 1;
}
for ... | replace | 4 | 5 | 4 | 5 | 0 | |
p02408 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
bool cards[4][13];
int n, rank;
char suit;
for (int s = 0; s < 4; s++)
for (int r = 1; r <= 13; r++)
cards[s][r] = 0; //??¨??¨???????´????false??????
cin >> n;
for (int i = 0; i < n; i++) {
cin >> suit >> rank;
if (suit == 'S')
... | #include <iostream>
using namespace std;
int main() {
bool cards[4][14];
int n, rank;
char suit;
for (int s = 0; s < 4; s++)
for (int r = 1; r <= 13; r++)
cards[s][r] = 0; //??¨??¨???????´????false??????
cin >> n;
for (int i = 0; i < n; i++) {
cin >> suit >> rank;
if (suit == 'S')
... | replace | 4 | 5 | 4 | 5 | 0 | |
p02408 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
int main() {
int n, a;
// boolean???0??§????????????
//?????¨map??§????????¨?????????????????????????????????????????°??????????????§????????¨??????????°????????????????
/*????????????????????????????????????????????????for??§????????????????????????????????¨??§???... | #include "bits/stdc++.h"
using namespace std;
int main() {
int n, a;
// boolean???0??§????????????
//?????¨map??§????????¨?????????????????????????????????????????°??????????????§????????¨??????????°????????????????
/*????????????????????????????????????????????????for??§????????????????????????????????¨??§???... | replace | 9 | 10 | 9 | 10 | 0 | |
p02408 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#define _USE_MATH_DEFINES
#include <functional>
#include <map>
#include <math.h>
#include <stdio.h>
#include <vector>
using namespace std;
int n;
bool list[4][13];
vector<int> v;
map<char, int> m;
int main() {
m['S'] = 0;
m['H'] = 1;
m['C'] = 2;
m['D'] = 3;
cin >> n;... | #include <algorithm>
#include <iostream>
#define _USE_MATH_DEFINES
#include <functional>
#include <map>
#include <math.h>
#include <stdio.h>
#include <vector>
using namespace std;
int n;
bool list[4][13];
vector<int> v;
map<char, int> m;
int main() {
m['S'] = 0;
m['H'] = 1;
m['C'] = 2;
m['D'] = 3;
cin >> n;... | replace | 31 | 32 | 31 | 32 | TLE | |
p02408 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
bool cards[4][13];
for (int i = 0; i < 4; i++) {
for (int j = 1; j <= 13; j++) {
cards[i][j] = 1;
}
}
int n, rank;
char mark;
cin >> n;
for (int x = 1; x <= n; x++) {
cin >> mark >> rank;
if (mark == 'S') {
cards[0][rank... | #include <iostream>
using namespace std;
int main() {
int cards[4][14];
for (int i = 0; i < 4; i++) {
for (int j = 1; j <= 13; j++) {
cards[i][j] = 1;
}
}
int n, rank;
char mark;
cin >> n;
for (int x = 1; x <= n; x++) {
cin >> mark >> rank;
if (mark == 'S') {
cards[0][rank]... | replace | 4 | 5 | 4 | 5 | 0 | |
p02408 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
int n, N;
char K;
cin >> n;
bool cards[4][13];
for (int i = 0; i < 4; i++) {
for (int j = 1; j <= 13; j++) {
cards[i][j] = 0;
}
}
for (int i = 0; i < n; i++) {
cin >> K >> N;
if (K == 'S') {
cards[0][N] = 1;
}
if (K ... | #include <iostream>
using namespace std;
int main() {
int n, N;
char K;
cin >> n;
bool cards[4][14];
for (int i = 0; i < 4; i++) {
for (int j = 1; j <= 13; j++) {
cards[i][j] = 0;
}
}
for (int i = 0; i < n; i++) {
cin >> K >> N;
if (K == 'S') {
cards[0][N] = 1;
}
if (K ... | replace | 6 | 7 | 6 | 7 | 0 | |
p02408 | Python | Runtime Error | suit = {"S": 0, "H": 1, "C": 2, "D": 3}
suit_keys = list(suit.keys())
deck = [[suit_keys[i] + " " + str(j + 1) for j in range(13)] for i in range(4)]
for _ in range(int(input())):
card = input().split()
deck[suit[card[0]]][int(card[1])] = ""
for i in range(4):
for j in deck[i]:
if j != "":
... | suit = {"S": 0, "H": 1, "C": 2, "D": 3}
suit_keys = list(suit.keys())
deck = [[suit_keys[i] + " " + str(j + 1) for j in range(13)] for i in range(4)]
for _ in range(int(input())):
card = input().split()
deck[suit[card[0]]][int(card[1]) - 1] = ""
for i in range(4):
for j in deck[i]:
if j != "":
... | replace | 5 | 6 | 5 | 6 | IndexError: list assignment index out of range | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02408/Python/s709538093.py", line 6, in <module>
deck[suit[card[0]]][int(card[1])] = ""
IndexError: list assignment index out of range
|
p02408 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
int S[13], H[13], C[13], D[13], N, num;
char mark;
cin >> N;
for (int i = 0; i < N; i++)
S[i] = 0, H[i] = 0, C[i] = 0, D[i] = 0;
for (int i = 0; i < N; i++) {
cin >> mark >> num;
if (mark == 'S')
S[num - 1] = 1;
if (mark == 'H')
... | #include <iostream>
using namespace std;
int main() {
int S[13], H[13], C[13], D[13], N, num;
char mark;
cin >> N;
for (int i = 0; i < 13; i++)
S[i] = 0, H[i] = 0, C[i] = 0, D[i] = 0;
for (int i = 0; i < N; i++) {
cin >> mark >> num;
if (mark == 'S')
S[num - 1] = 1;
if (mark == 'H')
... | replace | 7 | 8 | 7 | 8 | -6 | *** stack smashing detected ***: terminated
|
p02408 | C++ | Runtime Error | #include <stdio.h>
int main(void) {
int a, s[5][13], d = 0, f, g, h, j, i;
char z[2];
for (i = 1; i <= 13; i++) {
s[1][i] = 0;
s[2][i] = 0;
s[3][i] = 0;
s[4][i] = 0;
}
scanf("%d", &a);
for (i = 1; i <= a; i++) {
scanf(" %c %d", &z[1], &d);
// printf("%d %d\n",i,d);
if (z[1] == 'S... | #include <stdio.h>
int main(void) {
int a, s[5][14], d = 0, f, g, h, j, i;
char z[2];
for (i = 1; i <= 13; i++) {
s[1][i] = 0;
s[2][i] = 0;
s[3][i] = 0;
s[4][i] = 0;
}
scanf("%d", &a);
for (i = 1; i <= a; i++) {
scanf(" %c %d", &z[1], &d);
// printf("%d %d\n",i,d);
if (z[1] == 'S... | replace | 2 | 3 | 2 | 3 | 0 | |
p02408 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
bool card[3][12] = {false};
int n, o, p;
string x;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> x >> o;
if (x == "S") {
card[0][o - 1] = true;
} else if (x == "H") {
card[1][o - 1] = true;
} else if (x == "C") {
c... | #include <bits/stdc++.h>
using namespace std;
int main() {
bool card[4][13] = {false};
int n, o, p;
string x;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> x >> o;
if (x == "S") {
card[0][o - 1] = true;
} else if (x == "H") {
card[1][o - 1] = true;
} else if (x == "C") {
c... | replace | 4 | 5 | 4 | 5 | -6 | *** stack smashing detected ***: terminated
|
p02408 | C++ | Runtime Error | #include <iostream>
using namespace std;
int changeNum(char c) {
switch (c) {
case 'S':
return 0;
case 'H':
return 1;
case 'C':
return 2;
case 'D':
return 3;
}
}
int main(void) {
int n, suit, num;
bool card[4][13];
cin >> n;
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 13... | #include <iostream>
using namespace std;
int changeNum(char c) {
switch (c) {
case 'S':
return 0;
case 'H':
return 1;
case 'C':
return 2;
case 'D':
return 3;
}
}
int main(void) {
int n, suit, num;
bool card[4][13];
cin >> n;
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 13... | replace | 54 | 55 | 54 | 55 | 1 | |
p02408 | C++ | Runtime Error | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int cards[52] = {};
char mark;
int num;
for (int i = 0; i < n; i++) {
cin >> mark >> num;
switch (mark) {
case 'S':
break;
case 'H':
num += 13;
break;
case 'C':
num += 26;
... | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
bool cards[53] = {};
char mark;
int num;
for (int i = 0; i < n; i++) {
cin >> mark >> num;
switch (mark) {
case 'S':
break;
case 'H':
num += 13;
break;
case 'C':
num += 26;... | replace | 7 | 8 | 7 | 8 | 0 | |
p02408 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
int card[51] = {0};
int total, number;
char type;
cin >> total;
for (int i = 0; i < total; i++) {
cin >> type >> number;
if (type == 'S') {
card[number - 1] = {1};
}
if (type == 'H') {
card[number + 12] = {1};
}
if (typ... | #include <iostream>
using namespace std;
int main() {
int card[52] = {0};
int total, number;
char type;
cin >> total;
for (int i = 0; i < total; i++) {
cin >> type >> number;
if (type == 'S') {
card[number - 1] = {1};
}
if (type == 'H') {
card[number + 12] = {1};
}
if (typ... | replace | 4 | 5 | 4 | 5 | 0 | |
p02408 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
int s[13];
int h[13];
int c[13];
int d[13];
int n, m;
char cr;
for (int i = 1; i <= 13; i++)
s[i] = 0;
for (int i = 1; i <= 13; i++)
h[i] = 0;
for (int i = 1; i <= 13; i++)
c[i] = 0;
for (int i = 1; i <= 13; i++)
d[i] = 0;
cin ... | #include <iostream>
using namespace std;
int main() {
int s[14];
int h[14];
int c[14];
int d[14];
int n, m;
char cr;
for (int i = 1; i <= 13; i++)
s[i] = 0;
for (int i = 1; i <= 13; i++)
h[i] = 0;
for (int i = 1; i <= 13; i++)
c[i] = 0;
for (int i = 1; i <= 13; i++)
d[i] = 0;
cin ... | replace | 4 | 8 | 4 | 8 | 0 | |
p02409 | C++ | Runtime Error | #include <iostream>
#include <queue>
#include <stack>
#include <stddef.h>
#include <string>
using namespace std;
int main() {
int n;
int b[100];
int f[100];
int r[100];
int v[100];
int k[100];
int room[11][13];
cin >> n;
for (int i = 0; i < n; i++) {
cin >> b[i] >> f[i] >> r[i] >> v[i];
}
fo... | #include <iostream>
#include <queue>
#include <stack>
#include <stddef.h>
#include <string>
using namespace std;
int main() {
int n;
int b[1000];
int f[1000];
int r[1000];
int v[1000];
int k[1000];
int room[11][13];
cin >> n;
for (int i = 0; i < n; i++) {
cin >> b[i] >> f[i] >> r[i] >> v[i];
}... | replace | 10 | 15 | 10 | 15 | 0 | |
p02409 | C++ | Runtime Error | #include <iostream>
using namespace std;
struct v {
int a;
int c;
int d;
int e;
};
int main() {
v w[200];
int n, j, m, i, d1[4][11] = {0}, d2[4][11] = {0}, d3[4][11] = {0},
d4[4][11] = {0};
cin >> n;
for (i = 0; i < n; i++) {
cin >> w[i].a >> w[i].c >> w[i].d >> w[i].e;
if (w[i... | #include <iostream>
using namespace std;
struct v {
int a;
int c;
int d;
int e;
};
int main() {
v w[1000];
int n, j, m, i, d1[4][11] = {0}, d2[4][11] = {0}, d3[4][11] = {0},
d4[4][11] = {0};
cin >> n;
for (i = 0; i < n; i++) {
cin >> w[i].a >> w[i].c >> w[i].d >> w[i].e;
if (w[... | replace | 9 | 10 | 9 | 10 | 0 | |
p02409 | C++ | Runtime Error | #include <iostream>
#include <string>
using namespace std;
int main() {
int n, b, f, r, v, ro[3][4][10];
for (int i = 0; i < 4; i++)
for (int j = 0; j < 3; j++)
for (int k = 0; k < 10; k++)
ro[i][j][k] = 0;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> b >> f >> r >> v;
ro[b - 1][f - ... | #include <iostream>
#include <string>
using namespace std;
int main() {
int n, b, f, r, v, ro[4][3][10];
for (int i = 0; i < 4; i++)
for (int j = 0; j < 3; j++)
for (int k = 0; k < 10; k++)
ro[i][j][k] = 0;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> b >> f >> r >> v;
ro[b - 1][f - ... | replace | 4 | 5 | 4 | 5 | -6 | *** stack smashing detected ***: terminated
|
p02409 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
int c[4][3][10];
int n, b, f, r, v;
for (int i = 1; i <= 4; i++) {
for (int j = 1; j <= 3; j++) {
for (int t = 1; t <= 10; t++) {
c[i][j][t] = 0;
}
}
}
cin >> n;
for (int i = 0; i < n; i++) {
cin >> b >> f >> r >> v;
... | #include <iostream>
using namespace std;
int main() {
int c[5][5][15];
int n, b, f, r, v;
for (int i = 1; i <= 4; i++) {
for (int j = 1; j <= 3; j++) {
for (int t = 1; t <= 10; t++) {
c[i][j][t] = 0;
}
}
}
cin >> n;
for (int i = 0; i < n; i++) {
cin >> b >> f >> r >> v;
... | replace | 4 | 5 | 4 | 5 | -6 | *** stack smashing detected ***: terminated
|
p02409 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int count[4][3][10];
for (int i = 1; i <= 4; i++) {
for (int j = 1; j <= 3; j++) {
for (int k = 1; k <= 10; k++) {
count[i][j][k] = 0;
}
}
}
int b, f, r, v;
for (int i = 0; i < n; i++) {
cin >> b >> f >>... | #include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int count[5][4][11];
for (int i = 1; i <= 4; i++) {
for (int j = 1; j <= 3; j++) {
for (int k = 1; k <= 10; k++) {
count[i][j][k] = 0;
}
}
}
int b, f, r, v;
for (int i = 0; i < n; i++) {
cin >> b >> f >>... | replace | 5 | 6 | 5 | 6 | -6 | *** stack smashing detected ***: terminated
|
p02409 | C++ | Runtime Error | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
int n, b[120], f[120], r[120], v[120];
cin >> n;
for (int i = 0; i < n; i++) {
cin >> b[i] >> f[i] >> r[i] >> v[i];
}
for (int building = 1; building <= 4; building++) {
for (int floor = 1; floor <= 3; floor++) {
for (int ... | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
int n, b[10000], f[10000], r[10000], v[10000];
cin >> n;
for (int i = 0; i < n; i++) {
cin >> b[i] >> f[i] >> r[i] >> v[i];
}
for (int building = 1; building <= 4; building++) {
for (int floor = 1; floor <= 3; floor++) {
f... | replace | 5 | 6 | 5 | 6 | 0 | |
p02409 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
int rooms[4][3][10] = {0};
int n;
cin >> n;
int b, f, r, v;
for (int i = 0; i < n; i++) {
cin >> b >> f >> r >> v;
rooms[b - 1][f - 1][r - 1] = rooms[b - 1][f - 1][r - 1] + v;
}
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 3; j++... | #include <iostream>
using namespace std;
int main() {
int rooms[4][3][10] = {0};
int n;
cin >> n;
int b, f, r, v;
for (int i = 0; i < n; i++) {
cin >> b >> f >> r >> v;
rooms[b - 1][f - 1][r - 1] = rooms[b - 1][f - 1][r - 1] + v;
}
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 3; j++... | delete | 30 | 32 | 30 | 30 | TLE | |
p02409 | C++ | Time Limit Exceeded | #include <iostream>
int main(void) {
using namespace std;
int auni[4][3][10];
int i, j, k;
for (i = 0; i < 4; i++) {
for (j = 0; j < 3; j++) {
for (k = 0; k < 10; k++) {
auni[i][j][k] = 0;
}
}
}
int n, b, f, r, v;
cin >> n;
for (i = 0; i < n; i++) {
cin >> b >> f >> r >>... | #include <iostream>
int main(void) {
using namespace std;
int auni[4][3][10];
int i, j, k;
for (i = 0; i < 4; i++) {
for (j = 0; j < 3; j++) {
for (k = 0; k < 10; k++) {
auni[i][j][k] = 0;
}
}
}
int n, b, f, r, v;
cin >> n;
for (i = 0; i < n; i++) {
cin >> b >> f >> r >>... | replace | 30 | 32 | 30 | 31 | TLE | |
p02409 | C++ | Runtime Error | #include <cstdio>
int main() {
int n, b, f, r, v;
int rooms[4][3][10] = {};
scanf("%d", &n);
int infos[n][4];
for (int i = 0; i < n; i++) {
scanf("%d%d%d%d", infos[i][0], infos[i][1], infos[i][2], infos[i][3]);
}
for (int i = 0; i < n; i++) {
rooms[infos[i][0] - 1][infos[i][1] - 1][infos[i][2] - ... | #include <cstdio>
int main() {
int n, b, f, r, v;
int rooms[4][3][10] = {};
scanf("%d", &n);
int infos[n][4];
for (int i = 0; i < n; i++) {
scanf("%d%d%d%d", &infos[i][0], &infos[i][1], &infos[i][2], &infos[i][3]);
}
for (int i = 0; i < n; i++) {
rooms[infos[i][0] - 1][infos[i][1] - 1][infos[i][2... | replace | 8 | 9 | 8 | 9 | -11 | |
p02409 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
int rooms[4][3][10]; // ○棟○階○部屋
int n;
int b[120], f[120], r[120], v[120]; // b棟f階r番目v人 (v<0の場合退去)
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 3; j++) {
for (int k = 0; k < 10; k++) {
rooms[i][j][k] = 0;
}
}
}
cin >>... | #include <iostream>
using namespace std;
int main() {
int rooms[4][3][10]; // ○棟○階○部屋
int n;
int b[999], f[999], r[999], v[999]; // b棟f階r番目v人 (v<0の場合退去)
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 3; j++) {
for (int k = 0; k < 10; k++) {
rooms[i][j][k] = 0;
}
}
}
cin >>... | replace | 7 | 8 | 7 | 8 | 0 | |
p02410 | C++ | Runtime Error | #include <stdio.h>
int main() {
int n, m, i, j;
long long a[100][100] = {0}, b[110] = {0}, c[110] = {0};
scanf("%d %d", &n, &m);
for (i = 1; i <= n; i++) {
for (j = 1; j <= m; j++) {
scanf("%d", &a[i][j]);
}
}
for (i = 1; i <= m; i++) {
scanf("%d", &b[i]);
}
for (i = 1; i <= n; i++) {
... | #include <stdio.h>
int main() {
int n, m, i, j;
static int a[100][100] = {0}, b[110] = {0}, c[110] = {0};
scanf("%d %d", &n, &m);
for (i = 1; i <= n; i++) {
for (j = 1; j <= m; j++) {
scanf("%d", &a[i][j]);
}
}
for (i = 1; i <= m; i++) {
scanf("%d", &b[i]);
}
for (i = 1; i <= n; i++) {... | replace | 3 | 4 | 3 | 4 | 0 | |
p02410 | C++ | Runtime Error | #include <stdio.h>
/********
* ??????????????¨????????????
*********/
/*********??¢?????´?????????
* (1)????¬????????????¨????¬??????????????????????
* (2)????¬?????????????????¬????????????¨?????????
* (3)
*********/
int main(void) {
int n, m; //?????°n????????°m
int a, b, c;
int i, j;
int gyouretu_a[1... | #include <stdio.h>
/********
* ??????????????¨????????????
*********/
/*********??¢?????´?????????
* (1)????¬????????????¨????¬??????????????????????
* (2)????¬?????????????????¬????????????¨?????????
* (3)
*********/
int main(void) {
int n, m; //?????°n????????°m
int a, b, c;
int i, j;
int gyouretu_a[1... | replace | 15 | 17 | 15 | 17 | 0 | |
p02410 | C++ | Runtime Error | #include <iostream>
#include <vector>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<vector<int>> mtr(3, vector<int>(4));
vector<int> vec(m);
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cin >> mtr[i][j];
}
}
for (int i = 0; i < m; i++) {
cin >> vec[i];... | #include <iostream>
#include <vector>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<vector<int>> mtr(n, vector<int>(m));
vector<int> vec(m);
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cin >> mtr[i][j];
}
}
for (int i = 0; i < m; i++) {
cin >> vec[i];... | replace | 7 | 8 | 7 | 8 | 0 | |
p02410 | C++ | Runtime Error | #include <cmath>
#include <cstdio>
#include <iostream>
#include <string>
using namespace std;
int main() {
long n, m, a[100][100], b[100], sum = 0;
cin >> n >> m;
for (int i = 1; i <= n; i++) {
for (int j = 1; j <= m; j++) {
cin >> a[i][j];
}
}
for (int i = 1; i <= m; i++) {
cin >> b[i];
}... | #include <cmath>
#include <cstdio>
#include <iostream>
#include <string>
using namespace std;
int main() {
long n, m, a[101][101], b[101], sum = 0;
cin >> n >> m;
for (int i = 1; i <= n; i++) {
for (int j = 1; j <= m; j++) {
cin >> a[i][j];
}
}
for (int i = 1; i <= m; i++) {
cin >> b[i];
}... | replace | 6 | 7 | 6 | 7 | 0 | |
p02410 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int a[100][100];
for (int i = 0; i < n; i++)
for (int j = 0; j < m; i++)
cin >> a[i][j];
int b[100];
for (int i = 0; i < m; i++)
cin >> b[i];
int c[100] = {};
for (int i = 0; i < n; i++)
for (int j... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int a[100][100];
for (int i = 0; i < n; i++)
for (int j = 0; j < m; j++)
cin >> a[i][j];
int b[100];
for (int i = 0; i < m; i++)
cin >> b[i];
int c[100] = {};
for (int i = 0; i < n; i++)
for (int j... | replace | 10 | 11 | 10 | 11 | TLE | |
p02410 | C++ | Runtime Error | #include <stdio.h>
#include <stdlib.h>
int main(void) {
int i, j;
int x = 0;
int y = 0;
int z1, z2;
int n, m;
int **a;
int *b;
scanf("%d %d", &n, &m);
a = (int **)malloc(n * sizeof(int));
b = (int *)malloc(m * sizeof(int));
for (i = 0; i < n; i++) {
a[i] = (int *)malloc(m * sizeof(int));
... | #include <stdio.h>
#include <stdlib.h>
int main(void) {
int i, j;
int x = 0;
int y = 0;
int z1, z2;
int n, m;
int **a;
int *b;
scanf("%d %d", &n, &m);
a = (int **)malloc(n * sizeof(int *));
b = (int *)malloc(m * sizeof(int));
for (i = 0; i < n; i++) {
a[i] = (int *)malloc(m * sizeof(int))... | replace | 15 | 16 | 15 | 16 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.