buggy_code
stringlengths
11
625k
fixed_code
stringlengths
17
625k
bug_type
stringlengths
2
4.45k
language
int64
0
8
token_count
int64
5
200k
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> //PBDS #include <ext/pb_ds/tree_policy.hpp> //PBDS #define int long long int #define vi vector<int> #define vii vector<pair<int, int>> #define pi pair<int, int> #define fast \ ios_ba...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> //PBDS #include <ext/pb_ds/tree_policy.hpp> //PBDS #define int long long int #define vi vector<int> #define vii vector<pair<int, int>> #define pi pair<int, int> #define fast \ ios_ba...
[["-", 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
209
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; int a; a = S.size(); int j = 0; for (int i = 0; i < a - 1; i++) { if (S.at(i) != T.at(i)) { j++; } } if (j == 0 && T.size() == a + 1) { cout << "Yes" << endl; } else { cout << "No" << endl; ...
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; int a; a = S.size(); int j = 0; for (int i = 0; i < a; i++) { if (S.at(i) != T.at(i)) { j++; } } if (j == 0 && T.size() == a + 1) { cout << "Yes" << endl; } else { cout << "No" << endl; } ...
[["-", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]]
1
115
import java.util.Scanner; public class Main { static public void main(String[] args) { Scanner sc = new Scanner(System.in); String s = sc.nextLine(); String t = sc.nextLine(); int sLength = s.length(); int tLength = t.length(); if ((sLength + 1) != tLength) { System.out.println("NO"...
import java.util.Scanner; public class Main { static public void main(String[] args) { Scanner sc = new Scanner(System.in); String s = sc.nextLine(); String t = sc.nextLine(); int sLength = s.length(); int tLength = t.length(); if ((sLength + 1) != tLength) { System.out.println("No"...
[["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491]]
3
194
s = gets t = gets if s == t.chop puts "Yes" else puts "No" end
s = gets.strip t = gets.strip if s == t.chop puts "Yes" else puts "No" end
[["+", 36, 36, 0, 493, 0, 662, 12, 652, 17, 131], ["+", 36, 36, 0, 493, 0, 662, 12, 652, 735, 22]]
4
22
#include <iostream> #include <string> using namespace std; int main() { string str; getline(cin, str); string t; getline(cin, t); int ans = 0; for (int i = 0; i < str.length(); i++) { if (str.at(i) == t.at(i)) { ans++; } } // cout << str . at(str.length()) << "\n"; if (ans == str.length(...
#include <iostream> #include <string> using namespace std; int main() { string str; getline(cin, str); string t; getline(cin, t); int ans = 0; for (int i = 0; i < str.length(); i++) { if (str.at(i) == t.at(i)) { ans++; } } // cout << str . at(str.length()) << "\n"; if (ans == str.length(...
[["-", 15, 339, 51, 16, 31, 16, 12, 16, 17, 33], ["-", 15, 339, 51, 16, 31, 16, 12, 16, 12, 13]]
1
124
#define _CRT_SECURE_NO_WARNINGS #define REL #pragma GCC target("avx2") #pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") #include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <complex> #include <cstdint> #include <cstdio> #include <cstring> #include <deque> #include <iom...
#define _CRT_SECURE_NO_WARNINGS #define REL #pragma GCC target("avx2") #pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") #include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <complex> #include <cstdint> #include <cstdio> #include <cstring> #include <deque> #include <iom...
[["-", 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
606
#include <bits/stdc++.h> using namespace std; typedef long long LL; const int maxn = 1e5 + 10; string S, T; int main() { cin >> S >> T; if (T.substr(0, S.length()) == S) cout << "YES" << endl; else cout << "NO" << endl; }
#include <bits/stdc++.h> using namespace std; typedef long long LL; const int maxn = 1e5 + 10; string S, T; int main() { cin >> S >> T; if (T.substr(0, S.length()) == S) cout << "Yes" << endl; else cout << "No" << endl; }
[["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
70
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll inf = 1000000000000000000, mod = 1000000007; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); string a, b; cin >> a >> b; ll n = a.length(); ll flg = 0; for (ll i = 0; i < n; i++) { if (a[i] != b[i]) flg = 1; }...
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll inf = 1000000000000000000, mod = 1000000007; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); string a, b; cin >> a >> b; ll n = a.length(); ll flg = 0; for (ll i = 0; i < n; i++) { if (a[i] != b[i]) flg = 1; ...
[["-", 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
118
//“ In order to be irreplaceable, one must always be different” #include <bits/stdc++.h> using namespace std; #define ll long long #define endl "\n" #define pi 3.14159265359 #define mod 1000000007 #define str string #define vll vector<ll> #define vstr vector<str> #define vchar vector<char> #define pb push_back #define ...
//“ In order to be irreplaceable, one must always be different” #include <bits/stdc++.h> using namespace std; #define ll long long #define endl "\n" #define pi 3.14159265359 #define mod 1000000007 #define str string #define vll vector<ll> #define vstr vector<str> #define vchar vector<char> #define pb push_back #define ...
[["-", 0, 9, 0, 1, 0, 11, 12, 69, 28, 22], ["+", 0, 9, 0, 1, 0, 11, 12, 69, 28, 22]]
1
387
s=input() t=input() if s==t-t[len(t)-1]: print('Yes') else: print('No')
s=input() t=input() if s==t[:len(t)-1]: print('Yes') else: print('No')
[["-", 0, 656, 0, 57, 15, 666, 0, 657, 17, 33], ["-", 0, 57, 15, 666, 0, 657, 12, 206, 51, 22], ["+", 0, 57, 15, 666, 0, 206, 206, 663, 0, 102]]
5
39
#include <iostream> #include <string> using namespace std; void IDENTIFY(string S, string T) { for (int i = 0; i < S.length(); i++) if (S[i] != T[i]) cout << "No"; return; cout << "Yes"; } int main() { string S, T; cin >> S >> T; IDENTIFY(S, T); }
#include <iostream> #include <string> using namespace std; void IDENTIFY(string S, string T) { for (int i = 0; i < S.length(); i++) if (S[i] != T[i]) { cout << "No"; return; } cout << "Yes"; } int main() { string S, T; cin >> S >> T; IDENTIFY(S, T); }
[["+", 8, 9, 0, 7, 8, 57, 64, 9, 0, 45], ["+", 8, 9, 0, 7, 8, 57, 64, 9, 0, 46]]
1
87
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; int s_size = S.length(); for (int i = 0; s_size; i++) { if (S[i] != T[i]) { cout << "No"; break; } else if (i == s_size - 1) { cout << "Yes"; } } }
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; int s_size = S.length(); for (int i = 0; i < s_size; i++) { if (S[i] != T[i]) { cout << "No"; break; } else if (i == s_size - 1) { cout << "Yes"; } } }
[["+", 0, 14, 8, 9, 0, 7, 15, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18]]
1
85
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; int s_size = S.length(); for (int i = 0; s_size; i++) { if (S[i] != T[i]) { cout << "No"; break; } else if (i == s_size - 1) { cout << "Yes"; } } }
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; int s_size = S.length(); for (int i = 0; s_size; i++) { if (S[i] != T[i]) { cout << "No"; break; } else if (i == s_size - 1) { cout << "Yes"; break; } } }
[["+", 75, 76, 0, 57, 64, 9, 0, 93, 0, 94], ["+", 75, 76, 0, 57, 64, 9, 0, 93, 0, 35]]
1
85
#include <iostream> #include <string> using namespace std; int main() { string s1, s2; cin >> s1 >> s2; s2.pop_back(); if (s1 == s2) { cout << "YES" << endl; } else { cout << "NO" << endl; } }
#include <iostream> #include <string> using namespace std; int main() { string s1, s2; cin >> s1 >> s2; s2.pop_back(); if (s1 == s2) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
58
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; int n = s.size(); int m = t.size(); if (n + 1 == m) { for (int i = 0; i < n; i++) if (s[i] != t[i]) { cout << "NO\n"; return 0; } cout << "Yes\n"; } else cout << "No\n"; return 0;...
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; int n = s.size(); int m = t.size(); if (n + 1 == m) { for (int i = 0; i < n; i++) if (s[i] != t[i]) { cout << "No\n"; return 0; } cout << "Yes\n"; } else cout << "No\n"; return 0;...
[["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6]]
1
107
s = input() t = input() def main(): if len(s) < 1 and len(s) > 10: print('No') return if (s.isalpha() == False or s.islower() == False): print('No') return if (t[-1].isalpha() == False or t[-1].islower() == False): print('No') return if len(t) == len(s...
s = input() t = input() def main(): if len(s) < 1 and len(s) > 10: print('No') return if (s.isalpha() == False or s.islower() == False): print('No') return if (t[-1].isalpha() == False or t[-1].islower() == False): print('No') return if len(t) == len(s...
[["-", 12, 666, 0, 206, 206, 663, 0, 664, 28, 612], ["+", 12, 666, 0, 206, 206, 663, 0, 664, 28, 612], ["-", 0, 57, 15, 679, 12, 666, 0, 206, 0, 70], ["-", 15, 679, 12, 666, 0, 206, 206, 663, 0, 102], ["-", 12, 666, 0, 206, 206, 663, 0, 664, 17, 33], ["-", 0, 57, 15, 679, 12, 666, 0, 206, 0, 73]]
5
142
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(); int s = S.length(); String t = T.substring(0, s - 1); if (t.equals(S)) { System.out.println("Yes"); } else { System....
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(); int s = S.length(); String t = T.substring(0, s); if (t.equals(S)) { System.out.println("Yes"); } else { System.out....
[["-", 49, 200, 51, 492, 3, 4, 0, 16, 17, 33], ["-", 49, 200, 51, 492, 3, 4, 0, 16, 12, 499]]
3
112
S = input() T = input() if len(S) + 1 == len(T) and S == T[:-1] and 1 <= len(S) <= 10 and T.islower() == True and S.islower() == True: print("Yes") else: print("NO")
S = input() T = input() if len(S) + 1 == len(T) and S == T[:-1] and 1 <= len(S) <= 10 and T.islower() == True and S.islower() == True: print("Yes") else: print("No")
[["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]]
5
71
import sys S = input() T = input() if S == T[:-1]: print("Yes") else: print("NO")
import sys S = input() T = input() if S == T[:-1]: print("Yes") else: print("No")
[["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]]
5
36
#include <stdio.h> #include <string.h> int main(void) { int i; char a[11], b[2]; scanf("%s %s", a, b); for (i = 0; i < strlen(a); i++) { if (a[i] != b[i]) { puts("No"); return 0; } } puts("Yes"); return 0; }
#include <stdio.h> #include <string.h> int main(void) { int i; char a[50], b[20]; scanf("%s %s", a, b); for (i = 0; i < strlen(a); i++) { if (a[i] != b[i]) { puts("No"); return 0; } } puts("Yes"); return 0; }
[["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13]]
0
88
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; t.pop_back(); if (s == t) cout << "YES" << "\n"; else cout << "NO" << "\n"; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; t.pop_back(); if (s == t) cout << "Yes" << "\n"; else cout << "No" << "\n"; 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
59
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <vector> using namespace std; typedef pair<int, int> pii; typedef vector<int> vi; typedef vector<pii> vpi; typedef vector<vi> vvi; typedef long long ll; typedef unsign...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <vector> using namespace std; typedef pair<int, int> pii; typedef vector<int> vi; typedef vector<pii> vpi; typedef vector<vi> vvi; typedef long long ll; typedef unsign...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
406
#include <iostream> using namespace std; int main() { string str, str2; cin >> str; cin >> str2; if (str == str2.substr(1, str.size())) { cout << "Yes"; } else { cout << "No"; } }
#include <iostream> using namespace std; int main() { string str, str2; cin >> str; cin >> str2; if (str == str2.substr(0, str.length())) { cout << "Yes"; } else { cout << "No"; } }
[["-", 15, 339, 51, 16, 12, 2, 3, 4, 0, 13], ["+", 15, 339, 51, 16, 12, 2, 3, 4, 0, 13], ["-", 12, 2, 3, 4, 0, 2, 63, 118, 119, 120], ["+", 12, 2, 3, 4, 0, 2, 63, 118, 119, 120]]
1
59
s = input() t = input() if len(s) + 1 != t: print("No") exit elif s != t[:len(s)]: print("No") exit else: print("Yes")
s = input() t = input() if len(s) + 1 != len(t): print("No") elif s != t[:len(s)]: print("No") else: print("Yes")
[["+", 0, 656, 0, 57, 15, 666, 0, 652, 63, 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, 64, 196, 0, 1, 0, 22], ["-", 0, 57, 75, 665, 64, 196, 0, 1, 0, 22]]
5
54
#include <bits/stdc++.h> using namespace std; void __print(int x) { cout << x; } void __print(long x) { cout << x; } void __print(long long x) { cout << x; } void __print(unsigned x) { cout << x; } void __print(unsigned long x) { cout << x; } void __print(unsigned long long x) { cout << x; } void __print(float x) { cou...
#include <bits/stdc++.h> using namespace std; void __print(int x) { cout << x; } void __print(long x) { cout << x; } void __print(long long x) { cout << x; } void __print(unsigned x) { cout << x; } void __print(unsigned long x) { cout << x; } void __print(unsigned long long x) { cout << x; } void __print(float x) { cou...
[["-", 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
528
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; for (int i = 0; i < T.size(); i++) { if (S.at(i) != T.at(i)) { cout << "No" << endl; break; } if (i = T.size() - 1) { cout << "Yes" << endl; } } }
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; for (int i = 0; i < S.size(); i++) { if (S.at(i) != T.at(i)) { cout << "No" << endl; break; } if (i == S.size() - 1) { cout << "Yes" << endl; } } }
[["-", 0, 7, 15, 16, 12, 2, 63, 118, 28, 22], ["+", 0, 7, 15, 16, 12, 2, 63, 118, 28, 22], ["-", 8, 9, 0, 57, 15, 339, 51, 11, 17, 32], ["-", 51, 11, 12, 16, 31, 2, 63, 118, 28, 22], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 51, 16, 12, 16, 31, 2, 63, 118, 28, 22]]
1
93
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; s.push_back(t.back()); if (s == t) cout << "OK" << endl; else cout << "NO" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; s.push_back(t.back()); if (s == t) cout << "Yes" << endl; else cout << "No" << endl; }
[["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
57
#include <bits/stdc++.h> #define ll long long using namespace std; vector<int> buf; int main() { string S, T, ans; cin >> S >> T; for (int i = 0; i < S.size(); i++) { ans = "Yes"; if (S[i] != T[i]) { ans = "No"; } } cout << ans << endl; return 0; }
#include <bits/stdc++.h> #define ll long long using namespace std; vector<int> buf; int main() { string S, T, ans; cin >> S >> T; for (int i = 0; i < S.size(); i++) { ans = "Yes"; if (S[i] != T[i]) { ans = "No"; break; } } cout << ans << endl; return 0; }
[["+", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94], ["+", 8, 9, 0, 57, 64, 9, 0, 93, 0, 35]]
1
89
import java.io.*; public class Main { final static long MOD = 1000000007; public static String[] Ws = null; public static int wsIndx = 0; public static BufferedReader in = null; public static void main(String[] args) throws Exception { String s = nextString(); String t = nextString(); String a...
import java.io.*; public class Main { final static long MOD = 1000000007; public static String[] Ws = null; public static int wsIndx = 0; public static BufferedReader in = null; public static void main(String[] args) throws Exception { String s = nextString(); String t = nextString(); String a...
[["-", 8, 196, 0, 503, 49, 200, 51, 5, 0, 491], ["+", 8, 196, 0, 503, 49, 200, 51, 5, 0, 491], ["-", 64, 196, 0, 1, 0, 11, 12, 5, 0, 491], ["+", 64, 196, 0, 1, 0, 11, 12, 5, 0, 491]]
3
495
a = raw_input() b = raw_input() a = str(a) b = str(b) length = len(a) if a == b[0:length]: print("Yes") else: print("No")
a = input() b = input() a = str(a) b = str(b) length = len(a) if a == b[0:length]: 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
52
S = input() T = input() if T[0:len(S)] == S and len(S) + 1 == len(T): print('Yes') print('No')
S = input() T = input() if T[0:len(S)] == S and len(S) + 1 == len(T): print('Yes') else: print('No')
[["+", 36, 36, 0, 656, 0, 57, 75, 76, 0, 95], ["+", 36, 36, 0, 656, 0, 57, 75, 76, 0, 102]]
5
47
s = input() t = input() print('YES' if t.startswith(s) and len(t) - len(s) == 1 else 'NO')
s = input() t = input() print('Yes' if t.startswith(s) and len(t) - len(s) == 1 else 'No')
[["-", 0, 652, 3, 4, 0, 41, 0, 557, 0, 6], ["+", 0, 652, 3, 4, 0, 41, 0, 557, 0, 6]]
5
39
#include <bits/stdc++.h> typedef uint64_t u64; typedef int64_t i64; typedef uint32_t u32; typedef int32_t i32; #define MAX_NUM (998244353) using namespace std; template <typename T> static inline void ArrayInput(vector<T> &A) { for (auto itr = A.begin(); itr < A.end(); ++itr) cin >> *itr; } template <typenam...
#include <bits/stdc++.h> typedef uint64_t u64; typedef int64_t i64; typedef uint32_t u32; typedef int32_t i32; #define MAX_NUM (998244353) using namespace std; template <typename T> static inline void ArrayInput(vector<T> &A) { for (auto itr = A.begin(); itr < A.end(); ++itr) cin >> *itr; } template <typenam...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
654
// HOPE IS A GOOD THING MAY BE THE BEST OF THINGS AND NO GOOD THINGS EVER DIES // <3 #include <bits/stdc++.h> using namespace std; typedef long long ll; #define pb push_back #define pii pair<int, int> #define pll pair<long long, long long> #define PI 2 * acos(0.0) #define testcase ...
// HOPE IS A GOOD THING MAY BE THE BEST OF THINGS AND NO GOOD THINGS EVER DIES // <3 #include <bits/stdc++.h> using namespace std; typedef long long ll; #define pb push_back #define pii pair<int, int> #define pll pair<long long, long long> #define PI 2 * acos(0.0) #define testcase ...
[["-", 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
124
#include <bits/stdc++.h> using namespace std; #define ft \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define ll long ...
#include <bits/stdc++.h> using namespace std; #define ft \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define ll long ...
[["-", 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
90
// // Created by watemus on 10.05.2020. // #ifdef LOCAL #define _GLIBCXX_DEBUG #endif #include <bits/stdc++.h> using namespace std; #define all(a) a.begin(), a.end() #define rall(a) a.rbegin(), a.rend() #define ff first #define ss second using ll = long long; using ld = long double; #define int ll constexpr ll INF...
// // Created by watemus on 10.05.2020. // #ifdef LOCAL #define _GLIBCXX_DEBUG #endif #include <bits/stdc++.h> using namespace std; #define all(a) a.begin(), a.end() #define rall(a) a.rbegin(), a.rend() #define ff first #define ss second using ll = long long; using ld = long double; #define int ll constexpr ll INF...
[["-", 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
167
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { string s, t; cin >> s >> t; if (s == t.substr(0, s.length())) cout << "YES"; else cout << "NO"; return 0; }
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { string s, t; cin >> s >> t; if (s == t.substr(0, s.length())) 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
59
#include <iostream> using namespace std; int main() { string s, t; cin >> s >> t; int l1 = s.length(); string test = ""; for (int i = 0; i < l1; i++) test = test + t[i]; if (test == s) cout << "YES"; else cout << "NO"; return 0; }
#include <iostream> using namespace std; int main() { string s, t; cin >> s >> t; int l1 = s.length(); string test = ""; for (int i = 0; i < l1; i++) test = test + t[i]; if (test == 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
83
import java.io.*; import java.util.*; public class Main { static PrintWriter pw = new PrintWriter(new OutputStreamWriter(System.out)); public static void main(String[] args) { MyScanner ms = new MyScanner(); String T = ms.nextLine(); String S = ms.nextLine(); boolean game = true; for (int i = 0...
import java.io.*; import java.util.*; public class Main { static PrintWriter pw = new PrintWriter(new OutputStreamWriter(System.out)); public static void main(String[] args) { MyScanner ms = new MyScanner(); String T = ms.nextLine(); String S = ms.nextLine(); boolean game = true; for (int i = 0...
[["-", 8, 196, 0, 7, 15, 16, 12, 492, 500, 22], ["+", 8, 196, 0, 7, 15, 16, 12, 492, 500, 22]]
3
314
#include <bits/stdc++.h> #include <iostream> #include <string> using namespace std; int main() { #ifdef LOCAL_EXEC #else ios_base::sync_with_stdio(false); cin.tie(NULL); #endif // LOCAL_EXEC long long int i; bool x = true; string s, t; cin >> s >> t; for (i = 0; i < s.size(); i++) { if (s[i] != t[i]...
#include <bits/stdc++.h> #include <iostream> #include <string> using namespace std; int main() { #ifdef LOCAL_EXEC #else ios_base::sync_with_stdio(false); cin.tie(NULL); #endif // LOCAL_EXEC long long int i; bool x = true; string s, t; cin >> s >> t; for (i = 0; i < s.size(); 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], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]]
1
113
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; string t; cin >> t; int n = s.length(); string a = "YES"; for (int i = 0; i < n; i++) { if (s[i] != t[i]) { a = "NO"; break; } } cout << a; }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; string t; cin >> t; int n = s.length(); string a = "Yes"; for (int i = 0; i < n; i++) { if (s[i] != t[i]) { a = "No"; break; } } cout << a; }
[["-", 8, 9, 0, 43, 49, 50, 51, 5, 0, 6], ["+", 8, 9, 0, 43, 49, 50, 51, 5, 0, 6], ["-", 64, 9, 0, 1, 0, 11, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 11, 12, 5, 0, 6]]
1
84
#include <bits/stdc++.h> using namespace std; #include <string.h> int main() { string s; string t; cin >> s; cin >> t; int n = s.length(); int k = t.length(); for (int i = 0; i < n; i++) { if (s[i] != t[i]) { printf("NO\n"); return 0; } } if (k > n) { printf("YES\n"); } else ...
#include <bits/stdc++.h> using namespace std; #include <string.h> int main() { string s; string t; cin >> s; cin >> t; int n = s.length(); int k = t.length(); for (int i = 0; i < n; i++) { if (s[i] != t[i]) { printf("No\n"); return 0; } } if (k > n) { printf("Yes\n"); } else ...
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
117
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #include <functional> #define int long long #define fast \ ios_base::sync_with_stdio(false); \ cin.tie(N...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #include <functional> #define int long long #define fast \ ios_base::sync_with_stdio(false); \ cin.tie(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
200
import io, sys, atexit, os import math as ma from sys import exit from decimal import Decimal as dec from itertools import permutations from itertools import combinations def li(): return list(map(int, sys.stdin.readline().split())) def num(): return map(int, sys.stdin.readline().split()) def nu(): re...
import io, sys, atexit, os import math as ma from sys import exit from decimal import Decimal as dec from itertools import permutations from itertools import combinations def li(): return list(map(int, sys.stdin.readline().split())) def num(): return map(int, sys.stdin.readline().split()) def nu(): re...
[["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]]
5
207
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s; cin >> t; t.pop_back(); if (s == t) { cout << "YES"; } else cout << "NO"; // your code goes here return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s; 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], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]]
1
56
#include <iostream> using namespace std; int main() { string s, t; cin >> s >> t; for (int i = 0; i < s.size(); i++) { if (i == s.size() - 1) { cout << "Yes" << endl; break; } if (s.at(i) == t.at(i)) { continue; } cout << "No" << endl; break; } }
#include <iostream> using namespace std; int main() { string s, t; cin >> s >> t; for (int i = 0; i <= s.size(); i++) { if (i == s.size()) { cout << "Yes" << endl; break; } if (s.at(i) == t.at(i)) { continue; } cout << "No" << endl; break; } }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 33], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]]
1
97
#include <cmath> #include <iostream> #include <math.h> #include <string.h> #include <vector> using namespace std; int main() { int n, m; string S, T, temp; cin >> S; cin >> T; n = S.length(); m = T.length(); m = abs(m - n); temp = T.erase(n); if (temp == S && m == 1) cout << "YES\n"; else ...
#include <cmath> #include <iostream> #include <math.h> #include <string.h> #include <vector> using namespace std; int main() { int n, m; string S, T, temp; cin >> S; cin >> T; n = S.length(); m = T.length(); m = abs(m - n); temp = T.erase(n); if (temp == S && m == 1) cout << "Yes\n"; else ...
[["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]]
1
102
#include <stdio.h> int main(void) { char s[11] = {0}; char t[12] = {0}; int cont = 0; int len = 0; scanf("%s", s); scanf("%s", t); while (s[len]) { len++; } for (int i = 0; s[i] != 0; i++) { if (s[i] == t[i]) { cont++; } } if (cont == len) { printf("yes"); } else pr...
#include <stdio.h> int main(void) { char s[11] = {0}; char t[12] = {0}; int cont = 0; int len = 0; scanf("%s", s); scanf("%s", t); while (s[len]) { len++; } for (int i = 0; s[i] != 0; i++) { if (s[i] == t[i]) { cont++; } } if (cont == len) { printf("Yes"); } else pr...
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
131
#include <bits/stdc++.h> using namespace std; int main() { string s1, s2; int flag = 0; cin >> s1 >> s2; if (s2.size() != (s1.size() + 1)) { cout << "No"; flag = 1; } if (flag == 0) { while (s1[0] == ' ') { s1.erase(s1.begin()); } while (s2[0] == ' ') { s2.erase(s2.begin()); ...
#include <bits/stdc++.h> using namespace std; int main() { string s1, s2; int flag = 0; cin >> s1 >> s2; if (s2.size() != (s1.size() + 1)) { cout << "No"; flag = 1; } if (flag == 0) { while (s1[0] == ' ') { s1.erase(s1.begin()); } while (s2[0] == ' ') { s2.erase(s2.begin()); ...
[["+", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94], ["+", 8, 9, 0, 57, 64, 9, 0, 93, 0, 35]]
1
180
#include <bits/stdc++.h> using namespace std; int main() { int cnt = 0; string c, d; cin >> c >> d; d.pop_back(); if (c == d) { cout << "YES" << endl; } else { cout << "NO" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { int cnt = 0; string c, d; cin >> c >> d; d.pop_back(); if (c == d) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
61
#include <bits/stdc++.h> #define fastio \ std::ios_base::sync_with_stdio(false), std::cout.tie(0), std::cin.tie(0); #define N 1000007 #define mxx INT_MAX typedef long long ll; int main() { std::string name1, name2; std::cin >> name1 >> name2; if...
#include <bits/stdc++.h> #define fastio \ std::ios_base::sync_with_stdio(false), std::cout.tie(0), std::cin.tie(0); #define N 1000007 #define mxx INT_MAX typedef long long ll; int main() { std::string name1, name2; std::cin >> name1 >> name2; if...
[["-", 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
90
#include <bits/stdc++.h> using namespace std; string a, b; int main() { int i, n; cin >> a >> b; n = b.size(); for (i = 0; i < n - 1 && a[i] == b[i]; i++) ; if (i == n - 1) cout << "YES\n"; else cout << "NO\n"; return 0; }
#include <bits/stdc++.h> using namespace std; string a, b; int main() { int i, n; cin >> a >> b; n = b.size(); for (i = 0; i < n - 1 && a[i] == b[i]; i++) ; if (i == n - 1) 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
88
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; using ll = long long; const ll mod = 1e9 + 7; int main() { string s, t; cin >> s >> t; int n = s.size(); bool k = true; rep(i, n - 1) if (s[i] != t[i]) k = false; if (k) cout << "Yes" << endl; else cou...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; using ll = long long; const ll mod = 1e9 + 7; int main() { string s, t; cin >> s >> t; int n = s.size(); bool k = true; rep(i, n) if (s[i] != t[i]) k = false; if (k) cout << "Yes" << endl; else cout <<...
[["-", 0, 1, 0, 2, 3, 4, 0, 16, 17, 33], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]]
1
105
#include <bits/stdc++.h> using namespace std; int main() { string str1, str2; cin >> str1 >> str2; string str3(str2.begin(), str2.begin() + str2.length() - 1); if (str1 == str3) cout << "YES\n"; else cout << "NO\n"; }
#include <bits/stdc++.h> using namespace std; int main() { string str1, str2; cin >> str1 >> str2; string str3(str2.begin(), str2.begin() + str2.length() - 1); if (str1 == str3) 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
68
package main import "fmt" func main() { var S, T string fmt.Scan(&S, &T) if S == T[:len(T)-1] { fmt.Println("yes") } else { fmt.Println("no") } }
package main import "fmt" func main() { var S, T string fmt.Scan(&S, &T) if S == T[:len(T)-1] { fmt.Println("Yes") } else { fmt.Println("No") } }
[]
7
69
a,b=open(0);print("YNeos"[a[:-2]!=b[:-2]::2])
a,b=open(0);print("YNeos"[a[:-1]!=b[:-2]::2])
[["-", 0, 666, 0, 206, 206, 663, 0, 664, 28, 612], ["+", 0, 666, 0, 206, 206, 663, 0, 664, 28, 612]]
5
33
#include <bits/stdc++.h> using namespace std; #define tie() \ ios_base ::sync_with_stdio(false); \ cin.tie(0); \ cout.tie(0) #define int lon...
#include <bits/stdc++.h> using namespace std; #define tie() \ ios_base ::sync_with_stdio(false); \ cin.tie(0); \ cout.tie(0) #define int lon...
[["-", 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
102
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; string u = t.substr(0, t.size() - 1); if (u == s) cout << "YES"; else cout << "NO"; }
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; string u = t.substr(0, t.size() - 1); if (u == 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]]
1
60
s=input() t=input() n=len(s) index=0 for i in range(n): if(s[i] != t[i]): print("no") index=1 break if(index==0): print("yes")
s=input() t=input() n=len(s) index=0 for i in range(n): if(s[i] != t[i]): print("No") index=1 break if(index==0): print("Yes")
[["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]]
5
63
#include <bits/stdc++.h> #define endl "\n" #define FASTIO \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define fi first #d...
#include <bits/stdc++.h> #define endl "\n" #define FASTIO \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define fi first #d...
[["-", 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
160
a=input() b=input() if a==b[:1]: print("Yes") else: print("No")
a=input() b=input() if a==b[:len(a)]: print("Yes") else: print("No")
[["-", 0, 57, 15, 666, 0, 206, 206, 663, 0, 612], ["+", 15, 666, 0, 206, 206, 663, 0, 652, 63, 22], ["+", 0, 206, 206, 663, 0, 652, 3, 4, 0, 24], ["+", 0, 206, 206, 663, 0, 652, 3, 4, 0, 22], ["+", 0, 206, 206, 663, 0, 652, 3, 4, 0, 25]]
5
33
#include <bits/stdc++.h> using namespace std; int main() { int d; string a, b, c; cin >> a >> b; d = a.size(); c = b.substr(0, d); if (a.compare(c) == 0) cout << "YES"; else cout << "NO"; }
#include <bits/stdc++.h> using namespace std; int main() { int d; string a, b, c; cin >> a >> b; d = a.size(); c = b.substr(0, d); if (a.compare(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
71
s = list(input()) t = list(input()) n = int(len(t)) m = int(len(s)) if s == t[0:n-2] and n-1 == m: print('Yes') else: print('No')
s = list(input()) t = list(input()) n = int(len(t)) m = int(len(s)) if s == t[0:n-1] and n-1 == m: print('Yes') else: print('No')
[["-", 31, 666, 0, 206, 206, 663, 0, 657, 12, 612], ["+", 31, 666, 0, 206, 206, 663, 0, 657, 12, 612]]
5
66
#include <bits/stdc++.h> using namespace std; int main() { char str1[12]; char str2[12]; cin >> str1 >> str2; int result1 = strncmp(str2, str1, strlen(str1)); if (result1 >= 0) printf("Yes\n"); else printf("No\n"); }
#include <bits/stdc++.h> using namespace std; int main() { char str1[11]; char str2[12]; cin >> str1 >> str2; int result1 = strncmp(str2, str1, strlen(str1)); if (result1 == 0) printf("Yes\n"); else printf("No\n"); return 0; }
[["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 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
68
/* Author: ankrypt */ #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; template <class T> using oset = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; #define MOD 1000000007...
/* Author: ankrypt */ #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; template <class T> using oset = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; #define MOD 1000000007...
[["-", 0, 2, 3, 4, 0, 2, 63, 118, 28, 22], ["+", 0, 2, 3, 4, 0, 2, 63, 118, 28, 22]]
1
230
#include <cstring> #include <iostream> using namespace std; int main() { string s, t; cin >> s; cin >> t; int x = s.length(); if (s.compare(0, x - 2, t) == 0) cout << "Yes"; else cout << "No"; return 0; }
#include <cstring> #include <iostream> using namespace std; int main() { string s, t; cin >> s; cin >> t; int x = s.length(); if (t.compare(0, x, s) == 0) cout << "Yes"; else cout << "No"; return 0; }
[["-", 15, 339, 51, 16, 31, 2, 63, 118, 28, 22], ["+", 15, 339, 51, 16, 31, 2, 63, 118, 28, 22], ["-", 51, 16, 31, 2, 3, 4, 0, 16, 17, 33], ["-", 51, 16, 31, 2, 3, 4, 0, 16, 12, 13], ["-", 15, 339, 51, 16, 31, 2, 3, 4, 0, 22], ["+", 15, 339, 51, 16, 31, 2, 3, 4, 0, 22]]
1
69
#include <bits/stdc++.h> #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(0); \ cout.tie(0); #define debug(x) cerr << #x << ": " <...
#include <bits/stdc++.h> #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(0); \ cout.tie(0); #define debug(x) cerr << #x << ": " <...
[["-", 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
134
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s = sc.next(); String t = sc.next(); if (t.startsWith(t) && t.length() - 1 == 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 sc = new Scanner(System.in); String s = sc.next(); String t = sc.next(); if (t.startsWith(s) && t.length() - 1 == s.length()) System.out.println("Yes"); else System.out.println("No"); } }
[["-", 15, 15, 0, 16, 31, 492, 3, 4, 0, 22], ["+", 15, 15, 0, 16, 31, 492, 3, 4, 0, 22]]
3
99
#include <bits/stdc++.h> using namespace std; using ll = long long; #define int long long using P = pair<int, int>; #define LOG(variable) cout << #variable ":\t" << (variable) << endl #define LOGCON(i, container) \ for (int(i) = 0; (i) < (container).size(); ++(i)) ...
#include <bits/stdc++.h> using namespace std; using ll = long long; #define int long long using P = pair<int, int>; #define LOG(variable) cout << #variable ":\t" << (variable) << endl #define LOGCON(i, container) \ for (int(i) = 0; (i) < (container).size(); ++(i)) ...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
564
S = input() T = input() ns = len(S) U = T[:ns] if T == U: print("Yes") else: print("No")
S = input() T = input() ns = len(S) U = T[:ns] if S == U: print("Yes") else: print("No")
[["-", 36, 36, 0, 656, 0, 57, 15, 666, 0, 22], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 0, 22]]
5
42
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; bool ans = 0; if (S.size() + 1 == T.size()) { for (int i = 0; i < S.size(); i++) { if (S.at(i) == T.at(i)) { ans = 1; } else { ans = 0; break; } } } if (ans) { cout ...
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; bool ans = 0; if (S.size() + 1 == T.size()) { for (int i = 0; i < S.size(); i++) { if (S.at(i) == T.at(i)) { ans = 1; } else { ans = 0; break; } } } if (ans) { cout ...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
120
#include <bits/stdc++.h> using namespace std; #define ll long long int int main() { string a, b; cin >> a >> b; int n = a.length(); for (int i = 0; i < n; i++) { if (i == n - 1) { cout << "Yes" << endl; break; } if (b[i] == a[i]) { continue; } else { cout << "No" << endl...
#include <bits/stdc++.h> using namespace std; #define ll long long int int main() { string a, b; cin >> a >> b; int n = b.length(); for (int i = 0; i < n; i++) { if (i == n - 1) { cout << "Yes" << endl; break; } if (b[i] == a[i]) { continue; } else { cout << "No" << endl...
[["-", 0, 43, 49, 50, 51, 2, 63, 118, 28, 22], ["+", 0, 43, 49, 50, 51, 2, 63, 118, 28, 22]]
1
100
#include <bits/stdc++.h> using namespace std; int main() { string a; cin >> a; string b; cin >> b; if (a == b || b.size() != a.size() + 1) { cout << "No"; } else { long long int count = 0; for (unsigned long long int i = 0; i < a.size(); i++) { if (a[i] != b[i]) { cout << "No"; ...
#include <bits/stdc++.h> using namespace std; int main() { string a; cin >> a; string b; cin >> b; if (a == b || (b.size() != (a.size() + 1))) { cout << "No"; } else { long long int count = 0; for (unsigned long long int i = 0; i < a.size(); i++) { if (a[i] != b[i]) { cout << "No"...
[["+", 0, 57, 15, 339, 51, 16, 12, 23, 0, 24], ["+", 51, 16, 12, 23, 0, 16, 12, 23, 0, 24], ["+", 51, 16, 12, 23, 0, 16, 12, 23, 0, 25], ["+", 0, 57, 15, 339, 51, 16, 12, 23, 0, 25], ["+", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35], ["+", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94]]
1
125
import math def modpow(val, n, mod): ret = 1 while n: if n & 1: ret = (ret * val) % mod val = (val * val) % mod n = n >> 1 return ret n = int(input()) ab = [] for i in range(n): a, b = map(int, input().split()) ab.append((a, b)) my_dict = dict() ab_mod = [] ...
import math def modpow(val, n, mod): ret = 1 while n: if n & 1: ret = (ret * val) % mod val = (val * val) % mod n = n >> 1 return ret n = int(input()) ab = [] for i in range(n): a, b = map(int, input().split()) ab.append((a, b)) my_dict = dict() ab_mod = [] ...
[["+", 0, 652, 3, 4, 0, 657, 31, 23, 0, 24], ["+", 3, 4, 0, 657, 31, 23, 0, 657, 17, 72], ["+", 3, 4, 0, 657, 31, 23, 0, 657, 12, 22], ["+", 0, 652, 3, 4, 0, 657, 31, 23, 0, 25]]
5
422
// Marcin Knapik #include <bits/stdc++.h> #pragma GCC optimize("O3") #pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") using namespace std; // #include <ext/pb_ds/assoc_container.hpp> // order_of_key // #include <ext/pb_ds/tree_policy.hpp> // find by order // using namespace __gnu_pbds; // #define or...
// Marcin Knapik #include <bits/stdc++.h> #pragma GCC optimize("O3") #pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") using namespace std; // #include <ext/pb_ds/assoc_container.hpp> // order_of_key // #include <ext/pb_ds/tree_policy.hpp> // find by order // using namespace __gnu_pbds; // #define or...
[["-", 0, 57, 64, 9, 0, 1, 0, 27, 17, 29], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 17, 107], ["+", 64, 9, 0, 1, 0, 11, 12, 118, 28, 22], ["+", 64, 9, 0, 1, 0, 11, 12, 118, 17, 131], ["+", 64, 9, 0, 1, 0, 11, 12, 118, 119, 120]]
1
913
#include <bits/stdc++.h> using namespace std; typedef unsigned long long ull; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef pair<double, double> pdd; // typedef vector<vector<ll>> Graph; const ll mod = 1e9 + 7; // const ll mod = 998244353; #define REP(i, n) for (ll i = 0; i < (l...
#include <bits/stdc++.h> using namespace std; typedef unsigned long long ull; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef pair<double, double> pdd; // typedef vector<vector<ll>> Graph; const ll mod = 1e9 + 7; // const ll mod = 998244353; #define REP(i, n) for (ll i = 0; i < (l...
[["-", 75, 76, 0, 9, 0, 1, 0, 27, 17, 29], ["+", 75, 76, 0, 9, 0, 1, 0, 11, 17, 107], ["+", 75, 76, 0, 9, 0, 1, 0, 11, 12, 22]]
1
1,422
#include <algorithm> #include <bitset> #include <cmath> #include <cstdlib> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <unordered_map> #include <utility> #include <vector> using namespace std; using ll = long long; using Pii = pair<int, int>; usin...
#include <algorithm> #include <bitset> #include <cmath> #include <cstdlib> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <unordered_map> #include <utility> #include <vector> using namespace std; using ll = long long; using Pii = pair<int, int>; usin...
[["-", 0, 16, 31, 16, 31, 16, 12, 2, 63, 22], ["-", 31, 16, 31, 16, 12, 2, 3, 4, 0, 24], ["-", 31, 16, 31, 16, 12, 2, 3, 4, 0, 13], ["-", 31, 16, 31, 16, 12, 2, 3, 4, 0, 21], ["-", 31, 16, 31, 16, 12, 2, 3, 4, 0, 25], ["-", 31, 16, 12, 16, 31, 23, 0, 16, 12, 13], ["+", 31, 16, 12, 16, 31, 23, 0, 16, 12, 13]]
1
671
#include <algorithm> #include <array> #include <bitset> #include <cassert> #include <cmath> #include <complex> #include <cstdint> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <regex> #include ...
#include <algorithm> #include <array> #include <bitset> #include <cassert> #include <cmath> #include <complex> #include <cstdint> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <regex> #include ...
[["-", 0, 1, 0, 69, 341, 342, 0, 83, 0, 13], ["+", 0, 1, 0, 69, 341, 342, 0, 83, 0, 13], ["-", 0, 27, 28, 69, 341, 342, 0, 83, 0, 13], ["+", 0, 27, 28, 69, 341, 342, 0, 83, 0, 13]]
1
2,202
n = int(input()) abl = [map(int, input().split()) for _ in range(n)] from collections import defaultdict dic = defaultdict(int) # a,bの最大公約数 def gcd(a, b): while b: a, b = b, a % b return a ab0 = 0 a0 = 0 b0 = 0 for a,b in abl: if a == 0 and b == 0: ab0 += 1 continue elif a == 0:...
n = int(input()) abl = [map(int, input().split()) for _ in range(n)] from collections import defaultdict dic = defaultdict(int) # a,bの最大公約数 def gcd(a, b): while b: a, b = b, a % b return a ab0 = 0 a0 = 0 b0 = 0 for a,b in abl: if a == 0 and b == 0: ab0 += 1 continue elif a == 0:...
[["+", 8, 196, 0, 1, 0, 677, 12, 652, 63, 22], ["+", 0, 1, 0, 677, 12, 652, 3, 4, 0, 612], ["+", 0, 1, 0, 677, 12, 652, 3, 4, 0, 21], ["-", 0, 1, 0, 677, 12, 23, 0, 657, 17, 72], ["-", 0, 1, 0, 677, 12, 23, 0, 657, 12, 612], ["+", 0, 1, 0, 677, 12, 652, 3, 4, 0, 22]]
5
316
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rrep(i, n) for (int i = (int)(n - 1); i >= 0; i--) #define all(x) (x).begin(), (x).end() #define sz(x) int(x.size()) #define get_unique(x) x.erase(unique(all(x)), x.end()); typedef long long ll; typedef complex<do...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rrep(i, n) for (int i = (int)(n - 1); i >= 0; i--) #define all(x) (x).begin(), (x).end() #define sz(x) int(x.size()) #define get_unique(x) x.erase(unique(all(x)), x.end()); typedef long long ll; typedef complex<do...
[["-", 0, 14, 8, 9, 0, 1, 0, 11, 17, 108], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 107], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13]]
1
992
#include <bits/stdc++.h> using namespace std; using int64 = long long; const int mod = 1e9 + 7; // const int mod = 998244353; // // うくうくうくうくうくうくうくうくうくうくうくうくうくうくうくうくうくうくうくうくうくうくうくうくうくうくうくうくうく const int64 infll = (1LL << 62) - 1; const int inf = (1 << 30) - 1; struct IoSetup { IoSetup() { cin.tie(nullptr); ...
#include <bits/stdc++.h> using namespace std; using int64 = long long; const int mod = 1e9 + 7; // const int mod = 998244353; // // うくうくうくうくうくうくうくうくうくうくうくうくうくうくうくうくうくうくうくうくうくうくうくうくうくうくうくうくうく const int64 infll = (1LL << 62) - 1; const int inf = (1 << 30) - 1; struct IoSetup { IoSetup() { cin.tie(nullptr); ...
[["-", 8, 9, 0, 57, 64, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 57, 64, 1, 0, 11, 12, 22]]
1
1,658
/*** author: yuji9511 ***/ #include <bits/stdc++.h> using namespace std; using ll = long long; using lpair = pair<ll, ll>; const ll MOD = 1e9 + 7; const ll INF = 1e18; #define rep(i, m, n) for (ll i = (m); i < (n); i++) #define rrep(i, m, n) for (ll i = (m); i >= (n); i--) #define printa(x, n) ...
/*** author: yuji9511 ***/ #include <bits/stdc++.h> using namespace std; using ll = long long; using lpair = pair<ll, ll>; const ll MOD = 1e9 + 7; const ll INF = 1e18; #define rep(i, m, n) for (ll i = (m); i < (n); i++) #define rrep(i, m, n) for (ll i = (m); i >= (n); i--) #define printa(x, n) ...
[["-", 31, 16, 31, 16, 12, 2, 3, 4, 0, 25], ["-", 51, 16, 31, 16, 31, 16, 12, 2, 63, 22], ["-", 31, 16, 31, 16, 12, 2, 3, 4, 0, 24], ["-", 31, 16, 31, 16, 12, 2, 3, 4, 0, 13], ["-", 31, 16, 31, 16, 12, 2, 3, 4, 0, 21], ["-", 0, 43, 49, 50, 51, 16, 31, 16, 12, 13], ["+", 0, 43, 49, 50, 51, 16, 31, 16, 12, 13]]
1
843
#include <bits/stdc++.h> using namespace std; using ll = long long; ll gcd(ll x, ll y) { x = (x >= 0) ? x : -x; y = (y >= 0) ? y : -y; if (x > y) { return gcd(y, x); } if (x == 0) { return y; } return gcd(y % x, x); } const ll Mod = 1000000007; ll val(ll n) { ll sq = 2LL; ll res = 1LL; wh...
#include <bits/stdc++.h> using namespace std; using ll = long long; ll gcd(ll x, ll y) { x = (x >= 0) ? x : -x; y = (y >= 0) ? y : -y; if (x > y) { return gcd(y, x); } if (x == 0) { return y; } return gcd(y % x, x); } const ll Mod = 1000000007; ll val(ll n) { ll sq = 2LL; ll res = 1LL; wh...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19]]
1
534
#pragma GCC optimize("Ofast,inline,unroll-loops,fast-math") #include <algorithm> #include <cstdio> #include <iostream> #include <map> #include <set> #include <utility> #define N 200020 #define MOD 1000000007 using namespace std; long long a[N], b[N]; map<pair<long long, long long>, int> f; set<pair<long long, long lon...
#pragma GCC optimize("Ofast,inline,unroll-loops,fast-math") #include <algorithm> #include <cstdio> #include <iostream> #include <map> #include <set> #include <utility> #define N 200020 #define MOD 1000000007 using namespace std; long long a[N], b[N]; map<pair<long long, long long>, int> f; set<pair<long long, long lon...
[["-", 28, 69, 341, 342, 0, 2, 3, 4, 0, 13], ["+", 28, 69, 341, 342, 0, 2, 3, 4, 0, 13]]
1
554
import sys input = sys.stdin.readline from collections import defaultdict n = int(input()) a = [list(map(int,input().split())) for i in range(n)] mod = 10**9+7 def p2(x): return pow(2,x,mod) dc = defaultdict(int) st = set() from math import gcd n00 = 0 n0x = 0 nx0 = 0 nxy = 0 ls = [] for i in range(n): if a[i][0] =...
import sys input = sys.stdin.readline from collections import defaultdict n = int(input()) a = [list(map(int,input().split())) for i in range(n)] mod = 10**9+7 def p2(x): return pow(2,x,mod) dc = defaultdict(int) st = set() from math import gcd n00 = 0 n0x = 0 nx0 = 0 nxy = 0 ls = [] for i in range(n): if a[i][0] =...
[["-", 0, 662, 12, 652, 3, 4, 0, 657, 31, 22], ["+", 0, 662, 12, 652, 3, 4, 0, 657, 31, 22]]
5
480
import sys input=sys.stdin.readline n=int(input()) INF=10**9+7 D={} z=0 import math for i in range(n): a,b=map(int,input().split()) if a==0: if b==0: z+=1 else: if (0,1) in D: D[(0,1)]+=1 else: D[(0,1)]=1 elif b==0: ...
import sys input=sys.stdin.readline n=int(input()) INF=10**9+7 D={} z=0 import math for i in range(n): a,b=map(int,input().split()) if a==0: if b==0: z+=1 else: if (0,1) in D: D[(0,1)]+=1 else: D[(0,1)]=1 elif b==0: ...
[["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 60], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 79]]
5
504
#!/usr/bin/env python3 import sys input = sys.stdin.readline import math MOD = 10**9 + 7 n = int(input()) fish = dict() azero = 0 bzero = 0 abzero = 0 for _ in range(n): a, b = map(int, input().split()) if a == 0 and b == 0: abzero += 1 continue if a == 0: azero += 1 contin...
#!/usr/bin/env python3 import sys input = sys.stdin.readline import math MOD = 10**9 + 7 n = int(input()) fish = dict() azero = 0 bzero = 0 abzero = 0 for _ in range(n): a, b = map(int, input().split()) if a == 0 and b == 0: abzero += 1 continue if a == 0: azero += 1 contin...
[["+", 0, 1, 0, 662, 12, 657, 12, 23, 0, 24], ["+", 0, 1, 0, 662, 12, 657, 12, 23, 0, 25]]
5
373
// Problem E #include <algorithm> #include <cassert> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string.h> #include <vector> #define P 1000000007 #define pb push_back #define mp make_pair using namespace std; t...
// Problem E #include <algorithm> #include <cassert> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string.h> #include <vector> #define P 1000000007 #define pb push_back #define mp make_pair using namespace std; t...
[["+", 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, 116, 0, 117], ["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46]]
1
593
// Template Headers {{{ #include <bits/stdc++.h> using namespace std; using pii = pair<int, int>; using vpii = vector<pii>; using vi = vector<int>; using vvi = vector<vi>; using ll = long long; using pll = pair<ll, ll>; using vpll = vector<pll>; using vll = vector<long long>; using vvll = vector<vll>; template <class ...
// Template Headers {{{ #include <bits/stdc++.h> using namespace std; using pii = pair<int, int>; using vpii = vector<pii>; using vi = vector<int>; using vvi = vector<vi>; using ll = long long; using pll = pair<ll, ll>; using vpll = vector<pll>; using vll = vector<long long>; using vvll = vector<vll>; template <class ...
[["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 107], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
1,739
import sys sys.setrecursionlimit(10 ** 6) int1 = lambda x: int(x) - 1 p2D = lambda x: print(*x, sep="\n") def II(): return int(sys.stdin.readline()) def MI(): return map(int, sys.stdin.readline().split()) def LI(): return list(map(int, sys.stdin.readline().split())) def LLI(rows_number): return [LI() for _ in range(ro...
import sys sys.setrecursionlimit(10 ** 6) int1 = lambda x: int(x) - 1 p2D = lambda x: print(*x, sep="\n") def II(): return int(sys.stdin.readline()) def MI(): return map(int, sys.stdin.readline().split()) def LI(): return list(map(int, sys.stdin.readline().split())) def LLI(rows_number): return [LI() for _ in range(ro...
[["-", 0, 656, 0, 14, 8, 196, 0, 57, 0, 121], ["-", 0, 656, 0, 14, 8, 196, 0, 57, 15, 22], ["-", 0, 656, 0, 14, 8, 196, 0, 57, 0, 102], ["-", 0, 57, 64, 196, 0, 1, 0, 677, 12, 612], ["+", 0, 14, 8, 196, 0, 1, 0, 677, 12, 22]]
5
420
#include <bits/stdc++.h> using namespace std; // using ll = int64_t; using ll = long long; using ull = uint64_t; using i32 = int32_t; using u32 = uint32_t; using i64 = int64_t; using u64 = uint64_t; using pii = pair<int, int>; using pll = pair<ll, ll>; using ld = double; #define X first #define Y second #ifndef ONL...
#include <bits/stdc++.h> using namespace std; // using ll = int64_t; using ll = long long; using ull = uint64_t; using i32 = int32_t; using u32 = uint32_t; using i64 = int64_t; using u64 = uint64_t; using pii = pair<int, int>; using pll = pair<ll, ll>; using ld = double; #define X first #define Y second #ifndef ONL...
[["-", 0, 11, 12, 16, 31, 23, 0, 16, 12, 13], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 12, 22]]
1
1,990
#include <bits/stdc++.h> #define all(vec) vec.begin(), vec.end() #define pb push_back #define eb emplace_back #define fi first #define se second using namespace std; using ll = long long; using P = pair<ll, ll>; template <class T> using V = vector<T>; template <class T> inline void chmin(T &a, const T &b) { a = min(a, ...
#include <bits/stdc++.h> #define all(vec) vec.begin(), vec.end() #define pb push_back #define eb emplace_back #define fi first #define se second using namespace std; using ll = long long; using P = pair<ll, ll>; template <class T> using V = vector<T>; template <class T> inline void chmin(T &a, const T &b) { a = min(a, ...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 1, 0, 11, 12, 2, 63, 22], ["+", 0, 1, 0, 11, 12, 2, 3, 4, 0, 24], ["+", 0, 1, 0, 11, 12, 2, 3, 4, 0, 25]]
1
1,242
import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Collection; import java.util.EnumSet; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.NoSuchElementException; import java.util.Objects; import java....
import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Collection; import java.util.EnumSet; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.NoSuchElementException; import java.util.Objects; import java....
[["+", 0, 492, 3, 4, 0, 16, 31, 16, 17, 33], ["+", 0, 492, 3, 4, 0, 16, 31, 16, 12, 499], ["+", 3, 4, 0, 492, 3, 4, 0, 16, 17, 72], ["+", 3, 4, 0, 492, 3, 4, 0, 16, 12, 22]]
3
7,334
#include <bits/stdc++.h> using namespace std; #define IOS \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define endl "\...
#include <bits/stdc++.h> using namespace std; #define IOS \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define endl "\...
[["-", 8, 9, 0, 57, 64, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 57, 64, 1, 0, 11, 12, 13]]
1
534
#include <bits/stdc++.h> using namespace std; using ll = long long; template <class T, class U> inline bool chmin(T &x, U y) { if (x > y) { x = y; return true; } return false; } template <class T, class U> inline bool chmax(T &x, U y) { if (x < y) { x = y; return true; } return false; } #def...
#include <bits/stdc++.h> using namespace std; using ll = long long; template <class T, class U> inline bool chmin(T &x, U y) { if (x > y) { x = y; return true; } return false; } template <class T, class U> inline bool chmax(T &x, U y) { if (x < y) { x = y; return true; } return false; } #def...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 355], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 354]]
1
1,222
/* #include <boost/multiprecision/cpp_dec_float.hpp> #include <boost/multiprecision/cpp_int.hpp> #include <boost/rational.hpp> */ #include <bits/stdc++.h> using namespace std; #define _GLIBCXX_DEBUG #define rep(i, t) for (ll i = (ll)(0); i < (ll)(t); i++) #define rep2(i, s, t) for (ll i = (ll)(s); i < (ll)(t); i++) #d...
/* #include <boost/multiprecision/cpp_dec_float.hpp> #include <boost/multiprecision/cpp_int.hpp> #include <boost/rational.hpp> */ #include <bits/stdc++.h> using namespace std; #define _GLIBCXX_DEBUG #define rep(i, t) for (ll i = (ll)(0); i < (ll)(t); i++) #define rep2(i, s, t) for (ll i = (ll)(s); i < (ll)(t); i++) #d...
[["-", 0, 16, 12, 69, 341, 342, 0, 16, 31, 22], ["+", 0, 16, 12, 69, 341, 342, 0, 16, 31, 22]]
1
3,720
#include <bits/stdc++.h> using namespace std; using UL = unsigned int; using LL = long long; using ULL = unsigned long long; #define rep(i, n) for (int i = 0; i < (n); i++) struct Line { LL l, r, x; bool operator<(const Line &r) const { return x < r.x; } }; int H, W; LL X[999], Y[999]; LL Xp[1000], Yp[1000]; Lin...
#include <bits/stdc++.h> using namespace std; using UL = unsigned int; using LL = long long; using ULL = unsigned long long; #define rep(i, n) for (int i = 0; i < (n); i++) struct Line { LL l, r, x; bool operator<(const Line &r) const { return x < r.x; } }; int H, W; LL X[999], Y[999]; LL Xp[1000], Yp[1000]; Lin...
[["-", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94], ["+", 8, 9, 0, 57, 64, 9, 0, 37, 0, 38], ["+", 8, 9, 0, 57, 64, 9, 0, 37, 0, 13]]
1
910
#include <bits/stdc++.h> using namespace std; #if __has_include(<boost/multiprecision/cpp_int.hpp>) #include <boost/multiprecision/cpp_int.hpp> #include <boost/multiprecision/cpp_dec_float.hpp> using bll = boost::multiprecision::cpp_int; using bdouble = boost::multiprecision::number<boost::multiprecision::cpp_dec_...
#include <bits/stdc++.h> using namespace std; #if __has_include(<boost/multiprecision/cpp_int.hpp>) #include <boost/multiprecision/cpp_int.hpp> #include <boost/multiprecision/cpp_dec_float.hpp> using bll = boost::multiprecision::cpp_int; using bdouble = boost::multiprecision::number<boost::multiprecision::cpp_dec_...
[["-", 0, 43, 49, 50, 51, 2, 63, 118, 28, 22], ["+", 0, 43, 49, 50, 51, 2, 63, 118, 28, 22]]
1
3,331
#include <algorithm> #include <bitset> #include <cmath> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <regex> #include <string> #include <tuple> #include <vector> using namespace std; template <typename T> bool chmax(T &a, const T b) { if (a <=...
#include <algorithm> #include <bitset> #include <cmath> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <regex> #include <string> #include <tuple> #include <vector> using namespace std; template <typename T> bool chmax(T &a, const T b) { if (a <=...
[["-", 8, 9, 0, 43, 39, 344, 3, 347, 0, 13], ["+", 8, 9, 0, 43, 39, 344, 3, 347, 0, 13], ["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18]]
1
2,945
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define pb push_back #define all(x) begin(x), end(x) #define sz(x) (int)(x).size() #define FOR(i, a, b) for (int i = a; i <= (b); i++) #define ROF(i, a, b) for (int i = a; i >= (b); i--) using pii = pair<int, int>; using vpii = vector<pi...
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define pb push_back #define all(x) begin(x), end(x) #define sz(x) (int)(x).size() #define FOR(i, a, b) for (int i = a; i <= (b); i++) #define ROF(i, a, b) for (int i = a; i >= (b); i--) using pii = pair<int, int>; using vpii = vector<pi...
[["+", 8, 9, 0, 9, 0, 57, 64, 9, 0, 45], ["-", 12, 16, 31, 23, 0, 16, 31, 69, 28, 22], ["+", 12, 16, 31, 23, 0, 16, 31, 69, 28, 22], ["-", 12, 16, 31, 23, 0, 16, 12, 69, 28, 22], ["+", 12, 16, 31, 23, 0, 16, 12, 69, 28, 22], ["-", 12, 16, 12, 23, 0, 16, 31, 69, 28, 22], ["+", 12, 16, 12, 23, 0, 16, 31, 69, 28, 22], ["-...
1
1,133