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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p02414 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
int n, m, l;
long long A[1000][1000], B[1000][1000], C[1000][1000];
cin >> n >> m >> l;
for (int i = 0; i < n; i++)
for (int j = 0; j < m; j++)
cin >> A[i][j];
for (int i = 0; i < m; i++)
for (int j = 0; j < l; j++)
cin >> B[i][j];
... | #include <iostream>
using namespace std;
int main() {
int n, m, l;
long long A[100][100], B[100][100], C[100][100];
cin >> n >> m >> l;
for (int i = 0; i < n; i++)
for (int j = 0; j < m; j++)
cin >> A[i][j];
for (int i = 0; i < m; i++)
for (int j = 0; j < l; j++)
cin >> B[i][j];
for (... | replace | 5 | 6 | 5 | 6 | -11 | |
p02414 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
long int n, m, l, A[100][100], B[100][100], C[100][100] = {};
cin >> n >> m >> l;
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cin >> A[i][j];
}
}
for (int i = 0; i < m; i++) {
for (int j = 0; j < l; j++) {
cin >> ... | #include <iostream>
using namespace std;
int main() {
long int n, m, l, A[100][100], B[100][100], C[100][100] = {};
cin >> n >> m >> l;
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cin >> A[i][j];
}
}
for (int i = 0; i < m; i++) {
for (int j = 0; j < l; j++) {
cin >> ... | replace | 20 | 21 | 20 | 21 | TLE | |
p02414 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
long int n, m, l, a[100][100], b[100][100], r[100][100], i, j, k;
for (i = 0; i < 100; i++) {
for (j = 0; j < 100; j++) {
a[i][j] = 0;
b[i][j] = 0;
r[i][j] = 0;
}
}
cin >> n >> m >> l;
if (n < 100 || m < 100 || l < 100) {
cou... | #include <iostream>
using namespace std;
int main() {
long int n, m, l, a[100][100], b[100][100], r[100][100], i, j, k;
for (i = 0; i < 100; i++) {
for (j = 0; j < 100; j++) {
a[i][j] = 0;
b[i][j] = 0;
r[i][j] = 0;
}
}
cin >> n >> m >> l;
for (i = 0; i < n; i++) {
for (j = 0; j ... | delete | 13 | 17 | 13 | 13 | 1 | |
p02414 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, l;
cin >> n >> m >> l;
int a[100][100];
int b[100][100];
int c[100][100] = {};
for (int i = 1; i <= n; i++) {
for (int g = 1; g <= m; g++) {
cin >> a[i][g];
}
}
for (int i = 1; i <= m; i++) {
for (int g = 1; g <= l;... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, l;
cin >> n >> m >> l;
int a[200][200];
int b[200][200];
long long c[200][200] = {};
for (int i = 1; i <= n; i++) {
for (int g = 1; g <= m; g++) {
cin >> a[i][g];
}
}
for (int i = 1; i <= m; i++) {
for (int g = 1; g... | replace | 6 | 9 | 6 | 9 | 0 | |
p02414 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
int n, m, l;
cin >> n >> m >> l;
int A[10000][10000], B[10000][10000], C[10000][10000];
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cin >> A[i][j];
}
}
for (int a = 0; a < m; a++) {
for (int b = 0; b < l; b++) {
c... | #include <iostream>
using namespace std;
int main() {
int n, m, l;
cin >> n >> m >> l;
int A[100][100], B[100][100];
long long int C[1000][1000];
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cin >> A[i][j];
}
}
for (int a = 0; a < m; a++) {
for (int b = 0; b < l; b++) {
... | replace | 6 | 7 | 6 | 8 | -11 | |
p02414 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main(void) {
// Your code here!
int n, m, l;
cin >> n >> m >> l;
int ue[100][100] = {};
int sit[100][100] = {};
int kam[10000][10000] = {};
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cin >> ue[i][j];
}
}
for (int i = 0; i < m;... | #include <iostream>
using namespace std;
int main(void) {
// Your code here!
int n, m, l;
cin >> n >> m >> l;
long long ue[101][101] = {};
long long sit[101][101] = {};
long long kam[101][101] = {};
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cin >> ue[i][j];
}
}
for (int... | replace | 6 | 9 | 6 | 9 | -11 | |
p02414 | C++ | Time Limit Exceeded | #include <stdio.h>
#define V 100
int main() {
int i, j, k;
int n, m, l;
int a[V][V], b[V][V];
long int c[V][V];
scanf("%d %d %d", &n, &m, &l);
for (i = 0; i < n; i++) {
for (j = 0; j < m; j++) {
a[i][j] = 0;
}
}
for (i = 0; i < m; i++) {
for (j = 0; j < l; j++) {
b[i][j] = 0;
... | #include <stdio.h>
#define V 100
int main() {
int i, j, k;
int n, m, l;
int a[V][V], b[V][V];
long int c[V][V];
scanf("%d %d %d", &n, &m, &l);
for (i = 0; i < n; i++) {
for (j = 0; j < m; j++) {
a[i][j] = 0;
}
}
for (i = 0; i < m; i++) {
for (j = 0; j < l; j++) {
b[i][j] = 0;
... | replace | 46 | 47 | 46 | 47 | TLE | |
p02414 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
long a[100][100], b[100][100], c[100][100] = {{0}};
int n, m, l;
cin >> n >> m >> l;
for (int i = 1; i <= n; i++) {
for (int j = 1; j <= m; j++) {
cin >> a[i][j];
}
}
for (int j = 1; j <= m; j++) {
for (int k = 1; k <= l; k++) {
... | #include <iostream>
using namespace std;
int main() {
long a[105][105], b[105][105], c[105][105] = {{0}};
int n, m, l;
cin >> n >> m >> l;
for (int i = 1; i <= n; i++) {
for (int j = 1; j <= m; j++) {
cin >> a[i][j];
}
}
for (int j = 1; j <= m; j++) {
for (int k = 1; k <= l; k++) {
... | replace | 4 | 5 | 4 | 5 | 0 | |
p02415 | C++ | Time Limit Exceeded | #include <cctype>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
char s;
while (1) {
cin >> s;
if (isalpha(s)) {
if (islower(s))
cout << (char)toupper(s);
else if (isupper(s))
cout << (char)tolower(s);
} else {
cout << s;
}
if (s == '\n... | #include <cctype>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
char s;
while (1) {
scanf("%c", &s);
if (isalpha(s)) {
if (islower(s))
cout << (char)toupper(s);
else if (isupper(s))
cout << (char)tolower(s);
} else {
cout << s;
}
if (s... | replace | 8 | 9 | 8 | 9 | TLE | |
p02415 | C++ | Time Limit Exceeded | #include <cctype>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
char ch;
while (1) {
scanf("%c", &ch);
if (isalpha(ch)) {
if (islower(ch))
printf("%c", toupper(ch));
else
printf("%c", tolower(ch));
} else
printf("%c", ch);
}
}
| #include <cctype>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
char ch;
while (1) {
scanf("%c", &ch);
if (isalpha(ch)) {
if (islower(ch))
printf("%c", toupper(ch));
else
printf("%c", tolower(ch));
} else
printf("%c", ch);
if (ch == '\n')
... | insert | 15 | 15 | 15 | 18 | TLE | |
p02415 | C++ | Time Limit Exceeded | #include <cstdio>;
// 入出力を行う関数が使える//(scanf,printf)
#include <cctype>;
// 文字の種類の判定や文字の変換を行う関数を使うことができる//
int main() {
char ch;
while (true) {
scanf("%c", ch);
// 文字(1文字)として入力する//
if (isalpha(ch)) {
// chがアルファベットならtrueを返す//
if (islower(ch))
printf("%c", toupper(ch));
// chが小文字な... | #include <cstdio>;
// 入出力を行う関数が使える//(scanf,printf)
#include <cctype>;
// 文字の種類の判定や文字の変換を行う関数を使うことができる//
int main() {
char ch;
while (true) {
scanf("%c", &ch);
// 文字(1文字)として入力する//
if (isalpha(ch)) {
// chがアルファベットならtrueを返す//
if (islower(ch))
printf("%c", toupper(ch));
// chが小文字... | replace | 9 | 10 | 9 | 10 | TLE | |
p02415 | C++ | Runtime Error | #include <cstdio>;
// 入出力を行う関数が使える//(scanf,printf)
#include <cctype>;
int main() {
char ch;
while (true) {
scanf("%c,&ch");
if (isalpha(ch)) {
// chがアルファベットならtrueを返す//
if (islower(ch))
printf("%c", toupper(ch));
// chが小文字ならtrueを返す// //chの大文字を返す//
else
printf("%c", t... | #include <cstdio>;
// 入出力を行う関数が使える//(scanf,printf)
#include <cctype>;
int main() {
char ch;
while (true) {
scanf("%c", &ch);
if (isalpha(ch)) {
// chがアルファベットならtrueを返す//
if (islower(ch))
printf("%c", toupper(ch));
// chが小文字ならtrueを返す// //chの大文字を返す//
else
printf("%c", ... | replace | 8 | 9 | 8 | 9 | -11 | |
p02415 | C++ | Time Limit Exceeded | #include <cstdio>
#include <iostream>
#include <string>
using namespace std;
int main() {
char ch, ch2;
while (1) {
scanf("%c", &ch);
if (islower(ch)) {
ch2 = toupper(ch);
cout << ch2;
} else {
ch2 = tolower(ch);
cout << ch2;
}
if (ch == ' \n') {
break;
}
}... | #include <cstdio>
#include <iostream>
#include <string>
using namespace std;
int main() {
char ch, ch2;
while (1) {
scanf("%c", &ch);
if (islower(ch)) {
ch2 = toupper(ch);
cout << ch2;
} else {
ch2 = tolower(ch);
cout << ch2;
}
if (ch == '\n') {
break;
}
}... | replace | 18 | 19 | 18 | 20 | TLE | |
p02415 | C++ | Time Limit Exceeded | #include <cctype>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
char ch;
while (1) {
cin >> ch;
if (isalpha(ch)) {
if (islower(ch))
printf("%c", toupper(ch));
else
printf("%c", tolower(ch));
} else
printf("%c", ch);
if (ch == '\n')
... | #include <cctype>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
char ch;
while (1) {
scanf("%c", &ch);
if (isalpha(ch)) {
if (islower(ch))
printf("%c", toupper(ch));
else
printf("%c", tolower(ch));
} else
printf("%c", ch);
if (ch == '\n'... | replace | 9 | 10 | 9 | 10 | TLE | |
p02415 | Python | Runtime Error | print(input().swapcase())
s = input()
for c in s:
if c.islower():
print(c.upper(), end="")
else:
print(c.lower(), end="")
print()
| s = input()
for c in s:
if c.islower():
print(c.upper(), end="")
else:
print(c.lower(), end="")
print()
| delete | 0 | 2 | 0 | 0 | EOFError: EOF when reading a line | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02415/Python/s623323382.py", line 3, in <module>
s = input()
EOFError: EOF when reading a line
|
p02415 | C++ | Time Limit Exceeded | #include <cctype>
#include <cstdio>
#include <iostream>
using namespace std;
int main(void) {
char s;
while (1) {
scanf("%c", &s);
if (islower(s) == 1) {
cout << toupper(s);
} else if (isupper(s) == 1) {
cout << tolower(s);
} else {
cout << s;
}
}
cout << endl;
return 0;... | #include <cctype>
#include <cstdio>
#include <iostream>
using namespace std;
int main(void) {
char s;
while (1) {
scanf("%c", &s);
if (s == '\n') {
break;
}
if (islower(s)) {
printf("%c", toupper(s));
} else if (isupper(s)) {
printf("%c", tolower(s));
} else {
cout <... | replace | 9 | 13 | 9 | 16 | TLE | |
p02415 | C++ | Time Limit Exceeded | #include <cctype>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
typedef vector<int> vec;
int main() {
char ch;
while (1) {
scanf("%c", &ch);
if (islower(ch))
printf("%c", toupper(ch));
else
print... | #include <cctype>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
typedef vector<int> vec;
int main() {
char ch;
while (1) {
scanf("%c", &ch);
if (islower(ch))
printf("%c", toupper(ch));
else
print... | replace | 17 | 18 | 17 | 18 | TLE | |
p02415 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
string mozi;
getline(cin, mozi);
for (int i = 0; (int)mozi.size(); i++) {
if (islower(mozi[i])) {
mozi[i] = toupper(mozi[i]);
} else if (isupper(mozi[i])) {
mozi[i] = tolower(mozi[i]);
}
}
cout << mozi << endl;
return 0... | #include <bits/stdc++.h>
using namespace std;
int main() {
string mozi;
getline(cin, mozi);
for (int i = 0; i < (int)mozi.size(); i++) {
if (islower(mozi[i])) {
mozi[i] = toupper(mozi[i]);
} else if (isupper(mozi[i])) {
mozi[i] = tolower(mozi[i]);
}
}
cout << mozi << endl;
retu... | replace | 9 | 10 | 9 | 10 | -11 | |
p02415 | C++ | Time Limit Exceeded | #include <cctype>
#include <cstdio>
int main() {
char ch;
while (1) {
scanf("%c", &ch);
if (islower(ch))
printf("%c", toupper(ch));
else if (isupper(ch))
printf("%c", tolower(ch));
else if (!isalpha(ch))
printf("%c", ch);
else if (ch == '\n')
break;
}
return 0;
}
| #include <cctype>
#include <cstdio>
int main() {
char ch;
while (1) {
scanf("%c", &ch);
if (islower(ch))
printf("%c", toupper(ch));
else if (isupper(ch))
printf("%c", tolower(ch));
else if (!isalpha(ch))
printf("%c", ch);
if (ch == '\n')
break;
}
return 0;
}
| replace | 14 | 15 | 14 | 15 | TLE | |
p02415 | C++ | Runtime Error | #include <cstdio>
#include <iostream>
#include <string>
using namespace std;
int main(void) {
string komozi("abcdefghijklmnopqrstuvwxyz");
string oomozi("ABCDEFGHIJKLMNOPQRSTUVWXYZ");
char inp;
char retsu[1000000];
for (int i = 0;; i++) {
inp = getchar();
if (inp == '.') {
retsu[i] = '.';
... | #include <cstdio>
#include <iostream>
#include <string>
using namespace std;
int main(void) {
string komozi("abcdefghijklmnopqrstuvwxyz");
string oomozi("ABCDEFGHIJKLMNOPQRSTUVWXYZ");
char inp;
char retsu[1000000];
for (int i = 0;; i++) {
inp = getchar();
if (inp == '\n') {
retsu[i + 1] = '\... | replace | 15 | 17 | 15 | 16 | 0 | |
p02415 | C++ | Time Limit Exceeded | #include <cctype>
#include <cstdio>
using namespace std;
int main() {
char ch;
while (1) {
scanf("%c", &ch);
if (isalpha(ch)) {
if (islower(ch))
printf("%c", toupper(ch));
else
printf("%c", tolower(ch));
} else
printf("%c", ch);
}
return 0;
}
| #include <cctype>
#include <cstdio>
using namespace std;
int main() {
char ch;
while (1) {
scanf("%c", &ch);
if (isalpha(ch)) {
if (islower(ch))
printf("%c", toupper(ch));
else
printf("%c", tolower(ch));
} else
printf("%c", ch);
if (ch == '\n')
break;
}
re... | insert | 14 | 14 | 14 | 16 | TLE | |
p02415 | C++ | Time Limit Exceeded | #include <cctype>
#include <cstdio>
int main() {
char ch;
while (1) {
scanf("%c", &ch);
if (isalpha(ch)) {
if (islower(ch))
printf("%c", toupper(ch));
else
printf("%c", tolower(ch));
} else
printf("%c", ch);
if (ch == '/n')
break;
}
return 0;
} | #include <cctype>
#include <cstdio>
int main() {
char ch;
while (1) {
scanf("%c", &ch);
if (isalpha(ch)) {
if (islower(ch))
printf("%c", toupper(ch));
else
printf("%c", tolower(ch));
} else
printf("%c", ch);
if (ch == '\n')
break;
}
return 0;
} | replace | 13 | 14 | 13 | 14 | TLE | |
p02415 | C++ | Time Limit Exceeded | #include <cctype>
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
char ch;
while (1) {
scanf(" %c", &ch);
if (isupper(ch))
cout << (char)tolower(ch);
else if (islower(ch))
cout << (char)toupper(ch);
else {
if (ch == '\n')
break;
cout << ch;
... | #include <cctype>
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
char ch;
while (1) {
scanf("%c", &ch);
if (isupper(ch))
cout << (char)tolower(ch);
else if (islower(ch))
cout << (char)toupper(ch);
else {
if (ch == '\n')
break;
cout << ch;
... | replace | 8 | 9 | 8 | 9 | TLE | |
p02415 | C++ | Time Limit Exceeded | #include <ctype.h>
#include <stdio.h>
int main() {
char a[1200];
int i;
while (1) {
scanf("%c", &a[i]);
if (isupper(a[i])) {
printf("%c", tolower(a[i]));
} else if (islower(a[i])) {
printf("%c", toupper(a[i]));
} else {
printf("%c", a[i]);
}
}
return 0;
} | #include <ctype.h>
#include <stdio.h>
int main() {
char a[1200];
int i;
while (1) {
scanf("%c", &a[i]);
if (a[i] == '\n') {
printf("\n");
break;
}
if (isupper(a[i])) {
printf("%c", tolower(a[i]));
} else if (islower(a[i])) {
printf("%c", toupper(a[i]));
} else {
... | insert | 7 | 7 | 7 | 11 | TLE | |
p02416 | C++ | Runtime Error | #include <cctype>
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <string>
using namespace std;
int main() {
string number;
int sum;
while (1) {
sum = 0;
// while(1){
// cin >> number;
scanf("%s", &number);
// if(number == '\n')break;
// }
if (number[0] == '0' && n... | #include <cctype>
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <string>
using namespace std;
int main() {
string number;
int sum;
while (1) {
sum = 0;
// while(1){
cin >> number;
// scanf("%s",&number);
// if(number == '\n')break;
// }
if (number[0] == '0' && nu... | replace | 14 | 16 | 14 | 16 | -11 | |
p02416 | C++ | Runtime Error | #include <iostream>
#include <string>
using namespace std;
int main(void) {
int s, l, k, j, i;
string n, m[100] = {};
k = 0;
do {
k = k + 1;
cin >> n;
m[k] = n;
} while (n != "0");
j = k - 1;
for (k = 1; k <= j; k++) {
i = m[k].size();
s = 0;
for (l = 0; l <= i - 1; l++)
s ... | #include <iostream>
#include <string>
using namespace std;
int main(void) {
int s, l, k, j, i;
string n, m[1001] = {};
k = 0;
do {
k = k + 1;
cin >> n;
m[k] = n;
} while (n != "0");
j = k - 1;
for (k = 1; k <= j; k++) {
i = m[k].size();
s = 0;
for (l = 0; l <= i - 1; l++)
s... | replace | 6 | 7 | 6 | 7 | 0 | |
p02416 | C++ | Runtime Error | #include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
char str[100];
while (true) {
cin >> str;
if (str[0] == '0')
break;
int sum = 0;
for (int i = 0; i < strlen(str); i++) {
sum += (str[i] - '0');
}
printf("%d\n", sum);
}
return 0;
... | #include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
char str[1001];
while (true) {
cin >> str;
if (str[0] == '0')
break;
int sum = 0;
for (int i = 0; i < strlen(str); i++) {
sum += (str[i] - '0');
}
printf("%d\n", sum);
}
return 0;... | replace | 7 | 8 | 7 | 8 | 0 | |
p02416 | C++ | Runtime Error | #include <iostream>
using namespace std;
#include <cstdio>
#include <stdio.h>
int main() {
int num = 0;
char fig[5];
while (1) {
scanf("%s", fig);
if (fig == "0")
break;
for (int i = 0; fig[i] != '\0'; i++) {
num += fig[i] - '0';
}
if (num == 0)
break;
printf("%d\n", n... | #include <iostream>
using namespace std;
#include <cstdio>
#include <stdio.h>
int main() {
int num = 0;
char fig[1001];
while (1) {
scanf("%s", fig);
if (fig == "0")
break;
for (int i = 0; fig[i] != '\0'; i++) {
num += fig[i] - '0';
}
if (num == 0)
break;
printf("%d\n"... | replace | 8 | 9 | 8 | 9 | 0 | |
p02416 | C++ | Time Limit Exceeded | #include <cstdio>
#include <cstring>
using namespace std;
int main() {
char str[1001];
while (1) {
scanf("%s", str);
if (str[0] == 0)
break;
int sum = 0;
for (int i = 0; i < strlen(str); i++) {
int a = str[i] - '0';
sum += a;
}
printf("%d\n", sum);
}
return 0;
}
| #include <cstdio>
#include <cstring>
using namespace std;
int main() {
char str[1001];
while (1) {
scanf("%s", str);
if (str[0] == '0')
break;
int sum = 0;
for (int i = 0; i < strlen(str); i++) {
int a = str[i] - '0';
sum += a;
}
printf("%d\n", sum);
}
return 0;
}
| replace | 7 | 8 | 7 | 8 | TLE | |
p02416 | C++ | Runtime Error | #include <iostream>
int sum_each_digit() {
char x[5];
int ans = 0;
std::cin >> x;
if (x[0] == '0')
return -1;
for (int i = 0; x[i] != '\0'; i++) {
ans += (int)x[i] - 48;
}
return ans;
}
int main() {
int ans;
while (true) {
ans = sum_each_digit();
if (ans == -1)
break;
std::... | #include <iostream>
int sum_each_digit() {
char x[1001];
int ans = 0;
std::cin >> x;
if (x[0] == '0')
return -1;
for (int i = 0; x[i] != '\0'; i++) {
ans += (int)x[i] - 48;
}
return ans;
}
int main() {
int ans;
while (true) {
ans = sum_each_digit();
if (ans == -1)
break;
st... | replace | 3 | 4 | 3 | 4 | 0 | |
p02416 | C++ | Time Limit Exceeded | #include <cctype>
#include <cstdio>
#include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
int main() {
while (true) {
char b[1000] = "0";
cin.getline(b, sizeof(b));
char c[strlen(b)];
strcpy(c, b);
if (c[0] != '0') {
int x = 0;
for (int k = 0; k < strlen(c); ... | #include <cctype>
#include <cstdio>
#include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
int main() {
while (true) {
char b[1001] = "0";
cin.getline(b, sizeof(b));
char c[strlen(b)];
strcpy(c, b);
if (c[0] != '0') {
int x = 0;
for (int k = 0; k < strlen(c); ... | replace | 9 | 10 | 9 | 10 | TLE | |
p02416 | C++ | Time Limit Exceeded | #include <iostream>
#include <stdio.h>
using namespace std;
int main() {
char num[1001];
while (1) {
int a = 0;
scanf("%s", num);
if (num[0] == 0)
break;
for (int i = 0; num[i] != '\0'; i++) {
a += num[i] - '0';
}
printf("%d\n", a);
}
}
| #include <iostream>
#include <stdio.h>
using namespace std;
int main() {
char num[1001];
while (1) {
int a = 0;
scanf("%s", num);
if (num[0] == '0')
break;
for (int i = 0; num[i] != '\0'; i++) {
a += num[i] - '0';
}
printf("%d\n", a);
}
}
| replace | 8 | 9 | 8 | 9 | TLE | |
p02416 | C++ | Runtime Error | #include <cstdio>
#include <cstring>
int main() {
char str[5];
while (true) {
scanf("%s", str);
if (str[0] == '0')
break;
int sum = 0;
for (int i = 0; i < strlen(str); i++) {
sum += str[i] - '0';
}
printf("%d\n", sum);
}
return 0;
} | #include <cstdio>
#include <cstring>
int main() {
char str[1001];
while (true) {
scanf("%s", str);
if (str[0] == '0')
break;
int sum = 0;
for (int i = 0; i < strlen(str); i++) {
sum += str[i] - '0';
}
printf("%d\n", sum);
}
return 0;
} | replace | 3 | 4 | 3 | 4 | 0 | |
p02416 | C++ | Time Limit Exceeded | #include <cstdio>
#include <cstring>
using namespace std;
int main() {
char ch[1001];
while (1) {
scanf("%s", ch);
if (ch[0] == 0)
break;
int sum = 0;
for (int i = 0; i < strlen(ch); i++) {
sum += (ch[i] - '0');
}
printf("%d\n", sum);
}
return 0;
} | #include <cstdio>
#include <cstring>
using namespace std;
int main() {
char ch[1001];
while (1) {
scanf("%s", ch);
if (ch[0] == '0')
break;
int sum = 0;
for (int i = 0; i < strlen(ch); i++) {
sum += (ch[i] - '0');
}
printf("%d\n", sum);
}
return 0;
} | replace | 10 | 11 | 10 | 11 | TLE | |
p02416 | C++ | Time Limit Exceeded | //???????????????????????????Aizu??§???runnning
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
int b, i;
int sum = 0;
char x[1001]; //?????????
while (1) {
cin >> x;
// x=0?????¨?????????
sum = 0;
if (x[0] == 0)
break;
for (i = 0; x[i] != 0; i++) {
b =... | //???????????????????????????Aizu??§???runnning
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
int b, i;
int sum = 0;
char x[1001]; //?????????
while (1) {
cin >> x;
// x=0?????¨?????????
sum = 0;
if (x[0] == '0')
break;
for (i = 0; x[i] != 0; i++) {
b... | replace | 14 | 15 | 14 | 15 | TLE | |
p02416 | C++ | Time Limit Exceeded | #include <cctype>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
typedef vector<int> vec;
int main() {
string n;
while (1) {
cin >> n;
int sum = 0;
rep(i, n.size()) { sum += (int)(n[i] - '0'); }
cout << s... | #include <cctype>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
typedef vector<int> vec;
int main() {
string n;
while (1) {
cin >> n;
if (n == "0")
break;
int sum = 0;
rep(i, n.size()) { sum += (in... | insert | 13 | 13 | 13 | 15 | TLE | |
p02416 | C++ | Runtime Error | #include <iostream>
#include <string>
using namespace std;
int main() {
int d;
string num;
for (int i = 0;; i++) {
getline(cin, num);
if (num[i] == '0')
break;
d = 0;
for (int j = 0; j < num.length(); j++) {
d += num[j] - '0';
}
cout << d << "\n";
}
return 0;
} | #include <iostream>
#include <string>
using namespace std;
int main() {
int d;
string num;
for (int i = 0;; i++) {
getline(cin, num);
if (num[0] == '0')
break;
d = 0;
for (int j = 0; j < num.length(); j++) {
d += num[j] - '0';
}
cout << d << "\n";
}
return 0;
} | replace | 12 | 13 | 12 | 13 | 0 | |
p02416 | C++ | Runtime Error | #include <cctype>
#include <cstdio>
int main() {
int sum;
char line[6];
while (true) {
sum = 0;
scanf("%s", line);
for (int i = 0; isdigit(line[i]); i++) {
sum += line[i] - '0';
}
if (sum == 0) {
break;
}
printf("%d\n", sum);
}
return 0;
}
| #include <cctype>
#include <cstdio>
int main() {
int sum;
char line[1002];
while (true) {
sum = 0;
scanf("%s", line);
for (int i = 0; isdigit(line[i]); i++) {
sum += line[i] - '0';
}
if (sum == 0) {
break;
}
printf("%d\n", sum);
}
return 0;
}
| replace | 5 | 6 | 5 | 6 | 0 | |
p02416 | C++ | Time Limit Exceeded | #include <cstdio>
#include <cstring>
int main() {
char number[1000];
while (1) {
scanf("%s", number);
if (number[0] == 0)
break;
int sum = 0;
for (int i = 0; i < strlen(number); i++) {
sum += (number[i] - '0');
}
printf("%d\n", sum);
}
return 0;
} | #include <cstdio>
#include <cstring>
int main() {
char number[1000];
while (1) {
scanf("%s", number);
if (number[0] == '0')
break;
int sum = 0;
for (int i = 0; i < strlen(number); i++) {
sum += (number[i] - '0');
}
printf("%d\n", sum);
}
return 0;
} | replace | 7 | 8 | 7 | 8 | TLE | |
p02416 | C++ | Time Limit Exceeded | #include <stdio.h>
int main() {
char moji[1001];
int sum, cou, tn;
while (1) {
scanf("%s", moji);
if (moji[0] = '\0') {
break;
}
sum = 0;
cou = 0;
while (1) {
if (moji[cou] == '\0') {
break;
}
tn = moji[cou] - '0';
sum = sum + tn;
cou = cou + 1;
... | #include <stdio.h>
int main() {
char moji[1001];
int sum, cou, tn;
while (1) {
scanf("%s", moji);
if (moji[0] == '0') {
break;
}
sum = 0;
cou = 0;
while (1) {
if (moji[cou] == '\0') {
break;
}
tn = moji[cou] - '0';
sum = sum + tn;
cou = cou + 1;
... | replace | 6 | 7 | 6 | 7 | TLE | |
p02416 | C++ | Runtime Error | #include <iostream>
#include <string>
int main() {
using namespace std;
string s;
int ans, x, y, size, i, j;
ans = 0;
i = 0;
x = 1;
while (x) {
cin >> s;
if (s == "0") {
break;
}
x = stoi(s);
size = s.size();
for (j = 0; j < size; j++) {
y = s[j] - '0';
ans = ans ... | #include <iostream>
#include <string>
int main() {
using namespace std;
string s;
int ans, x, y, size, i, j;
ans = 0;
i = 0;
x = 1;
while (x) {
cin >> s;
if (s == "0") {
break;
}
size = s.size();
for (j = 0; j < size; j++) {
y = s[j] - '0';
ans = ans + y;
}
co... | delete | 14 | 15 | 14 | 14 | 0 | |
p02416 | C++ | Time Limit Exceeded | #include <cstdio>
int main() {
char s[1201];
int c;
while (1) {
scanf("%[^\n]", s);
c = 0;
if (s[0] == '0') {
break;
}
for (int i = 0; s[i] != '\0'; i++) {
c += s[i] - 48;
}
printf("%d\n", c);
}
}
| #include <cstdio>
int main() {
char s[1201];
int c;
while (1) {
scanf("%s", s);
c = 0;
if (s[0] == '0') {
break;
}
for (int i = 0; s[i] != '\0'; i++) {
c += s[i] - 48;
}
printf("%d\n", c);
}
}
| replace | 6 | 7 | 6 | 7 | TLE | |
p02416 | C++ | Runtime Error | #include <cstdio>
#include <iostream>
#include <string>
#include <utility>
#include <vector>
using namespace std;
int main() {
ios::sync_with_stdio(false);
string str;
int count = 0;
int sum;
int a;
int offset;
string splitString;
vector<string> strList;
while (1) {
cin >> str;
if (str == ... | #include <cstdio>
#include <iostream>
#include <string>
#include <utility>
#include <vector>
using namespace std;
int main() {
ios::sync_with_stdio(false);
string str;
int count = 0;
int sum;
int a;
int offset;
string splitString;
vector<string> strList;
while (1) {
cin >> str;
if (str == ... | replace | 32 | 33 | 32 | 33 | 0 | |
p02416 | C++ | Time Limit Exceeded | #include <iostream>
#include <string>
using namespace std;
int main() {
string x;
while (true) {
int answer;
answer = 0;
cin >> x;
for (int i = 0; i < x.size(); i++) {
answer += x[i] - '0';
}
cout << answer << endl;
}
return 0;
} | #include <iostream>
#include <string>
using namespace std;
int main() {
string x;
while (true) {
int answer;
answer = 0;
cin >> x;
if (x[0] == '0')
break;
for (int i = 0; i < x.size(); i++) {
answer += x[i] - '0';
}
cout << answer << endl;
}
return 0;
} | insert | 9 | 9 | 9 | 11 | TLE | |
p02416 | C++ | Runtime Error | #include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
char num[1001];
while (1) {
scanf("%s", num);
if (num[0] == '0')
break;
int sum = 0;
for (int i = 0; strlen(num) > i; i++) {
sum += num[i] - '0';
}
printf("%s\n", sum);
}
return 0;
}
| #include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
char num[1001];
while (1) {
scanf("%s", num);
if (num[0] == '0')
break;
int sum = 0;
for (int i = 0; strlen(num) > i; i++) {
sum += num[i] - '0';
}
printf("%d\n", sum);
}
return 0;
}
| replace | 14 | 15 | 14 | 15 | -11 | |
p02416 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
int i;
char number[5] = {0};
int sum = 0;
while (1) {
sum = 0;
cin >> number;
for (i = 0; number[i] != '\0'; i++) {
sum += number[i] - '0';
}
if (number[0] == '0')
break;
cout << sum << "\n";
}
} | #include <iostream>
using namespace std;
int main() {
int i;
char number[1001] = {0};
int sum = 0;
while (1) {
sum = 0;
cin >> number;
for (i = 0; number[i] != '\0'; i++) {
sum += number[i] - '0';
}
if (number[0] == '0')
break;
cout << sum << "\n";
}
} | replace | 6 | 7 | 6 | 7 | 0 | |
p02416 | C++ | Time Limit Exceeded | #include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
char str[1001];
while (1) {
scanf("%s", str);
}
}
| #include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
char str[1001];
while (1) {
scanf("%s", str);
if (str[0] == '0')
break;
int sum = 0;
for (int i = 0; i < strlen(str); i++) {
sum += (str[i] - '0');
}
printf("%d\n", sum);
}
}
| insert | 8 | 8 | 8 | 15 | TLE | |
p02416 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cctype>
#include <math.h>
#include <stdio.h>
int main() {
char x[1001] = {0};
int sum = 0;
while (1) {
sum = 0;
scanf("%s", &x);
for (int i = 1; i <= 1000; i++) {
sum += x[i] - '0';
}
if (sum == 0) {
break;
} else {
printf("%d\n", sum);
... | #include <algorithm>
#include <cctype>
#include <math.h>
#include <stdio.h>
int main() {
char x[1001] = {0};
int sum = 0;
while (1) {
sum = 0;
scanf("%s", &x);
for (int i = 0; x[i] != 0; i++) {
sum += x[i] - '0';
}
if (sum == 0) {
break;
} else {
printf("%d\n", sum);
... | replace | 12 | 13 | 12 | 13 | TLE | |
p02416 | C++ | Time Limit Exceeded | #include <stdio.h>
#include <string.h>
int main() {
char x[1001];
int num;
bool f = 0;
while (1) {
scanf("%s", x);
if (x[0] == 0)
break;
int sum = 0;
for (int i = 0; i < strlen(x); i++) {
num = x[i] - '0';
sum += num;
}
printf("%d\n", sum);
}
} | #include <stdio.h>
#include <string.h>
int main() {
char x[1001];
int num;
bool f = 0;
while (1) {
scanf("%s", x);
if (x[0] == '0')
break;
int sum = 0;
for (int i = 0; i < strlen(x); i++) {
num = x[i] - '0';
sum += num;
}
printf("%d\n", sum);
}
} | replace | 9 | 10 | 9 | 10 | TLE | |
p02416 | C++ | Time Limit Exceeded | #include <stdio.h>
int main(void) {
int i;
while (1) {
char x[1001];
int sum = 0;
int re; //??°?????????????????´
scanf("%[^\n]", x); //?????????????????§????????????
if ((x[0] == '0') && (x[1] == '\0')) //??????0????????????
break;
for (i = 0; (!(x[i])) == '\0'; i++) { //????????... | #include <stdio.h>
int main(void) {
int i;
while (1) {
char x[1001];
int sum = 0;
int re; //??°?????????????????´
scanf("%s", x);
if ((x[0] == '0') && (x[1] == '\0')) //??????0????????????
break;
for (i = 0; (!(x[i])) == '\0'; i++) { //??????????????????????????§?????????
re... | replace | 10 | 11 | 10 | 11 | TLE | |
p02416 | C++ | Runtime Error | #include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
int sum;
char ch[100];
while (1) {
scanf("%s", ch);
if (ch[0] == '0')
break;
sum = 0;
for (int i = 0; i < strlen(ch); i++) {
sum = sum + (ch[i] - '0');
}
printf("%d\n", sum);
}
} | #include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
int sum;
char ch[10000];
while (1) {
scanf("%s", ch);
if (ch[0] == '0')
break;
sum = 0;
for (int i = 0; i < strlen(ch); i++) {
sum = sum + (ch[i] - '0');
}
printf("%d\n", sum);
}
} | replace | 6 | 7 | 6 | 7 | 0 | |
p02416 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
int sum[1001] = {};
int count = 0;
while (1) {
char in[1000];
int i = 0;
cin.getline(in, sizeof(in));
if (in[0] == '0') {
break;
}
for (i = 0; in[i] != '\0'; i++) {
if (in[i] == '1') {
sum[count] = sum[count] + 1... | #include <iostream>
using namespace std;
int main() {
int sum[1001] = {};
int count = 0;
while (1) {
char in[1001];
int i = 0;
cin.getline(in, sizeof(in));
if (in[0] == '0') {
break;
}
for (i = 0; in[i] != '\0'; i++) {
if (in[i] == '1') {
sum[count] = sum[count] + 1... | replace | 8 | 9 | 8 | 9 | TLE | |
p02416 | Python | Runtime Error | while True:
x = input()
if x == 0:
break
length = len(x)
tot = 0
for i in range(length):
tot += int(x[i : i + 1])
print(tot)
| while True:
x = input()
if x == "0":
break
length = len(x)
tot = 0
for i in range(length):
tot += int(x[i : i + 1])
print(tot)
| replace | 3 | 4 | 3 | 4 | EOFError: EOF when reading a line | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02416/Python/s745703390.py", line 3, in <module>
x = input()
EOFError: EOF when reading a line
|
p02416 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
string number;
int sum[100];
int j = 0;
while (1) {
sum[j] = 0;
cin >> number;
if (number == "0") {
sum[j] = 0;
break;
}
for (int i = 0; i < number.length(); i++) {
sum[j] += number[i] - '0';
}
j++;
}
j = 0;... | #include <iostream>
using namespace std;
int main() {
string number;
int sum[1000];
int j = 0;
while (1) {
sum[j] = 0;
cin >> number;
if (number == "0") {
sum[j] = 0;
break;
}
for (int i = 0; i < number.length(); i++) {
sum[j] += number[i] - '0';
}
j++;
}
j = 0... | replace | 5 | 6 | 5 | 6 | 0 | |
p02416 | C++ | Runtime Error | #include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int count, count2 = 0, ans[100] = {0};
char number[1000];
while (1) {
scanf("%s", &number);
for (count = 0; number[count] != '\0'; count++) {
ans[count2] += (number[count] - '0');
}
if (ans[count2] == 0) {
break;
... | #include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int count, count2 = 0, ans[1000] = {0};
char number[1000];
while (1) {
scanf("%s", &number);
for (count = 0; number[count] != '\0'; count++) {
ans[count2] += (number[count] - '0');
}
if (ans[count2] == 0) {
break;... | replace | 4 | 5 | 4 | 5 | 0 | |
p02416 | C++ | Runtime Error | #include <cstring>
#include <iostream>
using namespace std;
int main() {
while (1) {
int s = 0, d = 0;
char a[5];
cin >> a;
if (a[0] == 48)
break;
for (int i = 0; i < strlen(a); i++) {
s += a[i];
d++;
}
cout << s - d * 48 << endl;
}
return 0;
} | #include <cstring>
#include <iostream>
using namespace std;
int main() {
while (1) {
int s = 0, d = 0;
char a[1000];
cin >> a;
if (a[0] == 48)
break;
for (int i = 0; i < strlen(a); i++) {
s += a[i];
d++;
}
cout << s - d * 48 << endl;
}
return 0;
} | replace | 6 | 7 | 6 | 7 | 0 | |
p02416 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
char x[100][1001] = {"a"};
long long int check;
int a[100] = {};
for (int i = 0; i < 1000; i++) {
cin >> x[i];
if (x[i][0] == '0') {
break;
}
for (int i2 = 0; i2 < 1001; i2++) {
if (x[i][i2] != '\0' && x[i][i2] != 'a') {
a... | #include <iostream>
using namespace std;
int main() {
char x[1000][1001] = {"a"};
int check;
int a[1000] = {};
for (int i = 0; i < 1000; i++) {
cin >> x[i];
if (x[i][0] == '0') {
break;
}
for (int i2 = 0; i2 < 1001; i2++) {
if (x[i][i2] != '\0' && x[i][i2] != 'a') {
a[i] += x... | replace | 3 | 6 | 3 | 6 | 0 | |
p02416 | C++ | Time Limit Exceeded | #include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
char x[1000];
while (1) {
scanf("%s", x);
if (x[0] == 0)
break;
int sum = 0;
for (int i = 0; i < strlen(x); i++) {
sum += (x[i] - '0');
}
printf("%d\n", sum);
}
return 0;
} | #include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
char x[1000];
while (1) {
scanf("%s", x);
if (x[0] == '0')
break;
int sum = 0;
for (int i = 0; i < strlen(x); i++) {
sum += (x[i] - '0');
}
printf("%d\n", sum);
}
return 0;
} | replace | 10 | 11 | 10 | 11 | TLE | |
p02416 | C++ | Time Limit Exceeded | // ITP1_8_B
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
int sum, i;
char c;
for (sum = 0;; sum = 0) {
for (i = 0;; i++) {
c = getchar();
if (c == '\n') {
cout << sum << endl;
break;
} else if (c == '0' && i == 0)
break;
sum += c - '... | // ITP1_8_B
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
int sum, i;
char c;
for (sum = 0;; sum = 0) {
for (i = 0;; i++) {
c = getchar();
if (c == '\n') {
cout << sum << endl;
break;
} else if (c == '0' && i == 0)
return 0;
sum += c ... | replace | 16 | 17 | 16 | 17 | TLE | |
p02416 | C++ | Time Limit Exceeded | #include <stdio.h>
#include <string.h>
#define rep(i, a) for (int i = 0; i < a; ++i)
int main(void) {
char s[1500];
int i, ans = 0;
while (1) {
ans = 0;
scanf("%s", s);
if (strlen(s) == 1 && s[0] == 0)
break;
rep(i, strlen(s)) ans += s[i] - '0';
printf("%d\n", ans);
}
return 0;
}
| #include <stdio.h>
#include <string.h>
#define rep(i, a) for (int i = 0; i < a; ++i)
int main(void) {
char s[1500];
int i, ans = 0;
while (1) {
ans = 0;
scanf("%s", s);
if (strlen(s) == 1 && s[0] == '0')
break;
rep(i, strlen(s)) ans += s[i] - '0';
printf("%d\n", ans);
}
return 0;
}
| replace | 10 | 11 | 10 | 11 | TLE | |
p02416 | C++ | Runtime Error |
#include <cstdio>
int main() {
char num[900];
int sum, i, n;
for (;;) {
scanf("%s", num);
i = 0;
sum = 0;
while (num[i] != 0) {
sum = sum + (num[i] - '0');
i++;
}
if (sum == 0) {
break;
}
printf("%d\n", sum);
}
return 0;
}
|
#include <cstdio>
int main() {
char num[1000];
int sum, i, n;
for (;;) {
scanf("%s", num);
i = 0;
sum = 0;
while (num[i] != 0) {
sum = sum + (num[i] - '0');
i++;
}
if (sum == 0) {
break;
}
printf("%d\n", sum);
}
return 0;
}
| replace | 4 | 5 | 4 | 5 | 0 | |
p02416 | C++ | Time Limit Exceeded | #define _USE_MATH_DEFINES
#include <algorithm>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
int main() {
while (true) {
string x;
if (x == "0")
break;
int sum = 0;
for (int i = 0; i < x.size(); i++) {
... | #define _USE_MATH_DEFINES
#include <algorithm>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
int main() {
while (true) {
string x;
cin >> x;
if (x == "0")
break;
int sum = 0;
for (int i = 0; i < x.size();... | insert | 13 | 13 | 13 | 14 | TLE | |
p02417 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
char SAO;
int count[26] = {0};
while (true) {
cin >> SAO;
if (SAO == '.')
break;
if (SAO == 'A' || SAO == 'a') {
count[0]++;
}
if (SAO == 'B' || SAO == 'b') {
count[1]++;
}
if (SAO == 'C' || SAO == 'c') {
cou... | #include <iostream>
using namespace std;
int main() {
char SAO;
int count[26] = {0};
while (cin >> SAO) {
if (isalpha(static_cast<unsigned char>(SAO))) {
if (SAO == 'A' || SAO == 'a') {
count[0]++;
}
if (SAO == 'B' || SAO == 'b') {
count[1]++;
}
if (SAO == 'C' || ... | replace | 5 | 86 | 5 | 85 | TLE | |
p02417 | C++ | Time Limit Exceeded | #include <iostream>
#include <string>
#include <vector>
#define ALPHABET_NUM ('z' - 'a' + 1)
using namespace std;
int main(int argc, char *argv[]) {
vector<int> num(ALPHABET_NUM, 0);
while (true) {
string str;
getline(cin, str);
for (string::iterator itr = str.begin(); itr != str.end(); itr++) {
... | #include <iostream>
#include <string>
#include <vector>
#define ALPHABET_NUM ('z' - 'a' + 1)
using namespace std;
int main(int argc, char *argv[]) {
vector<int> num(ALPHABET_NUM, 0);
char c;
while (cin >> c) {
if (!('A' <= c && c <= 'Z') && !('a' <= c && c <= 'z'))
continue;
if ('A' <= c && c <= ... | replace | 10 | 21 | 10 | 17 | TLE | |
p02417 | C++ | Runtime Error | #include <iostream>
#include <string>
using namespace std;
int main() {
int cnt[25] = {};
char ch;
while (cin >> ch) {
ch = tolower(ch);
if (isalpha(ch))
cnt[ch - 'a']++;
}
for (int i = 0; i <= 25; i++) {
cout << (char)(i + 'a') << " : " << cnt[i] << endl;
}
return 0;
}
| #include <iostream>
#include <string>
using namespace std;
int main() {
int cnt[26] = {};
char ch;
while (cin >> ch) {
ch = tolower(ch);
if (isalpha(ch))
cnt[ch - 'a']++;
}
for (int i = 0; i <= 25; i++) {
cout << (char)(i + 'a') << " : " << cnt[i] << endl;
}
return 0;
}
| replace | 5 | 6 | 5 | 6 | 0 | |
p02417 | C++ | Runtime Error | #include <iostream>
#include <string>
using namespace std;
int main() {
string a, e;
int i, d[26];
for (i = 0; i < 26; i++) {
d[i] = 0;
}
char b;
while (1) {
getline(cin, e);
a += e;
if (e.substr(1, 1) == "") {
break;
}
}
string::iterator s;
for (s = a.begin(); s != a.end()... | #include <iostream>
#include <string>
using namespace std;
int main() {
string a, e;
int i, d[26];
for (i = 0; i < 26; i++) {
d[i] = 0;
}
char b;
while (1) {
getline(cin, e);
a += e;
if (e == "") {
break;
}
}
string::iterator s;
for (s = a.begin(); s != a.end(); s++) {
... | replace | 15 | 16 | 15 | 16 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): basic_string::substr: __pos (which is 1) > this->size() (which is 0)
|
p02417 | C++ | Time Limit Exceeded | #include <ctype.h>
#include <stdio.h>
int main() {
int c;
int cnt[500] = {0};
while (c != '.') {
c = getchar();
if (islower(c)) {
cnt[c]++;
} else {
cnt[c + 32]++;
}
}
for (c = 'a'; c <= 'z'; c++) {
printf("%c : %d\n", c, cnt[c]);
}
return 0;
} | #include <ctype.h>
#include <stdio.h>
int main() {
int c;
int cnt[500] = {0};
while (c != EOF) {
c = getchar();
if (islower(c)) {
cnt[c]++;
} else {
cnt[c + 32]++;
}
}
for (c = 'a'; c <= 'z'; c++) {
printf("%c : %d\n", c, cnt[c]);
}
return 0;
} | replace | 5 | 6 | 5 | 6 | TLE | |
p02417 | C++ | Time Limit Exceeded | #include <iostream>
int main() {
char c;
int n[26]{};
while (1) {
std::cin >> c;
if (c == '0')
break;
if ('A' <= c && c <= 'Z')
++n[c - 'A'];
else if ('a' <= c && c <= 'z')
++n[c - 'a'];
}
for (int i = 0; i != 26; ++i)
std::cout << char('a' + i) << " : " << n[i] << '\n';... | #include <iostream>
int main() {
char c;
int n[26]{};
while (std::cin >> c) {
if ('A' <= c && c <= 'Z')
++n[c - 'A'];
else if ('a' <= c && c <= 'z')
++n[c - 'a'];
}
for (int i = 0; i != 26; ++i)
std::cout << char('a' + i) << " : " << n[i] << '\n';
} | replace | 5 | 9 | 5 | 6 | TLE | |
p02417 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
int main(void) {
// Your code here! sakuraihaaho
string x;
int hai[26] = {};
while (getline(cin, x)) {
for (int i = 0; i < x.size(); i++) {
if ((int)x.at(i) >= (int)'a' && (int)x.at(i) <= (int)'z')
hai[x.at(i) - (int)'a'] += 1;
... | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
int main(void) {
// Your code here! sakuraihaaho
string x;
int hai[26] = {};
while (getline(cin, x)) {
for (int i = 0; i < x.size(); i++) {
if ((int)x.at(i) >= (int)'a' && (int)x.at(i) <= (int)'z')
hai[x.at(i) - (int)'a'] += 1;
... | replace | 11 | 12 | 11 | 12 | 0 | |
p02417 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
// map < char , int > count;
int count[500] = {};
string str;
while (cin >> str) {
for (int i = 0; i < str.size(); i++) {
if (isupper(str[i]))
str[i] = tolower(str[i]);
}
for (int i = 0; i < str.size(); i++) {
count[str[... | #include <bits/stdc++.h>
using namespace std;
int main() {
// map < char , int > count;
int count[500] = {};
string str;
while (cin >> str) {
for (int i = 0; i < str.size(); i++) {
if (isupper(str[i]))
str[i] = tolower(str[i]);
}
for (int i = 0; i < str.size(); i++) {
count[str[... | replace | 16 | 17 | 16 | 17 | TLE | |
p02417 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <locale>
#include <string>
#include <vector>
static bool readLines(std::string &str) {
std::string tmp;
if (0x00 == &str) {
return false;
}
while (std::getline(std::cin, tmp)) {
if (0 < tmp.size()) {
transform(str.begin(), str.end(), str.begin()... | #include <algorithm>
#include <iostream>
#include <locale>
#include <string>
#include <vector>
static bool readLines(std::string &str) {
std::string tmp;
if (0x00 == &str) {
return false;
}
while (std::getline(std::cin, tmp)) {
if (0 < tmp.size()) {
transform(tmp.begin(), tmp.end(), tmp.begin()... | replace | 15 | 16 | 15 | 16 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): vector::_M_range_check: __n (which is 18446744073709551603) >= this->size() (which is 26)
|
p02417 | C++ | Time Limit Exceeded | #include <cstdio>
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
char ch, x;
int ans, num, counter[100] = {}, i, j;
while (1) {
cin >> ch;
if (ch == EOF)
break;
else if (ch > 'A' && ch < 'Z') {
ch += 'a' - 'A';
}
num = ch - 'a';
counter[num]++;
}
f... | #include <cstdio>
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
char ch, x;
int ans, num, counter[100] = {}, i, j;
while (cin >> ch) {
if (ch >= 'A' && ch <= 'Z') {
ch += 'a' - 'A';
}
num = ch - 'a';
counter[num]++;
}
for (i = 0; i < 26; i++) {
x = i + 'a';... | replace | 7 | 12 | 7 | 9 | TLE | |
p02417 | C++ | Time Limit Exceeded | #include <cctype>
#include <cstdio>
int main() {
int n[26] = {0};
char c;
while (scanf("%c", &c), c != EOF)
n[(int)tolower(c) - 97]++;
c = 97;
for (int i = 0; i < 26; i++)
printf("%c : %d\n", c + i, n[i]);
} | #include <cctype>
#include <cstdio>
int main() {
int n[26] = {0};
char c;
while (scanf("%c", &c) != EOF)
n[(int)tolower(c) - 97]++;
c = 97;
for (int i = 0; i < 26; i++)
printf("%c : %d\n", c + i, n[i]);
} | replace | 5 | 6 | 5 | 6 | TLE | |
p02417 | C++ | Time Limit Exceeded | #include <stdio.h>
int main() {
char ch[26] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i',
'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r',
's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};
int cnt[26] = {0};
char inp;
while (1) {
scanf("%c", &inp);
if (inp == EOF)
break;
... | #include <stdio.h>
int main() {
char ch[26] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i',
'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r',
's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};
int cnt[26] = {0};
char inp;
while (1) {
if (scanf("%c", &inp) == EOF)
break;
for (i... | replace | 10 | 12 | 10 | 11 | TLE | |
p02417 | C++ | Runtime Error |
#include <cstdio>
int main() {
int count[26];
for (int i = 0; i < 1201; i++) {
count[i] = 0;
}
char ch;
while (scanf("%c", &ch) != EOF) {
if (ch >= 'a' && ch <= 'z') {
count[ch - 'a']++;
} else if (ch >= 'A' && ch <= 'Z') {
count[ch - 'A']++;
}
}
for (int j = 0; j < 26; j++) ... |
#include <cstdio>
int main() {
int count[1201];
char ch;
while (scanf("%c", &ch) != EOF) {
if (ch >= 'a' && ch <= 'z') {
count[ch - 'a']++;
} else if (ch >= 'A' && ch <= 'Z') {
count[ch - 'A']++;
}
}
for (int j = 0; j < 26; j++) {
printf("%c : %d\n", j + 'a', count[j]);
}
ret... | replace | 4 | 8 | 4 | 5 | -6 | *** stack smashing detected ***: terminated
|
p02417 | C++ | Time Limit Exceeded | #include <ctype.h>
#include <stdio.h>
#define CHARNUM 26
char c_set[CHARNUM] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i',
'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r',
's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};
int ctoi(char c) {
int i = 0;
while (c != c_set[i] && i <... | #include <ctype.h>
#include <stdio.h>
#define CHARNUM 26
char c_set[CHARNUM] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i',
'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r',
's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};
int ctoi(char c) {
int i = 0;
while (c != c_set[i] && i <... | replace | 19 | 20 | 19 | 20 | TLE | |
p02417 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
int a[26] = {}, i;
char c;
while (1) {
cin.get(c);
if (c == 'EOF')
break;
else if ('a' <= c && c <= 'z')
a[c - 'a']++;
else if ('A' <= c && c <= 'Z')
a[c - 'A']++;
}
for (i = 0; i < 26; i++) {
c = 'a' + i;
cout <<... | #include <iostream>
using namespace std;
int main() {
int a[26] = {}, i;
char c;
while (cin.get(c)) {
if (c == 'EOF')
break;
else if ('a' <= c && c <= 'z')
a[c - 'a']++;
else if ('A' <= c && c <= 'Z')
a[c - 'A']++;
}
for (i = 0; i < 26; i++) {
c = 'a' + i;
cout << c << "... | replace | 6 | 8 | 6 | 7 | TLE | |
p02417 | C++ | Runtime Error | #include <cctype>
#include <iostream>
#include <string>
using namespace std;
int main(void) {
int counter[26];
string ch;
char c;
for (c = 'a'; c <= 'z'; c++) {
counter[c] = 0;
}
while (cin >> ch) {
for (int i = 0; i < (int)ch.size(); i++) {
if (isupper(ch[i]))
ch[i] = tolower(ch[i... | #include <cctype>
#include <iostream>
#include <string>
using namespace std;
int main(void) {
int counter[256];
string ch;
char c;
for (c = 'a'; c <= 'z'; c++) {
counter[c] = 0;
}
while (cin >> ch) {
for (int i = 0; i < (int)ch.size(); i++) {
if (isupper(ch[i]))
ch[i] = tolower(ch[... | replace | 7 | 8 | 7 | 8 | 0 | |
p02417 | C++ | Runtime Error |
#include <cstdio>
int main() {
int count[26];
for (int i = 0; i < 1201; i++) {
count[i] = 0;
}
char ch;
while (scanf("%c", &ch) != EOF) {
if (ch >= 'a' && ch <= 'z') {
count[ch - 'a']++;
} else if (ch >= 'A' && ch <= 'Z') {
count[ch - 'A']++;
}
}
for (int j = 0; j < 26; j++) ... |
#include <cstdio>
int main() {
int count[1201];
char ch;
while (scanf("%c", &ch) != EOF) {
if (ch >= 'a' && ch <= 'z') {
count[ch - 'a']++;
} else if (ch >= 'A' && ch <= 'Z') {
count[ch - 'A']++;
}
}
for (int j = 0; j < 26; j++) {
printf("%c : %d\n", j + 'a', count[j]);
}
ret... | replace | 4 | 8 | 4 | 5 | -11 | |
p02417 | C++ | Time Limit Exceeded | #include <cctype>
#include <stdio.h>
int main() {
char ch;
int count[26] = {};
while ((ch = getchar()) != '\0') {
if (isupper(ch))
ch = tolower(ch);
if (isalpha(ch))
count[ch - 'a'] += 1;
}
for (int i = 0; i < 26; i++) {
printf("%c : %d\n", i + 'a', count[i]);
}
}
| #include <cctype>
#include <stdio.h>
int main() {
char ch;
int count[26] = {};
while ((ch = getchar()) != EOF) {
if (isupper(ch))
ch = tolower(ch);
if (isalpha(ch))
count[ch - 'a'] += 1;
}
for (int i = 0; i < 26; i++) {
printf("%c : %d\n", i + 'a', count[i]);
}
}
| replace | 5 | 6 | 5 | 6 | TLE | |
p02417 | C++ | Time Limit Exceeded | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
char c;
int a[26] = {0};
char d[26] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i',
'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r',
's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};
int b, i;
while (scanf("%c", &c) &&... | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
char c;
int a[26] = {0};
char d[26] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i',
'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r',
's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};
int b, i;
while (scanf("%c", &c) !=... | replace | 11 | 12 | 11 | 12 | TLE | |
p02417 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main(int argc, char *argv[]) {
unordered_multiset<string> parts;
vector<string> alphabet;
for (int i = 97; i < 123; i++) {
alphabet.push_back(string(1, (char)i));
}
while (1) {
string word;
cin >> word;
for (auto var : word) {
parts.inser... | #include <bits/stdc++.h>
using namespace std;
int main(int argc, char *argv[]) {
unordered_multiset<string> parts;
vector<string> alphabet;
for (int i = 97; i < 123; i++) {
alphabet.push_back(string(1, (char)i));
}
char tmpc;
while (cin >> tmpc) {
parts.insert(string(1, tolower(tmpc)));
}
for (... | replace | 8 | 16 | 8 | 12 | TLE | |
p02417 | C++ | Time Limit Exceeded | #include <iostream>
#include <vector>
using namespace std;
int main() {
vector<int> Result(26, 0);
char a;
while (scanf("%c", &a)) {
if (a == EOF) {
break;
}
if (iswalpha(a)) {
int temp = tolower(a) - 'a';
Result.at(temp) += 1;
}
}
char c = 'a';
for (auto b : Result) {... | #include <iostream>
#include <vector>
using namespace std;
int main() {
vector<int> Result(26, 0);
char a;
while (cin >> a) {
if (iswalpha(a)) {
int temp = tolower(a) - 'a';
Result.at(temp) += 1;
}
}
char c = 'a';
for (auto b : Result) {
cout << c << " : " << b << endl;
c++;... | replace | 10 | 14 | 10 | 11 | TLE | |
p02417 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
char a;
int kotae[26], b;
int main(void) {
while (1) {
scanf(" %c", &a);
if (a == '.')
break;
for (int j = 0; j < 26; j++) {
if (a == 'a' + j || a == 'A' + j) {
kotae[j] += 1;
}
}
}
for (int i = 0; i < 26; i++) {
cout << (... | #include <bits/stdc++.h>
using namespace std;
char a;
int kotae[26], b;
int main(void) {
while (1) {
if (scanf(" %c", &a) == EOF)
break;
for (int j = 0; j < 26; j++) {
if (a == 'a' + j || a == 'A' + j) {
kotae[j] += 1;
}
}
}
for (int i = 0; i < 26; i++) {
cout << (char)('... | replace | 6 | 8 | 6 | 7 | TLE | |
p02417 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
int alpha[26];
for (int a = 0; a < 26; a++)
alpha[a] = 0;
char ch;
while (1) {
cin >> ch;
if (ch == '.')
break;
for (int i = 0; i < 26; i++) {
if (ch - 'a' == i)
alpha[i]++;
else if (ch + 32 - 'a' == i)
al... | #include <iostream>
using namespace std;
int main() {
int alpha[26];
for (int a = 0; a < 26; a++)
alpha[a] = 0;
char ch;
while (cin >> ch) {
for (int i = 0; i < 26; i++) {
if (ch - 'a' == i)
alpha[i]++;
else if (ch + 32 - 'a' == i)
alpha[i]++;
}
}
for (int i = 0; ... | replace | 9 | 13 | 9 | 10 | TLE | |
p02417 | C++ | Time Limit Exceeded | #include <ctype.h>
#include <stdio.h>
int main() {
int s;
int i = 0;
int count[26] = {0};
while ((s = getchar()) != '.' || i < 20) {
s = tolower(s);
if (s >= 'a' && s <= 'z')
count[s - 'a']++;
i++;
}
for (i = 0; i < 26; i++)
printf("%c : %d\n", 97 + i, count[i]);
return 0;
} | #include <ctype.h>
#include <stdio.h>
int main() {
int s;
int i = 0;
int count[26] = {0};
while (i < 1200) {
s = getchar();
s = tolower(s);
if (s >= 'a' && s <= 'z')
count[s - 'a']++;
i++;
}
for (i = 0; i < 26; i++)
printf("%c : %d\n", 97 + i, count[i]);
return 0;
} | replace | 6 | 7 | 6 | 8 | TLE | |
p02417 | C++ | Time Limit Exceeded | #include <cstdio>
int main(void) {
int ch;
int chCounts[26] = {};
while (scanf("%d", &ch) != EOF) {
if ('a' <= ch && ch <= 'z') {
chCounts[ch - 'a']++;
} else if ('A' <= ch && ch <= 'Z') {
chCounts[ch - 'A']++;
}
}
for (int i = 0; i < 26; i++) {
printf("%c : %d\n", 'a' + i, chCoun... | #include <cstdio>
int main(void) {
int ch;
int chCounts[26] = {};
while ((ch = getchar()) != EOF) {
if ('a' <= ch && ch <= 'z') {
chCounts[ch - 'a']++;
} else if ('A' <= ch && ch <= 'Z') {
chCounts[ch - 'A']++;
}
}
for (int i = 0; i < 26; i++) {
printf("%c : %d\n", 'a' + i, chCoun... | replace | 5 | 6 | 5 | 6 | TLE | |
p02417 | C++ | Time Limit Exceeded | #include <ctype.h>
#include <stdio.h>
int main(void) {
char str;
static int cnt[26];
int ptr;
while (true) {
scanf("%c", &str);
if (str == EOF)
break;
if (isalpha(str)) {
if (isupper(str))
ptr = str - 'A';
else
ptr = str - 'a';
cnt[ptr]++;
}
}
for ... | #include <ctype.h>
#include <stdio.h>
int main(void) {
char str;
static int cnt[26];
int ptr;
while (scanf("%c", &str) != EOF) {
if (isalpha(str)) {
if (isupper(str))
ptr = str - 'A';
else
ptr = str - 'a';
cnt[ptr]++;
}
}
for (int i = 0; i < 26; i++) {
print... | replace | 8 | 12 | 8 | 9 | TLE | |
p02417 | C++ | Time Limit Exceeded | #include <cctype>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
char moji;
int alpha[26] = {0};
while ((moji = getchar()) != 0) {
moji = tolower(moji);
alpha[moji - 'a']++;
}
for (int i = 0; i < 26; i++) {
printf("%c : %d\n", 97 + i, alpha[i]);
}
return 0;
}
| #include <cctype>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
char moji;
int alpha[26] = {0};
while ((moji = getchar()) != EOF) {
moji = tolower(moji);
alpha[moji - 'a']++;
}
for (int i = 0; i < 26; i++) {
printf("%c : %d\n", 97 + i, alpha[i]);
}
return 0;
}
| replace | 10 | 11 | 10 | 11 | TLE | |
p02417 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main(void) {
int a[26] = {0};
char text;
while (true) {
cin >> text;
if (text >= 'a' && text <= 'z')
a[text - 'a']++;
if (text >= 'A' && text <= 'Z')
a[text - 'A']++;
}
for (int i = 0; i < 26; i++) {
cout << (char)(i + 'a') << " : " << ... | #include <iostream>
using namespace std;
int main(void) {
int a[26] = {0};
char text;
while (cin >> text) {
if (text >= 'a' && text <= 'z')
a[text - 'a']++;
if (text >= 'A' && text <= 'Z')
a[text - 'A']++;
}
for (int i = 0; i < 26; i++) {
cout << (char)(i + 'a') << " : " << a[i] << en... | replace | 6 | 8 | 6 | 7 | TLE | |
p02417 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
string ch;
int result[25] = {0};
cin >> ch;
for (int i = 0; i < ch.size(); i++) {
if (isalpha(ch[i])) {
result[ch[i] - 'a']++;
}
}
for (int i = 0; i < 26; i++) {
cout << (char)('a' + i) << " : " << result[i] << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string ch;
int result[26] = {0};
while (getline(cin, ch)) {
for (int i = 0; i < ch.size(); i++) {
if (isalpha(ch[i])) {
ch[i] = tolower(ch[i]);
result[ch[i] - 'a']++;
}
}
}
for (int i = 0; i < 26; i++) {
cout <<... | replace | 4 | 9 | 4 | 11 | 0 | |
p02417 | C++ | Time Limit Exceeded | #include <cctype>
#include <iostream>
using namespace std;
int main() {
char ch;
int count[26] = {0};
int i;
while (1) {
cin >> ch;
if (isalpha(ch) != 0) {
count[tolower(ch) - 'a']++;
}
}
for (i = 0; i < 26; i++) {
cout << (char)(i + 'a') << " : " << count[i] << endl;
}
return 0;... | #include <cctype>
#include <iostream>
using namespace std;
int main() {
char ch;
int count[26] = {0};
int i;
while (cin >> ch) {
if (isalpha(ch) != 0) {
count[tolower(ch) - 'a']++;
}
}
for (i = 0; i < 26; i++) {
cout << (char)(i + 'a') << " : " << count[i] << endl;
}
return 0;
} | replace | 9 | 11 | 9 | 10 | TLE | |
p02417 | C++ | Time Limit Exceeded | #include <math.h>
#include <stdio.h>
#include <string.h>
#define rep(i, a, n) for (int i = a; i < n; i++)
int main() {
char c;
int d[26] = {0};
while (scanf("%c", &c) != 'EOF') {
// if(c=='0') break;
if ('a' <= c && c <= 'z')
d[c - 'a']++;
else if ('A' <= c && c <= 'Z')
d[c - 'A']++;
}
... | #include <math.h>
#include <stdio.h>
#include <string.h>
#define rep(i, a, n) for (int i = a; i < n; i++)
int main() {
char c;
int d[26] = {0};
while (scanf("%c", &c) != EOF) {
// if(c=='0') break;
if ('a' <= c && c <= 'z')
d[c - 'a']++;
else if ('A' <= c && c <= 'Z')
d[c - 'A']++;
}
... | replace | 8 | 9 | 8 | 9 | TLE | |
p02417 | C++ | Time Limit Exceeded | #include <cctype>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
char ch;
int count[26] = {};
while (1) {
cin >> ch;
ch = tolower(ch);
if (isalpha(ch)) {
count[ch - 'a']++;
}
}
for (int i = 0; i < 26; i++) {
printf("%c : %d\n", i + 'a', count[i]);
}
}
| #include <cctype>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
char ch;
int count[26] = {};
while (cin >> ch) {
ch = tolower(ch);
if (isalpha(ch)) {
count[ch - 'a']++;
}
}
for (int i = 0; i < 26; i++) {
printf("%c : %d\n", i + 'a', count[i]);
}
}
| replace | 7 | 9 | 7 | 8 | TLE | |
p02417 | C++ | Runtime Error | #include <algorithm>
#include <functional>
#include <iostream>
#include <vector>
using namespace std;
int main() {
string s;
char m;
vector<char> si;
getline(cin, s);
while (s.size() > 0) {
// si.resize(s.size());
// for(int i=0;i<s.size();i++){
// si[i] = null;
// }
int i = 0;
wh... | #include <algorithm>
#include <functional>
#include <iostream>
#include <vector>
using namespace std;
int main() {
string s;
char m;
vector<char> si;
getline(cin, s);
while (s.size() > 0) {
// si.resize(s.size());
// for(int i=0;i<s.size();i++){
// si[i] = null;
// }
int i = 0;
wh... | replace | 34 | 35 | 34 | 35 | 0 | |
p02417 | Python | Runtime Error | import sys
from collections import Counter
m = Counter(sys.stdin.read.lower())
for i in "abcdefghijklmnopqrstuvwxyz":
print(i, ":", m[i])
| import sys
from collections import Counter
m = Counter(sys.stdin.read().lower())
for i in "abcdefghijklmnopqrstuvwxyz":
print(i, ":", m[i])
| replace | 3 | 4 | 3 | 4 | AttributeError: 'builtin_function_or_method' object has no attribute 'lower' | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02417/Python/s900646841.py", line 3, in <module>
m = Counter(sys.stdin.read.lower())
AttributeError: 'builtin_function_or_method' object has no attribute 'lower'
|
p02418 | C++ | Time Limit Exceeded | #include "bits/stdc++.h"
using namespace std;
int main() {
string s, p;
cin >> s >> p;
int i, j, n, m;
n = s.length();
m = p.length();
for (i = 0; i < n; i = (i + 1) % n) {
for (j = 0; j < m; j++) {
if (s.at((i + j) % n) != p.at(j))
break;
if (j == m - 1)
j++;
}
if (j... | #include "bits/stdc++.h"
using namespace std;
int main() {
string s, p;
cin >> s >> p;
int i, j, n, m;
n = s.length();
m = p.length();
for (i = 0; i < n; i++) {
for (j = 0; j < m; j++) {
if (s.at((i + j) % n) != p.at(j))
break;
if (j == m - 1)
j++;
}
if (j == m + 1) {... | replace | 8 | 9 | 8 | 9 | TLE | |
p02418 | C++ | Runtime Error | #include <cctype>
#include <cstring>
#include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
int main() {
char str1[100], str2[100], str3[100];
scanf("%s\n%s", str1, str2);
int length = strlen(str1);
strcpy(str3, str1);
strcat(str3, str1); // 文字列 str1 に文字列 str2 を連結する
if (strstr(str3... | #include <cctype>
#include <cstring>
#include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
int main() {
char str1[100], str2[100], str3[200];
scanf("%s\n%s", str1, str2);
int length = strlen(str1);
strcpy(str3, str1);
strcat(str3, str1); // 文字列 str1 に文字列 str2 を連結する
if (strstr(str3... | replace | 8 | 9 | 8 | 9 | 0 | |
p02418 | C++ | Time Limit Exceeded | #include <stdio.h>
// s: a raw text, p: a pattern text
// p in s ? true:false
char s[101];
char p[101];
int main() {
int i, n, j, flag, pflag;
scanf("%s", s);
scanf("%s", p);
for (i = 0; s[i] != '\0'; ++i) {
pflag = 0;
for (n = i, flag = 0; s[n == 0 ? 0 : n - 1] != '\0';) {
for (j = 0; p[j] != '\0... | #include <stdio.h>
// s: a raw text, p: a pattern text
// p in s ? true:false
char s[101];
char p[101];
int main() {
int i, n, j, flag, pflag;
scanf("%s", s);
scanf("%s", p);
for (i = 0; s[i] != '\0'; ++i) {
pflag = 0;
for (n = i, flag = 0; s[n == 0 ? 0 : n - 1] != '\0' && pflag == 0;) {
for (j = ... | replace | 11 | 12 | 11 | 12 | TLE | |
p02418 | C++ | Runtime Error | #include <cstdio>
#include <cstring>
int main() {
char s[202], p[100];
scanf("%s", s);
scanf("%s", p);
strcat(s, s);
if (strstr(s, p)) {
printf("Yes\n");
} else {
printf("No\n");
}
return 0;
} | #include <cstdio>
#include <cstring>
int main() {
char s[202], p[100];
scanf("%s", s);
scanf("%s", p);
sprintf(s, "%s%s", s, s);
if (strstr(s, p)) {
printf("Yes\n");
} else {
printf("No\n");
}
return 0;
} | replace | 7 | 8 | 7 | 8 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.