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 |
|---|---|---|---|---|
S = input()
T = input()
print('Yes' if T[-1] not in S else 'No') | S = input()
T = input()
print('Yes' if T[:-1] == S else 'No') | [["+", 0, 41, 0, 666, 0, 206, 206, 663, 0, 102], ["-", 0, 652, 3, 4, 0, 41, 0, 666, 667, 699], ["+", 0, 652, 3, 4, 0, 41, 0, 666, 667, 60]] | 5 | 29 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s, t;
cin >> s >> t;
int l = s.size();
int a = 0;
for (int i = 0; i < l; i++) {
if (s.at(i) != t.at(i)) {
a = a++;
} else {
}
}
if (a == 0) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
return 0;... | #include <bits/stdc++.h>
using namespace std;
int main() {
string s, t;
cin >> s >> t;
int l = s.size();
int a = 0;
for (int i = 0; i < l; i++) {
if (s.at(i) != t.at(i)) {
a++;
} else {
}
}
if (a == 0) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
return 0;
} | [["-", 0, 57, 64, 9, 0, 1, 0, 11, 17, 32], ["-", 64, 9, 0, 1, 0, 11, 12, 27, 28, 22]] | 1 | 109 |
s= str(input())
t = str(input())
s = list(s)
t = list(t)
a=0
for i in range(len(s)-1):
if s[i]==t[i]:
a = a+1
if a == len(s)-1:
if len(t)-len(s)==1:
print("Yes")
else:
print("No")
else:
print("No") | s= str(input())
t = str(input())
s = list(s)
t = list(t)
a=0
for i in range(len(s)):
if s[i]==t[i]:
a = a+1
if a == len(s):
if len(t)-len(s)==1:
print("Yes")
else:
print("No")
else:
print("No") | [["-", 0, 7, 12, 652, 3, 4, 0, 657, 17, 33], ["-", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612], ["-", 0, 656, 0, 57, 15, 666, 0, 657, 17, 33], ["-", 0, 656, 0, 57, 15, 666, 0, 657, 12, 612]] | 5 | 105 |
import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner scan = new Scanner(System.in);
String s = scan.nextLine();
String t = scan.nextLine();
String tt = t.substring(0, s.length());
if ((s.length() == t.length() - 1) && (s.equals(tt))) {
System.ou... | import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner scan = new Scanner(System.in);
String s = scan.nextLine();
String t = scan.nextLine();
String tt = t.substring(0, t.length() - 1);
if ((s.length() == t.length() - 1) && (s.equals(tt))) {
Syste... | [["-", 49, 200, 51, 492, 3, 4, 0, 492, 500, 22], ["+", 51, 492, 3, 4, 0, 16, 31, 492, 500, 22], ["+", 49, 200, 51, 492, 3, 4, 0, 16, 17, 33], ["+", 49, 200, 51, 492, 3, 4, 0, 16, 12, 499], ["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491]] | 3 | 129 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void) {
int K, A, B, i;
char str1[1000], str2[1000];
fgets(str1, sizeof(str1), stdin);
fgets(str2, sizeof(str2), stdin);
if (strncmp(str1, str2, (strlen(str1) - 1)) == 0) {
printf("YES\n");
} else {
printf("NO\n");
}
return 0... | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void) {
int K, A, B, i;
char str1[1000], str2[1000];
fgets(str1, sizeof(str1), stdin);
fgets(str2, sizeof(str2), stdin);
if (strncmp(str1, str2, (strlen(str1) - 1)) == 0) {
printf("Yes\n");
} else {
printf("No\n");
}
return 0... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 101 |
s= str(input())
t= str(input())
if len(t) == len(s) + 1 and len(s) >=1 and len(s) <= 10:
if t.islower() and s.islower():
if s==t[:-2]:
print("Yes")
else:
print("No")
| s= str(input())
t= str(input())
if len(t) == len(s) + 1 and len(s) >=1 and len(s) <= 10 and t.islower() and s.islower() and s==t[:-1]:
print("Yes")
else:
print("No")
| [["-", 36, 36, 36, 36, 0, 656, 0, 57, 0, 102], ["-", 0, 656, 0, 57, 64, 196, 0, 57, 0, 121], ["+", 0, 57, 15, 679, 31, 679, 31, 679, 17, 355], ["-", 0, 656, 0, 57, 64, 196, 0, 57, 0, 102], ["-", 64, 196, 0, 57, 64, 196, 0, 57, 0, 121], ["+", 36, 36, 0, 656, 0, 57, 15, 679, 17, 355], ["-", 15, 666, 0, 206, 206, 663, 0, ... | 5 | 80 |
#include <bits/stdc++.h>
using namespace std;
bool ts(string a, string b) {
int i;
for (i = 0; i < a.size(); i++)
if (a[i] != b[i])
return 0;
return 1;
}
int main() {
string s, t;
cin >> s >> t;
if (t.size() - s.size() == 1 || ts(s, t) == 1)
cout << "Yes";
else
cout << "No";
return 0;
... | #include <bits/stdc++.h>
using namespace std;
bool ts(string a, string b) {
int i;
for (i = 0; i < a.size(); i++)
if (a[i] != b[i])
return 0;
return 1;
}
int main() {
string s, t;
cin >> s >> t;
if (t.size() - s.size() == 1 && ts(s, t) == 1)
cout << "Yes";
else
cout << "No";
return 0;
... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98]] | 1 | 113 |
#include <iostream>
#include <string>
using namespace std;
int casecheck(char letter) {
if (letter - 'a' >= 0 && letter - 'a' < 26) {
return 1;
} else
return 0;
}
int main() {
string S, T;
cin >> S >> T;
int flag = 1;
if (S.length() + 1 != T.length()) {
cout << "No";
return 0;
}
if (S.le... | #include <iostream>
#include <string>
using namespace std;
int casecheck(char letter) {
if (letter - 'a' >= 0 && letter - 'a' < 26) {
return 1;
} else
return 0;
}
int main() {
string S, T;
cin >> S >> T;
int flag = 1;
if (S.length() + 1 != T.length()) {
cout << "No";
return 0;
}
if (S.le... | [["+", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46], ["-", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46]] | 1 | 238 |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.next();
String t = sc.next();
for (int i = 0; i < s.length(); i++) {
if (i < s.length() - 1) {
if (s.charAt(i) == t.charAt(i)) {
continue;
... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.next();
String t = sc.next();
for (int i = 0; i < s.length(); i++) {
if (i < s.length() - 1) {
if (s.charAt(i) == t.charAt(i)) {
continue;
... | [["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491]] | 3 | 169 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s, t;
cin >> s;
cin >> t;
int p = 0;
for (int i = 0; i < s.size(); i++) {
if (s[i] != t[i]) {
p = 1;
}
}
if (p == 1) {
cout << "no";
} else
cout << "yes";
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string s, t;
cin >> s;
cin >> t;
int p = 0;
for (int i = 0; i < s.size(); i++) {
if (s[i] != t[i]) {
p = 1;
}
}
if (p == 1) {
cout << "No";
} else
cout << "Yes";
return 0;
}
| [["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 92 |
s=str(input())
t=str(input())
if t[-1:]==s:
print("Yes")
else:
print("No") | s=str(input())
t=str(input())
if t[:-1]==s:
print("Yes")
else:
print("No") | [["+", 0, 57, 15, 666, 0, 206, 206, 663, 0, 102], ["-", 0, 57, 15, 666, 0, 206, 206, 663, 0, 102]] | 5 | 40 |
S = input()
T = input()
if (T == S[:-1]):
print("Yes")
else:
print("No") | S = input()
T = input()
if (T[:-1] == S):
print("Yes")
else:
print("No") | [["-", 0, 656, 0, 57, 15, 23, 0, 666, 667, 60], ["-", 0, 57, 15, 23, 0, 666, 0, 206, 51, 22], ["+", 0, 656, 0, 57, 15, 23, 0, 666, 667, 60], ["+", 0, 656, 0, 57, 15, 23, 0, 666, 0, 22]] | 5 | 36 |
S = input()
T = input()
N = len(S) - 1
if S[0:N] == T[0:N]:
print("Yes")
else:
print("No")
| S = input()
T = input()
N = len(S)
if S[0:N] == T[0:N]:
print("Yes")
else:
print("No")
| [["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 33], ["-", 0, 656, 0, 1, 0, 662, 12, 657, 12, 612]] | 5 | 47 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string a, b, c;
cin >> a >> b;
c = b[b.length() - 1];
a = a + c;
if (a == b)
cout << "yes";
else
cout << "No";
return 0;
}
| #include <iostream>
#include <string>
using namespace std;
int main() {
string a, b, c;
cin >> a >> b;
c = b[b.length() - 1];
a = a + c;
if (a == b)
cout << "Yes";
else
cout << "No";
return 0;
}
| [["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6]] | 1 | 68 |
#include <iostream>
#include <vector>
using namespace std;
int main() {
string S, T;
cin >> S >> T;
T = T.erase(T.size());
if (S == T) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
} | #include <iostream>
#include <vector>
using namespace std;
int main() {
string S, T;
cin >> S >> T;
T = T.erase(T.size() - 1);
if (S == T) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
} | [["+", 0, 11, 12, 2, 3, 4, 0, 16, 17, 33], ["+", 0, 11, 12, 2, 3, 4, 0, 16, 12, 13]] | 1 | 65 |
import java.io.*;
class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String id1 = br.readLine();
String id2 = br.readLine();
if (id1.length() == id2.length() - 1) {
System.out.println("No");
ret... | import java.io.*;
class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String id1 = br.readLine();
String id2 = br.readLine();
if (id1.length() != id2.length() - 1) {
System.out.println("No");
ret... | [["-", 8, 196, 0, 57, 15, 15, 0, 16, 17, 60], ["+", 8, 196, 0, 57, 15, 15, 0, 16, 17, 79]] | 3 | 142 |
#include <stdio.h>
#include <string.h>
int main(void) {
char S[10], T[11];
int i;
if (scanf("%s\n%s", S, T) == 1)
;
if (strlen(S) == strlen(T) - 1) {
for (i = 0; i < strlen(S); i++) {
if (S[i] != T[i]) {
printf("No");
break;
}
}
printf("Yes");
} else {
printf("... | #include <stdio.h>
#include <string.h>
int main(void) {
char S[11], T[12];
int i;
if (scanf("%s\n%s", S, T) == 1)
;
if (strlen(S) == strlen(T) - 1) {
for (i = 0; i < strlen(S); i++) {
if (S[i] != T[i]) {
printf("No");
return 0;
}
}
printf("Yes");
} else {
print... | [["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["-", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94], ["+", 8, 9, 0, 57, 64, 9, 0, 37, 0, 38], ["+", 8, 9, 0, 57, 64, 9, 0, 37, 0, 13]] | 0 | 120 |
//
// main.cpp
// Problem Code
//
// Created by Algo张伯威 on 2020/4/24.
// Copyright © 2020 Algo张伯威. All rights reserved.
//
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <set>
#include <vector>
using namespace std;
char s[2... | //
// main.cpp
// Problem Code
//
// Created by Algo张伯威 on 2020/4/24.
// Copyright © 2020 Algo张伯威. All rights reserved.
//
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <set>
#include <vector>
using namespace std;
char s[2... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 149 |
// PROBLEM NAME ------>>>
// PROBLEM LINK ------>>>
//---------------------------------------------------------------------------------------------------------------
#include <bits/stdc++.h>
#define ll long long int
#define pb push_back
#define pf push_front
#define ppb pop_back
#define ppf pop_front
#define TC ... | // PROBLEM NAME ------>>>
// PROBLEM LINK ------>>>
//---------------------------------------------------------------------------------------------------------------
#include <bits/stdc++.h>
#define ll long long int
#define pb push_back
#define pf push_front
#define ppb pop_back
#define ppf pop_front
#define TC ... | [["-", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 194 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s, t;
cin >> s;
cin >> t;
string ns = t.substr(t.length() - 1);
if (s.compare(ns) == 0)
printf("Yes");
else
printf("No");
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string s, t;
cin >> s;
cin >> t;
t.erase(t.size() - 1);
if (s.compare(t) == 0)
printf("Yes");
else
printf("No");
return 0;
}
| [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 49, 22], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["-", 0, 43, 49, 50, 51, 2, 63, 118, 119, 120], ["+", 8, 9, 0, 1, 0, 2, 63, 118, 119, 120], ["-", 3, 4, 0, 16, 31, 2, 63, 118, 119, 120], ["+", 3, 4, 0, 16, 31, 2, 63, 118, 119, 120], ["-", 15... | 1 | 70 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string str1, str2;
cin >> str1 >> str2;
bool flag = true;
if (str1.size() + 1 == str2.size()) {
for (int i = 0; i < str1.size() - 1; i++) {
if (str1.at(i) != str2.at(i))
flag = false;
}
if (flag == true)
cout << "Yes"... | #include <bits/stdc++.h>
using namespace std;
int main() {
string str1, str2;
cin >> str1 >> str2;
bool flag = true;
if (str1.size() + 1 == str2.size()) {
for (int i = 0; i < str1.size(); i++) {
if (str1.at(i) != str2.at(i))
flag = false;
}
if (flag == true)
cout << "Yes" << ... | [["-", 64, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 64, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 120 |
#include <bits/stdc++.h>
#include <iostream>
using namespace std;
int main() {
string n;
cin >> n;
string t;
cin >> t;
int cnt = 0;
int N = n.length();
for (int i = 0; i <= N; i++) {
if (n.at(i) == t.at(i)) {
cnt++;
} else {
}
}
if (cnt == N) {
cout << "Yes" << endl;
} else ... | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
int main() {
string n;
cin >> n;
string t;
cin >> t;
int cnt = 0;
int N = n.length();
for (int i = 0; i < N; i++) {
if (n.at(i) == t.at(i)) {
cnt++;
} else {
}
}
if (cnt == N) {
cout << "Yes" << endl;
} else {... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18]] | 1 | 109 |
S=input(str)
T=input()
last= T[-1]
if(T==S+last):
print('Yes')
else:
print('No') | S=input()
T=input()
last= T[-1]
if(T==S+last):
print('Yes')
else:
print('No') | [["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 22]] | 5 | 41 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s, t;
cin >> s >> t;
int n = s.size();
if (s == t.substr(0, n))
cout << "YES\n";
else
cout << "NO\n";
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string s, t;
cin >> s >> t;
int n = s.size();
if (s == t.substr(0, n))
cout << "Yes\n";
else
cout << "No\n";
return 0;
}
| [["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 63 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
string t;
cin >> t;
int done = 1;
int l1 = s.size();
int l2 = t.size();
if (l1 == l2 - 1) {
for (int i = 0; i < l1; i++) {
if (s[i] != t[i]) {
done = -1;
break;
}
}
if (done == -1) {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
string t;
cin >> t;
int done = 1;
int l1 = s.size();
int l2 = t.size();
if (l1 == l2 - 1) {
for (int i = 0; i < l1; i++) {
if (s[i] != t[i]) {
done = -1;
break;
}
}
if (done == -1) {
... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 136 |
s = input()
t = input()
flag = 0
for i in range(len(s)):
if s[i] != t[i]:
print("No")
flag = 1
if flag != 1:
print("Yes") | s = input()
t = input()
flag = 0
for i in range(len(s)):
if s[i] != t[i]:
print("No")
flag = 1
break
if flag != 1:
print("Yes") | [["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94]] | 5 | 55 |
//#define TIMER_
#include <bits/stdc++.h>
using namespace std;
#define rep(i, r) for (int i = 0; i < (r); i++)
#define pb push_back
#define ALL(a) a.begin(), a.end()
#define fastio \
ios::sync_with_stdio(0); ... | //#define TIMER_
#include <bits/stdc++.h>
using namespace std;
#define rep(i, r) for (int i = 0; i < (r); i++)
#define pb push_back
#define ALL(a) a.begin(), a.end()
#define fastio \
ios::sync_with_stdio(0); ... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 116 |
#include <stdio.h>
#include <string.h>
int main() {
char s[15], t[15];
int count = 0;
size_t len;
scanf("%s", s, 15);
scanf("%s", t, 15);
len = strlen(s);
for (int i = 0; i < len; i++) {
if (s[i] == t[i])
count += 1;
}
if (count == len - 1)
printf("Yes");
else
printf("No");
retu... | #include <stdio.h>
#include <string.h>
int main() {
char s[15], t[15];
int count = 0;
size_t len;
scanf("%s", s, 15);
scanf("%s", t, 15);
len = strlen(s);
for (int i = 0; i < len; i++) {
if (s[i] == t[i])
count += 1;
}
if (count == len)
printf("Yes");
else
printf("No");
return 0... | [["-", 0, 57, 15, 23, 0, 16, 12, 16, 17, 33], ["-", 0, 57, 15, 23, 0, 16, 12, 16, 12, 13]] | 0 | 116 |
S = input()
T = input()
j = 0
for i in T[0:len(S)-1]:
if(i != S[j]):
print('No')
exit(0)
j+=1
print('Yes')
| S = input()
T = input()
j = 0
for i in T[0:len(T)-1]:
if(i != S[j]):
print('No')
exit(0)
j+=1
print('Yes')
| [["-", 206, 663, 0, 657, 31, 652, 3, 4, 0, 22], ["+", 206, 663, 0, 657, 31, 652, 3, 4, 0, 22]] | 5 | 57 |
list = [input() for i in range (2)]
if list[1] == list[2][:-1]:
print("Yes")
else:
print("No") | list = [input() for i in range (2)]
if list[0] == list[1][:-1]:
print("Yes")
else:
print("No") | [["-", 0, 656, 0, 57, 15, 666, 0, 206, 206, 612], ["+", 0, 656, 0, 57, 15, 666, 0, 206, 206, 612], ["-", 0, 57, 15, 666, 0, 206, 51, 206, 206, 612], ["+", 0, 57, 15, 666, 0, 206, 51, 206, 206, 612]] | 5 | 44 |
#include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(), (x).end()
// Now sorting a vector looks like sort(all(vec))
// instead of sort(vec.begin(), vec.end()).
typedef pair<int, int> pii;
typedef pair<double, double> pdd;
typedef vector<double> vd;
typedef vector<bool> vb;
typedef vector<int> vi;
typ... | #include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(), (x).end()
// Now sorting a vector looks like sort(all(vec))
// instead of sort(vec.begin(), vec.end()).
typedef pair<int, int> pii;
typedef pair<double, double> pdd;
typedef vector<double> vd;
typedef vector<bool> vb;
typedef vector<int> vi;
typ... | [["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 231 |
import re
s=input()
st=input()
if re.search(s,st):
print("Yes")
else:
print("No")
| import re
s=input()
st=input()
if re.match(s,st):
print("Yes")
else:
print("No")
| [["-", 0, 656, 0, 57, 15, 652, 63, 319, 319, 22], ["+", 0, 656, 0, 57, 15, 652, 63, 319, 319, 22]] | 5 | 36 |
#include <iostream>
int main(void) {
std::string S, T;
std::cin >> S;
std::cin >> T;
if (S.length() < 1 && 10 < S.length()) {
std::cout << "No" << std::endl;
return 0;
}
if (T.length() != S.length() + 1) {
std::cout << "No" << std::endl;
return 0;
}
if (T.compare(0, T.length() - 1,... | #include <iostream>
int main(void) {
std::string S, T;
std::cin >> S;
std::cin >> T;
if (S.length() < 1 && 10 < S.length()) {
std::cout << "No" << std::endl;
return 0;
}
if (T.length() != S.length() + 1) {
std::cout << "No" << std::endl;
return 0;
}
if (T.compare(0, T.length() - 1,... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 145 |
// AtCoder165 C
#define _CRT_SECURE_NO_WARNINGS
#include <assert.h>
#include <malloc.h>
#include <math.h>
#include <memory.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// qsortで用いる比較用関数.*a<*bならaが先になる.
int compare(const void *a, const void *b) { return *(int *)a - *(int *)b; }
int revcompare(const vo... | // AtCoder165 C
#define _CRT_SECURE_NO_WARNINGS
#include <assert.h>
#include <malloc.h>
#include <math.h>
#include <memory.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// qsortで用いる比較用関数.*a<*bならaが先になる.
int compare(const void *a, const void *b) { return *(int *)a - *(int *)b; }
int revcompare(const vo... | [["-", 31, 16, 31, 2, 3, 4, 0, 16, 17, 33], ["-", 31, 16, 31, 2, 3, 4, 0, 16, 12, 13]] | 0 | 385 |
#include "bits/stdc++.h"
#define int long long
#define endl '\n'
using namespace std;
typedef long long ll;
#define db(x) cerr << #x << ": " << x << '\n';
#define read(a) \
int a; \
... | #include "bits/stdc++.h"
#define int long long
#define endl '\n'
using namespace std;
typedef long long ll;
#define db(x) cerr << #x << ": " << x << '\n';
#define read(a) \
int a; \
... | [["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 282 |
#include <bits/stdc++.h>
using namespace std;
#define N (int)(1e5 + 7)
#define inf (int)(1e9 + 7)
#define INF (long long)(1e18 + 7)
#define fastio \
ios::sync_with_stdio(false); \
cin.tie(0); ... | #include <bits/stdc++.h>
using namespace std;
#define N (int)(1e5 + 7)
#define inf (int)(1e9 + 7)
#define INF (long long)(1e18 + 7)
#define fastio \
ios::sync_with_stdio(false); \
cin.tie(0); ... | [["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 134 |
#include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
int main() {
char s[10], t[11], tc[10];
cin >> s >> t;
strncpy(tc, t, strlen(t) - 1);
tc[strlen(t) - 1] = '\0';
if (strcmp(s, tc) == 0)
cout << "Yes";
else
cout << "No";
return 0;
} | #include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
int main() {
char s[11], t[12], tc[11];
cin >> s >> t;
strncpy(tc, t, strlen(t) - 1);
tc[strlen(t) - 1] = '\0';
if (strcmp(s, tc) == 0)
cout << "Yes";
else
cout << "No";
return 0;
} | [["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13]] | 1 | 93 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string S, T;
cin >> S >> T;
int N = S.size();
for (int i = 0; i < N; i++) {
if (S.at(i) != T.at(i)) {
cout << "No" << endl;
}
else if ((i == N - 1) && (S.at(N - 1) == T.at(N - 1))) {
cout << "Yes" << endl;
}
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string S, T;
cin >> S >> T;
int N = S.size();
for (int i = 0; i < N; i++) {
if (S.at(i) != T.at(i)) {
cout << "No" << endl;
break;
}
else if ((i == N - 1) && (S.at(N - 1) == T.at(N - 1))) {
cout << "Yes" << endl;
... | [["+", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94], ["+", 8, 9, 0, 57, 64, 9, 0, 93, 0, 35]] | 1 | 115 |
#include <cmath>
#include <iostream>
#include <queue>
#include <stack>
#include <string>
#include <algorithm>
#include <fstream>
#include <vector>
using namespace std;
int main(void) {
string s, t;
cin >> s >> t;
for (int i = 0; i < s.length(); i++) {
if (i != s.size() - 1 && s[i] != t[i]) {
cout ... | #include <cmath>
#include <iostream>
#include <queue>
#include <stack>
#include <string>
#include <algorithm>
#include <fstream>
#include <vector>
using namespace std;
int main(void) {
string s, t;
cin >> s >> t;
for (int i = 0; i < s.length(); i++) {
if (i < s.size() && s[i] != t[i]) {
cout << "N... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 79], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 18], ["-", 15, 339, 51, 16, 31, 16, 12, 16, 17, 33], ["-", 15, 339, 51, 16, 31, 16, 12, 16, 12, 13]] | 1 | 112 |
s = input()
t = input()
ttt = t[-1]
tt = t.rstrip(ttt)
ss = int(len(s))
tttt = t[ss]
if len(ttt) == 1 and tttt == s:
print("Yes")
else:
print("No")
| s = input()
t = input()
ttt = t[-1]
tt = t.rstrip(ttt)
ss = int(len(s))
tttt = t[:ss]
if len(ttt) == 1 and tttt == s:
print("Yes")
else:
print("No")
| [["+", 0, 1, 0, 662, 12, 206, 206, 663, 0, 102]] | 5 | 66 |
s=input()
t=input()
a="Yes"
for i in range(len(s)-1):
if s[i]!=t[i]:
a="No"
if len(s)+1!=len(t):
a="No"
if len(s)>10 or len(s)<1:
a="No"
print(a)
| s=input()
t=input()
a="Yes"
for i in range(len(s)):
if s[i]!=t[i]:
a="No"
if len(s)+1!=len(t):
a="No"
if len(s)>10 or len(s)<1:
a="No"
print(a)
| [["-", 0, 7, 12, 652, 3, 4, 0, 657, 17, 33], ["-", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 86 |
#include <bits/stdc++.h>
using namespace std;
char s[15], t[15];
int main() {
scanf("%s%s", s, t);
for (int i = 0; s[i]; ++i)
if (s[i] != t[i]) {
cout << "NO" << endl;
return 0;
}
cout << "YES" << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
char s[15], t[15];
int main() {
scanf("%s%s", s, t);
for (int i = 0; s[i]; ++i)
if (s[i] != t[i]) {
cout << "No" << endl;
return 0;
}
cout << "Yes" << endl;
return 0;
} | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 85 |
#include <iostream>
#include <string>
using namespace std;
int main(void) {
string s, t, u, v;
cin >> s;
cin >> t;
int s_len = s.size();
u = t.substr(1, s_len);
v = t.substr(s_len);
int v_len = v.size();
if (s == u && v_len == 1) {
cout << "Yes";
} else {
cout << "No";
}
return 0;
} | #include <iostream>
#include <string>
using namespace std;
int main(void) {
string s, t, u, v;
cin >> s >> t;
int s_len = s.length();
u = t.substr(0, s_len);
v = t.substr(s_len);
int v_len = v.length();
if (s == u && v_len == 1) {
cout << "Yes";
} else {
cout << "No";
}
return 0;
} | [["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["-", 0, 43, 49, 50, 51, 2, 63, 118, 119, 120], ["+", 0, 43, 49, 50, 51, 2, 63, 118, 119, 120], ["-", 0, 1, 0, 11, 12, 2, 3, 4, 0, 13], ["+", 0, 1, 0, 11, 12, 2, 3, 4, 0, 13]] | 1 | 100 |
n =str(input())
r =str(input())
s = len(n)
t = len(r)
if n== r[0:t] :
print('Yes')
else :
print('No')
| n =str(input())
r =str(input())
s = len(n)
t = len(r)
if n== r[0:t-1] :
print('Yes')
else :
print('No') | [["+", 15, 666, 0, 206, 206, 663, 0, 657, 17, 33], ["+", 15, 666, 0, 206, 206, 663, 0, 657, 12, 612]] | 5 | 52 |
n = input()
m = input()
if 1 <= len(n):
if len(n)<= 10 :
a = m[-1]
n = n + a
if n == m:
print("YES")
else :
print("NO") | n = input()
m = input()
if 1 <= len(n):
if len(n)<= 10 :
a = m[-1]
n = n + a
if n == m:
print("Yes")
else :
print("No") | [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 57 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string s, t;
int check[11], i, j, fin = 1, a, b;
cin >> s >> t;
/*
for(i=0;i<(t.size());i++)check[i]=0;
for(i=0;i<(t.size()-1);i++)
{
for(j=0;j<(s.size());j++)
{
if(t[i]==s[j])check[i]=1;
}
}
*/
fo... | #include <iostream>
#include <string>
using namespace std;
int main() {
string s, t;
int check[11], i, j, fin = 1, a, b;
cin >> s >> t;
/*
for(i=0;i<(t.size());i++)check[i]=0;
for(i=0;i<(t.size()-1);i++)
{
for(j=0;j<(s.size());j++)
{
if(t[i]==s[j])check[i]=1;
}
}
*/
fo... | [["-", 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 | 133 |
package main
import (
"fmt"
"regexp"
"strings"
)
func main() {
var s, t string
r := regexp.MustCompile(`[a-z]*`)
fmt.Scanf("%s", &s)
fmt.Scanf("%s", &t)
slen := len(s)
tlen := len(t)
if (r.MatchString(s)) && (r.MatchString(t)) &&
(slen >= 1) && (slen <= 10) && (slen+1 == tlen) && (strings.HasPrefix(t,... | package main
import (
"fmt"
"regexp"
"strings"
)
func main() {
var s, t string
r := regexp.MustCompile(`[a-z]*`)
fmt.Scanf("%s", &s)
fmt.Scanf("%s", &t)
slen := len(s)
tlen := len(t)
if (r.MatchString(s)) && (r.MatchString(t)) &&
(slen >= 1) && (slen <= 10) && (slen+1 == tlen) && (strings.HasPrefix(t,... | [] | 7 | 152 |
s=list(input())
s1=list(input())
s1.pop(-1)
print("YES" if s==s1 else "NO") | s=list(input())
s1=list(input())
s1.pop(-1)
print("Yes" if s==s1 else "No") | [["-", 0, 652, 3, 4, 0, 41, 0, 557, 0, 6], ["+", 0, 652, 3, 4, 0, 41, 0, 557, 0, 6]] | 5 | 37 |
#include <algorithm>
#include <deque>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unordered_map>
#include <vector>
int main() {
std::string S, T;
std::cin >> S;
std::cin >> T;
bool sam... | #include <algorithm>
#include <deque>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unordered_map>
#include <vector>
int main() {
std::string S, T;
std::cin >> S;
std::cin >> T;
bool sam... | [["-", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 122 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string S, T;
cin >> S >> T;
int N;
N = S.size();
for (int i = 0; i < N; i++) {
if (S.at(i) != T.at(i)) {
cout << "Yes" << endl;
break;
}
if (i == N - 1 && S.at(i) == T.at(i)) {
cout << "No" << endl;
break;
}
... | #include <bits/stdc++.h>
using namespace std;
int main() {
string S, T;
cin >> S >> T;
int N;
N = S.size();
for (int i = 0; i < N; i++) {
if (S.at(i) != T.at(i)) {
cout << "No" << endl;
break;
}
if (i == N - 1 && S.at(i) == T.at(i)) {
cout << "Yes" << endl;
break;
}
... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 112 |
import sys
S = input()
T = input()
if S in T :
text = T.replace(S,"",1)
if text == T[len(T)-1]:
if len(T) == 1:
print("Yes")
sys.exit()
else:
print("No")
sys.exit()
print("No") | import sys
S = input()
T = input()
#print(T[len(T)-1])
if S in T :
text = T.replace(S,"",1)
if text == T[len(T)-1]:
if len(text) == 1:
print("Yes")
sys.exit()
else:
print("No")
sys.exit()
print("No") | [["-", 0, 57, 15, 666, 0, 652, 3, 4, 0, 22], ["+", 0, 57, 15, 666, 0, 652, 3, 4, 0, 22]] | 5 | 81 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s, t;
cin >> s;
cin >> t;
if (t.size() - s.size() == 1) {
t.erase(s.size());
if (s == t)
cout << "YES";
else
cout << "NO";
} else
cout << "NO";
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string s, t;
cin >> s;
cin >> t;
if (t.size() - s.size() == 1) {
t.erase(s.size());
if (s == t)
cout << "Yes";
else
cout << "No";
} else
cout << "No";
return 0;
}
| [["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 83 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string S, T;
cin >> S >> T;
if (S == T.substr(0, S.size())) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string S, T;
cin >> S >> T;
if (S == T.substr(0, S.size())) {
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 | 64 |
from sys import stdin
S = list(stdin.readline().rstrip())
T = list(stdin.readline().rstrip())
if S[:len(S)-1] == T[:len(S)-1]:
print('Yes')
else:
print('No') | from sys import stdin
S = list(stdin.readline().rstrip())
T = list(stdin.readline().rstrip())
if S[:len(S)] == T[:len(S)]:
print('Yes')
else:
print('No') | [["-", 15, 666, 0, 206, 206, 663, 0, 657, 17, 33], ["-", 15, 666, 0, 206, 206, 663, 0, 657, 12, 612]] | 5 | 69 |
#include <cstring>
#include <iostream>
using namespace std;
int main() {
char s[11], y[12], d[11];
cin >> s >> y;
int len = strlen(s);
strncpy(d, y, len);
d[len - 1] = '\0';
if (!strcmp(d, s))
cout << "Yes" << endl;
else
cout << "No" << endl;
return 0;
}
| #include <cstring>
#include <iostream>
using namespace std;
int main() {
char s[11], y[12], d[11];
cin >> s >> y;
int len = strlen(s);
strncpy(d, y, len);
d[len] = '\0';
// cout<<s<<endl<<y<<endl<<d<<endl;
if (!strcmp(d, s))
cout << "Yes" << endl;
else
cout << "No" << endl;
return 0;
}
| [["-", 0, 11, 31, 69, 341, 342, 0, 16, 17, 33], ["-", 0, 11, 31, 69, 341, 342, 0, 16, 12, 13]] | 1 | 94 |
# -*- coding: utf-8 -*-
# 文字列の入力
S = input()
T = input()
judge = "NO"
if (len(S) + 1 == len(T)):
if (T.startswith(S)):
judge = "YES"
print("{}".format(judge)) | # -*- coding: utf-8 -*-
# 文字列の入力
S = input()
T = input()
judge = "No"
if (len(S) + 1 == len(T)):
if (T.startswith(S)):
judge = "Yes"
print("{}".format(judge)) | [["-", 0, 656, 0, 1, 0, 662, 12, 557, 0, 6], ["+", 0, 656, 0, 1, 0, 662, 12, 557, 0, 6], ["-", 64, 196, 0, 1, 0, 662, 12, 557, 0, 6], ["+", 64, 196, 0, 1, 0, 662, 12, 557, 0, 6]] | 5 | 58 |
#include <bits/stdc++.h>
using namespace std;
int main(void) {
char s[11], t[12];
cin >> s >> t;
for (int i = 0; i < strlen(s); ++i) {
if (s[i] != t[i]) {
cout << "No" << endl;
break;
}
}
cout << "Yes" << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main(void) {
char s[11], t[12];
cin >> s >> t;
for (long unsigned int i = 0; i < strlen(s); ++i) {
if (s[i] != t[i]) {
cout << "No" << endl;
return 0;
}
}
cout << "Yes" << endl;
return 0;
}
| [["+", 8, 9, 0, 7, 10, 43, 39, 86, 0, 96], ["+", 8, 9, 0, 7, 10, 43, 39, 86, 0, 87], ["-", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94], ["+", 8, 9, 0, 57, 64, 9, 0, 37, 0, 38], ["+", 8, 9, 0, 57, 64, 9, 0, 37, 0, 13]] | 1 | 84 |
#include <bits/stdc++.h>
using namespace std;
int main() {
char s[10], t[11];
char ch = fgetc(stdin);
int len = 0;
while (ch != '\n') {
s[len++] = ch;
ch = fgetc(stdin);
}
ch = fgetc(stdin);
len = 0;
while (ch != '\n') {
t[len++] = ch;
ch = fgetc(stdin);
}
int stg = 1;
for (int i ... | #include <bits/stdc++.h>
using namespace std;
int main() {
char s[10], t[11];
char ch = fgetc(stdin);
int len = 0;
while (ch != '\n') {
s[len++] = ch;
ch = fgetc(stdin);
}
ch = fgetc(stdin);
len = 0;
while (ch != '\n') {
t[len++] = ch;
ch = fgetc(stdin);
}
int stg = 1;
for (int i ... | [["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 158 |
#include <bits/stdc++.h>
#define FAST \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define MAXX 100005
#define ll signed... | #include <bits/stdc++.h>
#define FAST \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define MAXX 100005
#define ll signed... | [["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 104 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s, t;
cin >> s >> t;
for (int i = 0; i < int(s.length()); i++) {
if (s[i] != t[i]) {
cout << "No" << endl;
return 0;
}
}
if (s.length() != t.length() + 1) {
cout << "No" << endl;
return 0;
}
cout << "Yes" << en... | #include <bits/stdc++.h>
using namespace std;
int main() {
string s, t;
cin >> s >> t;
for (int i = 0; i < int(s.length()); i++) {
if (s[i] != t[i]) {
cout << "No" << endl;
return 0;
}
}
if (s.length() != t.length() - 1) {
cout << "No" << endl;
return 0;
}
cout << "Yes" << e... | [["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 72], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 33]] | 1 | 111 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int c, i, j = 0;
char s[14], t[100];
cin >> s;
cin >> t;
c = strlen(s);
for (i = 0; i < c; i++) {
if (s[i] == t[i])
j++;
else {
cout << "NO" << endl;
return 0;
}
}
if (c == j)
cout << "Yes" << endl;
return 0;... | #include <bits/stdc++.h>
using namespace std;
int main() {
int c, i, j = 0;
char s[11], t[12];
cin >> s;
cin >> t;
c = strlen(s);
for (i = 0; i < c; i++) {
if (s[i] == t[i])
j++;
else {
cout << "No" << endl;
return 0;
}
}
if (c == j)
cout << "Yes" << endl;
return 0;
... | [["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 108 |
a = input()
b = input()
if((b.find(a, 0, len(a)) != -1) and (len(a)+1 == len(b)) and (1 <= len(a) <= 10) and a.islower() and b.islower()):
print('yes')
else:
print('no')
| a = input()
b = input()
if((b.find(a, 0, len(a)) != -1) and (len(a)+1 == len(b)) and (1 <= len(a) <= 10) and a.islower() and b.islower()):
print('Yes')
else:
print('No')
| [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 83 |
#include <stdio.h>
int main() {
char s[256], t[256];
scanf("%s", &s);
scanf("%s", &t);
int i = 0;
int c = 0;
while (s[i] != 0) {
if (s[i] == t[i])
c++;
else
break;
i++;
}
if (i == c)
printf("Yes");
else
printf("No");
return 0;
} | #include <stdio.h>
int main() {
char s[256], t[256];
scanf("%s", &s);
scanf("%s", &t);
int i = 0;
int c = 0;
while (s[i] != 0) {
if (s[i] == t[i])
c++;
i++;
}
if (i == c)
printf("Yes");
else
printf("No");
return 0;
} | [["-", 0, 52, 8, 9, 0, 57, 75, 76, 0, 95], ["-", 8, 9, 0, 57, 75, 76, 0, 93, 0, 94], ["-", 8, 9, 0, 57, 75, 76, 0, 93, 0, 35]] | 0 | 105 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string S, T;
cin >> S >> T;
if (S == T.erase(T.size() - 1)) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string S, T;
cin >> S >> T;
if (S == T.erase(T.size() - 1)) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
}
| [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 61 |
#include <bits/stdc++.h>
#define forna(i, a, n) for (int i = a; i < n; i++)
typedef long long int lli;
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
string n, m;
cin >> n >> m;
int flag = 0;
int l = m.length();
int k = n.length();
if (l - 1 != k)
cout << "NO";
... | #include <bits/stdc++.h>
#define forna(i, a, n) for (int i = a; i < n; i++)
typedef long long int lli;
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
string n, m;
cin >> n >> m;
int flag = 0;
int l = m.length();
int k = n.length();
if (l - 1 != k)
cout << "No";
... | [["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 119 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int c = 0;
string s1;
string s2;
cin >> s1;
cin >> s2;
int a = s1.size();
int b = s2.size();
for (int i = 0; i < a; i++)
if (s1[i] == s2[i]) {
c++;
if (c == a) {
cout << "Yes" << endl;
}
} else {
cout << "... | #include <bits/stdc++.h>
using namespace std;
int main() {
int c = 0;
string s1;
string s2;
cin >> s1;
cin >> s2;
int a = s1.size();
int b = s2.size();
for (int i = 0; i < a; i++) {
if (s1[i] == s2[i])
c++;
}
if (c == a) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}... | [["+", 0, 14, 8, 9, 0, 7, 8, 9, 0, 45], ["-", 8, 9, 0, 7, 8, 57, 64, 9, 0, 45], ["+", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46], ["-", 8, 57, 64, 9, 0, 57, 64, 9, 0, 46]] | 1 | 110 |
s = str(input())
t = str(input())
length = len(s)
count = 0
for i in range(length):
if not s[i] == t[i]:
print('No')
count = 1
if count == 0:
print('Yes')
| s = str(input())
t = str(input())
length = len(s)
count = 0
for i in range(length):
if not s[i] == t[i]:
print('No')
count = 1
break
if count == 0:
print('Yes')
| [["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94]] | 5 | 65 |
s = input()
t = input()
if t[:-1] == s:
print("YES")
else:
print("NO") | s = input()
t = input()
if t[:-1] == s:
print("Yes")
else:
print("No")
| [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 34 |
str1=input()
str2=input()
n=len(str2)
str3=str2[:n-1]
if(str1==str3):
print("yes")
else:
print("no") | str1=input()
str2=input()
n=len(str2)
str3=str2[:n-1]
if(str1==str3):
print("Yes")
else:
print("No") | [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 46 |
#include <stdio.h>
int main() {
char S[100];
char T[100];
scanf("%s", &S);
scanf("%s", &T);
int flag = 0;
int i = 0;
while (S[i] != '\0') {
if (S[i] != T[i]) {
flag = 1;
}
if (flag == 1) {
break;
}
i++;
}
if (flag == 1)
printf("No\n");
else {
printf("yes\... | #include <stdio.h>
int main() {
char S[100];
char T[100];
scanf("%s", &S);
scanf("%s", &T);
int flag = 0;
int i = 0;
while (S[i] != '\0') {
if (S[i] != T[i]) {
flag = 1;
}
if (flag == 1) {
break;
}
i++;
}
if (flag == 1)
printf("No\n");
else {
printf("Yes\... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 122 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
string S, T;
cin >> S >> T;
rep(i, S.size() - 1) {
if (S.at(i) != T.at(i)) {
cout << "No" << endl;
return 0;
}
}
cout << "Yes" << endl... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
string S, T;
cin >> S >> T;
rep(i, S.size()) {
if (S.at(i) != T.at(i)) {
cout << "No" << endl;
return 0;
}
}
cout << "Yes" << endl;
... | [["-", 0, 1, 0, 2, 3, 4, 0, 16, 17, 33], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 1 | 102 |
s = input()
t = input()
ss = t[:len(t)-1]
print('Yes' if ss == s else 'No')
print(ss) | s = input()
t = input()
ss = t[:len(t)-1]
print('Yes' if ss == s else 'No') | [["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 40 |
a,b = input().split()
if a == b[0:-1]:
print('Yes')
else:
print('No') | a = input()
b = input()
if a == b[0:-1]:
print('Yes')
else:
print('No') | [["-", 0, 656, 0, 1, 0, 662, 31, 684, 0, 21], ["-", 0, 656, 0, 1, 0, 662, 31, 684, 0, 22], ["-", 0, 1, 0, 662, 12, 652, 63, 319, 0, 131], ["-", 0, 1, 0, 662, 12, 652, 63, 319, 319, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22]] | 5 | 36 |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int count = 0;
string s, t;
cin >> s >> t;
int s_length = s.length();
for (int i = 0; i < s_length; i++) {
if (s[i] == t[i]) {
count++;
}
}
if (s_length == count) {
cout << "YES\n";
}... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int count = 0;
string s, t;
cin >> s >> t;
int s_length = s.length();
for (int i = 0; i < s_length; i++) {
if (s[i] == t[i]) {
count++;
}
}
if (s_length == count) {
cout << "Yes\n";
}... | [["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 112 |
package main
import(
"fmt"
)
func main() {
var s string
var t string
fmt.Scan(&s,&t)
length := len(s)
if s[0:length-1] == t[0:length-1] {
fmt.Println("Yes")
}else{
fmt.Println("No")
}
}
| package main
import(
"fmt"
)
func main() {
var s string
var t string
fmt.Scan(&s,&t)
length := len(s)
if s[0:length] == t[0:len(t)-1] {
fmt.Println("Yes")
}else{
fmt.Println("No")
}
}
| [["-", 0, 57, 15, 16, 31, 443, 444, 16, 17, 33], ["-", 0, 57, 15, 16, 31, 443, 444, 16, 12, 433], ["-", 0, 57, 15, 16, 12, 443, 444, 16, 31, 22], ["+", 15, 16, 12, 443, 444, 16, 31, 2, 63, 22], ["+", 12, 443, 444, 16, 31, 2, 3, 4, 0, 24], ["+", 12, 443, 444, 16, 31, 2, 3, 4, 0, 22], ["+", 12, 443, 444, 16, 31, 2, 3, 4,... | 7 | 86 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String a = sc.next();
String b = sc.next();
int p = 1;
if (a.length() + 1 != b.length()) {
p = 0;
}
if (a.length() + 1 != b.length()) {
for (int i = 0;... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String a = sc.next();
String b = sc.next();
int p = 1;
if (a.length() + 1 != b.length()) {
p = 0;
}
if (a.length() + 1 == b.length()) {
for (int i = 0;... | [["-", 8, 196, 0, 57, 15, 15, 0, 16, 17, 79], ["+", 8, 196, 0, 57, 15, 15, 0, 16, 17, 60]] | 3 | 182 |
#include <algorithm>
#include <cmath>
#include <cstring>
#include <deque>
#include <iostream>
#include <map>
#include <queue>
#include <vector>
using namespace std;
typedef long long ll;
const int INF = 1e9;
const int MOD = 1e9 + 7;
const ll LLINF = 1LL << 60;
#define P pair<ll, ll>
#define rep(i, n) for (int i = 0; i... | #include <algorithm>
#include <cmath>
#include <cstring>
#include <deque>
#include <iostream>
#include <map>
#include <queue>
#include <vector>
using namespace std;
typedef long long ll;
const int INF = 1e9;
const int MOD = 1e9 + 7;
const ll LLINF = 1LL << 60;
#define P pair<ll, ll>
#define rep(i, n) for (int i = 0; i... | [["-", 0, 1, 0, 2, 3, 4, 0, 16, 17, 33], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 1 | 490 |
s=input()
t=input()
lens=len(s)
if s==t[:3:]:
print("Yes")
else:
print("No")
| s=input()
t=input()
lens=len(s)
if s==t[:lens:]:
print("Yes")
else:
print("No")
| [["-", 0, 57, 15, 666, 0, 206, 206, 663, 0, 612], ["+", 0, 57, 15, 666, 0, 206, 206, 663, 0, 22]] | 5 | 40 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <vector>
using namespace std;
int main(int argc, char *argv[]) {
string S;
string T;
cin >> S;
cin >> T;
const char *s = S.c_str();
const char *... | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <vector>
using namespace std;
int main(int argc, char *argv[]) {
string S;
string T;
cin >> S;
cin >> T;
const char *s = S.c_str();
const char *... | [["-", 51, 16, 31, 2, 3, 4, 0, 16, 17, 33], ["-", 51, 16, 31, 2, 3, 4, 0, 16, 12, 13]] | 1 | 119 |
import java.util.*;
public class Main {
static Scanner scanner;
public static void main(String[] args) {
scanner = new Scanner(System.in);
String a = scanner.nextLine();
String b = scanner.nextLine();
if (a.startsWith(b))
printYes();
else
printNo();
}
public static int nextInt... | import java.util.*;
public class Main {
static Scanner scanner;
public static void main(String[] args) {
scanner = new Scanner(System.in);
String a = scanner.nextLine();
String b = scanner.nextLine();
if (b.startsWith(a))
printYes();
else
printNo();
}
public static int nextInt... | [["-", 8, 196, 0, 57, 15, 15, 0, 492, 500, 22], ["+", 8, 196, 0, 57, 15, 15, 0, 492, 500, 22], ["-", 0, 57, 15, 15, 0, 492, 3, 4, 0, 22], ["+", 0, 57, 15, 15, 0, 492, 3, 4, 0, 22]] | 3 | 264 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string S, T;
cin >> S >> T;
if (S == T + 'a' || S == T + 'b' || S == T + 'c' || S == T + 'd' ||
S == T + 'e' || S == T + 'f' || S == T + 'g' || S == T + 'h' ||
S == T + 'i' || S == T + 'j' || S == T + 'k' || S == T + 'l' ||
S == T + 'm'... | #include <bits/stdc++.h>
using namespace std;
int main() {
string S, T;
cin >> T >> S;
if (S == T + 'a' || S == T + 'b' || S == T + 'c' || S == T + 'd' ||
S == T + 'e' || S == T + 'f' || S == T + 'g' || S == T + 'h' ||
S == T + 'i' || S == T + 'j' || S == T + 'k' || S == T + 'l' ||
S == T + 'm'... | [["-", 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 | 250 |
n=input()
k=input()
y=len(k)
s=k[:y]
if len(n)==y-1 and s==n:
print("Yes")
else:
print("No") | n=input()
k=input()
y=len(n)
s=k[:y]
if len(k)==y+1 and s==n:
print("Yes")
else:
print("No") | [["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 22], ["-", 15, 679, 31, 666, 0, 652, 3, 4, 0, 22], ["+", 15, 679, 31, 666, 0, 652, 3, 4, 0, 22], ["-", 0, 57, 15, 679, 31, 666, 0, 657, 17, 33], ["+", 0, 57, 15, 679, 31, 666, 0, 657, 17, 72]] | 5 | 51 |
#include <bits/stdc++.h>
using namespace std;
string s, t;
int main() {
cin >> s >> t;
for (int i = 0; i < s.size(); i++)
if (s[i] != t[i]) {
cout << "NO";
return 0;
}
cout << "YES";
} |
#include <bits/stdc++.h>
using namespace std;
string s, t;
int main() {
cin >> s >> t;
for (int i = 0; i < s.size(); i++)
if (s[i] != t[i]) {
cout << "No";
return 0;
}
cout << "Yes";
}
| [["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 70 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string S, T;
cin >> S >> T;
int i = 0;
for (i = 0; i < S.size(); i++) {
if (S.at(i) != T.at(i)) {
cout << "No" << endl;
break;
}
if (i == S.size()) {
cout << "Yes" << endl;
break;
}
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string S, T;
cin >> S >> T;
int i = 0;
for (i = 0; i < S.size(); i++) {
if (S.at(i) != T.at(i)) {
cout << "No" << endl;
break;
}
if (i == S.size() - 1) {
cout << "Yes" << endl;
break;
}
}
return 0;
}
| [["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 33], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 100 |
#include <bits/stdc++.h>
using namespace std;
string s, t;
int main() {
cin >> s >> t;
t.erase(t.size() - 1, 1);
if (s == t)
cout << "YES" << endl;
else
cout << "NO" << endl;
}
| #include <bits/stdc++.h>
using namespace std;
string s, t;
int main() {
cin >> s >> t;
t.erase(t.size() - 1, 1);
if (s == t)
cout << "Yes" << endl;
else
cout << "No" << endl;
}
| [["-", 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 | 61 |
A = input()
B = input()
C = B[:len(B)-2]
if A == C:
D = "Yes"
else:
D = "No"
print(D) | A = input()
B = input()
C = B[:len(B)-1]
if A == C:
D = "Yes"
else:
D = "No"
print(D) | [["-", 0, 662, 12, 206, 206, 663, 0, 657, 12, 612], ["+", 0, 662, 12, 206, 206, 663, 0, 657, 12, 612]] | 5 | 43 |
s = input()
t = input()
print(s, t)
if (s == t[0:(len(t))-1]) and (len(t) - len(s) == 1):
print("Yes")
else:
print("No")
#print(s[0:(len(s))])
| s = input()
t = input()
if (s == t[0:(len(t))-1]) and (len(t) - len(s) == 1):
print("Yes")
else:
print("No")
#print(s[0:(len(s))])
| [["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 21], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 64 |
#include <bits/stdc++.h>
using namespace std;
string s, t;
int main() {
getline(cin, s);
getline(cin, t);
if (t.substr(0, s.size()).compare(s.substr(0, s.size())) == 0)
cout << "YES";
else
cout << "NO";
}
| #include <bits/stdc++.h>
using namespace std;
string s, t;
int main() {
getline(cin, s);
getline(cin, t);
if (t.substr(0, s.size()).compare(s.substr(0, s.size())) == 0)
cout << "Yes";
else
cout << "No";
}
| [["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 77 |
#include <algorithm>
#include <cassert>
#include <cstdint>
#include <functional>
#include <iostream>
#include <math.h>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
string s, t;
cin >> s;
cin >> t;
int s_size, t_size;
s_size = s.size()... | #include <algorithm>
#include <cassert>
#include <cstdint>
#include <functional>
#include <iostream>
#include <math.h>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
string s, t;
cin >> s;
cin >> t;
int s_size, t_size;
s_size = s.size()... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 155 |
// Created by arvybhatt
#include <bits/stdc++.h>
#define fast \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define F fi... | // Created by arvybhatt
#include <bits/stdc++.h>
#define fast \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define F fi... | [["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 140 |
#include <stdio.h>
#include <string.h>
int main() {
int n, i, j, cnt = 0, fla = 1, flg;
char s[15], t[15];
scanf("%s", s);
scanf("%s", t);
n = strlen(s);
i = strlen(t);
if ((i - n) == 1) {
for (j = 0; j < n; j++) {
if (s[j] != t[j]) {
fla = 0;
break;
}
}
if (fla)
... | #include <stdio.h>
#include <string.h>
int main() {
int n, i, j, cnt = 0, fla = 1, flg;
char s[15], t[15];
scanf("%s", s);
scanf("%s", t);
n = strlen(s);
i = strlen(t);
if ((i - n) == 1) {
for (j = 0; j < n; j++) {
if (s[j] != t[j]) {
fla = 0;
break;
}
}
if (fla)
... | [["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 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, 6]] | 0 | 150 |
S = input()
T = input()
T = T[:-1]
if S == T :
print('yes')
else :
print('no')
| S = input()
T = input()
T = T[:-1]
if S == T :
print('Yes')
else :
print('No')
| [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 37 |
#include <bits/stdc++.h>
using namespace std;
const long long mod = (1e9) + 7;
string a, b, res;
void _input() { cin >> a >> b; }
void _solve() {
if (a == b.substr(0, a.size()))
res = "YES";
else
res = "NO";
}
void _output() { cout << res; }
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NU... | #include <bits/stdc++.h>
using namespace std;
const long long mod = (1e9) + 7;
string a, b, res;
void _input() { cin >> a >> b; }
void _solve() {
if (a == b.substr(0, a.size()))
res = "Yes";
else
res = "No";
}
void _output() { cout << res; }
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NU... | [["-", 0, 57, 64, 1, 0, 11, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 11, 12, 5, 0, 6], ["-", 75, 76, 0, 1, 0, 11, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 11, 12, 5, 0, 6]] | 1 | 125 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s, t;
cin >> s >> t;
if (t.find(s) != string::npos && (s.length() + 1) == t.length()) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string s, t;
cin >> s >> t;
if (t.find(s) == 0 && (s.length() + 1) == t.length()) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
return 0;
} | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 79], ["-", 15, 339, 51, 16, 31, 16, 12, 343, 345, 348], ["-", 15, 339, 51, 16, 31, 16, 12, 343, 0, 349], ["-", 15, 339, 51, 16, 31, 16, 12, 343, 141, 22], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]] | 1 | 76 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string a, b;
cin >> a >> b;
int size = b.size();
string bb = b.substr(0, size - 1);
if (bb == a) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string a, b;
cin >> a >> b;
int size = b.size();
string bb = b.substr(0, size - 1);
if (bb == a) {
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], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 38], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 13], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 35]] | 1 | 73 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s, t;
cin >> s >> t;
t.pop_back();
if (t.size() - s.size() == 0 && s.compare(t) == 0) {
cout << "YES";
} else {
cout << "NO";
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string s, t;
cin >> s >> t;
t.pop_back();
if (t.size() - s.size() == 0 && s.compare(t) == 0) {
cout << "Yes";
} else {
cout << "No";
}
} | [["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 71 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s, t;
cin >> s >> t;
int x = s.length();
int flag = 1;
for (int i = 0; i < x + 1; i++) {
if (t[i] != s[i]) {
flag = 0;
break;
}
}
if (flag == 1) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
ret... | #include <bits/stdc++.h>
using namespace std;
int main() {
string s, t;
cin >> s >> t;
int x = s.length();
int flag = 1;
for (int i = 0; i < x; i++) {
if (t[i] != s[i]) {
flag = 0;
break;
}
}
if (flag == 1) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
return ... | [["-", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 105 |
#include <iostream>
#include <string>
using namespace std;
int main() {
char a[20], b[20];
cin >> a;
cin >> b;
int r = 0;
for (int i = 0; a[i] != '\0'; i++) {
if (a[i] != b[i])
r = 1;
}
if (r == 0)
cout << "YES" << endl;
else
cout << "NO" << endl;
} | #include <iostream>
#include <string>
using namespace std;
int main() {
char a[20], b[20];
cin >> a;
cin >> b;
int r = 0;
for (int i = 0; a[i] != '\0'; i++) {
if (a[i] != b[i])
r = 1;
}
if (r == 0)
cout << "Yes" << endl;
else
cout << "No" << endl;
} | [["-", 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 | 98 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string S, T;
cin >> S >> T;
int a = S.size();
char b = T.at(a + 1);
if (T == S + b) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string S, T;
cin >> S >> T;
int a = S.size();
char b = T.at(a);
if (T == S + b) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
}
| [["-", 49, 50, 51, 2, 3, 4, 0, 16, 17, 72], ["-", 49, 50, 51, 2, 3, 4, 0, 16, 12, 13]] | 1 | 73 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string S, T;
cin >> S >> T;
if (T.substr(1, T.size()) == S) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string S, T;
cin >> S >> T;
// cout << T.substr(0, T.size() - 1) << endl;
if (T.substr(0, T.size() - 1) == S) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
} | [["-", 15, 339, 51, 16, 31, 2, 3, 4, 0, 13], ["+", 15, 339, 51, 16, 31, 2, 3, 4, 0, 13], ["+", 51, 16, 31, 2, 3, 4, 0, 16, 17, 33], ["+", 51, 16, 31, 2, 3, 4, 0, 16, 12, 13]] | 1 | 61 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.