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
a=input() b=input() import syss for i in range(len(a)): if a[i]==b[i]: pass else: print("No") sys.exit() print('Yes')
a=input() b=input() import sys for i in range(len(a)): if a[i]==b[i]: pass else: print("No") sys.exit() print('Yes')
[["-", 36, 36, 0, 656, 0, 596, 141, 673, 0, 22], ["+", 36, 36, 0, 656, 0, 596, 141, 673, 0, 22]]
5
54
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; if (s == t.substr(0, t.size() - 2)) cout << "Yes"; else cout << "No"; }
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; if (s == t.substr(0, t.size() - 1)) cout << "Yes"; else cout << "No"; }
[["-", 51, 16, 12, 2, 3, 4, 0, 16, 12, 13], ["+", 51, 16, 12, 2, 3, 4, 0, 16, 12, 13]]
1
55
s = gets.chomp t = gets.chomp if s == t[0,-2] puts "Yes" else puts "No" end
s = gets.chomp t = gets.chomp if s == t[0..-2] puts "Yes" else puts "No" end
[["-", 0, 493, 0, 121, 15, 738, 12, 742, 0, 21], ["+", 0, 121, 15, 738, 12, 742, 0, 475, 17, 757]]
4
30
#include <bits/stdc++.h> #define ll long long #define pb push_back #define pii pair<int, int> #define vi vector<int> #define vii vector<pii> #define mi map<int, int> #define mii map<pii, int> #define all(a) (a).begin(), (a).end() #define x first #define y second #define sz(x) (int)x.size() #define endl '\n' #define h...
#include <bits/stdc++.h> #define ll long long #define pb push_back #define pii pair<int, int> #define vi vector<int> #define vii vector<pii> #define mi map<int, int> #define mii map<pii, int> #define all(a) (a).begin(), (a).end() #define x first #define y second #define sz(x) (int)x.size() #define endl '\n' #define h...
[["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]]
1
319
import java.util.*; public class Main { public static void main(String[] args) { Scanner console = new Scanner(System.in); String word1 = console.next(); String word2 = console.next(); String end = word2.substring(0, word1.length() - 1); if (word1.compareTo(end) == 0) { System.out.println("Y...
import java.util.*; public class Main { public static void main(String[] args) { Scanner console = new Scanner(System.in); String word1 = console.next(); String word2 = console.next(); String end = word2.substring(0, word1.length()); if (word1.compareTo(end) == 0) { System.out.println("Yes")...
[["-", 49, 200, 51, 492, 3, 4, 0, 16, 17, 33], ["-", 49, 200, 51, 492, 3, 4, 0, 16, 12, 499]]
3
109
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { bool a = true; string s, t; cin >> s >> t; for (int i = 0; i < s.size() - 1; i++) { if (s.at(i) != t.at(i)) { a = false; } } if (a == true) { cout << "Yes" << endl; } if (a == false) { ...
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { bool a = true; string s, t; cin >> s >> t; for (int i = 0; i < s.size(); i++) { if (s.at(i) != t.at(i)) { a = false; } } if (a == true) { cout << "Yes" << endl; } if (a == false) { cout...
[["-", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]]
1
108
#include <bits/stdc++.h> using namespace std; const string YES = "Yes"; const string NO = "No"; void solve(std::string S, std::string T) { bool result = equal(S.begin(), S.end() - 1, T.begin()) && S.size() + 1 == T.size(); cout << (result ? YES : NO) << endl; } // Generated by 1.1.6 https://github.com/kyur...
#include <bits/stdc++.h> using namespace std; const string YES = "Yes"; const string NO = "No"; void solve(std::string S, std::string T) { bool result = equal(S.begin(), S.end(), T.begin()) && S.size() + 1 == T.size(); cout << (result ? YES : NO) << endl; } // Generated by 1.1.6 https://github.com/kyuriden...
[["-", 51, 16, 31, 2, 3, 4, 0, 16, 17, 33], ["-", 51, 16, 31, 2, 3, 4, 0, 16, 12, 13]]
1
130
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; t.pop_back(); if (t.compare(s) == 0) cout << "YES"; else cout << "NO"; }
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; t.pop_back(); if (t.compare(s) == 0) cout << "Yes"; else cout << "No"; }
[["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]]
1
53
s = gets.chomp.to_s t = gets.chomo.to_s d = t.chop! if s == d puts "Yes" else puts "No" end
s = gets.chomp.to_s t = gets.chomp.to_s d = t.chop! if s == d puts "Yes" else puts "No" end
[["-", 0, 493, 0, 662, 12, 652, 486, 652, 735, 22], ["+", 0, 493, 0, 662, 12, 652, 486, 652, 735, 22]]
4
33
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef vector<int> vi; typedef pair<int, int> pii; int solve() { string s, t; cin >> s >> t; for (int i = 0; i < s.size(); i++) { if (s[i] != t[i]) return -1; } return 0; } int main() { int T = 1; // cin >> T; for (int...
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef vector<int> vi; typedef pair<int, int> pii; int solve() { string s, t; cin >> s >> t; for (int i = 0; i < s.size(); i++) { if (s[i] != t[i]) return -1; } return 0; } int main() { int T = 1; // cin >> T; for (int...
[["-", 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
138
/**********************************************************/ /** Bismillahir-rahmanir-rahim **/ /** In the name of Allah, the Beneficent, the Merciful. **/ /**********************************************************/ /****@author: Sayed Sohan, CSE 13th batch(2016), MBSTU*****/ /**************...
/**********************************************************/ /** Bismillahir-rahmanir-rahim **/ /** In the name of Allah, the Beneficent, the Merciful. **/ /**********************************************************/ /****@author: Sayed Sohan, CSE 13th batch(2016), MBSTU*****/ /**************...
[["-", 0, 1, 0, 11, 12, 69, 341, 342, 0, 13], ["+", 12, 69, 341, 342, 0, 2, 63, 118, 28, 22], ["+", 12, 69, 341, 342, 0, 2, 63, 118, 17, 131], ["+", 12, 69, 341, 342, 0, 2, 63, 118, 119, 120], ["+", 12, 69, 341, 342, 0, 2, 3, 4, 0, 24], ["+", 12, 69, 341, 342, 0, 2, 3, 4, 0, 25]]
1
209
import sys s = input() t = input() for i in range(len(s)): if s[i] != t[i]: print('false') sys.exit() else: print('true')
import sys s = input() t = input() for i in range(len(s)): if s[i] != t[i]: print('No') sys.exit() else: print('Yes')
[["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]]
5
53
#include <bits/stdc++.h> using namespace std; typedef long long int ll; string find(string s1, string s2) { ll n1 = s1.length(); ll n2 = s2.length(); if (n1 != (n2 + 1)) return "No"; string d = s2.substr(0, n1); if (d != s1) return "No"; return "Yes"; } int main() { string s1, s2; cin >> s1; c...
#include <bits/stdc++.h> using namespace std; typedef long long int ll; string find(string s1, string s2) { ll n1 = s1.length(); ll n2 = s2.length(); if (n2 != (n1 + 1)) return "No"; string d = s2.substr(0, n1); if (d != s1) return "No"; return "Yes"; } int main() { string s1, s2; cin >> s1; c...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 31, 22], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 31, 22], ["-", 15, 339, 51, 16, 12, 23, 0, 16, 31, 22], ["+", 15, 339, 51, 16, 12, 23, 0, 16, 31, 22]]
1
116
#include <array> #include <iostream> #include <string> using namespace std; int main(void) { cin.tie(0); ios::sync_with_stdio(false); string S, T; cin >> S; cin >> T; for (auto i = 0; i < (int)S.size(); i++) { if (S[i] != T[i]) { cout << "NO"; return 0; } } cout << "YES"; return 0...
#include <array> #include <iostream> #include <string> using namespace std; int main(void) { cin.tie(0); ios::sync_with_stdio(false); string S, T; cin >> S; cin >> T; for (auto i = 0; i < (int)S.size(); 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
99
'use strict'; (function(input) { const compare = Symbol(); Array.prototype[compare] = function() { const S = this[0]; const T = this[1]; return S.reduce((a, c, i) => a && (c === T[i]), true); } const result = input.split(/\s+/).map(str => str.split(''))[compare](); console.log(result ? 'Yes' : 'No'); })(r...
'use strict'; (function(input) { const compare = Symbol(); Array.prototype[compare] = function() { const S = this[0]; const T = this[1]; return S.reduce((a, c, i) => a && (c === T[i]), true); } const result = input.split(/\s+/).map(str => str.split(''))[compare](); console.log(result ? 'Yes' : 'No'); })(r...
[["-", 0, 2, 3, 3, 0, 2, 63, 558, 559, 560], ["+", 0, 2, 3, 3, 0, 2, 63, 558, 559, 560]]
2
139
#include <iostream> #include <string> using namespace std; int main() { string S, T; getline(cin, S); getline(cin, T); T.pop_back(); if (S == T) { cout << "YES"; } else { cout << "NO"; } // your code goes here return 0; }
#include <iostream> #include <string> using namespace std; int main() { string S, T; getline(cin, S); getline(cin, T); T.pop_back(); if (S == T) { cout << "Yes"; } else { cout << "No"; } // your code goes here return 0; }
[["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6]]
1
66
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sr = new Scanner(System.in); String str = sr.next(); String str2 = sr.next(); boolean flag = true; for (int i = 0; i < str.length(); i++) { char ch = str.charAt(i); char ch2 = str.charAt(i);...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sr = new Scanner(System.in); String str = sr.next(); String str2 = sr.next(); boolean flag = true; for (int i = 0; i < str.length(); i++) { char ch = str.charAt(i); char ch2 = str2.charAt(...
[["-", 8, 196, 0, 503, 49, 200, 51, 492, 500, 22], ["+", 8, 196, 0, 503, 49, 200, 51, 492, 500, 22]]
3
139
#include <iostream> #include <string> using namespace std; int main(void) { string S, T; cin >> S; cin >> T; //途中まで同じかどうか判定 string Result; bool Flag = true; for (int i = 0; i < S.size(); i++) { if (S[i] != T[i]) { Flag = false; } } if (Flag = false) { Result = "No"; } else { ...
#include <iostream> #include <string> using namespace std; int main(void) { string S, T; cin >> S; cin >> T; //途中まで同じかどうか判定 string Result; bool Flag = true; for (int i = 0; i < S.size(); i++) { if (S[i] != T[i]) { Flag = false; } } if (Flag == false) { Result = "No"; } else { ...
[["-", 8, 9, 0, 57, 15, 339, 51, 11, 17, 32], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60]]
1
104
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; t.pop_back(); if (s == t) cout << "YES" << endl; else cout << "NO" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; t.pop_back(); if (s == t) cout << "Yes" << endl; else cout << "No" << endl; return 0; }
[["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 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
52
// In the name of God #include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(0); string s, t; cin >> s >> t; if (t.substr(0, s.length()) == s) cout << "YES"; else cout << "NO"; return 0; }
// In the name of God #include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(0); string s, t; cin >> s >> t; if (t.substr(0, s.length()) == s) cout << "Yes"; else cout << "No"; return 0; }
[["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]]
1
71
s=input() t=input() ct=0 for i in range(0,len(s)): if(s[i]==t[i]): ct=1 if(ct==1): print("Yes") else: print("No")
s=input() t=input() ct=1 for i in range(0,len(s)): if(s[i]!=t[i]): ct=0 if(ct==1): print("Yes") else: print("No")
[["-", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612], ["-", 8, 196, 0, 57, 15, 23, 0, 666, 667, 60], ["+", 8, 196, 0, 57, 15, 23, 0, 666, 667, 79], ["-", 0, 57, 64, 196, 0, 1, 0, 662, 12, 612], ["+", 0, 57, 64, 196, 0, 1, 0, 662, 12, 612]]
5
63
if __name__ == '__main__': S = input() T = input() if S == T[:len(S)]: print('True') else: print('False')
if __name__ == '__main__': S = input() T = 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
43
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; for (unsigned int i = 0; i < S.length(); i++) { if (S.at(i) != T.at(i)) { cout << "no" << endl; return 0; } } if (T.at(T.length() - 1) >= 'a' && T.at(T.length() - 1) <= 'z') cout << "No" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; for (unsigned int i = 0; i < S.length(); i++) { if (S.at(i) != T.at(i)) { cout << "No" << endl; return 0; } } if (T.at(T.length() - 1) >= 'a' && T.at(T.length() - 1) <= 'z') cout << "Yes" << endl; }
[["-", 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
117
import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); String s = sc.nextLine(); String t = sc.nextLine(); String t2 = t.substring(0, s.length() - 1); if (s.equals(t2)) System.out.println("Yes"); else ...
import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); String s = sc.nextLine(); String t = sc.nextLine(); String t2 = t.substring(0, s.length()); if (s.equals(t2)) System.out.println("Yes"); else Syst...
[["-", 49, 200, 51, 492, 3, 4, 0, 16, 17, 33], ["-", 49, 200, 51, 492, 3, 4, 0, 16, 12, 499]]
3
105
n=input() m=input() m=m[:len(m)-1] if(n==m): print("yes") else: print("No")
n=input() m=input() m=m[:len(m)-1] if(n==m): print("Yes") else: print("No")
[["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]]
5
43
#include <bits/stdc++.h> using namespace std; int main(void) { string str; string str2; cin >> str >> str2; int len = str.length(); int count = 0; for (int i = 0; i < len; i++) { if (str[i] != str2[i]) cout << "No" << endl; else count++; } if (len == count) cout << "Yes" << ...
#include <bits/stdc++.h> using namespace std; int main(void) { string str; string str2; cin >> str >> str2; int len = str.length(); int count = 0; for (int i = 0; i < len; i++) { if (str[i] != str2[i]) { cout << "No" << endl; break; } else count++; } if (len == count) ...
[["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 45], ["+", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35], ["+", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94], ["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46]]
1
98
S = input() T = input() if S == T[-1] and len(S) + 1 == len(T): print("Yes") else: print("No")
S = input() T = input() if S == T[0:-1] and len(S) + 1 == len(T): print("Yes") else: print("No")
[["+", 15, 679, 31, 666, 0, 206, 206, 663, 0, 612], ["+", 15, 679, 31, 666, 0, 206, 206, 663, 0, 102]]
5
45
// ********** YATIN KWATRA ********** // AC bakshi Rabha #include <bits/stdc++.h> #define ll long long #define ull unsigned long long #define FIO \ ios_base::sync_with_stdio(false); ...
// ********** YATIN KWATRA ********** // AC bakshi Rabha #include <bits/stdc++.h> #define ll long long #define ull unsigned long long #define FIO \ ios_base::sync_with_stdio(false); ...
[["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 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
243
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { string s, t; cin >> s >> t; if (t.substr(s.size()) == s) cout << "Yes" << endl; else cout << "No" << endl; return 0; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { string s, t; cin >> s >> t; if (t.substr(0, s.size()) == s) cout << "Yes" << endl; else cout << "No" << endl; return 0; }
[["+", 15, 339, 51, 16, 31, 2, 3, 4, 0, 13], ["+", 15, 339, 51, 16, 31, 2, 3, 4, 0, 21]]
1
63
#include <bits/stdc++.h> #define ll long long using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); string s, t; cin >> s >> t; if (t.size() != (s.size() + 1)) cout << "NO\n"; else { bool yes = true; for (int i = 0; i < s.size() && yes; i++) { if (s[i] != t[i]) { ...
#include <bits/stdc++.h> #define ll long long using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); string s, t; cin >> s >> t; if (t.size() != (s.size() + 1)) cout << "No\n"; else { bool yes = true; for (int i = 0; i < s.size() && yes; i++) { if (s[i] != t[i]) { ...
[["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["-", 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
129
// Atcoder que 1 // Abhishek Pandey #include <bits/stdc++.h> #define SPEED \ ios::sync_with_stdio(false); \ cin.tie(0); \ cout.tie(0); #...
// Atcoder que 1 // Abhishek Pandey #include <bits/stdc++.h> #define SPEED \ ios::sync_with_stdio(false); \ cin.tie(0); \ cout.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
105
#pragma GCC optimize("Ofast") #include <bits/stdc++.h> using namespace std; #define ll long long #define F first #define S second #define pb push_back #define all(c) c.begin(), c.end() #define vi vector<int> #define vll vector<ll> #define vp vector<pair<ll, ll>> #define vpi vector<pair<int, int>> #define lb "\n" #defin...
#pragma GCC optimize("Ofast") #include <bits/stdc++.h> using namespace std; #define ll long long #define F first #define S second #define pb push_back #define all(c) c.begin(), c.end() #define vi vector<int> #define vll vector<ll> #define vp vector<pair<ll, ll>> #define vpi vector<pair<int, int>> #define lb "\n" #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
191
#include <bits/stdc++.h> using namespace std; #define int long long int #define double long double #define rep(i, begin, end) \ for (__typeof(end) i = (begin) - ((begin) > (end)); \ i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin...
#include <bits/stdc++.h> using namespace std; #define int long long int #define double long double #define rep(i, begin, end) \ for (__typeof(end) i = (begin) - ((begin) > (end)); \ i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin...
[["-", 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
166
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); string s, s1; cin >> s; cin >> s1; int l = s1.length(); s1.erase(s1.begin() + l - 1); if (s == s1) cout << "YES" << endl; else cout << "NO" << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); string s, s1; cin >> s; cin >> s1; int l = s1.length(); s1.erase(s1.begin() + l - 1); if (s == s1) cout << "Yes" << endl; else cout << "No" << endl; return 0; }
[["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
89
#include <stdio.h> int main(void) { int i; char s[11], t[12]; scanf("%s %s", s, t); for (i = 0;; i++) { if (t[i] == s[i]) { continue; } else if (t[i] != s[i] && s[i] == '\0') { printf("yes"); break; } else { printf("no"); break; } } return 0; }
#include <stdio.h> int main(void) { int i; char s[11], t[12]; scanf("%s %s", s, t); for (i = 0;; i++) { if (t[i] == s[i]) { continue; } else if (t[i] != s[i] && s[i] == '\0') { printf("Yes"); break; } else { printf("No"); break; } } return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
110
s1 = input() s2 = input() l1 = list(s1) l2 = list(s2) l1.append(s2[len(s2)-1]) if l1 == l2: print("YES") else: print("NO")
s1 = input() s2 = input() l1 = list(s1) l2 = list(s2) l1.append(s2[len(s2)-1]) if l1 == l2: 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
#include <bits/stdc++.h> #define ll long long using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define rrep(i, n) for (int i = 1; i <= n; i++) using P = pair<int, int>; int main() { string s, t; cin >> s >> t; string z = s.substr(0, t.size()); if (z == s && s.size() + 1 == t.size()) cout...
#include <bits/stdc++.h> #define ll long long using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define rrep(i, n) for (int i = 1; i <= n; i++) using P = pair<int, int>; int main() { string s, t; cin >> s; cin >> t; string z = t.substr(0, s.size()); if (z == s && s.size() + 1 == t.size()) ...
[["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["-", 0, 43, 49, 50, 51, 2, 63, 118, 28, 22], ["+", 0, 43, 49, 50, 51, 2, 63, 118, 28, 22], ["-", 51, 2, 3, 4, 0, 2, 63, 118, 28, 22], ["+", 51, 2, 3, 4, 0, 2, 63, 118, 28, 22]]
1
105
#include <cstring> #include <iostream> using namespace std; int main() { char s[11]; char t[12]; int n; cin >> s; cin >> t; n = strlen(s); int j = 0; for (int i = 0; i < n; i++) { if (s[i] != t[i]) { j += 1; } } if (j > 1) { cout << "No"; } else { cout << "Yes"; } }
#include <cstring> #include <iostream> using namespace std; int main() { char s[11]; char t[12]; int n; cin >> s; cin >> t; n = strlen(s); int j = 0; for (int i = 0; i <= n; i++) { if (s[i] != t[i]) { j += 1; } } if (j > 1) { cout << "No"; } else { cout << "Yes"; } }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
106
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); string s, s1; cin >> s; cin >> s1; int l = s1.length(); s1.erase(s1.begin() + l - 1); if (s == s1) 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); string s, s1; cin >> s; cin >> s1; int l = s1.length(); s1.erase(s1.begin() + l - 1); if (s == s1) cout << "Yes"; else cout << "No"; return 0; }
[["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]]
1
85
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; #define sz(s) s.size() #define ll long long int #define ull unsigned ll #define ld long double #define print(v) ...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; #define sz(s) s.size() #define ll long long int #define ull unsigned ll #define ld long double #define print(v) ...
[["-", 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
502
#include <bits/stdc++.h> #define forn(i, a, b) for (int i = a; i <= b; i++) #define ford(i, a, b) for (int i = a; i >= b; i--) using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); string x, y; cin >> x >> y; y.erase(y.length() - 1, 1); (x == y) ? cout << "YES\...
#include <bits/stdc++.h> #define forn(i, a, b) for (int i = a; i <= b; i++) #define ford(i, a, b) for (int i = a; i >= b; i--) using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); string x, y; cin >> x >> y; y.erase(y.length() - 1, 1); (x == y) ? cout << "Yes\...
[["-", 0, 1, 0, 41, 64, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 41, 64, 16, 12, 5, 0, 6], ["-", 0, 1, 0, 41, 75, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 41, 75, 16, 12, 5, 0, 6]]
1
102
s=input() t=input() l=len(s) m=len(t) flag=0 for i in range(0,l): if s[i]==t[i]: flag=1 else: break if flag==1: print("Yes") else: print("No")
s=input() t=input() l=len(s) m=len(t) flag=0 for i in range(0,l): if s[i]==t[i]: flag=1 else: flag=0 break if flag==1: print("Yes") else: print("No")
[["+", 75, 76, 8, 196, 0, 1, 0, 662, 31, 22], ["+", 75, 76, 8, 196, 0, 1, 0, 662, 0, 32], ["+", 75, 76, 8, 196, 0, 1, 0, 662, 12, 612]]
5
71
#include <iostream> #include <string> using namespace std; int main() { string x; string n; cin >> x >> n; n.pop_back(); if (n == x) { cout << "yes" << "\n"; return true; } else { cout << "no" << "\n"; } }
#include <iostream> #include <string> using namespace std; int main() { string x; string n; cin >> x >> n; n.pop_back(); if (n == x) { cout << "Yes" << "\n"; } else { cout << "No" << "\n"; } }
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["-", 8, 9, 0, 57, 64, 9, 0, 37, 0, 38], ["-", 8, 9, 0, 57, 64, 9, 0, 37, 0, 146], ["-", 8, 9, 0, 57, 64, 9, 0, 37, 0, 35]]
1
66
#include <stdio.h> int main() { char S[10], T[11]; int i = 0; scanf("%s", S); scanf("%s", T); while (S[i] != '\0') { if (S[i] != T[i]) { printf("No"); return 0; } i = i + 1; } printf("Yes"); return 0; }
#include <stdio.h> int main(void) { char S[11], T[12]; int i = 0; scanf("%s", S); scanf("%s", T); while (S[i] != '\0') { if (S[i] != T[i]) { printf("No"); return 0; } i++; } printf("Yes"); return 0; }
[["+", 0, 14, 49, 53, 54, 55, 0, 56, 39, 40], ["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["-", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["-", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13], ["+", 0, 52, 8, 9, 0, ...
0
95
S=input() T=input() A=S+T if T.rstrip() != S: print("No") elif len(T)-len(S)!=1: print("No") elif len(S)<= 0 or len(S)>= 11: print("No") elif A.isalpha() and A.islower(): print("Yes") else: print("No")
S=input() T=input() A=S+T if T[:-1]!= S: print("No") elif len(T)-len(S)!=1: print("No") elif len(S)<= 0 or len(S)>= 11: print("No") elif A.isalpha() and A.islower(): print("Yes") else: print("No")
[["-", 0, 57, 15, 666, 0, 652, 63, 319, 0, 131], ["-", 0, 57, 15, 666, 0, 652, 63, 319, 319, 22], ["-", 0, 57, 15, 666, 0, 652, 3, 4, 0, 24], ["-", 0, 57, 15, 666, 0, 652, 3, 4, 0, 25], ["+", 0, 656, 0, 57, 15, 666, 0, 206, 0, 70], ["+", 0, 57, 15, 666, 0, 206, 206, 663, 0, 102], ["+", 15, 666, 0, 206, 206, 663, 0, 664...
5
97
S = input() T = input() if (T.startsadwith(S)) and len(T) == (len(S) + 1): print('Yes') else: print('No')
S = input() T = input() if (T.startswith(S)) and len(T) == (len(S) + 1): print('Yes') else: print('No')
[["-", 15, 679, 31, 23, 0, 652, 63, 319, 319, 22], ["+", 15, 679, 31, 23, 0, 652, 63, 319, 319, 22]]
5
48
#include <iostream> #include <string.h> using namespace std; int main() { string s, t; int c = 0; cin >> s >> t; int n = s.size(); for (int i = 0; i < n; i++) { if (s[i] != t[i]) { c++; break; } } if (c == 0) cout << "No"; else cout << "Yes"; }
#include <iostream> #include <string.h> using namespace std; int main() { string s, t; int c = 0; cin >> s >> t; int n = s.size(); for (int i = 0; i < n; i++) { if (s[i] != t[i]) { c++; break; } } if (c == 0) cout << "Yes"; else cout << "No"; }
[["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]]
1
93
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; bool flag = true; for (int i = 0; i < s.size(); i++) { if (s[i] != t[i]) { flag = false; break; } } if (true) cout << "Yes" << endl; else cout << "No" << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; int flag = 1; for (int i = 0; i < s.size(); i++) { if (s[i] != t[i]) { flag = 0; break; } } if (flag) cout << "Yes" << endl; else cout << "No" << endl; return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 146], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 0, 57, 64, 9, 0, 1, 0, 11, 12, 147], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13], ["-", 0, 14, 8, 9, 0, 57, 15, 339, 51, 146], ["+", 0, 14, 8, 9,...
1
92
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; #define int long long #define pr pair<int, int> #define v1d vector<int> #define mp make_pair #define pb push_back #define v1p vector<pr> #define vb vector<bool> #define...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; #define int long long #define pr pair<int, int> #define v1d vector<int> #define mp make_pair #define pb push_back #define v1p vector<pr> #define vb vector<bool> #define...
[["+", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46], ["-", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46]]
1
202
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; string t; cin >> t; int n = s.size(); int temp = 0; for (int i = 0; i < n; i++) { if (t[i] != s[i]) { temp = 1; } } if (temp == 1) { cout << "YES" << endl; } else { cout << "NO" << endl; } ret...
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; string t; cin >> t; int n = s.size(); int temp = 0; for (int i = 0; i < n; i++) { if (s[i] != t[i]) { temp = 1; } } if (temp == 1) { cout << "No" << endl; } else { cout << "Yes" << endl; } ret...
[["-", 0, 57, 15, 339, 51, 16, 31, 69, 28, 22], ["+", 0, 57, 15, 339, 51, 16, 31, 69, 28, 22], ["-", 0, 57, 15, 339, 51, 16, 12, 69, 28, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 69, 28, 22], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
104
#include <stdio.h> #include <string.h> int main() { char S[20]; char V[20]; scanf("%s", &S); scanf("%s", &V); V[strlen(S) - 1] = '\0'; if (strcmp(S, V) == 0) printf("Yes\n"); else printf("No\n"); return 0; }
#include <stdio.h> #include <string.h> int main() { char S[20]; char V[20]; scanf("%s", &S); scanf("%s", &V); V[strlen(S)] = '\0'; if (strcmp(S, V) == 0) printf("Yes\n"); else printf("No\n"); return 0; }
[["-", 0, 1, 0, 11, 31, 69, 71, 16, 17, 33], ["-", 0, 1, 0, 11, 31, 69, 71, 16, 12, 13]]
0
87
S = input() T = input() msg = "Yes" for i in range(len(S)): if T[i] != S[i]: break msg = "No" print(msg)
S = input() T = input() msg = "Yes" for i in range(len(S)): if T[i] != S[i]: msg = "No" break print(msg)
[["-", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94], ["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94]]
5
47
#include <bits/stdc++.h> using namespace std; #define ll long long #define endl "\n" #define pb push_back #define f(i, n) for (i = 0; i < n; i++) #define F(i, a, b) for (i = a; a <= b; i++) #define arr(a, n) \ for (i = 0; i < n; i++) ...
#include <bits/stdc++.h> using namespace std; #define ll long long #define endl "\n" #define pb push_back #define f(i, n) for (i = 0; i < n; i++) #define F(i, a, b) for (i = a; a <= b; i++) #define arr(a, n) \ for (i = 0; i < n; i++) ...
[["-", 8, 9, 0, 9, 0, 57, 0, 42, 0, 22], ["+", 8, 9, 0, 9, 0, 57, 0, 42, 0, 22]]
1
278
S = input() T = input() T_plus = T[-1] T_a = T[:-1] print("Yes" if S==T else "No")
S = input() T = input() T_plus = T[-1] T_a = T[:-1] print("Yes" if S==T_a else "No")
[["-", 0, 652, 3, 4, 0, 41, 0, 666, 0, 22], ["+", 0, 652, 3, 4, 0, 41, 0, 666, 0, 22]]
5
39
/* -> Written by <- ----------- |K_A_Z_A_M_A| |___________| | ___ | | (^_^) | | /( | )\ | |____|_|____| H O A N G */ // i hope i get better // Task name: #define Task "" using namespace std; // Include #include <bits/stdc++.h> // Define #define reset(x, value) memset((x), (value), siz...
/* -> Written by <- ----------- |K_A_Z_A_M_A| |___________| | ___ | | (^_^) | | /( | )\ | |____|_|____| H O A N G */ // i hope i get better // Task name: #define Task "" using namespace std; // Include #include <bits/stdc++.h> // Define #define reset(x, value) memset((x), (value), siz...
[["-", 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
352
import re a=input() b=input() if len(b)-len(a)==1: if re.search(a,b) is None: print("No") else: print("Yes") else: print("No")
import re a=input() b=input() if len(b)-len(a)==1: if re.search("^"+a,b) is None: print("No") else: print("Yes") else: print("No")
[["+", 0, 652, 3, 4, 0, 657, 31, 557, 0, 654], ["+", 0, 652, 3, 4, 0, 657, 31, 557, 0, 6], ["+", 0, 652, 3, 4, 0, 657, 31, 557, 0, 655], ["+", 15, 666, 0, 652, 3, 4, 0, 657, 17, 72]]
5
59
#include <iostream> #include <math.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <string> #include <time.h> #include <vector> using namespace std; int main(void) { int n, d, count = 0; cin >> n; string a, b; cin >> a; cin >> b; for (int i = 0; i < a.size(); i++) { if (a[i]...
#include <iostream> #include <math.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <string> #include <time.h> #include <vector> using namespace std; int main(void) { int n, d, count = 0; string a, b; cin >> a; cin >> b; for (int i = 0; i < a.size(); i++) { if (a[i] != b[i]) {...
[["-", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
106
S=input() T=input() if T in S and len(T)==len(S)+1 and S[0]==T[0]: print("Yes") else: print("No")
S=input() T=input() if S in T and len(T)==len(S)+1 and S[0]==T[0]: print("Yes") else: print("No")
[["-", 0, 57, 15, 679, 31, 679, 31, 666, 0, 22], ["-", 0, 57, 15, 679, 31, 679, 31, 666, 667, 267], ["+", 0, 57, 15, 679, 31, 679, 31, 666, 667, 267], ["+", 0, 57, 15, 679, 31, 679, 31, 666, 0, 22]]
5
51
#include <stdio.h> #include <string.h> int main(void) { char s[11], t[11]; scanf("%s %s", s, t); puts(strncmp(s, t, strlen(s) - 1) == 0 ? "Yes" : "No"); return 0; }
#include <stdio.h> #include <string.h> int main(void) { char s[11], t[11]; scanf("%s %s", s, t); puts(strncmp(s, t, strlen(s)) == 0 ? "Yes" : "No"); return 0; }
[["-", 15, 16, 31, 2, 3, 4, 0, 16, 17, 33], ["-", 15, 16, 31, 2, 3, 4, 0, 16, 12, 13]]
1
63
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define rrep(i, n) for (int i = 1; i <= (n); ++i) #define drep(i, n) for (int i = (n)-1; i >= 0; --i) #define srep(i, s, t) for (int i = s; i < t; ++i) #define pb push_back using namespace std; using P = pair<int, int>; typedef long long ll; typed...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define rrep(i, n) for (int i = 1; i <= (n); ++i) #define drep(i, n) for (int i = (n)-1; i >= 0; --i) #define srep(i, s, t) for (int i = s; i < t; ++i) #define pb push_back using namespace std; using P = pair<int, int>; typedef long long ll; typed...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
165
#include <stdio.h> int main() { char S[11], T[12]; scanf("%s", S); scanf("%s", T); for (int i = 0; S[i] != '/0'; i++) { if (S[i] != T[i]) { printf("No"); return 0; } } printf("Yes"); return 0; }
#include <stdio.h> int main() { char S[11], T[12]; scanf("%s", S); scanf("%s", T); for (int i = 0; S[i] != '\0'; i++) { if (S[i] != T[i]) { printf("No"); return 0; } } printf("Yes"); return 0; }
[["-", 8, 9, 0, 7, 15, 16, 12, 103, 0, 125], ["-", 0, 7, 15, 16, 12, 103, 0, 42, 0, 13], ["+", 8, 9, 0, 7, 15, 16, 12, 103, 0, 44]]
0
93
#include <iostream> #include <string> using namespace std; string solve(string s, string t) { if (s.length() + 1 == t.length()) { for (int i = 0; i < s.length(); i++) { if (s[i] != t[i]) return "N"; } return "Y"; } else { return "N"; } } int main() { string s, t; cin >> s >> t;...
#include <iostream> #include <string> using namespace std; string solve(string s, string t) { if (s.length() + 1 == t.length()) { for (int i = 0; i < s.length(); i++) { if (s[i] != t[i]) return "No"; } return "Yes"; } else { return "No"; } } int main() { string s, t; cin >> s >...
[["-", 8, 9, 0, 57, 64, 37, 0, 5, 0, 6], ["+", 8, 9, 0, 57, 64, 37, 0, 5, 0, 6], ["-", 0, 57, 64, 9, 0, 37, 0, 5, 0, 6], ["+", 0, 57, 64, 9, 0, 37, 0, 5, 0, 6], ["-", 75, 76, 0, 9, 0, 37, 0, 5, 0, 6], ["+", 75, 76, 0, 9, 0, 37, 0, 5, 0, 6]]
1
118
#include <iostream> #include <string> using namespace std; int main() { string s, t; cin >> s, t; bool ok = true; for (int i = 0; i < s.size(); i++) { if (s[i] != t[i]) { ok = false; break; } } if (ok) cout << "Yes\n"; else cout << "No\n"; return 0; }
#include <iostream> #include <string> using namespace std; int main() { string s, t; cin >> s >> t; bool ok = true; for (int i = 0; i < s.size(); i++) { if (s[i] != t[i]) { ok = false; break; } } if (ok) cout << "Yes\n"; else cout << "No\n"; return 0; }
[["-", 0, 14, 8, 9, 0, 1, 0, 34, 0, 21], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152]]
1
92
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); string s, t; int i, x = 0; cin >> s >> t; if (s.size() < t.size()) { for (i = 0; i < s.size(); i++) { if (s[i] == t[i]) x++; } } if (x == s.size()) cout << "YES" << endl; else ...
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); string s, t; int i, x = 0; cin >> s >> t; if (s.size() < t.size()) { for (i = 0; i < s.size(); i++) { if (s[i] == t[i]) x++; } } if (x == s.size()) cout << "Yes" << 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
121
#include <algorithm> #include <iostream> #include <queue> #include <set> #include <string> #include <vector> #define _USE_MATH_DEFINES #include <cmath> #include <ctime> #include <map> #include <math.h> #define R(i, n) for (int i = 0; i < n; i++) #define S(a) scanf("%d", &a) #define S2(a, b) scanf("%d%d", &a, &b) #defin...
#include <algorithm> #include <iostream> #include <queue> #include <set> #include <string> #include <vector> #define _USE_MATH_DEFINES #include <cmath> #include <ctime> #include <map> #include <math.h> #define R(i, n) for (int i = 0; i < n; i++) #define S(a) scanf("%d", &a) #define S2(a, b) scanf("%d%d", &a, &b) #defin...
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
199
#include <bits/stdc++.h> using namespace std; #define ll long long #define sci(x) scanf("%d", &x) #define scl(x) scanf("%lld", &x) #define scd(x) scanf("%lf", &x) #define forn(i, n) for (ll i = 0; i < n; i++) #define fork(i, n) for (ll i = 1; i <= n; i++) int main() { ios::sync_with_stdio(0); cin.tie(0); // CODE...
#include <bits/stdc++.h> using namespace std; #define ll long long #define sci(x) scanf("%d", &x) #define scl(x) scanf("%lld", &x) #define scd(x) scanf("%lf", &x) #define forn(i, n) for (ll i = 0; i < n; i++) #define fork(i, n) for (ll i = 1; i <= n; i++) int main() { ios::sync_with_stdio(0); cin.tie(0); // CODE...
[["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 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], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
192
// If you can think it, you should implement it #include <bits/stdc++.h> using namespace std; #define xlr8 \ ios::sync_with_stdio(false); \ cin.tie(NULL); ...
// If you can think it, you should implement it #include <bits/stdc++.h> using namespace std; #define xlr8 \ ios::sync_with_stdio(false); \ cin.tie(NULL); ...
[["-", 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
392
#include <bits/stdc++.h> using namespace std; int main() { string s, s1; cin >> s >> s1; if (s1.substr(0, s1.length() - 1) == s) cout << "YES"; else cout << "No"; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string s, s1; cin >> s >> s1; if (s1.substr(0, s1.length() - 1) == s) cout << "Yes"; else cout << "No"; return 0; }
[["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6]]
1
58
#include <bits/stdc++.h> //#pragma GCC optimize("Ofast") //#pragma GCC target("avx,avx2,fma") //#pragma GCC optimization ("unroll-loops") #define int long long #define pb push_back #define all(s) s.begin(), s.end() #define pii pair<int, int> #define fr first #define sc second #define bst ...
#include <bits/stdc++.h> //#pragma GCC optimize("Ofast") //#pragma GCC target("avx,avx2,fma") //#pragma GCC optimization ("unroll-loops") #define int long long #define pb push_back #define all(s) s.begin(), s.end() #define pii pair<int, int> #define fr first #define sc second #define bst ...
[["-", 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
133
#include <bits/stdc++.h> using namespace std; int main() { string s, c; cin >> s >> c; s += c[c.length() - 1]; if (s == c) cout << "YES" << endl; else cout << "NO" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string s, c; cin >> s >> c; s += c[c.length() - 1]; if (s == c) 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
59
#include <bits/stdc++.h> using namespace std; int main() { string str, ttr; cin >> str >> ttr; int nt = ttr.size(); int st = str.size(); if (nt == st + 1) { string kk = ttr.substr(0, st); if (kk == str) { cout << "YES"; return 0; } } cout << "NO"; }
#include <bits/stdc++.h> using namespace std; int main() { string str, ttr; cin >> str >> ttr; int nt = ttr.size(); int st = str.size(); if (nt == st + 1) { string kk = ttr.substr(0, st); if (kk == str) { cout << "Yes"; return 0; } } cout << "No"; }
[["-", 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
86
#include <bits/stdc++.h> using namespace std; int main() { string s1; string s2; cin >> s1 >> s2; int count = 0; for (int i = 0; i < s1.size(); i++) { if (s1[i] == s2[i]) { count++; continue; } else { break; } } if (count == s1.size()) { cout << "YES" << "\n"; ...
#include <bits/stdc++.h> using namespace std; int main() { string s1; string s2; cin >> s1 >> s2; int count = 0; for (int i = 0; i < s1.size(); i++) { if (s1[i] == s2[i]) { count++; continue; } else { break; } } if (count == s1.size()) { cout << "Yes" << "\n"; ...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
108
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define All(a) a.begin(), a.end() #define INF 1000000007 const int MOD = 1000000007; // accumulate(vec.begin(), vec.end(), 0) // std::sort(v.begin(), v.end(), std::greater<Type>()); // set_intersecti...
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define All(a) a.begin(), a.end() #define INF 1000000007 const int MOD = 1000000007; // accumulate(vec.begin(), vec.end(), 0) // std::sort(v.begin(), v.end(), std::greater<Type>()); // set_intersecti...
[["-", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]]
1
217
#include <bits/stdc++.h> using namespace std; int main() { string str1, str2; cin >> str1 >> str2; str2.pop_back(); if (str1 == str2) cout << "YES"; else cout << "NO"; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string str1, str2; cin >> str1 >> str2; str2.pop_back(); if (str1 == str2) cout << "Yes"; else cout << "No"; return 0; }
[["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]]
1
51
#include <iostream> #include <string> using namespace std; int main() { string a, b; cin >> a; cin >> b; string tmp = b.substr(0, a.size()); if (a == tmp) cout << "yes\n"; else cout << "no\n"; return 0; }
#include <iostream> #include <string> using namespace std; int main() { string a, b; cin >> a; cin >> b; string tmp = b.substr(0, a.size()); if (a == tmp) cout << "Yes\n"; else cout << "No\n"; return 0; }
[["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]]
1
67
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; t.pop_back(); cout << ((s == t) ? "YES\n" : "NO\n"); }
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; t.pop_back(); cout << ((s == t) ? "Yes\n" : "No\n"); }
[["-", 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
49
S = inputs() T = inputs() print("Yes" if T.startswith(S) and len(T) == len(S) + 1 else "No", flush=True)
S = input() T = input() print("Yes" if T.startswith(S) and len(T) == len(S) + 1 else "No", flush=True)
[["-", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22]]
5
43
in1 = input() in2 = input() res = True if len(in1) < 1 or len(in1) > 10 : res = False if in1.islower() and in1.isalpha() : pass else : res = False if in2.islower() and in2.isalpha(): if in1 in in2[:len(in2)-2] : if len(in2) - len(in1) == 1 : pass else : res = ...
in1 = input() in2 = input() res = True if len(in1) < 1 or len(in1) > 10 : res = False if in1.islower() and in1.isalpha() : pass else : res = False if in2.islower() and in2.isalpha(): if in1 in in2[:len(in2)-1] : if len(in2) - len(in1) == 1 : pass else : res = ...
[["-", 15, 666, 0, 206, 206, 663, 0, 657, 12, 612], ["+", 15, 666, 0, 206, 206, 663, 0, 657, 12, 612]]
5
123
/*input chokudai chokudaiz */ #include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; if (t.substr(0, s.length()) == s) cout << "YES\n"; else cout << "NO\n"; }
/*input chokudai chokudaiz */ #include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; if (t.substr(0, s.length()) == s) cout << "Yes\n"; else cout << "No\n"; }
[["-", 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
56
S=input() T=input() S = S[0:-1] if S == T: print("Yes") else: print("No")
S=input() T=input() T = T[0:-1] if S == T: print("Yes") else: print("No")
[["-", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["-", 0, 656, 0, 1, 0, 662, 12, 206, 51, 22], ["+", 0, 656, 0, 1, 0, 662, 12, 206, 51, 22]]
5
38
#include <bits/stdc++.h> using namespace std; #define ll long long #define dbg puts("It's Just Begining.Wait For The End!!!!!\n") #define CHECK(x) cout << (#x) << " is " << (x) << "\n"; #define endl printf("\n") typedef pair<ll, ll> pii; #define pb push_back #define ms(a, b) memset(a, b, sizeof(a)) #define in(x) scanf(...
#include <bits/stdc++.h> using namespace std; #define ll long long #define dbg puts("It's Just Begining.Wait For The End!!!!!\n") #define CHECK(x) cout << (#x) << " is " << (x) << "\n"; #define endl printf("\n") typedef pair<ll, ll> pii; #define pb push_back #define ms(a, b) memset(a, b, sizeof(a)) #define in(x) scanf(...
[["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
168
#include <stdio.h> #include <string.h> int main(void) { int i = 0, c; char s[10], a[11]; scanf("%s", s); scanf("%s", a); while (s[i] != '\0' && a[i] != '\0') { if (s[i] == a[i]) { c++; } if (c == strlen(s)) { puts("Yes"); return 0; } i++; } puts("No"); return 0; }
#include <stdio.h> #include <string.h> int main(void) { int i = 0, c = 0; char s[15], a[15]; scanf("%s", s); scanf("%s", a); while (s[i] != '\0' && a[i] != '\0') { if (s[i] == a[i]) { c++; } if (c == strlen(s)) { puts("Yes"); return 0; } i++; } puts("No"); return 0;...
[["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13]]
0
120
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <string> #define t \ int t; \ cin >> t; ...
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <string> #define t \ int t; \ cin >> t; ...
[["-", 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
112
#include <iostream> using namespace std; int main() { string S, T; cin >> S >> T; if (S.size() + 1 == T.size() && T.substr(S.size()) == S) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
#include <iostream> using namespace std; int main() { string S, T; cin >> S >> T; if (S.size() + 1 == T.size() && T.substr(0, S.size()) == S) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
[["+", 51, 16, 12, 16, 31, 2, 3, 4, 0, 13], ["+", 51, 16, 12, 16, 31, 2, 3, 4, 0, 21]]
1
73
#include <bits/stdc++.h> //#include <ext/pb_ds/assoc_container.hpp> // Common file //#include <ext/pb_ds/tree_policy.hpp> //#include <functional> // for less #define PI acos(-1.0) #define eps 1e-9 #define ll long long #define ull unsigned long long #define nl printf("\n") #define sf scanf #define pf printf #define INF ...
#include <bits/stdc++.h> //#include <ext/pb_ds/assoc_container.hpp> // Common file //#include <ext/pb_ds/tree_policy.hpp> //#include <functional> // for less #define PI acos(-1.0) #define eps 1e-9 #define ll long long #define ull unsigned long long #define nl printf("\n") #define sf scanf #define pf printf #define INF ...
[["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
109
#include <algorithm> //sort,二分探索,など #include <bitset> //固定長bit集合 #include <cmath> //pow,logなど #include <complex> //複素数 #include <deque> //両端アクセスのキュー #include <functional> //sortのgreater #include <iomanip> //setprecision(浮動小数点の出力の誤差) #include <iostream> //入出力 #include <iter...
#include <algorithm> //sort,二分探索,など #include <bitset> //固定長bit集合 #include <cmath> //pow,logなど #include <complex> //複素数 #include <deque> //両端アクセスのキュー #include <functional> //sortのgreater #include <iomanip> //setprecision(浮動小数点の出力の誤差) #include <iostream> //入出力 #include <iter...
[["-", 12, 23, 0, 41, 64, 23, 0, 5, 0, 6], ["+", 12, 23, 0, 41, 64, 23, 0, 5, 0, 6], ["-", 12, 23, 0, 41, 75, 23, 0, 5, 0, 6], ["+", 12, 23, 0, 41, 75, 23, 0, 5, 0, 6]]
1
140
#include <bits/stdc++.h> using namespace std; using ll = long long; #define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i) #define ALL(x) (x).begin(), (x).end() #define READ(x) (cin >> (x)) #define WRITE_N(x) (cout << (x) << endl) #define WRITE(x) (cout << (x)) int main() { // get values from input ...
#include <bits/stdc++.h> using namespace std; using ll = long long; #define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i) #define ALL(x) (x).begin(), (x).end() #define READ(x) (cin >> (x)) #define WRITE_N(x) (cout << (x) << endl) #define WRITE(x) (cout << (x)) int main() { // get values from input ...
[["-", 0, 2, 3, 4, 0, 41, 64, 5, 0, 6], ["+", 0, 2, 3, 4, 0, 41, 64, 5, 0, 6], ["-", 0, 2, 3, 4, 0, 41, 75, 5, 0, 6], ["+", 0, 2, 3, 4, 0, 41, 75, 5, 0, 6]]
1
114
#include <bits/stdc++.h> #ifdef ONLINE_JUDGE #define endl "\n" #endif using namespace std; typedef long long LL; typedef vector<int> VI; typedef pair<int, int> PII; #define yes cout << "Yes\n"; #define no cout << "No\n"; #define yesno(f) \ if (f) ...
#include <bits/stdc++.h> #ifdef ONLINE_JUDGE #define endl "\n" #endif using namespace std; typedef long long LL; typedef vector<int> VI; typedef pair<int, int> PII; #define yes cout << "Yes\n"; #define no cout << "No\n"; #define yesno(f) \ if (f) ...
[["-", 3, 4, 0, 16, 31, 2, 63, 118, 28, 22], ["+", 3, 4, 0, 16, 31, 2, 3, 4, 0, 13], ["+", 3, 4, 0, 16, 31, 2, 3, 4, 0, 21], ["+", 31, 2, 3, 4, 0, 2, 63, 118, 28, 22], ["-", 0, 16, 31, 2, 3, 4, 0, 16, 17, 33], ["-", 0, 16, 31, 2, 3, 4, 0, 16, 12, 13]]
1
138
/**************************** ///// Shubham Singhal ///// LNMIIT *****************************/ #include <bits/stdc++.h> #define ff first #define ss second #define mp make_pair #define pb push_back #define ppb pop_back #define pf push_front #define ppf pop_front #define eb emplace_back #define lwr lower_bound #define...
/**************************** ///// Shubham Singhal ///// LNMIIT *****************************/ #include <bits/stdc++.h> #define ff first #define ss second #define mp make_pair #define pb push_back #define ppb pop_back #define pf push_front #define ppf pop_front #define eb emplace_back #define lwr lower_bound #define...
[["-", 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
452
#include <bits/stdc++.h> using namespace std; #define ll long long int #define pb push_back #define f(i, a, n) for (int i = a; i < n; i++) #define inf 1e17 #define MAX_SIZE 1000005 void pr(int arr[], int size) { for (ll i = 0; i < size; i++) { printf("%d ", arr[i]); } cout << endl; } int main() { ios_base...
#include <bits/stdc++.h> using namespace std; #define ll long long int #define pb push_back #define f(i, a, n) for (int i = a; i < n; i++) #define inf 1e17 #define MAX_SIZE 1000005 void pr(int arr[], int size) { for (ll i = 0; i < size; i++) { printf("%d ", arr[i]); } cout << endl; } int main() { ios_base...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
199
// Written by Rhitwik Saha// #include <bits/stdc++.h> using namespace std; #define int long long #define mp make_pair #define pb push_back #define pii pair<int, int> #define vi vector<int> #define vb vector<bool> // #define vc vector<char> #define vii vector<pii> //#define mi map<int,int> //#define mi...
// Written by Rhitwik Saha// #include <bits/stdc++.h> using namespace std; #define int long long #define mp make_pair #define pb push_back #define pii pair<int, int> #define vi vector<int> #define vb vector<bool> // #define vc vector<char> #define vii vector<pii> //#define mi map<int,int> //#define mi...
[["-", 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
191
#include <stdio.h> #include <string.h> int main(void) { char s[10], t[11]; //入力 scanf("%s %s", s, t); int num = strlen(s); for (int i = 0; i < num; i++) { if (s[i] != t[i] || t[num + 1] == '\0') { printf("No\n"); return 0; } } printf("Yes\n"); return 0; }
#include <stdio.h> #include <string.h> int main(void) { char s[11], t[12]; //入力 scanf("%s %s", s, t); int len = strlen(s); for (int i = 0; i < len; i++) { if (s[i] != t[i] || t[i + 1] == '\0') { printf("No\n"); return 0; } } printf("Yes\n"); return 0; }
[["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 49, 22], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 49, 22], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["-", 0, 16, 12, 16, 31, 69, 71, 16, 31, 22], ["+", 0, 16, 12, ...
0
105
#include <iostream> using namespace std; int main() { string s, t; cin >> s >> t; //これで2行分読める. t.pop_back(); //末尾の文字列を消去. if (s == t) cout << "YES" << endl; else cout << "NO" << endl; return 0; }
#include <iostream> using namespace std; int main() { string s, t; cin >> s >> t; //これで2行分読める. t.pop_back(); //末尾の文字列を消去. if (s == t) cout << "Yes" << endl; else cout << "No" << endl; return 0; }
[["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
57
s = input() t = input() if len(t) == len(s)+1 and t[0:len(s)-1] == s: print("Yes") else: print("No")
s = input() t = input() if len(t) == len(s)+1 and t[0:len(s)] == s: print("Yes") else: print("No")
[["-", 12, 666, 0, 206, 206, 663, 0, 657, 17, 33], ["-", 12, 666, 0, 206, 206, 663, 0, 657, 12, 612]]
5
51
#include <stdio.h> int main(void) { char s[11]; char t[12]; int count = 0; scanf("%s", s); scanf("%s", t); int i; for (i = 0; s[i] != '\0'; i++) { if (s[i] != t[i]) { count = 1; break; } } if (count = 0) { printf("No\n"); } else { printf("Yes\n"); } return 0; }
#include <stdio.h> int main(void) { char s[11]; char t[12]; int count = 1; scanf("%s", s); scanf("%s", t); int i; for (i = 0; s[i] != '\0'; i++) { if (s[i] != t[i]) { count = 0; break; } } if (count == 0) { printf("No\n"); } else { printf("Yes\n"); } return 0; }
[["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13], ["-", 8, 9, 0, 57, 15, 23, 0, 11, 17, 32], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 60]]
0
117
S = list(input()) T = list(input()) for i in range(len(s)): if T[i] != S[i]: print('No') exit(0) print('Yes')
S = list(input()) T = list(input()) for i in range(len(S)): if T[i] != S[i]: print('No') exit(0) print('Yes')
[["-", 12, 652, 3, 4, 0, 652, 3, 4, 0, 22], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 22]]
5
54
#python 3.7.1 a=str(input()) b=str(input()) if a==b[:-1]: print("YES") else: print("NO")
#python 3.7.1 a=str(input()) b=str(input()) if a==b[:-1]: print("Yes") else: print("No")
[["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]]
5
41
#include <bits/stdc++.h> using namespace std; int main() { string s1, s2, i, j; cin >> s1 >> s2; string s3 = s2; s3.erase(s3.end() - 1); if (s2.size() > s1.size()) { if (s1 == s3) cout << "YES"; else cout << "NO"; } else cout << "NO"; }
#include <bits/stdc++.h> using namespace std; int main() { string s1, s2, i, j; cin >> s1 >> s2; string s3 = s2; s3.erase(s3.end() - 1); if (s2.size() > s1.size()) { if (s1 == s3) cout << "Yes"; else cout << "No"; } 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
87
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s = sc.next(); String t = sc.next(); String ss = s.substring(0, s.length() - 1); String ts = t.substring(0, s.length() - 1); if (ss.equals(ts) && s.length() + 1 == t...
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s = sc.next(); String t = sc.next(); String ss = s.substring(0, s.length()); String ts = t.substring(0, s.length()); if (ss.equals(ts) && s.length() + 1 == t.length(...
[["-", 49, 200, 51, 492, 3, 4, 0, 16, 17, 33], ["-", 49, 200, 51, 492, 3, 4, 0, 16, 12, 499]]
3
139
/* Bismillahir Rahmanir Raheem */ #include <bits/stdc++.h> #define sc(x) scanf("%lld", &x) #define pcase(x) printf("Case %d: ", x++) #define pn printf("\n") #define fri(f) for (int i = 0; i < f; i++) #define frj(f) for (int j = 0; j < f; j++) #define reset(x, e) memset(x, e, sizeof(x)) #define all(x) x.begin(), x.en...
/* Bismillahir Rahmanir Raheem */ #include <bits/stdc++.h> #define sc(x) scanf("%lld", &x) #define pcase(x) printf("Case %d: ", x++) #define pn printf("\n") #define fri(f) for (int i = 0; i < f; i++) #define frj(f) for (int j = 0; j < f; j++) #define reset(x, e) memset(x, e, sizeof(x)) #define all(x) x.begin(), x.en...
[["-", 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
145