Datasets:

problem_id
stringlengths
6
6
buggy_code
stringlengths
8
526k
fixed_code
stringlengths
12
526k
labels
listlengths
0
15
⌀
buggy_submission_id
int64
1
1.54M
fixed_submission_id
int64
2
1.54M
user_id
stringlengths
10
10
language
stringclasses
8 values
p02489
#include <bits/stdc++.h> using namespace std; int main() { int n[100000]; int co = 0; while (cin >> n[co], n[co++]) { } for (int i = 0; i < co - 1; i++) { cout << "case " << i + 1 << ": " << n[i] << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { int n[100000]; int co = 0; while (cin >> n[co], n[co++]) { } for (int i = 0; i < co - 1; i++) { cout << "Case " << i + 1 << ": " << n[i] << endl; } }
null
233,063
233,064
u615353970
cpp
p02489
#include <iostream> using namespace std; int main() { int x, i = 1; while (cin >> x) { cout << "Case " << i << ": " << x << endl; i++; } }
#include <iostream> using namespace std; int main() { int x, i = 1; while (cin >> x, x) { cout << "Case " << i << ": " << x << endl; i++; } }
null
233,093
233,094
u600294931
cpp
p02489
#include <iostream> #include <stdio.h> using namespace std; int main() { int i = 0; while (1) { i++; int x; cin >> x; if (x == 0) break; cout << "Case " << i << ":" << x << endl; } return 0; }
#include <iostream> #include <stdio.h> using namespace std; int main() { int i = 0; while (1) { i++; int x; cin >> x; if (x == 0) break; cout << "Case " << i << ": " << x << endl; } return 0; }
null
233,102
233,103
u335023834
cpp
p02489
#include <iostream> #include <stdio.h> using namespace std; int main() { int i = 1, x; cin >> x; while (x != 0) { printf("case %d: %d\n", i, x); cin >> x; i++; } return 0; }
#include <iostream> #include <stdio.h> using namespace std; int main() { int i = 1, x; cin >> x; while (x != 0) { printf("Case %d: %d\n", i, x); cin >> x; i++; } return 0; }
null
233,105
233,106
u672487238
cpp
p02489
#include <iostream> #include <vector> using namespace std; int main(void) { bool endflg = false; int count = 1; int input = 0; vector<int> vInput; vector<int>::iterator it; while (endflg == false) { cin >> input; if (input != 0) { vInput.push_back(input); } else { endflg = true;...
#include <iostream> #include <vector> using namespace std; int main(void) { bool endflg = false; int count = 1; int input = 0; vector<int> vInput; vector<int>::iterator it; while (endflg == false) { cin >> input; if (input != 0) { vInput.push_back(input); } else { endflg = true;...
null
233,117
233,118
u059847872
cpp
p02489
#include <algorithm> #include <cstdio> #include <iostream> using namespace std; int main() { int i = 0, n[10000]; while (1) { cin >> n[i]; if (n[i] == 0) { ++i; break; } ++i; } for (int j = 0; j < i - 1; j++) { printf("case %d: %d\n", j + 1, n[j]); } return 0; }
#include <algorithm> #include <cstdio> #include <iostream> using namespace std; int main() { int i = 0, n[10000]; while (1) { cin >> n[i]; if (n[i] == 0) { ++i; break; } ++i; } for (int j = 0; j < i - 1; j++) { printf("Case %d: %d\n", j + 1, n[j]); } return 0; }
null
233,132
233,133
u839357378
cpp
p02489
#include <stdio.h> int main() { int x, i = 1; while (1) { scanf("%d", &x); if (x == 0) { break; } printf("Case %d: %d", i, x); i++; } }
#include <stdio.h> int main() { int x, i = 1; while (1) { scanf("%d", &x); if (x == 0) { break; } printf("Case %d: %d\n", i, x); i++; } return (0); }
null
233,152
233,153
u354244251
cpp
p02489
#include <iostream> #include <string> using namespace std; int main() { int x, i; i = 1; while (1) { cin >> x; if (x == 0) break; cout << "Case " << i << ": " << x; i++; } return 0; }
#include <iostream> #include <string> using namespace std; int main() { int x, i; i = 1; while (1) { cin >> x; if (x == 0) break; cout << "Case " << i << ": " << x << '\n'; i++; } return 0; }
null
233,172
233,173
u594364403
cpp
p02489
#include <iostream> using namespace std; int main(void) { int x, i = 1; while (1) { cin >> x; if (x == 0) break; cout << "Case " << i << ":" << x << "\n"; i++; } return 0; }
#include <iostream> using namespace std; int main(void) { int x, i = 1; while (1) { cin >> x; if (x == 0) break; cout << "Case " << i << ": " << x << "\n"; i++; } return 0; }
null
233,174
233,175
u047988051
cpp
p02489
#include <iostream> using namespace std; // 10006 int main() { int x, n = 1; while (cin >> x) { if (!x) break; cout << "case " << n++ << ": " << x << endl; } return 0; }
#include <iostream> using namespace std; // 10006 int main() { int x, n = 1; while (cin >> x) { if (!x) break; cout << "Case " << n++ << ": " << x << endl; } return 0; }
null
233,198
233,199
u154964193
cpp
p02489
#include <iostream> #include <vector> using namespace std; int main(void) { vector<int> inputs; int n = 0; while (cin >> n && n != 0) { inputs.push_back(n); } for (int i = 0; i < inputs.size(); i++) { cout << "Case " << i << ": " << inputs[i] << endl; } return 0; }
#include <iostream> #include <vector> using namespace std; int main(void) { vector<int> inputs; int n = 0; while (cin >> n && n != 0) { inputs.push_back(n); } for (int i = 0; i < inputs.size(); i++) { cout << "Case " << i + 1 << ": " << inputs[i] << endl; } return 0; }
null
233,202
233,203
u278268911
cpp
p02489
#include <iostream> using namespace std; int main() { int i[10000]; int b; b = 0; while (1) { b = b + 1; cin >> i[b]; if (i[b] == 0) break; } int a; a = 0; for (int c = 1; c < b; c++) { a = a + 1; cout << "Case" << a << ": " << i[a] << endl; } return 0; }
#include <iostream> using namespace std; int main() { int i[10000]; int b; b = 0; while (1) { b = b + 1; cin >> i[b]; if (i[b] == 0) break; } int a; a = 0; for (int c = 1; c < b; c++) { a = a + 1; cout << "Case " << a << ": " << i[a] << endl; } return 0; }
null
233,204
233,205
u834684958
cpp
p02489
#include <algorithm> #include <bitset> #include <cctype> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sst...
#include <algorithm> #include <bitset> #include <cctype> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sst...
null
233,217
233,218
u352901018
cpp
p02489
#include <iostream> using namespace std; void func(); int main() { func(); return 0; } void func() { int x; int i = 1; while (1) { // true cin >> x; if (x == 0) { break; } cout << "Case " << i << ":" << x << endl; i++; } }
#include <iostream> using namespace std; void func(); int main() { func(); return 0; } void func() { int x; int i = 1; while (1) { // true cin >> x; if (x == 0) { break; } cout << "Case " << i << ": " << x << endl; i++; } }
null
233,221
233,222
u936629935
cpp
p02489
#include <iostream> using namespace std; int main() { int x, count = 1; while (true) { cin >> x; if (x == 0) break; else { cout << "Case" << " " << count << ":" << " " << x; count++; } } return 0; }
#include <iostream> using namespace std; int main() { int x, count = 1; while (true) { cin >> x; if (x == 0) break; else { cout << "Case" << " " << count << ":" << " " << x << endl; count++; } } return 0; }
null
233,208
233,209
u674364816
cpp
p02489
#include <algorithm> #include <cctype> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <stri...
#include <algorithm> #include <cctype> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <stri...
null
233,240
233,241
u498504992
cpp
p02489
#include <iostream> using namespace std; int main() { int i = 1; int j = 1; while (i) { cin >> i; if (i == 0) break; cout << "Case" << " " << j << ":" << i << endl; j++; } return 0; }
#include <iostream> using namespace std; int main() { int i = 1; int j = 1; while (i) { cin >> i; if (i == 0) break; cout << "Case" << " " << j << ": " << i << endl; j++; } return 0; }
null
233,264
233,265
u137461543
cpp
p02489
#include <iostream> using namespace std; int main() { int p, x; p = 1; while (1) { cin >> x; if (x == 0) break; else { cout << "Case " << p << ": " << x; p = p + 1; } } return 0; }
#include <iostream> using namespace std; int main() { int p, x; p = 1; while (1) { cin >> x; if (x == 0) break; else { cout << "Case " << p << ": " << x << endl; p = p + 1; } } return 0; }
null
234,143
234,144
u654128932
cpp
p02489
#include <iostream> using namespace std; int main() { int c = 1, n; while (cin >> n, n) { cout << "Case " << c << ": " << n << endl; } return 0; }
#include <iostream> using namespace std; int main() { int c = 1, n; while (cin >> n, n) { cout << "Case " << c << ": " << n << endl; c++; } return 0; }
null
234,147
234,148
u082125213
cpp
p02543
/* Author: QAQAutomaton Lang: C++ Code: D.cpp Mail: lk@qaq-am.com Blog: https://www.qaq-am.com/ */ #include <bits/stdc++.h> #define debug(...) fprintf(stderr, __VA_ARGS__) #define DEBUG printf("Passing [%s] in LINE %d\n", __FUNCTION__, __LINE__) #define Debug debug("Passing [%s] in LINE %d\n", __FUNCTION__, __LINE__) #...
/* Author: QAQAutomaton Lang: C++ Code: D.cpp Mail: lk@qaq-am.com Blog: https://www.qaq-am.com/ */ #include <bits/stdc++.h> #define debug(...) fprintf(stderr, __VA_ARGS__) #define DEBUG printf("Passing [%s] in LINE %d\n", __FUNCTION__, __LINE__) #define Debug debug("Passing [%s] in LINE %d\n", __FUNCTION__, __LINE__) #...
null
242,614
242,615
u228297051
cpp
p02546
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; int X; X = S.size(); if (S.at(X) == 's') { cout << S + "es" << endl; } else if (S.at(X) != 's') { cout << S + "s" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; int X; X = S.size(); if (S.at(X - 1) == 's') { cout << S + "es" << endl; } else if (S.at(X - 1) != 's') { cout << S + "s" << endl; } }
null
242,641
242,642
u766806530
cpp
p02546
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { string s; cin >> s; int l = s.size(); if (s[l] == 's') { s += "es"; } else { s += "s"; } cout << s; return 0; }
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { string s; cin >> s; int l = s.size() - 1; if (s[l] == 's') { s += "es"; } else { s += "s"; } cout << s; return 0; }
null
242,643
242,644
u422665026
cpp
p02546
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; if (s.substr(s.length()) == "s") { cout << s + "es" << endl; } else { cout << s + 's' << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; if (s.substr(s.length() - 1) == "s") { cout << s + "es" << endl; } else { cout << s + 's' << endl; } }
null
242,679
242,680
u857110064
cpp
p02546
/* * author :Sadik Hassan(_sad_) * */ #pragma GCC optimize("Ofast") #pragma GCC target("avx,avx2,fma") #pragma GCC optimization("unroll-loops") #include "bits/stdc++.h" using namespace std; using ll = long long; using ld = long double; #define nl "\n" #define pb push_back #define fi first #define se second #define M...
/* * author :Sadik Hassan(_sad_) * */ #pragma GCC optimize("Ofast") #pragma GCC target("avx,avx2,fma") #pragma GCC optimization("unroll-loops") #include "bits/stdc++.h" using namespace std; using ll = long long; using ld = long double; #define nl "\n" #define pb push_back #define fi first #define se second #define M...
null
242,699
242,700
u351012095
cpp
p02546
#include <iostream> #include <string> using namespace std; int main() { string name, last; int n = 0; cin >> name; n = name.length(); //末尾の検索 last = name.substr(n); if (last == "s") { name = name + "es"; } else name = name + 's'; cout << name; }
#include <iostream> #include <string> using namespace std; int main() { string name, last; int n = 0; cin >> name; n = name.length(); //末尾の検索 last = name.substr(n - 1); if (last == "s") { name = name + "es"; } else name = name + 's'; cout << name; }
null
242,925
242,926
u539847932
cpp
p02546
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int n = s.size(); if (s[n - 1] == 's') { cout << s << 'es' << endl; } else { cout << s << 's' << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int n = s.size(); if (s[n - 1] == 's') { cout << s << 'e' << 's' << endl; } else { cout << s << 's' << endl; } }
null
242,927
242,928
u958873500
cpp
p02546
#include <bits/stdc++.h> using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(0); string s; cin >> s; int l = s.length(); if (s[l - 1] == 's') s += 'es'; else s += 's'; cout << s; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(0); string s; cin >> s; int l = s.length(); if (s[l - 1] == 's') s += "es"; else s += 's'; cout << s; return 0; }
null
242,931
242,932
u005863484
cpp
p02546
#pragma GCC optimize("Ofast") #pragma GCC target("sse4") #include <bits/stdc++.h> using namespace std; // #include <ext/pb_ds/assoc_container.hpp> // #include <ext/pb_ds/tree_policy.hpp> // using namespace __gnu_pbds; // template <class T> using Tree = tree<T, null_type, less<T>, rb_tree_tag, // tree_order_statistics...
#pragma GCC optimize("Ofast") #pragma GCC target("sse4") #include <bits/stdc++.h> using namespace std; // #include <ext/pb_ds/assoc_container.hpp> // #include <ext/pb_ds/tree_policy.hpp> // using namespace __gnu_pbds; // template <class T> using Tree = tree<T, null_type, less<T>, rb_tree_tag, // tree_order_statistics...
null
242,935
242,936
u198693633
cpp
p02546
#include <bits/stdc++.h> using namespace std; int main() { string str; cin >> str; int str_size = str.length(); int index_last = str_size - 1; if (str[index_last] == 's') cout << str << "es" << endl; else cout << str << "S" << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string str; cin >> str; int str_size = str.length(); int index_last = str_size - 1; if (str[index_last] == 's') cout << str << "es" << endl; else cout << str << "s" << endl; return 0; }
null
242,970
242,971
u175233565
cpp
p02546
#include <iostream> #include <string.h> using namespace std; int main() { char s[1000]; int i = 0; cin >> s; int len = strlen(s); if (s[len - 1] == 's') { cout << s; cout << "es"; } else { cout << s[i]; cout << "s"; } }
#include <iostream> #include <string.h> using namespace std; int main() { char s[1000]; int i = 0; cin >> s; int len = strlen(s); if (s[len - 1] == 's') { cout << s; cout << "es"; } else { cout << s; cout << "s"; } }
null
242,976
242,977
u287669846
cpp
p02546
#include <iostream> #include <string> using namespace std; int main() { int i; string str; cin >> str; int str1 = str.size(); if (str.at(str1) == 's') { cout << str + "es" << endl; } else { cout << str + "s" << endl; } }
#include <iostream> #include <string> using namespace std; int main() { int i; string str; cin >> str; int str1 = str.size(); if (str.at(str1 - 1) == 's') { cout << str + "es" << endl; } else { cout << str + "s" << endl; } }
null
243,037
243,038
u832224263
cpp
p02546
#include <bits/stdc++.h> using namespace std; #define int long long #define ll long long #define mp make_pair #define pb push_back #define eb emplace_back #define pii pair<ll, ll> #define vpii vector<pair<ll, ll>> #define F first #define S second #define ld long double #define built __builtin_popcountll #define mst(a...
#include <bits/stdc++.h> using namespace std; #define int long long #define ll long long #define mp make_pair #define pb push_back #define eb emplace_back #define pii pair<ll, ll> #define vpii vector<pair<ll, ll>> #define F first #define S second #define ld long double #define built __builtin_popcountll #define mst(a...
null
243,039
243,040
u394634573
cpp
p02546
/* 十 聖イシドールスよ、迷えるプログラマを導き給え! 十 */ #include <algorithm> #include <cmath> #include <deque> #include <iostream> #include <map> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) // const long long INF = 1LL << 60; const int INF = 1e9; const int MOD = 1000000007; using ll = long long; int ...
/* 十 聖イシドールスよ、迷えるプログラマを導き給え! 十 */ #include <algorithm> #include <cmath> #include <deque> #include <iostream> #include <map> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) // const long long INF = 1LL << 60; const int INF = 1e9; const int MOD = 1000000007; using ll = long long; int ...
null
243,275
243,276
u039734738
cpp
p02546
#include <bits/stdc++.h> using namespace std; int main() { string S; int l; cin >> S; l = S.length(); char c = S[l - 1]; if (c == 's') cout << S + "s"; else cout << S + 's'; }
#include <bits/stdc++.h> using namespace std; int main() { string S; int l; cin >> S; l = S.length(); char c = S[l - 1]; if (c == 's') cout << S + "es"; else cout << S + 's'; }
null
243,285
243,286
u646103183
cpp
p02546
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; int n = 0; n = S.size(); if (S.at(n) == 's') { cout << S + "es" << endl; } else { cout << S + 's' << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; int n = 0; n = S.size(); if (S.at(n - 1) == 's') { cout << S + "es" << endl; } else { cout << S + 's' << endl; } }
null
243,321
243,322
u341948272
cpp
p02546
#define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <functional> #include <iostream> #include <iterator> #include <limits> #include <map> #include <memory> #include <numeric> #includ...
#define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <functional> #include <iostream> #include <iterator> #include <limits> #include <map> #include <memory> #include <numeric> #includ...
null
243,323
243,324
u279196402
cpp
p02546
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; if (S[S.size()] == 's') { S = S + "es"; } else { S = S + 's'; } cout << S << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; if (S[S.size() - 1] == 's') { S = S + "es"; } else { S = S + "s"; } cout << S << endl; }
null
243,192
243,193
u315457412
cpp
p02546
//#define _GLIBCXX_DEBUG //#pragma GCC optimize "trapv" #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; // #pragma GCC target ("avx2") // #pragma GCC optimization ("O3") // #pragma GCC optimization ("unroll-loops")...
//#define _GLIBCXX_DEBUG //#pragma GCC optimize "trapv" #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; // #pragma GCC target ("avx2") // #pragma GCC optimization ("O3") // #pragma GCC optimization ("unroll-loops")...
null
243,196
243,197
u525252690
cpp
p02546
/*版权所有,拷贝必究!*/ /*若想获得,请联系许希泉*/ #include <bits/stdc++.h> #pragma GCC optimize("O999") const int INF = 0x3f3f3f3f; int maxn = 5000005; using namespace std; struct node {}; bool is_pal(string a) { string s = a; reverse(s.begin(), s.end()); if (s == a) return true; else return false; } bool is_prime(int n) ...
/*版权所有,拷贝必究!*/ /*若想获得,请联系许希泉*/ #include <bits/stdc++.h> #pragma GCC optimize("O999") const int INF = 0x3f3f3f3f; int maxn = 5000005; using namespace std; struct node {}; bool is_pal(string a) { string s = a; reverse(s.begin(), s.end()); if (s == a) return true; else return false; } bool is_prime(int n) ...
null
243,210
243,211
u076923204
cpp
p02546
#include <algorithm> #include <cmath> #include <cstdlib> #include <iostream> #include <string> #include <vector> using namespace std; int main() { string S; cin >> S; const char &last = S[S.size() - 1]; if (last == 's' || last == 'x') { cout << (S + "es") << endl; } else { cout << (S + "s") << endl...
#include <algorithm> #include <cmath> #include <cstdlib> #include <iostream> #include <string> #include <vector> using namespace std; int main() { string S; cin >> S; const char &last = S[S.size() - 1]; if (last == 's') { cout << (S + "es") << endl; } else { cout << (S + "s") << endl; } retur...
null
243,238
243,239
u270220186
cpp
p02546
#include <bits/stdc++.h> using namespace std; string s; int main() { cin >> s; if (s[s.size() - 1] == 's') s += 'es'; else s += 's'; cout << s << endl; }
#include <bits/stdc++.h> using namespace std; string s; int main() { cin >> s; if (s[s.size() - 1] == 's') s += "es"; else s += 's'; cout << s << endl; }
null
243,080
243,081
u865153183
cpp
p02546
#include <bits/stdc++.h> using namespace std; int main() { string abc; cin >> abc; if (abc[abc.size() - 1] == 's') abc += 'es'; else abc += 's'; cout << abc; }
#include <bits/stdc++.h> using namespace std; int main() { string abc; cin >> abc; if (abc[abc.size() - 1] == 's') abc += "es"; else abc += 's'; cout << abc; }
null
243,115
243,116
u959072148
cpp
p02546
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; if (s[s.size()] == 's') { cout << s << "es" << endl; } else { cout << s << "s" << endl; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; if (s[s.size() - 1] == 's') { cout << s << "es" << endl; } else { cout << s << "s" << endl; } return 0; }
null
243,150
243,151
u789936749
cpp
p02546
#include <iostream> #include <string> using namespace std; int main() { string a; string d = "es", e = "s"; int b = a.size(); char c = a.at(b - 1); if (c == 's') cout << a + d; else cout << a + e; return 0; }
#include <iostream> #include <string> using namespace std; int main() { string a; cin >> a; string d = "es", e = "s"; int b = a.size(); char c = a.at(b - 1); if (c == 's') cout << a + d; else cout << a + e; return 0; }
null
243,378
243,379
u818967913
cpp
p02546
#include <bits/stdc++.h> #include <stdio.h> #define chmax(a, b) (a) = ((a) < (b)) ? (b) : (a) #define YMAX 1000000007 #define mend '\n' typedef long long ll; using namespace std; int main() { string S; cin >> S; int len = S.size(); if (S[len - 1] != 's') { cout << S << 's' << mend; } else { cout ...
#include <bits/stdc++.h> #include <stdio.h> #define chmax(a, b) (a) = ((a) < (b)) ? (b) : (a) #define YMAX 1000000007 #define mend '\n' typedef long long ll; using namespace std; int main() { string S; cin >> S; int len = S.size(); if (S[len - 1] != 's') { cout << S << 's' << mend; } else { cout ...
null
243,382
243,383
u040251933
cpp
p02546
// Radhe Radhe #include <bits/stdc++.h> #define godspeed \ ios_base::sync_with_stdio(false); \ cin.tie(0); \ cout.tie(0); #define mod 1000000007...
// Radhe Radhe #include <bits/stdc++.h> #define godspeed \ ios_base::sync_with_stdio(false); \ cin.tie(0); \ cout.tie(0); #define mod 1000000007...
null
243,384
243,385
u465068976
cpp
p02546
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; if (s.back() == 'e') { s += "s"; } else { s += "es"; } cout << s << "\n"; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; if (s.back() == 's') { s += "es"; } else { s += "s"; } cout << s << "\n"; return 0; }
null
243,417
243,418
u938988866
cpp
p02546
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int n = s.length(); if (s[n - 1] != 's') { s += 's'; } else { s += 'es'; } cout << s << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int n = s.length(); if (s[n - 1] != 's') { s += "s"; } else { s += "es"; } cout << s << endl; }
null
243,427
243,428
u247216870
cpp
p02546
#include <iostream> using namespace std; int main() { string s; cin >> s; int len = s.size(); cout << s; if (s[len - 1] == 's') cout << 'es'; else cout << 's'; }
#include <iostream> using namespace std; int main() { string s; cin >> s; int len = s.size(); cout << s; if (s[len - 1] == 's') cout << "es"; else cout << 's'; }
null
243,431
243,432
u339030353
cpp
p02546
#include <bits/stdc++.h> #define ll long long using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); string s; cin >> s; int n = s.size(); if (s[n - 1] == 's') { for (int i = 0; i < n - 1; i++) cout << s[i]; cout << "es" << endl; } else { cout << s << "s" << e...
#include <bits/stdc++.h> #define ll long long using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); string s; cin >> s; int n = s.size(); if (s[n - 1] == 's') { for (int i = 0; i < n; i++) cout << s[i]; cout << "es" << endl; } else { cout << s << "s" << endl;...
null
243,630
243,631
u579199338
cpp
p02546
#include <algorithm> #include <cstdint> #include <iostream> #include <stdio.h> #include <string> #include <vector> // ========================== using namespace std; // ========================== //ライブラリ // aからbまでの合計 int total(int a, int b) { int ans = 0; for (int i = a; i <= b; i++) { ans += i; } retur...
#include <algorithm> #include <cstdint> #include <iostream> #include <stdio.h> #include <string> #include <vector> // ========================== using namespace std; // ========================== //ライブラリ // aからbまでの合計 int total(int a, int b) { int ans = 0; for (int i = a; i <= b; i++) { ans += i; } retur...
null
243,645
243,646
u279008384
cpp
p02546
/* */ #include <bits/stdc++.h> using namespace std; #define pi acos(-1.0) #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ ...
/* */ #include <bits/stdc++.h> using namespace std; #define pi acos(-1.0) #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ ...
null
243,656
243,657
u024972190
cpp
p02546
#include <bits/stdc++.h> using namespace std; #define ll long long int #define ld long double #define INF (int)1e9 + 4 #define INFL (ll)1e18 + 4 #define md (int)1e9 + 7 #define mx 10000000 // use fixed<<setprecion #define mk make_pair #define pi pair<int, int> #define ss second #define ff first #define pb emplace_back ...
#include <bits/stdc++.h> using namespace std; #define ll long long int #define ld long double #define INF (int)1e9 + 4 #define INFL (ll)1e18 + 4 #define md (int)1e9 + 7 #define mx 10000000 // use fixed<<setprecion #define mk make_pair #define pi pair<int, int> #define ss second #define ff first #define pb emplace_back ...
null
243,660
243,661
u284269175
cpp
p02546
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; if (S.at(S.size() - 1) == 'e') { cout << S << "s" << endl; } else cout << S << "es" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; if (S.at(S.size() - 1) == 's') { cout << S << "es" << endl; } else cout << S << "s" << endl; }
null
243,562
243,563
u697858600
cpp
p02546
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { string s; cin >> s; ll c = 0; for (int i = 0; i < s.size(); i++) { if (s[s.size() - 1] == 's') { c = 1; } } if (c) cout << s << "es" << endl; else cout << s << "e" << endl; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { string s; cin >> s; ll c = 0; for (int i = 0; i < s.size(); i++) { if (s[s.size() - 1] == 's') { c = 1; } } if (c) cout << s << "es" << endl; else cout << s << "s" << endl; }
null
243,564
243,565
u446732668
cpp
p02546
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int n = s.length(); if (s[n - 1] == 's') s.push_back('e'); s.push_back('s'); return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int n = s.length(); if (s[n - 1] == 's') s.push_back('e'); s.push_back('s'); cout << s; return 0; }
null
243,566
243,567
u653637919
cpp
p02546
#include <iostream> using namespace std; #include <string> int main() { string str; cin >> str; if (str.at(str.length() - 1) = 's') { cout << str << "es" << endl; } else { cout << str << "s" << endl; } return 0; }
#include <iostream> using namespace std; #include <string> int main() { string str; cin >> str; if (str.at(str.length() - 1) == 's') { cout << str << "es" << endl; } else { cout << str << "s" << endl; } return 0; }
null
243,568
243,569
u277969177
cpp
p02546
/* :: :: ': : :. : ;' :: :: ' ...
/* :: :: ': : :. : ;' :: :: ' ...
null
243,594
243,595
u331062040
cpp
p02546
#include <bits/stdc++.h> using namespace std; #define fast_io \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define F first ...
#include <bits/stdc++.h> using namespace std; #define fast_io \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define F first ...
null
243,345
243,346
u434005602
cpp
p02546
// include #include <algorithm> #include <cmath> #include <cstdlib> #include <functional> #include <iomanip> #include <iostream> #include <math.h> #include <string> #include <utility> #include <vector> // using using namespace std; using vl = vector<long long>; using vs = vector<string>; using vc = vector<char>; using ...
// include #include <algorithm> #include <cmath> #include <cstdlib> #include <functional> #include <iomanip> #include <iostream> #include <math.h> #include <string> #include <utility> #include <vector> // using using namespace std; using vl = vector<long long>; using vs = vector<string>; using vc = vector<char>; using ...
null
243,347
243,348
u274201725
cpp
p02546
#include <cstdio> #include <cstring> #include <iostream> using namespace std; string st; int main() { cin >> st; cout << st; if (st[st.size() - 2] == 's') cout << "es"; else cout << "s"; }
#include <cstdio> #include <cstring> #include <iostream> using namespace std; string st; int main() { cin >> st; cout << st; if (st[st.size() - 1] == 's') cout << "es"; else cout << "s"; }
null
243,698
243,699
u176456563
cpp
p02546
#include <bits/stdc++.h> using namespace std; void fastio() { cin.tie(nullptr); cin.sync_with_stdio(false); } using LL = long long; using LD = long double; const LL MOD = 1e9 + 7; const LL INF = LLONG_MAX; const LL N = 1e6 + 1; #define F first #define S second int main() { fastio(); string s; cin >> s;...
#include <bits/stdc++.h> using namespace std; void fastio() { cin.tie(nullptr); cin.sync_with_stdio(false); } using LL = long long; using LD = long double; const LL MOD = 1e9 + 7; const LL INF = LLONG_MAX; const LL N = 1e6 + 1; #define F first #define S second int main() { fastio(); string s; cin >> s;...
null
243,700
243,701
u823920817
cpp
p02546
#include <bits/stdc++.h> using namespace std; // actual solution is at bottom// ////<pbds>//// /*OPTIONAL #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; template <class T> using Tree = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_upda...
#include <bits/stdc++.h> using namespace std; // actual solution is at bottom// ////<pbds>//// /*OPTIONAL #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; template <class T> using Tree = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_upda...
null
243,704
243,705
u155788692
cpp
p02546
#include <bits/stdc++.h> using namespace std; using ll = long long; const ll INF = 1LL << 60; ll MOD = 1000000000 + 7; int main() { string s; cin >> s; int n = s.size(); if (s[n - 1] == 's') { s += "es"; } else { s += s; } cout << s; }
#include <bits/stdc++.h> using namespace std; using ll = long long; const ll INF = 1LL << 60; ll MOD = 1000000000 + 7; int main() { string s; cin >> s; int n = s.size(); if (s[n - 1] == 's') { s += "es"; } else { s += "s"; } cout << s; }
null
243,738
243,739
u897135531
cpp
p02546
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; if (s[s.size() - 1] == 's') cout << s << 's' << endl; else cout << s << "es" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; if (s[s.size() - 1] != 's') cout << s << 's' << endl; else cout << s << "es" << endl; }
null
243,680
243,681
u494609869
cpp
p02546
#include <bits/stdc++.h> #define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0) #define X first #define Y second #define nl '\n' #define AC return 0 #define pb(a) push_back(a) #define mst(a, b) memset(a, b, sizeof a) #define rep(i, n) for (int i = 0; (i) < (n); i++) #define rep1(i, n) for (int i = 1; (i) <= (n); ...
#include <bits/stdc++.h> #define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0) #define X first #define Y second #define nl '\n' #define AC return 0 #define pb(a) push_back(a) #define mst(a, b) memset(a, b, sizeof a) #define rep(i, n) for (int i = 0; (i) < (n); i++) #define rep1(i, n) for (int i = 1; (i) <= (n); ...
null
243,682
243,683
u403764487
cpp
p02546
#include "bits/stdc++.h" using namespace std; using ll = long long; using vi = vector<int>; using vvi = vector<vi>; using vl = vector<ll>; using vvl = vector<vl>; using P = pair<int, int>; using PL = pair<ll, ll>; using vp = vector<P>; using vpl = vector<PL>; #define pqueue priority_queue template <typename T> constexp...
#include "bits/stdc++.h" using namespace std; using ll = long long; using vi = vector<int>; using vvi = vector<vi>; using vl = vector<ll>; using vvl = vector<vl>; using P = pair<int, int>; using PL = pair<ll, ll>; using vp = vector<P>; using vpl = vector<PL>; #define pqueue priority_queue template <typename T> constexp...
null
242,639
242,640
u502709453
cpp
p02547
#include <bits/stdc++.h> using namespace std; pair<int, int> a[1000]; int main() { int n; cin >> n; for (int i = 1; i <= n; ++i) { cin >> a[i].first >> a[i].second; if (i >= 3) { bool check = 1; for (int j = i - 2; j <= i; ++j) if (a[j].first != a[j].second) check = 0; ...
#include <bits/stdc++.h> using namespace std; pair<int, int> a[1000]; int main() { int n; cin >> n; for (int i = 1; i <= n; ++i) { cin >> a[i].first >> a[i].second; if (i >= 3) { bool check = 1; for (int j = i - 2; j <= i; ++j) if (a[j].first != a[j].second) check = 0; ...
null
243,868
243,869
u645891928
cpp
p02547
#include <iostream> using namespace std; int main() { int n, d1, d2, j = 0; cin >> n; for (int i = 0; i < n; i++) { cin >> d1; cin >> d2; if (d1 == d2) { j++; } else if (d1 != d2) { j = 0; } } if (j > 2) { cout << "Yes"; } else { cout << "No"; } }
#include <iostream> using namespace std; int main() { int n, d1, d2, j = 0; cin >> n; for (int i = 0; i < n; i++) { cin >> d1; cin >> d2; if (d1 == d2) { j++; } else if (d1 != d2 && j < 3) { j = 0; } } if (j > 2) { cout << "Yes"; } else { cout << "No"; } }
null
243,891
243,892
u883612089
cpp
p02547
#include "bits/stdc++.h" #pragma GCC optimize("O3,Ofast,no-stack-protector,unroll-loops,fast-math") #pragma GCC target("avx,avx2") using namespace std; using ll = long long; #define all(x) begin(x), end(x) void solve() {} int main() { ios_base::sync_with_stdio(0); cin.tie(0); int n; cin >> n; for (int i{}...
#include "bits/stdc++.h" #pragma GCC optimize("O3,Ofast,no-stack-protector,unroll-loops,fast-math") #pragma GCC target("avx,avx2") using namespace std; using ll = long long; #define all(x) begin(x), end(x) void solve() {} int main() { ios_base::sync_with_stdio(0); cin.tie(0); int n; cin >> n; for (int i{}...
null
243,895
243,896
u893304865
cpp
p02547
//#pragma GCC optimize("O3") //#pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> using namespace std; int main() { // freopen("in.txt", "r", stdin); // freopen("out.txt", "w", stdout); bool bl = 0; int a, b; int n, c = 0; scanf("%d", &n); while (n--) { scanf("%d %d", &a, &b); if (a ...
//#pragma GCC optimize("O3") //#pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> using namespace std; int main() { // freopen("in.txt", "r", stdin); // freopen("out.txt", "w", stdout); bool bl = 0; int a, b; int n, c = 0; scanf("%d", &n); while (n--) { scanf("%d %d", &a, &b); if (a ...
null
243,932
243,933
u871405337
cpp
p02547
/********************************************************************************************** ******************************AUTHOR:********************************************************** ****************************ASHISH *RANJAN****************************************************** *******************************...
/********************************************************************************************** ******************************AUTHOR:********************************************************** ****************************ASHISH *RANJAN****************************************************** *******************************...
null
243,934
243,935
u714708745
cpp
p02547
// $%U%$ // $%D%$/$%M%$/$%Y%$ #include <bits/stdc++.h> using namespace std; #define REP(i, n) for (int i = 0; i < n; i++) #define all(x) (x).begin(), (x).end() typedef pair<int, int> PII; typedef vector<int> VI; typedef vector<string> VS; typedef vector<PII> VII; typedef vector<VI> VVI; typedef long long int ll; const ...
// $%U%$ // $%D%$/$%M%$/$%Y%$ #include <bits/stdc++.h> using namespace std; #define REP(i, n) for (int i = 0; i < n; i++) #define all(x) (x).begin(), (x).end() typedef pair<int, int> PII; typedef vector<int> VI; typedef vector<string> VS; typedef vector<PII> VII; typedef vector<VI> VVI; typedef long long int ll; const ...
null
243,936
243,937
u399802581
cpp
p02547
#include <bits/stdc++.h> #include <iomanip> #include <iostream> #include <string> using namespace std; int main() { int n, c = 0; cin >> n; int a[n][2]; for (int i = 0; i < n; i++) { cin >> a[i][0] >> a[i][1]; } for (int i = 0; i < n - 2; i++) { if (a[i][0] == a[i][1] && a[i + 1][0] == a[i + 1][1]...
#include <bits/stdc++.h> #include <iomanip> #include <iostream> #include <string> using namespace std; int main() { int n, c = 0; cin >> n; int a[n][2]; for (int i = 0; i < n; i++) { cin >> a[i][0] >> a[i][1]; } for (int i = 0; i < n - 2; i++) { if (a[i][0] == a[i][1] && a[i + 1][0] == a[i + 1][1]...
null
243,940
243,941
u950548841
cpp
p02547
#include <bits/stdc++.h> #include <iomanip> #include <iostream> #include <string> using namespace std; int main() { int n, c = 0; cin >> n; int a[n][2]; for (int i = 0; i < n; i++) { cin >> a[i][0] >> a[i][1]; } for (int i = 0; i < n; i++) { if (a[i][0] == a[i][1] && a[i + 1][0] == a[i + 1][1] && ...
#include <bits/stdc++.h> #include <iomanip> #include <iostream> #include <string> using namespace std; int main() { int n, c = 0; cin >> n; int a[n][2]; for (int i = 0; i < n; i++) { cin >> a[i][0] >> a[i][1]; } for (int i = 0; i < n - 2; i++) { if (a[i][0] == a[i][1] && a[i + 1][0] == a[i + 1][1]...
null
243,942
243,941
u950548841
cpp
p02547
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <deque> #include <fstream> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std; #define pb push_b...
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <deque> #include <fstream> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std; #define pb push_b...
null
243,947
243,948
u448598378
cpp
p02547
#include <bits/stdc++.h> using namespace std; int main() { int n, d1, d2, i, c = 0, ans = 0; cin >> n; for (i = 0; i < n; i++) { cin >> d1, d2; if (d1 == d2) { c++; } else { c = 0; } if (c == 3) { ans = 1; } } if (ans == 1) { cout << "Yes" << endl; } else { ...
#include <bits/stdc++.h> using namespace std; int main() { int n, d1, d2, i, c = 0, ans = 0; cin >> n; for (i = 0; i < n; i++) { cin >> d1 >> d2; if (d1 == d2) { c++; } else { c = 0; } if (c == 3) { ans = 1; } } if (ans == 1) { cout << "Yes" << endl; } else { ...
null
243,955
243,956
u857110064
cpp
p02547
#include <bits/stdc++.h> #include <cstring> // #include<queue> #include <utility> #include <vector> using namespace std; int inf = 1e9; // vector<long long int>adj[10000]; int main() { int n; cin >> n; int a[n], b[n], c[n]; for (int i = 0; i < n; i++) { c[i] = 0; cin >> a[i] >> b[i]; if (a[i] == b...
#include <bits/stdc++.h> #include <cstring> // #include<queue> #include <utility> #include <vector> using namespace std; int inf = 1e9; // vector<long long int>adj[10000]; int main() { int n; cin >> n; int a[n], b[n], c[n]; for (int i = 0; i < n; i++) { c[i] = 0; cin >> a[i] >> b[i]; if (a[i] == b...
null
243,971
243,972
u807833230
cpp
p02547
#include <bits/stdc++.h> using namespace std; int main() { int n, flag; cin >> n; vector<int> d1(n), d2(n); for (int i = 0; i < n; i++) cin >> d1.at(i) >> d2.at(i); for (int i = 0; i < n; i++) { if (d1.at(i) == d2.at(i)) flag++; else flag = 0; if (flag == 3) break; } i...
#include <bits/stdc++.h> using namespace std; int main() { int n, flag = 0; cin >> n; vector<int> d1(n), d2(n); for (int i = 0; i < n; i++) cin >> d1.at(i) >> d2.at(i); for (int i = 0; i < n; i++) { if (d1.at(i) == d2.at(i)) flag++; else flag = 0; if (flag == 3) break; }...
null
243,975
243,976
u056848279
cpp
p02547
#include <bits/stdc++.h> #define F first #define S second using namespace std; int main() { int n; cin >> n; vector<pair<int, int>> v; for (int i = 0; i < n; i++) { int x, y; cin >> x >> y; v.push_back({x, y}); } for (int i = 0; i < n; i++) { if (v[i].F == v[i].S and v[i + 1].F == v[i + 1]....
#include <bits/stdc++.h> #define F first #define S second using namespace std; int main() { int n; cin >> n; vector<pair<int, int>> v; for (int i = 0; i < n; i++) { int x, y; cin >> x >> y; v.push_back({x, y}); } for (int i = 0; i < n - 2; i++) { if (v[i].F == v[i].S and v[i + 1].F == v[i +...
null
243,979
243,980
u576641570
cpp
p02547
// My life was going great until I stumble upon this question ); ): #include <bits/stdc++.h> using namespace std; #define FIO \ ios_base::sync_with_stdio(false); \ cin.tie(0); ...
// My life was going great until I stumble upon this question ); ): #include <bits/stdc++.h> using namespace std; #define FIO \ ios_base::sync_with_stdio(false); \ cin.tie(0); ...
null
243,759
243,760
u517698572
cpp
p02547
#include <bits/stdc++.h> #define ll long long int #define db double #define pb push_back #define mpr make_pair #define andl "\n" #define f first #define s second #define mset(x, y) memset(x, y, sizeof(x)) #define fr(i, n) for (long long int i = 0; i < n; i++) #define trace(it, x) for (auto it = (x).begin(); it != (x).e...
#include <bits/stdc++.h> #define ll long long int #define db double #define pb push_back #define mpr make_pair #define andl "\n" #define f first #define s second #define mset(x, y) memset(x, y, sizeof(x)) #define fr(i, n) for (long long int i = 0; i < n; i++) #define trace(it, x) for (auto it = (x).begin(); it != (x).e...
null
243,774
243,775
u667598279
cpp
p02547
// #define _GLIBCXX_DEBUG // for STL debug (optional) #include <algorithm> #include <bitset> #include <cassert> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #in...
// #define _GLIBCXX_DEBUG // for STL debug (optional) #include <algorithm> #include <bitset> #include <cassert> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #in...
null
243,776
243,777
u189575640
cpp
p02547
#include <algorithm> #include <bits/stdc++.h> using namespace std; #define fio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie...
#include <algorithm> #include <bits/stdc++.h> using namespace std; #define fio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie...
null
243,822
243,823
u565906751
cpp
p02547
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { cin.tie(0); ios::sync_with_stdio(0); int n; cin >> n; int ren = 0; for (int i = 0; i < n; ++i) { int a, b; cin >> a >> b; if (a == b) ++ren; else ren = 0; if (ren == 3) { cout << "Yes" << en...
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { cin.tie(0); ios::sync_with_stdio(0); int n; cin >> n; int ren = 0; for (int i = 0; i < n; ++i) { int a, b; cin >> a >> b; if (a == b) ++ren; else ren = 0; if (ren == 3) { cout << "Yes" << en...
null
243,838
243,839
u005863484
cpp
p02547
#include <iostream> using namespace std; int main() { int n; cin >> n; int a[n], b[n]; for (int i = 0; i < n; i++) { cin >> a[i]; cin >> b[i]; } int x = 0; bool bl = false; for (int i = 0; i < n; i++) { if (a[i] == b[i]) { x++; if (x == 3) { bl = true; break; ...
#include <iostream> using namespace std; int main() { int n; cin >> n; int a[n], b[n]; for (int i = 0; i < n; i++) { cin >> a[i]; cin >> b[i]; } int x = 0; bool bl = false; for (int i = 0; i < n; i++) { if (a[i] == b[i]) { x++; if (x == 3) { bl = true; break; ...
null
243,844
243,845
u034714820
cpp
p02547
#include <bits/stdc++.h> using namespace std; #define MOD 1000000007 //#define MOD 998244353 #define INF 1000000010 #define EPS 1e-9 #define F first #define S second #define debug(x) cout << x << endl; #define repi(i, x, n) for (int i = x; i < n; i++) #define rep(i, n) repi(i, 0, n) #define lp(i, n) repi(i, 0, n) #def...
#include <bits/stdc++.h> using namespace std; #define MOD 1000000007 //#define MOD 998244353 #define INF 1000000010 #define EPS 1e-9 #define F first #define S second #define debug(x) cout << x << endl; #define repi(i, x, n) for (int i = x; i < n; i++) #define rep(i, n) repi(i, 0, n) #define lp(i, n) repi(i, 0, n) #def...
null
244,324
244,325
u386769326
cpp
p02547
#include <bits/stdc++.h> using namespace std; #ifdef NOKI #include "debug.h" #else #define debug(args...) #endif int main() { int a, b, c = -1, d = -2, n, p; scanf("%d", &n); string s = "no"; while (n--) { scanf("%d%d", &a, &b); if (a == b && c == d) { p++; debug("here", p); } else if ...
#include <bits/stdc++.h> using namespace std; #ifdef NOKI #include "debug.h" #else #define debug(args...) #endif int main() { int a, b, c = -1, d = -2, n, p; scanf("%d", &n); string s = "No"; while (n--) { scanf("%d%d", &a, &b); if (a == b && c == d) { p++; debug("here", p); } else if ...
null
244,350
244,351
u082506992
cpp
p02547
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> v(N); vector<int> z(N); vector<int> count(N); int max = 0; int sum = 0; string s; for (int i = 0; i < N; i++) { cin >> v.at(i); cin >> z.at(i); count.at(i) = v.at(i) - z.at(i); // cout<<count.at(i)...
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> v(N); vector<int> z(N); vector<int> count(N); int max = 0; int sum = 0; string s; for (int i = 0; i < N; i++) { cin >> v.at(i); cin >> z.at(i); count.at(i) = v.at(i) - z.at(i); // cout<<count.at(i)...
null
244,363
244,364
u339389464
cpp
p02547
#include <bits/stdc++.h> #include <string.h> using namespace std; #define io \ ios_base::sync_with_stdio(false); \ cin.tie(NULL) #define ll long long #define ii pair<int, int> ll number_of_divisors(ll n) ...
#include <bits/stdc++.h> #include <string.h> using namespace std; #define io \ ios_base::sync_with_stdio(false); \ cin.tie(NULL) #define ll long long #define ii pair<int, int> ll number_of_divisors(ll n) ...
null
244,417
244,418
u970615252
cpp
p02547
#include <bits/stdc++.h> using namespace std; #define __ << " " << #define ___ << " " #define bash push_back #define ALL(x) x.begin(), x.end() // #define int long long struct IoSetup { IoSetup() { cin.tie(0); ios::sync_with_stdio(false); cout << fixed << setprecision(10); cerr << fixed << setprecision...
#include <bits/stdc++.h> using namespace std; #define __ << " " << #define ___ << " " #define bash push_back #define ALL(x) x.begin(), x.end() // #define int long long struct IoSetup { IoSetup() { cin.tie(0); ios::sync_with_stdio(false); cout << fixed << setprecision(10); cerr << fixed << setprecision...
null
244,419
244,420
u678146855
cpp
p02547
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int a[n], b[n]; for (int i = 0; i < n; i++) { cin >> a[i] >> b[i]; } int c = 0, d = 0; for (int i = 0; i < n; i++) { if (a[i] == b[i]) { for (int j = i; j < n; j++) { if (a[j] == b[j]) d++; ...
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int a[n], b[n]; for (int i = 0; i < n; i++) { cin >> a[i] >> b[i]; } int c = 0, d = 0; for (int i = 0; i < n; i++) { if (a[i] == b[i]) { for (int j = i; j < n; j++) { if (a[j] == b[j]) d++; ...
null
244,421
244,422
u626298152
cpp
p02547
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int arr[n][2]; for (int i = 0; i < n; i++) for (int j = 0; j < 2; j++) cin >> arr[i][j]; int count = 0; for (int i = 0; i < (n - 2); i++) if ((arr[i][0] == arr[i][1]) && (arr[i + 1][0] == arr[i + 1][1]) && (arr...
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int arr[n][2]; for (int i = 0; i < n; i++) for (int j = 0; j < 2; j++) cin >> arr[i][j]; int count = 0; for (int i = 0; i < (n - 2); i++) if ((arr[i][0] == arr[i][1]) && (arr[i + 1][0] == arr[i + 1][1]) && (arr...
null
244,443
244,444
u095138994
cpp
p02547
#include <iostream> #include <vector> using namespace std; int main() { int n; cin >> n; vector<pair<int, int>> v(n); for (auto &x : v) { cin >> x.first >> x.second; } int cnt = 0; for (auto &x : v) { if (x.first != x.second) { cnt = 0; } if (x.first == x.second) { cnt++; ...
#include <iostream> #include <vector> using namespace std; int main() { int n; cin >> n; vector<pair<int, int>> v(n); for (auto &x : v) { cin >> x.first >> x.second; } int cnt = 0; for (auto &x : v) { if (x.first != x.second) { cnt = 0; } if (x.first == x.second) { cnt++; ...
null
244,176
244,177
u063290149
cpp
p02547
#include <bits/stdc++.h> using namespace std; using namespace std; int main() { int n; cin >> n; vector<pair<int, int>> v; for (int i = 0; i < n; i++) { int d1, d2; cin >> d1 >> d2; v.push_back({d1, d2}); } int flag = 0; for (int i = 0; i < n - 2; i++) { if ((v[i].first == v[i].secon...
#include <bits/stdc++.h> using namespace std; using namespace std; int main() { int n; cin >> n; vector<pair<int, int>> v; for (int i = 0; i < n; i++) { int d1, d2; cin >> d1 >> d2; v.push_back({d1, d2}); } int flag = 0; for (int i = 0; i < n - 2; i++) { if ((v[i].first == v[i].secon...
null
244,200
244,201
u787479562
cpp
p02547
#include <bits/stdc++.h> using namespace std; using namespace std; int main() { int n; cin >> n; vector<pair<int, int>> v; for (int i = 0; i < n; i++) { int d1, d2; cin >> d1 >> d2; v.push_back({d1, d2}); } int flag = 0; for (int i = 0; i < n - 3; i++) { if ((v[i].first == v[i].secon...
#include <bits/stdc++.h> using namespace std; using namespace std; int main() { int n; cin >> n; vector<pair<int, int>> v; for (int i = 0; i < n; i++) { int d1, d2; cin >> d1 >> d2; v.push_back({d1, d2}); } int flag = 0; for (int i = 0; i < n - 2; i++) { if ((v[i].first == v[i].secon...
null
244,202
244,201
u787479562
cpp
p02547
#include <bits/stdc++.h> #define Khaled \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define lli long long int #define mp...
#include <bits/stdc++.h> #define Khaled \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define lli long long int #define mp...
null
244,216
244,217
u516513783
cpp
p02547
#include <bits/stdc++.h> #define S second #define F first #define FAST ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0) //#define pb push_back #define mp make_pair using namespace std; typedef long long ll; typedef pair<int, int> pii; int d[105]; int b[105]; int main() { int n; cin >> n; for (int i = 1...
#include <bits/stdc++.h> #define S second #define F first #define FAST ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0) //#define pb push_back #define mp make_pair using namespace std; typedef long long ll; typedef pair<int, int> pii; int d[105]; int b[105]; int main() { int n; cin >> n; for (int i = 1...
null
244,232
244,233
u879344191
cpp
p02547
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; int main() { int n; cin >> n; vector<vector<int>> dice(n, vector<int>(2)); for (int i = 0; i < n; i++) { for (int j = 0; j < 2; j++) { cin >> dice.at(i).at(j); } } int count = 0; for (int i = 0...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; int main() { int n; cin >> n; vector<vector<int>> dice(n, vector<int>(2)); for (int i = 0; i < n; i++) { for (int j = 0; j < 2; j++) { cin >> dice.at(i).at(j); } } int count = 0; for (int i = 0...
null
244,244
244,245
u393752095
cpp
p02547
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<pair<int, int>> ds; for (auto &p : ds) cin >> p.first >> p.second; bool ok = false; for (int i = 0; i < n - 2; ++i) { if (ds[i].first == ds[i].second && ds[i + 1].first == ds[i + 1].second && ds[i + 2].first ...
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<pair<int, int>> ds(n); for (auto &p : ds) cin >> p.first >> p.second; bool ok = false; for (int i = 0; i < n - 2; ++i) { if (ds[i].first == ds[i].second && ds[i + 1].first == ds[i + 1].second && ds[i + 2].fir...
null
244,271
244,272
u478275206
cpp