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 <bits/stdc++.h>
using namespace std;
int main() {
string s1, s2;
cin >> s1 >> s2;
int n1 = s1.length();
int n2 = s2.length();
if (n1 = n2 + 1) {
for (int i = 0; i < s1.size(); i++) {
if (s1[i] != s2[i]) {
cout << "NO";
return 0;
}
}
cout << "YES";
} else {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
string s1, s2;
cin >> s1 >> s2;
int n1 = s1.length();
int n2 = s2.length();
if (n1 = n2 + 1) {
for (int i = 0; i < s1.size(); i++) {
if (s1[i] != s2[i]) {
cout << "No";
return 0;
}
}
cout << "Yes";
} else {
... | [["-", 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 | 109 |
#include <bits/stdc++.h>
#define ll long long int
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
string x;
cin >> x;
string y;
cin >> y;
ll n;
n = x.length();
ll m;
m = y.length();
bool ans = true;
ll i;
for (i = 0; i < n; i++) {
if (x[i] == y[i]) {
ans = ... | #include <bits/stdc++.h>
#define ll long long int
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
string x;
cin >> x;
string y;
cin >> y;
ll n;
n = x.length();
ll m;
m = y.length();
bool ans = true;
ll i;
for (i = 0; i < n; i++) {
if (x[i] == y[i]) {
ans = ... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 149 |
S=input()
T=input()
num=0
for i in range(len(S)):
if S[i]==T[i]:
num+=1
else:
print("No")
if num==len(S):
print("Yes")
| S=input()
T=input()
num=0
for i in range(len(S)):
if S[i]==T[i]:
num+=1
else:
print("No")
exit()
if num==len(S):
print("Yes")
| [["+", 75, 76, 8, 196, 0, 1, 0, 652, 63, 22], ["+", 8, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 8, 196, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 60 |
print("YES" if input()==input()[:-1] else "NO") | print("Yes" if input()==input()[:-1] else "No") | [["-", 0, 652, 3, 4, 0, 41, 0, 557, 0, 6], ["+", 0, 652, 3, 4, 0, 41, 0, 557, 0, 6]] | 5 | 23 |
#include <algorithm>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <string>
#include <vector>
#define endl "\n"
typedef long long int ll;
typedef unsigned long long int ull;
typedef float fl;
typedef short int si;
using namespace std;
void solve() {
string a, b;
cin >> a >> b;... | #include <algorithm>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <string>
#include <vector>
#define endl "\n"
typedef long long int ll;
typedef unsigned long long int ull;
typedef float fl;
typedef short int si;
using namespace std;
void solve() {
string a, b;
cin >> a >> b;... | [["-", 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 | 112 |
#include <stdio.h>
#include <string.h>
int main() {
char s[10], t[11];
scanf("%s %s", s, t);
int i;
for (i = 0; s[i] != '\0'; i++) {
if (s[i] != t[i]) {
printf("No\n");
}
}
if (t[i + 1] != '\0') {
printf("No\n");
} else {
printf("Yes\n");
}
return 0;
}
| #include <stdio.h>
#include <string.h>
int main() {
char s[20], t[20];
scanf("%s %s", s, t);
int i;
for (i = 0; s[i] != '\0'; i++) {
if (s[i] != t[i]) {
printf("No\n");
return 0;
}
}
if (t[i + 1] != '\0') {
printf("No\n");
} else {
printf("Yes\n");
}
return 0;
}
| [["-", 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, 1, 0, 35], ["+", 8, 9, 0, 57, 64, 9, 0, 37, 0, 38], ["+", 8, 9, 0, 57, 64, 9, 0, 37, 0, 13]] | 0 | 114 |
<?php
$s=str_split(fgets(STDIN));
$t=str_split(fgets(STDIN));
for($i=0;$i<count($s)-1;$i++){
if($s[$i]==$t[$i]){
$ans="YES";
}else{
$ans="No";
break;
}
}
echo $ans; | <?php
$s=str_split(fgets(STDIN));
$t=str_split(fgets(STDIN));
for($i=0;$i<count($s)-1;$i++){
if($s[$i]==$t[$i]){
$ans="Yes";
}else{
$ans="No";
break;
}
}
echo $ans; | [["-", 8, 9, 0, 1, 0, 11, 12, 609, 0, 610], ["+", 8, 9, 0, 1, 0, 11, 12, 609, 0, 610]] | 6 | 88 |
s=input()
t=input()
u=t[0:len(s)]
if s==u:
print("OK")
else:
print("NO")
| s=input()
t=input()
u=t[0:len(s)]
if s==u:
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 | 40 |
def main():
s = input()
t = input()
if s == t[0:len(t) - 1]:
print('Yes')
else:
print('No')
main | def main():
s = input()
t = input()
if s == t[0:len(t) - 1]:
print('Yes')
else:
print('No')
main() | [["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 45 |
#include <stdio.h>
#include <string.h>
int main(void) {
char S[256];
char T[256];
int len;
gets(S);
gets(T);
len = strlen(S);
if (strcmp(S, T) == 0) {
if (T[len + 1] == 0) {
printf("Yes");
} else {
printf("No");
}
} else {
printf("No");
}
return 0;
} | #include <stdio.h>
#include <string.h>
int main(void) {
char S[256];
char T[256];
int len;
gets(S);
gets(T);
len = strlen(S);
if (strncmp(S, T, len) == 0) {
if (T[len + 1] == 0) {
printf("Yes");
} else {
printf("No");
}
} else {
printf("No");
}
return 0;
} | [["-", 0, 57, 15, 23, 0, 16, 31, 2, 63, 22], ["+", 0, 57, 15, 23, 0, 16, 31, 2, 63, 22], ["+", 15, 23, 0, 16, 31, 2, 3, 4, 0, 21], ["+", 15, 23, 0, 16, 31, 2, 3, 4, 0, 22]] | 0 | 99 |
S=input()
T=input()
if T.find(S)==0:
print("yes")
else:
print("no")
| S=input()
T=input()
if T.find(S)==0:
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 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String str = sc.next();
String str1 = sc.next();
boolean b = false;
for (char c = 'a'; c <= 'z'; c++)
if ((str1 + c).equals(str))
b = true;
System.out.print... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String str = sc.next();
String str1 = sc.next();
boolean b = false;
for (char c = 'a'; c <= 'z'; c++) {
if ((str + c).equals(str1)) {
b = true;
}
}
... | [["+", 0, 195, 8, 196, 0, 7, 8, 196, 0, 45], ["-", 15, 15, 0, 492, 500, 23, 0, 16, 31, 22], ["+", 15, 15, 0, 492, 500, 23, 0, 16, 31, 22], ["-", 8, 57, 15, 15, 0, 492, 3, 4, 0, 22], ["+", 0, 57, 15, 15, 0, 492, 3, 4, 0, 22], ["+", 0, 7, 8, 196, 0, 57, 64, 196, 0, 45], ["+", 0, 7, 8, 196, 0, 57, 64, 196, 0, 46], ["+", 0... | 3 | 106 |
#include <stdio.h>
#include <string.h>
int main() {
char s[11], t[12];
scanf("%s%s", s, t);
int f = 1;
int n = strlen(s);
for (int i = 0; i < n; ++i) {
if (s[i] != t[i]) {
f = 0;
break;
}
}
if (f)
printf("yes");
else
printf("no");
return 0;
} | #include <stdio.h>
#include <string.h>
int main() {
char s[11], t[12];
scanf("%s%s", s, t);
int f = 1;
int n = strlen(s);
for (int i = 0; i < n; ++i) {
if (s[i] != t[i]) {
f = 0;
break;
}
}
if (f)
printf("Yes");
else
printf("No");
return 0;
}
| [["-", 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 | 103 |
S=input()
T=input()
ls = []
flg = False
for i in range(26):
#print(S+chr(ord("a")+i))
#print(type(T),type(S+chr(ord("a")+i)))
if T == S+chr(ord("a")+i):
flg = True
print("Yes")
break
else:
continue
if flg == True:
print("Yes")
else:
print("No")
| S=input()
T=input()
ls = []
flg = False
for i in range(26):
#print(S+chr(ord("a")+i))
#print(type(T),type(S+chr(ord("a")+i)))
if T == S+chr(ord("a")+i):
flg = True
#print("Yes")
break
else:
continue
if flg == True:
print("Yes")
else:
print("No")
| [["-", 0, 57, 64, 196, 0, 1, 0, 652, 63, 22], ["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 654], ["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 655], ["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 76 |
S,T=[input() for i in range(2)]
U=list(S)
W=list(T)
if S in T and len(S)+1==len(T) and U[1]==W[1]:
print("Yes")
else:
print("No") | S,T=[input() for i in range(2)]
U=list(S)
W=list(T)
if S in T and len(S)+1==len(T) and U[0]==W[0]:
print("Yes")
else:
print("No") | [["-", 0, 57, 15, 679, 12, 666, 0, 206, 206, 612], ["+", 0, 57, 15, 679, 12, 666, 0, 206, 206, 612]] | 5 | 69 |
/*
#include<algorithm>
#include<cmath>
#include<iomanip>
#include<iostream>
#include<limits.h>
#include<map>
#include<math.h>
#include<queue>
#include<set>
#include<stack>
#include<string>
#include<vector>
#include<stdio.h>
#include<stdlib.h>
#define rep(i,n) for(ll i = 0; i < (ll)n; i++)
#define swap(a,b) a^=b;b^=a;... | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include <stdio.h>
#include <stdlib.h>
#define rep(i, n) for (ll i = 0; i < (ll)n; i++)
#define swap(a,... | [["-", 15, 339, 51, 16, 12, 69, 341, 342, 0, 13], ["+", 15, 339, 51, 16, 12, 69, 341, 342, 0, 22]] | 1 | 185 |
S = input()
T = input()
ans = 'Yes'
if len(S) + 1 == len(T):
for i in range(len(S)):
if S[i] != T[i]:
ans = 'No'
else:
ans = 'No' | S = input()
T = input()
ans = 'Yes'
if len(S) + 1 == len(T):
for i in range(len(S)):
if S[i] != T[i]:
ans = 'No'
else:
ans = 'No'
print(ans) | [["+", 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 | 62 |
#include <algorithm>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <functional>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <vector>
using nam... | #include <algorithm>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <functional>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <vector>
using nam... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 98], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79]] | 1 | 123 |
S = input()
T = input()
if S == T[:len(S)+1]:
print("Yes")
else:
print("No") | S = input()
T = input()
if S == T[:len(S)]:
print("Yes")
else:
print("No")
| [["-", 15, 666, 0, 206, 206, 663, 0, 657, 17, 72], ["-", 15, 666, 0, 206, 206, 663, 0, 657, 12, 612]] | 5 | 38 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define pb push_back
#define all(v) (v).begin(), (v).end()
#define fi first
#define se second
#define sz(x) ((int)(x).size())
using ll = long long;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
#define MOD 1000000007
c... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define pb push_back
#define all(v) (v).begin(), (v).end()
#define fi first
#define se second
#define sz(x) ((int)(x).size())
using ll = long long;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
#define MOD 1000000007
c... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 256 |
s,t = input().split()
if s == t[:-1]:
print('Yes')
else:
print('No') | s = input()
t = input()
if s == t[:-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 | 35 |
#include <iostream>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define ll long long
using namespace std;
int main() {
string s;
string t;
cin >> s >> t;
if (t.compare(s.substr(0, s.size() - 1))) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
}
| #include <iostream>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define ll long long
using namespace std;
int main() {
string s;
string t;
cin >> s >> t;
if (s.compare(t.substr(0, t.size() - 1)) == 0) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
}
| [["-", 0, 57, 15, 339, 51, 2, 63, 118, 28, 22], ["+", 15, 339, 51, 16, 31, 2, 63, 118, 28, 22], ["-", 51, 2, 3, 4, 0, 2, 63, 118, 28, 22], ["+", 31, 2, 3, 4, 0, 2, 63, 118, 28, 22], ["-", 3, 4, 0, 16, 31, 2, 63, 118, 28, 22], ["+", 3, 4, 0, 16, 31, 2, 63, 118, 28, 22], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+",... | 1 | 78 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string s, c;
cin >> s;
cin >> c;
c.erase(c.begin() + s.length(), c.end());
if (c == s)
cout << "YES";
else
cout << "NO";
return 0;
}
| #include <iostream>
#include <string>
using namespace std;
int main() {
string s, c;
cin >> s;
cin >> c;
c.erase(c.begin() + s.length(), c.end());
if (c == s)
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], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 72 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string s, c;
cin >> s;
cin >> c;
if (c.length() > s.length()) {
c.erase(c.begin() + s.length(), c.end());
if (c == s)
cout << "YES\n";
else
cout << "NO\n";
} else
cout << "NO\n";
return 0;
}
| #include <iostream>
#include <string>
using namespace std;
int main() {
string s, c;
cin >> s;
cin >> c;
if (c.length() > s.length()) {
c.erase(c.begin() + s.length(), c.end());
if (c == s)
cout << "Yes\n";
else
cout << "No\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 | 98 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string s, c;
cin >> s;
cin >> c;
int len = c.length();
char str = c[--len];
c.erase(c.begin() + s.length(), c.end());
if (c == s && str >= 'a' && str <= 'z')
cout << "YES";
else
cout << "NO";
return 0;
}
| #include <iostream>
#include <string>
using namespace std;
int main() {
string s, c;
cin >> s;
cin >> c;
int len = c.length();
char str = c[--len];
c.erase(c.begin() + s.length(), c.end());
if (c == s && str >= 'a' && str <= 'z')
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], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 102 |
s = input()
t = input()
t_2 = []
for i in range(len(t) - 1):
t_2.append(t[i])
line = "".join(t_2)
if line == s:
print("Yes")
else:
print("No")
print (line) | s = input()
t = input()
t_2 = []
for i in range(len(t) - 1):
t_2.append(t[i])
line = "".join(t_2)
if line == s:
print("Yes")
else:
print("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 | 68 |
def c167(x):
if x[1][:-1] == x[0]: return "yes"
else: return "no"
if __name__=="__main__":
input1 = input()
input2 = input()
input3 = [input1,input2]
print(c167(input3)) | def c167(x):
if x[1][:-1] == x[0]: return "Yes"
else: return "No"
if __name__=="__main__":
input1 = input()
input2 = input()
input3 = [input1,input2]
print(c167(input3))
| [["-", 0, 57, 64, 196, 0, 37, 0, 557, 0, 6], ["+", 0, 57, 64, 196, 0, 37, 0, 557, 0, 6], ["-", 75, 76, 8, 196, 0, 37, 0, 557, 0, 6], ["+", 75, 76, 8, 196, 0, 37, 0, 557, 0, 6]] | 5 | 63 |
S = input()
T = input()
if(S==T[0:len(S)]):
print(Yes)
else:
print(No)
| S = input()
T = input()
if(S==T[0:len(S)]):
print('Yes')
else:
print('No')
| [["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 654], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 655]] | 5 | 35 |
S = ipnut()
T = input()
if(S==T[:len(S)]):
print("Yes")
else:
print("No") | S = input()
T = input()
if(S==T[:len(S)]):
print("Yes")
else:
print("No") | [["-", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22]] | 5 | 38 |
//#pragma GCC optimize ("O3")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pll;
typedef long double ld;
#define mp make_pair
#define f first
#define s second
#define pb push_back
const int N = 1000 + 5;
const int M = 201;
const int Q = 2e5 + 5;
const int OO = 2e9;
const int... | //#pragma GCC optimize ("O3")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pll;
typedef long double ld;
#define mp make_pair
#define f first
#define s second
#define pb push_back
const int N = 1000 + 5;
const int M = 201;
const int Q = 2e5 + 5;
const int OO = 2e9;
const int... | [["+", 8, 9, 0, 7, 15, 16, 12, 2, 63, 40], ["+", 0, 7, 15, 16, 12, 2, 3, 4, 0, 24], ["+", 0, 7, 15, 16, 12, 2, 3, 4, 0, 25], ["-", 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 | 171 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s1, s2;
int len, cnt = 0;
cin >> s1 >> s2;
len = s1.length();
for (int i = 0; i < len; i++) {
if (s1[i] != s2[i])
++cnt;
}
if (cnt > 0)
cout << "NO" << endl;
else
cout << "YES" << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string s1, s2;
long long len, cnt = 0;
cin >> s1 >> s2;
len = s1.length();
for (int i = 0; i < len; i++) {
if (s1[i] != s2[i])
++cnt;
}
if (cnt > 0)
cout << "No" << endl;
else
cout << "Yes" << endl;
return 0;
} | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 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 | 95 |
s=gets.chomp
t=gets.chomnp
if s == t.chop then
puts "Yes"
else
puts "No"
end | s=gets.chomp
t=gets.chomp
if s == t.chop then
puts "Yes"
else
puts "No"
end | [["-", 36, 36, 0, 493, 0, 662, 12, 652, 735, 22], ["+", 36, 36, 0, 493, 0, 662, 12, 652, 735, 22]] | 4 | 27 |
#include <cstdio>
#include <cstring>
using namespace std;
const int N = 10;
char s[N + 1];
char t[N + 2];
int main() {
scanf("%s%d", s, t);
int n = strlen(s);
t[n] = 0;
if (!strcmp(s, t))
printf("Yes\n");
else
printf("No\n");
return 0;
}
| #include <cstdio>
#include <cstring>
using namespace std;
const int N = 10;
char s[N + 1];
char t[N + 2];
int main() {
scanf("%s%s", s, t);
int n = strlen(s);
t[n] = 0;
if (!strcmp(s, t))
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]] | 1 | 92 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
string s, t;
cin >> s >> t;
int n = s.size();
int q = 0;
for (long i = 0; i < n; i++) {
if (s[i] == t[i]) {
q++;
} else {
cout << "No" << endl;
}
}
if (q == n) {
cout << "Yes" << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
string s, t;
cin >> s >> t;
int n = s.size();
int q = 0;
for (long i = 0; i < n; i++) {
if (s[i] == t[i]) {
q++;
} else {
cout << "No" << endl;
break;
}
}
if (q == n) {
cout << "Yes" << endl... | [["+", 0, 57, 75, 76, 0, 9, 0, 93, 0, 94], ["+", 0, 57, 75, 76, 0, 9, 0, 93, 0, 35]] | 1 | 102 |
S, T = input().split()
if S == T[:len(S)]:
print("Yes")
else:
print("No") | S = input()
T = input()
if S == T[:len(S)]:
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 | 37 |
#include <bits/stdc++.h>
using namespace std;
int main(void) {
string s, t;
cin >> s >> t;
int Pos = t.find(s);
if (Pos == string::npos) {
cout << "No" << endl;
} else {
cout << "Yes" << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main(void) {
string s, t;
cin >> s >> t;
int Pos = t.find(s);
if (Pos == string::npos || Pos != 0) {
cout << "No" << endl;
} else {
cout << "Yes" << endl;
}
} | [["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 79], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 63 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string s1, s2;
cin >> s1 >> s2;
s1.append("");
if (s1 == s2) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
}
| #include <iostream>
#include <string>
using namespace std;
int main() {
string s1, s2;
cin >> s1 >> s2;
s2.pop_back();
if (s1 == s2) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
} | [["-", 8, 9, 0, 1, 0, 2, 63, 118, 28, 22], ["+", 8, 9, 0, 1, 0, 2, 63, 118, 28, 22], ["-", 8, 9, 0, 1, 0, 2, 63, 118, 119, 120], ["+", 8, 9, 0, 1, 0, 2, 63, 118, 119, 120], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 62]] | 1 | 60 |
#include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
namespace __gnu_pbds {
typedef tree<int, null_type, less<int>, rb_tree_tag,
tree_order_statistics_node_update>
ordered_set;
}
using namespace __gnu_pbds;
#define endl '\n'
#defi... | #include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
namespace __gnu_pbds {
typedef tree<int, null_type, less<int>, rb_tree_tag,
tree_order_statistics_node_update>
ordered_set;
}
using namespace __gnu_pbds;
#define endl '\n'
#defi... | [["-", 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 | 246 |
#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;
t.pop_back();
if (s == t)
cout << "Yes" << endl;
else
"No";
return 0;
}
| #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;
t.pop_back();
if (s == t)
cout << "Yes" << endl;
else
cout << "No" << endl;
return 0;
}
| [["+", 75, 76, 0, 1, 0, 16, 31, 16, 31, 22], ["+", 75, 76, 0, 1, 0, 16, 31, 16, 17, 151], ["+", 0, 57, 75, 76, 0, 1, 0, 16, 17, 151], ["+", 0, 57, 75, 76, 0, 1, 0, 16, 12, 22]] | 1 | 75 |
s=str(input())
t=str(input())
num=0
if s == t[:-1]:
print("yes")
else:
print("no") | s=str(input())
t=str(input())
if s == t[:-1]:
print("Yes")
else:
print("No") | [["-", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["-", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["-", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612], ["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 43 |
#include <bits/stdc++.h>
using namespace std;
int main() {
std::ios_base::sync_with_stdio(false);
std::cin.tie(NULL);
string first, second;
std::cin >> first >> second;
for (int i = 0; i < first.length(); i++) {
if (first[i] != second[i]) {
std::cout << "NO" << '\n';
return 0;
}
}
std:... | #include <bits/stdc++.h>
using namespace std;
int main() {
std::ios_base::sync_with_stdio(false);
std::cin.tie(NULL);
string first, second;
std::cin >> first >> second;
for (int i = 0; i < first.length(); i++) {
if (first[i] != second[i]) {
std::cout << "No" << '\n';
return 0;
}
}
std:... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 107 |
print('YNeos'[input()>input()[:-1]::2]) | print('YNeos'[input()!=input()[:-1]::2]) | [["-", 3, 4, 0, 206, 206, 663, 0, 666, 667, 47], ["+", 3, 4, 0, 206, 206, 663, 0, 666, 667, 79]] | 5 | 23 |
# -*- coding: utf-8 -*-
s = str(input())
t = str(input())
if s == t[0:-2]:
print('Yes')
else:
print('No') | # -*- coding: utf-8 -*-
s = str(input())
t = str(input())
if s == t[0:-1]:
print('Yes')
else:
print('No') | [["-", 15, 666, 0, 206, 206, 663, 0, 664, 28, 612], ["+", 15, 666, 0, 206, 206, 663, 0, 664, 28, 612]] | 5 | 42 |
// CODING ME ACCHHA KARNEKA HAI TERKO TO BAS PRACTICE KARTE REH
#include <bits/stdc++.h>
#define pragma
using namespace std;
#define ll long long
#define ld long double
#define pb push_back
#define pf push_front
#define aisort sort(a, a + n)
#define adsort sort(a, a + n, greater<ll>())
#define PI 2 * acos(0)
typedef p... | // CODING ME ACCHHA KARNEKA HAI TERKO TO BAS PRACTICE KARTE REH
#include <bits/stdc++.h>
#define pragma
using namespace std;
#define ll long long
#define ld long double
#define pb push_back
#define pf push_front
#define aisort sort(a, a + n)
#define adsort sort(a, a + n, greater<ll>())
#define PI 2 * acos(0)
typedef p... | [["-", 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 | 424 |
#include <bits/stdc++.h>
#include <iostream>
#include <stdio.h>
// #include <ext/pb_ds/assoc_container.hpp> // Common file
// #include <ext/pb_ds/tree_policy.hpp> // Including
// tree_order_statistics_node_update
// using namespace __gnu_pbds;
using namespace std;
#define ordered_set ... | #include <bits/stdc++.h>
#include <iostream>
#include <stdio.h>
// #include <ext/pb_ds/assoc_container.hpp> // Common file
// #include <ext/pb_ds/tree_policy.hpp> // Including
// tree_order_statistics_node_update
// using namespace __gnu_pbds;
using namespace std;
#define ordered_set ... | [["-", 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 | 250 |
#include <iomanip>
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <vector>
using namespace std;
int main() {
string s, t;
cin >> s >> t;
int result = s.compare(0, s.size() - 1, t, 0, s.size() - 1);
if (result == 0 && t.size() == s.size() + 1) {
... | #include <iomanip>
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <vector>
using namespace std;
int main() {
string s, t;
cin >> s >> t;
int result = s.compare(0, s.size(), t, 0, s.size());
if (result == 0 && t.size() == s.size() + 1) {
cout <<... | [["-", 49, 50, 51, 2, 3, 4, 0, 16, 17, 33], ["-", 49, 50, 51, 2, 3, 4, 0, 16, 12, 13]] | 1 | 109 |
#include <bits/stdc++.h>
#include <iostream>
using namespace std;
typedef long long ll;
#define fast ios_base::sync_with_stdio(false), cin.tie(nullptr)
#define pi 3.14159265358979323846264338327950L
int main() {
fast;
int t;
cin >> t;
while (t--) {
string a, b;
cin >> a >> b;
char ch = b[b.length()... | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
typedef long long ll;
#define fast ios_base::sync_with_stdio(false), cin.tie(nullptr)
#define pi 3.14159265358979323846264338327950L
int main() {
fast;
int t = 1;
// cin>>t;
while (t--) {
string a, b;
cin >> a >> b;
char ch = b[b.len... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 93 |
n = str(input())
t = str(input())
N = list(n)
T = list(t)
del N[-1]
if N == T:
print("Yes")
else:
print("No") | n = str(input())
t = str(input())
N = list(n)
T = list(t)
del T[-1]
if N == T:
print("Yes")
else:
print("No") | [["-", 36, 36, 0, 656, 0, 688, 0, 206, 51, 22], ["+", 36, 36, 0, 656, 0, 688, 0, 206, 51, 22]] | 5 | 53 |
#include <bits/stdc++.h>
using namespace std;
typedef long long int lli;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
string s, t;
cin >> s;
cin >> t;
lli i, flag;
if (t.size() > s.size()) {
for (i = 0; i < s.size(); i++) {
if (s[i] != t[i]) {
flag = 0;... | #include <bits/stdc++.h>
using namespace std;
typedef long long int lli;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
string s, t;
cin >> s;
cin >> t;
int i, flag;
if (t.size() > s.size()) {
for (i = 0; i < s.size(); i++) {
if (s[i] != t[i]) {
flag = 0;... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 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 | 157 |
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
typedef tree<pair<int, int>, null_type, less<pair<int, int>>, rb_tree_tag,
tree_order_statistics_node_update>
oset;
#define sim template <class c
#defi... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
typedef tree<pair<int, int>, null_type, less<pair<int, int>>, rb_tree_tag,
tree_order_statistics_node_update>
oset;
#define sim template <class c
#defi... | [["-", 49, 373, 3, 347, 0, 16, 0, 42, 0, 35], ["-", 0, 53, 49, 373, 3, 347, 0, 16, 12, 22], ["-", 49, 65, 0, 53, 49, 373, 3, 347, 0, 47], ["-", 0, 14, 49, 65, 0, 53, 0, 42, 0, 47], ["-", 0, 14, 49, 65, 0, 53, 0, 42, 0, 22], ["+", 0, 42, 0, 16, 0, 42, 0, 11, 17, 32], ["+", 0, 42, 0, 11, 0, 42, 0, 2, 63, 13], ["-", 49, 6... | 1 | 429 |
s=input()
t=input()
n=len(s)
for i in range(n-1):
if s[i]==t[i]:
continue
else:
print('No')
exit()
print('Yes')
| s=input()
t=input()
n=len(s)
for i in range(n):
if s[i]==t[i]:
continue
else:
print('No')
exit()
print('Yes')
| [["-", 0, 7, 12, 652, 3, 4, 0, 657, 17, 33], ["-", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 55 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s, t, tem;
cin >> s >> t;
tem = t.substr(0, s.size());
if (tem == s)
cout << "YES";
else
cout << "NO";
cout << "\n";
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string s, t, tem;
cin >> s >> t;
tem = t.substr(0, s.size());
if (tem == s)
cout << "Yes";
else
cout << "No";
cout << "\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 | 68 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()
const ll INF = 1LL << 60;
int main() {
string s, t;
cin >> s >> t;
s.pop_back();
if (s == t) {
cout << "Yes" << endl;
} else
cout << "No" << ... |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()
const ll INF = 1LL << 60;
int main() {
string s, t;
cin >> s >> t;
t.pop_back();
if (s == t) {
cout << "Yes" << endl;
} else
cout << "No" << ... | [["-", 8, 9, 0, 1, 0, 2, 63, 118, 28, 22], ["+", 8, 9, 0, 1, 0, 2, 63, 118, 28, 22]] | 1 | 82 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s, t;
cin >> s >> t;
int N = s.size();
bool atcoder = true;
for (int i = 0; i < N; i++) {
if (s.at(i) != t.at(i)) {
atcoder = false;
}
}
if (atcoder) {
cout << "YES" << endl;
}
else {
cout << "NO" << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string s, t;
cin >> s >> t;
int N = s.size();
bool atcoder = true;
for (int i = 0; i < N; i++) {
if (s.at(i) != t.at(i)) {
atcoder = false;
}
}
if (atcoder) {
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 | 100 |
s,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, 656, 0, 1, 0, 662, 31, 684, 0, 21], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25]] | 5 | 31 |
S = input()
T = input()
if S == T[0:len(S)] and len(T) == len(S) + 1:
print("yes")
else:
print("No") | S = input()
T = input()
if S == T[0:len(S)] and len(T) == len(S) + 1:
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 | 49 |
S = input()
T = input()
if s + T[-1] == T:
print("Yes")
else:
print("No") | S = input(); T = input()
if S + T[-1] == T:
print("Yes")
else:
print("No") | [["+", 36, 36, 36, 36, 36, 36, 0, 656, 0, 35], ["-", 0, 656, 0, 57, 15, 666, 0, 657, 31, 22], ["+", 0, 656, 0, 57, 15, 666, 0, 657, 31, 22]] | 5 | 35 |
s = input()
t = input()
a = len(s)
if len(s) <=10 and len(s) >= 1 and len(t) == len(s) + 1 and t[0:a] == s[0:a]:
print('yes')
else:
print('no') | s = input()
t = input()
a = len(s)
if len(s) <=10 and len(s) >= 1 and len(t) == len(s) + 1 and t[0:a] == s[0:a]:
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 | 71 |
s = input()
t = input()
for i in range(len(s)):
if s[i] != t[i]:
print("No")
exit()
print("yes") | s = input()
t = input()
for i in range(len(s)):
if s[i] != t[i]:
print("No")
exit()
print("Yes")
| [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 47 |
#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target( \
"sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
#pragma GCC optimize("-ffloat-store")
#define fa... | #include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target( \
"sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
#pragma GCC optimize("-ffloat-store")
#define fa... | [["-", 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 | 472 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s, k;
cin >> s >> k;
int flag = 1;
for (int i = 0; i < (int)s.length(); i++) {
if (s[i] != k[i])
flag = 0;
}
if (flag == 1)
cout << "YES";
else
cout << "NO";
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string s, k;
cin >> s >> k;
int flag = 1;
for (int i = 0; i < (int)s.length(); i++) {
if (s[i] != k[i])
flag = 0;
}
if (flag == 1)
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 | 86 |
S = str(input())
T = str(input())
if S == T[:len(T)-2]:
print('Yes')
else:
print('No') | S = str(input())
T = str(input())
if S == T[:len(T)-1]:
print('Yes')
else:
print('No') | [["-", 15, 666, 0, 206, 206, 663, 0, 657, 12, 612], ["+", 15, 666, 0, 206, 206, 663, 0, 657, 12, 612]] | 5 | 44 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Scanner scan = new Scanner(System.in);
String[] str = new String[2];
for (int i = 0; i < str.length; i++) {
str[i] = scan.nextLine();
}
if (str[1].matches(str[0] + "\\w{1}")) {
S... | import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Scanner scan = new Scanner(System.in);
String[] str = new String[2];
for (int i = 0; i < str.length; i++) {
str[i] = scan.nextLine();
}
if (str[1].matches(str[0] + "\\w{1}")) {
S... | [["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491]] | 3 | 124 |
S = list(input())
T = list(input())
t = []
s = len(S)
for i in range(s):
t += T[i]
if t == S:
print("yes")
else:
print("No") | S = list(input())
T = list(input())
t = []
s = len(S)
for i in range(s):
t += T[i]
if t == 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 | 59 |
S = input()
T = input()
if len(S)>=1 and len(S)<=10:
if T == S[:-1] and len(T) == len(S)+1:
print('Yes')
exit()
print('No') | S = input()
T = input()
if len(S)>=1 and len(S)<=10:
if T[:-1] == S and len(T) == len(S)+1:
print('Yes')
exit()
print('No') | [["-", 64, 196, 0, 57, 15, 679, 31, 666, 667, 60], ["-", 0, 57, 15, 679, 31, 666, 0, 206, 51, 22], ["+", 64, 196, 0, 57, 15, 679, 31, 666, 667, 60], ["+", 64, 196, 0, 57, 15, 679, 31, 666, 0, 22]] | 5 | 62 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string s, t;
cin >> s >> t;
s.push_back(t[t.length() - 1]);
if (s.compare(t) == 0) {
cout << "YES\n";
} else {
cout << "NO\n";
}
return 0;
} | #include <iostream>
#include <string>
using namespace std;
int main() {
string s, t;
cin >> s >> t;
s.push_back(t[t.length() - 1]);
if (s.compare(t) == 0) {
cout << "Yes\n";
} else {
cout << "No\n";
}
return 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 | 74 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
string t;
cin >> t;
int c = 0;
c = t.size();
t.erase(c);
if (s == t) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
string t;
cin >> t;
int c = 0;
c = t.size();
t.erase(c - 1);
if (s == t) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
return 0;
} | [["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 33], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 1 | 76 |
S=input()
T=input()
newT=T[len(T)-1]
S=S+newT
if S==T:
print('yes')
else:
print('no')
| S=input()
T=input()
newT=T[len(T)-1]
S=S+newT
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 | 45 |
#include <bits/stdc++.h>
using namespace std;
string S, T;
void input() {
cin >> S;
cin >> T;
}
void solve() {
T.pop_back();
if (S == T) {
cout << "yes";
} else {
cout << "No";
}
}
int main() {
input();
solve();
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
string S, T;
void input() {
cin >> S;
cin >> T;
}
void solve() {
T.pop_back();
if (S == T) {
cout << "Yes";
} else {
cout << "No";
}
}
int main() {
input();
solve();
return 0;
}
| [["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 77 |
#include <bits/stdc++.h>
#define optimize \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define ll long long
#define ld long ... | #include <bits/stdc++.h>
#define optimize \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define ll long long
#define ld long ... | [["-", 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 | 188 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s, a;
cin >> s;
cin >> a;
s.pop_back();
int x = a.compare(s);
if (x == 0)
cout << "No";
else
cout << "Yes";
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string s, a;
cin >> s;
cin >> a;
a.pop_back();
int x = a.compare(s);
if (x == 0)
cout << "Yes";
else
cout << "No";
}
| [["-", 8, 9, 0, 1, 0, 2, 63, 118, 28, 22], ["+", 8, 9, 0, 1, 0, 2, 63, 118, 28, 22], ["-", 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 | 60 |
import java.util.*;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner in = new Scanner(System.in);
String s = in.next();
String str = in.next();
if (s.compareToIgnoreCase(str.substring(0, str.length() - 1)) == 0) {
System.out.println("ye... | import java.util.*;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner in = new Scanner(System.in);
String s = in.next();
String str = in.next();
if (s.compareToIgnoreCase(str.substring(0, str.length() - 1)) == 0) {
System.out.println("Ye... | [["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491]] | 3 | 105 |
a = input()
e = input()
b = len(a)
f = 0
for i in range(b) :
c = a[i]
d = e[i]
if not c == d :
if not f == 0 :
print("No")
f = 1
if f == 0 :
print("Yes") | a = input()
e = input()
b = len(a)
f = 0
for i in range(b) :
c = a[i]
d = e[i]
if not c == d :
if f == 0 :
print("No")
f = 1
if f == 0 :
print("Yes") | [["-", 0, 57, 64, 196, 0, 57, 15, 681, 0, 372]] | 5 | 71 |
#
from collections import Counter
k = input()
p = input()
p = p[0:len(p)-1]
print(p)
if k==p:
print('Yes')
else:
print('No') | #
from collections import Counter
k = input()
p = input()
p = p[0:len(p)-1]
if k==p:
print('Yes')
else:
print('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 | 51 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s, t;
cin >> s >> t;
int l = s.length(), i;
for (i = 0; i < l; i++) {
if (s[i] != t[i]) {
cout << "NO";
exit(0);
}
}
cout << "YES";
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string s, t;
cin >> s >> t;
int l = s.length(), i;
for (i = 0; i < l; i++) {
if (s[i] != t[i]) {
cout << "No";
exit(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 | 80 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.next();
String t = sc.next();
if (s.length() + 1 == t.length() && t.startsWith(s)) {
System.out.println("YES");
} else {
System.out.println("NO");... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.next();
String t = sc.next();
if (s.length() + 1 == t.length() && t.startsWith(s)) {
System.out.println("Yes");
} else {
System.out.println("No");... | [["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491]] | 3 | 103 |
<?php
$s = trim(fgets(STDIN));
$t = trim(fgets(STDIN));
$count = strlen($t);
$t1 = mb_substr($t, 0, $count-1);
if($t1 == $s){
echo "Yes";
}else{
echo "No";
}
?>
| <?php
$s = trim(fgets(STDIN));
$t = trim(fgets(STDIN));
$count = strlen($t);
$t1 = substr($t, 0, -1);
if($t1 == $s){
echo "Yes";
}else{
echo "No";
}
?> | [["-", 0, 493, 0, 1, 0, 11, 12, 613, 63, 141], ["+", 0, 493, 0, 1, 0, 11, 12, 613, 63, 141], ["-", 3, 3, 0, 28, 0, 16, 31, 606, 0, 607], ["-", 3, 3, 0, 28, 0, 16, 31, 606, 0, 141]] | 6 | 72 |
#include <bits/stdc++.h>
using namespace std;
int main()
{
// freopen("input.txt","r",stdin);
// freopen("output.txt","w",stdout);
string s1, s2, s3;
cin >> s1 >> s2;
s3 = s1 + s2[s2.size() - 1];
if (s2 == s3) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
int main()
{
// freopen("input.txt","r",stdin);
// freopen("output.txt","w",stdout);
string s1, s2, s3;
cin >> s1 >> s2;
s3 = s1 + s2[s2.size() - 1];
if (s2 == s3) {
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 | 69 |
#!/usr/bin/env python
"""AtCoder Beginner Contest 167: A -
https://atcoder.jp/contests/abc167/tasks/abc167_a
"""
__author__ = 'bugttle <bugttle@gmail.com>'
def main():
S = input()
T = input()
if S == T[0:-1]:
print('YES')
else:
print('NO')
if __name__ == '__main__':
main()
| #!/usr/bin/env python
"""AtCoder Beginner Contest 167: A -
https://atcoder.jp/contests/abc167/tasks/abc167_a
"""
__author__ = 'bugttle <bugttle@gmail.com>'
def main():
S = input()
T = input()
if S == T[0:-1]:
print('Yes')
else:
print('No')
if __name__ == '__main__':
main()
| [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 59 |
s = input()
t = input()
x = len(s)
if s[x - 1] == t:
print('Yes')
else:
print('No') | s = input()
t = input()
x = len(s)
if t[0:x] == s:
print('Yes')
else:
print('No') | [["-", 0, 656, 0, 57, 15, 666, 0, 206, 51, 22], ["+", 0, 656, 0, 57, 15, 666, 0, 206, 51, 22], ["+", 0, 57, 15, 666, 0, 206, 206, 663, 0, 612], ["+", 0, 57, 15, 666, 0, 206, 206, 663, 0, 102], ["-", 0, 57, 15, 666, 0, 206, 206, 657, 17, 33], ["-", 0, 57, 15, 666, 0, 206, 206, 657, 12, 612], ["-", 36, 36, 0, 656, 0, 57,... | 5 | 40 |
#include <stdio.h>
#include <string.h>
int main(void) {
char s[11], t[11];
scanf("%s", s);
scanf("%s", t);
if (strlen(s) + 1 != strlen(t)) {
printf("No");
return 0;
}
for (int i = 0; i < strlen(s) - 1; i++) {
if (s[i] != t[i]) {
printf("No");
return 0;
}
}
printf("Yes");
} | #include <stdio.h>
#include <string.h>
int main(void) {
char s[11], t[11];
scanf("%s", s);
scanf("%s", t);
if (strlen(s) + 1 != strlen(t)) {
printf("No");
return 0;
}
for (int i = 0; i < strlen(s); i++) {
if (s[i] != t[i]) {
printf("No");
return 0;
}
}
printf("Yes");
} | [["-", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 0 | 118 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string s, d;
cin >> s >> d;
int count = 0;
int m = s.length();
int n = d.length();
for (int i = 0; i < m; i++) {
if (s[i] == d[i]) {
count++;
}
}
if (n == m) {
if (m == count) {
cout << "Yes";
} else
... | #include <iostream>
#include <string>
using namespace std;
int main() {
string s, d;
cin >> s >> d;
int count = 0;
int m = s.length();
int n = d.length();
for (int i = 0; i < m; i++) {
if (s[i] == d[i]) {
count++;
}
}
if (n == m + 1) {
if (m == count) {
cout << "Yes";
} else
... | [["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 72], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 117 |
S = input()
T = input()
if T[:len(S)-1] == S:
print("Yes")
else:
print("No") | S = input()
T = input()
if T[:len(S)] == 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 | 38 |
#include <bits/stdc++.h>
#include <iostream>
using namespace std;
int main() {
string a, b;
cin >> a;
if (a.size() + 1 == b.size() &&
b.compare(0, b.size() - 1, a, 0, b.size() - 1) == 0) {
cout << "Yes";
} else {
cout << "No";
}
return 0;
} | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
int main() {
string a, b;
cin >> a >> b;
if (a.size() + 1 == b.size() &&
b.compare(0, b.size() - 1, a, 0, b.size() - 1) == 0) {
cout << "Yes";
} else {
cout << "No";
}
return 0;
} | [["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22]] | 1 | 88 |
S = input()
T = input()
if S == T[:-1] and len(S)==len(T)+1:
print('Yes')
else:
print('No')
| S = input()
T = input()
if S == T[:-1] and (len(S)+1)==len(T):
print('Yes')
else:
print('No')
| [["+", 0, 57, 15, 679, 12, 666, 0, 23, 0, 24], ["+", 0, 23, 0, 657, 31, 652, 3, 4, 0, 25], ["+", 15, 679, 12, 666, 0, 23, 0, 657, 17, 72], ["+", 15, 679, 12, 666, 0, 23, 0, 657, 12, 612], ["-", 0, 57, 15, 679, 12, 666, 0, 657, 17, 72], ["-", 0, 57, 15, 679, 12, 666, 0, 657, 12, 612]] | 5 | 46 |
S=input()
T=input()
if T.startswith(S):
if len(T)==len(S)+1:
print('YES')
else:
print('NO') | S=input()
T=input()
if T.startswith(S):
if len(T)==len(S)+1:
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 | 45 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string S;
cin >> S;
string T;
cin >> T;
if (S == T.substr(0, T.size() - 1))
cout << "yes" << endl;
else
cout << "no" << endl;
} | #include <iostream>
#include <string>
using namespace std;
int main() {
string S;
cin >> S;
string T;
cin >> T;
if (S == T.substr(0, T.size() - 1))
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 | 64 |
#include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <vector>
#define fast_io \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); ... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <vector>
#define fast_io \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); ... | [["-", 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, 17, 107], ["+", 8, 9, 0, 1, 0, 11, 12, 69, 28, 22], ["-", 341, 342, 0, 16, 31, 2, 63, 118, 28, 22], ["+", 341, 342, 0, 16, 31, 2, 63, 118, 28, 22]] | 1 | 204 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s, t;
cin >> s >> t;
if (s == t.substr(0, t.size() - 1) && s.size() + 1 == t.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, t.size() - 1) && s.size() + 1 == t.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 | 80 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s, t;
cin >> s >> t;
if (s.size() == 1 && s.at(0) == t.at(0) && t.size() == s.size() + 1) {
cout << "Yes" << endl;
return 0;
}
if (s == t.substr(0, s.size() - 1) && t.size() == s.size() + 1) {
cout << "Yes" << endl;
} else {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
string s, t;
cin >> s >> t;
if (s.size() == 1 && s.at(0) == t.at(0) && t.size() == s.size() + 1) {
cout << "Yes" << endl;
return 0;
}
if (s == t.substr(0, s.size()) && t.size() == s.size() + 1) {
cout << "Yes" << endl;
} else {
cou... | [["-", 31, 16, 12, 2, 3, 4, 0, 16, 17, 33], ["-", 31, 16, 12, 2, 3, 4, 0, 16, 12, 13]] | 1 | 128 |
#include <algorithm>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define int long long
#define endl "\n";
#define debug(x) cout << #x << " is... | #include <algorithm>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define int long long
#define endl "\n";
#define debug(x) cout << #x << " is... | [["-", 15, 339, 51, 16, 31, 2, 63, 118, 28, 22], ["+", 15, 339, 51, 16, 31, 2, 63, 118, 28, 22], ["-", 3, 4, 0, 16, 31, 2, 63, 118, 28, 22], ["+", 3, 4, 0, 16, 31, 2, 63, 118, 28, 22], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22]] | 1 | 177 |
S = list(input())
T = list(input())
if S == T[0:-1]:
print('Yes')
else:
print('no') | S = list(input())
T = list(input())
if S == T[0:-1]:
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 | 41 |
S=input()
T=input()
print("Yes" if S+T[-1]==T else "NG")
| S=input()
T=input()
print("Yes" if S+T[-1]==T else "No")
| [["-", 0, 652, 3, 4, 0, 41, 0, 557, 0, 6], ["+", 0, 652, 3, 4, 0, 41, 0, 557, 0, 6]] | 5 | 30 |
#include <bits/stdc++.h>
#define int long long int
#define gif(a, b) (a / b + (a % b ? 1 : 0))
#define watch(x) cout << (#x) << " is " << (x) << "\n";
using namespace std;
int32_t main() {
cin.tie(NULL);
std::ios::sync_with_stdio(false);
string s, t;
cin >> s >> t;
int n = t.length();
t[n - 1] = '\0';
i... | #include <bits/stdc++.h>
#define int long long int
#define gif(a, b) (a / b + (a % b ? 1 : 0))
#define watch(x) cout << (#x) << " is " << (x) << "\n";
using namespace std;
int32_t main() {
cin.tie(NULL);
std::ios::sync_with_stdio(false);
string s, t;
cin >> s >> t;
int n = t.length();
s += t[n - 1];
if ... | [["+", 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, 17, 32], ["-", 8, 9, 0, 1, 0, 11, 12, 103, 0, 104], ["-", 8, 9, 0, 1, 0, 11, 12, 103, 0, 44]] | 1 | 98 |
#include <bits/stdc++.h>
using namespace std;
char S[15], T[15];
int p, q, flag;
int main() {
cin >> S >> T;
p = strlen(S);
q = strlen(T);
for (int i = 1; i <= p - 1; i++) {
if (S[i] == T[i] && q == p + 1) {
flag = 0;
} else {
flag = 1;
break;
}
}
if (flag == 1)
cout << "No... | #include <bits/stdc++.h>
using namespace std;
char S[15], T[15];
int p, q, flag;
int main() {
cin >> S >> T;
p = strlen(S);
q = strlen(T);
for (int i = 0; i <= p - 1; i++) {
if (S[i] == T[i] && q == p + 1) {
flag = 0;
} else {
flag = 1;
break;
}
}
if (flag == 1)
cout << "No... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 123 |
#include <iostream>
using namespace std;
int main() {
string S, T;
cin >> S;
cin >> T;
T.pop_back();
if (S == T) {
printf("yes");
} else {
printf("no");
}
return 0;
} | #include <iostream>
using namespace std;
int main() {
string S, T;
cin >> S;
cin >> T;
T.pop_back();
if (S == T) {
printf("Yes");
} else {
printf("No");
}
return 0;
} | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 59 |
s = input()
t = input()
if s in t and len(t) == len(s) + 1 and s[0] != t[0]:
print('Yes')
else:
print('No')
| s = input()
t = input()
if s in t and len(t) == len(s) + 1 and s[0] == t[0]:
print('Yes')
else:
print('No')
| [["-", 0, 656, 0, 57, 15, 679, 12, 666, 667, 79], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 667, 60]] | 5 | 51 |
s = input()
t = input()
print("YES" if t[:-1] == s else "NO")
| s = input()
t = input()
print("Yes" if t[:-1] == s else "No")
| [["-", 0, 652, 3, 4, 0, 41, 0, 557, 0, 6], ["+", 0, 652, 3, 4, 0, 41, 0, 557, 0, 6]] | 5 | 29 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int l;
string p, q;
cin >> p >> q;
l = q.length();
p += q[l - 1];
if (p == q)
cout << "YES";
else
cout << "NO";
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int l;
string p, q;
cin >> p >> q;
l = q.length();
p += q[l - 1];
if (p == q)
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], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 65 |
S, T = input().split()
if T[:-1] == S:
print('Yes')
else:
print('No') | S = input()
T = input()
if T[:-1] == S:
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 | 35 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.