buggy_code
stringlengths
11
625k
fixed_code
stringlengths
17
625k
bug_type
stringlengths
2
4.45k
language
int64
0
8
token_count
int64
5
200k
s=input() t=input() v=t[-1] #print(v) s=s+v #print(s) if t==s: print('YES') else: print('NO')
s=input() t=input() v=t[-1] #print(v) s=s+v #print(s) if t==s: print('Yes') else: print('No')
[["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]]
5
43
#include <bits/stdc++.h> using namespace std; using ll = long long; int main(void) { string s, t; cin >> s >> t; t.pop_back(); if (s == t) { cout << "YES" << endl; } else { cout << "NO" << endl; } return 0; }
#include <bits/stdc++.h> using namespace std; using ll = long long; int main(void) { string s, t; cin >> s >> t; t.pop_back(); if (s == 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
66
#include <bits/stdc++.h> using namespace std; int main() { string a, b; cin >> a >> b; int c = a.size(); int cou = 0; for (int i = 0; i < c; i++) { if (a.at(i) == b.at(i)) { cou++; } } if (cou == 0) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { string a, b; cin >> a >> b; int c = a.size(); int cou = 0; for (int i = 0; i < c; i++) { if (a.at(i) != b.at(i)) { cou++; } } if (cou == 0) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79]]
1
101
S = input() T = input() if T[0:-2] == S: print('Yes') else: print('No')
S = input() T = input() if T[0:-1] == S: print('Yes') else: print('No')
[["-", 15, 666, 0, 206, 206, 663, 0, 664, 28, 612], ["+", 15, 666, 0, 206, 206, 663, 0, 664, 28, 612]]
5
35
#include <bits/stdc++.h> #include <string.h> #include <string> using namespace std; #define ll long long int main() { string s; getline(cin, s); string s1; getline(cin, s1); string s2; int c = 0; for (int i = 0; i < s.size(); i++) { if (s[i] == s1[i]) c++; } int x, y; x = s.size(); ...
#include <bits/stdc++.h> #include <string.h> #include <string> using namespace std; #define ll long long int main() { string s; getline(cin, s); string s1; getline(cin, s1); string s2; int c = 0; for (int i = 0; i < s.size(); i++) { if (s[i] == s1[i]) c++; } int x, y; x = s.size(); ...
[["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 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
132
s = input() t = input() for i in range(len(s)): if s[i] != t[i]: print('no') break elif i == len(s)-1: print('yes')
s = input() t = input() for i in range(len(s)): if s[i] != t[i]: print('No') break elif i == len(s)-1: print('Yes')
[["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]]
5
55
S = input() T = input() if (S == D[:len(S)]) and ((len(S)+1)==len(D)): print('Yes') else: print('No')
S = input() T = input() if (S == T[:len(S)]) and ((len(S)+1)==len(T)): print('Yes') else: print('No')
[["-", 15, 679, 31, 23, 0, 666, 0, 206, 51, 22], ["+", 15, 679, 31, 23, 0, 666, 0, 206, 51, 22], ["-", 12, 23, 0, 666, 0, 652, 3, 4, 0, 22], ["+", 12, 23, 0, 666, 0, 652, 3, 4, 0, 22]]
5
54
s = input() t = input() if s == t[:(len(s)-2)]: print("Yes") else : print("No")
s = input() t = input() if s == t[:len(s)]: print("Yes") else : print("No")
[["-", 15, 666, 0, 206, 206, 663, 0, 23, 0, 24], ["-", 0, 23, 0, 657, 31, 652, 3, 4, 0, 25], ["-", 0, 206, 206, 663, 0, 23, 0, 657, 17, 33], ["-", 0, 206, 206, 663, 0, 23, 0, 657, 12, 612]]
5
40
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; int x, y; x = s.length(); y = t.length(); if (x + 1 == y) { if (s.compare(0, x, t, 0, x) == 0) { cout << "YES"; } else { cout << "No"; } } else { cout << "No"; } }
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; int x, y; x = s.length(); y = t.length(); if (x + 1 == y) { if (s.compare(0, x, t, 0, x) == 0) { cout << "Yes"; } else { cout << "No"; } } else { cout << "No"; } }
[["-", 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> #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define Yes \ cout << "Yes" << endl; \ return 0; #define No ...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define Yes \ cout << "Yes" << endl; \ return 0; #define No ...
[["-", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]]
1
172
// AUTHOR: RAVAN_2070 // PUNE INSTITUTE OF COMPUTER TECHNOLOGY /* I ♥ CLARICE STARLING... EXPLAINATION BELOW-> */ #include <bits/stdc++.h> using namespace std; typedef unsigned long long int ull; typedef long long int ll; typedef long double ld; typedef vector<ll> vi; typedef vector<pair<ll, ll>> vii; typ...
// AUTHOR: RAVAN_2070 // PUNE INSTITUTE OF COMPUTER TECHNOLOGY /* I ♥ CLARICE STARLING... EXPLAINATION BELOW-> */ #include <bits/stdc++.h> using namespace std; typedef unsigned long long int ull; typedef long long int ll; typedef long double ld; typedef vector<ll> vi; typedef vector<pair<ll, ll>> vii; typ...
[["-", 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
260
#include <iostream> #include <string> using namespace std; int main() { string S, T; cin >> S >> T; if (S.size() == T.size() - 1) { if (S.compare(0, S.size() - 1, T, 0, S.size() - 1) == 0) { cout << "Yes" << endl; } else { cout << "No" << endl; } } else { cout << "No" << endl; } ...
#include <iostream> #include <string> using namespace std; int main() { string S, T; cin >> S >> T; if (S.size() == T.size() - 1) { if (S.compare(0, S.size(), T, 0, S.size()) == 0) { cout << "Yes" << endl; } else { cout << "No" << endl; } } else { cout << "No" << endl; } return...
[["-", 51, 16, 31, 2, 3, 4, 0, 16, 17, 33], ["-", 51, 16, 31, 2, 3, 4, 0, 16, 12, 13]]
1
109
s = input() t = input() u = t[-1] out = ('No', 'Yes')[s == u] print(out)
s = input() t = input() u = t[:-1] out = ('No', 'Yes')[s == u] print(out)
[["+", 0, 1, 0, 662, 12, 206, 206, 663, 0, 102]]
5
37
def main(): l = input() l2 = input() for i in range(len(l)): if l[i] != l2[i]: return("NO") return("Yes") if __name__ == "__main__": print(main())
def main(): l = input() l2 = input() for i in range(len(l)): if l[i] != l2[i]: return("No") return("Yes") if __name__ == "__main__": print(main())
[["-", 64, 196, 0, 37, 0, 23, 0, 557, 0, 6], ["+", 64, 196, 0, 37, 0, 23, 0, 557, 0, 6]]
5
62
#include <bits/stdc++.h> #define this ->tt #define long long ll using namespace std; int main() { string s; string t, a; cin >> s >> t; if (s.size() == t.size()) a = "No"; else { for (int i = 0; i <= s.size(); i++) { if (s[i] == t[i]) a = "Yes"; else if (s[i] != t[i]) { a =...
#include <bits/stdc++.h> #define this ->tt #define long long ll using namespace std; int main() { string s; string t, a; cin >> s >> t; if (s.size() == t.size()) a = "No"; else { for (int i = 0; i < s.size(); i++) { if (s[i] == t[i]) a = "Yes"; else if (s[i] != t[i]) { a = ...
[["-", 75, 76, 0, 9, 0, 7, 15, 16, 17, 19], ["+", 75, 76, 0, 9, 0, 7, 15, 16, 17, 18]]
1
124
#include <bits/stdc++.h> using namespace std; string S, T; void imput() { cin >> S >> T; } void solve() { T.pop_back(); if (S == T) cout << "yes" << endl; else cout << "no" << endl; } int main() { imput(); solve(); }
#include <bits/stdc++.h> using namespace std; string S, T; void imput() { cin >> S >> T; } void solve() { T.pop_back(); if (S == T) cout << "Yes" << endl; else cout << "No" << endl; } int main() { imput(); solve(); }
[["-", 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
72
/* @uthor: Amit Kumar user --> GitHub: drviruses ; CodeChef: dr_virus_ ; Codeforces,AtCoder,Hackerearth,Hakerrank: dr_virus; */ #include <bits/stdc++.h> #include <chrono> using namespace std; using namespace std::chrono; //#include <boost/multiprecision/cpp_int.hpp> // namespace mp = boost::multiprecision; /...
/* @uthor: Amit Kumar user --> GitHub: drviruses ; CodeChef: dr_virus_ ; Codeforces,AtCoder,Hackerearth,Hakerrank: dr_virus; */ #include <bits/stdc++.h> #include <chrono> using namespace std; using namespace std::chrono; //#include <boost/multiprecision/cpp_int.hpp> // namespace mp = boost::multiprecision; /...
[["-", 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
255
s=raw_input() t=raw_input() ls=len(s) lt=len(t) if lt==ls+1 and t.startswith(s): print ('Yes') else: print("No")
s=input() t=input() ls=len(s) lt=len(t) if lt==ls+1 and t.startswith(s): print ('Yes') else: print("No")
[["-", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22]]
5
50
#include <bits/stdc++.h> typedef long long int ll; using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(0); string s, t; cin >> s >> t; s += t[t.size() - 1]; if (s == t) { cout << "YES" << endl; } else cout << "NO" << endl; return 0; }
#include <bits/stdc++.h> typedef long long int ll; using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(0); string s, t; cin >> s >> t; s += t[t.size() - 1]; if (s == 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
84
import java.util.*; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); String s = in.next(); String s2 = in.next(); char[] arr = s2.toCharArray(); String res = ""; for (int i = 0; i < arr.length - 1; i++) { res += arr[i]; } if (s.e...
import java.util.*; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); String s = in.next(); String s2 = in.next(); char[] arr = s2.toCharArray(); String res = ""; for (int i = 0; i < arr.length - 1; i++) { res += arr[i]; } if (s.e...
[["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491]]
3
133
s= input() t= input() if len(s) <= 10 and t[0:len(s)]==s and len(t)==len(s)+1: print('YES') else: print('NO')
s= input() t= input() if len(s) <= 10 and t[0:len(s)]==s and len(t)==len(s)+1: print('Yes') else: print('No')
[["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]]
5
56
#include <iostream> #include <string> using namespace std; int main(void) { string s, a; int i, j, z = 0; cin >> s >> a; i = s.size(); for (j = 0; j < i; j++) { if (s[j] != a[j]) { z = 1; break; } } if (z == 0) cout << "No" << endl; else cout << "Yes" << endl; return...
#include <iostream> #include <string> using namespace std; int main(void) { string s, a; int i, j, z = 0; cin >> s >> a; i = s.size(); for (j = 0; j < i; j++) { if (s[j] != a[j]) { z = 1; break; } } if (z == 1) cout << "No" << endl; else cout << "Yes" << endl; return...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]]
1
104
s=input() t=input() u=t[:-1] print(u) if s==u: print('Yes') if s!=u: print('No')
s=input() t=input() u=t[:-1] if s==u: print('Yes') if s!=u: 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() add = len(T) #print(add) if len(S) > 10 or len(S) < 2: print("No") exit() if S != T[:int(len(T)-1)]: print("No") exit() if len(S)+1 != len(T): print("No") exit() for i in range(len(T)): if T[i] not in "abcdefghijklmnopqrstuvwxyz": print("No") exit() else: pass prin...
S = input() T = input() add = len(T) #print(add) if len(S) > 10 or len(S) < 1: print("No") exit() if S != T[:int(len(T)-1)]: print("No") exit() if len(S)+1 != len(T): print("No") exit() for i in range(len(T)): if T[i] not in "abcdefghijklmnopqrstuvwxyz": print("No") exit() else: pass prin...
[["-", 0, 656, 0, 57, 15, 679, 12, 666, 0, 612], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 0, 612], ["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]]
5
129
import java.util.Scanner; public class Main { public static void main(final String[] args) throws Exception { final Scanner scan = new Scanner(System.in); String str1 = scan.next(); String str2 = scan.next(); scan.close(); if (str1.equals(str2.substring(0, str2.length() - 1))) { System.o...
import java.util.Scanner; public class Main { public static void main(final String[] args) throws Exception { final Scanner scan = new Scanner(System.in); String str1 = scan.next(); String str2 = scan.next(); scan.close(); if (str1.equals(str2.substring(0, str2.length() - 1))) { System.ou...
[["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491]]
3
112
// 2020-05-27 #include <iostream> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); string s, t; cin >> s >> t; for (int i = 0; i < s.length(); i++) { if (s[i] != t[i]) { cout << "no"; return 0; } } cout << "yes"; return 0; }
// 2020-05-27 #include <iostream> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); string s, t; cin >> s >> t; for (int i = 0; i < s.length(); i++) { if (s[i] != t[i]) { 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], ["-", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6]]
1
90
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/detail/standard_policies.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; #define ll long long #define int long long #define pb push_back #define For(i, n) for (ll i = 0; i < n; i++) #define f...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/detail/standard_policies.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; #define ll long long #define int long long #define pb push_back #define For(i, n) for (ll i = 0; i < n; i++) #define f...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
199
#include <bits/stdc++.h> #pragma GCC target("avx2") #pragma GCC optimization("O3") #pragma GCC optimization("unroll-loops") using namespace std; #define int long long #define deb(x) cout << #x << " " << x << endl; #define pb push_back #define pp pop_back #define F first #define S second #define all(x) x.begin(), x.e...
#include <bits/stdc++.h> #pragma GCC target("avx2") #pragma GCC optimization("O3") #pragma GCC optimization("unroll-loops") using namespace std; #define int long long #define deb(x) cout << #x << " " << x << endl; #define pb push_back #define pp pop_back #define F first #define S second #define all(x) x.begin(), x.e...
[["-", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]]
1
158
/*Practice hard*/ #include <bits/stdc++.h> using namespace std; //_______MACROS_______// #define fast \ ios_base::sync_with_stdio(0); \ cin.tie(0); ...
/*Practice hard*/ #include <bits/stdc++.h> using namespace std; //_______MACROS_______// #define fast \ ios_base::sync_with_stdio(0); \ cin.tie(0); ...
[["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]]
1
127
S = input() T = input() if S+1 in T: print("Yes") else: print("No")
S = input() T = input() if S+T[-1] in T: print("Yes") else: print("No")
[["+", 0, 57, 15, 666, 0, 657, 12, 206, 51, 22], ["+", 0, 57, 15, 666, 0, 657, 12, 206, 0, 70], ["+", 15, 666, 0, 657, 12, 206, 206, 664, 17, 33], ["+", 0, 57, 15, 666, 0, 657, 12, 206, 0, 73]]
5
31
s = input() t = input() if s == t[:len(s)] and len(s) == len(t) - 1: print('yes') else: print('no')
s = input() t = input() if s == t[:len(s)] and len(s) == len(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
48
a = input() b = input() if a[:-1] == b[:-2] and len(a) + 1 == len(b): print("Yes") else: print("No")
a = input() b = input() if a == b[:-1] and len(a) + 1 == len(b): print("Yes") else: print("No")
[["-", 0, 57, 15, 679, 31, 666, 0, 206, 0, 70], ["-", 15, 679, 31, 666, 0, 206, 206, 663, 0, 102], ["-", 31, 666, 0, 206, 206, 663, 0, 664, 17, 33], ["-", 31, 666, 0, 206, 206, 663, 0, 664, 28, 612], ["-", 0, 57, 15, 679, 31, 666, 0, 206, 0, 73], ["+", 31, 666, 0, 206, 206, 663, 0, 664, 28, 612]]
5
51
#include <bits/stdc++.h> using namespace std; int main() { int n = 0; string s; cin >> s; string t; cin >> t; for (int i = 0; i < s.size(); i++) { if (s[i] == t[i]) { n += 1; } else { n += 0; } } cout << n; if (n == s.size()) { cout << "Yes"; } else { cout << "No"; ...
#include <bits/stdc++.h> using namespace std; int main() { int n = 0; string s; cin >> s; string t; cin >> t; for (int i = 0; i < s.size(); i++) { if (s[i] == t[i]) { n += 1; } else { n += 0; } } // cout << n; if (n == s.size()) { cout << "Yes"; } else { cout << "No"...
[["-", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 151], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
110
s, t = 2.times.map{gets.chomp} print t.include?(s) ? "Yes" : "No"
s, t = 2.times.map{gets.chomp} print t.chop == s ? "Yes" : "No"
[["-", 0, 652, 3, 4, 0, 754, 15, 652, 735, 22], ["-", 3, 4, 0, 754, 15, 652, 3, 4, 0, 24], ["+", 3, 4, 0, 754, 15, 738, 31, 652, 735, 22], ["+", 0, 652, 3, 4, 0, 754, 15, 738, 17, 60], ["-", 3, 4, 0, 754, 15, 652, 3, 4, 0, 25]]
4
29
S = input() T = input() s = len(S) t = len(T) if (S == T[:s]) & (t == s+1): print("yes") else: print("no")
S = input() T = input() s = len(S) t = len(T) if (S == T[:s]) & (t == s+1): print("Yes") else: print("No")
[["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]]
5
55
S,T=input() a=0 for i in range(len(S)): if S[i]!=T[i]: a+=1 if a==0: print("Yes") else: print("No")
S=input() T=input() a=0 for i in range(len(S)): if S[i]!=T[i]: a+=1 if a==0: print("Yes") else: print("No")
[["-", 0, 656, 0, 1, 0, 662, 31, 684, 0, 21], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25]]
5
54
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String str = sc.nextLine(); String str2 = sc.nextLine(); String str3 = str2.substring(0, str2.length() - 1); if (str.equals(str3)) { System.out.println("Yse"); } ...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String str = sc.nextLine(); String str2 = sc.nextLine(); String str3 = str2.substring(0, str2.length() - 1); if (str.equals(str3)) { System.out.println("Yes"); } ...
[["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491]]
3
107
#include <bits/stdc++.h> using namespace std; int main() { string s, t, temp; long long int n; cin >> s >> t; n = t.size(); for (int i = 0; i < n - 1; i++) temp = temp + t[i]; if (s == temp) cout << "YES" << endl; else cout << "NO" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string s, t, temp; long long int n; cin >> s >> t; n = t.size(); for (int i = 0; i < n - 1; i++) temp = temp + t[i]; if (s == temp) 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
86
s = input() t = input() if s[:] == t[len(s):]: print("Yes") else: print("No")
s = input() t = input() if s[:] == t[:len(s)]: print("Yes") else: print("No")
[["+", 0, 57, 15, 666, 0, 206, 206, 663, 0, 102], ["-", 0, 57, 15, 666, 0, 206, 206, 663, 0, 102]]
5
39
#include "bits/stdc++.h" using namespace std; typedef vector<int> vi; vector<vi> graph; vector<int> ans; int main(void) { string S; string T; cin >> S; cin >> T; int j = S.length(); for (int i = 0; i < j; i++) { if (S[i] != T[i]) { cout << "NO" << endl; return 0; } } cout << "Ye...
#include "bits/stdc++.h" using namespace std; typedef vector<int> vi; vector<vi> graph; vector<int> ans; int main(void) { string S; string T; cin >> S; cin >> T; int j = S.length(); for (int i = 0; i < j; i++) { if (S[i] != T[i]) { cout << "No" << endl; return 0; } } cout << "Ye...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
109
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); String S = stdIn.next(); String T = stdIn.next(); if (S.equals(T.substring(1, T.length() - 1))) { System.out.println("Yes"); } else { System.out.println("No"...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); String S = stdIn.next(); String T = stdIn.next(); if (S.equals(T.substring(0, (T.length() - 1)))) { System.out.println("Yes"); } else { System.out.println("N...
[["-", 0, 492, 3, 4, 0, 492, 3, 4, 0, 499], ["+", 0, 492, 3, 4, 0, 492, 3, 4, 0, 499], ["+", 3, 4, 0, 492, 3, 4, 0, 23, 0, 24], ["+", 3, 4, 0, 492, 3, 4, 0, 23, 0, 25]]
3
102
#include <iostream> using namespace std; int main() { string s, t; cin >> s >> t; string ans = "No"; if (equal(s.begin(), s.end(), t.begin())) { if ((int)s.size() - (int)t.size() == -1) ans = "OK"; } cout << ans; return 0; }
#include <iostream> using namespace std; int main() { string s, t; cin >> s >> t; string ans = "No"; if (equal(s.begin(), s.end(), t.begin())) { if ((int)s.size() - (int)t.size() == -1) ans = "Yes"; } cout << ans; return 0; }
[["-", 0, 57, 64, 1, 0, 11, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 11, 12, 5, 0, 6]]
1
90
/* https://www.youtube.com/watch?v=dQw4w9WgXcQ hello. -bedirhan */ #include <iostream> #include <string> using namespace std; int main() { string f, s; cin >> f >> s; s.pop_back(); if (f == s) { cout << "YES"; } else { cout << "NO"; } }
/* https://www.youtube.com/watch?v=dQw4w9WgXcQ hello. -bedirhan */ #include <iostream> #include <string> using namespace std; int main() { string f, s; cin >> f >> s; s.pop_back(); if (f == s) { 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
55
#include <iomanip> #include <iostream> #include <math.h> #include <string> using namespace std; #define PI 3.14159265358979323846264338327950L int res; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); string S, T; cin >> S >> T; if (S.length() < 11 && S.length() + 1 == T.length() && T.su...
#include <iomanip> #include <iostream> #include <math.h> #include <string> using namespace std; #define PI 3.14159265358979323846264338327950L int res; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); string S, T; cin >> S >> T; if (S.length() < 11 && S.length() + 1 == T.length() && T.su...
[["-", 12, 16, 31, 2, 3, 4, 0, 16, 17, 72], ["-", 12, 16, 31, 2, 3, 4, 0, 16, 12, 13]]
1
111
#include <algorithm> #include <iostream> #include <string.h> using namespace std; int main() { string S, T; cin >> S >> T; if (S.size() < 1 || S.size() > 10) { cout << "NO"; return 0; } if (!strncmp(S.c_str(), T.c_str(), S.size()) && T.size() == S.size() + 1) { cout << "YES"; } else { cout <...
#include <algorithm> #include <iostream> #include <string.h> using namespace std; int main() { string S, T; cin >> S >> T; if (S.size() < 1 || S.size() > 10) { cout << "No"; return 0; } if (!strncmp(S.c_str(), T.c_str(), S.size()) && T.size() == S.size() + 1) { cout << "Yes"; } else { cout <...
[["-", 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
114
x = list(input()) y = list(input()) if x[:-1] == y: print("Yes") else: print("No")
x = list(input()) y = list(input()) if y[:-1] == x: 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
40
/* abc_167_a */ #include <stdio.h> #include <string.h> int main() { char S[15], T[15]; int i, a; scanf("%s", S); scanf("%s", T); a = 1; for (i = 1; i < strlen(S); i++) { if (S[i] != T[i]) { a = 0; break; } } if (a == 1) printf("Yes\n"); else printf("No\n"); return 0; }
/* abc_167_a */ #include <stdio.h> #include <string.h> int main() { char S[15], T[15]; int i, a; scanf("%s", S); scanf("%s", T); a = 1; for (i = 0; i < strlen(S); i++) { if (S[i] != T[i]) { a = 0; break; } } if (a == 1) printf("Yes\n"); else printf("No\n"); return 0; }
[["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13]]
0
113
s=input() t=input() if len(s)+1==len(t): if s==t[:len(t)-1]: print("yes") else: print("No") else: print("No")
s=input() t=input() if len(s)+1==len(t): if s==t[:len(t)-1]: print("Yes") else: print("No") else: print("No")
[["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]]
5
59
#include <iostream> using namespace std; string s, t; void solve() { for (int i = 0; i < s.size(); i++) { if (s[i] != t[i]) { cout << "No" << endl; return; } cout << "Yes" << endl; } } int main() { cin >> s >> t; solve(); }
#include <iostream> using namespace std; string s, t; void solve() { for (int i = 0; i < s.size(); i++) { if (s[i] != t[i]) { cout << "No" << endl; return; } } cout << "Yes" << endl; } int main() { cin >> s >> t; solve(); }
[["+", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46], ["-", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46]]
1
85
S=input() T=input() if len(S)+1==len(T): for i in range(len(S)): #回数の時は絶対range() if S[i]==T[i]: a='ok' continue else: a='no' break else: print('no') if a=='ok': print('yes') else: print('no')
S=input() T=input() if len(S)+1==len(T): for i in range(len(S)): #回数の時は絶対range() if S[i]==T[i]: a='ok' continue else: a='no' break else: print('no') if a=='ok': 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
89
S = input() K = input() if S == K[:-2]: print('Yes') else: print('No')
S = input() K = input() if S == K[:-1]: print('Yes') else: print('No')
[["-", 15, 666, 0, 206, 206, 663, 0, 664, 28, 612], ["+", 15, 666, 0, 206, 206, 663, 0, 664, 28, 612]]
5
34
S = str(input()) T = str(input()) if T.startswith(S): print("Yes") else: primt("No")
S = str(input()) T = str(input()) if T.startswith(S): print("Yes") else: print("No")
[["-", 75, 76, 8, 196, 0, 1, 0, 652, 63, 22], ["+", 75, 76, 8, 196, 0, 1, 0, 652, 63, 22]]
5
38
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.equals(b.substring(0, b.length()))) 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.equals(b.substring(0, a.length()))) System.out.println("Yes"); else System.out.println("No"); } }
[["-", 3, 4, 0, 492, 3, 4, 0, 492, 500, 22], ["+", 3, 4, 0, 492, 3, 4, 0, 492, 500, 22]]
3
96
# A - Registration def main(): S, T = input().rstrip().split() print("Yes" if T[:-1] == S else "No") if __name__ == "__main__": main()
# A - Registration def main(): S, T = open(0).read().split() print("Yes" if T[:-1] == S else "No") if __name__ == "__main__": main()
[["-", 63, 319, 500, 652, 63, 319, 500, 652, 63, 22], ["+", 63, 319, 500, 652, 63, 319, 500, 652, 63, 22], ["+", 500, 652, 63, 319, 500, 652, 3, 4, 0, 612], ["-", 12, 652, 63, 319, 500, 652, 63, 319, 319, 22], ["+", 12, 652, 63, 319, 500, 652, 63, 319, 319, 22]]
5
50
#include <iostream> using namespace std; int main() { string s, t; cin >> s; cin >> t; string ret = "Yes"; for (int i = 0; i < s.length(); i++) { if (s.at(i) != s.at(i)) { ret = "No"; break; } } cout << ret << endl; return 0; }
#include <iostream> using namespace std; int main() { string s, t; cin >> s; cin >> t; string ret = "Yes"; for (int i = 0; i < s.length(); i++) { if (s.at(i) != t.at(i)) { ret = "No"; break; } } cout << ret << endl; return 0; }
[["-", 15, 339, 51, 16, 12, 2, 63, 118, 28, 22], ["+", 15, 339, 51, 16, 12, 2, 63, 118, 28, 22]]
1
87
s=input() t=input() if s[-1]==t: print("Yes") else: print("No")
s=input() t=input() if t[:-1]==s: print("Yes") else: print("No")
[["-", 0, 656, 0, 57, 15, 666, 0, 206, 51, 22], ["+", 0, 656, 0, 57, 15, 666, 0, 206, 51, 22], ["+", 0, 57, 15, 666, 0, 206, 206, 663, 0, 102], ["-", 36, 36, 0, 656, 0, 57, 15, 666, 0, 22], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 0, 22]]
5
33
S=input() T=input() if T[0:len(T)-2]==S[0:len(S)-1]: print("Yes") else: print("No")
S=input() T=input() if T[0:len(T)-1]==S[0:len(S)]: print("Yes") else: print("No")
[["-", 15, 666, 0, 206, 206, 663, 0, 657, 12, 612], ["+", 15, 666, 0, 206, 206, 663, 0, 657, 12, 612], ["-", 15, 666, 0, 206, 206, 663, 0, 657, 17, 33]]
5
49
#include <iomanip> #include <iostream> #include <math.h> #include <string> #define M_PI 3.14159265358979323846 using namespace std; int main() { string s, t; cin >> s >> t; if (s == t.substr(0, t.size() - 1)) { cout << "YES"; } else { cout << "NO"; } }
#include <iomanip> #include <iostream> #include <math.h> #include <string> #define M_PI 3.14159265358979323846 using namespace std; int main() { string s, t; cin >> s >> t; if (s == t.substr(0, t.size() - 1)) { 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
68
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef pair<int, int> pi; #define F first #define S second #define PB push_back #define MP make_pair #define REP(i, a, b) for (int i = a; i <= b; i++) #define SQ(a) a *a int main() { ios::sync_with_stdio(0); cin.tie(0);...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef pair<int, int> pi; #define F first #define S second #define PB push_back #define MP make_pair #define REP(i, a, b) for (int i = a; i <= b; i++) #define SQ(a) a *a int main() { ios::sync_with_stdio(0); cin.tie(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
119
#include <stdio.h> #include <string.h> int main() { char s[20]; char t[21]; int ans = 0; scanf("%s ", s); scanf("%s ", t); for (int i = 0; i < strlen(s); ++i) { if (s[i] != t[i]) { ans += 1; break; } } if (ans == 1) { printf("Yes\n"); } else { printf("No\n"); } retu...
#include <stdio.h> #include <string.h> int main() { char s[20]; char t[21]; int ans = 0; scanf("%s ", s); scanf(" %s ", t); for (int i = 0; i < strlen(s); ++i) { if (s[i] != t[i]) { ans += 1; break; } } if (ans == 0) { printf("Yes\n"); } else { printf("No\n"); } ret...
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 8, 9, 0, 57, 15, 23, 0, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 12, 13]]
0
114
S = input() T = input() U = T-T[-1] if S == U: print("Yes") else: print("No")
S = input() T = input() U = T[:-1] if S == U: print("Yes") else: print("No")
[["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 33], ["-", 0, 1, 0, 662, 12, 657, 12, 206, 51, 22], ["+", 0, 1, 0, 662, 12, 206, 206, 663, 0, 102]]
5
38
s = list(input()) t = list(input()) t.pop(-1) if s != t: print('No', s,t) else: print('Yes')
s = list(input()) t = list(input()) t.pop(-1) if s != t: print('No') else: print('Yes')
[["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 21], ["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 22]]
5
46
S = input() T = input() if S == T[-1]: print('Yes') else: print('No')
S = input() T = input() if S == T[:-1]: print('Yes') else: print('No')
[["+", 0, 57, 15, 666, 0, 206, 206, 663, 0, 102]]
5
33
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String S = sc.nextLine(); String T = sc.nextLine(); sc.close(); boolean isOK = true; for (int i = 0; i < S.length(); i++) { char sVal = S.charAt(i); char tVal = ...
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String S = sc.nextLine(); String T = sc.nextLine(); sc.close(); boolean isOK = true; for (int i = 0; i < S.length(); i++) { char sVal = S.charAt(i); char tVal = ...
[["-", 8, 196, 0, 503, 49, 200, 51, 492, 500, 22], ["+", 8, 196, 0, 503, 49, 200, 51, 492, 500, 22]]
3
149
#include <bits/stdc++.h> using namespace std; int main() { int r = 0; string S, T; cin >> S >> T; for (int i = 0; i < S.size(); i++) { if (S.at(i) == T.at(i)) { r = 1; } } if (r == 0) { cout << "No" << endl; } else { cout << "Yes" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { int r = 0; string S, T; cin >> S >> T; for (int i = 0; i < S.size(); i++) { if (S.at(i) != T.at(i)) { r = 1; } } if (r == 1) { cout << "No" << endl; } else { cout << "Yes" << endl; } }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]]
1
97
#include <bits/stdc++.h> #define long long long int using namespace std; #ifdef JUDGE std::ifstream cin("input.txt"); std::ofstream cout("output.txt"); #else using std::cin; using std::cout; #endif using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); cout....
#include <bits/stdc++.h> #define long long long int using namespace std; #ifdef JUDGE std::ifstream cin("input.txt"); std::ofstream cout("output.txt"); #else using std::cin; using std::cout; #endif using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); cout....
[["-", 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
117
S=input() T=input() if(T[0:len(S)-1]==S): print("Yes") else: print("No")
S=input() T=input() if(T[:-1]==S): print("Yes") else: print("No")
[["-", 15, 23, 0, 666, 0, 206, 206, 663, 0, 612], ["-", 0, 206, 206, 663, 0, 657, 31, 652, 63, 22], ["-", 206, 663, 0, 657, 31, 652, 3, 4, 0, 24], ["-", 206, 663, 0, 657, 31, 652, 3, 4, 0, 22], ["-", 206, 663, 0, 657, 31, 652, 3, 4, 0, 25]]
5
41
import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner sc = new Scanner(System.in); String s = sc.next(); String t = sc.next(); String ans = (t.substring(0, s.length() - 1).equals(s)) ? "Yes" : "No"; System.out.println(ans); ...
import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner sc = new Scanner(System.in); String s = sc.next(); String t = sc.next(); String ans = (t.substring(0, t.length() - 1).equals(s)) ? "Yes" : "No"; System.out.println(ans); ...
[["-", 500, 492, 3, 4, 0, 16, 31, 492, 500, 22], ["+", 500, 492, 3, 4, 0, 16, 31, 492, 500, 22]]
3
96
s=input() t=input() for i in range(len(t)-1): T=""+t[i] if T==s: print("Yes") else: print("No")
s=input() t=input() T="" for i in range(len(t)-1): T=T+t[i] if T==s: 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, 557, 0, 654], ["+", 0, 656, 0, 1, 0, 662, 12, 557, 0, 655], ["-", 0, 1, 0, 662, 12, 657, 31, 557, 0, 654], ["-", 0, 1, 0, 662, 12, 657, 31, 557, 0, 655], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 31, 22]...
5
51
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; int num = s.length(); string r = t.substr(0, num); 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; int num = s.length(); string r = t.substr(0, num); if (s == r) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22]]
1
71
S=input() T=input() if T[:0] == S: print("Yes") else: print("No")
S=input() T=input() if T[:-1] == S: print("Yes") else: print("No")
[["-", 0, 57, 15, 666, 0, 206, 206, 663, 0, 612], ["+", 15, 666, 0, 206, 206, 663, 0, 664, 17, 33], ["+", 15, 666, 0, 206, 206, 663, 0, 664, 28, 612]]
5
33
#include <iostream> #include <stdio.h> using namespace std; int main() { string a, b; cin >> a >> b; bool found = false; int count = 0; while (!found && count < 26) { string temp = a; a += ('a' + count); if (temp == b) { cout << "Yes" << endl; found = true; return 0; ...
#include <iostream> #include <stdio.h> using namespace std; int main() { string a, b; cin >> a >> b; bool found = false; int count = 0; while (!found && count < 26) { string temp = a; temp += ('a' + count); if (temp == b) { cout << "Yes" << endl; found = true; return 0;...
[["-", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22]]
1
95
S = input() T = input() abc = 'abcdefghijklmnopqrstuvwxyz' if S == T[:-1] and T[-1] in abc: print('yes') else: print('no')
S = input() T = input() abc = 'abcdefghijklmnopqrstuvwxyz' if S == T[:-1] and T[-1] in abc: 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
47
#include <bits/stdc++.h> using namespace std; #define what_is(x) cerr << #x << " is " << x << endl; #define ll long long #define gcd(a, b) __gcd(a, b) #define pi 2 * acos(0.0) // use emplace_back() instead of push_back() template <typename T> void print(T t) { for (const auto &e : t) cout << e << " "; cout << e...
#include <bits/stdc++.h> using namespace std; #define what_is(x) cerr << #x << " is " << x << endl; #define ll long long #define gcd(a, b) __gcd(a, b) #define pi 2 * acos(0.0) // use emplace_back() instead of push_back() template <typename T> void print(T t) { for (const auto &e : t) cout << e << " "; cout << e...
[["-", 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
266
#include <stdio.h> #include <string.h> int main() { char a[12]; scanf("%s", &a); char b[12]; scanf("%s", &b); int flag = 0; for (int i = 0; i < strlen(a); i++) { if (a[i] != b[i]) { flag = 1; } } if (flag == 0) { printf("YES"); } else { printf("NO"); } return 0; }
#include <stdio.h> #include <string.h> int main() { char a[12]; scanf("%s", &a); char b[12]; scanf("%s", &b); int flag = 0; for (int i = 0; i < strlen(a); i++) { if (a[i] != b[i]) { flag = 1; } } if (flag == 0) { printf("Yes"); } else { printf("No"); } return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
112
#include <stdio.h> int main() { char s1[20], s2[20]; scanf("%s\n%s", s1, s2); for (int i = 0; s1[i]; ++i) { if (s1[i] != s2[i]) { printf("NO\n"); return 0; } } printf("YES\n"); return 0; }
#include <stdio.h> int main() { char s1[20], s2[20]; scanf("%s\n%s", s1, s2); for (int i = 0; s1[i]; ++i) { if (s1[i] != s2[i]) { printf("No\n"); return 0; } } // int l1=0, l2=0; // while(s1[l1]) l1++; // while(s2[l2]) l2++; // if(l1+1==l2) printf("Yes\n"); // else printf("No\n...
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
85
s=list(input()) t=list(input()) a="YES" for i in range(len(t)-1): if s[i] != t[i]: a="NO" print(a)
s=list(input()) t=list(input()) a="Yes" for i in range(len(t)-1): if s[i] != t[i]: a="No" print(a)
[["-", 0, 656, 0, 1, 0, 662, 12, 557, 0, 6], ["+", 0, 656, 0, 1, 0, 662, 12, 557, 0, 6], ["-", 64, 196, 0, 1, 0, 662, 12, 557, 0, 6], ["+", 64, 196, 0, 1, 0, 662, 12, 557, 0, 6]]
5
54
#include <bits/stdc++.h> #define exrep(i, a, b) for (long long i = a; i <= b; i++) #define rep(i, n) for (long long i = 0; i < (long long)(n); i++) #define all(a) a.begin(), a.end() #define rall(a) a.rbegin(), a.rend() using namespace std; typedef unsigned long long ull; typedef long long ll; typedef long double ld; ty...
#include <bits/stdc++.h> #define exrep(i, a, b) for (long long i = a; i <= b; i++) #define rep(i, n) for (long long i = 0; i < (long long)(n); i++) #define all(a) a.begin(), a.end() #define rall(a) a.rbegin(), a.rend() using namespace std; typedef unsigned long long ull; typedef long long ll; typedef long double ld; ty...
[["-", 8, 9, 0, 1, 0, 2, 63, 118, 28, 22], ["+", 8, 9, 0, 1, 0, 2, 63, 118, 28, 22]]
1
298
import java.io.*; import java.util.*; public class Main { private static void solve() { // Implement solution here. String S = next(); String T = next(); if (T.indexOf(S, 0) == 1) { System.out.println("Yes"); } else { System.out.println("No"); } } // Switch input source (std...
import java.io.*; import java.util.*; public class Main { private static void solve() { // Implement solution here. String S = next(); String T = next(); if (T.indexOf(S, 0) == 0) { System.out.println("Yes"); } else { System.out.println("No"); } } // Switch input source (std...
[["-", 8, 196, 0, 57, 15, 15, 0, 16, 12, 499], ["+", 8, 196, 0, 57, 15, 15, 0, 16, 12, 499]]
3
490
#include <algorithm> #include <bitset> #include <cmath> #include <complex> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <unordered_set> #include <utilit...
#include <algorithm> #include <bitset> #include <cmath> #include <complex> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <unordered_set> #include <utilit...
[["-", 15, 339, 51, 16, 31, 2, 63, 118, 28, 22], ["+", 15, 339, 51, 16, 31, 2, 63, 118, 28, 22], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22]]
1
172
#include <iostream> using namespace std; int main() { char a[11], b[13]; cin >> a; cin >> b; int i; for (i = 0; a[i] != 0; i++) { if (a[i] != b[i]) { cout << "No" << endl; } } if (b[i] != 0 && b[i + 1] == 0) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; ...
#include <iostream> using namespace std; int main() { char a[11], b[10000]; cin >> a; cin >> b; int i; for (i = 0; a[i] != 0; i++) { if (a[i] != b[i]) { cout << "No" << endl; return 0; } } if (b[i] != 0 && b[i + 1] == 0) { cout << "Yes" << endl; } else { cout << "No" << endl...
[["-", 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]]
1
116
user_id = input() user_id2 = input() def checkIDinID(id1,id2): if id1 in id2: for i, c in enumerate(id1): if c != id2[i]: return False return True if( 1 <= len(user_id) and len(user_id) <= 10): if checkIDinID(user_id,user_id2) == True: if(len(user_id) == le...
user_id = input() user_id2 = input() def checkIDinID(id1,id2): if id1 in id2: for i, c in enumerate(id1): if c != id2[i]: return False else: return False return True if( 1 <= len(user_id) and len(user_id) <= 10): if checkIDinID(user_id,user_id2) == True...
[["+", 0, 14, 8, 196, 0, 57, 75, 76, 0, 95], ["+", 0, 14, 8, 196, 0, 57, 75, 76, 0, 102], ["+", 0, 57, 75, 76, 8, 196, 0, 37, 0, 38], ["+", 0, 57, 75, 76, 8, 196, 0, 37, 0, 147], ["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]]
5
140
#include <iostream> #include <string> using namespace std; int main() { string s, ss; cin >> s >> ss; int flag = 0; for (int i = 1; i <= s.size(); i++) { if (s[i] != ss[i]) { flag = 1; break; } } if (flag || s.size() + 1 != ss.size()) { cout << "No" << endl; } else { cout << "Y...
#include <iostream> #include <string> using namespace std; int main() { string s, ss; cin >> s >> ss; int flag = 0; for (int i = 0; i < s.size(); i++) { if (s[i] != ss[i]) { flag = 1; break; } } if (flag || s.size() + 1 != ss.size()) { cout << "No" << endl; } else { cout << "Ye...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18]]
1
109
S=input() T=input() l=len(S) if S==T[:-1] and S.islower()==True and 1<=l and l<=10: print("Yes") else: print("NO")
S=input() T=input() l=len(S) if S==T[:-1] and S.islower()==True and 1<=l and l<=10: 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
56
S=input("S=") T=input("T=") l=len(S) if 1<=l and l<=10 and S.islower()==True and len(T)==l+1: if T.startswith(S)==True and T.islower()==True: print("Yes") else: print("No") else: print("No")
S=input("") T=input("") l=len(S) if 1<=l and l<=10 and S.islower()==True and len(T)==l+1: if T.startswith(S)==True and T.islower()==True: print("Yes") else: print("No") else: print("No")
[["-", 0, 662, 12, 652, 3, 4, 0, 557, 0, 6]]
5
88
#include <bits/stdc++.h> using namespace std; int main() { string s, t; int p = 0; cin >> s; cin >> t; for (int i = 0; i < s.length(); i++) { if (s[i] != t[i]) { p++; cout << "No" << endl; } } if (p == 0) { cout << "Yes" << endl; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string s, t; int p = 0; cin >> s; cin >> t; for (int i = 0; i < s.length(); i++) { if (s[i] != t[i]) { p++; cout << "No" << endl; break; } } if (p == 0) { cout << "Yes" << endl; } return 0; }
[["+", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94], ["+", 8, 9, 0, 57, 64, 9, 0, 93, 0, 35]]
1
94
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); string s, t; cin >> s >> t; t.pop_back(); if (t == s) cout << "YES"; else cout << "NO"; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); string s, t; cin >> s >> t; t.pop_back(); if (t == s) 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], ["-", 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
72
S=input() T=input() T_=slice(T[:-1]) if (S==T_): print("Yes") else: print("No")
S=input() T=input() T_=T[:-1] if (S==T_): print("Yes") else: print("No")
[["-", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25]]
5
42
/*ITS FUCKING O(N) now GET ACCEPTED FOR FUCK'S SAKE*/ #include <bits/stdc++.h> #include <iostream> using namespace std; long long powerexp(long long base, long long exp, int mod) { long long res = 1; while (exp > 0) { if (exp % 2 == 1) res = (res * base) % mod; exp = exp >> 1; base = (base * bas...
/*ITS FUCKING O(N) now GET ACCEPTED FOR FUCK'S SAKE*/ #include <bits/stdc++.h> #include <iostream> using namespace std; long long powerexp(long long base, long long exp, int mod) { long long res = 1; while (exp > 0) { if (exp % 2 == 1) res = (res * base) % mod; exp = exp >> 1; base = (base * bas...
[["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6]]
1
419
#include <cstdio> #include <cstring> #include <iostream> using namespace std; #define For(x) for (int i = 0; i < x; i++) int main() { char S[20], T[20]; cin >> S >> T; int len = strlen(S); For(len) if (S[i] != T[i]) puts("No"); puts("Yes"); return 0; }
#include <cstdio> #include <cstring> #include <iostream> using namespace std; #define For(x) for (int i = 0; i < x; i++) int main() { char S[20], T[20]; cin >> S >> T; int len = strlen(S); For(len) if (S[i] != T[i]) return puts("No"), 0; puts("Yes"); return 0; }
[["+", 0, 14, 8, 9, 0, 57, 64, 37, 0, 38], ["+", 8, 9, 0, 57, 64, 37, 0, 34, 0, 21], ["+", 8, 9, 0, 57, 64, 37, 0, 34, 12, 13]]
1
81
s= input() t = input() if(len(t) != len(s)+1): print("No") else: for i in range(len(s)): if(s[i]!=t[i]): print("No") else: print("Yes")
s= input() t = input() if(len(t) != len(s)+1): print("No") else: for i in range(len(s)): if(s[i]!=t[i]): print("No") break else: print("Yes")
[["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94]]
5
71
#include <bits/stdc++.h> using namespace std; #define IOS std::ios::sync_with_stdio(false), cin.tie(0), cout.tie(0) #define rep(i, a, b) for (i = a; i < b; i++) #define pb push_back #define LL long long #define fi first #define se second int gcd(int a, int b) { if (a == 0) return 0; else return (b == 0) ? a...
#include <bits/stdc++.h> using namespace std; #define IOS std::ios::sync_with_stdio(false), cin.tie(0), cout.tie(0) #define rep(i, a, b) for (i = a; i < b; i++) #define pb push_back #define LL long long #define fi first #define se second int gcd(int a, int b) { if (a == 0) return 0; else return (b == 0) ? a...
[["-", 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
128
s = input() v = input()[::-1] print('Yes' if s == v else 'No')
s = input() v = input()[:-1] print('Yes' if s == v else 'No')
[["-", 0, 1, 0, 662, 12, 206, 206, 663, 0, 102]]
5
30
#include <bits/stdc++.h> using namespace std; #define REP(i, n) for (int i = 0; i < (int)(n); i++) #define REP1(i, n) for (int i = 1; i <= (int)(n); i++) #define all(x) (x).begin(), (x).end() #define SZ(x) ((int)(x).size()) using ll = long long; const ll mod = 1e9 + 7; int main() { string s, t; cin >> s >> t; if...
#include <bits/stdc++.h> using namespace std; #define REP(i, n) for (int i = 0; i < (int)(n); i++) #define REP1(i, n) for (int i = 1; i <= (int)(n); i++) #define all(x) (x).begin(), (x).end() #define SZ(x) ((int)(x).size()) using ll = long long; const ll mod = 1e9 + 7; int main() { string s, t; cin >> s >> t; if...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
105
s = str(input()) t = str(input()) ans = 'no' if len(s) + 1 == len(t): i = 0 for l in s: if l == t[i]: if len(s) == i + 1: ans = 'yes' i += 1 else: break; print(ans)
s = str(input()) t = str(input()) ans = 'No' if len(s) + 1 == len(t): i = 0 for l in s: if l == t[i]: if len(s) == i + 1: ans = 'Yes' i += 1 else: break; print(ans)
[["-", 0, 656, 0, 1, 0, 662, 12, 557, 0, 6], ["+", 0, 656, 0, 1, 0, 662, 12, 557, 0, 6], ["-", 64, 196, 0, 1, 0, 662, 12, 557, 0, 6], ["+", 64, 196, 0, 1, 0, 662, 12, 557, 0, 6]]
5
76
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String s = scan.nextLine(); String t = scan.nextLine(); if (s == t.substring(0, s.length())) { System.out.println("Yes"); } else { System.out.println("No"); ...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String s = scan.nextLine(); String t = scan.nextLine(); if (s.equals(t.substring(0, s.length()))) { System.out.println("Yes"); } else { System.out.println("No"...
[["-", 8, 196, 0, 57, 15, 15, 0, 16, 17, 60], ["+", 8, 196, 0, 57, 15, 15, 0, 492, 0, 131], ["+", 8, 196, 0, 57, 15, 15, 0, 492, 141, 22], ["+", 0, 57, 15, 15, 0, 492, 3, 4, 0, 24], ["+", 0, 492, 3, 4, 0, 492, 3, 4, 0, 25]]
3
97
#include <bits/stdc++.h> using namespace std; int main() { string p, q; bool check = true; cin >> p >> q; for (int i = 0; i < p.size(); i++) { if (!(p.at(i) == q.at(i))) { check = false; break; } } if (check) cout << "YES" << endl; else cout << "NO" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string p, q; bool check = true; cin >> p >> q; for (int i = 0; i < p.size(); i++) { if (!(p.at(i) == q.at(i))) { check = false; break; } } if (check) 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
96
s,t = [str(input()) for _ in range(2)] if s[:-1] == t: print('Yes') else: print('No')
t,s = [str(input()) for _ in range(2)] if s[:-1] == t: print('Yes') else: print('No')
[["-", 0, 656, 0, 1, 0, 662, 31, 684, 0, 22], ["-", 0, 656, 0, 1, 0, 662, 31, 684, 0, 21], ["+", 0, 656, 0, 1, 0, 662, 31, 684, 0, 21], ["+", 0, 656, 0, 1, 0, 662, 31, 684, 0, 22]]
5
43
#include <iostream> #include <string> using namespace std; int main() { string a, b; cin >> a >> b; if (a.size() != b.size() + 1) { cout << "No\n"; return 0; } if (b.substr(0, b.size() - 1) == a) { cout << "Yes\n"; return 0; } cout << "No\n"; return 0; }
#include <iostream> #include <string> using namespace std; int main() { string a, b; cin >> a >> b; if (a.size() + 1 != b.size()) { cout << "No\n"; return 0; } if (b.substr(0, b.size() - 1) == a) { cout << "Yes\n"; return 0; } cout << "No\n"; return 0; }
[["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 72], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 72], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]]
1
94
S = input() T = input() l = len(S) if S == T[:-1] and l<=10 and l>=1 and S.islower(): print(True) else: print(False)
S = input() T = input() l = len(S) if S == T[:-1] and l<=10 and l>=1 and S.islower(): print('Yes') else: print('No')
[["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 146], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 654], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 655], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 147]]
5
50