buggy_code stringlengths 11 625k | fixed_code stringlengths 17 625k | bug_type stringlengths 2 4.45k | language int64 0 8 | token_count int64 5 200k |
|---|---|---|---|---|
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO ?????????????????????????????????????????????
Scanner scan = new Scanner(System.in);
StringBuilder sb = new StringBuilder();
while (true) {
String cards = scan.nextLine();
if (cards.equals("-"... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO ?????????????????????????????????????????????
Scanner scan = new Scanner(System.in);
StringBuilder sb = new StringBuilder();
while (true) {
String cards = scan.next();
if (cards.equals("-"))... | [["-", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22], ["+", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22], ["+", 8, 196, 0, 1, 0, 11, 12, 23, 0, 24], ["+", 12, 23, 0, 16, 12, 492, 3, 4, 0, 25]] | 3 | 146 |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
String x = "";
try {
while ((x = in.readLine()).equals("-") == false) ... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
String x = "";
try {
while ((x = in.readLine()).equals("-") == false) ... | [["-", 31, 492, 3, 4, 0, 23, 0, 16, 17, 33], ["-", 31, 492, 3, 4, 0, 23, 0, 16, 12, 499], ["-", 12, 16, 12, 492, 3, 4, 0, 23, 0, 24], ["-", 12, 492, 3, 4, 0, 23, 0, 16, 17, 33], ["-", 12, 492, 3, 4, 0, 23, 0, 16, 12, 499], ["-", 12, 16, 12, 492, 3, 4, 0, 23, 0, 25]] | 3 | 203 |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (true) {
String w = sc.nextLine();
// break
if (w.equals("-")) {
break;
}
int m = Integer.parseInt(sc.nextLine());
for (int i = 0; i < m; i++... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (true) {
String w = sc.nextLine();
// break
if (w.equals("-")) {
break;
}
int m = Integer.parseInt(sc.nextLine());
for (int i = 0; i < m; i++... | [["-", 49, 200, 51, 492, 3, 4, 0, 16, 17, 33], ["-", 49, 200, 51, 492, 3, 4, 0, 16, 12, 499]] | 3 | 149 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// write your code here
Scanner scanner = new Scanner(System.in);
while (true) {
String w = scanner.next();
if (w.equals("-"))
break;
long m = scanner.nextLong();
for (int i = 0; i < m... |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// write your code here
Scanner scanner = new Scanner(System.in);
while (true) {
String w = scanner.next();
if (w.equals("-"))
break;
long m = scanner.nextLong();
for (int i = 0; i < m... | [["+", 0, 52, 8, 196, 0, 7, 8, 196, 0, 46], ["-", 0, 52, 8, 196, 0, 7, 8, 196, 0, 46]] | 3 | 131 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
for (;;) {
String deck = sc.nextLine();
if ("-".equals(deck))
break;
int m = sc.nextInt();
for (int i = 0; i < m; i++) {
int h ... | import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
for (;;) {
String deck = sc.next();
if ("-".equals(deck))
break;
int m = sc.nextInt();
for (int i = 0; i < m; i++) {
int h = sc... | [["-", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22], ["+", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22]] | 3 | 132 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String str;
out : {
str = sc.next();
if (str.charAt(0) == ('-'))
break out;
int n = sc.nextInt();
for (int i = 0; i < n; i++) {
int h = sc.nextInt();
... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String str;
while (true) {
str = sc.next();
if (str.charAt(0) == ('-'))
break;
int n = sc.nextInt();
for (int i = 0; i < n; i++) {
int h =... | [["-", 8, 498, 0, 195, 8, 196, 0, 97, 0, 22], ["-", 8, 498, 0, 195, 8, 196, 0, 97, 0, 102], ["+", 8, 498, 0, 195, 8, 196, 0, 52, 0, 89], ["+", 0, 195, 8, 196, 0, 52, 15, 15, 0, 24], ["+", 0, 195, 8, 196, 0, 52, 15, 15, 0, 146], ["+", 0, 195, 8, 196, 0, 52, 15, 15, 0, 25], ["-", 0, 97, 0, 196, 0, 57, 64, 93, 0, 22]] | 3 | 137 |
import java.util.Scanner;
class Main {
Scanner sc = new Scanner(System.in);
public void run() {
while (true) {
String s = sc.nextLine();
if ("-".equals(s))
break;
int count = sc.nextInt();
for (int i = 0; i < count; i++) {
int index = sc.nextInt();
s = s.substr... | import java.util.Scanner;
class Main {
Scanner sc = new Scanner(System.in);
public void run() {
while (true) {
String s = sc.nextLine();
if ("-".equals(s))
break;
int count = sc.nextInt();
for (int i = 0; i < count; i++) {
int index = sc.nextInt();
s = s.substr... | [["+", 0, 52, 8, 196, 0, 1, 0, 492, 500, 22], ["+", 0, 52, 8, 196, 0, 1, 0, 492, 0, 131], ["+", 0, 52, 8, 196, 0, 1, 0, 492, 141, 22], ["+", 8, 196, 0, 1, 0, 492, 3, 4, 0, 24], ["+", 8, 196, 0, 1, 0, 492, 3, 4, 0, 25], ["+", 8, 196, 0, 52, 8, 196, 0, 1, 0, 35]] | 3 | 189 |
import java.io.*;
class Main {
public static void main(String args[]) throws IOException {
BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
while (true) {
String str = input.readLine();
if (str.equals("-"))
break;
int n = Integer.parseInt(input.readLine()... | import java.io.*;
class Main {
public static void main(String args[]) throws IOException {
BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
while (true) {
String str = input.readLine();
if (str.equals("-"))
break;
int n = Integer.parseInt(input.readLine()... | [["+", 0, 52, 8, 196, 0, 7, 8, 196, 0, 46], ["-", 0, 52, 8, 196, 0, 7, 8, 196, 0, 46]] | 3 | 145 |
#include <stdio.h>
#include <string.h>
int main() {
char box[100];
int a, b, sum = 0;
while (1) {
scanf("%s", box);
if (box[0] == '-')
break;
scanf("%d", &a);
for (int i = 0; i < a; i++) {
scanf("%d", &b);
sum += b;
}
sum = sum % (strlen(box));
for (int i = sum; i < s... | #include <stdio.h>
#include <string.h>
int main() {
char box[200];
int a, b, sum = 0;
while (1) {
sum = 0;
scanf("%s", box);
if (box[0] == '-')
break;
scanf("%d", &a);
for (int i = 0; i < a; i++) {
scanf("%d", &b);
sum += b;
}
sum = sum % (strlen(box));
for (int i... | [["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 0 | 173 |
#include <stdio.h>
#include <string.h>
int main() {
int i = 0; //いれた文字列の数
int c[100]; //シャッフルの回数
char ch[100][200]; //いれた文字列そのもの
int sh[100][100]; //シャッフルの各々の値
int a; //ループ用
while (1) {
scanf("%s", ch[i]); //文字列入力
if (ch[i][0] == '-')
break;
scanf("%*c%d", &c[i]); //シャッフル回数入力
... | #include <stdio.h>
#include <string.h>
int main() {
int i = 0; //いれた文字列の数
int c[100]; //シャッフルの回数
char ch[100][250]; //いれた文字列そのもの
int sh[100][150]; //シャッフルの各々の値
int a; //ループ用
while (1) {
scanf("%s", ch[i]); //文字列入力
if (ch[i][0] == '-')
break;
scanf("%*c%d", &c[i]); //シャッフル回数入力
... | [["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 0 | 329 |
#include <stdio.h>
#include <string.h>
int main(void) {
char card[400];
char copy[200];
int m;
int h;
register int i;
while (scanf("%s", card)) {
if (card[0] == '-') {
break;
}
scanf("%d", &m);
for (i = 0; i < m; i++) {
scanf("%d", &h);
strcpy(copy, card);
strcpy(c... | #include <stdio.h>
#include <string.h>
int main(void) {
char card[201];
char copy[201];
int m, h;
register int i;
while (scanf("%s", card)) {
if (card[0] == '-') {
break;
}
scanf("%d", &m);
for (i = 0; i < m; i++) {
scanf("%d", &h);
strcpy(copy, card);
strcpy(card, c... | [["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 0 | 140 |
#include <stdio.h>
#include <string.h>
void under_s(char a[], int b) {
int len, i;
len = strlen(a);
for (i = 0; i < b; i++) {
a[len + i + 1] = a[i];
}
for (i = 0; i < len; i++) {
a[i] = a[i + len];
}
a[len] = '\0';
}
int main(void) {
char card[256];
int n, i;
int h[128];
while (1) {
... | #include <stdio.h>
#include <string.h>
void under_s(char a[], int b) {
int len, i;
len = strlen(a);
for (i = 0; i < b; i++) {
a[len + i] = a[i];
}
for (i = 0; i < len; i++) {
a[i] = a[i + b];
}
a[len] = '\0';
}
int main(void) {
char card[500];
int n, i;
int h[128];
while (1) {
sca... | [["-", 0, 1, 0, 11, 31, 69, 71, 16, 17, 72], ["-", 0, 1, 0, 11, 31, 69, 71, 16, 12, 13], ["-", 0, 1, 0, 11, 12, 69, 71, 16, 12, 22], ["+", 0, 1, 0, 11, 12, 69, 71, 16, 12, 22], ["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13]] | 0 | 225 |
#include <stdio.h>
#include <string.h>
int main(void) {
int l, i, n, k, sum = 0;
char a[100];
while (1) {
scanf("%s", a);
l = strlen(a);
if (a[0] == '-') {
break;
}
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%d", &k);
sum += k;
}
for (i = 0; i < l; i++) {
... | #include <stdio.h>
#include <string.h>
int main(void) {
int l, i, n, k, sum = 0;
char a[220];
while (1) {
scanf("%s", a);
l = strlen(a);
if (a[0] == '-') {
break;
}
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%d", &k);
sum += k;
}
for (i = 0; i < l; i++) {
... | [["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13]] | 0 | 149 |
#include <stdio.h>
#include <string.h>
int main() {
char s[200], t[200], u[200];
int h, n, i, j;
while (scanf("%s", s)) {
if (strcmp(s, "-") == 0)
break;
scanf("%d", &n);
for (j = 0; j < n; j++) {
scanf("%d", &h);
strncpy(t, s, h);
for (i = h; i < strlen(s); i++)
u[i ... | #include <stdio.h>
#include <string.h>
int main() {
char s[200], t[200], u[200];
int h, n, i, j;
while (scanf("%s", s)) {
if (strcmp(s, "-") == 0)
break;
scanf("%d", &n);
for (j = 0; j < n; j++) {
scanf("%d", &h);
strncpy(t, s, h);
for (i = h; i < strlen(s); i++)
u[i ... | [["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 0 | 213 |
#include <stdio.h>
#include <string.h>
int main(void) {
char a[201];
char b[201];
int shuffle, h, i;
while (1) {
scanf("%s", a);
if (strcmp(a, "-") == 0)
break;
strcpy(b, a);
scanf("%d", &shuffle);
for (i = 0; i < shuffle; i++) {
scanf("%d", &h);
strcpy(a, &b[h]);
... | #include <stdio.h>
#include <string.h>
int main(void) {
char a[201];
char b[201];
int shuffle, h, i;
while (1) {
scanf("%s", a);
if (strcmp(a, "-") == 0)
break;
strcpy(b, a);
scanf("%d", &shuffle);
for (i = 0; i < shuffle; i++) {
scanf("%d", &h);
strcpy(a, &b[h]);
... | [["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 0 | 148 |
#include <stdio.h>
#include <string.h>
int main() {
int i, r, n, n2, z, x;
char moji1[201] = {}, tmp1, tmp2;
for (; scanf("%s", moji1), moji1[0] == '-';) {
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%d", &n2);
for (r = 0; r < n2; r++) {
for (z = 0; z < strlen(moji1); z++) {
... | #include <stdio.h>
#include <string.h>
int main() {
int i, r, n, n2, z;
char moji1[201] = {}, tmp1, tmp2;
for (; scanf("%s", moji1), moji1[0] != '-';) {
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%d", &n2);
for (r = 0; r < n2; r++) {
for (z = 0; z < strlen(moji1); z++) {
... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["-", 8, 9, 0, 7, 15, 34, 12, 16, 17, 60], ["+", 8, 9, 0, 7, 15, 34, 12, 16, 17, 79]] | 0 | 211 |
#include <stdio.h>
#include <string.h>
int main() {
char line[202];
char card[202];
int m; /* シャッフル回数 */
int h[100]; /* シャッフルする枚数 */
int i, j;
int rest_card_length; /* 残りのカード枚数 */
int card_length; /* カード総数 */
while (1) {
//文字列の読み込み
fgets(card, sizeof(card), stdin);
if (card[strlen... | #include <stdio.h>
#include <string.h>
int main() {
char line[202];
char card[202];
int m; /* シャッフル回数 */
int h[100]; /* シャッフルする枚数 */
int i, j;
int rest_card_length; /* 残りのカード枚数 */
int card_length; /* カード総数 */
while (1) {
//文字列の読み込み
fgets(card, sizeof(card), stdin);
if (card[strlen... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 342 |
#include <stdio.h>
#include <string.h>
int main() {
char buffer[3][201];
char *S = buffer[0];
char *D = buffer[1];
char *F = buffer[2];
int M, H;
int A, B, C;
while (1) {
scanf("%s", S);
if (*S == '-')
break;
scanf("%d", &M);
for (A = 0; A < M; A++) {
scanf("%d", &H);
st... | #include <stdio.h>
#include <string.h>
int main() {
char buffer[3][201];
char *S = buffer[0];
char *D = buffer[1];
char *F = buffer[2];
int M, H;
int A, B, C;
while (1) {
scanf("%s", S);
if (*S == '-')
break;
scanf("%d", &M);
for (A = 0; A < M; A++) {
scanf("%d", &H);
st... | [["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 0 | 180 |
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
int main() {
vector<int> num;
int cnt = 0;
string str0, str1, str2;
cin >> str0;
for (int i = 0; i < str0.size(); i++) {
char ch = str0[i];
num.push_back(ch - '0');
}
while (getline(cin, str1)) {
i... | #include <iostream>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
int main() {
vector<int> num;
int cnt = 0;
string str0, str1, str2;
cin >> str0;
for (int i = 0; i < str0.size(); i++) {
char ch = str0[i];
num.push_back(ch - '0');
}
while (getline(cin, str1)) {
i... | [["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 45], ["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46]] | 1 | 244 |
#include <cctype>
#include <iostream>
#include <string>
using namespace std;
string toUpper(string x) {
string y;
for (int i = 0; i < x.size(); i++) {
y[i] = toupper(x[i]);
}
return y;
}
int main() {
int cnt = 0;
string word, word2;
cin >> word;
word = toUpper(word);
cin >> word2;
while (1) {
... | #include <cctype>
#include <iostream>
#include <string>
using namespace std;
string toUpper(string x) {
string y = x;
for (int i = 0; i < x.size(); i++) {
y[i] = toupper(x[i]);
}
return y;
}
int main() {
int cnt = 0;
string word, word2;
cin >> word;
word = toUpper(word);
cin >> word2;
while (1... | [["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 22]] | 1 | 133 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string str1;
string str2;
string b;
int count = 0, a;
cin >> str1;
while (true) {
b = "";
cin >> str2;
a = str2.size();
if (str2 == "END_OF_TEXT")
break;
for (int i = 0; i < a; i++) {
b += str2[i];
}
... | #include <iostream>
#include <string>
using namespace std;
int main() {
string str1;
string str2;
string b;
int count = 0, a;
cin >> str1;
while (true) {
b = "";
cin >> str2;
a = str2.size();
if (str2 == "END_OF_TEXT")
break;
for (int i = 0; i < a; i++) {
b += tolower(str2[i]... | [["+", 8, 9, 0, 1, 0, 11, 12, 2, 63, 22], ["+", 0, 1, 0, 11, 12, 2, 3, 4, 0, 24], ["+", 0, 1, 0, 11, 12, 2, 3, 4, 0, 25]] | 1 | 109 |
#include <iostream>
#include <stdio.h>
#include <string.h>
#include <string>
using namespace std;
int main() {
string str1, str2, str3;
int count, n;
cin >> str1;
while (1) {
cin >> str2;
if (str2 == "END_OF_TEXT") {
break;
}
n = str2.size();
for (int i = 0; i < n; i++) {
str3 = ... | #include <iostream>
#include <stdio.h>
#include <string.h>
#include <string>
using namespace std;
int main() {
string str1, str2, str3;
int count, n;
cin >> str1;
while (1) {
str3 = "";
cin >> str2;
if (str2 == "END_OF_TEXT") {
break;
}
n = str2.size();
for (int i = 0; i < n; i++) ... | [["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 8, 9, 0, 1, 0, 11, 12, 5, 0, 62], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35], ["-", 0, 7, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 7, 8, 9, 0, 1, 0, 11, 17, 107]] | 1 | 110 |
#include <stdio.h>
#include <string.h>
int main() {
int i, j, count = 0;
char w[10], t[1000];
scanf("%s", w);
int len = strlen(w);
for (i = 0; i < len; i++) {
if (w[i] >= 'Z' && t[i] <= 'A')
w[i] += 32;
}
while (scanf("%s", t)) {
if (strcmp(t, "END_OF_TEXT") == 0)
break;
int len = ... | #include <stdio.h>
#include <string.h>
int main() {
int i, j, count = 0;
char w[10], t[1000];
scanf("%s", w);
int len = strlen(w);
for (i = 0; i < len; i++) {
if (w[i] <= 'Z' && t[i] >= 'A')
w[i] += 32;
}
while (scanf("%s", t)) {
if (strcmp(t, "END_OF_TEXT") == 0)
break;
int len = ... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 20], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 19], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 19], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 20]] | 1 | 194 |
#include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
int main() {
char t[1001], w[11];
char c[12] = {'E', 'N', 'D', '_', 'O', 'F', '_', 'T', 'E', 'X', 'T'};
int i, tl, wl, ch, count, tc, wc;
count = 0;
cin >> w;
wl = strlen(w);
while (1) {
cin >> t;
tl = strlen(t);
... | #include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
int main() {
char t[1001], w[11];
char c[12] = {'E', 'N', 'D', '_', 'O', 'F', '_', 'T', 'E', 'X', 'T'};
int i, tl, wl, ch, count, tc, wc;
count = 0;
cin >> w;
wl = strlen(w);
while (1) {
cin >> t;
tl = strlen(t);
... | [["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 22]] | 1 | 260 |
#include <ctype.h>
#include <iostream>
#include <string.h>
#include <string>
using namespace std;
int main() {
char W[10 + 1] = {0};
char Ti[1000 + 1] = {0};
int W_len = 0;
int Ti_len = 0;
int count = 0;
cin >> W;
W_len = strlen(W);
for (int i = 0; i < W_len; i++)
W[i] = toupper(W[i]);
while (... | #include <ctype.h>
#include <iostream>
#include <string.h>
#include <string>
using namespace std;
int main() {
char W[10 + 1] = {0};
char Ti[1000 + 1] = {0};
int W_len = 0;
int Ti_len = 0;
int count = 0;
cin >> W;
W_len = strlen(W);
for (int i = 0; i < W_len; i++)
W[i] = toupper(W[i]);
while (... | [["+", 0, 43, 49, 50, 51, 41, 64, 16, 17, 72], ["+", 0, 43, 49, 50, 51, 41, 64, 16, 12, 13], ["+", 0, 43, 49, 50, 51, 41, 75, 16, 17, 72], ["+", 0, 43, 49, 50, 51, 41, 75, 16, 12, 13]] | 1 | 199 |
/*
* a.cc:
*/
#include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <util... | /*
* a.cc:
*/
#include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <util... | [["-", 0, 57, 15, 339, 51, 16, 12, 69, 28, 22], ["-", 15, 339, 51, 16, 12, 69, 341, 342, 0, 70], ["-", 15, 339, 51, 16, 12, 69, 341, 342, 0, 22], ["-", 15, 339, 51, 16, 12, 69, 341, 342, 0, 73], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22]] | 1 | 258 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s, p;
cin >> s;
string pcin;
int ans = 0;
size_t found = 0;
while (cin >> pcin) {
if (pcin == "END_OF_TEXT") {
break;
}
// p += pcin + " ";
transform(p.begin(), p.end(), p.begin(), ::tolower);
if (pcin == s) {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
string s, p;
cin >> s;
string pcin;
int ans = 0;
size_t found = 0;
while (cin >> pcin) {
if (pcin == "END_OF_TEXT") {
break;
}
// p += pcin + " ";
transform(pcin.begin(), pcin.end(), pcin.begin(), ::tolower);
if (pcin == s... | [["-", 0, 2, 3, 4, 0, 2, 63, 118, 28, 22], ["+", 0, 2, 3, 4, 0, 2, 63, 118, 28, 22]] | 1 | 99 |
#include <stdio.h>
#include <string.h>
int main() {
char ARF[27] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
char arf[27] = "abcdefghijklmnopqrstuvwxyz";
char s1[11], s2[1001];
int i, j, sum = 0;
scanf("%s", s1);
while (1) {
scanf("%s", s2);
if (strcmp("END_OF_TEXT", s2) == 0)
break;
int len = strlen(... | #include <stdio.h>
#include <string.h>
int main() {
char ARF[27] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
char arf[27] = "abcdefghijklmnopqrstuvwxyz";
char s1[11], s2[1001];
int i, j, sum = 0;
scanf("%s", s1);
while (1) {
scanf("%s", s2);
if (strcmp("END_OF_TEXT", s2) == 0)
break;
int len = strlen(... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18]] | 1 | 193 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string str1, str2;
int count = 0;
cin >> str1;
for (int i = 0; i < str1.size(); i++) {
if ('A' <= str1[i] && str1[i] <= 'Z') {
str1[i] = str1[i] - 'A' + 'a';
}
}
while (cin >> str2) {
if (str2 == "END_OF_TEXT")
... | #include <iostream>
#include <string>
using namespace std;
int main() {
string str1, str2;
int count = 0;
cin >> str1;
for (int i = 0; i < str1.size(); i++) {
if ('A' <= str1[i] && str1[i] <= 'Z') {
str1[i] = str1[i] - 'A' + 'a';
}
}
while (cin >> str2) {
if (str2 == "END_OF_TEXT")
... | [["+", 0, 52, 8, 9, 0, 7, 8, 9, 0, 46], ["-", 0, 52, 8, 9, 0, 7, 8, 9, 0, 46]] | 1 | 181 |
#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 !=... | [["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 98], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 106]] | 1 | 259 |
#include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
int main() {
string a, c;
string temp;
string temp2;
string temp3;
string temp4;
int len_a;
int len_c;
int i, j;
int k = 0;
cin >> a;
len_a = a.length();
for (i = 0; i < len_a; i++) {
if (0x41 <= a[i] && a[i]... | #include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
int main() {
string a, c;
string temp;
string temp2;
string temp3;
string temp4;
int len_a;
int len_c;
int i, j;
int k = 0;
cin >> a;
len_a = a.length();
for (i = 0; i < len_a; i++) {
if (0x41 <= a[i] && a[i]... | [["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 45], ["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46]] | 1 | 296 |
#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);... | [["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 22]] | 1 | 128 |
#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++... | [["-", 8, 9, 0, 52, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 12, 13]] | 1 | 121 |
#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... | [["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32]] | 1 | 140 |
#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... | [["-", 8, 9, 0, 7, 15, 2, 63, 118, 28, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 7, 15, 16, 12, 2, 63, 118, 28, 22]] | 1 | 135 |
#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;
}
... | [["-", 8, 9, 0, 7, 15, 16, 31, 69, 28, 22], ["-", 0, 7, 15, 16, 31, 69, 341, 342, 0, 70], ["-", 0, 7, 15, 16, 31, 69, 341, 342, 0, 73], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 79], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18]] | 1 | 155 |
#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')
... | [["-", 0, 57, 64, 1, 0, 11, 12, 16, 17, 33], ["-", 64, 1, 0, 11, 12, 16, 12, 103, 0, 104], ["-", 64, 1, 0, 11, 12, 16, 12, 103, 0, 125], ["+", 0, 57, 64, 1, 0, 11, 12, 16, 17, 72], ["+", 0, 57, 64, 1, 0, 11, 12, 16, 12, 13]] | 1 | 122 |
#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;
... | [["-", 0, 11, 12, 2, 3, 4, 0, 16, 17, 33], ["-", 0, 11, 12, 2, 3, 4, 0, 16, 12, 13]] | 1 | 136 |
#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, ... | [["-", 0, 52, 8, 9, 0, 7, 8, 9, 0, 46], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]] | 1 | 104 |
#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);
}
... | [["+", 0, 1, 0, 2, 3, 4, 0, 66, 17, 67], ["+", 0, 52, 8, 9, 0, 7, 8, 9, 0, 46], ["-", 0, 52, 8, 9, 0, 7, 8, 9, 0, 46]] | 1 | 97 |
#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;
... | [["-", 0, 11, 12, 2, 3, 4, 0, 16, 17, 33], ["-", 0, 11, 12, 2, 3, 4, 0, 16, 12, 13], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 17, 33], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 1 | 126 |
#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... | [["+", 12, 16, 31, 2, 3, 4, 0, 16, 17, 33], ["+", 12, 16, 31, 2, 3, 4, 0, 16, 12, 22], ["-", 12, 16, 12, 2, 3, 4, 0, 16, 17, 33], ["-", 12, 16, 12, 2, 3, 4, 0, 16, 12, 13]] | 1 | 99 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string str;
int m, h, i;
while (cin >> str, str != "-") {
cin >> m;
for (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, i;
while (cin >> str, str != "-") {
cin >> m;
for (i = 0; i < m; i++) {
cin >> h;
str = str.substr(h, str.size() - h) + str.substr(0, h);
}
cout << str << endl;
}
} | [["-", 12, 16, 31, 2, 3, 4, 0, 16, 17, 72], ["-", 12, 16, 31, 2, 3, 4, 0, 16, 12, 13]] | 1 | 95 |
#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;
... | [["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21]] | 1 | 91 |
#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... | [["-", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]] | 1 | 216 |
#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... | [["-", 51, 2, 3, 4, 0, 23, 0, 16, 17, 33], ["-", 51, 2, 3, 4, 0, 23, 0, 16, 12, 13], ["-", 8, 9, 0, 7, 8, 9, 0, 43, 39, 78]] | 1 | 168 |
#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;
... | [["+", 0, 52, 8, 9, 0, 7, 8, 9, 0, 46], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["-", 0, 52, 8, 9, 0, 7, 8, 9, 0, 46]] | 1 | 103 |
#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;
}
... | [["+", 0, 52, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 52, 8, 9, 0, 1, 0, 16, 12, 22]] | 1 | 94 |
#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;
}
... | [["+", 0, 52, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 52, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 1 | 105 |
#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... | [["-", 51, 16, 31, 2, 3, 4, 0, 5, 0, 6], ["+", 51, 16, 31, 2, 3, 4, 0, 5, 0, 6]] | 1 | 295 |
#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]);
... | [["-", 36, 36, 36, 36, 0, 30, 0, 58, 0, 148], ["-", 36, 36, 36, 36, 0, 30, 0, 58, 141, 22]] | 1 | 494 |
#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 == "-")
... | [["-", 0, 14, 8, 9, 0, 37, 0, 16, 31, 22], ["-", 0, 14, 8, 9, 0, 37, 0, 16, 17, 72], ["+", 0, 14, 8, 9, 0, 37, 0, 16, 17, 72], ["+", 0, 14, 8, 9, 0, 37, 0, 16, 12, 22]] | 1 | 132 |
#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... | [["-", 3, 4, 0, 16, 31, 2, 63, 118, 119, 120], ["+", 0, 2, 3, 4, 0, 2, 63, 118, 119, 120], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 17, 33], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 22], ["-", 0, 2, 3, 4, 0, 2, 63, 118, 119, 120], ["+", 3, 4, 0, 16, 31, 2, 63, 118, 119, 120], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3... | 1 | 110 |
#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 <... | [["+", 0, 52, 8, 9, 0, 7, 8, 9, 0, 46], ["-", 0, 52, 8, 9, 0, 7, 8, 9, 0, 46]] | 1 | 100 |
#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) {... | [["+", 0, 52, 8, 9, 0, 7, 8, 9, 0, 46], ["-", 0, 52, 8, 9, 0, 7, 8, 9, 0, 46]] | 1 | 185 |
#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;
}
}
| [["-", 0, 11, 12, 16, 12, 2, 63, 118, 119, 120], ["+", 0, 11, 12, 16, 12, 2, 63, 118, 119, 120], ["+", 0, 11, 12, 16, 12, 2, 3, 4, 0, 13], ["+", 0, 11, 12, 16, 12, 2, 3, 4, 0, 21]] | 1 | 94 |
#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) ... | [["+", 0, 1, 0, 2, 3, 4, 0, 66, 17, 67]] | 1 | 185 |
#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;
}
| [["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 20], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 47]] | 1 | 93 |
#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 ... | [["-", 15, 16, 12, 74, 51, 2, 63, 118, 28, 22], ["+", 15, 16, 12, 74, 51, 2, 63, 118, 28, 22], ["-", 0, 7, 8, 9, 0, 1, 0, 11, 31, 22], ["-", 0, 7, 8, 9, 0, 1, 0, 11, 17, 32], ["-", 0, 7, 8, 9, 0, 1, 0, 11, 12, 22], ["-", 8, 9, 0, 7, 8, 9, 0, 1, 0, 35]] | 1 | 143 |
#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... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["-", 0, 11, 12, 2, 3, 4, 0, 16, 17, 33], ["-", 0, 11, 12, 2, 3, 4, 0, 16, 12, 13]] | 1 | 116 |
#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 = " << ... | [["+", 0, 52, 8, 9, 0, 7, 8, 9, 0, 46], ["-", 0, 52, 8, 9, 0, 7, 8, 9, 0, 46]] | 1 | 123 |
#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, ... | [["-", 36, 36, 36, 36, 0, 30, 0, 112, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 112, 51, 59]] | 1 | 98 |
#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;
} | [["-", 0, 1, 0, 2, 63, 118, 28, 23, 0, 24], ["-", 0, 2, 63, 118, 28, 23, 0, 16, 17, 72], ["+", 0, 2, 63, 118, 28, 2, 63, 118, 17, 131], ["+", 0, 2, 63, 118, 28, 2, 63, 118, 119, 120], ["+", 0, 2, 63, 118, 28, 2, 3, 4, 0, 24]] | 1 | 90 |
var input = '';
var readable = process.stdin;
readable.resume();
readable.setEncoding('utf-8');
readable.on('data', function(chunk) { input += chunk; });
readable.on('end', function() {
var data = input.split("\n");
var n = data[0];
var tscore = 0;
var hscore = 0;
for (var i = 1; i < data.length; i++) {
... | var input = '';
var readable = process.stdin;
readable.resume();
readable.setEncoding('utf-8');
readable.on('data', function(chunk) { input += chunk; });
readable.on('end', function() {
var data = input.split("\n");
var n = data[0];
var tscore = 0;
var hscore = 0;
for (var i = 1; i < data.length - 1; i++) {
... | [["+", 0, 7, 15, 1, 0, 16, 12, 16, 17, 33], ["+", 0, 7, 15, 1, 0, 16, 12, 16, 12, 555]] | 2 | 187 |
<?php
$n = trim(fgets(STDIN));
$taro_score = 0;
$hana_score = 0;
for($i = 0; $i < $n; $i++){
$card = explode(" ", trim(fgets(STDIN)));
$taro_card = substr($card[0],0,1);
$hana_card = substr($card[1],0,1);
if($taro_card > $hana_card){
$taro_score += 3;
}elseif ($taro_card == $hana_card) {
... | <?php
$n = trim(fgets(STDIN));
$taro_score = 0;
$hana_score = 0;
for($i = 0; $i < $n; $i++){
$card = explode(" ", trim(fgets(STDIN)));
$taro_card = substr($card[0],0);
$hana_card = substr($card[1],0);
if($taro_card > $hana_card){
$taro_score += 3;
}elseif ($taro_card == $hana_card) {
... | [["-", 0, 1, 0, 11, 12, 613, 3, 3, 0, 21], ["-", 0, 11, 12, 613, 3, 3, 0, 28, 0, 612]] | 6 | 157 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int m = scan.nextInt();
String a_card = null;
String b_card = null;
int a_point = 0;
int b_point = 0;
int j = 0;
int i = 0;
int compare_length = 0;
... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int m = scan.nextInt();
String a_card = null;
String b_card = null;
int a_point = 0;
int b_point = 0;
int j = 0;
int i = 0;
int compare_length = 0;
... | [["-", 75, 57, 75, 57, 15, 15, 0, 16, 17, 47], ["+", 75, 57, 75, 57, 15, 15, 0, 16, 17, 18], ["-", 75, 57, 75, 57, 15, 15, 0, 16, 17, 18], ["+", 75, 57, 75, 57, 15, 15, 0, 16, 17, 47]] | 3 | 317 |
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
// BufferedRead... | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
// BufferedRead... | [["-", 15, 15, 0, 16, 31, 492, 3, 4, 0, 499], ["+", 15, 15, 0, 16, 31, 492, 3, 4, 0, 22], ["-", 15, 15, 0, 16, 12, 492, 3, 4, 0, 499], ["+", 15, 15, 0, 16, 12, 492, 3, 4, 0, 22]] | 3 | 346 |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int T = 0;
int H = 0;
for (int i = 0; i < n; i++) {
String sT = scan.next();
String sH = scan.next();
if (sT.compareTo(sH) < 0) {
... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int T = 0;
int H = 0;
for (int i = 0; i < n; i++) {
String sT = scan.next();
String sH = scan.next();
if (sT.compareTo(sH) < 0) {
... | [["-", 0, 57, 64, 196, 0, 1, 0, 11, 31, 22], ["+", 0, 57, 64, 196, 0, 1, 0, 11, 31, 22], ["-", 75, 57, 64, 196, 0, 1, 0, 11, 31, 22], ["+", 75, 57, 64, 196, 0, 1, 0, 11, 31, 22]] | 3 | 148 |
import static java.lang.System.out;
import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int num = scan.nextInt();
int alphaAns = 0;
int betaAns = 0;
for (int i = 0; i < num; i++) {
String alpha = scan.next();
String b... | import static java.lang.System.out;
import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int num = scan.nextInt();
int alphaAns = 0;
int betaAns = 0;
for (int i = 0; i < num; i++) {
String alpha = scan.next();
String b... | [["-", 0, 57, 75, 57, 15, 15, 0, 16, 17, 18], ["+", 0, 57, 75, 57, 15, 15, 0, 16, 17, 47], ["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491]] | 3 | 155 |
import java.util.ArrayList;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int n = 0;
int taroPoint = 0;
int hanakoPoint = 0;
String str = null;
ArrayList<String> taro = new ArrayList<String>();
ArrayList<String> hanako = new ArrayList<String>();
S... | import java.util.ArrayList;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int n = 0;
int taroPoint = 0;
int hanakoPoint = 0;
String str = null;
ArrayList<String> taro = new ArrayList<String>();
ArrayList<String> hanako = new ArrayList<String>();
S... | [["-", 0, 195, 8, 196, 0, 1, 0, 492, 141, 22], ["+", 0, 195, 8, 196, 0, 1, 0, 492, 141, 22], ["-", 3, 4, 0, 16, 31, 16, 12, 5, 0, 491], ["+", 3, 4, 0, 16, 31, 16, 12, 5, 0, 491]] | 3 | 260 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int taro_point = 0;
int hanako_point = 0;
int card_num = 0;
int result_comp;
String[] taro_card, hanako_card;
Scanner sc = new Scanner(System.in);
card_num = sc.nextInt();
taro_card = new Strin... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int taro_point = 0;
int hanako_point = 0;
int card_num = 0;
int result_comp;
String[] taro_card, hanako_card;
Scanner sc = new Scanner(System.in);
card_num = sc.nextInt();
taro_card = new Strin... | [["-", 75, 57, 75, 57, 15, 15, 0, 16, 12, 499], ["+", 75, 57, 75, 57, 15, 15, 0, 16, 12, 499]] | 3 | 218 |
#include <stdio.h>
#include <string.h>
int main() {
char s1[100], s2[100];
int a, i;
int sumt = 0, sumh = 0;
scanf("%d", a);
for (i = 0; i < a; i++) {
scanf("%s %s", s1, s2);
if (strcmp(s1, s2) == 0)
sumt++, sumh++;
else if (strcmp(s1, s2) > 0)
sumt += 3;
else if (strcmp(s1, s2) ... | #include <stdio.h>
#include <string.h>
int main() {
char s1[100], s2[100];
int a, i;
int sumt = 0, sumh = 0;
scanf("%d", &a);
for (i = 0; i < a; i++) {
scanf("%s %s", s1, s2);
if (strcmp(s1, s2) == 0)
sumt++, sumh++;
else if (strcmp(s1, s2) > 0)
sumt += 3;
else if (strcmp(s1, s2)... | [["+", 0, 1, 0, 2, 3, 4, 0, 66, 17, 67]] | 0 | 134 |
#include <stdio.h>
#include <string.h>
int main(void) {
int i, j, n, m1, m2, ta = 0, ha = 0;
char taro[101], hanako[101];
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%s%s", taro, hanako);
m1 = strlen(taro);
m2 = strlen(hanako);
if (m1 > m2)
m1 = m2;
for (j = 0; j < m1; j++) {
... | #include <stdio.h>
#include <string.h>
int main(void) {
int i, j, n, m1, m2, ta = 0, ha = 0;
char taro[101], hanako[101];
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%s%s", taro, hanako);
m1 = strlen(taro);
m2 = strlen(hanako);
if (m1 < m2)
m1 = m2;
for (j = 0; j < m1; j++) {
... | [["-", 8, 9, 0, 57, 15, 23, 0, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 18], ["-", 0, 9, 0, 57, 15, 23, 0, 11, 17, 32], ["+", 0, 9, 0, 57, 15, 23, 0, 16, 17, 60]] | 0 | 194 |
#include <stdio.h>
#include <string.h>
int main(void) {
int i;
int cards;
scanf("%d", &cards);
int pnt_t = 0, pnt_h = 0;
char card_t[101], card_h[101];
for (i = 1; i <= cards; i++) {
scanf("%s %s", card_t, card_h);
int cmp = strcmp(card_t, card_h);
if (cmp < 0) {
pnt_t += 3;
} else ... | #include <stdio.h>
#include <string.h>
int main(void) {
int i;
int cards;
scanf("%d", &cards);
int pnt_t = 0, pnt_h = 0;
char card_t[101], card_h[101];
for (i = 1; i <= cards; i++) {
scanf("%s %s", card_t, card_h);
int cmp = strcmp(card_t, card_h);
if (cmp > 0) {
pnt_t += 3;
} else ... | [["-", 8, 9, 0, 57, 15, 23, 0, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 47], ["-", 75, 76, 0, 57, 15, 23, 0, 16, 17, 47], ["+", 75, 76, 0, 57, 15, 23, 0, 16, 17, 18]] | 0 | 132 |
#include <stdio.h>
#include <string.h>
int main(void) {
char taro[100], hanako[100];
int n;
int t_point = 0;
int h_point = 0;
register int i, j;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%s %s", taro, hanako);
j = 0;
if (strcmp(taro, hanako) == 0) {
t_point++;
h_point++;... | #include <stdio.h>
#include <string.h>
int main(void) {
char taro[100], hanako[100];
int n;
int t_point = 0;
int h_point = 0;
register int i, j;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%s %s", taro, hanako);
j = 0;
if (strcmp(taro, hanako) == 0) {
t_point++;
h_point++;... | [["-", 15, 23, 0, 16, 31, 23, 0, 16, 17, 60], ["+", 15, 23, 0, 16, 31, 23, 0, 16, 17, 79], ["-", 15, 23, 0, 16, 12, 23, 0, 16, 17, 60], ["+", 15, 23, 0, 16, 12, 23, 0, 16, 17, 79]] | 0 | 187 |
#include <stdio.h>
#include <string.h>
int main() {
int n, t1 = 0, t2 = 0, i, tmp;
char s1[128], s2[128];
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%s %s", s1, s2);
tmp = strcmp(s1, s2);
if (tmp == 1)
t1 += 3;
else if (tmp == -1)
t2 += 3;
else {
t1++;
t2++;
... | #include <stdio.h>
#include <string.h>
int main() {
int n, t1 = 0, t2 = 0, i, tmp;
char s1[128], s2[128];
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%s %s", s1, s2);
tmp = strcmp(s1, s2);
if (tmp >= 1)
t1 += 3;
else if (tmp <= -1)
t2 += 3;
else {
t1++;
t2++;
... | [["-", 8, 9, 0, 57, 15, 23, 0, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 20], ["-", 75, 76, 0, 57, 15, 23, 0, 16, 17, 60], ["+", 75, 76, 0, 57, 15, 23, 0, 16, 17, 19]] | 0 | 126 |
#include <stdio.h>
int main(void) {
char t[1001] = {};
char h[1001] = {};
int j = 0, n = 0, t_score = 0, h_score = 0;
scanf("%d", &n);
while (n--) {
scanf("%s %s", t, h);
while (t[j] != '\0' && h[j] != '\0') {
if (t[j] - 'a' > h[j] - 'a') {
t_score += 3;
j = 0;
break;
... | #include <stdio.h>
int main(void) {
char t[1001] = {};
char h[1001] = {};
int j = 0, n = 0, t_score = 0, h_score = 0;
scanf("%d", &n);
while (n--) {
scanf("%s %s", t, h);
while (t[j] != '\0' || h[j] != '\0') {
if (t[j] - 'a' > h[j] - 'a') {
t_score += 3;
j = 0;
break;
... | [["-", 8, 9, 0, 52, 15, 23, 0, 16, 17, 98], ["+", 8, 9, 0, 52, 15, 23, 0, 16, 17, 106], ["+", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13]] | 0 | 196 |
#include <stdio.h>
#include <string.h>
#define anD &&
#define oR ||
#define max(a, b) ((a) > (b)) ? (a) : (b)
#define min(a, b) ((a) < (b)) ? (a) : (b)
#define rep(i, n) for ((i) = 0; (i) < (n); (i)++)
int main(void) {
int point_Taro = 0, point_Hanako = 0, i, st_T, st_H;
int n, j;
char t[101], h[101];
scanf("%... | #include <stdio.h>
#include <string.h>
#define anD &&
#define oR ||
#define max(a, b) ((a) >= (b)) ? (a) : (b)
#define min(a, b) ((a) <= (b)) ? (a) : (b)
#define rep(i, n) for ((i) = 0; (i) < (n); (i)++)
int main(void) {
int point_Taro = 0, point_Hanako = 0, i, st_T, st_H;
int n, j;
char t[101], h[101];
scanf(... | [["-", 36, 36, 36, 36, 0, 30, 0, 112, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 112, 51, 59], ["+", 0, 57, 15, 23, 0, 16, 12, 23, 0, 24], ["+", 0, 57, 15, 23, 0, 16, 12, 23, 0, 25]] | 0 | 266 |
#include <stdio.h>
#include <string.h>
int main() {
char word1[100], word2[100];
int i, n;
int sum1, sum2;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%s %s", word1, word2);
if (strcmp(word1, word2) > 0) {
sum1 += 3;
} else if (strcmp(word1, word2) == 0) {
sum1++;
sum2+... | #include <stdio.h>
#include <string.h>
int main() {
char word1[100], word2[100];
int i, n;
int sum1 = 0, sum2 = 0;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%s %s", word1, word2);
if (strcmp(word1, word2) > 0) {
sum1 += 3;
} else if (strcmp(word1, word2) == 0) {
sum1++;
... | [["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 0 | 126 |
#include <stdio.h>
int main(void) {
int a, i, n, t = 0, h = 0, x, y;
char hanako[110], tarou[110];
scanf("%d", &a);
for (i = 0; i < a; i++) {
scanf("%f %f", tarou, hanako);
for (n = 0; n < 110; n++) {
x = tarou[n] - 'a';
y = hanako[n] - 'a';
if (x > y) {
t += 3;
n = 110... | #include <stdio.h>
int main(void) {
int a, i, n, t = 0, h = 0, x, y;
char hanako[110], tarou[110];
scanf("%d", &a);
for (i = 0; i < a; i++) {
scanf("%s %s", tarou, hanako);
for (n = 0; n < 110; n++) {
x = tarou[n] - 'a';
y = hanako[n] - 'a';
if (x > y) {
t += 3;
n = 110... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 195 |
#include <stdio.h>
#include <string.h>
int main() {
int i, n, t = 0, h = 0;
char st[101], sh[101];
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%s %s", &st, &sh);
if (strcmp(st, sh) < 0) {
t += 3;
} else if (strcmp(st, sh) > 0) {
h += 3;
} else {
h += 1;
t += 1;
... | #include <stdio.h>
#include <string.h>
int main() {
int i, n, t = 0, h = 0;
char st[101], sh[101];
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%s %s", &st, &sh);
if (strcmp(st, sh) > 0) {
t += 3;
} else if (strcmp(st, sh) < 0) {
h += 3;
} else {
h += 1;
t += 1;
... | [["-", 8, 9, 0, 57, 15, 23, 0, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 47], ["-", 75, 76, 0, 57, 15, 23, 0, 16, 17, 47], ["+", 75, 76, 0, 57, 15, 23, 0, 16, 17, 18]] | 0 | 133 |
#include <stdio.h>
#include <string.h>
int main() {
int n;
scanf("%d", &n);
int i;
int result;
int a_score = 0;
int b_score = 0;
char a_card[100];
char b_card[100];
for (i = 0; i < n; i++) {
scanf("%s %s", a_card, b_card);
result = strcmp(a_card, b_card);
if (result == 0) {
a_score... | #include <stdio.h>
#include <string.h>
int main() {
int n;
scanf("%d", &n);
int i;
int result;
int a_score = 0;
int b_score = 0;
char a_card[100];
char b_card[100];
for (i = 0; i < n; i++) {
scanf("%s %s", a_card, b_card);
result = strcmp(a_card, b_card);
if (result == 0) {
a_scor... | [["-", 8, 9, 0, 57, 15, 23, 0, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 47], ["-", 8, 9, 0, 57, 15, 23, 0, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 18]] | 0 | 141 |
#include <ctype.h>
#include <stdio.h>
int main(void) {
char ta[101];
char ha[101];
int n, c;
int t, h;
int i;
t = 0;
h = 0;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%s%s", ta, ha);
c = strcmp(ta, ha);
if (c > 0)
t += 3;
else if (c == 0) {
t += 1;
h += 1;
... | #include <ctype.h>
#include <stdio.h>
int main(void) {
char ta[101];
char ha[101];
int n, c;
int t, h;
int i;
t = 0;
h = 0;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%s%s", ta, ha);
c = strcmp(ta, ha);
if (c > 0)
t += 3;
else if (c == 0) {
t += 1;
h += 1;
... | [["-", 75, 76, 0, 57, 64, 1, 0, 11, 12, 13], ["+", 75, 76, 0, 57, 64, 1, 0, 11, 12, 13]] | 0 | 142 |
#include <ctype.h>
#include <stdio.h>
#include <string.h>
int main(int argc, const char *argv[]) {
int n, taro_p = 0, hanako_p = 0, i;
scanf("%d", &n);
for (i = 0; i < n; i++) {
// printf("%d %d ",taro_p,hanako_p);
char taro_card[101], hanako_card[101];
scanf("%s", taro_card);
scanf("%s", han... | #include <ctype.h>
#include <stdio.h>
#include <string.h>
int main(int argc, const char *argv[]) {
int n, taro_p = 0, hanako_p = 0, i;
scanf("%d", &n);
for (i = 0; i < n; i++) {
// printf("%d %d ",taro_p,hanako_p);
char taro_card[101], hanako_card[101];
scanf("%s", taro_card);
scanf("%s", han... | [["-", 75, 76, 0, 57, 15, 23, 0, 16, 17, 18], ["+", 75, 76, 0, 57, 15, 23, 0, 16, 17, 47]] | 0 | 176 |
#include <stdio.h>
//#define DEBUG
int main(void) {
int n = 0; //???????????°????????????????????°
int pt_taro = 0; //?????????????????????????¨???????????????°
int pt_hanako = 0; //??±??????????????????????¨???????????????°
int i = 0; //???????????°
int j = 0;
scanf("%d", &n);
#ifdef DEBUG
... | #include <stdio.h>
//#define DEBUG
int main(void) {
int n = 0; //???????????°????????????????????°
int pt_taro = 0; //?????????????????????????¨???????????????°
int pt_hanako = 0; //??±??????????????????????¨???????????????°
int i = 0; //???????????°
int j = 0;
scanf("%d", &n);
#ifdef DEBUG
... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 314 |
#include <stdio.h>
#include <string.h>
int main() {
int taro = 0, hana = 0, i, n;
char a[100], b[100];
scanf("%d", n);
for (i = 0; i < n; i++) {
scanf("%s %s", a, b);
strcmp(a, b);
if (strcmp(a, b) == 0) {
taro++;
hana++;
}
else if (strcmp(a, b) > 0)
taro += 3;
els... | #include <stdio.h>
#include <string.h>
int main() {
int taro = 0, hana = 0, i, n;
char a[100], b[100];
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%s %s", a, b);
strcmp(a, b);
if (strcmp(a, b) == 0) {
taro++;
hana++;
}
else if (strcmp(a, b) > 0)
taro += 3;
el... | [["+", 0, 1, 0, 2, 3, 4, 0, 66, 17, 67], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 0 | 130 |
#include <stdio.h>
#include <string.h>
int main(void) {
int n, i, taro = 0, hanako = 0;
char card1[110], card2[110];
scanf("%d", &n);
for (i = n; i < n; i++) {
scanf("%s %s", card1, card2);
if (strcmp(card1, card2) == 0)
taro++, hanako++;
else if (strcmp(card1, card2) > 0)
taro += 3;
... | #include <stdio.h>
#include <string.h>
int main(void) {
int n, i, taro = 0, hanako = 0;
char card1[110], card2[110];
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%s %s", card1, card2);
if (strcmp(card1, card2) == 0)
taro += 1, hanako += 1;
else if (strcmp(card1, card2) > 0)
taro += ... | [["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 22], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["-", 0, 57, 64, 1, 0, 34, 31, 27, 17, 29], ["+", 0, 57, 64, 1, 0, 34, 31, 11, 17, 107], ["+", 0, 57, 64, 1, 0, 34, 31, 11, 12, 13], ["-", 0, 57, 64, 1, 0, 34, 12, 27, 17, 29], ["+", 0, 57, 64, 1, 0, 34, 12, 11, 17, 107], ["+", 0, 57, ... | 0 | 135 |
#include <stdio.h>
int main() {
int n = 0;
scanf("%d", &n);
char A[100 + 1] = "";
char B[100 + 1] = "";
int scoreA = 0;
int scoreB = 0;
for (int i = 0; i < n; i++) {
scanf("%s %s", A, B);
if (strcmp(A, B) == 0) {
scoreA++;
scoreB++;
} else if (strcmp(A, B) == -1) {
scoreB +... | #include <stdio.h>
int main() {
int n = 0;
scanf("%d", &n);
char A[100 + 1] = "";
char B[100 + 1] = "";
int scoreA = 0;
int scoreB = 0;
for (int i = 0; i < n; i++) {
scanf("%s %s", A, B);
if (strcmp(A, B) == 0) {
scoreA++;
scoreB++;
} else if (strcmp(A, B) < 0) {
scoreB += ... | [["-", 75, 76, 0, 57, 15, 23, 0, 16, 17, 60], ["-", 75, 76, 0, 57, 15, 23, 0, 16, 12, 13], ["+", 75, 76, 0, 57, 15, 23, 0, 16, 17, 18], ["+", 75, 76, 0, 57, 15, 23, 0, 16, 12, 13]] | 0 | 141 |
#include <stdio.h>
#include <string.h>
int main(int argc, const char *argv[]) {
int i, j;
int pointA = 0, pointB = 0;
char strA[101];
char strB[101];
int n;
scanf("%d", &n);
for (i = 0; i < n; i++) {
j = 0;
scanf("%s", strA);
scanf("%s", strB);
while (j <= 101) {
if (strcmp(strA, str... | #include <stdio.h>
#include <string.h>
int main(int argc, const char *argv[]) {
int i, j;
int pointA = 0, pointB = 0;
char strA[101];
char strB[101];
int n;
scanf("%d", &n);
for (i = 0; i < n; i++) {
j = 0;
scanf("%s", strA);
scanf("%s", strB);
while (j <= 101) {
if (strcmp(strA, str... | [["-", 0, 57, 15, 23, 0, 16, 31, 69, 71, 22], ["+", 0, 57, 15, 23, 0, 16, 31, 69, 71, 22], ["-", 0, 57, 15, 23, 0, 16, 12, 69, 71, 22], ["+", 0, 57, 15, 23, 0, 16, 12, 69, 71, 22]] | 0 | 184 |
#include <stdio.h>
#include <string.h>
struct data {
char card[101];
int pnt;
};
typedef struct data Data;
int main() {
char word[201];
Data taro, hana;
int i, n, k, j, idx, len;
taro.pnt = 0;
hana.pnt = 0;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%s", taro.card);
scanf("%s", hana.car... | #include <stdio.h>
#include <string.h>
struct data {
char card[101];
int pnt;
};
typedef struct data Data;
int main() {
char word[201];
Data taro, hana;
int i, n, k, j, idx, len;
taro.pnt = 0;
hana.pnt = 0;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%s", taro.card);
scanf("%s", hana.car... | [["-", 8, 9, 0, 57, 15, 23, 0, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 47], ["-", 75, 76, 0, 57, 15, 23, 0, 16, 17, 47], ["+", 75, 76, 0, 57, 15, 23, 0, 16, 17, 18]] | 0 | 191 |
#include <stdio.h>
int main() {
//変数の宣言
int i, j, n, tp = 0, hp = 0;
char t[101], h[101];
scanf("%d", &n); //ターン数(各持ちカード数 入力
for (i = 0; i < n; i++) {
scanf("%s %s", t, h); //各々の具体的なカード 入力
for (j = 0;; j++) { //延々とiを増やしてく。breakが置いてある
if (t[j] >
h[j]) { //毎度勝敗を確認して終わり次第breakして次のターンの... | #include <stdio.h>
int main() {
//変数の宣言
int i, j, n, tp = 0, hp = 0;
char t[101], h[101];
scanf("%d", &n); //ターン数(各持ちカード数 入力
for (i = 0; i < n; i++) {
scanf("%s %s", t, h); //各々の具体的なカード 入力
for (j = 0;; j++) { //延々とiを増やしてく。breakが置いてある
if (t[j] >
h[j]) { //毎度勝敗を確認して終わり次第breakして次のターンの... | [["-", 75, 76, 0, 57, 15, 23, 0, 16, 17, 60], ["+", 0, 57, 15, 23, 0, 16, 31, 16, 17, 72], ["+", 75, 76, 0, 57, 15, 23, 0, 16, 17, 60], ["+", 75, 76, 0, 57, 15, 23, 0, 16, 12, 13]] | 0 | 169 |
#include <stdio.h>
#include <string.h>
int main(int argc, const char *argv[]) {
char a[101], b[101];
int n, i;
int x, y;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%s %s", a, b);
if (strcmp(a, b) == 0)
x++, y++;
if (strcmp(a, b) > 0)
x += 3;
if (strcmp(a, b) < 0)
y ... | #include <stdio.h>
#include <string.h>
int main(int argc, const char *argv[]) {
char a[101], b[101];
int n, i;
int x = 0, y = 0;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%s %s", a, b);
if (strcmp(a, b) == 0)
x++, y++;
if (strcmp(a, b) > 0)
x += 3;
if (strcmp(a, b) < 0)
... | [["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 0 | 138 |
#include <stdio.h>
int main(void) {
int n, i;
int pt = 0, ph = 0;
char taro[101], hana[101];
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%s %s", taro, hana);
// printf("%d %d\n",taro[0],hana[0]);
if (strcmp(taro, hana > 0))
pt += 3;
else if (strcmp(taro, hana) < 0)
ph += 3;
... | #include <stdio.h>
int main(void) {
int n, i;
int pt = 0, ph = 0;
char taro[101], hana[101];
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%s %s", taro, hana);
// printf("%d %d\n",taro[0],hana[0]);
if (strcmp(taro, hana) > 0)
pt += 3;
else if (strcmp(taro, hana) < 0)
ph += 3;
... | [["+", 15, 23, 0, 16, 31, 2, 3, 4, 0, 25], ["-", 0, 57, 15, 23, 0, 2, 3, 4, 0, 25]] | 0 | 126 |
#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;
... | [["-", 75, 76, 0, 57, 64, 1, 0, 11, 31, 22], ["+", 75, 76, 0, 57, 64, 1, 0, 11, 31, 22], ["-", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22]] | 1 | 114 |
#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;
}... | [["+", 0, 7, 8, 9, 0, 57, 75, 76, 0, 95]] | 1 | 112 |
#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... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22]] | 1 | 236 |
#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 += ... | [["-", 0, 57, 64, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 31, 22], ["-", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22]] | 1 | 106 |
#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... | [["+", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46], ["-", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46]] | 1 | 117 |
#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 {
... | [["+", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44], ["-", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46]] | 1 | 98 |
#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;
}
| [["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 62], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151]] | 1 | 94 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.