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() { bool s = true; string a, b; cin >> a >> b; for (int i = 0; i < b.size() - 2; i++) { if (a[i] != b[i]) { s = false; break; } } if (s) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { bool s = true; string a, b; cin >> a >> b; for (int i = 0; i < b.size() - 1; i++) { if (a[i] != b[i]) { s = false; break; } } if (s) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }
[["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]]
1
98
a=input() b=input() if a in b: if a==b[0:-1]: print("Yes") else: print("No")
a=input() b=input() if a==b[0:-1]: print("Yes") else: print("No")
[["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 267], ["-", 36, 36, 0, 656, 0, 57, 15, 666, 0, 22], ["-", 36, 36, 36, 36, 0, 656, 0, 57, 0, 102], ["-", 0, 656, 0, 57, 64, 196, 0, 57, 0, 121], ["-", 0, 57, 64, 196, 0, 57, 15, 666, 0, 22]]
5
40
#include <bits/stdc++.h> using namespace std; #define ALL(obj) obj.begin(), obj.end() #define SORT(obj) sort(obj.begin(), obj.end()) #define pb(obj) push_back(obj) #define REP(i, N) for (int i = 0; i < N; i++) typedef long long ll; ll const MOD = 1e9 + 7; int main() { string s, t; cin >> s >> t; t.erase(t.size()...
#include <bits/stdc++.h> using namespace std; #define ALL(obj) obj.begin(), obj.end() #define SORT(obj) sort(obj.begin(), obj.end()) #define pb(obj) push_back(obj) #define REP(i, N) for (int i = 0; i < N; i++) typedef long long ll; ll const MOD = 1e9 + 7; int main() { string s, t; cin >> s >> t; t.erase(s.size()...
[["-", 0, 2, 3, 4, 0, 2, 63, 118, 28, 22], ["+", 0, 2, 3, 4, 0, 2, 63, 118, 28, 22]]
1
100
#include <bits/stdc++.h> using namespace std; int main() { string str1, str2; cin >> str1 >> str2; if (str1.length() != str2.length() - 1) { cout << "NO" << endl; return 0; } int flag = 0; for (int i = 0; i < str1.length(); i++) { if (str1[i] != str2[i]) { cout << "NO" << endl; fla...
#include <bits/stdc++.h> using namespace std; int main() { string str1, str2; cin >> str1 >> str2; if (str1.length() != str2.length() - 1) { cout << "No" << endl; return 0; } int flag = 0; for (int i = 0; i < str1.length(); i++) { if (str1[i] != str2[i]) { cout << "No" << endl; fla...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
123
#include <iostream> using namespace std; int main() { string s, i; cin >> s >> i; int d = 0; for (int j = 0; j < s.size(); ++j) { if (s[j] != i[j]) ++d; } d > 0 ? cout << "Yes" : cout << "No"; }
#include <iostream> using namespace std; int main() { string s, i; cin >> s >> i; int d = 0; for (int j = 0; j < s.size(); ++j) { if (s[j] != i[j]) { ++d; } } d == 0 ? cout << "Yes" : cout << "No"; }
[["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 45], ["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46], ["-", 8, 9, 0, 1, 0, 41, 15, 16, 17, 47], ["+", 8, 9, 0, 1, 0, 41, 15, 16, 17, 60]]
1
79
s = input() t = input() if (s is t[:-1]) and (len(s) + 1 is (len(t))): print('Yes') else: print('No')
s = input() t = input() if (s == t[:-1]) and ((len(s) + 1) is len(t)): print('Yes') else: print('No')
[["-", 0, 57, 15, 679, 31, 23, 0, 666, 667, 709], ["+", 0, 57, 15, 679, 31, 23, 0, 666, 667, 60], ["+", 0, 656, 0, 57, 15, 679, 12, 23, 0, 24], ["+", 15, 679, 12, 23, 0, 666, 0, 23, 0, 25], ["-", 15, 679, 12, 23, 0, 666, 0, 23, 0, 24], ["-", 0, 666, 0, 23, 0, 652, 3, 4, 0, 25]]
5
52
s=input() t=input() if s + t[-1] == t and 1 < len(s) <= 10: print('Yes') else: print('No')
s=input() t=input() if s + t[-1] == t and 1 <= len(s) <= 10: print('Yes') else: print('No')
[["-", 0, 656, 0, 57, 15, 679, 12, 666, 667, 18], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 667, 19]]
5
44
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> using namespace std; string s, t; int main() { cin >> s >> t; int lens = s.size(); int lent = t.size(); if (lens != (lent - 1)) { printf("NO\n"); return 0; } for (int i = 0; i < lens; i++) { if (s[i] != t[i]) { p...
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> using namespace std; string s, t; int main() { cin >> s >> t; int lens = s.size(); int lent = t.size(); if (lens != (lent - 1)) { printf("NO\n"); return 0; } for (int i = 0; i < lens; i++) { if (s[i] != t[i]) { p...
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
191
/* author : akshatjai258 */ #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef pair<string, string> pss; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<pii> vii; typedef vector<ll> vl; typedef vector<vl> vvl; #define int ll #...
/* author : akshatjai258 */ #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef pair<string, string> pss; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<pii> vii; typedef vector<ll> vl; typedef vector<vl> vvl; #define int ll #...
[["-", 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
253
#include <bits/stdc++.h> #include <iostream> #include <stdlib.h> #include <string> using namespace std; int main() { int ssize; string s, t; cin >> s >> t; ssize = s.size(); if (t.compare(1, ssize, s) == 0) { cout << "Yes"; } else { cout << "No"; } return 0; }
#include <bits/stdc++.h> #include <iostream> #include <stdlib.h> #include <string> using namespace std; int main() { int ssize; string s, t; cin >> s >> t; ssize = s.size(); if (t.compare(0, ssize, s) == 0) { cout << "Yes"; } else { cout << "No"; } return 0; }
[["-", 15, 339, 51, 16, 31, 2, 3, 4, 0, 13], ["+", 15, 339, 51, 16, 31, 2, 3, 4, 0, 13]]
1
75
S = input() T = input() cond = (1 <= len(S) and len(S) <= 10) and S[:-1] == T[:-1] print('Yes' if cond else 'No')
S = input() T = input() cond = (1 <= len(S) and len(S) <= 10) and S == T[:-1] print('Yes' if cond else 'No')
[["-", 0, 662, 12, 679, 12, 666, 0, 206, 0, 70], ["-", 12, 679, 12, 666, 0, 206, 206, 663, 0, 102], ["-", 12, 666, 0, 206, 206, 663, 0, 664, 17, 33], ["-", 12, 666, 0, 206, 206, 663, 0, 664, 28, 612], ["-", 0, 662, 12, 679, 12, 666, 0, 206, 0, 73]]
5
53
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; int count = 0; for (int i = 0; i < s.size(); i++) { if (s.at(i) == t.at(i)) { count++; } } if (s.size() + 1 == t.size() && count == s.size()) { cout << "yes" << endl; } else...
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; int count = 0; for (int i = 0; i < s.size(); i++) { if (s.at(i) == t.at(i)) { count++; } } if (s.size() + 1 == t.size() && count == s.size()) { cout << "Yes" << endl; } else...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
114
#include <iostream> using namespace std; int main() { string s, t; int i; cin >> s >> t; for (i = 0; i <= s.size(); i++) { if (s[i] != t[i]) { cout << "No" << endl; goto g; } } if (t.size() == s.size() + 1) cout << "Yes" << endl; else cout << "No" << endl; g: return 0; }
#include <iostream> using namespace std; int main() { string s, t; int i; cin >> s >> t; for (i = 0; i < s.size(); i++) { if (s[i] != t[i]) { cout << "No" << endl; goto g; } } if (t.size() == s.size() + 1) cout << "Yes" << endl; else cout << "No" << endl; g: return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18]]
1
108
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; int c = 0; int a = S.length(); for (int i = 0; i < a; i++) { if (S[i] == T[i]) c++; } if (c == a) cout << "YES" << endl; else cout << "NO" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; int c = 0; int a = S.length(); for (int i = 0; i < a; i++) { if (S[i] == T[i]) c++; } if (c == a) 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
91
S = input() T = input() if S in T: print('Yes') else: print('No')
S = input() T = input() if S in T[:-1]: print('Yes') else: print('No')
[["+", 0, 656, 0, 57, 15, 666, 0, 206, 0, 70], ["+", 15, 666, 0, 206, 206, 663, 0, 664, 17, 33], ["+", 15, 666, 0, 206, 206, 663, 0, 664, 28, 612], ["+", 0, 656, 0, 57, 15, 666, 0, 206, 0, 73], ["+", 36, 36, 36, 36, 0, 656, 0, 57, 0, 102]]
5
29
io = STDIN str1=io.gets.chomp str2=io.gets.chomp if str1==str2[0..-2] puts 'Yes' else puts 'N' end
io = STDIN str1=io.gets.chomp str2=io.gets.chomp if str1==str2[0..-2] puts 'Yes' else puts 'No' end
[["-", 75, 95, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 75, 95, 0, 652, 3, 4, 0, 557, 0, 6]]
4
37
S = input() T = input() if len(T) == len(S) + 1: if T.startswith(S): print('Yes') else: print('No')
S = input() T = input() if len(T) == len(S) + 1 and T.startswith(S): print('Yes') else: print('No')
[["-", 36, 36, 36, 36, 0, 656, 0, 57, 0, 102], ["-", 0, 656, 0, 57, 64, 196, 0, 57, 0, 121], ["+", 36, 36, 0, 656, 0, 57, 15, 679, 17, 355]]
5
45
#include <stdio.h> #include <string.h> int main() { char s[11], t[12]; if (scanf("%s%s", s, t)) { if (strlen(t) != strlen(s) + 1) { printf("NO"); return 0; } t[strlen(t) - 1] = '\0'; if (strcmp(s, t) != 0) { printf("NO"); return 0; } printf("YES"); return 0; } }
#include <stdio.h> #include <string.h> int main() { char s[11], t[12]; if (scanf("%s%s", s, t)) { if (strlen(t) != strlen(s) + 1) { printf("No"); return 0; } t[strlen(t) - 1] = '\0'; if (strcmp(s, t) != 0) { printf("No"); return 0; } 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
109
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <stack> #include <string> #include <vector> #define ll long long using namespace std; int i, j; char s[11], t[11]; bool m = 1; int main() { cin >> s; cin >> t;...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <stack> #include <string> #include <vector> #define ll long long using namespace std; int i, j; char s[11], t[11]; bool m = 1; int main() { cin >> s; cin >> t;...
[["-", 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
126
#include <algorithm> #include <iostream> #include <math.h> #include <queue> #include <stack> #include <string> #include <vector> typedef long long ll; #define veci vector<int> #define vecs vector<string> #define vecpii vector<pair<int, int>> #define vecpis vector<pair<int, string>> #define vecpss vector<pair<string,...
#include <algorithm> #include <iostream> #include <math.h> #include <queue> #include <stack> #include <string> #include <vector> typedef long long ll; #define veci vector<int> #define vecs vector<string> #define vecpii vector<pair<int, int>> #define vecpis vector<pair<int, string>> #define vecpss vector<pair<string,...
[["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 72], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 33]]
1
170
#include <bits/stdc++.h> using namespace std; int main() { string s; string s1; cin >> s; cin >> s1; for (int i = 0; i < s1.length() - 1; i++) { if (s[i] != s1[i]) { cout << "NO" << endl; return 0; } } cout << "YES" << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string s; string s1; cin >> s; cin >> s1; for (int i = 0; i < s.length(); i++) { if (s[i] != s1[i]) { cout << "No" << endl; return 0; } } cout << "Yes" << endl; return 0; }
[["-", 15, 16, 12, 16, 31, 2, 63, 118, 28, 22], ["+", 0, 7, 15, 16, 12, 2, 63, 118, 28, 22], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
84
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; int main() { string a, b; cin >> a >> b; int c; c = a.size(); char d; d = b.at(c); string e; e = a + d; if (b == e) { cout << "Yes" << endl; } else { cout << "NO" << endl; } return (0); }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; int main() { string a, b; cin >> a >> b; int c; c = a.size(); char d; d = b.at(c); string e; e = a + d; if (b == e) { 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
95
//========================================== // 🅐🅤🅣🅗🅞🅡: 🅐🅦🅚 //========================================== #include <bits/stdc++.h> #define ll long long using namespace std; void solve() { string s1, s2; cin >> s1 >> s2; s2.pop_back(); if (s1.compare(s2) == 0) { cout << "YES\n"; } else cout...
//========================================== // 🅐🅤🅣🅗🅞🅡: 🅐🅦🅚 //========================================== #include <bits/stdc++.h> #define ll long long using namespace std; void solve() { string s1, s2; cin >> s1 >> s2; s2.pop_back(); if (s1.compare(s2) == 0) { cout << "Yes\n"; } else cout...
[["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]]
1
90
######ANSDEFINE####### no = "NO" yes = "Yes" #########END########## S = input() T = input() sl = list(S) tl = list(T) Slen = len(S) + 1 Tlen = len(T) if Slen == Tlen: if sl == tl[0:-1]: print(yes) else: print(no) else: print(no)
######ANSDEFINE####### no = "No" yes = "Yes" #########END########## S = input() T = input() sl = list(S) tl = list(T) Slen = len(S) + 1 Tlen = len(T) if Slen == Tlen: if sl == tl[0:-1]: print(yes) else: print(no) else: print(no)
[["-", 0, 656, 0, 1, 0, 662, 12, 557, 0, 6], ["+", 0, 656, 0, 1, 0, 662, 12, 557, 0, 6]]
5
80
#include <algorithm> #include <bits/stdc++.h> #include <cmath> #include <iostream> #include <stdio.h> #include <string> #include <vector> using namespace std; int main() { string a, b; cin >> a >> b; cout << (a == b.substr(0, b.length() - 1) ? "YES" : "NO") << endl; return 0; }
#include <algorithm> #include <bits/stdc++.h> #include <cmath> #include <iostream> #include <stdio.h> #include <string> #include <vector> using namespace std; int main() { string a, b; cin >> a >> b; cout << (a == b.substr(0, b.length() - 1) ? "Yes" : "No") << endl; return 0; }
[["-", 31, 16, 12, 23, 0, 41, 64, 5, 0, 6], ["+", 31, 16, 12, 23, 0, 41, 64, 5, 0, 6], ["-", 31, 16, 12, 23, 0, 41, 75, 5, 0, 6], ["+", 31, 16, 12, 23, 0, 41, 75, 5, 0, 6]]
1
69
import itertools import math from collections import defaultdict def input_ints(): return list(map(int, input().split())) def solve(): s = input() t = input() print('Yes' if s[:len(t)] == t else 'No') if __name__ == '__main__': solve()
import itertools import math from collections import defaultdict def input_ints(): return list(map(int, input().split())) def solve(): s = input() t = input() print('Yes' if t[:len(s)] == s else 'No') if __name__ == '__main__': solve()
[["-", 3, 4, 0, 41, 0, 666, 0, 206, 51, 22], ["+", 3, 4, 0, 41, 0, 666, 0, 206, 51, 22], ["-", 0, 206, 206, 663, 0, 652, 3, 4, 0, 22], ["+", 0, 206, 206, 663, 0, 652, 3, 4, 0, 22], ["-", 0, 652, 3, 4, 0, 41, 0, 666, 0, 22], ["+", 0, 652, 3, 4, 0, 41, 0, 666, 0, 22]]
5
75
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; int num = 0; num = S.size(); bool diffchk = 0; for (int i = 0; i < num - 1; i++) { if (S.at(i) != T.at(i)) diffchk = 1; // cout << S.at(i) << T.at(i) << diffchk; } if (diffchk) cout << "No" << ...
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; int num = 0; num = S.size(); bool diffchk = 0; for (int i = 0; i < num; i++) { if (S.at(i) != T.at(i)) diffchk = 1; // cout << S.at(i) << T.at(i) << diffchk; } if (diffchk) cout << "No" << endl...
[["-", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]]
1
101
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); char a[20], b[20]; cin >> a; cin >> b; int flag = 0; int x = strlen(a); for (int i = 0; i < x; i++) { if (a[i] != b[i]) { flag = 1; break; } } if (flag ==...
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); char a[20], b[20]; cin >> a; cin >> b; int flag = 0; int x = strlen(a); for (int i = 0; i < x; i++) { if (a[i] != b[i]) { flag = 1; break; } } if (flag ==...
[["-", 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
123
S = list(input()) T = list(input()) cnt = 0 for i in range(len(S)): if S[i] == T[i]: continue else: print('No') cnt = 1 if cnt == 0: print('Yes')
S = list(input()) T = list(input()) cnt = 0 for i in range(len(S)): if S[i] == T[i]: continue else: print('No') cnt = 1 break if cnt == 0: print('Yes')
[["+", 0, 57, 75, 76, 8, 196, 0, 93, 0, 94]]
5
64
s = input() t = input() removed_t = t[:len(t) - 1] print(removed_t) if s == removed_t: print('Yes') else: print('No')
s = input() t = input() removed_t = t[:len(t) - 1] if s == removed_t: 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
45
#include <bits/stdc++.h> #define endl '\n' using namespace std; string S, T; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cin >> S >> T; for (int i = 0; i < S.size() - 1; i++) if (S[i] != T[i]) { cout << "No"; return 0; } cout << "Yes"; return 0; }
#include <bits/stdc++.h> #define endl '\n' using namespace std; string S, T; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cin >> S >> T; for (int i = 0; i < S.size(); i++) if (S[i] != T[i]) { cout << "No"; return 0; } cout << "Yes"; return 0; }
[["-", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]]
1
92
#include <stdio.h> #include <string.h> int main() { char s[12], t[13]; int f = 0, n; scanf("%s", s); scanf("%s", t); n = strlen(s); for (int i = 0; i < n - 1; i++) { if (s[i] == t[i]) { } else { f = 1; } } if (strlen(s) + 1 == strlen(t)) { } else { f = 1; } if (f == 0) { ...
#include <stdio.h> #include <string.h> int main() { char s[12], t[13]; int f = 0, n; scanf("%s", s); scanf("%s", t); n = strlen(s); for (int i = 0; i < n; i++) { if (s[i] == t[i]) { } else { f = 1; } } if (strlen(s) + 1 == strlen(t)) { } else { f = 1; } if (f == 0) { pri...
[["-", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]]
0
140
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; int len_diff; len_diff = T.length() - S.length(); string sub; sub = T.substr(0, T.length() - 1); if (len_diff == 1 && S == sub) { cout << "YES" << endl; } else { cout << "NO" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; int len_diff; len_diff = T.length() - S.length(); string sub; sub = T.substr(0, T.length() - 1); if (len_diff == 1 && S == sub) { 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
91
#include <bits/stdc++.h> using namespace std; string s, t; int main() { ios::sync_with_stdio(0); cin >> s >> t; int lens = s.size(), lent = t.size(); if (lent - lens == 1) { bool ok = true; for (int i = 0; i <= lens; i++) if (s[i] != t[i]) ok = false; if (ok) { cout << "Yes"; ...
#include <bits/stdc++.h> using namespace std; string s, t; int main() { ios::sync_with_stdio(0); cin >> s >> t; int lens = s.size(), lent = t.size(); if (lent - lens == 1) { bool ok = true; for (int i = 0; i < lens; i++) if (s[i] != t[i]) ok = false; if (ok) { cout << "Yes"; ...
[["-", 0, 57, 64, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 57, 64, 9, 0, 7, 15, 16, 17, 18]]
1
116
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Collections; import java.util.Scanner; import java.util.TreeMap; public class Main { public static void main(String[] args) throws IOExc...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Collections; import java.util.Scanner; import java.util.TreeMap; public class Main { /** * Iterate through each line of input. */ ...
[["-", 64, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 64, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["-", 75, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 75, 1, 0, 492, 3, 4, 0, 5, 0, 491]]
3
177
#include <iostream> using namespace std; int main() { string s, t; cin >> s >> t; if (s.length() + 1 == t.length()) { for (int i = 0; s[i]; i++) { if (s[i] != t[i]) { cout << "NO"; return 0; } } } else { cout << "NO"; return 0; } cout << "YES"; return 0; }
#include <iostream> using namespace std; int main() { string s, t; cin >> s >> t; if (s.length() + 1 == t.length()) { for (int i = 0; s[i]; i++) { if (s[i] != t[i]) { cout << "No"; return 0; } } } else { cout << "No"; return 0; } cout << "Yes"; 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], ["-", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6]]
1
102
#include <algorithm> #include <iostream> #include <string> using namespace std; #define all(c) (c).begin(), (c).end() #define rall(c) (c).rbegin(), (c).rend() #define mp make_pair #define pb push_back #define pop pop_back #define ff first #define ss second #define vec vector<int> #define vec2 vector<vector<int>> #defin...
#include <algorithm> #include <iostream> #include <string> using namespace std; #define all(c) (c).begin(), (c).end() #define rall(c) (c).rbegin(), (c).rend() #define mp make_pair #define pb push_back #define pop pop_back #define ff first #define ss second #define vec vector<int> #define vec2 vector<vector<int>> #defin...
[["-", 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
193
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; int l = s.length(); string temp = t.substr(0, l); if (temp == s) cout << "YES" << endl; else cout << "NO" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; int l = s.length(); string temp = t.substr(0, l); if (temp == s) 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
67
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; int l = S.size(); string T; cin >> T; string ans = "Yes"; for (int i = 0; i < l - 1; i++) { if (S.at(i) != T.at(i)) { ans = "No"; break; } } int ll = T.size(); if (ll != l + 1) { ans = "No"; } ...
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; int l = S.size(); string T; cin >> T; string ans = "Yes"; for (int i = 0; i < l; i++) { if (S.at(i) != T.at(i)) { ans = "No"; break; } } int ll = T.size(); if (ll != l + 1) { ans = "No"; } cou...
[["-", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]]
1
117
#include <bits/stdc++.h> #define rep(i, n) for (int(i) = 0; (i) < (n); i++) #define ll long long using namespace std; int main() { string s, t; cin >> s >> t; if (s.size() == t.size()) { for (int a = 0; a < s.size(); a++) { if (s[a] != t[a]) { cout << "No" << endl; return 0; } ...
#include <bits/stdc++.h> #define rep(i, n) for (int(i) = 0; (i) < (n); i++) #define ll long long using namespace std; int main() { string s, t; cin >> s >> t; if (s.size() + 1 == t.size()) { for (int a = 0; a < s.size(); a++) { if (s[a] != t[a]) { cout << "No" << endl; return 0; }...
[["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 72], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]]
1
114
s = input() t = input() ans = 'Yes' for i in range(len(s) - 1): if s[i] != t[i]: ans = 'No' print(ans)
s = input() t = input() ans = 'Yes' for i in range(len(s)): if s[i] != t[i]: ans = 'No' print(ans)
[["-", 0, 7, 12, 652, 3, 4, 0, 657, 17, 33], ["-", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
48
#include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #define PI 3.141592653589793 #define MOD 1000000007 // qsort用、昇順 int compare_int(const void *a, const void *b) { return *(int *)a - *(int *)b; } // qsort(data, 10, sizeof(int), compare_int) int main() { char s[11], t[11]; scanf("%s%s", s...
#include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #define PI 3.141592653589793 #define MOD 1000000007 // qsort用、昇順 int compare_int(const void *a, const void *b) { return *(int *)a - *(int *)b; } // qsort(data, 10, sizeof(int), compare_int) int main() { char s[11], t[11]; scanf("%s%s", s...
[["-", 8, 9, 0, 57, 15, 23, 0, 11, 17, 32], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 60]]
0
146
S=input() T=input() if T.startswith(S): print(Yes) else: print(No)
S=input() T=input() if T.startswith(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
28
function Main(a, b) { if (b.indexOf(a) !== -1) { console.log("Yes"); } else { console.log("No"); } } const input = require('fs').readFileSync('/dev/stdin', 'utf8').split('\n'); Main(input[0].trim(), input[1].trim());
function Main(a, b) { if (b.startsWith(a)) { console.log("Yes"); } else { console.log("No"); } } const input = require('fs').readFileSync('/dev/stdin', 'utf8').split('\n'); Main(input[0].trim(), input[1].trim());
[["-", 15, 23, 0, 16, 31, 2, 63, 558, 559, 560], ["+", 0, 57, 15, 23, 0, 2, 63, 558, 559, 560], ["-", 8, 556, 0, 57, 15, 23, 0, 16, 17, 566], ["-", 0, 57, 15, 23, 0, 16, 12, 91, 17, 33], ["-", 0, 57, 15, 23, 0, 16, 12, 91, 28, 555]]
2
93
/* LANG:C++ PROB: */ #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #include <functional> #include <iostream> #define mp make_pair #define mt make_tuple #define fi first #define se second #define pb push_back #define all(x) (x).begin(), (x).end() #define rall(x)...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #include <functional> #include <iostream> #define mp make_pair #define mt make_tuple #define fi first #define se second #define pb push_back #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend...
[["-", 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
397
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; int flag = 0; if (s.size() != t.size() - 1) cout << "no"; else { for (int i = 0; i < s.size(); i++) { if (s[i] != t[i]) { flag = 1; break; } } if (flag == 1) cout << "no"; ...
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; int flag = 0; if (s.size() != t.size() - 1) cout << "No"; else { for (int i = 0; i < s.size(); i++) { if (s[i] != t[i]) { flag = 1; break; } } if (flag == 1) cout << "No"; ...
[["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 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
114
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scn = new Scanner(System.in); String s = scn.nextLine(); String t = scn.nextLine(); String ans = "yes"; for (int i = 0; i < s.length(); i++) { if (s.charAt(i) != t.charAt(i)) { ans = "no"; ...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scn = new Scanner(System.in); String s = scn.nextLine(); String t = scn.nextLine(); String ans = "Yes"; for (int i = 0; i < s.length(); i++) { if (s.charAt(i) != t.charAt(i)) { ans = "No"; ...
[["-", 8, 196, 0, 503, 49, 200, 51, 5, 0, 491], ["+", 8, 196, 0, 503, 49, 200, 51, 5, 0, 491], ["-", 64, 196, 0, 1, 0, 11, 12, 5, 0, 491], ["+", 64, 196, 0, 1, 0, 11, 12, 5, 0, 491]]
3
115
import java.util.*; class Main { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { String S = sc.next(); String T = sc.next(); boolean a = false; if (S.equals(T.substring(0, S.length()))) a = true; if (a) System.out.println("YES"); else Sy...
import java.util.*; class Main { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { String S = sc.next(); String T = sc.next(); boolean a = false; if (S.equals(T.substring(0, S.length()))) a = true; if (a) System.out.println("Yes"); else Sy...
[["-", 64, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 64, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["-", 75, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 75, 1, 0, 492, 3, 4, 0, 5, 0, 491]]
3
109
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, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]]
5
37
#include <algorithm> #include <array> #include <climits> #include <cmath> #include <cstdio> #include <cstring> #include <ctime> #include <deque> #include <iomanip> #include <iostream> #include <iterator> #include <list> #include <map> #include <math.h> #include <numeric> #include <queue> #include <regex> #include <set>...
#include <algorithm> #include <array> #include <climits> #include <cmath> #include <cstdio> #include <cstring> #include <ctime> #include <deque> #include <iomanip> #include <iostream> #include <iterator> #include <list> #include <map> #include <math.h> #include <numeric> #include <queue> #include <regex> #include <set>...
[["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 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
596
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s = sc.nextLine(); String t = sc.nextLine(); int flag = 0; for (int i = 0; i < s.length() - 1; i++) { if (s.charAt(i) != t.charAt(i)) { flag = 1; break; ...
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s = sc.nextLine(); String t = sc.nextLine(); int flag = 0; for (int i = 0; i < s.length(); i++) { if (s.charAt(i) != t.charAt(i)) { flag = 1; break; ...
[["-", 8, 196, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 8, 196, 0, 7, 15, 16, 12, 16, 12, 499]]
3
172
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; int ans = 0; for (int i; i < s.size() - 1; i++) { if (s.at(i) != t.at(i)) ans++; } if (ans == 0) cout << "Yes"; else cout << "No"; }
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; int ans = 0; for (int i = 0; i < s.size(); i++) { if (s.at(i) != t.at(i)) ans++; } if (ans == 0) cout << "Yes"; else cout << "No"; }
[["+", 8, 9, 0, 7, 10, 43, 49, 50, 0, 32], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]]
1
86
#include <iostream> using namespace std; int main() { // your code goes here string s1, s2; cin >> s1; cin >> s2; if (s2.size() != s1.size() + 1) { cout << "NO" << endl; } for (int i = 0; i < s1.size(); i++) { if (s1[i] == s2[i]) continue; else { cout << "NO" << endl; return...
#include <iostream> using namespace std; int main() { // your code goes here string s1, s2; cin >> s1; cin >> s2; if (s2.size() != s1.size() + 1) { cout << "No" << endl; } for (int i = 0; i < s1.size(); i++) { if (s1[i] == s2[i]) continue; else { cout << "No" << endl; return...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
136
import java.util.Map; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String S = scan.next(); String T = scan.next(); String TT = T.substring(1, T.length()); if (TT.equals(S)) { System.out.println("Yes"); ...
import java.util.Map; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String S = scan.next(); String T = scan.next(); String TT = T.substring(0, S.length()); if (TT.equals(S)) { System.out.println("Yes"); ...
[["-", 0, 503, 49, 200, 51, 492, 3, 4, 0, 499], ["+", 0, 503, 49, 200, 51, 492, 3, 4, 0, 499], ["-", 49, 200, 51, 492, 3, 4, 0, 492, 500, 22], ["+", 49, 200, 51, 492, 3, 4, 0, 492, 500, 22]]
3
112
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { string str, str1; cin >> str; cin >> str1; if (str1.size() != str.size() + 1) cout << "NO" << "\n"; else { str1.pop_back(); if (str == str1) cout << "YES" << "\n"; else cout << "NO"...
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { string str, str1; cin >> str; cin >> str1; if (str1.size() != str.size() + 1) cout << "No" << "\n"; else { str1.pop_back(); if (str == str1) cout << "Yes" << "\n"; else cout << "No"...
[["-", 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
90
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s; cin >> t; int flag = 1; if (s.length() + 1 == t.length()) { for (int i = 0; i < s.length(); i++) { if (s[i] != t[i]) { flag = 0; break; } } if (flag) cout << "YES"; else ...
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s; cin >> t; int flag = 1; if (s.length() + 1 == t.length()) { for (int i = 0; i < s.length(); i++) { if (s[i] != t[i]) { flag = 0; break; } } if (flag) cout << "Yes"; 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
115
s1 = input() s2 = input() def check(s1,s2): if len(s1)+1 != len(s2): print('No') return for i in range(len(s1)): if s1[i] != s2[1]: print('No') return print('Yes') check(s1,s2)
s1 = input() s2 = input() def check(s1,s2): if len(s1)+1 != len(s2): print('No') return for i in range(len(s1)): if s1[i] != s2[i]: print('No') # print(s1[i],s2[i]) return print('Yes') check(s1,s2)
[["-", 8, 196, 0, 57, 15, 666, 0, 206, 206, 612], ["+", 8, 196, 0, 57, 15, 666, 0, 206, 206, 22]]
5
79
#include <algorithm> #include <cstdlib> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <string> #include <vector> using namespace std; int main() { string S, T; cin >> S; cin >> T; string ans = "Yes"; if (S.size() + 1 != T.size()) ans = "No"; else { for (int i = 0; ...
#include <algorithm> #include <cstdlib> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <string> #include <vector> using namespace std; int main() { string S, T; cin >> S; cin >> T; string ans = "Yes"; if (S.size() + 1 != T.size()) ans = "No"; for (int i = 0; i < S.size(...
[["-", 0, 14, 8, 9, 0, 57, 75, 76, 0, 95], ["-", 8, 9, 0, 57, 75, 76, 0, 9, 0, 45], ["-", 0, 57, 64, 9, 0, 1, 0, 16, 17, 60], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 17, 32], ["-", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46]]
1
123
S = input() T = input() a = T.find(S) if a == 0: T = T.lstrip(S) if len(T) == 1: print("Yes") else: print("No") else: print("No")
S = input() T = input() a = T.find(S) if a == 0: T = T[len(S):] if len(T) == 1: print("Yes") else: print("No") else: print("No")
[["-", 0, 1, 0, 662, 12, 652, 63, 319, 0, 131], ["-", 0, 1, 0, 662, 12, 652, 63, 319, 319, 22], ["+", 64, 196, 0, 1, 0, 662, 12, 206, 0, 70], ["+", 0, 662, 12, 206, 206, 663, 0, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 206, 206, 663, 0, 102], ["+", 64, 196, 0, 1, 0, 662, 12, 206, 0, 73]]
5
61
s = input() t = input() if len(s)+1 == len(t) and s == t[:-2]: print("Yes") else: print("No")
s = input() t = input() if len(s)+1 == len(t) and s == t[:-1]: print("Yes") else: print("No")
[["-", 12, 666, 0, 206, 206, 663, 0, 664, 28, 612], ["+", 12, 666, 0, 206, 206, 663, 0, 664, 28, 612]]
5
46
s, t = input(), input() if t[:-1] == s: print("YES") else: print("NO")
s, t = input(), input() if t[:-1] == s: print("Yes") else: print("No")
[["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]]
5
35
//@@@@@@@@@@ JAI BAJRANG BALI @@@@@@@@@ // COMPILE BY:) NAMAN #include <bits/stdc++.h> using namespace std; #define ll long long int #define pb push_back #define mp make_pair #define mod 1000000007 #define maxn 10000001 #define endl "\n" #define inf INT_MAX #define vec vector<ll> #define mps map<ll, ll> #define ppl v...
//@@@@@@@@@@ JAI BAJRANG BALI @@@@@@@@@ // COMPILE BY:) NAMAN #include <bits/stdc++.h> using namespace std; #define ll long long int #define pb push_back #define mp make_pair #define mod 1000000007 #define maxn 10000001 #define endl "\n" #define inf INT_MAX #define vec vector<ll> #define mps map<ll, ll> #define ppl v...
[["-", 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
191
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); string s, t; cin >> s; cin >> t; if (s.size() >= 1 && s.size() <= 10 && s.size() + 1 == t.size()) { t.pop_back(); if (s == t) cout << "YES" << endl; else cout << "NO" << endl; } else...
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); string s, t; cin >> s; cin >> t; if (s.size() >= 1 && s.size() <= 10 && s.size() + 1 == t.size()) { t.pop_back(); if (s == t) cout << "Yes" << endl; else cout << "No" << endl; } else...
[["-", 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
114
#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 ans; rep(i, S.size()) { if (S.at(i) != T.at(i)) { cout << "NO" << endl; return 0; } } cout << "Yes" << endl; return 0; }
#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; rep(i, S.size()) { if (S.at(i) != T.at(i)) { cout << "No" << endl; return 0; } } cout << "Yes" << endl; return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
87
#include <bits/stdc++.h> using namespace std; int main() { string a, b; cin >> a >> b; if (a.length() != b.length() - 1) cout << "No"; else { int t = 0; for (int i = 0; i < a.length() - 1; i++) { if (a[i] != b[i]) t = 1; } if (t == 0) cout << "Yes"; else cout ...
#include <bits/stdc++.h> using namespace std; int main() { string a, b; cin >> a >> b; if (a.length() != b.length() - 1) cout << "No"; else { int t = 0; for (int i = 0; i < a.length(); i++) { if (a[i] != b[i]) t = 1; } if (t == 0) cout << "Yes"; else cout << "...
[["-", 0, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 0, 9, 0, 7, 15, 16, 12, 16, 12, 13]]
1
110
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; if (s.size() + 1 == t.size() && equal(begin(s), end(s), begin(t))) { 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.size() + 1 == t.size() && equal(begin(s), end(s), begin(t))) { 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
81
s = input(); t = input(); u = t[:-1]; print(u); if u == s: print("Yes"); else: print("No");
s = input(); t = input(); u = t[:-1]; if u == 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], ["-", 36, 36, 36, 36, 36, 36, 0, 656, 0, 35]]
5
47
S = input() T = input() if S[:len(S)] == T : print('Yes') else : print('No')
S = input() T = input() if T[:len(S)] == 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], ["-", 36, 36, 0, 656, 0, 57, 15, 666, 0, 22], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 0, 22]]
5
36
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner cin = new Scanner(System.in); String s1 = cin.nextLine(); String s2 = cin.nextLine(); int x = s2.indexOf(s1); if (x == 0 && s1.length() + 1 == s2.length()) System.out.println("YES"); else ...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner cin = new Scanner(System.in); String s1 = cin.nextLine(); String s2 = cin.nextLine(); int x = s2.indexOf(s1); if (x == 0 && s1.length() + 1 == s2.length()) System.out.println("Yes"); else ...
[["-", 64, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 64, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["-", 75, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 75, 1, 0, 492, 3, 4, 0, 5, 0, 491]]
3
106
#include <bits/stdc++.h> using namespace std; #define ll long long int #define M 1000000007 #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(0); ...
#include <bits/stdc++.h> using namespace std; #define ll long long int #define M 1000000007 #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(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
263
#include "bits/stdc++.h" #include <chrono> using namespace std; using namespace std::chrono; typedef long long ll; typedef unsigned long long ull; typedef long double ld; #define forn(ii, nn) for (int ii = 0; ii < nn; ++ii) #define gcd(ade, bde) __gcd(ade, bde) #define vi vector<int> #define vll vector<ll> #define v...
#include "bits/stdc++.h" #include <chrono> using namespace std; using namespace std::chrono; typedef long long ll; typedef unsigned long long ull; typedef long double ld; #define forn(ii, nn) for (int ii = 0; ii < nn; ++ii) #define gcd(ade, bde) __gcd(ade, bde) #define vi vector<int> #define vll vector<ll> #define v...
[["-", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6]]
1
971
#include <bits/stdc++.h> #define rep(i, a, b) for (int i = a; i < b; i++) #define rrep(i, a, b) for (int i = a; i >= b; i--) #define fore(i, a) for (auto &i : a) #define all(x) (x).begin(), (x).end() using namespace std; typedef long long ll; int main() { string s, t; cin >> s >> t; if (s.length() >= 1 && s.leng...
#include <bits/stdc++.h> #define rep(i, a, b) for (int i = a; i < b; i++) #define rrep(i, a, b) for (int i = a; i >= b; i--) #define fore(i, a) for (auto &i : a) #define all(x) (x).begin(), (x).end() using namespace std; typedef long long ll; int main() { string s, t; cin >> s >> t; if (s.length() >= 1 && s.leng...
[["+", 51, 16, 12, 16, 31, 2, 3, 4, 0, 13], ["+", 51, 16, 12, 16, 31, 2, 3, 4, 0, 21]]
1
124
s=list(input()) t=list(input()) if s==t[:len(s)]: print("Yse") else: print("No")
s=list(input()) t=list(input()) if s==t[:len(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
42
#include <bits/stdc++.h> using namespace std; int main() { string S; string T; cin >> S >> T; char a = S.size(); char b = T.at(a); if (S + b == T) cout << "YES" << endl; else cout << "NO" << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string S; string T; cin >> S >> T; char a = S.size(); char b = T.at(a); if (S + b == 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], ["-", 8, 9, 0, 57, 75, 76, 0, 1, 0, 35], ["-", 0, 30, 0, 14, 8, 9, 0, 37, 0, 38], ["-", 0, 30, 0, 14, 8, 9, 0, 37, 0, 13]]
1
71
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; for (int i = 0; i < s.length(); i++) { if (s[i] != t[i]) { cout << "no" << endl; return 0; } } if (t.length() - 1 == s.length()) cout << "yes" << endl; else cout << "no" << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; for (int i = 0; i < s.length(); i++) { if (s[i] != t[i]) { cout << "No" << endl; return 0; } } if (t.length() - 1 == s.length()) 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], ["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
104
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) #define FOR(i, start, end) for (int i = start; i <= end; i++) const int INF = 1001001001; typedef long long ll; const ll MOD = 1000000007; using namespace std; template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1;...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) #define FOR(i, start, end) for (int i = start; i <= end; i++) const int INF = 1001001001; typedef long long ll; const ll MOD = 1000000007; using namespace std; template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1;...
[["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]]
1
477
#include <bits/stdc++.h> using namespace std; int main() { string s, s1; cin >> s >> s1; s1.erase(s1.begin() + s1.length() - 1); if (s == s1) cout << "YES"; else cout << "NO"; }
#include <bits/stdc++.h> using namespace std; int main() { string s, s1; cin >> s >> s1; s1.erase(s1.begin() + s1.length() - 1); if (s == s1) 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
61
import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc = new Scanner(System.in); String s = sc.nextLine(); String t = sc.nextLine(); if (t.length() == s.length() + 1 && s.equals(t.substring(0, s.length()))) { Sys...
import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc = new Scanner(System.in); String s = sc.next(); String t = sc.next(); if (t.length() == s.length() + 1 && s.equals(t.substring(0, s.length()))) { System.out....
[["-", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22], ["+", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22], ["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491]]
3
121
#include <bits/stdc++.h> using namespace std; string str, str2; int main() { cin >> str >> str2; int s = str.size(), s2 = str2.size(); if (s + 1 != s2) { cout << "NO"; return 0; } for (int i = 0; i < s; i++) if (str[i] != str2[i]) { cout << "NO"; return 0; } cout << "YES"; retu...
#include <bits/stdc++.h> using namespace std; string str, str2; int main() { cin >> str >> str2; int s = str.size(), s2 = str2.size(); if (s + 1 != s2) { cout << "No"; return 0; } for (int i = 0; i < s; i++) if (str[i] != str2[i]) { cout << "No"; return 0; } cout << "Yes"; retu...
[["-", 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
105
#include <algorithm> #include <array> #include <bitset> #include <cassert> #include <chrono> #include <cmath> #include <complex> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <stack> #include <st...
#include <algorithm> #include <array> #include <bitset> #include <cassert> #include <chrono> #include <cmath> #include <complex> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <stack> #include <st...
[["-", 0, 1, 0, 2, 3, 4, 0, 16, 17, 33], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]]
1
531
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S; cin >> T; int i, flag = 0; for (i = 0; i < S.size(); i++) { if (S[i] != T[i]) { flag = 1; break; } } if (flag == 1) { cout << "NO" << endl; } else { cout << "YES" << endl; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S; cin >> T; int i, flag = 0; for (i = 0; i < S.size(); i++) { if (S[i] != T[i]) { flag = 1; break; } } if (flag == 1) { cout << "No" << endl; } else { 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
101
S = input() T = input() for i in range(len(S)): if S[i] != T[i]: print('No') elif S[i] == T[i] and i == len(S)-1: print('Yes') else: pass
S = input() T = input() for i in range(len(S)): if S[i] != T[i]: print('No') break elif S[i] == T[i] and i == len(S)-1: print('Yes') else: pass
[["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94]]
5
67
s=input() y=input() a=len(s) b=0 for i in range(a): if s[i] != y[i] : print("No") b=1 if b == 0: print("Yes")
s=input() y=input() a=len(s) b=0 for i in range(a): if s[i] != y[i] : print("No") b=1 break if b == 0: print("Yes")
[["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94]]
5
58
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; string ans = "Yes"; for (int i = 0; i < s.size(); i++) { if (s.at(i) != t.at(i)) ans == "No"; } if (s.size() + 1 != t.size()) ans == "No"; cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; string ans = "Yes"; for (int i = 0; i < s.size(); i++) { if (s.at(i) != t.at(i)) { ans = "No"; } } if (s.size() + 1 != t.size()) ans = "No"; cout << ans << endl; }
[["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 45], ["-", 8, 9, 0, 57, 64, 1, 0, 16, 17, 60], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46], ["+", 8, 9, 0, 57, 64, 1, 0, 11, 17, 32]]
1
100
#include <iostream> using namespace std; #define ll long long string s, t; ll ok, i; int main() { cin >> s >> t; for (i = 1; i < t.size() - 1; ++i) { if (t[i] != s[i]) { ok = 1; break; } } if (ok) cout << "No\n"; else cout << "Yes\n"; }
#include <iostream> using namespace std; #define ll long long string s, t; ll ok, i; int main() { cin >> s >> t; for (i = 0; i < t.size() - 1; ++i) { if (t[i] != s[i]) { ok = 1; break; } } if (ok) cout << "No\n"; else cout << "Yes\n"; }
[["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13]]
1
91
s=list(input()) t=list(input()) t.pop() print(t) if s==t: print('Yes') else: print('No')
s=list(input()) t=list(input()) t.pop() if s==t: 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
44
s = input() t = input() if s == t[:1]: if len(t) == len(s)+1: print('Yes') else: print('No') else: print('No')
s = input() t = input() if s == t[:-1]: if len(t) == len(s)+1: print('Yes') else: print('No') else: print('No')
[["+", 15, 666, 0, 206, 206, 663, 0, 664, 17, 33]]
5
54
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; bool flag = 0; t.erase(t.begin() + t.size() - 1); if (s == t) { cout << "YES"; } else { cout << "NO"; } }
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; bool flag = 0; t.erase(t.begin() + t.size() - 1); if (s == t) { cout << "Yes"; } else { cout << "No"; } }
[["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6]]
1
70
function Main(input) { var str = input; str = str.split("\n"); var s = str[0]; var t = str[1]; var ans = ""; // str = str.split(" "); for (var i = 0; i <= s.length; i++) { if (s.charAt(i) !== t.charAt(i)) { ans = "No"; break; } } if (ans !== "No") { ans = "Yes"; } console.l...
function Main(input) { var str = input; str = str.split("\n"); var s = str[0]; var t = str[1]; var ans = ""; // str = str.split(" "); for (var i = 0; i < s.length; i++) { if (s.charAt(i) !== t.charAt(i)) { ans = "No"; break; } } if (ans !== "No") { ans = "Yes"; } console.lo...
[["-", 8, 556, 0, 7, 15, 1, 0, 16, 17, 19], ["+", 8, 556, 0, 7, 15, 1, 0, 16, 17, 18]]
2
135
#include <bits/stdc++.h> using namespace std; int main() { string x, y; cin >> x >> y; if (x == y.substr(0, x.size())) cout << "YES"; else cout << "NO\n"; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string x, y; cin >> x >> y; if (x == y.substr(0, x.size())) cout << "Yes"; 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
57
#include <stdio.h> int main(void) { char s[80]; char t[80]; int i; scanf("%s", &s); scanf("%s", &t); for (i = 0; s[i] != '\0'; i++) { if (s[i] != t[i]) { printf("No\n"); return (0); } } if (t[i + 2] != '\0') { printf("Yes\n"); } else printf("No\n"); return (0); }
#include <stdio.h> int main(void) { char s[80]; char t[80]; int i; scanf("%s", s); scanf("%s", t); for (i = 0; s[i] != '\0'; i++) { if (s[i] != t[i]) { printf("No\n"); return (0); } } if (t[i + 1] == '\0') { printf("Yes\n"); } else printf("No\n"); return (0); }
[["-", 0, 1, 0, 2, 3, 4, 0, 66, 17, 67], ["-", 15, 23, 0, 16, 31, 69, 71, 16, 12, 13], ["+", 15, 23, 0, 16, 31, 69, 71, 16, 12, 13], ["-", 8, 9, 0, 57, 15, 23, 0, 16, 17, 79], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 60]]
0
128
#include <algorithm> #include <bits/stdc++.h> #include <functional> #include <iostream> #include <string> #include <vector> using namespace std; int main() { string s, t; cin >> s; cin >> t; t.pop_back(); if (s == t) { cout << 'Yes' << endl; } else { cout << 'No' << endl; } }
#include <algorithm> #include <bits/stdc++.h> #include <functional> #include <iostream> #include <string> #include <vector> using namespace std; int main() { string s, t; cin >> s; cin >> t; t.pop_back(); if (s == t) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
[["-", 0, 1, 0, 16, 31, 16, 12, 103, 0, 104], ["-", 0, 1, 0, 16, 31, 16, 12, 103, 0, 125], ["-", 0, 16, 31, 16, 12, 103, 0, 42, 0, 22], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 62], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
70
import java.util.*; public class Main { public static void main(String args[]) { Scanner sc = new Scanner(System.in); String a = sc.next(); String b = sc.next(); if (a.length() == b.length() - 1 && b.indexOf(a) != -1) { System.out.println("Yes"); } else { System.out.println("No"); ...
import java.util.*; public class Main { public static void main(String args[]) { Scanner sc = new Scanner(System.in); String a = sc.next(); String b = sc.next(); if (a.length() == b.length() - 1 && b.indexOf(a) == 0) { System.out.println("Yes"); } else { System.out.println("No"); }...
[["-", 0, 57, 15, 15, 0, 16, 12, 16, 17, 79], ["-", 15, 15, 0, 16, 12, 16, 12, 91, 17, 33], ["-", 15, 15, 0, 16, 12, 16, 12, 91, 439, 499], ["+", 0, 57, 15, 15, 0, 16, 12, 16, 17, 60], ["+", 0, 57, 15, 15, 0, 16, 12, 16, 12, 499]]
3
106
function Scanner(input) { var self = this; self.itemNo = 0; self.orgStr = input; self.splitedStrs = (function(target) { var result = []; var target = target.replace(/[\n \t]+/g, " "); var strs = target.split(" "); for (var i = 0, len = strs.length; i < len; i++) { result.push(strs[i]); ...
function Scanner(input) { var self = this; self.itemNo = 0; self.orgStr = input; self.splitedStrs = (function(target) { var result = []; var target = target.replace(/[\n \t]+/g, " "); var strs = target.split(" "); for (var i = 0, len = strs.length; i < len; i++) { result.push(strs[i]); ...
[["+", 0, 11, 12, 16, 12, 16, 31, 16, 17, 72], ["+", 0, 11, 12, 16, 12, 16, 31, 16, 12, 555], ["-", 0, 11, 12, 16, 12, 16, 12, 16, 17, 72], ["-", 0, 11, 12, 16, 12, 16, 12, 16, 12, 555]]
2
366
#include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define mk make_pair #define fir first #define sec second #define i1 insert #define all(v) v.begin(), v.end() #define scan(a, n) \ for (ll i = 0; i < n; i++) ...
#include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define mk make_pair #define fir first #define sec second #define i1 insert #define all(v) v.begin(), v.end() #define scan(a, n) \ for (ll i = 0; i < n; i++) ...
[["-", 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
358
s = input() t = input() s_len = len(s) if s[0:s_len-1] == t[0:s_len-1]: print("Yes") else: print("No")
s = input() t = input() s_len = len(s) if s[0:s_len] == t[0:s_len]: 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
49
#include "bits/stdc++.h" using namespace std; using ll = long long; #define endl '\n' #define all(v) v.begin(), v.end() int main() { string s, t; cin >> s >> t; t.pop_back(); if (s == t) cout << "YES\n"; else cout << "NO\n"; }
#include "bits/stdc++.h" using namespace std; using ll = long long; #define endl '\n' #define all(v) v.begin(), v.end() int main() { string s, t; cin >> s >> t; t.pop_back(); if (s == t) cout << "Yes"; else cout << "No"; }
[["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 44], ["+", 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, 44], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]]
1
67
s1 = input() s2 = input()[1:] if s1 == s2: print("Yes") else: print("No")
s1 = input() s2 = input()[:-1] if s1 == s2: print("Yes") else: print("No")
[["-", 0, 1, 0, 662, 12, 206, 206, 663, 0, 612], ["+", 0, 662, 12, 206, 206, 663, 0, 664, 17, 33], ["+", 0, 662, 12, 206, 206, 663, 0, 664, 28, 612]]
5
33
#include <bits/stdc++.h> #define ll long long using namespace std; int main() { string s; cin >> s; string s1; cin >> s1; int flag = 0; if (s.size() + 1 == s1.size()) { int k = s1.size(); k--; s1.erase(s1.begin() + k); if (s == s1) { flag = 1; cout << "YES"; } } if (flag...
#include <bits/stdc++.h> #define ll long long using namespace std; int main() { string s; cin >> s; string s1; cin >> s1; int flag = 0; if (s.size() + 1 == s1.size()) { int k = s1.size(); k--; s1.erase(s1.begin() + k); if (s == s1) { flag = 1; cout << "Yes"; } } if (flag...
[["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6]]
1
109
#include <bits/stdc++.h> using namespace std; int main() { string s1; cin >> s1; string s2; cin >> s2; int n, m; m = s1.size(); n = s2.size(); int count = 0; for (int i = 0; i < m; i++) { if (s1[i] != s2[i]) { count++; } } if (n == m + 1 && count == 0) { cout << "YES"; } else {...
#include <bits/stdc++.h> using namespace std; int main() { string s1; cin >> s1; string s2; cin >> s2; int n, m; m = s1.size(); n = s2.size(); int count = 0; for (int i = 0; i < m; i++) { if (s1[i] != s2[i]) { count++; } } if (n == m + 1 && count == 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
117