problem_id stringlengths 6 6 | buggy_code stringlengths 8 526k | fixed_code stringlengths 12 526k | labels listlengths 0 15 ⌀ | buggy_submission_id int64 1 1.54M | fixed_submission_id int64 2 1.54M | user_id stringlengths 10 10 | language stringclasses 8
values |
|---|---|---|---|---|---|---|---|
p02419 | #include <iostream>
using namespace std;
bool charcmpLS(char Char1, char Char2) {
if ('a' <= Char1 && Char1 <= 'z')
Char1 -= ('a' - 'A');
if ('a' <= Char2 && Char2 <= 'z')
Char2 -= ('a' - 'A');
return Char1 == Char2 ? true : false;
}
bool strcmpLS(const char *Str1, const char *Str2) {
while (*Str1 !=... | #include <iostream>
using namespace std;
bool charcmpLS(char Char1, char Char2) {
if ('a' <= Char1 && Char1 <= 'z')
Char1 -= ('a' - 'A');
if ('a' <= Char2 && Char2 <= 'z')
Char2 -= ('a' - 'A');
return Char1 == Char2 ? true : false;
}
bool strcmpLS(const char *Str1, const char *Str2) {
while (*Str1 !=... | [
"misc.opposites",
"control_flow.loop.condition.change"
] | 222,816 | 222,817 | u178521091 | cpp |
p02419 | #include <cctype>
#include <iostream>
#include <string>
using namespace std;
int main() {
int a;
string str1, str2;
cin >> str2;
while (1) {
cin >> str1;
if (str1 == "END_OF_TEXT")
break;
for (int i = 0; i < str1.size(); i++)
str1[i] = tolower(str1[i]);
if (str1 == str2)
a++;... | #include <cctype>
#include <iostream>
#include <string>
using namespace std;
int main() {
int a = 0; // a??????????????????????????????
string str1, str2;
cin >> str2;
while (1) {
cin >> str1;
if (str1 == "END_OF_TEXT")
break;
for (int i = 0; i < str1.size(); i++)
str1[i] = tolower(str... | [
"variable_declaration.value.change"
] | 222,820 | 222,821 | u377471313 | cpp |
p02419 | #include <cctype>
#include <iostream>
#include <string>
using namespace std;
string toUpper(string s) {
string t;
for (int i = 0; i < s.size(); i++)
t[i] = toupper(s[i]);
return t;
}
int main() {
int a = 0; // a??????????????????????????????
string str1, str2;
cin >> str2;
str2 = toUpper(str2);
... | #include <cctype>
#include <iostream>
#include <string>
using namespace std;
string toUpper(string s) {
string t = s;
for (int i = 0; i < s.size(); i++)
t[i] = toupper(s[i]);
return t;
}
int main() {
int a = 0; // a??????????????????????????????
string str1, str2;
cin >> str2;
str2 = toUpper(str2);... | [
"variable_declaration.value.change"
] | 222,823 | 222,824 | u377471313 | cpp |
p02419 | #include <bits/stdc++.h>
using namespace std;
int main() {
int k = 0, c;
string s, d;
cin >> s;
c = s.size();
while ((--c) > 0)
s[c] = tolower(s[c]);
while (cin >> d) {
if (d == "END_OF_TEXT")
break;
c = d.size();
while ((--c) > 0)
d[c] = tolower(d[c]);
if (s == d)
k++;... | #include <bits/stdc++.h>
using namespace std;
int main() {
int k = 0, c;
string s, d;
cin >> s;
c = s.size();
while ((--c) > 0)
s[c] = tolower(s[c]);
while (cin >> d) {
if (d == "END_OF_TEXT")
break;
c = d.size();
while ((--c) > -1)
d[c] = tolower(d[c]);
if (s == d)
k++... | [
"literal.number.change",
"control_flow.loop.condition.change"
] | 222,825 | 222,826 | u962041986 | cpp |
p02419 | #include <bits/stdc++.h>
using namespace std;
int main() {
int k = 0, c;
string s, d;
cin >> s;
c = s.size();
while ((--c) > 0)
s[c] = tolower(s[c]);
while (cin >> d) {
if (d == "END_OF_TEXT")
break;
c = d.size();
while ((--c) > -1)
d[c] = tolower(d[c]);
if (s == d)
k++... | #include <bits/stdc++.h>
using namespace std;
int main() {
int k = 0, c;
string s, d;
cin >> s;
c = s.size();
while ((--c) > 0)
s[c] = tolower(s[c]);
while (cin >> d) {
if (d == "END_OF_TEXT")
break;
c = d.size();
while ((--c) > -1)
d[c] = tolower(d[c]);
if (s == d)
k++... | [] | 222,827 | 222,826 | u962041986 | cpp |
p02419 | #include <iostream>
#include <string>
using std::cin;
using std::cout;
using std::endl;
using std::string;
string strUpp(string S) {
// ??\????????§??????????????????
for (size_t i = 0; i < S.size(); i++) {
S[i] = toupper(S[i]);
}
return S;
}
int main() {
string W;
string T;
int sum = 0;
cin >> W... | #include <iostream>
#include <string>
using std::cin;
using std::cout;
using std::endl;
using std::string;
string strUpp(string S) {
// ??\????????§??????????????????
for (size_t i = 0; i < S.size(); i++) {
S[i] = toupper(S[i]);
}
return S;
}
int main() {
string W;
string T;
int sum = 0;
cin >> W... | [
"assignment.change"
] | 222,832 | 222,833 | u597207241 | cpp |
p02419 | #include <cctype>
#include <iostream>
using namespace std;
#include <cstdio>
#include <cstring>
#include <string>
string Upper(string s) {
string t = s;
for (int i = 0; t.size(); i++) {
t[i] = toupper(s[i]);
}
return t;
}
int main() {
string W, T;
int count = 0;
cin >> W;
W = Upper(W);
while ... | #include <cctype>
#include <iostream>
using namespace std;
#include <cstdio>
#include <cstring>
#include <string>
string Upper(string s) {
string t = s;
for (int i = 0; i < s.size(); i++) {
t[i] = toupper(s[i]);
}
return t;
}
int main() {
string W, T;
int count = 0;
cin >> W;
W = Upper(W);
wh... | [
"control_flow.loop.for.condition.change"
] | 222,838 | 222,839 | u622982727 | cpp |
p02419 | #include <iostream>
#include <string>
using namespace std;
int main() {
string w, t;
int counter = 0;
cin >> w;
for (int i = 0; w[i] != w.length(); i++) {
if (islower(w[i]))
w[i] = toupper(w[i]);
}
while (cin >> t) {
if (t == "END_OF_TEXT") {
cout << counter << endl;
break;
}
... | #include <iostream>
#include <string>
using namespace std;
int main() {
string w, t;
int counter = 0;
cin >> w;
for (int i = 0; i < w.length(); i++) {
if (islower(w[i]))
w[i] = toupper(w[i]);
}
while (cin >> t) {
if (t == "END_OF_TEXT") {
cout << counter << endl;
break;
}
... | [
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 222,847 | 222,848 | u438713646 | cpp |
p02419 | #include <iostream>
#include <string>
using namespace std;
int main(void) {
string word;
int count = 0;
cin >> word;
while (1) {
string sent;
cin >> sent;
if (sent == "END_OF_TEXT")
break;
for (int i = 0; i < sent.length(); i++) {
if (sent[i] >= 'A' && sent[i] <= 'Z')
... | #include <iostream>
#include <string>
using namespace std;
int main(void) {
string word;
int count = 0;
cin >> word;
while (1) {
string sent;
cin >> sent;
if (sent == "END_OF_TEXT")
break;
for (int i = 0; i < sent.length(); i++) {
if (sent[i] >= 'A' && sent[i] <= 'Z')
... | [] | 222,858 | 222,859 | u709538965 | cpp |
p02420 | #include <ctype.h>
#include <stdio.h>
#include <string.h>
int main() {
char W[201], Wbuf[201];
int h;
int n, i, j, k;
while (1) {
scanf("%s\n%d", W, &n);
if (W[0] == '-')
break;
for (i = 0; i < n; i++) {
scanf("%d", &h);
for (j = h; W[j] != '\0'; j++) {
Wbuf[j - h] = W[j];... | #include <ctype.h>
#include <stdio.h>
#include <string.h>
int main() {
char W[201], Wbuf[201];
int h;
int n, i, j, k;
while (1) {
scanf("%s\n%d", W, &n);
if (W[0] == '-')
break;
for (i = 0; i < n; i++) {
scanf("%d", &h);
for (j = h; W[j] != '\0'; j++)
Wbuf[j - h] = W[j];
... | [] | 222,864 | 222,865 | u788279500 | cpp |
p02420 | #include <iostream>
#include <string>
using namespace std;
int main() {
const string eot = "-";
string w;
while (cin >> w) {
if (w == eot)
break;
unsigned int n;
cin >> n;
unsigned int s = 0;
for (unsigned int i = 0; i < n; ++i) {
unsigned int l;
cin >> l;
s += l;
... | #include <iostream>
#include <string>
using namespace std;
int main() {
const string eot = "-";
string w;
while (cin >> w) {
if (w == eot)
break;
unsigned int n;
cin >> n;
unsigned int s = 0;
for (unsigned int i = 0; i < n; ++i) {
unsigned int l;
cin >> l;
s += l;
... | [
"expression.operation.binary.remove"
] | 222,866 | 222,867 | u404591357 | cpp |
p02420 | #include <cstdio>
#include <iostream>
#include <string>
using namespace std;
int main() {
string str;
string copy[201];
int m;
int h;
while (cin >> str) {
if (str == "-")
break;
cin >> m;
for (int i = 0; i < m; i++) {
cin >> h;
}
string cat = str.substr(0, h);
str.erase(0... | #include <cstdio>
#include <iostream>
#include <string>
using namespace std;
int main() {
string str;
string copy[201];
int m;
int h;
while (cin >> str) {
if (str == "-")
break;
cin >> m;
for (int i = 0; i < m; i++) {
cin >> h;
string cat = str.substr(0, h);
str.erase(0, ... | [] | 222,872 | 222,873 | u224956920 | cpp |
p02420 | #define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
int main() {
string word;
int m, h;
while (true) {
cin >> word;
if (word == "-")
break;
cin >> m;
for (int i = 0; i < m; i++) {
scanf("%d", h);
word += word.substr(0, h);
word.erase(0, h);
cou... | #define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
int main() {
string word;
int m, h;
while (true) {
cin >> word;
if (word == "-")
break;
cin >> m;
for (int i = 0; i < m; i++) {
scanf("%d", &h);
word += word.substr(0, h);
word.erase(0, h);
}
... | [
"expression.operation.unary.reference.add"
] | 222,876 | 222,877 | u193016453 | cpp |
p02420 | #include <iostream>
#include <stdio.h>
#include <string.h>
#include <string>
using namespace std;
int main() {
string str1, str2;
int n, m;
while (1) {
str1 = "";
str2 = "";
cin >> str1;
if (str1[0] == '-') {
break;
}
cin >> n;
for (int i = 0; i < n; i++) {
cin >> m;
... | #include <iostream>
#include <stdio.h>
#include <string.h>
#include <string>
using namespace std;
int main() {
string str1, str2;
int n, m;
while (1) {
str1 = "";
str2 = "";
cin >> str1;
if (str1[0] == '-') {
break;
}
cin >> n;
for (int i = 0; i < n; i++) {
cin >> m;
... | [
"assignment.value.change",
"identifier.change",
"call.arguments.change"
] | 222,879 | 222,880 | u023603990 | cpp |
p02420 | #include <iostream>
#include <stdio.h>
#include <string.h>
#include <string>
using namespace std;
int main() {
string str1, str2;
int n, m;
while (1) {
str1 = "";
str2 = "";
cin >> str1;
if (str1[0] == '-') {
break;
}
cin >> n;
for (int i = 0; i < n; i++) {
cin >> m;
... | #include <iostream>
#include <stdio.h>
#include <string.h>
#include <string>
using namespace std;
int main() {
string str1, str2;
int n, m;
while (1) {
str1 = "";
str2 = "";
cin >> str1;
if (str1[0] == '-') {
break;
}
cin >> n;
for (int i = 0; i < n; i++) {
cin >> m;
... | [
"expression.operation.binary.remove"
] | 222,882 | 222,880 | u023603990 | cpp |
p02420 | #include <iostream>
#include <string>
using namespace std;
int main() {
string str1, first, last, mix;
int n, h, a;
while (true) {
cin >> str1;
if (str1 == "-")
break;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> h;
first = str1.substr(0, h);
last = str1.substr(h, a - h);... | #include <iostream>
#include <string>
using namespace std;
int main() {
string str1, first, last, mix;
int n, h, a;
while (true) {
cin >> str1;
if (str1 == "-")
break;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> h;
first = str1.substr(0, h);
last = str1.substr(h, a - h);... | [
"assignment.add"
] | 222,883 | 222,884 | u174469610 | cpp |
p02420 | #include <iostream>
#include <string>
using namespace std;
int main() {
string str;
int m, h;
while (1) {
cin >> str >> m;
if (str == "-")
break;
for (int i = 0; i < m; i++) {
cin >> h;
str = str.substr(h, str.size()) + str.substr(0, h - 1);
}
cout << str << endl;
}
ret... | #include <iostream>
#include <string>
using namespace std;
int main() {
string str;
int m, h;
while (1) {
cin >> str >> m;
if (str == "-")
break;
for (int i = 0; i < m; i++) {
cin >> h;
str = str.substr(h, str.size() - h) + str.substr(0, h);
}
cout << str << endl;
}
ret... | [
"assignment.change",
"expression.operation.binary.remove"
] | 222,887 | 222,888 | u236518840 | cpp |
p02420 | #include <iostream>
#include <string>
using namespace std;
int main() {
string str;
int m, h;
while (1) {
cin >> str >> m;
if (str == "-")
break;
for (int i = 0; i < m; i++) {
cin >> h;
str = str.substr(h + 1, str.size() - h) + str.substr(0);
}
cout << str << endl;
}
re... | #include <iostream>
#include <string>
using namespace std;
int main() {
string str;
int m, h;
while (1) {
cin >> str >> m;
if (str == "-")
break;
for (int i = 0; i < m; i++) {
cin >> h;
str = str.substr(h, str.size() - h) + str.substr(0, h);
}
cout << str << endl;
}
ret... | [
"expression.operation.binary.remove",
"call.arguments.add"
] | 222,889 | 222,888 | u236518840 | cpp |
p02420 | #include <iostream>
#include <string>
using namespace std;
int main() {
string str;
int m, h;
while (1) {
cin >> str >> m;
if (str == "-")
break;
for (int i = 0; i < m; i++) {
cin >> h;
str = str.substr(h + 1, str.size() - h) + str.substr(0, h);
}
cout << str << endl;
}
... | #include <iostream>
#include <string>
using namespace std;
int main() {
string str;
int m, h;
while (1) {
cin >> str >> m;
if (str == "-")
break;
for (int i = 0; i < m; i++) {
cin >> h;
str = str.substr(h, str.size() - h) + str.substr(0, h);
}
cout << str << endl;
}
ret... | [
"expression.operation.binary.remove"
] | 222,890 | 222,888 | u236518840 | cpp |
p02420 | #include <iostream>
using namespace std;
int main() {
int shuffle;
string str;
while (cin >> str && str != "-") {
cin >> shuffle;
for (int i = 0; i < shuffle; i++) {
int h;
cin >> h;
string tmp = str.substr(0, h);
str.erase(h);
str += tmp;
}
cout << str << endl;
}
... | #include <iostream>
using namespace std;
int main() {
int shuffle;
string str;
while (cin >> str && str != "-") {
cin >> shuffle;
for (int i = 0; i < shuffle; i++) {
int h;
cin >> h;
string tmp = str.substr(0, h);
str.erase(0, h);
str += tmp;
}
cout << str << endl;
... | [
"call.arguments.add"
] | 222,899 | 222,900 | u272156029 | cpp |
p02420 | #include <cstring>
#include <iostream>
using namespace std;
void shuffle(char *a, int h) {
char tmp[201];
char mov[201];
size_t len = strlen(a);
strcpy(tmp, (const char *)a + h);
strncpy(mov, a, h);
mov[h] = '\0';
strcat(tmp, mov);
strcpy(a, (const char *)tmp);
return;
}
int main() {
char card[201... | #include <cstring>
#include <iostream>
using namespace std;
void shuffle(char *a, int h) {
char tmp[201];
char mov[201];
size_t len = strlen(a);
strcpy(tmp, (const char *)a + h);
strncpy(mov, a, h);
mov[h] = '\0';
strcat(tmp, mov);
strcpy(a, (const char *)tmp);
return;
}
int main() {
char card[201... | [] | 222,901 | 222,902 | u822202919 | cpp |
p02420 | #include <iostream>
using namespace std;
#include <stdio.h>
//#include <string.h>
#include <string>
/********
* ?????£?????????
*********/
/*********??¢?????´?????????
* (1)??????????????\???
* (2)??????
*********/
int main(void) {
string cards;
string left;
string right;
const char *end = "-";
int n; ... | #include <iostream>
using namespace std;
#include <stdio.h>
//#include <string.h>
#include <string>
/********
* ?????£?????????
*********/
/*********??¢?????´?????????
* (1)??????????????\???
* (2)????????????????????????
*********/
int main(void) {
string cards;
string left;
string right;
const char *en... | [
"expression.operation.binary.remove"
] | 222,915 | 222,916 | u979799212 | cpp |
p02420 | #include <iostream>
#include <string>
using namespace std;
int main() {
int time, a;
string str;
while (1) {
cin >> str;
if (str == "-")
break;
cin >> time;
for (int i = 0; i < time; i++) {
cin >> a;
string left = str.substr(0, a);
string right = str.substr(a) + left;
... | #include <iostream>
#include <string>
using namespace std;
int main() {
int time, a;
string str;
while (1) {
cin >> str;
if (str == "-")
break;
cin >> time;
for (int i = 0; i < time; i++) {
cin >> a;
string left = str.substr(0, a);
string right = str.substr(a) + left;
... | [
"identifier.change",
"io.output.change"
] | 222,923 | 222,924 | u338380084 | cpp |
p02420 | #include <iostream>
#include <string>
using namespace std;
int main() {
string n;
while (1) {
cin >> n;
if (n == "-") {
break;
}
int h;
cin >> h;
for (int i = 0; i < h; i++) {
int s;
cin >> s;
n = n.substr(s) + n.substr(0, s);
}
cout << n;
}
return 0... | #include <iostream>
#include <string>
using namespace std;
int main() {
string n;
while (1) {
cin >> n;
if (n == "-") {
break;
}
int h;
cin >> h;
for (int i = 0; i < h; i++) {
int s;
cin >> s;
n = n.substr(s) + n.substr(0, s);
}
cout << n << endl;
}
... | [
"io.output.newline.add"
] | 222,927 | 222,928 | u990876498 | cpp |
p02420 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <fstream>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define REP(i, n) for (int i = 0; i < n; ++i)
#define FOR(i, a, b) for (int i = a; i... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <fstream>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define REP(i, n) for (int i = 0; i < n; ++i)
#define FOR(i, a, b) for (int i = a; i... | [] | 222,935 | 222,936 | u346550152 | cpp |
p02420 | #include <iostream>
#include <string>
using namespace std;
int main() {
string str;
cin >> str;
int m;
cin >> m;
string str1, str2;
int n;
while (str != "-") {
for (int i = 0; i < m; i++) {
cin >> n;
str1 = str.substr(0, n);
str2 = str.substr(n);
str = str2 + str1;
}
... | #include <iostream>
#include <string>
using namespace std;
int main() {
string str;
cin >> str;
int m;
cin >> m;
string str1, str2;
int n;
while (str != "-") {
for (int i = 0; i < m; i++) {
cin >> n;
str1 = str.substr(0, n);
str2 = str.substr(n);
str = str2 + str1;
}
... | [] | 222,937 | 222,938 | u122964852 | cpp |
p02420 | #include <cctype>
#include <iostream>
#include <string>
using namespace std;
string shuffle(string str, int h) {
string head = str.substr(0, h);
string tail = str.substr(h, str.size() - h);
return tail + head;
}
int main() {
string Input;
int m, H;
while (1) {
cin >> Input;
if (Input == "-")
... | #include <cctype>
#include <iostream>
#include <string>
using namespace std;
string shuffle(string str, int h) {
string head = str.substr(0, h);
string tail = str.substr(h, str.size() - h);
return tail + head;
}
int main() {
string Input;
int m, H;
while (1) {
cin >> Input;
if (Input == "-")
... | [] | 222,953 | 222,954 | u188805649 | cpp |
p02420 | #include <cstdio>
#include <cstring>
int main(void) {
int i, j;
int m[256];
int s[256] = {0};
char c[256][201];
int d[256] = {0};
int k = 0;
while (1) {
scanf("%s", c[k]);
if (strcmp(c[k], "_") == 0)
break;
while (c[k][d[k]] != '\0') {
d[k]++;
};
scanf("%d", &m[k]);
f... | #include <cstdio>
#include <cstring>
int main(void) {
int i, j;
int m[256];
int s[256] = {0};
char c[256][201];
int d[256] = {0};
int k = 0;
while (1) {
scanf("%s", c[k]);
if (strcmp(c[k], "-") == 0)
break;
while (c[k][d[k]] != '\0') {
d[k]++;
};
scanf("%d", &m[k]);
f... | [
"literal.string.change",
"control_flow.branch.if.condition.change"
] | 222,955 | 222,956 | u827926935 | cpp |
p02420 | #include <stdio.h>
#define DEBUG
#ifndef DEBUG
#define fprintf (void)
#endif
int main(void) {
char word[400];
char sword[201];
char trash;
int i = 0;
int j, k, h;
int l = 0;
int m;
int endcount = 0;
while (1) {
if (l == 1) {
scanf("%c", &trash);
}
while (1) {
scanf("%c",... | #include <stdio.h>
#ifndef DEBUG
#define fprintf (void)
#endif
int main(void) {
char word[400];
char sword[201];
char trash;
int i = 0;
int j, k, h;
int l = 0;
int m;
int endcount = 0;
while (1) {
if (l == 1) {
scanf("%c", &trash);
}
while (1) {
scanf("%c", &word[i]);
... | [] | 222,957 | 222,958 | u610083300 | cpp |
p02420 | #include <cctype>
#include <iostream>
#include <string>
using namespace std;
string shuffle(string str, int h) {
string head = str.substr(0, h);
string tail = str.substr(h, str.size() - h);
return head + tail;
}
int main() {
string cards;
int m, h;
while (1) {
cin >> cards;
if (cards == "-")
... | #include <cctype>
#include <iostream>
#include <string>
using namespace std;
string shuffle(string str, int h) {
string head = str.substr(0, h);
string tail = str.substr(h, str.size() - h);
return tail + head;
}
int main() {
string cards;
int m, h;
while (1) {
cin >> cards;
if (cards == "-")
... | [
"expression.operation.binary.remove"
] | 222,959 | 222,960 | u677263585 | cpp |
p02420 | #include <iostream>
#include <string>
using namespace std;
int main() {
for (;;) {
string first;
cin >> first;
if (first == "-") {
break;
}
int m;
cin >> m;
for (; m > 0; m--) {
int h;
cin >> h;
string a = first.substr(0, h);
first.erase(first.end() - h, first... | #include <iostream>
#include <string>
using namespace std;
int main() {
for (;;) {
string first;
cin >> first;
if (first == "-") {
break;
}
int m;
cin >> m;
for (; m > 0; m--) {
int h;
cin >> h;
string a = first.substr(0, h);
first.erase(first.begin(), first.b... | [
"call.function.change",
"call.arguments.change",
"expression.operation.binary.change",
"expression.operation.binary.remove"
] | 222,963 | 222,964 | u756732439 | cpp |
p02420 | #include <iostream>
#include <string>
using namespace std;
int main() {
string buf;
while (true) {
cin >> buf;
if (buf == "-") {
break;
}
int m = 0;
cin >> m;
int n = 0;
for (int i = 0; i < m; i++) {
cin >> n;
buf = buf.substr(n) + buf.substr(0, n);
cout << bu... | #include <iostream>
#include <string>
using namespace std;
int main() {
string buf;
while (true) {
cin >> buf;
if (buf == "-") {
break;
}
int m = 0;
cin >> m;
int n = 0;
for (int i = 0; i < m; i++) {
cin >> n;
buf = buf.substr(n) + buf.substr(0, n);
}
cout <... | [] | 222,967 | 222,968 | u837073074 | cpp |
p02420 | #include <iostream>
using namespace std;
#include <string>
int main() {
string str;
while (cin >> str && str != "-") {
int m;
cin >> m;
for (int i = 0; i < m; ++i) {
int h;
cin >> h;
h = str.size() - h;
string temp = "";
for (int j = str.size() - h; j < str.size(); ++j) {... | #include <iostream>
using namespace std;
#include <string>
int main() {
string str;
while (cin >> str && str != "-") {
int m;
cin >> m;
for (int i = 0; i < m; ++i) {
int h;
cin >> h;
h = str.size() - h;
string temp = "";
for (int j = str.size() - h; j < str.size(); ++j) {... | [] | 222,969 | 222,970 | u490319842 | cpp |
p02420 | #include <iostream>
int main() {
std::string str;
int m, h;
while (true) {
std::cin >> str;
if (str == "-")
break;
std::cin >> m;
for (int i = 0; i < m; i++) {
std::cin >> h;
str = str.substr(h) + str.erase(h);
}
std::cout << str << std::endl;
}
}
| #include <iostream>
int main() {
std::string str;
int m, h;
while (true) {
std::cin >> str;
if (str == "-")
break;
std::cin >> m;
for (int i = 0; i < m; i++) {
std::cin >> h;
str = str.substr(h) + str.substr(0, h);
}
std::cout << str << std::endl;
}
}
| [
"assignment.value.change",
"call.function.change",
"expression.operation.binary.change",
"call.arguments.add"
] | 222,971 | 222,972 | u343748576 | cpp |
p02420 | #include <stdio.h>
#include <string.h>
#define rep(i, a) for (int i = 0; i < a; ++i)
int main(void) {
char s[250], t[250];
int m, i, j, n, a;
while (1) {
scanf("%s", s);
n = strlen(s);
if (n == 1 && s[0] == '-')
break;
scanf("%d", &m);
rep(i, m) {
scanf("%d", a);
rep(j, a) t... | #include <stdio.h>
#include <string.h>
#define rep(i, a) for (int i = 0; i < a; ++i)
int main(void) {
char s[250], t[250];
int m, i, j, n, a;
while (1) {
scanf("%s", s);
n = strlen(s);
if (n == 1 && s[0] == '-')
break;
scanf("%d", &m);
rep(i, m) {
scanf("%d", &a);
rep(j, a) ... | [
"expression.operation.unary.reference.add"
] | 222,977 | 222,978 | u428870975 | cpp |
p02420 | #include <iostream>
#include <string>
int main(void) {
std::string s;
int m, h;
while (std::cin >> s) {
if (s == "-")
break;
std::cin >> m;
while (m-- >= 0) {
std::cin >> h;
s = s.substr(h) + s.substr(0, h);
}
}
std::cout << s << std::endl;
return 0;
}
| #include <iostream>
#include <string>
int main(void) {
std::string s;
int m, h;
while (std::cin >> s) {
if (s == "-")
break;
std::cin >> m;
while (m-- > 0) {
std::cin >> h;
s = s.substr(h) + s.substr(0, h);
}
std::cout << s << std::endl;
}
return 0;
}
| [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 222,979 | 222,980 | u809931314 | cpp |
p02420 | #include <iostream>
#include <string>
int main(void) {
std::string s;
int m, h;
while (std::cin >> s) {
if (s == "-")
break;
std::cin >> m;
while (m-- >= 0) {
std::cin >> h;
s = s.substr(h) + s.substr(0, h);
}
std::cout << s << std::endl;
}
return 0;
}
| #include <iostream>
#include <string>
int main(void) {
std::string s;
int m, h;
while (std::cin >> s) {
if (s == "-")
break;
std::cin >> m;
while (m-- > 0) {
std::cin >> h;
s = s.substr(h) + s.substr(0, h);
}
std::cout << s << std::endl;
}
return 0;
}
| [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 222,982 | 222,980 | u809931314 | cpp |
p02420 | #include <bits/stdc++.h>
using namespace std;
int main() {
while (1) {
int n, h, m;
string str, c;
cin >> str;
if (str == "-")
break;
cin >> m;
for (int i = 0; i < m; i++) {
cin >> h;
c = str;
str = "";
for (int j = h; j < (int)str.size(); j++) {
st... | #include <bits/stdc++.h>
using namespace std;
int main() {
while (1) {
int n, h, m;
string str, c;
cin >> str;
if (str == "-")
break;
cin >> m;
for (int i = 0; i < m; i++) {
cin >> h;
c = str;
str = "";
for (int j = h; j < (int)c.size(); j++) {
str ... | [
"identifier.change",
"control_flow.loop.condition.change"
] | 222,983 | 222,984 | u482694765 | cpp |
p02420 | #include <iostream>
#include <string>
using namespace std;
int main() {
string card, swap;
int cnt, shu, size;
while (1) {
cin >> card;
if (card == "-")
break;
cin >> cnt;
for (int i = 0; i < cnt; i++) {
// size = card.size();
cin >> shu;
swap = card.substr(0, shu - 1);
... | #include <iostream>
#include <string>
using namespace std;
int main() {
string card, swap;
int cnt, shu;
while (1) {
cin >> card;
if (card == "-")
break;
cin >> cnt;
for (int i = 0; i < cnt; i++) {
cin >> shu;
swap = card.substr(0, shu);
card.erase(card.begin(), card.begin... | [
"variable_declaration.remove",
"expression.operation.binary.remove"
] | 222,986 | 222,987 | u943155333 | cpp |
p02420 | #include "iostream"
#include "string"
using namespace std;
int main(int argc, char const *argv[]) {
string x;
int m = 0;
int h = 0;
while (cin >> x) {
m = 0;
h = 0;
if (x == "-") {
break;
}
cin >> m;
for (int i = 0; i < m; i++) {
cin >> h;
// cout << "substr = " << ... | #include "iostream"
#include "string"
using namespace std;
int main(int argc, char const *argv[]) {
string x;
int m = 0;
int h = 0;
while (cin >> x) {
m = 0;
h = 0;
if (x == "-") {
break;
}
cin >> m;
for (int i = 0; i < m; i++) {
cin >> h;
// cout << "substr = " << ... | [] | 222,988 | 222,989 | u488842924 | cpp |
p02420 | #include <iostream>
#include <string>
#define REP(val, times) for (int val; val < times; val++)
using namespace std;
int main() {
string str;
int n, h;
while (cin >> str) {
if (str == "-")
break;
cin >> n;
REP(i, n) {
cin >> h;
string strh = str.substr(0, h);
str.erase(0, h);
... | #include <iostream>
#include <string>
#define REP(val, times) for (int val = 0; val < times; val++)
using namespace std;
int main() {
string str;
int n, h;
while (cin >> str) {
if (str == "-")
break;
cin >> n;
REP(i, n) {
cin >> h;
string strh = str.substr(0, h);
str.erase(0, ... | [] | 222,995 | 222,996 | u949040555 | cpp |
p02420 | #include <iostream>
using namespace std;
int main() {
string cards;
int m, h;
while (cin >> cards, cards.compare("-")) {
cin >> m;
for (int i = 0; i < m; ++i) {
cin >> h;
(cards + cards.substr(0, h)).erase(0, h);
}
cout << cards << endl;
}
return 0;
} | #include <iostream>
using namespace std;
int main() {
string cards;
int m, h;
while (cin >> cards, cards.compare("-")) {
cin >> m;
for (int i = 0; i < m; ++i) {
cin >> h;
cards.append(cards.substr(0, h)).erase(0, h);
}
cout << cards << endl;
}
return 0;
} | [
"expression.operation.binary.change",
"call.add"
] | 222,997 | 222,998 | u759934006 | cpp |
p02421 | #include <iostream>
using namespace std;
int main() {
int n = 0, sum1 = 0, sum2 = 0;
string str1, str2;
cin >> n;
for (int i = 0; n > i; i++) {
cin >> str1 >> str2;
if (str1 == str2) {
sum1++;
sum2++;
} else if (str1 > str2)
str1 += 3;
else if (str1 < str2)
str2 += 3;
... | #include <iostream>
using namespace std;
int main() {
int n = 0, sum1 = 0, sum2 = 0;
string str1, str2;
cin >> n;
for (int i = 0; n > i; i++) {
cin >> str1 >> str2;
if (str1 == str2) {
sum1++;
sum2++;
} else if (str1 > str2)
sum1 += 3;
else if (str1 < str2)
sum2 += 3;
... | [
"assignment.variable.change",
"identifier.change",
"io.output.change"
] | 223,197 | 223,198 | u843915147 | cpp |
p02421 | #include <iostream>
#include <string>
using namespace std;
int main() {
unsigned int n;
cin >> n;
unsigned int ts = 0;
unsigned int hs = 0;
for (unsigned int i = 0; i < n; ++i) {
string t, h;
cin >> t >> h;
if (t == h) {
ts += 1;
hs += 1;
}
if (t < h) {
hs += 3;
} ... | #include <iostream>
#include <string>
using namespace std;
int main() {
unsigned int n;
cin >> n;
unsigned int ts = 0;
unsigned int hs = 0;
for (unsigned int i = 0; i < n; ++i) {
string t, h;
cin >> t >> h;
if (t == h) {
ts += 1;
hs += 1;
} else if (t < h) {
hs += 3;
}... | [
"control_flow.branch.else_if.replace.add",
"control_flow.branch.if.replace.remove"
] | 223,201 | 223,202 | u404591357 | cpp |
p02421 | #include <algorithm>
#include <cctype>
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
int main() {
int n;
string data[1000][2];
int score[2];
for (int i = 0; i < 2; i++) {
score[i] = 0;
}
cin >> n;
for (int i = 0; i < n; i++) {
fo... | #include <algorithm>
#include <cctype>
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
int main() {
int n;
string data[1000][2];
int score[2];
for (int i = 0; i < 2; i++) {
score[i] = 0;
}
cin >> n;
for (int i = 0; i < n; i++) {
fo... | [
"identifier.replace.add",
"literal.replace.remove",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 223,203 | 223,204 | u362144228 | cpp |
p02421 | #include <bits/stdc++.h>
using namespace std;
int main() {
// insert code here...
string tarou, hanako;
int a, tp = 0, hp = 0;
cin >> a;
for (int i = 0; i < a; i++) {
cin >> tarou >> hanako;
if (tarou < hanako) {
tp += 3;
} else if (hanako < tarou) {
hp += 3;
} else {
hp += ... | #include <bits/stdc++.h>
using namespace std;
int main() {
// insert code here...
string tarou, hanako;
int a, tp = 0, hp = 0;
cin >> a;
for (int i = 0; i < a; i++) {
cin >> tarou >> hanako;
if (tarou < hanako) {
hp += 3;
} else if (hanako < tarou) {
tp += 3;
} else {
hp += ... | [
"assignment.variable.change",
"identifier.change",
"io.output.change"
] | 223,205 | 223,206 | u750277212 | cpp |
p02421 | #include <iostream>
#include <string>
using namespace std;
int main(void) {
int Tarou = 0;
int Hanako = 0;
int cards;
string card1, card2;
cin >> cards;
for (int i = 0; i < cards; i++) {
cin >> card1 >> card2;
if (card1.compare(card2) == 0) {
Tarou += 1;
Hanako += 1;
} else if (card... | #include <iostream>
#include <string>
using namespace std;
int main(void) {
int Tarou = 0;
int Hanako = 0;
int cards;
string card1, card2;
cin >> cards;
for (int i = 0; i < cards; i++) {
cin >> card1 >> card2;
if (card1.compare(card2) == 0) {
Tarou += 1;
Hanako += 1;
} else if (card... | [] | 223,209 | 223,210 | u072574092 | cpp |
p02421 | #define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
int main() {
string tWord, hWord;
int n, tPoint = 0, hPoint = 0, i;
cin >> n;
for (i = 0; i < n; i++) {
cin >> tWord >> hWord;
if (tWord > hWord)
tPoint += 3;
else if (hWord > tWord)
hPoint += 3;
else {
... | #define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
int main() {
string tWord, hWord;
int n, tPoint = 0, hPoint = 0, i;
cin >> n;
for (i = 0; i < n; i++) {
cin >> tWord >> hWord;
if (tWord > hWord)
tPoint += 3;
else if (hWord > tWord)
hPoint += 3;
else {
... | [
"literal.string.change",
"call.arguments.change",
"io.output.change",
"io.output.newline.add"
] | 223,214 | 223,215 | u193016453 | cpp |
p02421 | #define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
int main() {
string tWord, hWord;
int n, tPoint = 0, hPoint = 0, i;
cin >> n;
for (i = 0; i < n; i++) {
cin >> tWord >> hWord;
if (tWord > hWord)
tPoint += 3;
else if (hWord > tWord)
hPoint += 3;
else {
... | #define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
int main() {
string tWord, hWord;
int n, tPoint = 0, hPoint = 0, i;
cin >> n;
for (i = 0; i < n; i++) {
cin >> tWord >> hWord;
if (tWord > hWord)
tPoint += 3;
else if (hWord > tWord)
hPoint += 3;
else {
... | [
"literal.string.change",
"call.arguments.change",
"io.output.change",
"io.output.newline.add"
] | 223,217 | 223,215 | u193016453 | cpp |
p02421 | #include <iostream>
#include <string>
using namespace std;
int main() {
int n, a = 0, b = 0;
string x, y;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> x >> y;
if (x > y)
a += 3;
else if (x < y)
b += 3;
else {
a++;
b++;
}
}
cout << a << b << endl;
}
| #include <iostream>
#include <string>
using namespace std;
int main() {
int n, a = 0, b = 0;
string x, y;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> x >> y;
if (x > y)
a += 3;
else if (x < y)
b += 3;
else {
a++;
b++;
}
}
cout << a << " " << b << endl;
}
| [
"io.output.change"
] | 223,218 | 223,219 | u036891423 | cpp |
p02421 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int tarous = 0, hanakos = 0;
for (int i = 0; i < n; i++) {
string tarou, hanako;
cin >> tarou >> hanako;
if (tarou > hanako) {
tarou += 3;
} else if (tarou < hanako) {
hanako += 3;
} else {
tarous++... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int tarous = 0, hanakos = 0;
for (int i = 0; i < n; i++) {
string tarou, hanako;
cin >> tarou >> hanako;
if (tarou > hanako) {
tarous += 3;
} else if (tarou < hanako) {
hanakos += 3;
} else {
tarous... | [
"assignment.variable.change",
"identifier.change"
] | 223,220 | 223,221 | u743001313 | cpp |
p02421 | #include <iostream>
#include <string>
using namespace std;
int main() {
int n;
cin >> n;
int taro = 0, hanako = 0;
for (int i = 0; i < n; i++) {
string animal1, animal2;
cin >> animal1 >> animal2;
if (animal1 > animal2)
taro += 3;
if (animal1 < animal2)
hanako += 3;
else {
... | #include <iostream>
#include <string>
using namespace std;
int main() {
int n;
cin >> n;
int taro = 0, hanako = 0;
for (int i = 0; i < n; i++) {
string animal1, animal2;
cin >> animal1 >> animal2;
if (animal1 > animal2)
taro += 3;
else if (animal1 < animal2)
hanako += 3;
els... | [
"control_flow.branch.else_if.replace.add",
"control_flow.branch.if.replace.remove"
] | 223,222 | 223,223 | u906532016 | cpp |
p02421 | #include <iostream>
#include <string.h>
#include <string>
#define MAX 100
using namespace std;
int main() {
int n;
int t = 0, h = 0, comp = 0;
string tarou, hanako;
cin >> n;
for (; n > 0; n--) {
cin >> tarou >> hanako;
strcmp(tarou.c_str(), hanako.c_str());
if (comp > 0) {
t += 3;
... | #include <iostream>
#include <string.h>
#include <string>
#define MAX 100
using namespace std;
int main() {
int n;
int t = 0, h = 0, comp = 0;
string tarou, hanako;
cin >> n;
for (; n > 0; n--) {
cin >> tarou >> hanako;
comp = strcmp(tarou.c_str(), hanako.c_str());
if (comp > 0) {
t += ... | [
"assignment.change"
] | 223,224 | 223,225 | u423758855 | cpp |
p02421 | #include <iostream>
using namespace std;
int main() {
int n, p1 = 0, p2 = 0, duel;
string c1, c2;
for (int i = 0; i < n; ++i) {
cin >> c1 >> c2;
duel = c1.compare(c2);
if (duel > 0) {
p1 += 3;
} else if (duel > 0) {
p2 += 3;
} else {
p1++;
p2++;
}
}
cout << p... | #include <iostream>
using namespace std;
int main() {
int n, p1 = 0, p2 = 0, duel;
string c1, c2;
cin >> n;
for (int i = 0; i < n; ++i) {
cin >> c1 >> c2;
duel = c1.compare(c2);
if (duel > 0) {
p1 += 3;
} else if (duel < 0) {
p2 += 3;
} else {
p1++;
p2++;
}
}... | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 223,228 | 223,229 | u759934006 | cpp |
p02421 | #include <iostream>
using namespace std;
int main() {
int n, p1 = 0, p2 = 0, duel;
string c1, c2;
cin >> n;
for (int i = 0; i < n; ++i) {
cin >> c1 >> c2;
duel = c1.compare(c2);
if (duel > 0) {
p1 += 3;
} else if (duel > 0) {
p2 += 3;
} else {
p1++;
p2++;
}
}... | #include <iostream>
using namespace std;
int main() {
int n, p1 = 0, p2 = 0, duel;
string c1, c2;
cin >> n;
for (int i = 0; i < n; ++i) {
cin >> c1 >> c2;
duel = c1.compare(c2);
if (duel > 0) {
p1 += 3;
} else if (duel < 0) {
p2 += 3;
} else {
p1++;
p2++;
}
}... | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 223,230 | 223,229 | u759934006 | cpp |
p02421 | #include <iostream>
#include <string>
using std::cin;
using std::cout;
using std::endl;
using std::string;
void game(int num) {
int i, taro = 0, hanako = 0;
string tcard, hcard;
for (i = 0; i < num; i++) {
cin >> tcard >> hcard;
if (tcard > hcard)
taro += 3;
if (tcard < hcard)
hanako += 3... | #include <iostream>
#include <string>
using std::cin;
using std::cout;
using std::endl;
using std::string;
void game(int num) {
int i, taro = 0, hanako = 0;
string tcard, hcard;
for (i = 0; i < num; i++) {
cin >> tcard >> hcard;
if (tcard > hcard)
taro += 3;
else if (tcard < hcard)
hanako... | [
"control_flow.branch.else_if.replace.add",
"control_flow.branch.if.replace.remove"
] | 223,231 | 223,232 | u444165043 | cpp |
p02421 | #include <iostream>
#include <string>
using namespace std;
int main() {
int n;
string str1, str2;
int a = 0, b = 0;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> str1 >> str2;
if (str1 == str2) {
a++;
b++;
} else if (str1 > str2)
a += 3;
else
b += 3;
}
cout << a... | #include <iostream>
#include <string>
using namespace std;
int main() {
int n;
string str1, str2;
int a = 0, b = 0;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> str1 >> str2;
if (str1 == str2) {
a++;
b++;
} else if (str1 > str2)
a += 3;
else
b += 3;
}
cout << a... | [
"io.output.change"
] | 223,239 | 223,240 | u605366935 | cpp |
p02421 | #include <iostream>
#include <string>
using namespace std;
int main() {
string t, h;
int n, tl, hl, tp, hp;
tp = 0;
hp = 0;
cin >> n;
for (int i = 0; i < n; ++i) {
cin >> t >> h;
tl = t.size();
hl = h.size();
for (int j = 0; j < tl || i < hl; j++) {
if (t[j] > h[j]) {
tp += 3... | #include <iostream>
#include <string>
using namespace std;
int main() {
string t, h;
int n, tl, hl, tp, hp;
tp = 0;
hp = 0;
cin >> n;
for (int i = 0; i < n; ++i) {
cin >> t >> h;
tl = t.size();
hl = h.size();
for (int j = 0; j < tl && j < hl; j++) {
if (t[j] > h[j]) {
tp += 3... | [
"control_flow.loop.for.condition.change"
] | 223,248 | 223,249 | u876038795 | cpp |
p02421 | #include <iostream>
#include <string>
using namespace std;
int main() {
int i, n, one, two;
string p1, p2;
cin >> n;
one = 0;
two = 0;
for (i = 0; i < n; i++) {
cin >> p1 >> p2;
if (p1 == p2) {
one += 1;
two += 1;
} else if (p1 > p2) {
one += 3;
} else if (p1 < p2) {
... | #include <iostream>
#include <string>
using namespace std;
int main() {
int i, n, one, two;
string p1, p2;
cin >> n;
one = 0;
two = 0;
for (i = 0; i < n; i++) {
cin >> p1 >> p2;
if (p1 == p2) {
one += 1;
two += 1;
} else if (p1 > p2) {
one += 3;
} else if (p1 < p2) {
... | [
"io.output.change"
] | 223,255 | 223,256 | u300946041 | cpp |
p02421 | #include <algorithm>
#include <cmath>
#include <complex>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define ll long long
#define vvi vector<vector<int>>
#define vi vector<int>
#define All(X) X.begin... | #include <algorithm>
#include <cmath>
#include <complex>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define ll long long
#define vvi vector<vector<int>>
#define vi vector<int>
#define All(X) X.begin... | [
"assignment.variable.change",
"identifier.change"
] | 223,257 | 223,258 | u220216937 | cpp |
p02421 | #include <cstring>
#include <iostream>
#include <string>
using namespace std;
int main() {
int i, n, j;
int taro_p = 0, hanako_p = 0;
string taro, hanako;
cin >> n;
for (i = 0; i < n; i++) {
cin >> taro >> hanako;
if ((taro < hanako) == 1) {
taro_p = taro_p + 3;
}
if ((taro > hanak... | #include <cstring>
#include <iostream>
#include <string>
using namespace std;
int main() {
int i, n, j;
int taro_p = 0, hanako_p = 0;
string taro, hanako;
cin >> n;
for (i = 0; i < n; i++) {
cin >> taro >> hanako;
if ((taro > hanako) == 1) {
taro_p = taro_p + 3;
}
if ((taro < hanak... | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 223,259 | 223,260 | u410468809 | cpp |
p02421 | #include <iostream>
#include <string>
using namespace std;
int main() {
string c_hanako, c_taro;
int n, p_hanako = 0, p_taro = 0;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> c_hanako >> c_taro;
//??????????????°????????????
//??¢??????????????????????????????????????°?????§??????
//????... | #include <iostream>
#include <string>
using namespace std;
int main() {
string c_hanako, c_taro;
int n, p_hanako = 0, p_taro = 0;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> c_hanako >> c_taro;
//??????????????°????????????
//??¢??????????????????????????????????????°?????§??????
//????... | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 223,265 | 223,266 | u215283046 | cpp |
p02421 | #include <algorithm>
#include <cctype>
#include <iostream>
#include <string>
using namespace std;
int main() {
string a, b;
char T[27] = "abcdefghijklmnopqrstuvwxyz";
int c, d = 0, e = 0, f, g;
cin >> c;
for (int i = 0; i < c; i++) {
cin >> a >> b;
for (int j = 0; j < min(a.size(), b.size()); j++) {
... | #include <algorithm>
#include <cctype>
#include <iostream>
#include <string>
using namespace std;
int main() {
string a, b;
char T[27] = "abcdefghijklmnopqrstuvwxyz";
int c, d = 0, e = 0, f, g;
cin >> c;
for (int i = 0; i < c; i++) {
cin >> a >> b;
for (int j = 0; j < min(a.size(), b.size()); j++) {
... | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 223,270 | 223,271 | u852311840 | cpp |
p02421 | #include <iostream>
#include <string>
using namespace std;
int main() {
long n;
cin >> n;
long tPoint = 0, hPoint = 0;
for (long i = 0; i < n; i++) {
string tarou, hanako;
cin >> tarou >> hanako;
if (tarou > hanako)
hPoint += 3;
else if (tarou == hanako) {
tPoint++;
hPoint++;
... | #include <iostream>
#include <string>
using namespace std;
int main() {
long n;
cin >> n;
long tPoint = 0, hPoint = 0;
for (long i = 0; i < n; i++) {
string tarou, hanako;
cin >> tarou >> hanako;
if (tarou < hanako)
hPoint += 3;
else if (tarou == hanako) {
tPoint++;
hPoint++;
... | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"io.output.change"
] | 223,274 | 223,275 | u564420347 | cpp |
p02421 | #include <iostream>
#include <string>
using namespace std;
int main() {
long n;
cin >> n;
long tPoint = 0, hPoint = 0;
for (long i = 0; i < n; i++) {
string tarou, hanako;
cin >> tarou >> hanako;
if (tarou < hanako)
hPoint += 3;
else if (tarou == hanako) {
tPoint++;
hPoint++;
... | #include <iostream>
#include <string>
using namespace std;
int main() {
long n;
cin >> n;
long tPoint = 0, hPoint = 0;
for (long i = 0; i < n; i++) {
string tarou, hanako;
cin >> tarou >> hanako;
if (tarou < hanako)
hPoint += 3;
else if (tarou == hanako) {
tPoint++;
hPoint++;
... | [
"io.output.change"
] | 223,276 | 223,275 | u564420347 | cpp |
p02421 | #include <iostream>
using namespace std;
int main() {
int n, p1, p2;
string s1, s2;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> s1 >> s2;
if (s1 > s2)
p1 += 3;
else if (s2 > s1)
p2 += 3;
else {
p1++;
p2++;
}
}
cout << p1 << " " << p2 << endl;
return 0;
... | #include <iostream>
using namespace std;
int main() {
int n, p1 = 0, p2 = 0;
string s1, s2;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> s1 >> s2;
if (s1 > s2)
p1 += 3;
else if (s2 > s1)
p2 += 3;
else {
p1++;
p2++;
}
}
cout << p1 << " " << p2 << endl;
re... | [
"variable_declaration.value.change"
] | 223,277 | 223,278 | u920406124 | cpp |
p02421 | #include <iostream>
#include <string>
int main(int argc, char const *argv[]) {
int n = 0;
std::cin >> n;
int score[2] = {0, 0};
std::string taro;
std::string hanako;
for (int i = 0; i < n; i++) {
std::cin >> taro;
std::cin >> hanako;
if (taro.compare(hanako) < 0) {
score[0] += 3;
} el... | #include <iostream>
#include <string>
int main(int argc, char const *argv[]) {
int n = 0;
std::cin >> n;
int score[2] = {0, 0};
std::string taro;
std::string hanako;
for (int i = 0; i < n; i++) {
std::cin >> taro;
std::cin >> hanako;
if (taro.compare(hanako) < 0) {
score[0] += 3;
} el... | [
"literal.number.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 223,285 | 223,286 | u641479950 | cpp |
p02421 | #include <iostream>
#include <string>
using namespace std;
int main() {
int n, i, t, h;
string taro, hanako;
cin >> n;
for (i = 0; i < n; i++) {
cin >> taro >> hanako;
if (taro == hanako) {
t++;
h++;
} else if (taro > hanako) {
t += 3;
} else {
h += 3;
}
}
cout ... | #include <iostream>
#include <string>
using namespace std;
int main() {
int n, i, t = 0, h = 0;
string taro, hanako;
cin >> n;
for (i = 0; i < n; i++) {
cin >> taro >> hanako;
if (taro == hanako) {
t++;
h++;
} else if (taro > hanako) {
t += 3;
} else {
h += 3;
}
}... | [
"variable_declaration.value.change"
] | 223,291 | 223,292 | u779876664 | cpp |
p02421 | #include <iostream>
#include <stdio.h>
#include <string.h>
#include <string>
using namespace std;
int main() {
string t, h;
int n, i, j, tp, hp, a;
scanf("%d", &n);
for (i = 0; i < n; i++) {
cin >> t >> h;
if (t > h)
tp += 3;
else if (t < h)
hp += 3;
else {
tp += 1;
hp ... | #include <iostream>
#include <stdio.h>
#include <string.h>
#include <string>
using namespace std;
int main() {
string t, h;
int n, i, tp = 0, hp = 0;
scanf("%d", &n);
for (i = 0; i < n; i++) {
cin >> t >> h;
if (t > h)
tp += 3;
else if (t < h)
hp += 3;
else {
tp += 1;
h... | [
"variable_declaration.remove",
"variable_declaration.value.change"
] | 223,297 | 223,298 | u398349411 | cpp |
p02421 | #include <iostream>
#include <string>
using namespace std;
int main() {
int n, t_score, h_score = 0;
string taro, hanako = "";
cin >> n;
for (int i = 0; i < n; i++) {
cin >> taro >> hanako;
if (taro > hanako) {
t_score += 3;
} else if (taro == hanako) {
t_score += 1;
h_score += ... | #include <iostream>
#include <string>
using namespace std;
int main() {
int n, t_score = 0, h_score = 0;
string taro, hanako;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> taro >> hanako;
if (taro > hanako) {
t_score += 3;
} else if (taro == hanako) {
t_score += 1;
h_score += 1... | [
"variable_declaration.value.change"
] | 223,299 | 223,300 | u148775320 | cpp |
p02421 | #include <cstdio>
#include <iostream>
#include <string>
static const int drawPoint = 1;
static const int winPoint = 3;
enum Result {
WINNER_A,
DRAW,
WINNER_B,
};
Result game(const std::string a, const std::string b);
int main(void) {
int n;
std::cin >> n;
int point_a = 0;
int point_b = 0;
std::strin... | #include <cstdio>
#include <iostream>
#include <string>
static const int drawPoint = 1;
static const int winPoint = 3;
enum Result {
WINNER_A,
DRAW,
WINNER_B,
};
Result game(const std::string a, const std::string b);
int main(void) {
int n;
std::cin >> n;
int point_a = 0;
int point_b = 0;
std::strin... | [
"literal.string.change",
"call.arguments.change",
"io.output.change",
"io.output.newline.add",
"assignment.value.change",
"identifier.change"
] | 223,307 | 223,308 | u242885830 | cpp |
p02421 | #include <cstdio>
#include <iostream>
#include <string>
static const int drawPoint = 1;
static const int winPoint = 3;
enum Result {
WINNER_A,
DRAW,
WINNER_B,
};
Result game(const std::string a, const std::string b);
int main(void) {
int n;
std::cin >> n;
int point_a = 0;
int point_b = 0;
std::strin... | #include <cstdio>
#include <iostream>
#include <string>
static const int drawPoint = 1;
static const int winPoint = 3;
enum Result {
WINNER_A,
DRAW,
WINNER_B,
};
Result game(const std::string a, const std::string b);
int main(void) {
int n;
std::cin >> n;
int point_a = 0;
int point_b = 0;
std::strin... | [
"assignment.value.change",
"identifier.change"
] | 223,309 | 223,308 | u242885830 | cpp |
p02421 | #include <cstring>
#include <iostream>
using namespace std;
int main() {
string taro, hanako;
int n, taros, hanakos = 0;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> taro >> hanako;
if (taro > hanako)
taros += 3;
else if (taro < hanako)
hanakos += 3;
else {
taros++;
ha... | #include <cstring>
#include <iostream>
using namespace std;
int main() {
string taro, hanako;
int n, taros, hanakos;
taros = 0;
hanakos = 0;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> taro >> hanako;
if (taro > hanako)
taros += 3;
else if (taro < hanako)
hanakos += 3;
else {... | [
"assignment.add"
] | 223,310 | 223,311 | u110807201 | cpp |
p02421 | #include <iostream>
#include <string>
using namespace std;
int main() {
int n;
cin >> n;
string ta, ha;
int left, right = 0;
for (int i = 0; i < n; i++) {
cin >> ta >> ha;
if (ta > ha) {
left += 3;
} else if (ta < ha) {
right += 3;
} else {
left += 1;
right += 1;
... | #include <iostream>
#include <string>
using namespace std;
int main() {
int n;
cin >> n;
string ta, ha;
int left = 0, right = 0;
for (int i = 0; i < n; i++) {
cin >> ta >> ha;
if (ta > ha) {
left += 3;
} else if (ta < ha) {
right += 3;
} else {
left += 1;
right += ... | [
"variable_declaration.value.change"
] | 223,314 | 223,315 | u007523040 | cpp |
p02421 | #include <cctype>
#include <iostream>
#include <string>
using namespace std;
int main() {
int h = 0, t = 0, n;
string hs, ts;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> hs >> ts;
if (ts == hs) {
h++;
t++;
} else if (ts > hs)
t = t + 3;
else
h = h + 3;
}
cout << h... | #include <cctype>
#include <iostream>
#include <string>
using namespace std;
int main() {
int h = 0, t = 0, n;
string hs, ts;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> hs >> ts;
if (ts == hs) {
h++;
t++;
} else if (ts > hs)
t = t + 3;
else
h = h + 3;
}
cout << h... | [
"io.output.change"
] | 223,325 | 223,326 | u188805649 | cpp |
p02421 | #include <iostream>
#include <list>
#include <string>
using namespace std;
#define C
#ifdef C
int main(void) {
int f = 0, b = 0;
string T, H;
int rund;
cin >> rund;
for (size_t i = 0; i < rund; i++) {
cin >> T >> H;
if (T == H) {
f++;
b++;
} else
for (size_t i = 0; i < T.size(... | #include <iostream>
#include <list>
#include <string>
using namespace std;
#define C
#ifdef C
int main(void) {
int f = 0, b = 0;
string T, H;
int rund;
cin >> rund;
for (size_t i = 0; i < rund; i++) {
cin >> T >> H;
if (T == H) {
f++;
b++;
} else
for (size_t i = 0; i <= T.size... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"identifier.change",
"literal.string.change",
"io.output.change"
] | 223,329 | 223,330 | u695723229 | cpp |
p02421 | #include <iostream>
#include <list>
#include <string>
using namespace std;
#define C
#ifdef C
int main(void) {
int f = 0, b = 0;
string T, H;
int rund;
cin >> rund;
for (size_t i = 0; i < rund; i++) {
cin >> T >> H;
if (T == H) {
f++;
b++;
} else
for (size_t i = 0; i <= T.size... | #include <iostream>
#include <list>
#include <string>
using namespace std;
#define C
#ifdef C
int main(void) {
int f = 0, b = 0;
string T, H;
int rund;
cin >> rund;
for (size_t i = 0; i < rund; i++) {
cin >> T >> H;
if (T == H) {
f++;
b++;
} else
for (size_t i = 0; i <= T.size... | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 223,331 | 223,330 | u695723229 | cpp |
p02421 | // Lec09-C Card Game
#include <iostream>
#include <string>
int main() {
std::string p1, p2;
int n, scr1 = 0, scr2 = 0;
for (std::cin >> n; n; n--) {
std::cin >> p1 >> p2;
if (p1 == p2) {
scr1++, scr2++;
continue;
}
p1.compare(0, p1.length(), p2, 0, p2.length()) < 0 ? scr1 += 3 : scr2 +... | // Lec09-C Card Game
#include <iostream>
#include <string>
int main() {
std::string p1, p2;
int n, scr1 = 0, scr2 = 0;
for (std::cin >> n; n; n--) {
std::cin >> p1 >> p2;
if (p1 == p2) {
scr1++, scr2++;
continue;
}
p1.compare(0, p1.length(), p2, 0, p2.length()) > 0 ? scr1 += 3 : scr2 +... | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 223,340 | 223,341 | u752082358 | cpp |
p02421 | #include <stdio.h>
#include <string.h>
int main() {
int n, x, i, k, Tscore = 0, Hscore = 0;
char T[150], H[150];
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%s %s", T, H);
x = strcmp(T, H);
if (x < 0)
Hscore += 3;
else if (x > 0)
Tscore += 3;
else
Hscore++, Tscore++;
... | #include <stdio.h>
#include <string.h>
int main() {
int n, x, i, k, Tscore = 0, Hscore = 0;
char T[150], H[150];
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%s %s", T, H);
x = strcmp(T, H);
if (x < 0)
Hscore += 3;
else if (x > 0)
Tscore += 3;
else
Hscore++, Tscore++;
... | [] | 223,346 | 223,347 | u511556232 | cpp |
p02421 | #include <cmath>
#include <iostream>
#include <string>
using namespace std;
struct GamePoints {
int points;
};
int main() {
GamePoints Taro, Hanako;
int n;
while (cin >> n) {
string card_1, card_2;
Taro.points = 0;
Hanako.points = 0;
for (int i = 0; i < n; i++) {
cin >> card_1 >> ... | #include <cmath>
#include <iostream>
#include <string>
using namespace std;
struct GamePoints {
int points;
};
int main() {
GamePoints Taro, Hanako;
int n;
while (cin >> n) {
string card_1, card_2;
Taro.points = 0;
Hanako.points = 0;
for (int i = 0; i < n; i++) {
cin >> card_1 >> ... | [] | 223,358 | 223,359 | u067723511 | cpp |
p02421 | #include <iostream>
#include <string>
int main(void) {
int n;
std::string taro, hanako;
int p_taro = 0, p_hanako = 0;
std::cin >> n;
while (n-- > 0) {
std::cin >> taro >> hanako;
if (taro > hanako)
p_taro += 3;
else if (taro < hanako)
p_hanako += 3;
else {
p_taro++;
p_... | #include <iostream>
#include <string>
int main(void) {
int n;
std::string taro, hanako;
int p_taro = 0, p_hanako = 0;
std::cin >> n;
while (n-- > 0) {
std::cin >> taro >> hanako;
if (taro > hanako)
p_taro += 3;
else if (taro < hanako)
p_hanako += 3;
else {
p_taro++;
p_... | [
"expression.operation.binary.add"
] | 223,362 | 223,363 | u809931314 | cpp |
p02421 | #include <bits/stdc++.h>
using namespace std;
int main(void) {
string s1, s2;
int n, p1, p2;
cin >> n;
p1 = 0;
p2 = 0;
for (int i = 0; i < n; i++) {
cin >> s1 >> s2;
if (s1.compare(s2) == 0) {
p1++;
p2++;
} else if (s1.compare(s2) == -1) {
p2 += 3;
} else {
p1 += 3;
... | #include <bits/stdc++.h>
using namespace std;
int main(void) {
string s1, s2;
int n, p1, p2;
cin >> n;
p1 = 0;
p2 = 0;
for (int i = 0; i < n; i++) {
cin >> s1 >> s2;
if (s1.compare(s2) == 0) {
p1++;
p2++;
} else if (s1.compare(s2) < 0) {
p2 += 3;
} else {
p1 += 3;
... | [
"control_flow.loop.for.condition.change",
"control_flow.branch.if.condition.change"
] | 223,364 | 223,365 | u340914015 | cpp |
p02422 | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < n; i++)
int main() {
string str, com, phrase;
int a, b, comNum;
cin >> str >> comNum;
REP(t, comNum) {
cin >> com >> a >> b;
if (com == "print") {
cout << str.substr(a, b - a + 1) << endl;
} else if (com ==... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < n; i++)
int main() {
string str, com, phrase;
int a, b, q;
cin >> str >> q;
REP(t, q) {
cin >> com >> a >> b;
if (com == "print") {
cout << str.substr(a, b - a + 1) << endl;
} else if (com == "reverse") {
... | [
"identifier.change",
"expression.operation.binary.change",
"expression.operation.compare.replace.remove",
"assignment.replace.add",
"misc.typo"
] | 223,839 | 223,840 | u542568508 | cpp |
p02422 | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main() {
string str, order, repStr;
cin >> str;
int n = 0;
cin >> n;
int ord1 = 0, ord2 = 0;
while (n--) {
cin >> order;
cin >> ord1 >> ord2;
if (order == "replace") {
cin >> repStr;
str.replace(or... | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main() {
string str, order, repStr;
cin >> str;
int n = 0;
cin >> n;
int ord1 = 0, ord2 = 0;
while (n--) {
cin >> order;
cin >> ord1 >> ord2;
if (order == "replace") {
cin >> repStr;
str.replace(or... | [
"assignment.change"
] | 223,851 | 223,852 | u841770308 | cpp |
p02422 | #include <iostream>
#include <string>
using namespace std;
int main() {
string str;
cin >> str;
int q;
cin >> q;
for (int i = 0; i < q; i++) {
string cmd;
cin >> cmd;
int a, b;
cin >> a >> b;
if (cmd == "print") {
cout << str.substr(a, sizeof(b - a + 1)) << endl;
}
if (cmd ==... | #include <iostream>
#include <string>
using namespace std;
int main() {
string str;
cin >> str;
int q;
cin >> q;
for (int i = 0; i < q; i++) {
string cmd;
cin >> cmd;
int a, b;
cin >> a >> b;
if (cmd == "print") {
cout << str.substr(a, b - a + 1) << endl;
}
if (cmd == "revers... | [
"call.arguments.change"
] | 223,903 | 223,904 | u756732439 | cpp |
p02422 | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main() {
string str;
string x, y;
int a;
int b, c;
cin >> str;
cin >> a;
for (int i = 0; i < a; i++) {
cin >> x >> b >> c;
if (x == "replace") {
cin >> y;
str.replace(b, c, y);
}
if (x == "reve... | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main() {
string str;
string x, y;
int a;
int b, c;
cin >> str;
cin >> a;
for (int i = 0; i < a; i++) {
cin >> x >> b >> c;
if (x == "replace") {
cin >> y;
str.replace(b, c - b + 1, y);
}
if (x ... | [
"expression.operation.binary.add"
] | 223,908 | 223,909 | u412537960 | cpp |
p02422 | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main() {
string str;
string x, y;
int a;
int b, c;
cin >> str;
cin >> a;
for (int i = 0; i < a; i++) {
cin >> x >> b >> c;
if (x == "replace") {
cin >> y;
str.replace(b, b - a + 1, y);
}
if (x ... | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main() {
string str;
string x, y;
int a;
int b, c;
cin >> str;
cin >> a;
for (int i = 0; i < a; i++) {
cin >> x >> b >> c;
if (x == "replace") {
cin >> y;
str.replace(b, c - b + 1, y);
}
if (x ... | [
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 223,910 | 223,909 | u412537960 | cpp |
p02422 | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main() {
string str;
string x, y;
int a;
int b, c;
cin >> str;
cin >> a;
for (int i = 0; i < a; i++) {
cin >> x >> b >> c;
if (x == "replace") {
cin >> y;
str.replace(b, b - c + 1, y);
}
if (x ... | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main() {
string str;
string x, y;
int a;
int b, c;
cin >> str;
cin >> a;
for (int i = 0; i < a; i++) {
cin >> x >> b >> c;
if (x == "replace") {
cin >> y;
str.replace(b, c - b + 1, y);
}
if (x ... | [
"expression.operation.binary.remove"
] | 223,911 | 223,909 | u412537960 | cpp |
p02422 | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main() {
string str;
string x, y;
int a;
int b, c;
cin >> str;
cin >> a;
for (int i = 0; i < a; i++) {
cin >> x >> b >> c;
if (x == "replace") {
cin >> y;
str.replace(b, c - b + 1, y);
}
if (x ... | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main() {
string str;
string x, y;
int a;
int b, c;
cin >> str;
cin >> a;
for (int i = 0; i < a; i++) {
cin >> x >> b >> c;
if (x == "replace") {
cin >> y;
str.replace(b, c - b + 1, y);
}
if (x ... | [
"expression.operation.binary.add"
] | 223,912 | 223,909 | u412537960 | cpp |
p02422 | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main() {
string str;
string x, y;
int a;
int b, c;
cin >> str;
cin >> a;
for (int i = 0; i < a; i++) {
cin >> x >> b >> c;
if (x == "replace") {
cin >> y;
str.replace(b, c - b + 1, y);
}
if (x ... | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main() {
string str;
string x, y;
int a;
int b, c;
cin >> str;
cin >> a;
for (int i = 0; i < a; i++) {
cin >> x >> b >> c;
if (x == "replace") {
cin >> y;
str.replace(b, c - b + 1, y);
}
if (x ... | [
"expression.operation.binary.add"
] | 223,913 | 223,909 | u412537960 | cpp |
p02422 | #include <cctype>
#include <iostream>
#include <string>
using namespace std;
int main() {
int q, num1, num2;
string str, str2, str3; // str1=最初の文字列 str2=条件当てはめる
cin >> str >> q;
for (int i = 0; i < q; i++) {
cin >> str2 >> num1 >> num2;
if (str2 == "replace") {
cin >> str3;
str = str.replac... | #include <cctype>
#include <iostream>
#include <string>
using namespace std;
int main() {
int q, num1, num2;
string str, str2, str3; // str1=最初の文字列 str2=条件当てはめる
cin >> str >> q;
for (int i = 0; i < q; i++) {
cin >> str2 >> num1 >> num2;
if (str2 == "replace") {
cin >> str3;
str = str.replac... | [
"assignment.change"
] | 223,917 | 223,918 | u333223739 | cpp |
p02422 | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main(void) {
string str, x, y;
cin >> str;
int q;
cin >> q;
int a, b, p;
for (int i = 0; i < q; i++) {
cin >> x >> a >> b;
p = b - a + 1;
if (x == "print") {
cout << str.substr(a, p) << endl;
}
if (... | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main(void) {
string str, x, y;
cin >> str;
int q;
cin >> q;
int a, b, p;
for (int i = 0; i < q; i++) {
cin >> x >> a >> b;
p = b - a + 1;
if (x == "print") {
cout << str.substr(a, p) << endl;
}
if (... | [
"assignment.add",
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 223,923 | 223,924 | u796103607 | cpp |
p02422 | #include <iostream>
#include <sstream>
using namespace std;
int main() {
string str, command, sub, head, end;
string orders;
int numOfComs, a, b;
cin >> str;
cin >> numOfComs;
cin.ignore();
for (int i = 0; i < numOfComs; i++) {
getline(cin, orders);
istringstream ss(orders);
for (int j = 0... | #include <iostream>
#include <sstream>
using namespace std;
int main() {
string str, command, sub, head, end;
string orders;
int numOfComs, a, b;
cin >> str;
cin >> numOfComs;
cin.ignore();
for (int i = 0; i < numOfComs; i++) {
getline(cin, orders);
istringstream ss(orders);
for (int j = 0... | [
"expression.operation.binary.add"
] | 223,927 | 223,928 | u438713646 | cpp |
p02422 | #include <iostream>
#include <sstream>
using namespace std;
int main() {
string str, command, sub, head, end;
string orders;
int numOfComs, a, b;
cin >> str;
cin >> numOfComs;
cin.ignore();
for (int i = 0; i < numOfComs; i++) {
getline(cin, orders);
istringstream ss(orders);
for (int j = 0... | #include <iostream>
#include <sstream>
using namespace std;
int main() {
string str, command, sub, head, end;
string orders;
int numOfComs, a, b;
cin >> str;
cin >> numOfComs;
cin.ignore();
for (int i = 0; i < numOfComs; i++) {
getline(cin, orders);
istringstream ss(orders);
for (int j = 0... | [
"expression.operation.binary.add"
] | 223,929 | 223,928 | u438713646 | cpp |
p02422 | #include <bits/stdc++.h>
using namespace std;
int main() {
string query, strconv, str, p;
int q, a, b;
cin >> str;
cin >> q;
for (int i = 0; i < q; i++) {
cin >> query;
cin >> a >> b;
if (query == "print") {
cout << str.substr(a, b - a) << endl;
} else if (query == "reverse") {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
string query, strconv, str, p;
int q, a, b;
cin >> str;
cin >> q;
for (int i = 0; i < q; i++) {
cin >> query;
cin >> a >> b;
if (query == "print") {
cout << str.substr(a, b - a + 1) << endl;
} else if (query == "reverse") {
... | [
"expression.operation.binary.add"
] | 223,937 | 223,938 | u803657704 | cpp |
p02422 | #include <iostream>
#include <string>
using namespace std;
int main() {
string str, com, p;
int q, a, b;
cin >> str >> q;
for (int i = 0; i < q; i++) {
cin >> com >> a >> b;
if (com == "print") {
cout << str.substr(a, b - a + 1) << endl;
} else if (com == "reverse") {
string tmp = str... | #include <iostream>
#include <string>
using namespace std;
int main() {
string str, com, p;
int q, a, b;
cin >> str >> q;
for (int i = 0; i < q; i++) {
cin >> com >> a >> b;
if (com == "print") {
cout << str.substr(a, b - a + 1) << endl;
} else if (com == "reverse") {
string tmp = str... | [
"identifier.change",
"control_flow.branch.if.condition.change",
"assignment.variable.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 223,945 | 223,946 | u952266067 | cpp |
p02422 | #include <iostream>
#include <string>
using namespace std;
int main() {
string str, com, p;
int q, a, b;
cin >> str >> q;
for (int i = 0; i < q; i++) {
cin >> com >> a >> b;
if (com == "print") {
cout << str.substr(a, b - a + 1) << endl;
} else if (com == "reverse") {
string tmp = str... | #include <iostream>
#include <string>
using namespace std;
int main() {
string str, com, p;
int q, a, b;
cin >> str >> q;
for (int i = 0; i < q; i++) {
cin >> com >> a >> b;
if (com == "print") {
cout << str.substr(a, b - a + 1) << endl;
} else if (com == "reverse") {
string tmp = str... | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 223,947 | 223,946 | u952266067 | cpp |
p02422 | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
string str;
int q;
cin >> str >> q;
for (int i = 0; q > i; i++) {
string order;
int a, b;
cin >> order >> a >> b;
if (order == "print")
cout << str.substr(a, b) << endl;
if (order == "reverse")
reverse(st... | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
string str;
int q;
cin >> str >> q;
for (int i = 0; q > i; i++) {
string order;
int a, b;
cin >> order >> a >> b;
if (order == "print")
cout << str.substr(a, b - a + 1) << endl;
if (order == "reverse")
re... | [
"expression.operation.binary.add"
] | 223,948 | 223,949 | u843915147 | cpp |
p02422 | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
string str;
int q;
cin >> str >> q;
for (int i = 0; q > i; i++) {
string order;
int a, b;
cin >> order >> a >> b;
if (order == "print")
cout << str.substr(a, b - 1) << endl;
if (order == "reverse")
revers... | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
string str;
int q;
cin >> str >> q;
for (int i = 0; q > i; i++) {
string order;
int a, b;
cin >> order >> a >> b;
if (order == "print")
cout << str.substr(a, b - a + 1) << endl;
if (order == "reverse")
re... | [
"expression.operation.binary.add"
] | 223,950 | 223,949 | u843915147 | cpp |
p02422 | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
string str;
int q;
cin >> str >> q;
for (int i = 0; q > i; i++) {
string order;
int a, b;
cin >> order >> a >> b;
if (order == "print")
cout << str.substr(a, b - 1) << endl;
if (order == "reverse")
revers... | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
string str;
int q;
cin >> str >> q;
for (int i = 0; q > i; i++) {
string order;
int a, b;
cin >> order >> a >> b;
if (order == "print")
cout << str.substr(a, b - a + 1) << endl;
if (order == "reverse")
re... | [
"expression.operation.binary.add"
] | 223,951 | 223,949 | u843915147 | cpp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.