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 |
|---|---|---|---|---|
#include <cctype>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
typedef vector<int> vec;
int main() {
char c;
int alpha[26] = {0};
while (cin >> c) {
alpha[(int)(c - 'a')]++;
}
rep(i, 26) cout << (char)('a' + ... | #include <cctype>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
typedef vector<int> vec;
int main() {
char c;
int alpha[26] = {0};
while (cin >> c) {
alpha[tolower(c) - 'a']++;
}
rep(i, 26) cout << (char)('a' ... | [["-", 0, 27, 28, 69, 341, 342, 0, 74, 0, 24], ["-", 28, 69, 341, 342, 0, 74, 39, 77, 39, 40], ["-", 0, 27, 28, 69, 341, 342, 0, 74, 0, 25], ["+", 28, 69, 341, 342, 0, 16, 31, 2, 63, 22], ["+", 341, 342, 0, 16, 31, 2, 3, 4, 0, 25], ["-", 28, 69, 341, 342, 0, 74, 51, 23, 0, 25]] | 1 | 101 |
#include <iostream>
#include <string>
using namespace std;
int main() {
int a[26] = {};
string ch;
while (cin >> ch) {
for (int i = 0; i < ch.size(); i++) {
if (ch[i] >= 'a' && ch[i] <= 'z')
a[ch[i] - 'a']++;
else if (ch[i] >= 'A' && ch[i] <= 'Z')
a[ch[i] - 'A']++;
}
for ... | #include <iostream>
#include <string>
using namespace std;
int main() {
int a[26] = {};
string ch;
while (cin >> ch) {
for (int i = 0; i < ch.size(); i++) {
if (ch[i] >= 'a' && ch[i] <= 'z')
a[ch[i] - 'a']++;
else if (ch[i] >= 'A' && ch[i] <= 'Z')
a[ch[i] - 'A']++;
}
}
fo... | [["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46], ["-", 0, 52, 8, 9, 0, 7, 8, 9, 0, 46]] | 1 | 164 |
#include <iostream>
#include <string>
using namespace std;
int main() {
// input
char ch;
int arr[1200] = {0};
while (cin >> ch) {
arr[tolower(ch) - 'a'] += 1;
}
// output
string alphabet = "abcdefghigklmnopqrstuvwxyz";
for (int i = 0; i < 26; i++) {
cout << alphabet[i] << " : " << arr[i] << ... | #include <iostream>
#include <string>
using namespace std;
int main() {
// input
char ch;
int arr[1200] = {0};
while (cin >> ch) {
arr[tolower(ch) - 'a'] += 1;
}
// output
string alphabet = "abcdefghijklmnopqrstuvwxyz";
for (int i = 0; i < 26; i++) {
cout << alphabet[i] << " : " << arr[i] << ... | [["-", 8, 9, 0, 43, 49, 50, 51, 5, 0, 6], ["+", 8, 9, 0, 43, 49, 50, 51, 5, 0, 6]] | 1 | 92 |
#include <cctype>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
char moji;
int alpha[26] = {0};
while ((moji = getchar()) != '\n') {
tolower(moji);
alpha[moji - 'a']++;
}
for (int i = 0; i < 26; i++) {
printf("%c : %d\n", 97 + i, alpha[i]);
}
return 0;
}
| #include <cctype>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
char moji;
int alpha[26] = {0};
while ((moji = getchar()) != EOF) {
moji = tolower(moji);
alpha[moji - 'a']++;
}
for (int i = 0; i < 26; i++) {
printf("%c : %d\n", 97 + i, alpha[i]);
}
return 0;
}
| [["-", 0, 52, 15, 339, 51, 16, 12, 103, 0, 104], ["-", 0, 52, 15, 339, 51, 16, 12, 103, 0, 44], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 12, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32]] | 1 | 96 |
#include <cctype>
#include <cstdio>
int main() {
int count[26] = {};
char ch;
while (scanf("%c", &ch) != EOF) {
if (isalpha(ch)) {
ch = tolower(ch);
count[ch - 'a']++;
}
}
for (int i = 0; i < 26; i++) {
printf("%c:%d\n", i + 'a', count[i]);
}
return 0;
}
| #include <cctype>
#include <cstdio>
int main() {
int count[26] = {};
char ch;
while (scanf("%c", &ch) != EOF) {
if (isalpha(ch)) {
ch = tolower(ch);
count[ch - 'a']++;
}
}
for (int i = 0; i < 26; i++) {
printf("%c : %d\n", i + 'a', count[i]);
}
return 0;
}
| [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 102 |
#include "bits/stdc++.h"
using namespace std;
using ll = long long;
using ull = unsigned long long;
#define int ll
using vb = vector<bool>;
using vvb = vector<vb>;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
#define... | #include "bits/stdc++.h"
using namespace std;
using ll = long long;
using ull = unsigned long long;
#define int ll
using vb = vector<bool>;
using vvb = vector<vb>;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
#define... | [["-", 8, 9, 0, 43, 49, 50, 51, 5, 0, 6], ["+", 8, 9, 0, 43, 49, 50, 51, 5, 0, 6]] | 1 | 301 |
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int counter[26] = {};
char ch;
while (cin >> ch) {
ch = tolower(ch);
if (ch = isalpha(ch)) {
int num = ch - 'a';
counter[num]++;
}
}
for (int i = 0; i < 26; i++) {
printf("%c : %d¥n", i + 'a', counter[i]);
}... | #include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int counter[26] = {};
char ch;
while (cin >> ch) {
ch = tolower(ch);
if (isalpha(ch)) {
int num = ch - 'a';
counter[num]++;
}
}
for (int i = 0; i < 26; i++) {
printf("%c : %d\n", i + 'a', counter[i]);
}
re... | [["-", 8, 9, 0, 57, 15, 339, 51, 11, 31, 22], ["-", 8, 9, 0, 57, 15, 339, 51, 11, 17, 32], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 1 | 104 |
#include <cctype>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
int count[26] = {};
char ch;
while (cin >> ch) {
if (isalpha(ch)) {
ch = tolower(ch);
count[ch - 'a'] += 1;
}
}
for (int i = 0; i < 26; i++) {
printf("%c | %d\n", i + 'a', count[i]);
}
re... | #include <cctype>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
int count[26] = {};
char ch;
while (cin >> ch) {
if (isalpha(ch)) {
ch = tolower(ch);
count[ch - 'a'] += 1;
}
}
for (int i = 0; i < 26; i++) {
printf("%c : %d\n", i + 'a', count[i]);
}
re... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 101 |
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
int num[26] = {};
char ch;
while (cin >> ch) {
if (islower(ch))
num[ch - 'a'] += 1;
else if (isupper(ch))
num[ch - 'A'] += 1;
}
for (int i = 0; i < 26; i++) {
printf("%c : %d\n", i + 'a', num[1... | #include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
int num[26] = {};
char ch;
while (cin >> ch) {
if (islower(ch))
num[ch - 'a'] += 1;
else if (isupper(ch))
num[ch - 'A'] += 1;
}
for (int i = 0; i < 26; i++) {
printf("%c : %d\n", i + 'a', num[i... | [["-", 0, 2, 3, 4, 0, 69, 341, 342, 0, 13], ["+", 0, 2, 3, 4, 0, 69, 341, 342, 0, 22]] | 1 | 111 |
#include <cctype>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
char str;
int counter[26] = {};
while (cin >> str) {
if (isalpha(str)) {
str = tolower(str);
counter[str - 'a']++;
}
for (int i = 0; i < 26; i++) {
printf("%c : %d\n", i + 'a', counter[i]);
... | #include <cctype>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
char str;
int counter[26] = {};
while (cin >> str) {
if (isalpha(str)) {
str = tolower(str);
counter[str - 'a']++;
}
}
for (int i = 0; i < 26; i++) {
printf("%c : %d\n", i + 'a', counter[i]);
}
... | [["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46], ["-", 0, 52, 8, 9, 0, 7, 8, 9, 0, 46]] | 1 | 100 |
#include <cctype>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
char ch;
int count[26] = {};
while (cin >> ch) {
if (isalpha(ch)) {
count[tolower(ch) - 'a']++;
}
}
for (int i = 0; i <= 25; i++) {
printf("%c : %d", ch, count[i]);
}
return 0;
}
| #include <cctype>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
char ch;
int count[26] = {};
while (cin >> ch) {
if (isalpha(ch)) {
count[tolower(ch) - 'a']++;
}
}
for (int i = 0; i <= 25; i++) {
printf("%c : %d\n", i + 'a', count[i]);
}
return 0;
}
| [["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 31, 22], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 2, 3, 4, 0, 16, 12, 103, 0, 104], ["+", 0, 2, 3, 4, 0, 16, 12, 103, 0, 125]] | 1 | 91 |
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
char ch;
int count[26] = {};
while (scanf("%c", &ch) != EOF) {
if (isalpha(ch)) {
ch = tolower(ch);
int num = ch - 'a';
count[num]++;
}
}
for (int i = 0; i < 25; i++) {
printf("%c : %d\n",... | #include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
char ch;
int count[26] = {};
while (scanf("%c", &ch) != EOF) {
if (isalpha(ch)) {
ch = tolower(ch);
int num = ch - 'a';
count[num]++;
}
}
for (int i = 0; i < 26; i++) {
printf("%c : %d\n",... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]] | 1 | 113 |
#include <cctype>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
char counter[27] = "abcdefghijklmnopqrstuvwxyz";
string str;
int num, dat[26], i, x;
for (i = 0; i < 26; i++) {
dat[i] = 0;
}
while (cin >> str) {
x = str.size();
for (i = 0; i < x; i++) {
if (isup... | #include <cctype>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
char counter[27] = "abcdefghijklmnopqrstuvwxyz";
string str;
int num, dat[26], i, x;
for (i = 0; i < 26; i++) {
dat[i] = 0;
}
while (cin >> str) {
x = str.size();
for (i = 0; i < x; i++) {
if (isup... | [["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 173 |
#include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <vector>
#define ll long long
#define vvi vector<vector<int>>
#define All(X) X.begin(), X.end()
#define REP(i, n) for (int i = 0; i < n; i++)
using namespace std;
int main() {
int c... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <vector>
#define ll long long
#define vvi vector<vector<int>>
#define All(X) X.begin(), X.end()
#define REP(i, n) for (int i = 0; i < n; i++)
using namespace std;
int main() {
int c... | [["-", 51, 16, 12, 23, 0, 16, 12, 103, 0, 125], ["+", 51, 16, 12, 23, 0, 16, 12, 103, 0, 125]] | 1 | 167 |
#include <cctype>
#include <iostream>
#include <vector>
using namespace std;
int main() {
vector<int> v(26, 0);
char c;
while (cin >> c) {
if (isupper(c))
v[c - 'A']++;
else if (islower(c))
v[c - 'a']++;
}
for (int i = 0; i < 26; i++) {
cout << (char)(i + 'a') << ":" << v[i] << endl;
... | #include <cctype>
#include <iostream>
#include <vector>
using namespace std;
int main() {
vector<int> v(26, 0);
char c;
while (cin >> c) {
if (isupper(c))
v[c - 'A']++;
else if (islower(c))
v[c - 'a']++;
}
for (int i = 0; i < 26; i++) {
cout << (char)(i + 'a') << " : " << v[i] << endl... | [["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 116 |
#include <iostream>
#include <string>
using namespace std;
int main() {
int a[256];
fill(a, a + 256, 0);
string line;
while (getline(cin, line))
for (int i = 0; i < line.length(); ++i)
a[line[i]]++;
for (char i = 'a'; i <= 'z'; ++i)
cout << i << " : " << a[i] << endl;
return 0;
} | #include <iostream>
#include <string>
using namespace std;
int main() {
int a[256];
fill(a, a + 256, 0);
string line;
while (getline(cin, line))
for (int i = 0; i < line.length(); ++i)
a[tolower(line[i])]++;
for (char i = 'a'; i <= 'z'; ++i)
cout << i << " : " << a[i] << endl;
return 0;
} | [["+", 0, 27, 28, 69, 341, 342, 0, 2, 63, 22], ["+", 28, 69, 341, 342, 0, 2, 3, 4, 0, 24], ["+", 28, 69, 341, 342, 0, 2, 3, 4, 0, 25]] | 1 | 106 |
#include <cctype>
#include <iostream>
using namespace std;
int main() {
char ch;
int count[26] = {0};
while (cin >> ch) {
if (isupper(ch))
ch = tolower(ch);
count[ch - 'a']++;
}
for (int i = 0; i < 26; i++) {
cout << i + 'a' << " : " << count[i] << endl;
}
return 0;
} | #include <cctype>
#include <iostream>
using namespace std;
int main() {
char ch;
int count[26] = {0};
while (cin >> ch) {
if (isupper(ch))
ch = tolower(ch);
count[ch - 'a']++;
}
for (int i = 0; i < 26; i++) {
cout << (char)(i + 'a') << " : " << count[i] << endl;
}
return 0;
} | [["+", 31, 16, 31, 16, 31, 16, 12, 74, 0, 24], ["+", 31, 16, 31, 16, 12, 74, 39, 77, 39, 40], ["+", 31, 16, 31, 16, 31, 16, 12, 74, 0, 25], ["+", 31, 16, 31, 16, 12, 74, 51, 23, 0, 24], ["+", 31, 16, 31, 16, 12, 74, 51, 23, 0, 25]] | 1 | 97 |
// ITP1_8_C
#include <iostream>
#include <stdio.h>
using namespace std;
int moji[26];
int main() {
int i;
char ch;
while (cin >> ch) {
if ('a' <= ch && ch <= 'z')
moji[ch - 'a']++;
else if ('A' <= ch && ch <= 'Z')
moji[ch - 'A']++;
else if (ch == EOF)
break;
}
for (i = 0; i ... | // ITP1_8_C
#include <iostream>
#include <stdio.h>
using namespace std;
int moji[26];
int main() {
int i;
char ch;
while (cin >> ch) {
if ('a' <= ch && ch <= 'z')
moji[ch - 'a']++;
else if ('A' <= ch && ch <= 'Z')
moji[ch - 'A']++;
else if (ch == EOF)
break;
}
for (i = 0; i ... | [["+", 31, 16, 31, 16, 12, 74, 51, 23, 0, 24], ["+", 31, 16, 31, 16, 12, 74, 51, 23, 0, 25]] | 1 | 131 |
#include <stdio.h>
int main() {
int i, j, alp[26] = {0};
char s, a = 'a';
while (scanf("%c", &s) != EOF) {
if (s >= 'A' && s <= 'Z')
s += 32;
for (i = 0; i < 23; i++) {
if (s == a)
alp[j]++;
a++;
}
a = 'a';
}
for (j = 0; j < 26; j++) {
printf("%c : %d\n", a, alp[j... | #include <stdio.h>
int main() {
int i, j, alp[26] = {0};
char s, a = 'a';
while (scanf("%c", &s) != EOF) {
if (s >= 'A' && s <= 'Z')
s += 32;
for (i = 0; i < 26; i++) {
if (s == a)
alp[i]++;
a++;
}
a = 'a';
}
for (j = 0; j < 26; j++) {
printf("%c : %d\n", a, alp[j... | [["-", 0, 52, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 52, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 64, 1, 0, 27, 28, 69, 341, 342, 0, 22], ["+", 64, 1, 0, 27, 28, 69, 341, 342, 0, 22]] | 1 | 137 |
#include <cctype>
#include <iostream>
#include <string>
using namespace std;
int b[26];
int main() {
string a;
char c[26] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i',
'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r',
's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};
while (getline(cin, a)) {
... | #include <cctype>
#include <iostream>
#include <string>
using namespace std;
int b[26];
int main() {
string a;
char c[26] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i',
'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r',
's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};
while (getline(cin, a)) {
... | [["-", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46], ["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46]] | 1 | 255 |
#include <iostream>
using namespace std;
int main() {
int count[26], h;
char str;
for (int h = 0; h < 26; h++) {
count[h] = 0;
}
while (cin >> str) {
for (char c = 'a'; c <= 'z'; c++) {
if (str == c || str == c + 'A' - 'a')
count[c - 'a']++;
}
}
for (int h = 0; h < 26; h++)... | #include <iostream>
using namespace std;
int main() {
int count[26], h;
char str;
for (int h = 0; h < 26; h++) {
count[h] = 0;
}
while (cin >> str) {
for (char c = 'a'; c <= 'z'; c++) {
if (str == c || str == c + 'A' - 'a')
count[c - 'a']++;
}
}
for (int h = 0; h < 26; h++)... | [["+", 31, 16, 31, 16, 31, 16, 12, 74, 0, 24], ["+", 31, 16, 31, 16, 12, 74, 39, 77, 39, 40], ["+", 31, 16, 31, 16, 31, 16, 12, 74, 0, 25], ["+", 31, 16, 31, 16, 12, 74, 51, 23, 0, 24], ["+", 31, 16, 31, 16, 12, 74, 51, 23, 0, 25]] | 1 | 142 |
#include <cctype>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
char ch;
int cnt[26] = {};
while (cin >> ch) {
ch = tolower(ch);
if (isalpha(ch)) {
cnt[ch - 'a']++;
}
}
for (int i = 0; i < 26; i++) {
printf("%c:%d\n", i + 'a', cnt[i]);
}
return 0;
} | #include <cctype>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
char ch;
int cnt[26] = {};
while (cin >> ch) {
ch = tolower(ch);
if (isalpha(ch)) {
cnt[ch - 'a']++;
}
}
for (int i = 0; i < 26; i++) {
printf("%c : %d\n", i + 'a', cnt[i]);
}
return 0;
} | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 100 |
#include <iostream>
#include <map>
using namespace std;
int main() {
string s;
map<string, int> m;
while (cin >> s) {
for (int i = 0; i < s.size(); i++) {
string sub = s.substr(i, 1);
if ("A" < sub && sub < "Z")
sub[0] += 32;
if ("a" < sub && sub < "z") {
if (m.find(sub) ==... | #include <iostream>
#include <map>
using namespace std;
int main() {
string s;
map<string, int> m;
while (cin >> s) {
for (int i = 0; i < s.size(); i++) {
string sub = s.substr(i, 1);
if ("A" <= sub && sub <= "Z")
sub[0] += 32;
if ("a" <= sub && sub <= "z") {
if (m.find(sub... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 18], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 19], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 18], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 19]] | 1 | 174 |
#include <algorithm>
#include <ctype.h>
#include <iostream>
#include <map>
#include <sstream>
#include <string>
using namespace std;
int main(void) {
string input;
bool loop = true;
map<char, int> mp;
string letters = "abcdefghijklmnopqrstuvwxyz";
char ch;
for (int i = 0; i < letters.length(); i++) {
... | #include <algorithm>
#include <ctype.h>
#include <iostream>
#include <map>
#include <sstream>
#include <string>
using namespace std;
int main(void) {
string input;
bool loop = true;
map<char, int> mp;
string letters = "abcdefghijklmnopqrstuvwxyz";
char ch;
for (int i = 0; i < letters.length(); i++) {
... | [["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 187 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string str;
int num[26], x;
char ch;
for (int i = 0; i < 26; i++) {
num[i] = 0;
}
while (cin >> ch) {
for (int i = 0; i < str.length(); i++) {
str[i] = tolower(str[i]);
if (str[i] >= 'a' && str[i] <= 'z') {
... | #include <iostream>
#include <string>
using namespace std;
int main() {
string str;
int num[26], x;
char ch;
for (int i = 0; i < 26; i++) {
num[i] = 0;
}
while (cin >> str) {
for (int i = 0; i < str.length(); i++) {
str[i] = tolower(str[i]);
if (str[i] >= 'a' && str[i] <= 'z') {
... | [["-", 8, 9, 0, 52, 15, 339, 51, 16, 12, 22], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 12, 22], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 22]] | 1 | 170 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string str;
int alp[26];
char c;
int x;
for (int i = 0; i < 26; i++)
alp[i] = 0;
while (cin >> str) {
for (unsigned i = 0; i < str.length(); i++) {
str[i] = tolower(str[i]);
if (str[i] >= 'a' && str[i] <= 'z') {
... | #include <iostream>
#include <string>
using namespace std;
int main() {
string str;
int alp[26];
char c;
int x;
for (int i = 0; i < 26; i++)
alp[i] = 0;
while (cin >> str) {
for (unsigned i = 0; i < str.length(); i++) {
str[i] = tolower(str[i]);
if (str[i] >= 'a' && str[i] <= 'z') {
... | [["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 172 |
#include <cctype>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
int cnt[26] = {};
char ch;
while (cin >> ch) {
ch = tolower(ch);
if (isalpha(ch))
cnt[ch - 'a']++;
}
for (int i = 0; i < 26; i++) {
printf("%c:%d\n", 'a' + i, cnt[i]);
}
return 0;
} | #include <cctype>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
int cnt[26] = {};
char ch;
while (cin >> ch) {
ch = tolower(ch);
if (isalpha(ch))
cnt[ch - 'a']++;
}
for (int i = 0; i < 26; i++) {
printf("%c : %d\n", 'a' + i, cnt[i]);
}
return 0;
} | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 98 |
#include <cctype>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
char ch;
int num;
int counter[26] = {};
while (cin >> ch) {
// if(num < 0) continue;
if (!isalpha(tolower(ch)))
continue;
num = tolower(ch) - 'a';
// cout << "NUM " << num << " CH ... | #include <cctype>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
char ch;
int num;
int counter[26] = {};
while (cin >> ch) {
// if(num < 0) continue;
if (!isalpha(tolower(ch)))
continue;
num = tolower(ch) - 'a';
// cout << "NUM " << num << " CH ... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 117 |
#include <iostream>
using namespace std;
int main() {
char str[1201];
int num[26] = {0};
while (cin >> str) {
for (int i = 0; str[i] != '\0'; i++) {
if ('a' <= str[i] && str[i] <= 'z')
num[str[i] - 'a']++;
if ('A' <= str[i] && str[i] <= 'Z')
num[str[i] - 'A']++;
}
}
for (... | #include <iostream>
using namespace std;
int main() {
char str[1201];
int num[26] = {0};
while (cin >> str) {
for (int i = 0; str[i] != '\0'; i++) {
if ('a' <= str[i] && str[i] <= 'z')
num[str[i] - 'a']++;
if ('A' <= str[i] && str[i] <= 'Z')
num[str[i] - 'A']++;
}
}
for (... | [["+", 31, 16, 31, 16, 31, 16, 12, 74, 0, 24], ["+", 31, 16, 31, 16, 12, 74, 39, 77, 39, 40], ["+", 31, 16, 31, 16, 31, 16, 12, 74, 0, 25], ["+", 31, 16, 31, 16, 12, 74, 51, 23, 0, 24], ["+", 31, 16, 31, 16, 12, 74, 51, 23, 0, 25]] | 1 | 159 |
#include <iostream>
using namespace std;
int main() {
const int size = 26;
int count[size]{};
char chara;
while (cin >> chara) {
if ('a' <= chara && chara <= 'z') {
int id = chara - 'a';
++count[id];
} else if ('A' <= chara && chara <= 'Z') {
int id = chara - 'A';
++count[id... | #include <iostream>
using namespace std;
int main() {
const int size = 26;
int count[size]{};
char chara;
while (cin >> chara) {
if ('a' <= chara && chara <= 'z') {
int id = chara - 'a';
++count[id];
} else if ('A' <= chara && chara <= 'Z') {
int id = chara - 'A';
++count[id... | [["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 143 |
#include <cctype>
#include <cstdio>
#include <cstring>
using namespace std;
int main(void) {
char input;
int counter[26] = {};
int i, len, sum, idx;
while (scanf("%c", &input) != EOF) {
if (islower(input))
idx = input - 'a';
else if (isupper(input))
idx = input - 'A';
else
continu... | #include <cctype>
#include <cstdio>
#include <cstring>
using namespace std;
int main(void) {
char input;
int counter[26] = {};
int i, len, sum, idx;
while (scanf("%c", &input) != EOF) {
if (islower(input))
idx = input - 'a';
else if (isupper(input))
idx = input - 'A';
else
continu... | [["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 1 | 133 |
#include <cctype>
#include <iostream>
using namespace std;
int main() {
char ch;
int count[26] = {};
while (cin >> ch) {
if (islower(ch)) { // islower???ch????°?????????????ture?????????
count
[ch -
'a']++; //??¢?????????????????????a???z????????£?¶?????????¢??????????????????????... | #include <cctype>
#include <iostream>
using namespace std;
int main() {
char ch;
int count[26] = {};
while (cin >> ch) {
if (islower(ch)) { // islower???ch????°?????????????ture?????????
count
[ch -
'a']++; //??¢?????????????????????a???z????????£?¶?????????¢??????????????????????... | [["-", 0, 16, 31, 16, 31, 16, 12, 103, 0, 104], ["-", 0, 16, 31, 16, 31, 16, 12, 103, 0, 125], ["-", 31, 16, 31, 16, 12, 103, 0, 42, 0, 102], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 62], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 119 |
#include <cctype>
#include <cstdio>
#include <iostream>
#include <string>
using namespace std;
int main() {
char ch;
int cnt[26] = {0};
while (cin >> ch) {
if (islower(ch)) {
int num = ch - 'a';
cnt[num]++;
} else if (isupper(ch)) {
int num = ch - 'A';
cnt[num]++;
}
}
fo... | #include <cctype>
#include <cstdio>
#include <iostream>
#include <string>
using namespace std;
int main() {
char ch;
int cnt[26] = {0};
while (cin >> ch) {
if (islower(ch)) {
int num = ch - 'a';
cnt[num]++;
} else if (isupper(ch)) {
int num = ch - 'A';
cnt[num]++;
}
}
fo... | [["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 129 |
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int alphabets[128], index;
char ch;
for (int i = 0; i < 128; i++) {
alphabets[i] = 0;
}
while (cin >> ch) {
if (ch == '.')
break;
if (!!isalpha(ch))
continue;
if (isupper(ch))
ch = tolower(ch);
in... | #include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int alphabets[128], index;
char ch;
for (int i = 0; i < 128; i++) {
alphabets[i] = 0;
}
while (cin >> ch) {
if (ch == '\0')
break;
if (!isalpha(ch))
continue;
if (isupper(ch))
ch = tolower(ch);
in... | [["-", 0, 57, 15, 339, 51, 16, 12, 103, 0, 125], ["+", 0, 57, 15, 339, 51, 16, 12, 103, 0, 44], ["-", 8, 9, 0, 57, 15, 339, 51, 91, 17, 111]] | 1 | 154 |
#include <cctype>
#include <iostream>
using namespace std;
int main() {
char ch;
int count[26] = {0};
int i;
while (cin >> ch) {
count[tolower(ch) - 'a']++;
}
for (i = 0; i < 26; i++) {
cout << (char)(i + 'a') << ":" << count[i] << endl;
}
return 0;
} | #include <cctype>
#include <iostream>
using namespace std;
int main() {
char ch;
int count[26] = {0};
int i;
while (cin >> ch) {
count[tolower(ch) - 'a']++;
}
for (i = 0; i < 26; i++) {
cout << (char)(i + 'a') << " : " << count[i] << endl;
}
return 0;
} | [["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 93 |
#include <stdio.h>
#include <string.h>
char a[2000];
long long int s[27], d, f, g, h, j, i;
int main(void) {
for (i = 1; i <= 26; i++)
s[i] = 0;
while ((scanf("%c", &a[1])) != EOF) {
// d=strlen(a);
/* for(i=0;i<=d+1;i++)
printf("%c\n",a[i]);*/
// for(i=0;i<=d;i++){
if (a[1] ... | #include <stdio.h>
#include <string.h>
char a[2000];
long long int s[27], d, f, g, h, j, i;
int main(void) {
for (i = 1; i <= 26; i++)
s[i] = 0;
while ((scanf("%c", &a[1])) != EOF) {
// d=strlen(a);
/* for(i=0;i<=d+1;i++)
printf("%c\n",a[i]);*/
// for(i=0;i<=d;i++){
if (a[1] ... | [["-", 64, 1, 0, 11, 31, 69, 341, 342, 0, 22], ["+", 64, 1, 0, 11, 31, 69, 341, 342, 0, 13]] | 1 | 487 |
#include <iostream>
#include <map>
#include <string>
using namespace std;
int main() {
map<char, int> data;
for (auto c = 'a'; c <= 'z'; c++) {
data[c] = 0;
}
string str;
while (cin >> str) {
for (string::iterator it = str.begin(); str.end() != it; ++it) {
char c = *it;
if (c >= 'A' && c <... | #include <iostream>
#include <map>
#include <string>
using namespace std;
int main() {
map<char, int> data;
for (auto c = 'a'; c <= 'z'; c++) {
data[c] = 0;
}
string str;
while (cin >> str) {
for (string::iterator it = str.begin(); str.end() != it; ++it) {
char c = *it;
if (c >= 'A' && c <... | [["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 192 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string input;
while (1) {
string tmp;
getline(cin, tmp);
input += tmp;
if (cin.eof()) {
break;
}
}
for (int i = 0; i < input.length(); i++) {
if ('A' <= input[i] && input[i] <= 'Z') {
input[i] = input[i]... | #include <iostream>
#include <string>
using namespace std;
int main() {
string input;
while (1) {
string tmp;
getline(cin, tmp);
input += tmp;
if (cin.eof()) {
break;
}
}
for (int i = 0; i < input.length(); i++) {
if ('A' <= input[i] && input[i] <= 'Z') {
input[i] = input[i]... | [["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 184 |
#include <iostream>
using namespace std;
int main() {
string in;
int alp[26] = {}, i;
while (cin >> in) {
for (i = 0; i < in.size(); i++) {
if ('a' <= in[i] && in[i] <= 'z')
alp[in[i] - 'a']++;
if ('A' <= in[i] && in[i] <= 'Z')
alp[in[i] - 'A']++;
}
}
for (i = 0; i < 26; i+... | #include <iostream>
using namespace std;
int main() {
string in;
int alp[26] = {}, i;
while (cin >> in) {
for (i = 0; i < in.size(); i++) {
if ('a' <= in[i] && in[i] <= 'z')
alp[in[i] - 'a']++;
if ('A' <= in[i] && in[i] <= 'Z')
alp[in[i] - 'A']++;
}
}
for (i = 0; i < 26; i+... | [["+", 31, 16, 31, 16, 12, 74, 39, 77, 39, 40], ["+", 31, 16, 31, 16, 31, 16, 12, 74, 0, 25], ["+", 31, 16, 31, 16, 12, 74, 51, 23, 0, 24]] | 1 | 158 |
#include <iostream>
using namespace std;
int main() {
char ch;
int counter[26];
for (int i = 0; i < 26; i++)
counter[i] = 0;
while (cin >> ch) {
int num = ch - 'a';
counter[num]++;
}
for (int i = 0; i < 26; i++) {
ch = i + 'a';
cout << ch << " : " << counter[i] << endl;
}
return 0;
... | #include <iostream>
using namespace std;
int main() {
char ch;
int counter[26];
for (int i = 0; i < 26; i++)
counter[i] = 0;
while (cin >> ch) {
int num = tolower(ch) - 'a';
counter[num]++;
}
for (int i = 0; i < 26; i++) {
ch = i + 'a';
cout << ch << " : " << counter[i] << endl;
}
r... | [["+", 0, 43, 49, 50, 51, 16, 31, 2, 63, 22], ["+", 49, 50, 51, 16, 31, 2, 3, 4, 0, 24], ["+", 49, 50, 51, 16, 31, 2, 3, 4, 0, 25]] | 1 | 107 |
package main
import (
"fmt"
"bufio"
"os"
"strings"
)
func craetea2z() string {
alphabet := make([]rune, 0)
for cur := []rune("a"); ; cur[0] += 1 {
alphabet = append(alphabet, cur[0])
if string(cur[0]) == "z" {
break
}
}
return string(alphabet)
}
var alphabetmap map[string]int
func main() {
alphabet... | package main
import (
"fmt"
"bufio"
"os"
"strings"
)
func craetea2z() string {
alphabet := make([]rune, 0)
for cur := []rune("a"); ; cur[0] += 1 {
alphabet = append(alphabet, cur[0])
if string(cur[0]) == "z" {
break
}
}
return string(alphabet)
}
var alphabetmap map[string]int
func main() {
alphabet... | [["-", 8, 196, 0, 1, 0, 2, 3, 4, 0, 429], ["-", 0, 1, 0, 2, 3, 4, 0, 429, 0, 44], ["+", 8, 196, 0, 1, 0, 2, 3, 4, 0, 429], ["+", 0, 1, 0, 2, 3, 4, 0, 429, 0, 44]] | 7 | 266 |
<?php
$S=trim(fgets(STDIN));
$P=trim(fgets(STDIN));
$Sl=strlen($S);
$Pl=strlen($P);
$p=$P[0];
$S.=$S;
$F=0;
for($i=0;$i<$Sl;$i++){
if($S[$i]!=$p) continue;
$f=1;
for($j=1;$j<$Pl;$j++) if($S[$i+$j]!=$P[$j]){$f=0;break;}
if($l){$F=1;break;}
}
echo ($F)?'Yes':'No';
?> | <?php
$S=trim(fgets(STDIN));
$P=trim(fgets(STDIN));
$Sl=strlen($S);
$Pl=strlen($P);
$p=$P[0];
$S.=$S;
$F=0;
for($i=0;$i<$Sl;$i++){
if($S[$i]!=$p) continue;
$f=1;
for($j=1;$j<$Pl;$j++) if($S[$i+$j]!=$P[$j]){$f=0;break;}
if($f){$F=1;break;}
}
echo ($F)?'Yes':'No';
?> | [["-", 0, 9, 0, 57, 15, 23, 0, 606, 0, 141], ["+", 0, 9, 0, 57, 15, 23, 0, 606, 0, 141]] | 6 | 173 |
<?php
$inArray = [];
while (!feof(STDIN) ) {
$inArray[] = trim(fgets(STDIN));
}
$baseStr = $inArray[0].$inArray[0];
if(strpos($baseStr, $inArray[1]) == FALSE){
echo "Yes\n";
} else {
echo "No\n";
}
?>
| <?php
$inArray = [];
while (!feof(STDIN) ) {
$inArray[] = trim(fgets(STDIN));
}
$baseStr = $inArray[0].$inArray[0];
if(strpos($baseStr, $inArray[1]) === FALSE){
echo "No\n";
} else {
echo "Yes\n";
}
?>
| [["-", 0, 493, 0, 57, 15, 23, 0, 16, 17, 60], ["+", 0, 493, 0, 57, 15, 23, 0, 16, 17, 565], ["-", 0, 57, 8, 9, 0, 608, 0, 609, 0, 610], ["+", 0, 57, 8, 9, 0, 608, 0, 609, 0, 610], ["-", 75, 76, 8, 9, 0, 608, 0, 609, 0, 610], ["+", 75, 76, 8, 9, 0, 608, 0, 609, 0, 610]] | 6 | 79 |
import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String s = scan.next();
String p = scan.next();
int m = s.length();
for (int i = 0; i < m; i++) {
if (s.charAt(i) == p.charAt(0)) {
int j;
for (j = 0; j <... | import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String s = scan.next();
String p = scan.next();
int m = s.length();
for (int i = 0; i < m; i++) {
if (s.charAt(i) == p.charAt(0)) {
int j;
for (j = 0; j <... | [["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491]] | 3 | 177 |
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str = br.readLine();
String b ... | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str = br.readLine();
String b ... | [["-", 0, 492, 3, 4, 0, 510, 64, 5, 0, 491], ["+", 0, 492, 3, 4, 0, 510, 64, 5, 0, 491], ["-", 0, 492, 3, 4, 0, 510, 75, 5, 0, 491], ["+", 0, 492, 3, 4, 0, 510, 75, 5, 0, 491]] | 3 | 135 |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String s = null;
String p = null;
int flag = 0;
tr... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String s = null;
String p = null;
int flag = 0;
tr... | [["-", 64, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 64, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["-", 75, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 75, 1, 0, 492, 3, 4, 0, 5, 0, 491]] | 3 | 206 |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.next();
String p = sc.next();
String c;
int flag = 0;
for (int i = 0; i < s.length(); i++) {
if (i + p.length() <= s.length()) {
c = s.substring... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.next();
String p = sc.next();
String c;
int flag = 0;
for (int i = 0; i < s.length(); i++) {
if (i + p.length() <= s.length()) {
c = s.substring... | [["-", 12, 16, 31, 492, 3, 4, 0, 492, 500, 22], ["+", 12, 16, 31, 492, 3, 4, 0, 492, 500, 22]] | 3 | 207 |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
try {
String S = br.readLine();
String str = br.readLine();
... |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
try {
String S = br.readLine();
String str = br.readLine();
... | [["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491]] | 3 | 168 |
public class Main {
public static void main(String[] args) {
// ??????????????????????????????.
// ?????????????????????????????? 2 ??????????????????.
java.util.Scanner sc = new java.util.Scanner(System.in);
String s = sc.next();
String p = sc.next();
// ????????°??¶???????????? s ?????????... | public class Main {
public static void main(String[] args) {
java.util.Scanner sc = new java.util.Scanner(System.in);
String s = sc.next();
String p = sc.next();
boolean tf = false;
String x = "";
for (int i = 0; i < s.length(); i++) {
x = "";
for (int j = 0; j < p.length(); j++)... | [["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491]] | 3 | 180 |
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 s = "";
String p = "";
try {
s = in.readLine();
p = i... | 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 s = "";
String p = "";
try {
s = in.readLine();
p = i... | [["-", 64, 1, 0, 11, 12, 16, 12, 492, 500, 22], ["+", 64, 1, 0, 11, 12, 16, 12, 492, 500, 22]] | 3 | 245 |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String first = scan.nextLine();
String fRep = first + first;
String second = scan.nextLine();
boolean flg = false;
for (int i = 0; i < fRep.length(); i++) {
String s... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String first = scan.nextLine();
String fRep = first + first;
String second = scan.nextLine();
boolean flg = false;
for (int i = 0; i < fRep.length() - second.length(); i++... | [["+", 8, 196, 0, 7, 15, 16, 12, 16, 17, 33], ["+", 0, 7, 15, 16, 12, 16, 12, 492, 500, 22], ["+", 0, 7, 15, 16, 12, 16, 12, 492, 0, 131], ["+", 0, 7, 15, 16, 12, 16, 12, 492, 141, 22], ["+", 15, 16, 12, 16, 12, 492, 3, 4, 0, 24], ["+", 15, 16, 12, 16, 12, 492, 3, 4, 0, 25]] | 3 | 139 |
import java.util.*;
public class Main {
private static final Scanner scan = new Scanner(System.in);
public static void main(String[] args) {
String s = scan.next();
String ss = s + s;
String p = scan.next();
boolean flag = false;
for (int i = 0; i < ss.length(); i++) {
String div = ss.su... | import java.util.*;
public class Main {
private static final Scanner scan = new Scanner(System.in);
public static void main(String[] args) {
String s = scan.next();
String ss = s + s;
String p = scan.next();
boolean flag = false;
for (int i = 0; i < ss.length() - p.length(); i++) {
Strin... | [["+", 8, 196, 0, 7, 15, 16, 12, 16, 17, 33], ["+", 0, 7, 15, 16, 12, 16, 12, 492, 500, 22], ["+", 0, 7, 15, 16, 12, 16, 12, 492, 0, 131], ["+", 0, 7, 15, 16, 12, 16, 12, 492, 141, 22], ["+", 15, 16, 12, 16, 12, 492, 3, 4, 0, 24], ["+", 15, 16, 12, 16, 12, 492, 3, 4, 0, 25]] | 3 | 140 |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String word = br.readLine();
word = word + word;
Stri... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String word = br.readLine();
word = word + word;
Stri... | [["+", 8, 196, 0, 57, 15, 15, 0, 16, 17, 106], ["+", 0, 57, 15, 15, 0, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 15, 0, 16, 12, 16, 17, 60], ["+", 15, 15, 0, 16, 12, 16, 12, 91, 17, 33], ["+", 15, 15, 0, 16, 12, 16, 12, 91, 439, 499]] | 3 | 213 |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String word = br.readLine();
String key = br.readLine();
... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String word = br.readLine();
String key = br.readLine();
... | [["+", 0, 503, 49, 200, 51, 16, 31, 16, 17, 85], ["+", 0, 503, 49, 200, 51, 16, 31, 16, 12, 499]] | 3 | 340 |
import java.util.Scanner;
public class Main {
private static Scanner sc = new Scanner(System.in);
private static String s = sc.nextLine();
private static String p = sc.nextLine();
private static String str = s + s;
private static boolean possible = false;
public static void main(String[] args) {
for (i... | import java.util.Scanner;
public class Main {
private static Scanner sc = new Scanner(System.in);
private static String s = sc.nextLine();
private static String p = sc.nextLine();
private static String str = s + s;
private static boolean possible = false;
public static void main(String[] args) {
for (i... | [["-", 49, 200, 51, 492, 3, 4, 0, 16, 17, 33], ["-", 49, 200, 51, 492, 3, 4, 0, 16, 12, 499]] | 3 | 157 |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String s[], p[], str1, str2 = "";
boolean flag = false;
try {
s = b... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String s[], p[], str1, str2 = "";
boolean flag = false;
try {
s = b... | [["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491]] | 3 | 267 |
import java.io.*;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str1;
String str2;
str1 = br.readLine();
str1 += str1;
str2 = br.readLine();
if (str1.indexOf(str2) == -1) ... | import java.io.*;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str1;
String str2;
str1 = br.readLine();
str1 += str1;
str2 = br.readLine();
if (str1.indexOf(str2) == -1) ... | [["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491]] | 3 | 106 |
import java.util.*;
class Main {
public static void main(String[] args) {
int top = 0;
boolean flag = false;
Scanner sc = new Scanner(System.in);
String s1 = sc.nextLine();
String s = s1 + s1;
String p = sc.nextLine();
for (int i = 0; i < s.length(); i++) {
if (p.equals(s.substrin... | import java.util.*;
class Main {
public static void main(String[] args) {
int top = 0;
boolean flag = false;
Scanner sc = new Scanner(System.in);
String s1 = sc.nextLine();
String s = s1 + s1;
String p = sc.nextLine();
for (int i = 0; i < s1.length(); i++) {
if (p.equals(s.substri... | [["-", 8, 196, 0, 7, 15, 16, 12, 492, 500, 22], ["+", 8, 196, 0, 7, 15, 16, 12, 492, 500, 22]] | 3 | 153 |
// http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP1_8_D
#include <cstdio>
#include <deque>
#include <iostream>
#include <string>
using namespace std;
void change(const string &input, const unsigned int &dif, string &output) {
if (dif >= input.size()) {
// cerr << "invalid input" << endl;
}
int s... | // http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP1_8_D
#include <cstdio>
#include <deque>
#include <iostream>
#include <string>
using namespace std;
void change(const string &input, const unsigned int &dif, string &output) {
if (dif >= input.size()) {
// cerr << "invalid input" << endl;
}
int s... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 202 |
#include <bits/stdc++.h>
#define FOR(i, n) for (int i = 0; i < (int)(n); i++)
#define FORR(i, m, n) for (int i = (int)(m); i < (int)(n); i++)
#define ZERO(a) memset(a, 0, sizeof(a))
using namespace std;
typedef signed long long ll;
void solve() {
string s, p;
cin >> s >> p;
s = s + s;
FOR(i, s.length() - p.len... | #include <bits/stdc++.h>
#define FOR(i, n) for (int i = 0; i < (int)(n); i++)
#define FORR(i, m, n) for (int i = (int)(m); i < (int)(n); i++)
#define ZERO(a) memset(a, 0, sizeof(a))
using namespace std;
typedef signed long long ll;
void solve() {
string s, p;
cin >> s >> p;
s = s + s;
FOR(i, s.length() - p.len... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 128 |
#include <iostream>
#include <string>
using namespace std;
int main() {
int a;
string p, s;
cin >> p >> s;
p += p;
a = p.find(s);
if (a == 1)
cout << "Yes" << endl;
else
cout << "No" << endl;
} | #include <iostream>
#include <string>
using namespace std;
int main() {
int a;
string p, s;
cin >> p >> s;
p += p;
a = p.find(s);
if (a == -1)
cout << "No" << endl;
else
cout << "Yes" << endl;
} | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 64 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string s, p;
cin >> s >> p;
cout << ((s.find(p) != string::npos) ? "Yes" : "No") << "\n";
} | #include <iostream>
#include <string>
using namespace std;
int main() {
string s, p;
cin >> s >> p;
s += s;
cout << ((s.find(p) != string::npos) ? "Yes" : "No") << "\n";
} | [["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 107], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 54 |
#include <cstdio>
#include <cstring>
int main() {
char s[201], t[101], p[101];
scanf("%s %s", s, p);
strcpy(t, s);
strcat(s, t);
if (strstr(s, p) == NULL)
printf(" no\n");
else
printf("Yes\n");
return 0;
} | #include <cstdio>
#include <cstring>
int main() {
char s[201], t[101], p[101];
scanf("%s %s", s, p);
strcpy(t, s);
strcat(s, t);
if (strstr(s, p) == NULL)
printf("No\n");
else
printf("Yes\n");
return 0;
} | [["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 82 |
#include <iostream>
#include <string.h>
#include <string>
using namespace std;
int main(void) {
string a, b;
cin >> a >> b;
a += a;
if (a.find("b") != string::npos) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
return 0;
} | #include <iostream>
#include <string.h>
#include <string>
using namespace std;
int main(void) {
string a, b;
cin >> a >> b;
a += a;
if (a.find(b) != string::npos) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
return 0;
} | [["-", 51, 16, 31, 2, 3, 4, 0, 5, 0, 62]] | 1 | 71 |
#include <bits/stdc++.h>
using namespace std;
signed main() {
string a, b;
cin >> a >> b;
a += a;
bool s = false;
for (int c = 0; c < a.length() / 2 + 1; c++) {
for (int d = 0; d < b.length(); d++) {
if (a[d] != b[c + d])
break;
if (b.length() - 1 == d)
s = true;
}
}
i... | #include <bits/stdc++.h>
using namespace std;
signed main() {
string a, b;
cin >> a >> b;
a += a;
bool s = false;
for (int c = 0; c < a.length() / 2 + 5; c++) {
for (int d = 0; d < b.length(); d++) {
if (a[c + d] != b[d])
break;
if (b.length() - 1 == d)
s = true;
}
}
i... | [["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13], ["+", 51, 16, 31, 69, 341, 342, 0, 16, 31, 22], ["+", 51, 16, 31, 69, 341, 342, 0, 16, 17, 72], ["-", 51, 16, 12, 69, 341, 342, 0, 16, 31, 22], ["-", 51, 16, 12, 69, 341, 342, 0, 16, 17, 72]] | 1 | 129 |
#include <iostream>
#include <string>
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
string s, p;
cin >> s >> p;
s = s + s.substr(0, p.size());
if (s.find(p))
cout << "Yes\n";
else
cout << "No\n";
} | #include <iostream>
#include <string>
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
string s, p;
cin >> s >> p;
s = s + s.substr(0, p.size());
if (s.find(p) != string::npos)
cout << "Yes\n";
else
cout << "No\n";
} | [["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79], ["+", 0, 57, 15, 339, 51, 16, 12, 343, 345, 348], ["+", 0, 57, 15, 339, 51, 16, 12, 343, 0, 349], ["+", 0, 57, 15, 339, 51, 16, 12, 343, 141, 22]] | 1 | 80 |
#include <iostream>
using namespace std;
int main() {
char s[201];
char p[101];
cin.getline(s, 101);
cin.getline(p, 101);
int ns = 0, np = 0;
for (int i = 0; s[i]; i++)
ns++;
for (int i = 0; p[i]; i++)
np++;
for (int i = ns; i < 2 * ns; i++)
s[i] = s[i - ns];
s[2 * ns] = '\0';
int i, j;... | #include <iostream>
using namespace std;
int main() {
char s[201];
char p[101];
cin.getline(s, 101);
cin.getline(p, 101);
int ns = 0, np = 0;
for (int i = 0; s[i]; i++)
ns++;
for (int i = 0; p[i]; i++)
np++;
for (int i = ns; i < 2 * ns; i++)
s[i] = s[i - ns];
s[2 * ns] = '\0';
int i, j;... | [["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 33], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 22]] | 1 | 213 |
#include <stdio.h>
#include <string.h>
int main() {
char str_s[128], str_p[128];
int i, j, c, n, m;
scanf("%s", str_s);
scanf("%s", str_p);
n = strlen(str_s);
m = strlen(str_p);
for (i = 0; i < n; i++) {
c = 0;
for (j = 0; j < m; j++) {
if (i + j < n - 2) {
if (str_s[i + j] != str_p... | #include <stdio.h>
#include <string.h>
int main() {
char str_s[128], str_p[128];
int i, j, c, n, m;
scanf("%s", str_s);
scanf("%s", str_p);
n = strlen(str_s);
m = strlen(str_p);
for (i = 0; i < n; i++) {
c = 0;
for (j = 0; j < m; j++) {
if (i + j <= n - 1) {
if (str_s[i + j] != str_... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 192 |
#include <bits/stdc++.h>
using namespace std;
typedef vector<int> vi;
typedef vector<vector<int>> vii;
typedef vector<string> vs;
#define ifr(i, n) for ((i) = 0; (i) < (n); i++)
#define dfr(i, n) for ((i) = (n); (i) >= 0; i--)
int main() {
string str;
cin >> str;
str += str;
string search;
cin >> search;
fo... | #include <bits/stdc++.h>
using namespace std;
typedef vector<int> vi;
typedef vector<vector<int>> vii;
typedef vector<string> vs;
#define ifr(i, n) for ((i) = 0; (i) < (n); i++)
#define dfr(i, n) for ((i) = (n); (i) >= 0; i--)
int main() {
string str;
cin >> str;
str += str;
string search;
cin >> search;
fo... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 33], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 33], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13], ["-", 0, 7, 8, 9, 0, 57, 64, 1, 0, 35]] | 1 | 143 |
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <string>
using namespace std;
int main() {
string ch, x;
int a = 0;
cin >> ch;
cin >> x;
for (int i = 0; i < x.size(); i++) {
if (ch[i] == x[0]) {
for (int j = 0; j < x.size(); j++) {
int ss = i + j;
if (ss >= ch.size... | #include <iostream>
#include <math.h>
#include <stdio.h>
#include <string>
using namespace std;
int main() {
string ch, x;
int a = 0;
cin >> ch;
cin >> x;
for (int i = 0; i < ch.size() && a == 0; i++) {
if (ch[i] == x[0]) {
for (int j = 0; j < x.size(); j++) {
int ss = i + j;
if (ss... | [["-", 0, 7, 15, 16, 12, 2, 63, 118, 28, 22], ["+", 15, 16, 31, 16, 12, 2, 63, 118, 28, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 98], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 31, 22], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 60], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 175 |
#include <iostream>
using namespace std;
#include <stdio.h>
int main() {
char p[100], s[100];
int pl, sl, i, j, r, sum;
r = 0;
for (sl = 0; sl < 100; sl++) {
scanf("%c", &s[sl]);
if (s[sl] == '\n')
break;
}
for (pl = 0; pl < 100; pl++) {
scanf("%c", &p[pl]);
if (p[pl] == '\n')
b... | #include <iostream>
using namespace std;
#include <stdio.h>
int main() {
char p[101], s[101];
int pl, sl, i, j, r, sum;
r = 0;
for (sl = 0; sl < 101; sl++) {
scanf("%c", &s[sl]);
if (s[sl] == '\n')
break;
}
for (pl = 0; pl < 101; pl++) {
scanf("%c", &p[pl]);
if (p[pl] == '\n')
b... | [["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 33], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 212 |
#include <iostream>
#include <stdio.h>
#include <string>
using namespace std;
int main() {
string a, b;
cin >> a;
cin >> b;
a += a;
if (a.find(b)) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
} | #include <iostream>
#include <stdio.h>
#include <string>
using namespace std;
int main() {
string a, b;
cin >> a;
cin >> b;
a += a;
if (a.find(b) != string::npos) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
} | [["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79], ["+", 0, 57, 15, 339, 51, 16, 12, 343, 345, 348], ["+", 0, 57, 15, 339, 51, 16, 12, 343, 0, 349], ["+", 0, 57, 15, 339, 51, 16, 12, 343, 141, 22]] | 1 | 63 |
#include <cstdio>
#include <cstring>
int main(void) {
char a[210];
int b;
char c[110];
int d;
int z;
for (int i = 0; i < 210; i++)
a[i] = 0;
for (int i = 0; i < 110; i++)
c[i] = 0;
scanf("%s", a);
scanf("%s", c);
b = strlen(a);
d = strlen(c);
for (int i = 0; i < b; i++)
a[b + i] = a[... | #include <cstdio>
#include <cstring>
int main(void) {
char a[210];
int b;
char c[110];
int d;
int z;
for (int i = 0; i < 210; i++)
a[i] = 0;
for (int i = 0; i < 110; i++)
c[i] = 0;
scanf("%s", a);
scanf("%s", c);
b = strlen(a);
d = strlen(c);
for (int i = 0; i < b; i++)
a[b + i] = a[... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 64, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["-", 64, 9, 0, 1, 0, 2, 3, 4, 0, 22]] | 1 | 222 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string str_s, str_p;
int i, j;
bool able = false;
getline(cin, str_s);
getline(cin, str_p);
for (i = 0; i < (int)str_p.length() - 1; ++i) {
str_s += str_s[i];
}
for (i = 0; i < (int)str_s.length() - (int)str_p.length(); ++i) {
... | //============================================================================
// Name : ITP_1_8_D.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#include ... | [["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79]] | 1 | 183 |
#include <cstdio>
#include <cstring>
using namespace std;
int main() {
char p[202], s[101], search[101];
scanf("%s %s", p, s);
strcpy(search, p);
strcat(p, search);
if (strstr(p, search))
printf("Yes\n");
else
printf("No\n");
return 0;
} | #include <cstdio>
#include <cstring>
using namespace std;
int main() {
char p[202], s[101], ch[101];
scanf("%s %s", p, s);
strcpy(ch, p);
strcat(p, ch);
if (strstr(p, s))
printf("Yes\n");
else
printf("No\n");
return 0;
} | [["-", 0, 14, 8, 9, 0, 43, 49, 80, 49, 22], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 49, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["-", 0, 57, 15, 339, 51, 2, 3, 4, 0, 22], ["+", 0, 57, 15, 339, 51, 2, 3, 4, 0, 22]] | 1 | 84 |
#include <algorithm>
#include <cstdlib>
#include <ctype.h>
#include <functional>
#include <iostream>
#include <numeric>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
int main() {
string s, p;
cin >> s;
cin >> p;
s += s;
if (s.find(s) == string::npos)
cout << "No" << endl... | #include <algorithm>
#include <cstdlib>
#include <ctype.h>
#include <functional>
#include <iostream>
#include <numeric>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
int main() {
string s, p;
cin >> s;
cin >> p;
s += s;
if (s.find(p) == string::npos)
cout << "No" << endl... | [["-", 15, 339, 51, 16, 31, 2, 3, 4, 0, 22], ["+", 15, 339, 51, 16, 31, 2, 3, 4, 0, 22]] | 1 | 78 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string a, b;
getline(cin, a);
cin >> b;
a = a + a;
if (a.find(b) != 0) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string a, b;
getline(cin, a);
cin >> b;
a = a + a;
if (a.find(b) == -1) {
cout << "No" << endl;
} else {
cout << "Yes" << endl;
}
return 0;
} | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 69 |
#include <iostream>
#include <string>
#include <vector>
using namespace std;
bool find(string s, string p) {
for (int i = 0; i < s.size(); ++i) {
for (int j = 0; j < p.size(); ++j) {
if (i + j >= s.size() && s[i + j] != p[j])
break;
if (j == p.size() - 1)
return true;
}
}
ret... | #include <iostream>
#include <string>
#include <vector>
using namespace std;
bool find(string s, string p) {
for (int i = 0; i < s.size(); ++i) {
for (int j = 0; j < p.size(); ++j) {
if (i + j >= s.size() || s[i + j] != p[j])
break;
if (j == p.size() - 1)
return true;
}
}
ret... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106]] | 1 | 163 |
#include <iostream>
#include <string>
using namespace std;
int main(int argc, char **argv) {
string str, str2;
cin >> str;
str += str;
cin >> str2;
if (str.find(str2))
cout << "Yes" << endl;
else
cout << "No" << endl;
return 0;
} | #include <iostream>
#include <string>
using namespace std;
int main(int argc, char **argv) {
string str, str2;
cin >> str;
str += str;
cin >> str2;
if (str.find(str2) != string::npos)
cout << "Yes" << endl;
else
cout << "No" << endl;
return 0;
} | [["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79], ["+", 0, 57, 15, 339, 51, 16, 12, 343, 345, 348], ["+", 0, 57, 15, 339, 51, 16, 12, 343, 0, 349], ["+", 0, 57, 15, 339, 51, 16, 12, 343, 141, 22]] | 1 | 67 |
#include <iostream>
#include <string>
using namespace std;
int main(int argc, char const *argv[]) {
string s, p;
cin >> s >> p;
s.append(s);
if (s.find(p) != string::npos)
cout << "Yes" << endl;
else
cout << "Yes" << endl;
return 0;
} | #include <iostream>
#include <string>
using namespace std;
int main(int argc, char const *argv[]) {
string s, p;
cin >> s >> p;
s.append(s);
if (s.find(p) != string::npos)
cout << "Yes" << endl;
else
cout << "No" << endl;
return 0;
} | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 74 |
#include <stdio.h>
#include <string.h>
int main() {
char s[100], p[100], r[200];
scanf("%s", s);
scanf("%s", p);
strcpy(r, s);
strcpy(r, s);
if (strstr(r, p)) {
printf("Yes\n");
} else {
printf("No\n");
}
return 0;
} | #include <stdio.h>
#include <string.h>
int main() {
char s[100], p[100], r[200];
scanf("%s", s);
scanf("%s", p);
strcpy(r, s);
strcat(r, s);
if (strstr(r, p)) {
printf("Yes\n");
} else {
printf("No\n");
}
return 0;
} | [["-", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22]] | 1 | 91 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string s;
string p;
cin >> s >> p;
string s2 = s + s;
cout << (s2.find(p) == string::npos ? "NO" : "YES") << endl;
return 0;
} | #include <iostream>
#include <string>
using namespace std;
int main() {
string s;
string p;
cin >> s >> p;
string s2 = s + s;
cout << (s2.find(p) == string::npos ? "No" : "Yes") << endl;
return 0;
} | [["-", 31, 16, 12, 23, 0, 41, 64, 5, 0, 6], ["+", 31, 16, 12, 23, 0, 41, 64, 5, 0, 6], ["-", 31, 16, 12, 23, 0, 41, 75, 5, 0, 6], ["+", 31, 16, 12, 23, 0, 41, 75, 5, 0, 6]] | 1 | 61 |
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <vector>
using namespace std;
int main() {
string s, p;
cin >> s >> p;
s = s + s;
if (s.find(p) != 0) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
return 0;
} | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <vector>
using namespace std;
int main() {
string s, p;
cin >> s >> p;
s = s + s;
if (s.find(p) != -1) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
return 0;
}
| [["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 74 |
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
void StrCat(char *p, int num) {
for (int i = 0; i < num; i++) {
*(p + num) = *p;
++p;
}
}
int main() {
char s[200] = {};
char p[100];
int count[100] = {0};
cin >> s >> p;
StrCat(s, strlen(s));
if (strstr(s, p) != NULL... | #include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
void StrCat(char *p, int num) {
for (int i = 0; i < num; i++) {
*(p + num) = *p;
++p;
}
}
int main() {
char s[200] = {};
char p[100];
int count[100] = {0};
cin >> s >> p;
StrCat(s, strlen(s));
if (strstr(s, p) != NULL... | [["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 129 |
#include <stdio.h>
#include <string.h>
int main(void) {
char S[202] = {0}, s[100] = {0}, p[100] = {0};
scanf("%s", s);
scanf("%s", p);
strcpy(S, s);
strcat(S, s); //??????????????£???
if (strstr(s, p))
printf("Yes\n");
else
printf("No\n");
} | #include <stdio.h>
#include <string.h>
int main(void) {
char S[202] = {0}, s[100] = {0}, p[100] = {0};
scanf("%s", s);
scanf("%s", p);
strcpy(S, s);
strcat(S, s); //??????????????£???
if (strstr(S, p))
printf("Yes\n");
else
printf("No\n");
} | [["-", 0, 57, 15, 339, 51, 2, 3, 4, 0, 22], ["+", 0, 57, 15, 339, 51, 2, 3, 4, 0, 22]] | 1 | 98 |
#include <cstdlib>
#include <iostream>
#include <string>
using namespace std;
int main() {
string p, s_tmp, s;
int i, sum, count[27];
getline(cin, s_tmp);
s = s_tmp + s_tmp;
getline(cin, p);
if (s.find(p) != string::npos) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
return 0;... | #include <cstdlib>
#include <iostream>
#include <string>
using namespace std;
int main() {
string p, s_tmp, s;
int i, sum, count[27];
getline(cin, s_tmp);
s = s_tmp + s_tmp;
getline(cin, p);
if (s.find(p) != string::npos) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
return 0;... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 90 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string p, s;
cin >> p >> s;
p = p + p;
bool flag = false;
for (int i = 0; i < (int)p.size() - (int)s.size() + 1; i++) {
string t = p.substr(i, s.size());
if (t == s) {
flag = true;
break;
}
}
if (flag) {
cout <<... | #include <bits/stdc++.h>
using namespace std;
int main() {
string p, s;
cin >> p >> s;
p = p + p;
bool flag = false;
for (int i = 0; i < (int)p.size() - (int)s.size() + 1; i++) {
string t = p.substr(i, s.size());
if (t == s) {
flag = true;
break;
}
}
if (flag) {
cout <<... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 126 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string a, b;
cin >> a >> b;
a = a + b;
if (a.find(b) != -1)
cout << "Yes" << endl;
else
cout << "No" << endl;
return 0;
}
| #include <iostream>
#include <string>
using namespace std;
int main() {
string a, b;
cin >> a >> b;
a = a + a;
if (a.find(b) != -1)
cout << "Yes" << endl;
else
cout << "No" << endl;
return 0;
}
| [["-", 8, 9, 0, 1, 0, 11, 12, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 22]] | 1 | 62 |
#include <iostream>
#include <string>
using namespace std;
int main() {
int i, count = 0;
string s, p;
cin >> s >> p;
s = s + s;
for (i = 0; i < s.size() - p.size(); i++)
if (p == s.substr(i, i + p.size())) {
cout << "Yes\n";
count++;
}
if (count == 0)
cout << "No\n";
} | #include <iostream>
#include <string>
using namespace std;
int main() {
int i, count = 0;
string s, p;
cin >> s >> p;
s = s + s;
for (i = 0; i < s.size() - p.size(); i++)
if (p == s.substr(i, p.size())) {
cout << "Yes\n";
count++;
break;
}
if (count == 0)
cout << "No\n";
} | [["-", 51, 16, 12, 2, 3, 4, 0, 16, 31, 22], ["-", 51, 16, 12, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 7, 8, 57, 64, 9, 0, 1, 0, 35], ["+", 0, 7, 8, 57, 64, 9, 0, 93, 0, 94]] | 1 | 105 |
#include <stdio.h>
#include <string.h>
int main() {
char str1[200];
char key[100];
char str2[200];
scanf("%s%s", str1, key);
strcpy(str1, str2);
strcat(str1, str2);
if (strstr(str1, key) == NULL)
printf("No\n");
else
printf("Yes\n");
}
| #include <stdio.h>
#include <string.h>
int main() {
char str1[200];
char key[100];
char str2[200];
scanf("%s%s", str1, key);
strcpy(str2, str1);
strcat(str1, str2);
if (strstr(str1, key) == NULL)
printf("No\n");
else
printf("Yes\n");
}
| [["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22]] | 0 | 81 |
#include <stdio.h>
#include <string.h>
int main(void) {
int i;
char s[4096], p[4096], s2[4096];
scanf("%s", s);
scanf("%s", p);
sprintf(s2, "%s%s", s, s);
if ((strstr(s2, p)) == NULL) {
printf("NO\n");
} else {
printf("YES\n");
}
return 0;
}
| #include <stdio.h>
#include <string.h>
int main(void) {
int i;
char s[4096], p[4096], s2[4096];
scanf("%s", s);
scanf("%s", p);
sprintf(s2, "%s%s", s, s);
if ((strstr(s2, p)) == NULL) {
printf("No\n");
} else {
printf("Yes\n");
}
return 0;
}
| [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 98 |
#include <iostream>
#include <string>
int main(int argc, char **argv) {
std::string s;
std::getline(std::cin, s);
std::string p;
std::getline(std::cin, p);
for (int si = 0; si < (int)s.size(); ++si) {
if (s[si] == p[0]) {
bool match = true;
for (int pi = 0; pi < (int)p.size() && match; ++pi... | #include <iostream>
#include <string>
int main(int argc, char **argv) {
std::string s;
std::getline(std::cin, s);
std::string p;
std::getline(std::cin, p);
for (int si = 0; si < (int)s.size(); ++si) {
if (s[si] == p[0]) {
bool match = true;
for (int pi = 0; pi < (int)p.size() && match; ++pi... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 179 |
#include <algorithm>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
typedef long long int ll;
typedef std::pair<int, int> pii;
typedef std::pair<ll, int> pli;
typ... | #include <algorithm>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
typedef long long int ll;
typedef std::pair<int, int> pii;
typedef std::pair<ll, int> pli;
typ... | [["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22]] | 1 | 217 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string s, p;
cin >> s >> p;
string n = s;
n += s;
if (n.find(p))
cout << "Yes" << endl;
else
cout << "No" << endl;
return 0;
}
| #include <iostream>
#include <string>
using namespace std;
int main() {
string s, p;
cin >> s >> p;
string n = s;
n += s;
if (n.find(p) != string::npos)
cout << "Yes" << endl;
else
cout << "No" << endl;
return 0;
}
| [["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79], ["+", 0, 57, 15, 339, 51, 16, 12, 343, 345, 348], ["+", 0, 57, 15, 339, 51, 16, 12, 343, 0, 349], ["+", 0, 57, 15, 339, 51, 16, 12, 343, 141, 22]] | 1 | 63 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string text;
cin >> text;
text += text;
string ma;
cin >> ma;
if (text.find(ma) == 0)
cout << "No" << endl;
else
cout << "Yes" << endl;
return 0;
}
| #include <iostream>
#include <string>
using namespace std;
int main() {
string text;
cin >> text;
text += text;
string ma;
cin >> ma;
if (text.find(ma) == string::npos)
cout << "No" << endl;
else
cout << "Yes" << endl;
return 0;
}
| [["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 12, 343, 345, 348], ["+", 0, 57, 15, 339, 51, 16, 12, 343, 0, 349], ["+", 0, 57, 15, 339, 51, 16, 12, 343, 141, 22]] | 1 | 63 |
#include <iostream>
using namespace std;
int main() {
string s;
cin >> s;
string t;
cin >> t;
string ss = s + s;
for (int i = 0; s.size() > i; i++) {
bool ok = true;
for (int j = 0; t.size() > j; j++) {
if (t[j] != ss[i + j]) {
ok = false;
break;
}
}
if (ok) {
... | #include <iostream>
using namespace std;
int main() {
string s;
cin >> s;
string t;
cin >> t;
string ss = s + s;
for (int i = 0; s.size() > i; i++) {
bool ok = true;
for (int j = 0; t.size() > j; j++) {
if (t[j] != ss[i + j]) {
ok = false;
break;
}
}
if (ok) {
... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 128 |
#include <cstdio>
#include <cstring>
int main() {
char s[201], p[101], s1[101];
scanf("%s %s", s, p);
strcpy(s1, s);
strcat(s, s1);
if (strstr(s, p) == NULL)
printf("No\n");
else
printf;
return 0;
}
| #include <cstdio>
#include <cstring>
int main() {
char s[201], p[101], s1[101];
scanf("%s %s", s, p);
strcpy(s1, s);
strcat(s, s1);
if (strstr(s, p) == NULL)
printf("No\n");
else
printf("Yes\n");
return 0;
}
| [["+", 75, 76, 0, 1, 0, 2, 3, 4, 0, 24], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 62], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44], ["+", 75, 76, 0, 1, 0, 2, 3, 4, 0, 25]] | 1 | 76 |
#include <cstdio>
#include <cstring>
using namespace std;
int main() {
char s[201], p[101];
char ch[101];
scanf("%s", s);
scanf("%s", p);
strcpy(ch, s);
strcat(s, ch);
if (strstr(ch, p) == NULL)
printf("No\n");
else
printf("Yes\n");
return 0;
}
| #include <cstdio>
#include <cstring>
using namespace std;
int main() {
char s[201], p[101];
char ch[101];
scanf("%s", s);
scanf("%s", p);
strcpy(ch, s);
strcat(s, ch);
if (strstr(s, p) == NULL)
printf("No\n");
else
printf("Yes\n");
return 0;
}
| [["-", 15, 339, 51, 16, 31, 2, 3, 4, 0, 22], ["+", 15, 339, 51, 16, 31, 2, 3, 4, 0, 22]] | 1 | 94 |
#include <iostream>
#include <stdio.h>
#include <string>
using namespace std;
int main() {
string s, p;
cin >> s >> p;
s = s + s;
if (s.find(p)) {
printf("Yes\n");
} else {
printf("No\n");
}
}
| #include <iostream>
#include <stdio.h>
#include <string>
using namespace std;
int main() {
string s, p;
cin >> s >> p;
s = s + s;
if (s.find(p) != -1) {
printf("Yes\n");
} else {
printf("No\n");
}
}
| [["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 63 |
#include <iostream>
using namespace std;
#include <cstring>
#include <stdio.h>
int main() {
char str1[201], str2[101];
scanf("%s", str1);
strcpy(str2, str1);
strcat(str1, str2);
char str3[101];
scanf("%s", str3);
if (strstr(str1, str2) == NULL)
printf("No\n");
else
printf("Yes\n");
return ... | #include <iostream>
using namespace std;
#include <cstring>
#include <stdio.h>
int main() {
char str1[201], str2[101];
scanf("%s", str1);
strcpy(str2, str1);
strcat(str1, str2);
char str3[101];
scanf("%s", str3);
if (strstr(str1, str3) == NULL)
printf("No\n");
else
printf("Yes\n");
return ... | [["-", 15, 339, 51, 16, 31, 2, 3, 4, 0, 22], ["+", 15, 339, 51, 16, 31, 2, 3, 4, 0, 22]] | 1 | 96 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.