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 <algorithm> #include <array> #include <bitset> #include <cassert> #include <cctype> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <iostream> #include <list> #include <map> #include <numeric> #include <q...
#include <algorithm> #include <array> #include <bitset> #include <cassert> #include <cctype> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <iostream> #include <list> #include <map> #include <numeric> #include <q...
[["-", 8, 9, 0, 57, 64, 9, 0, 37, 0, 38], ["-", 8, 9, 0, 57, 64, 9, 0, 37, 0, 13], ["+", 8, 9, 0, 57, 64, 9, 0, 116, 0, 117]]
1
1,019
#include <bits/stdc++.h> #define all(X) (X).begin(), (X).end() #define rall(X) (X).rbegin(), (X).rend() #define pub push_back #define puf push_front #define pob pop_back #define pof pop_front #define ff first #define ss second #define P 1000000007 #define CASET ...
#include <bits/stdc++.h> #define all(X) (X).begin(), (X).end() #define rall(X) (X).rbegin(), (X).rend() #define pub push_back #define puf push_front #define pob pop_back #define pof pop_front #define ff first #define ss second #define P 1000000007 #define CASET ...
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22]]
1
1,206
#include <bits/stdc++.h> #define SZ(x) ((int)x.size()) #define UNI(x) sort(ALL(x)), x.resize(unique(ALL(x)) - x.begin()); #define GETPOS(c, x) (lower_bound(ALL(c), x) - c.begin()) #define GETpos(c, x) (lower_bound(ALL(c), x) - c.begin()) //// #define MST(x, val) memset((x), val, sizeof((x))); #define ls rt << 1 #define...
#include <bits/stdc++.h> #define SZ(x) ((int)x.size()) #define UNI(x) sort(ALL(x)), x.resize(unique(ALL(x)) - x.begin()); #define GETPOS(c, x) (lower_bound(ALL(c), x) - c.begin()) #define GETpos(c, x) (lower_bound(ALL(c), x) - c.begin()) //// #define MST(x, val) memset((x), val, sizeof((x))); #define ls rt << 1 #define...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 354]]
1
1,722
from collections import defaultdict, deque, Counter from heapq import heappush, heappop, heapify import bisect import random from itertools import permutations, accumulate, combinations, product import sys import string from bisect import bisect_left, bisect_right from math import factorial, ceil, floor, acos, asin, at...
from collections import defaultdict, deque, Counter from heapq import heappush, heappop, heapify import bisect import random from itertools import permutations, accumulate, combinations, product import sys import string from bisect import bisect_left, bisect_right from math import factorial, ceil, floor, acos, asin, at...
[["-", 0, 1, 0, 662, 12, 657, 31, 206, 51, 22], ["+", 0, 1, 0, 662, 12, 657, 31, 206, 51, 22]]
5
933
#写経 #https://atcoder.jp/contests/abc168/submissions/14421546 import sys sys.setrecursionlimit(10**9) input = sys.stdin.readline from bisect import bisect_left, bisect_right INF = 10 **18 def resolve(): n,m = map(int,input().split()) a = [list(map(int,input().split())) for i in range(n)] b = [list(map(int,i...
#写経 #https://atcoder.jp/contests/abc168/submissions/14421546 import sys sys.setrecursionlimit(10**9) input = sys.stdin.readline from bisect import bisect_left, bisect_right INF = 10 **18 def resolve(): n, m = map(int, input().split()) a = [list(map(int, input().split())) for i in range(n)] b = [list(map(in...
[["-", 12, 658, 0, 659, 12, 652, 3, 4, 0, 22], ["+", 12, 658, 0, 659, 12, 652, 3, 4, 0, 22]]
5
640
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S; cin >> T; if (S == T.substr(0, T.size() - 1)) { cout << "YES" << endl; } else { cout << "NO" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S; cin >> T; if (S == T.substr(0, 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
65
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; t.pop_back(); if (s == t) cout << "yes" << endl; else cout << "no" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; t.pop_back(); 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
52
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; t.erase(t.size() - 1); if (s != t) cout << "Yes" << endl; else cout << "No" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; t.erase(t.size() - 1); if (s != t) cout << "No" << endl; else cout << "Yes" << 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
59
s,t=input().split() if(t[0:-1]==s): print("Yes") else: print("No")
s=input() t=input() if(t[0:-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
38
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String line1 = br.readLine(); String line2 = br.readLine()...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String line1 = br.readLine(); String line2 = br.readLine()...
[["-", 3, 4, 0, 492, 3, 4, 0, 16, 12, 499], ["+", 3, 4, 0, 492, 3, 4, 0, 16, 12, 499]]
3
108
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; int len = s.length(); if (t.substr(0, len) == s) { cout << "YES" << endl; } else { cout << "NO" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; int len = s.length(); if (t.substr(0, len) == s) { 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
66
def resolve(): S = input() T = input() if re.match(r'[a-z]{1,10}', S) and re.match(S + '.', T): print('Yes') return print('No') resolve()
import re def resolve(): S = input() T = input() if re.match(r'[a-z]{1,10}', S) and re.match(S + '.', T): print('Yes') return print('No') resolve()
[["+", 36, 36, 36, 36, 0, 656, 0, 596, 0, 487], ["+", 36, 36, 0, 656, 0, 596, 141, 673, 0, 22]]
5
56
s=input() t=input() pr=t[:len(t)-1] if pr==s: print("YES") else: print("NO")
s=input() t=input() pr=t[:len(t)-1] if pr==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
41
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; #define srev reverse(s.begin(), s.end()) #define sortstr sort(s.begin(), s.end()); #define gtl(x) getline(cin, (x)) #define gcd(a, b) __gcd(a, b) #define lcm(a, b) ((a) * ((b) / gcd(a, b))) #define PI acos(-1) #define P...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; #define srev reverse(s.begin(), s.end()) #define sortstr sort(s.begin(), s.end()); #define gtl(x) getline(cin, (x)) #define gcd(a, b) __gcd(a, b) #define lcm(a, b) ((a) * ((b) / gcd(a, b))) #define PI acos(-1) #define 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
367
#define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <bitset> #include <cassert> #include <climits> #include <cstring> #include <float.h> #include <fstream> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <map> #include <numeric> #include <queue> #include...
#define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <bitset> #include <cassert> #include <climits> #include <cstring> #include <float.h> #include <fstream> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <map> #include <numeric> #include <queue> #include...
[["-", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]]
1
1,199
#include <bits/stdc++.h> using namespace std; int main() { string s, t; int col = 0; cin >> s >> t; int len = s.length(); for (int i = 0, j = 0; i < len; i++, j++) { if (t[j] == s[i]) col++; } if (col == len) cout << "YES"; else cout << "NO"; }
#include <bits/stdc++.h> using namespace std; int main() { string s, t; int col = 0; cin >> s >> t; int len = s.length(); for (int i = 0, j = 0; i < len; i++, j++) { if (t[j] == s[i]) col++; } if (col == len) 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
94
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <string> inline void read(int &T) { int x = 0; bool f = 0; char c = getchar(); while (c < '0' || c > '9') { if (c == '-') f = !f; c = getchar(); } while (c >= '0' && c <= '9') { x = x * 10 + c - '0'; ...
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <string> inline void read(int &T) { int x = 0; bool f = 0; char c = getchar(); while (c < '0' || c > '9') { if (c == '-') f = !f; c = getchar(); } while (c >= '0' && c <= '9') { x = x * 10 + c - '0'; ...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
223
/* In every question first approach must be basic, atleast give 15 mins for try to solve in basic approach */ #include <algorithm> #include <cmath> #include <cstring> #include <initializer_list> #include <iomanip> #include <iostream> #include <limits.h> #include <map> #include <queue> #include <set> #include <stack> #i...
/* In every question first approach must be basic, atleast give 15 mins for try to solve in basic approach */ #include <algorithm> #include <cmath> #include <cstring> #include <initializer_list> #include <iomanip> #include <iostream> #include <limits.h> #include <map> #include <queue> #include <set> #include <stack> #i...
[["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]]
1
289
#include <iostream> using namespace std; typedef long long int ll; typedef unsigned long long int ull; #define test(t) \ int t; \ cin >> t; ...
#include <iostream> using namespace std; typedef long long int ll; typedef unsigned long long int ull; #define test(t) \ int t; \ cin >> t; ...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
154
#include <bits/stdc++.h> using namespace std; #define int long long int #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(0); \ co...
#include <bits/stdc++.h> using namespace std; #define int long long int #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(0); \ co...
[["-", 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
152
s = gets.chomp t = gets.chop if(s == t) puts 'Yes' else puts 'No' end
s = gets.chomp t = gets.chomp.chop if(s == t) puts 'Yes' else puts 'No' end
[["+", 0, 493, 0, 662, 12, 652, 486, 652, 735, 22], ["+", 36, 36, 0, 493, 0, 662, 12, 652, 17, 131]]
4
26
#include <bits/stdc++.h> #define rep(i, s, n) for (int i = s; i <= n; i++) using namespace std; int main() { string a, b; cin >> a >> b; int l = b.length(); int t = 0; rep(i, 0, l - 1) { if (a[i] = b[i]) t++; } if (t == l) cout << "Yes\n"; else cout << "No\n"; }
#include <bits/stdc++.h> #define rep(i, s, n) for (int i = s; i <= n; i++) using namespace std; int main() { string a, b; cin >> a >> b; int l = b.length(); int t = 0; rep(i, 0, l - 1) { if (a[i] == b[i]) t++; } if (t == l - 1) cout << "Yes\n"; else cout << "No\n"; }
[["-", 0, 9, 0, 57, 15, 339, 51, 11, 17, 32], ["+", 0, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 33], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]]
1
96
s = gets.chomp t = gets.chomp puts s == t[0, t.size - 2] ? "Yes" : "No"
s = gets.chomp t = gets.chomp puts s == t[0, t.size - 1] ? "Yes" : "No"
[["-", 0, 754, 15, 738, 12, 742, 0, 738, 12, 612], ["+", 0, 754, 15, 738, 12, 742, 0, 738, 12, 612]]
4
31
#include <bits/stdc++.h> using namespace std; typedef long long ll; // long longをllで表せる int main() { string a; string b; cin >> a >> b; int count = 0; for (int i = 0; i < a.size(); i++) { if (a.at(i) != b.at(i)) { count++; } } if (count == 0) { cout << "yes"; } else { cout << "N...
#include <bits/stdc++.h> using namespace std; typedef long long ll; // long longをllで表せる int main() { string a; string b; cin >> a >> b; int count = 0; for (int i = 0; i < a.size(); i++) { if (a.at(i) != b.at(i)) { count++; } } if (count == 0) { cout << "Yes"; } else { cout << "N...
[["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6]]
1
99
#include <bits/stdc++.h> using namespace std; int main() { string s; string t; cin >> s >> t; if (s == t.erase(s.size())) { cout << "yes"; } else { cout << "No"; } }
#include <bits/stdc++.h> using namespace std; int main() { string s; string t; cin >> s >> t; if (s == t.erase(s.size())) { 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]]
1
56
s=input() t=input() l=len(s) if len(s)+1 == len(t): si=s+t[l] else: si="" if si == t and len(si) == len(t): print("yes") else: print("no")
s=input() t=input() l=len(s) if len(s)+1 == len(t): si=s+t[l] else: si="" if si == t and len(si) == len(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
72
#include <bits/stdc++.h> using namespace std; int main(void) { string s, t; int i, flag = 0; cin >> s; cin >> t; for (i = 0; i < s.size(); i++) { if (s[i] == t[i]) flag = 1; else flag = 0; } if (flag == 1 && t.size() > s.size()) cout << "Yes" << endl; else cout << "No" << e...
#include <bits/stdc++.h> using namespace std; int main(void) { string s, t; int i, flag = 0; cin >> s; cin >> t; for (i = 0; i < s.size(); i++) { if (s[i] == t[i]) flag = 1; else { flag = 0; break; } } if (flag == 1 && t.size() > s.size()) cout << "Yes" << endl; else ...
[["+", 8, 9, 0, 57, 75, 76, 0, 9, 0, 45], ["+", 0, 57, 75, 76, 0, 9, 0, 1, 0, 35], ["+", 0, 57, 75, 76, 0, 9, 0, 93, 0, 94], ["+", 8, 9, 0, 57, 75, 76, 0, 9, 0, 46]]
1
111
#include <stdio.h> int main() { char s[20], t[20]; scanf("%s", s); scanf("%s", t); for (int i = 0; i <= 15; i++) { if (90 < s[i] < 200) { s[i] = 'A'; } } for (int i = 0; i <= 20; i++) { if (s[i] == 'A') { break; } if (s[i] != t[i]) { printf("No"); return 0; ...
#include <stdio.h> int main() { char s[20], t[20]; scanf("%s", s); scanf("%s", t); for (int i = 0; i <= 15; i++) { if (90 > s[i]) { s[i] = 'A'; } } for (int i = 0; i <= 20; i++) { if (s[i] == 'A') { break; } if (s[i] != t[i]) { printf("No"); return 0; } } ...
[["-", 0, 57, 15, 23, 0, 16, 31, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 47], ["-", 8, 9, 0, 57, 15, 23, 0, 16, 17, 18], ["-", 8, 9, 0, 57, 15, 23, 0, 16, 12, 13]]
0
140
a = gets.chomp b = gets.chomp if /^#{a}[a-z]{1}/ === b then p 'Yes' else p 'No' end
a = gets.chomp b = gets.chomp if /^#{a}[a-z]{1}/ === b then puts 'Yes' else puts 'No' end
[["-", 0, 493, 0, 121, 64, 749, 0, 652, 735, 22], ["+", 0, 493, 0, 121, 64, 749, 0, 652, 735, 22], ["-", 0, 493, 0, 121, 75, 95, 0, 652, 735, 22], ["+", 0, 493, 0, 121, 75, 95, 0, 652, 735, 22]]
4
31
S=input() T=input() if(S[:-1]==T): print("Yes") else: print("No")
S=input() T=input() if(S==T[:-1]): 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
#!/usr/bin/env python3 import sys YES = "Yes" # type: str NO = "No" # type: str def solve(S: str, T: str): if (S == T[:-1]): print("YES") return 0 print("NO") return 1 # Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools (tips: You use the default template now. You can ...
#!/usr/bin/env python3 import sys YES = "Yes" # type: str NO = "No" # type: str def solve(S: str, T: str): if (S == T[:-1]): print(YES) return 0 print(NO) return 1 # Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools (tips: You use the default template now. You can remo...
[["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 654], ["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 655]]
5
119
#include <bits/stdc++.h> using namespace std; #define int long long #define uset unordered_set #define umap unordered_map #define db(x) cout << #x << " == " << x << ";\n" #define a(x) x.begin(), x.end() #define input(v, n) \ for (int i = 0; i < n; i++) ...
#include <bits/stdc++.h> using namespace std; #define int long long #define uset unordered_set #define umap unordered_map #define db(x) cout << #x << " == " << x << ";\n" #define a(x) x.begin(), x.end() #define input(v, n) \ for (int i = 0; i < n; i++) ...
[["-", 0, 1, 0, 41, 64, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 41, 64, 16, 12, 5, 0, 6], ["-", 0, 1, 0, 41, 75, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 41, 75, 16, 12, 5, 0, 6]]
1
156
S = input() T = input() if len(T) == 2 and S[0] == T[1]: print("Yes") else: if S[0] == T[0]: T = T.replace(S,"") if len(T)==1: print("Yes") else: print("No") else: print("No")
S = input() T = input() if len(T) == 2 and S[0] == T[0]: print("Yes") else: if S[0] == T[0]: T = T.replace(S,"") if len(T)==1: print("Yes") else: print("No") else: print("No")
[["-", 0, 57, 15, 679, 12, 666, 0, 206, 206, 612], ["+", 0, 57, 15, 679, 12, 666, 0, 206, 206, 612]]
5
88
import re x = input() y = input() if x in y: if len(re.findall(x+'(.*)', y)) == 1: print('Yes') else: print('No') else: print('No')
import re x = input() y = input() if x in y: if len(re.findall(x+'(.*)', y)[0]) == 1: print('Yes') else: print('No') else: print('No')
[["+", 15, 666, 0, 652, 3, 4, 0, 206, 0, 70], ["+", 15, 666, 0, 652, 3, 4, 0, 206, 206, 612], ["+", 15, 666, 0, 652, 3, 4, 0, 206, 0, 73]]
5
58
S=input() T=input() L=len(S) if(S[:L-1] == T[:L-1]): print("Yes") else: print("No")
S=input() T=input() L=len(S) if(S[:L] == T[:L]): print("Yes") else: print("No")
[["-", 0, 666, 0, 206, 206, 663, 0, 657, 17, 33], ["-", 0, 666, 0, 206, 206, 663, 0, 657, 12, 612]]
5
49
#pragma GCC optimize(2) #pragma GCC optimize(3) #include <bits/stdc++.h> using namespace std; #define IO std::ios::sync_with_stdio(false) #define ll long long #define rep(i, l, r) for (int i = l; i <= r; i++) #define per(i, l, r) for (int i = l; i >= r; i--) #define mset(s, _) memset(s, _, sizeof(s)) #define pb push_ba...
#pragma GCC optimize(2) #pragma GCC optimize(3) #include <bits/stdc++.h> using namespace std; #define IO std::ios::sync_with_stdio(false) #define ll long long #define rep(i, l, r) for (int i = l; i <= r; i++) #define per(i, l, r) for (int i = l; i >= r; i--) #define mset(s, _) memset(s, _, sizeof(s)) #define pb push_ba...
[["-", 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]]
1
289
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; T.pop_back(); if (!S.compare(T)) cout << "YES"; else cout << "NO"; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; T.pop_back(); if (!S.compare(T)) 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
55
#include <limits.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #define REP(i, n) for (i = 0; i < n; i++) #define MAX 1000000 #define MOD 1000000007 long long fac[MAX], finv[MAX], inv[MAX]; // prototype declaration int i_in(); long long ll_in(); double d_in(); char c_in(); void s_in...
#include <limits.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #define REP(i, n) for (i = 0; i < n; i++) #define MAX 1000000 #define MOD 1000000007 long long fac[MAX], finv[MAX], inv[MAX]; // prototype declaration int i_in(); long long ll_in(); double d_in(); char c_in(); void s_in...
[["-", 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
1,317
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; t.resize(t.size() - 1); if (s == t) { cout << "YES"; } else { cout << "NO"; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; t.resize(t.size() - 1); if (s == t) { cout << "Yes"; } else { cout << "No"; } 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
62
#include <bits/stdc++.h> using namespace std; #define M 1000000007 #define FastIO \ ios::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie...
#include <bits/stdc++.h> using namespace std; #define M 1000000007 #define FastIO \ ios::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79]]
1
231
#include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <iterator> #include <list> #include <map> #include <numeric> #inclu...
#include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <iterator> #include <list> #include <map> #include <numeric> #inclu...
[["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6]]
1
157
// Bismillahir Rahmanir Rahim #include <bits/stdc++.h> #include <iomanip> typedef long long ll; typedef unsigned long long ul; #define pi acos(-1) #define ll long long #define ull unsigned long long #define vec vector<ll> #define f1(i, n) for (i = 1; i < n; i++) int i, j; using namespace std; int main() { // freopen(...
// Bismillahir Rahmanir Rahim #include <bits/stdc++.h> #include <iomanip> typedef long long ll; typedef unsigned long long ul; #define pi acos(-1) #define ll long long #define ull unsigned long long #define vec vector<ll> #define f1(i, n) for (i = 1; i < n; i++) int i, j; using namespace std; int main() { // freopen(...
[["-", 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
117
#include <bits/stdc++.h> using namespace std; char s[105], t[105]; char a[105], x[105]; int main() { scanf("%s", s); scanf("%s", t); for (int i = 1; i <= strlen(s) - 1; i++) a[i] = s[i]; for (int i = 1; i <= strlen(t) - 2; i++) x[i] = t[i]; if (strcmp(a, x) == 0) printf("Yes"); else printf("...
#include <bits/stdc++.h> using namespace std; char s[105], t[105]; char a[105], x[105]; int main() { scanf("%s", s); scanf("%s", t); for (int i = 0; i <= strlen(s) - 1; i++) a[i] = s[i]; for (int i = 0; i <= strlen(t) - 2; i++) x[i] = t[i]; if (strcmp(a, x) == 0) printf("Yes"); else printf("...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
139
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s; cin >> t; int ln = s.length(); int ln1 = t.length(); int cnt = 0; for (int i = 0; i < ln; i++) { if (s[i] == t[i]) { continue; } else { cnt++; break; } } if (cnt == 0) { if (ln1 - 1 == l...
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s; cin >> t; int ln = s.length(); int ln1 = t.length(); int cnt = 0; for (int i = 0; i < ln; i++) { if (s[i] == t[i]) { continue; } else { cnt++; break; } } if (cnt == 0) { if (ln1 - 1 == l...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
163
#include <iostream> #include <string> using namespace std; int main() { string S, T; cin >> S >> T; if (T.find(S) != string::npos) cout << "Yes" << endl; else cout << "No" << endl; return 0; }
#include <iostream> #include <string> using namespace std; int main() { string S, T; cin >> S >> T; if (T.find(S) == 0) cout << "Yes" << endl; else cout << "No" << endl; return 0; }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79], ["-", 0, 57, 15, 339, 51, 16, 12, 343, 345, 348], ["-", 0, 57, 15, 339, 51, 16, 12, 343, 0, 349], ["-", 0, 57, 15, 339, 51, 16, 12, 343, 141, 22], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]]
1
58
#include <bits/stdc++.h> using namespace std; int main() { string s, t, u; int cnt = 0; cin >> s >> t; if (t.length() - s.length() == 1) { // for(int i=0;i<s.length();i++) // { // if(s[i]!=t[i]); // cnt++; // } // if(cnt==0) // cout<<"YES...
#include <bits/stdc++.h> using namespace std; int main() { string s, t, u; int cnt = 0; cin >> s >> t; if (t.length() - s.length() == 1) { // for(int i=0;i<s.length();i++) // { // if(s[i]!=t[i]); // cnt++; // } // if(cnt==0) // cout<<"YES...
[["-", 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], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
103
S = input() T = input() flag = False for i in "abcdefghijklmnopqrstuvwxyz": if T==S+i: print("YES") flag = True break if flag == False: print("NO")
S = input() T = input() flag = False for i in "abcdefghijklmnopqrstuvwxyz": if T==S+i: print("Yes") flag = True break if flag == False: print("No")
[["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]]
5
48
#include <stdio.h> #include <string.h> int main() { char str1[10], str2[10]; int c = 1; scanf("%s %s", str1, str2); for (int i = 0; i <= (strlen(str1)); ++i) if (str1[i] != str2[i]) c = 0; if (c == 1) printf("%s\n", "Yes"); else printf("%s\n", "No"); return 0; }
#include <stdio.h> #include <string.h> int main() { char str1[11], str2[11]; int c = 1; scanf("%s %s", str1, str2); for (int i = 0; i < (strlen(str1)); ++i) if (str1[i] != str2[i]) c = 0; if (c == 1) printf("%s\n", "Yes"); else printf("%s\n", "No"); return 0; }
[["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18]]
0
106
s = input() t = input() len_s = len(s) if len_s > 0 and s.find(t) == 0 and (len_s +1) == len(t): print('Yes') else: print('No')
s = input() t = input() len_s = len(s) if len_s > 0 and t.find(s) == 0 and (len_s +1) == len(t): print('Yes') else: print('No')
[["-", 31, 679, 12, 666, 0, 652, 63, 319, 500, 22], ["+", 31, 679, 12, 666, 0, 652, 63, 319, 500, 22], ["-", 31, 679, 12, 666, 0, 652, 3, 4, 0, 22], ["+", 31, 679, 12, 666, 0, 652, 3, 4, 0, 22]]
5
55
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; if (s.size() + 1 == t.size() && s == t.substr(0, s.size())) { cout << "Yes" << endl; } else { cout << "NO" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; if (s.size() + 1 == t.size() && s == t.substr(0, s.size())) { 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
75
S = list(input()) T = list(input()) a = 0 for i in range(0,s): if S[i] != T[i]: a = 1 if a == 0: print('Yes') else: print('No')
S = list(input()) T = list(input()) a = 0 s = len(S) for i in range(0,s): if S[i] != T[i]: a = 1 if a == 0: 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], ["+", 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, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25]]
5
62
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s, t; t.pop_back(); if (s == t) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; t.pop_back(); if (s == t) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
[["-", 0, 14, 8, 9, 0, 1, 0, 34, 0, 21], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152]]
1
56
n = gets.chomp.split("") a = gets.chomp.split("") b = n.size count = 0 (0..b-1).each do |i| if n[i] == a[i] conunt += 1 end end if b == count puts "Yes" else puts "No" end
n = gets.chomp.split("") a = gets.chomp.split("") b = n.size count = 0 (0..b-1).each do |i| if n[i] == a[i] count += 1 end end if b == count puts "Yes" else puts "No" end
[["-", 8, 736, 0, 121, 64, 749, 0, 755, 31, 22], ["+", 8, 736, 0, 121, 64, 749, 0, 755, 31, 22]]
4
72
a = input() b = input() if (a==b[:len(a)-1]): print("Yes") else: print("No")
a = input() b = input() if (a==b[:len(a)]): print("Yes") else: print("No") #print(b[:len(a)-1])
[["-", 0, 666, 0, 206, 206, 663, 0, 657, 17, 33], ["-", 0, 666, 0, 206, 206, 663, 0, 657, 12, 612]]
5
40
s=input() t=input() if s[:-1]==t: print('Yes') else: print('No')
s=input() t=input() if s==t[:-1]: print('Yes') else: print('No')
[["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 60], ["+", 0, 656, 0, 57, 15, 666, 0, 206, 51, 22], ["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 60], ["-", 36, 36, 0, 656, 0, 57, 15, 666, 0, 22]]
5
34
s = input() t = input() if t.starttswith(s) and len(s) + 1 == len(t): print("Yes") else: print("No")
s = input() t = input() if t.startswith(s) and len(s) + 1 == len(t): print("Yes") else: print("No")
[["-", 0, 57, 15, 679, 31, 652, 63, 319, 319, 22], ["+", 0, 57, 15, 679, 31, 652, 63, 319, 319, 22]]
5
44
#include <bits/stdc++.h> #define ull unsigned long long int #define ll long long int #define vll vector<ll> #define vi vector<int> #define pll pair<long long, long long> #define vpll vector<pair<long long, long long>> #define itr vll::iterator #define all(c) c.begin(), c.end() #define pb push_back #define f first #def...
#include <bits/stdc++.h> #define ull unsigned long long int #define ll long long int #define vll vector<ll> #define vi vector<int> #define pll pair<long long, long long> #define vpll vector<pair<long long, long long>> #define itr vll::iterator #define all(c) c.begin(), c.end() #define pb push_back #define f first #def...
[["-", 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
322
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S; cin >> T; bool a = true; if (S.size() + 1 != T.size()) { a = false; } else { for (int i = 0; i < S.size(); i++) { if (S.at(i) != S.at(i)) { a = false; } } } if (a) { cout << "Yes" << en...
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S; cin >> T; bool a = true; if (S.size() + 1 != T.size()) { a = false; } else { for (int i = 0; i < S.size(); i++) { if (S.at(i) != T.at(i)) { a = false; } } } if (a) { cout << "Yes" << en...
[["-", 15, 339, 51, 16, 12, 2, 63, 118, 28, 22], ["+", 15, 339, 51, 16, 12, 2, 63, 118, 28, 22]]
1
122
a = [input() for i in range(3)] # print(a) # print(T[:-1]) # s_len = len(a[0]) # a[0] = a[0].rstrip('\n') if a[0] == a[1][:-1]: print("Yes") else: print("No")
a = [input() for i in range(2)] # print(a) # print(T[:-1]) # s_len = len(a[0]) # a[0] = a[0].rstrip('\n') if a[0] == a[1][:-1]: print("Yes") else: print("No")
[["-", 12, 658, 0, 659, 12, 652, 3, 4, 0, 612], ["+", 12, 658, 0, 659, 12, 652, 3, 4, 0, 612]]
5
48
#include <bits/stdc++.h> #define int long long using namespace std; int32_t main() { string s1, s2; cin >> s1 >> s2; for (int i = 0; i < (int)s1.length(); i++) { if (s1[i] != s2[i]) { cout << "NO" << endl; return 0; } } cout << "YES" << endl; }
#include <bits/stdc++.h> #define int long long using namespace std; int32_t main() { string s1, s2; cin >> s1 >> s2; for (int i = 0; i < (int)s1.length(); i++) { if (s1[i] != s2[i]) { cout << "No" << endl; return 0; } } cout << "Yes" << endl; }
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
82
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; unsigned int i = 1; while (S.at(i) == T.at(i)) { i = i + 1; if (i == S.size()) { break; } } if (i == S.size()) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; unsigned int i = 0; while (S.at(i) == T.at(i)) { i = i + 1; if (i == S.size()) { break; } } if (i == S.size()) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
[["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]]
1
98
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; int x = 0; for (int i = 0; i < 10; i++) { if (s[i] != t[i]) { x++; break; } } if (x != 0) { cout << "No" << endl; } else { cout << "Yes" << endl; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; int x = 0; for (int i = 0; i < s.size(); i++) { if (s[i] != t[i]) { x++; break; } } if (x != 0) { cout << "No" << endl; } else { cout << "Yes" << endl; } return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 7, 15, 16, 12, 2, 63, 118, 28, 22], ["+", 0, 7, 15, 16, 12, 2, 63, 118, 17, 131], ["+", 0, 7, 15, 16, 12, 2, 63, 118, 119, 120], ["+", 0, 7, 15, 16, 12, 2, 3, 4, 0, 24], ["+", 0, 7, 15, 16, 12, 2, 3, 4, 0, 25]]
1
93
#include <stdio.h> int main() { char c, s[11], flag = 0; scanf("%s", s); c = getchar(); int i = 0; do { c = getchar(); if (c != s[i] && s[i] != '\0') { flag = 1; break; } i++; } while (c != '\0' && s[i] != '\0'); if (flag == 0) { printf("yes"); } else { printf("No...
#include <stdio.h> int main() { char c, s[11], flag = 0; scanf("%s", s); c = getchar(); int i = 0; do { c = getchar(); if (c != s[i] && s[i] != '\0') { flag = 1; break; } i++; } while (c != '\0' && s[i] != '\0'); if (flag == 0) { printf("Yes"); } else { printf("No...
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
124
S=input() T=input() if S==T: print('No') else: if T.isalpha()==0: print('No') else: if T.find(S)==-1: print('No') else: print('Yes')
S=input() T=input() if S==T: print('No') else: if T.startswith(S)==0: print('No') else: if T.find(S)==-1: print('No') else: print('Yes')
[["-", 0, 57, 15, 666, 0, 652, 63, 319, 319, 22], ["+", 0, 57, 15, 666, 0, 652, 63, 319, 319, 22], ["+", 0, 57, 15, 666, 0, 652, 3, 4, 0, 22]]
5
65
#include <bits/stdc++.h> #include <string.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[i] != t[i]) { cout << "No" << endl; break; } else if (i == s....
#include <bits/stdc++.h> #include <string.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[i] != t[i]) { cout << "No" << endl; break; } else if (i == s.size...
[["-", 0, 1, 0, 2, 3, 4, 0, 16, 17, 33], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]]
1
114
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; int flag = 0; for (int i = 0; i < s.size(); i++) if (s[i] != t[i]) { flag = 1; break; } cout << ((flag) ? "NO" : "YES"); }
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; int flag = 0; for (int i = 0; i < s.size(); i++) if (s[i] != t[i]) { flag = 1; break; } cout << ((flag) ? "No" : "Yes"); }
[["-", 0, 16, 12, 23, 0, 41, 64, 5, 0, 6], ["+", 0, 16, 12, 23, 0, 41, 64, 5, 0, 6], ["-", 0, 16, 12, 23, 0, 41, 75, 5, 0, 6], ["+", 0, 16, 12, 23, 0, 41, 75, 5, 0, 6]]
1
82
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { string S, T; cin >> S >> T; bool t = true; int a = S.size(); for (int i = 0; i < a; i++) { if (S[i] != T[i]) { cout << "No" << endl; t = false; } } if (t) { cout << "Yes...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { string S, T; cin >> S >> T; bool t = true; int a = S.size(); for (int i = 0; i < a; i++) { if (S[i] != T[i]) { cout << "No" << endl; t = false; break; } } if (t) { ...
[["+", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94], ["+", 8, 9, 0, 57, 64, 9, 0, 93, 0, 35]]
1
101
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(); sc.close(); if (T.length() - S.length() == 1 && T.contains(S)) { System.out.println("Yes"); } else { System.ou...
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(); sc.close(); if (T.length() - S.length() == 1 && T.startsWith(S)) { System.out.println("Yes"); } else { System.o...
[["-", 0, 57, 15, 15, 0, 16, 12, 492, 141, 22], ["+", 0, 57, 15, 15, 0, 16, 12, 492, 141, 22]]
3
109
def main(): S = input() T = input() if S == T[0:-1]: print("OK") else: print("NG") if __name__=="__main__": main()
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
50
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; int main() { string s; cin >> s; string t; cin >> t; t.pop_back(); if (s == t) cout << "YES" << endl; else cout << "NO" << endl; return 0; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; int main() { string s; cin >> s; string t; cin >> t; t.pop_back(); if (s == t) cout << "Yes" << endl; else cout << "No" << endl; return 0; }
[["-", 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
68
s = input() t = input() if t[0:len(s)-1] == s: print('Yes') else: print('No')
s = input() t = input() if t[0: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
39
#include <iostream> #include <map> #include <set> #include <string> #define ll long long int #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; int main() { string s, t; cin >> s >> t; int n = (int)(s.size()); int m = (int)(t.size()); int flg = 0; rep(i, n - 1) { if (s[i] != t[i]) { ...
#include <iostream> #include <map> #include <set> #include <string> #define ll long long int #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; int main() { string s, t; cin >> s >> t; int n = (int)(s.size()); int m = (int)(t.size()); int flg = 0; rep(i, n) { if (s[i] != t[i]) { ...
[["-", 0, 1, 0, 2, 3, 4, 0, 16, 17, 33], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["-", 0, 1, 0, 2, 3, 4, 0, 25, 0, 35], ["+", 0, 57, 15, 339, 51, 16, 12, 23, 0, 24], ["+", 0, 57, 15, 339, 51, 16, 12, 23, 0, 25]]
1
146
s=input() t=input() if s==t[0:-1]: print("YES") else: print("NO")
s=input() t=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
35
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; for (int i = 0; i < s.size(); i++) { if (s.at(i) == t.at(i)) { if (i == s.size() - 1) { cout << "Yes" << endl; } continue; } else { cout << "No" << endl; } } }
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; for (int i = 0; i < s.size(); i++) { if (s.at(i) == t.at(i)) { if (i == s.size() - 1) { cout << "Yes" << endl; } continue; } else { cout << "No" << endl; break; } } }
[["+", 0, 57, 75, 76, 0, 9, 0, 93, 0, 94], ["+", 0, 57, 75, 76, 0, 9, 0, 93, 0, 35]]
1
96
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef string str; str s, t; int main() { cin >> s; cin >> t; for (ll i = 0; i < s.length(); i++) { if (s[i] != t[i]) { cout << "NO"; return (0); } } cout << "YES"; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef string str; str s, t; int main() { cin >> s; cin >> t; for (ll i = 0; i < s.length(); 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
85
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef vector<int> vi; typedef vector<ll> vl; typedef vector<vi> vvi; typedef vector<vl> vvl; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef vector<pii> vii; typedef vector<pll> vll; typedef map<int, int> mii; typedef vector<char> ...
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef vector<int> vi; typedef vector<ll> vl; typedef vector<vi> vvi; typedef vector<vl> vvl; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef vector<pii> vii; typedef vector<pll> vll; typedef map<int, int> mii; typedef vector<char> ...
[["-", 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
609
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; for (int i = 0; i < s.size(); i++) { if (s[i] != t[i]) { cout << "No" << endl; return 0; } } cout << "yes" << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; for (int i = 0; i < s.size(); 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
79
#define _CRT_SECURE_NO_WARINGS #include <algorithm> #include <bitset> #include <cmath> #include <deque> #include <fstream> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <vector> using namespace std; typedef int ...
#define _CRT_SECURE_NO_WARINGS #include <algorithm> #include <bitset> #include <cmath> #include <deque> #include <fstream> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <vector> using namespace std; typedef int ...
[["-", 8, 9, 0, 43, 49, 50, 51, 5, 0, 6], ["+", 8, 9, 0, 43, 49, 50, 51, 5, 0, 6], ["-", 64, 9, 0, 1, 0, 11, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 11, 12, 5, 0, 6]]
1
278
#include <bits/stdc++.h> using namespace std; int main() { int s[20] = {0}, t[20] = {0}, flag = 1; scanf("%s%s", s, t); for (int i = 0; s[i]; i++) { if (s[i] != t[i]) { flag = 0; break; } } if (flag == 0) printf("No\n"); else printf("Yes\n"); return 0; }
#include <bits/stdc++.h> using namespace std; int main() { char s[20] = {0}, t[20] = {0}, flag = 1; scanf("%s%s", s, t); for (int i = 0; s[i]; i++) { if (s[i] != t[i]) { flag = 0; break; } } if (flag == 0) printf("No\n"); else printf("Yes\n"); return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
109
#include <iostream> #include <stdio.h> using namespace std; int main(void) { string S, T; cin >> S; cin >> T; if (S == T.erase(T.size() - 1)) { cout << "YES"; } else { cout << "NO"; } return 0; }
#include <iostream> #include <stdio.h> using namespace std; int main(void) { string S, T; cin >> S; cin >> T; if (S == T.erase(T.size() - 1)) { cout << "Yes"; } else { cout << "No"; } 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
65
#include <bits/stdc++.h> #define rep(i, n) for (int i = 1; i <= (int)(n); i++) using namespace std; int main() { int n, m, i; string s, t; m = 0; cin >> s, t; n = s.size(); for (i = 0; i < n; i++) { if (s[i] == t[i]) { m = 1; } else { m = 0; } } if (m == 1) { cout << "Yes" <...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 1; i <= (int)(n); i++) using namespace std; int main() { int n, m, i; string s, t; m = 0; cin >> s >> t; n = s.size(); for (i = 0; i < n; i++) { if (s[i] == t[i]) { m += 1; } else { m += 0; } } if (m == n) { cout << "Ye...
[["-", 0, 14, 8, 9, 0, 1, 0, 34, 0, 21], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["-", 0, 57, 64, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 17, 107], ["-", 75, 76, 0, 9, 0, 1, 0, 11, 17, 32], ["+", 75, 76, 0, 9, 0, 1, 0, 11, 17, 107], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15,...
1
117
#include <bits/stdc++.h> using namespace std; int main() { string s, t; int ans = 0; cin >> s >> t; for (int i = 0; i < s.size(); i++) { if (s.at(i) != t.at(i)) { ans = 1; } } if (ans = 0) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string s, t; int ans = 0; cin >> s >> t; for (int i = 0; i < s.size(); i++) { if (s.at(i) != t.at(i)) { ans = 1; } } if (ans == 0) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }
[["-", 8, 9, 0, 57, 15, 339, 51, 11, 17, 32], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60]]
1
100
<?php $s = trim(fgets(STDIN)); $t = trim(fgets(STDIN)); if (strpos($t, $s) !== false) { // code... if (strlen($t) == strlen($s)+ 1) { // code... if(substr($t,0,-1) == $a){ echo "Yes"; return; } } } echo 'No';
<?php $s = trim(fgets(STDIN)); $t = trim(fgets(STDIN)); if (strpos($t, $s) !== false) { // code... if (strlen($t) == strlen($s)+ 1) { // code... if(substr($t,0,-1) == $s){ echo "Yes"; return; } } } echo 'No';
[["-", 0, 57, 15, 23, 0, 16, 12, 606, 0, 141], ["+", 0, 57, 15, 23, 0, 16, 12, 606, 0, 141]]
6
88
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <ve...
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <ve...
[["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 8, 9, 0, 1, 0, 16, 12, 5, 0, 62], ["+", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
197
S = input() T = input() if len(S)==1: if S == T[0]: print("Yes") else: print("No") else: if S == T[0:len(S)-1]: print("Yes") else: print("No")
S = input() T = input() if len(S)==1: if S == T[0]: print("Yes") else: print("No") else: if S == T[0: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
71
#include "stdio.h" #include "string.h" int main() { char s1[100]; fgets(s1, 100, stdin); int l = strlen(s1) - 1; char s2[l + 1]; fgets(s2, l + 1, stdin); int i, c = 0; for (i = 0; i < l; i++) { if (s1[i] == s2[i]) c = 0; else c = 1; } if (c == 0) printf("Yes\n"); else pr...
#include "stdio.h" #include "string.h" int main() { char s1[12]; fgets(s1, 12, stdin); int l = strlen(s1) - 1; char s2[l + 1]; fgets(s2, l + 1, stdin); int i, c = 0; for (i = 0; i < l; i++) { if (s1[i] == s2[i]) c = 0; else { c = 1; break; } } if (c == 0) printf("Yes...
[["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 57, 75, 76, 0, 9, 0, 45], ["+", 0, 57, 75, 76, 0, 9, 0, 93, 0, 94], ["+", 0, 57, 75, 76, 0, 9, 0, 93, 0, 35], ["+", 8, 9, 0, 57, 75, 76, 0, 9,...
0
127
def main(): S=input() T=input() if(S[0:-1]==T[0:len(T)-1]): print('Yes') else: print('No') if __name__ == '__main__': main()
def main(): S=input() T=input() if(S[0:]==T[0:len(T)-1]): print('Yes') else: print('No') if __name__ == '__main__': main()
[["-", 0, 666, 0, 206, 206, 663, 0, 664, 17, 33], ["-", 0, 666, 0, 206, 206, 663, 0, 664, 28, 612]]
5
62
s = input() t = input() if t[0:len(s)+1] == s and len(t) == len(s) + 1 and 1 <= len(s) <= 10: print('Yes') else: print('No')
s = input() t = input() if t[0:len(s)] == s and len(t) == len(s) + 1 and 1 <= len(s) <= 10: print('Yes') else: print('No')
[["-", 31, 666, 0, 206, 206, 663, 0, 657, 17, 72], ["-", 31, 666, 0, 206, 206, 663, 0, 657, 12, 612]]
5
60
#include <stdio.h> int main() { char s[11], t[12]; int i = 0; scanf("%s", s); scanf("%s", t); while (s[i]) { if (s[i] != t[i]) { printf("NO"); return 0; } i++; } printf("YES"); return 0; }
#include <stdio.h> int main() { char s[11], t[12]; int i = 0; scanf("%s", s); scanf("%s", t); while (s[i]) { if (s[i] != t[i]) { printf("No"); return 0; } i++; } printf("Yes"); return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
88
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { string S, T; cin >> S >> T; ll N = S.size(); for (int i = 0; i < N; i++) { if (S[i] != T[i]) { cout << "NO" << endl; return 0; } } cout << "YES" << endl; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { string S, T; cin >> S >> T; ll N = S.size(); for (int i = 0; i < N; i++) { if (S[i] != T[i]) { cout << "No" << endl; return 0; } } cout << "Yes" << endl; }
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
86
#include <algorithm> #include <bits/stdc++.h> #include <iomanip> #include <iostream> #include <math.h> #include <numeric> #include <string> #include <utility> #include <vector> #define ll long long int #define endl "\n" #define ss string using namespace std; /*ll mod(ll a,ll b) { if(a>b) return (a-b); else ...
#include <algorithm> #include <bits/stdc++.h> #include <iomanip> #include <iostream> #include <math.h> #include <numeric> #include <string> #include <utility> #include <vector> #define ll long long int #define endl "\n" #define ss string using namespace std; /*ll mod(ll a,ll b) { if(a>b) return (a-b); else ...
[["-", 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
88
#include <bits/stdc++.h> using namespace std; #define ll long long #define endl '\n' int main() { string s, t, tmp = ""; cin >> s >> t; for (ll i = 0; i < t.length() - 1; i++) { tmp += t[i]; } if (tmp != s) cout << "NO" << endl; else cout << "YES" << endl; }
#include <bits/stdc++.h> using namespace std; #define ll long long #define endl '\n' int main() { string s, t, tmp = ""; cin >> s >> t; for (ll i = 0; i < t.length() - 1; i++) { tmp += t[i]; } if (tmp != s) cout << "No" << endl; else cout << "Yes" << 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
86
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; if (S.size() + 1 == T.size() && S.compare(0, S.size(), T, 0, S.size()) == 0) { cout << "yes" << endl; } else { cout << "No" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; if (S.size() + 1 == T.size() && S.compare(0, S.size(), T, 0, S.size()) == 0) { 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
85
#include <iostream> #include <string> using namespace std; int main() { string S, T, a, b; cin >> S >> T; int cS, cT; cS = S.size(); cT = T.size(); cT--; a = S.assign(S, 0, cS); b = T.assign(T, 0, cT); if (a == b || T.size() == S.size() - 1) { cout << "yes" << endl; } else { cout << "no" <<...
#include <iostream> #include <string> using namespace std; int main() { string S, T, a, b; cin >> S >> T; int cS, cT; cS = S.size(); cT = T.size(); cT--; a = S.assign(S, 0, cS); b = T.assign(T, 0, cT); if (a == b || T.size() == S.size() - 1) { cout << "Yes" << endl; } else { cout << "No" <<...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
123
#include <bits/stdc++.h> #define int long long int #define ii pair<int, int> #define fi first #define se second #define mp make_pair #define pb push_back using namespace std; #define MOD 998244353 #define output(x) \ for (auto a : x) ...
#include <bits/stdc++.h> #define int long long int #define ii pair<int, int> #define fi first #define se second #define mp make_pair #define pb push_back using namespace std; #define MOD 998244353 #define output(x) \ for (auto a : x) ...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
229
#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; if (S.size() == T.size() - 1 && S == T.substr(0, T.size() - 1)) { cout << "Yes"; return 0; } cout << "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; cin >> T; if (S.size() == T.size() - 1 && S == T.substr(0, T.size() - 1)) { cout << "Yes"; return 0; } cout << "No"; ...
[["-", 0, 14, 8, 9, 0, 1, 0, 34, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152]]
1
100
S = input() T = input() S = str(S) T = str(T) def register(S, T): if (1 <= len(S) <= 10 and len(T) == len(S) + 1) and (S[0: len(S) - 1] == T[0: len(S) - 1]): print("Yes") else: print("No") register(S, T)
S = input() T = input() S = str(S) T = str(T) def register(S, T): if (1 <= len(S) <= 10 and len(T) == len(S) + 1) and (S[0: len(S)] == T[0: len(S)]): print("Yes") else: print("No") register(S, T)
[["-", 0, 666, 0, 206, 206, 663, 0, 657, 17, 33], ["-", 0, 666, 0, 206, 206, 663, 0, 657, 12, 612]]
5
100
#include <bits/stdc++.h> using namespace std; int main() { string a, b; int size, count; cin >> a >> b; size = a.length(); count = 0; for (int i = 0; i < size; i++) { char c, d; c = a[i]; d = b[i]; if (c == d) { // cout << c << d << "/n" << endl; count++; } } if (count ==...
#include <bits/stdc++.h> using namespace std; int main() { string a, b; int size, count; cin >> a >> b; size = a.length(); count = 0; for (int i = 0; i < size; i++) { char c, d; c = a[i]; d = b[i]; if (c == d) { // cout << c << d << "/n" << endl; count++; } } if (count ==...
[["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
112
k = gets.chomp l = gets.chomp puts l.match(/^#{k}.$/) ? "YES" : "NO"
k = gets.chomp l = gets.chomp puts l.match(/^#{k}.$/) ? "Yes" : "No"
[["-", 0, 652, 3, 4, 0, 754, 64, 557, 0, 6], ["+", 0, 652, 3, 4, 0, 754, 64, 557, 0, 6], ["-", 0, 652, 3, 4, 0, 754, 75, 557, 0, 6], ["+", 0, 652, 3, 4, 0, 754, 75, 557, 0, 6]]
4
31
s=list(input()) t=list(input()) if s==t[:-1]: print("YES") else: print("NO")
s=list(input()) t=list(input()) if s==t[:-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
40