buggy_code stringlengths 11 625k | fixed_code stringlengths 17 625k | bug_type stringlengths 2 4.45k | language int64 0 8 | token_count int64 5 200k |
|---|---|---|---|---|
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define inf 50009
vector<ll> seq;
ll l, r, ten = 10, last = 1000000000000;
map<ll, ll> cnt;
map<ll, ll> sub;
ll arra[100009];
ll aps[1009][1009];
string str1[1009];
ll vis[109][109];
ll dp[209][209][209];
ll once[209];
ll forever[209];
vector<ll> an... | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define inf 50009
vector<ll> seq;
ll l, r, ten = 10, last = 1000000000000;
map<ll, ll> cnt;
map<ll, ll> sub;
ll arra[100009];
ll aps[1009][1009];
string str1[1009];
ll vis[109][109];
ll dp[209][209][209];
ll once[209];
ll forever[209];
vector<ll> an... | [["-", 75, 76, 0, 9, 0, 1, 0, 11, 12, 13], ["+", 75, 76, 0, 9, 0, 1, 0, 11, 12, 13]] | 1 | 233 |
n = int(input())
count = 0
flag = False
while count < n:
a, b = map(int, input().split())
count += 1
if a == b and count <= n:
a, b = map(int, input().split())
count += 1
if a == b and count <= n:
a, b = map(int, input().split())
count += 1
if a == b and count <= n:
flag = Tr... | n = int(input())
count = 0
flag = False
while count < n:
a, b = map(int, input().split())
count += 1
if a == b and count < n:
a, b = map(int, input().split())
count += 1
if a == b and count < n:
a, b = map(int, input().split())
count += 1
if a == b and count <= n:
flag = True... | [["-", 8, 196, 0, 57, 15, 679, 12, 666, 667, 19], ["+", 8, 196, 0, 57, 15, 679, 12, 666, 667, 18], ["-", 64, 196, 0, 57, 15, 679, 12, 666, 667, 19], ["+", 64, 196, 0, 57, 15, 679, 12, 666, 667, 18]] | 5 | 124 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> sai1(n);
vector<int> sai2(n);
for (int i = 0; i < n; i++) {
cin >> sai1.at(i);
cin >> sai2.at(i);
}
int count = 0;
for (int i = 0; i < n; i++) {
if (sai1.at(i) == sai2.at(i)) {
count++;
if (co... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> sai1(n);
vector<int> sai2(n);
for (int i = 0; i < n; i++) {
cin >> sai1.at(i);
cin >> sai2.at(i);
}
int count = 0;
for (int i = 0; i < n; i++) {
if (sai1.at(i) == sai2.at(i)) {
count++;
if (co... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 150 |
n = int(input().strip())
count = 0
for i in range(n):
a,b = map(int,input().strip().split())
if a == b and count == 3:
print('Yes')
exit(0)
elif a == b:
count += 1
elif(a != b):
count = 0
if count == 3:
print('Yes')
else:
print('No')
| n = int(input().strip())
count = 0
for i in range(n):
a,b = map(int,input().strip().split())
if count == 3:
print('Yes')
exit(0)
elif a == b:
count += 1
elif(a != b):
count = 0
if count == 3:
print('Yes')
else:
print('No')
| [["-", 8, 196, 0, 57, 15, 679, 31, 666, 0, 22], ["-", 8, 196, 0, 57, 15, 679, 31, 666, 667, 60], ["-", 0, 7, 8, 196, 0, 57, 15, 679, 17, 355]] | 5 | 99 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<pair<int, int>> v;
for (int j = 0; j < n; j++) {
int a, b;
cin >> a >> b;
v.push_back(make_pair(a, b));
}
v.push_back(make_pair(1, -1));
int c = 0, flag = 0;
for (int j = 0; j < n; j++) {
if (v[j].first ==... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<pair<int, int>> v;
for (int j = 0; j < n; j++) {
int a, b;
cin >> a >> b;
v.push_back(make_pair(a, b));
}
v.push_back(make_pair(1, -1));
int c = 0, flag = 0;
for (int j = 0; j < n + 1; j++) {
if (v[j].firs... | [["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 179 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int cnt = 0;
for (int i = 0; i < N; i++) {
int d1, d2;
cin >> d1 >> d2;
if (d1 == d2)
cnt += 1;
else
cnt = 0;
if (cnt = 3) {
cout << "Yes" << endl;
return 0;
}
}
cout << "No" << endl;... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int ans = 0;
for (int i = 0; i < N; i++) {
int d1, d2;
cin >> d1 >> d2;
if (d1 == d2)
ans += 1;
else
ans = 0;
if (ans == 3) {
cout << "Yes" << endl;
return 0;
}
}
cout << "No" << endl... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 49, 22], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 49, 22], ["-", 8, 9, 0, 57, 64, 1, 0, 11, 31, 22], ["+", 8, 9, 0, 57, 64, 1, 0, 11, 31, 22], ["-", 0, 57, 75, 76, 0, 1, 0, 11, 31, 22], ["+", 0, 57, 75, 76, 0, 1, 0, 11, 31, 22], ["-", 8, 9, 0, 57, 15, 339, 51, 11, 31, 22], ["-", 8, 9, 0, 57,... | 1 | 93 |
def solution(arr):
count = 0
for i, j in arr:
if i == j:
count += 1
else:
count = 0
if count == 2:
return 'Yes'
return 'No'
n = int(input())
arr = []
for _ in range(n):
arr.append([ int(i) for i in input().split()])
print(solution(arr)) | def solution(arr):
count = 0
for i, j in arr:
if i == j:
count += 1
else:
count = 0
if count == 3:
return 'Yes'
return 'No'
n = int(input())
arr = []
for _ in range(n):
arr.append([ int(i) for i in input().split()])
print(solution(arr)) | [["-", 0, 7, 8, 196, 0, 57, 15, 666, 0, 612], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 0, 612]] | 5 | 90 |
#include <bits/stdc++.h>
using namespace std;
int gcd(long long a, long long b) {
if (b == 0) {
return a;
}
return (gcd(b, a % b));
}
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int n;
cin >> n;
vector<vector<int>> v;
int a;
for (int i = 0; i < n; i++) {
vector<int> x;
... | #include <bits/stdc++.h>
using namespace std;
int gcd(long long a, long long b) {
if (b == 0) {
return a;
}
return (gcd(b, a % b));
}
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int n;
cin >> n;
vector<vector<int>> v;
int a;
for (int i = 0; i < n; i++) {
vector<int> x;
... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 317 |
#include <stdio.h>
int main() {
int n;
int a[100][2];
int i;
scanf("%d", n);
for (i = 0; i <= n; i++) {
scanf("%d %d", &a[i][1], &a[i][2]);
}
for (i = 0; i < n - 2; i++) {
if (a[i][1] == a[i][2] && a[i + 1][1] == a[i + 1][2] &&
a[i + 2][1] == a[i + 2][2]) {
printf("Yes");
r... | #include <stdio.h>
int main() {
int n;
int a[100][2];
int i;
scanf("%d", &n);
for (i = 0; i <= n; i++) {
scanf("%d %d", &a[i][1], &a[i][2]);
}
for (i = 0; i < n - 2; i++) {
if (a[i][1] == a[i][2] && a[i + 1][1] == a[i + 1][2] &&
a[i + 2][1] == a[i + 2][2]) {
printf("Yes");
... | [["+", 0, 1, 0, 2, 3, 4, 0, 66, 17, 67]] | 0 | 169 |
n = int(input())
d = [list(map(int, input().split())) for _ in range(n)]
for i in range(n - 2):
if all([d[i + j][0] == d[i + j][1] for j in range(2)]):
print('Yes')
exit()
print('No')
| n = int(input())
d = [list(map(int, input().split())) for _ in range(n)]
for i in range(n - 2):
if all([d[i + j][0] == d[i + j][1] for j in range(3)]):
print('Yes')
exit()
print('No')
| [["-", 0, 658, 0, 659, 12, 652, 3, 4, 0, 612], ["+", 0, 658, 0, 659, 12, 652, 3, 4, 0, 612]] | 5 | 92 |
nn = int(input())
x = 0
for i in range(n):
d1, d2 = map(int, input().split())
if x != 3:
if d1 != d2:
x = 0
else:
x += 1
print("Yes" if x == 3 else "No") | n = int(input())
x = 0
for i in range(n):
d1, d2 = map(int, input().split())
if x != 3:
if d1 != d2:
x = 0
else:
x += 1
print("Yes" if x == 3 else "No") | [["-", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22]] | 5 | 67 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef double dd;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int, int> pii;
const int Mx = 1e6 + 11;
const double PI = acos(-1);
#define MOD 1000000007
#define nl '\n'
#define pb push_back
#define F ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef double dd;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int, int> pii;
const int Mx = 1e6 + 11;
const double PI = acos(-1);
#define MOD 1000000007
#define nl '\n'
#define pb push_back
#define F ... | [["-", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["-", 0, 7, 8, 9, 0, 57, 64, 9, 0, 45], ["-", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46]] | 1 | 232 |
#include <stdio.h>
int main(void) {
int n, d[99][2];
int i, k;
scanf("%d", &n);
for (k = 0; k <= n - 1; k++) {
scanf("%d %d", d[k][0], d[k][1]);
}
for (i = 0; i <= n - 3; i++) {
if (d[i][0] == d[i][1] && d[i + 1][0] == d[i + 1][1] &&
d[i + 2][0] == d[i + 2][1]) {
printf("Yes");
... | #include <stdio.h>
int main(void) {
int n, d[100][2];
int i, k;
scanf("%d", &n);
for (k = 0; k <= n - 1; k++) {
scanf("%d %d", &d[k][0], &d[k][1]);
}
for (i = 0; i <= n - 3; i++) {
if (d[i][0] == d[i][1] && d[i + 1][0] == d[i + 1][1] &&
d[i + 2][0] == d[i + 2][1]) {
printf("Yes");
... | [["-", 8, 9, 0, 43, 49, 80, 49, 80, 81, 13], ["+", 8, 9, 0, 43, 49, 80, 49, 80, 81, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 66, 17, 67]] | 1 | 172 |
//#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define black_tree ... | //#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define black_tree ... | [["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 20], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 211 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<pair<int, int>> vec(n);
for (int i = 0; i < n; i++) {
cin >> vec[i].first >> vec[i].second;
}
for (int i = 2; i < n; i++) {
bool isAns = true;
for (int j = 0; j <= 2; j++) {
if (vec[i - j].first != vec[i - j... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<pair<int, int>> vec(n);
for (int i = 0; i < n; i++) {
cin >> vec[i].first >> vec[i].second;
}
for (int i = 2; i < n; i++) {
bool isAns = true;
for (int j = 0; j <= 2; j++) {
if (vec[i - j].first != vec[i - j... | [["+", 0, 7, 8, 9, 0, 7, 8, 9, 0, 46], ["-", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46], ["+", 8, 9, 0, 57, 64, 9, 0, 37, 0, 38], ["+", 8, 9, 0, 57, 64, 9, 0, 37, 0, 13], ["+", 8, 9, 0, 57, 64, 9, 0, 37, 0, 35]] | 1 | 153 |
n = int(input())
str_list = [list(input().split()) for _ in range(n)]
print(str_list)
ans = 0
for i in range(n-2):
if str_list[i][0] == str_list[i][1]:
if str_list[i+1][0] == str_list[i+1][1]:
if str_list[i+2][0] == str_list[i+2][1]:
ans += 1
if ans:
print('Yes')
else:
... | n = int(input())
str_list = [list(input().split()) for _ in range(n)]
ans = 0
for i in range(n-2):
if str_list[i][0] == str_list[i][1]:
if str_list[i+1][0] == str_list[i+1][1]:
if str_list[i+2][0] == str_list[i+2][1]:
ans += 1
if ans:
print('Yes')
else:
print('No')
| [["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 125 |
n = int(input)
count = 0
ans = 'No'
for i in range(n):
a , b = map(int,input().split(' '))
if a!=b:
count = 0
else:
count += 1
if count == 3:
ans = 'Yes'
print(ans)
| n = int(input())
count = 0
ans = 'No'
for i in range(n):
a , b = map(int,input().split(' '))
if a!=b:
count = 0
else:
count += 1
if count == 3:
ans = 'Yes'
print(ans) | [["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 68 |
n = int(input())
l = [list(map(int, input().split())) for i in range(n)]
#print(l[0][0])
#print(l[0][1])
ans = n-2
ans1 = 0
for m in range(ans):
if l[m][0] == l[m][1] and l[m+1][0] == l[m+1][1] and l[m+2][0] == l[m+2][1]:
ans1 += 1
else:
ans1 = 0
if ans1 >= 1:
print("Yes")
else:
print("No") | n = int(input())
l = [list(map(int, input().split())) for i in range(n)]
#print(l[0][0])
#print(l[0][1])
ans = n-2
ans1 = 0
for m in range(ans):
if l[m][0] == l[m][1] and l[m+1][0] == l[m+1][1] and l[m+2][0] == l[m+2][1]:
ans1 += 1
if ans1 >= 1:
print("Yes")
else:
print("No") | [["-", 0, 7, 8, 196, 0, 57, 75, 76, 0, 95], ["-", 0, 7, 8, 196, 0, 57, 75, 76, 0, 102], ["-", 75, 76, 8, 196, 0, 1, 0, 662, 31, 22], ["-", 75, 76, 8, 196, 0, 1, 0, 662, 0, 32], ["-", 75, 76, 8, 196, 0, 1, 0, 662, 12, 612]] | 5 | 136 |
n=int(input())
count=0
for i in range(n):
me1,me2=list(map(int,input().split()))
if me1==me2:
count+=1
if count==3:
break
else:
count=0
if count>=n:
print('Yes')
else:
print('No') | n=int(input())
count=0
for i in range(n):
me1,me2=list(map(int,input().split()))
if me1==me2:
count+=1
if count==3:
break
else:
count=0
if count>=3:
print('Yes')
else:
print('No') | [["-", 36, 36, 0, 656, 0, 57, 15, 666, 0, 22], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 0, 612]] | 5 | 76 |
#include <bits/stdc++.h>
//#include<pair>
using namespace std;
typedef long long ll;
typedef int ii;
// typedef vector<ll> vi;
#define INF 1000000007
#define pi 3.141592654
#define T while (t--)
#define for2(i, a, b) for (i = a; i >= b; i--)
#define for3(i, a, b) for (i = a; i <= b; i = i + 2)
#define for1(i, a, b)... | #include <bits/stdc++.h>
//#include<pair>
using namespace std;
typedef long long ll;
typedef int ii;
// typedef vector<ll> vi;
#define INF 1000000007
#define pi 3.141592654
#define T while (t--)
#define for2(i, a, b) for (i = a; i >= b; i--)
#define for3(i, a, b) for (i = a; i <= b; i = i + 2)
#define for1(i, a, b)... | [["-", 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 | 224 |
//
// ABC179 B - Go to Jail
//
#include <bits/stdc++.h>
using namespace std;
int main() {
// 標準入力から値(回数)を受け取る。
int n;
cin >> n;
// 標準入力から値(出目)を受け取る。
vector<vector<int>> d(n, vector<int>(2));
for (int i = 0; i < d.size(); i++) {
for (int j = 0; j < d.at(i).size(); j++) {
cin >> d.at(i).at(j);
... | //
// ABC179 B - Go to Jail
//
#include <bits/stdc++.h>
using namespace std;
int main() {
// 標準入力から値(回数)を受け取る。
int n;
cin >> n;
// 標準入力から値(出目)を受け取る。
vector<vector<int>> d(n, vector<int>(2));
for (int i = 0; i < d.size(); i++) {
for (int j = 0; j < d.at(i).size(); j++) {
cin >> d.at(i).at(j);
... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 220 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, a, b, count = 0, t = 0;
cin >> n;
while (n--) {
cin >> a >> b;
if (a == b) {
count++;
} else {
count = 0;
}
if (count == 3) {
t = 1;
count = 0;
}
}
if (t) {
cout << "yes";
} else {
co... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, a, b, count = 0, t = 0;
cin >> n;
while (n--) {
cin >> a >> b;
if (a == b) {
count++;
} else {
count = 0;
}
if (count == 3) {
t = 1;
count = 0;
}
}
if (t) {
cout << "Yes";
} else {
co... | [["-", 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 | 102 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
bool b = 0;
int cnt = 0;
while (n--) {
int x, y;
cin >> x >> y;
if (x == y)
cnt++;
if (cnt >= 3) {
b = 1;
break;
}
}
if (b)
cout << "Yes\n";
else
cout << "No\n";
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
bool b = 0;
int cnt = 0;
while (n--) {
int x, y;
cin >> x >> y;
if (x == y)
cnt++;
else
cnt = 0;
if (cnt >= 3) {
b = 1;
break;
}
}
if (b)
cout << "Yes\n";
else
cout << "No\... | [["+", 0, 52, 8, 9, 0, 57, 75, 76, 0, 95], ["+", 0, 57, 75, 76, 0, 1, 0, 11, 31, 22], ["+", 0, 57, 75, 76, 0, 1, 0, 11, 17, 32], ["+", 0, 57, 75, 76, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 57, 75, 76, 0, 1, 0, 35]] | 1 | 89 |
N=int(input())
X=[]
Y=[]
for _ in range(N):
x, y = map(int, input().split())
X.append(x)
Y.append(y)
A="NO"
for n in range(N-2):
if X[n]==Y[n]:
if X[n+1]==Y[n+1]:
if X[n+2]==Y[n+2]:
A="YES"
break
else:
continue
... | N=int(input())
X=[]
Y=[]
for _ in range(N):
x, y = map(int, input().split())
X.append(x)
Y.append(y)
A="No"
for n in range(N-2):
if X[n]==Y[n]:
if X[n+1]==Y[n+1]:
if X[n+2]==Y[n+2]:
A="Yes"
break
else:
continue
... | [["-", 0, 656, 0, 1, 0, 662, 12, 557, 0, 6], ["+", 0, 656, 0, 1, 0, 662, 12, 557, 0, 6], ["-", 64, 196, 0, 1, 0, 662, 12, 557, 0, 6], ["+", 64, 196, 0, 1, 0, 662, 12, 557, 0, 6]] | 5 | 127 |
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int d[n][2];
int counter = 0;
for (int i = 0; i < n; i++) {
cin >> d[i][0] >> d[i][1];
if (d[i][0] == d[i][1]) {
if (counter < 2)
counter++;
else {
cout << "yes";
return 0;
}
} else
... | #include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int d[n][2];
int counter = 0;
for (int i = 0; i < n; i++) {
cin >> d[i][0] >> d[i][1];
if (d[i][0] == d[i][1]) {
if (counter < 2)
counter++;
else {
cout << "Yes";
return 0;
}
} else
... | [["-", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 122 |
N = int(input())
xy = [map(int, input().split()) for _ in range(N)]
x, y = [list(i) for i in zip(*xy)]
count = 0
for i in range(N):
if x[i] == y[i]:
count += 1
if count == 3:
print("Yes")
else:
count = 0
print("No") | N = int(input())
xy = [map(int, input().split()) for _ in range(N)]
x, y = [list(i) for i in zip(*xy)]
count = 0
for i in range(N):
if x[i] == y[i]:
count += 1
if count == 3:
print("Yes")
exit()
else:
count = 0
print("No")
| [["+", 0, 57, 64, 196, 0, 1, 0, 652, 63, 22], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 96 |
n = int(input())
d12 = [map(int, input().split()) for _ in range(n)]
d1, d2 = [list(i) for i in zip(*d12)]
for i in range(n-2):
if d1[i] == d2[i]:
if d1[i+1] == d2[i+1]:
if d1[i+2] == d2[i+2]:
print("YES")
break
else:
print("NO") | n = int(input())
d12 = [map(int, input().split()) for _ in range(n)]
d1, d2 = [list(i) for i in zip(*d12)]
for i in range(n-2):
if d1[i] == d2[i]:
if d1[i+1] == d2[i+1]:
if d1[i+2] == d2[i+2]:
print("Yes")
break
else:
print("No") | [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 115 |
N = STDIN.gets.chomp.to_i
count = 0
yes = false
for i in 1..N do
a, b = STDIN.gets.chomp.split(' ')
if a == b
count += 1
if count == 3
yes = true
end
else
count = 0
end
end
if yes
puts 'yes'
else
puts 'no'
end
| N = STDIN.gets.chomp.to_i
count = 0
yes = false
for i in 1..N do
a, b = STDIN.gets.chomp.split(' ')
if a == b
count += 1
if count == 3
yes = true
end
else
count = 0
end
end
if yes
puts 'Yes'
else
puts 'No'
end
| [["-", 64, 749, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 64, 749, 0, 652, 3, 4, 0, 557, 0, 6], ["-", 75, 95, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 75, 95, 0, 652, 3, 4, 0, 557, 0, 6]] | 4 | 71 |
a =int( input())
_number=0;_kaerichi="No"
for i in range(a):
b, c = map(int, input().split())
if(b==c):
_number+=1
if(_number==3):
_kaerichi="Yes"
print(_kaerichi)
| a =int( input())
_number=0;_kaerichi="No"
for i in range(a):
b, c = map(int, input().split())
if(b==c):
_number+=1
else:
_number=0
if(_number==3):
_kaerichi="Yes"
print(_kaerichi)
| [["+", 0, 7, 8, 196, 0, 57, 75, 76, 0, 95], ["+", 0, 7, 8, 196, 0, 57, 75, 76, 0, 102], ["+", 75, 76, 8, 196, 0, 1, 0, 662, 31, 22], ["+", 75, 76, 8, 196, 0, 1, 0, 662, 0, 32], ["+", 75, 76, 8, 196, 0, 1, 0, 662, 12, 612]] | 5 | 67 |
#include <iostream>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
vector<vector<int>> d(n, vector<int>(2));
for (int i = 0; i < n; i++) {
for (int j = 0; j < 2; j++) {
cin >> d[i][j];
}
}
bool ans = false;
for (int i = 0; i < n - 2; i++) {
if ((d[i][0] == d[i][1]) ... | #include <iostream>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
vector<vector<int>> d(n, vector<int>(2));
for (int i = 0; i < n; i++) {
for (int j = 0; j < 2; j++) {
cin >> d[i][j];
}
}
bool ans = false;
for (int i = 0; i < n - 2; i++) {
if ((d[i][0] == d[i][1]) ... | [["-", 0, 57, 64, 9, 0, 1, 0, 16, 17, 60], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 17, 32]] | 1 | 203 |
// 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... | [["+", 0, 7, 8, 9, 0, 57, 64, 37, 0, 38], ["+", 8, 9, 0, 57, 64, 37, 0, 34, 0, 21], ["+", 8, 9, 0, 57, 64, 37, 0, 34, 12, 13]] | 1 | 194 |
n=input()
c=0
flag=0
for i in range(n):
a,b = map(int,input().split())
if(a==b):
c+=1
else:
c=0
if(c==3):
print("Yes")
flag=1
break
if(flag==0):
print("No") | n=int(input())
c=0
flag=0
for i in range(n):
a,b = map(int,input().split())
if(a==b):
c+=1
else:
c=0
if(c==3):
print("Yes")
flag=1
break
if(flag==0):
print("No") | [["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 80 |
l=[]
n=int(input())
for _ in range(n):
a=list(map(int,input().split()))
l.append(a)
flag=0
for i in range(1,n-1):
if l[i-1][0]==l[i-1][1] and l[i][0]==l[i][1] and l[i+1][0]==l[i+1][1]:
flag=1
break
if flag==1:
print("YES")
else:
print("NO") | l=[]
n=int(input())
for _ in range(n):
a=list(map(int,input().split()))
l.append(a)
flag=0
for i in range(1,n-1):
if l[i-1][0]==l[i-1][1] and l[i][0]==l[i][1] and l[i+1][0]==l[i+1][1]:
flag=1
break
if flag==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 | 138 |
/**
* Author : RDP
* There are no two words in the English language more harmful than "good job".
* 1729 ;)
**/
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <lis... | /**
* Author : RDP
* There are no two words in the English language more harmful than "good job".
* 1729 ;)
**/
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <lis... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 306 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n, cnt = 0;
cin >> n;
for (int i = 0; i < n; ++i) {
int d1, d2;
cin >> d1 >> d2;
if (d1 == d2)
cnt++;
else
cnt = 0;
if (cnt == 0) {
puts("Yes");
return 0;
}
}
puts("No");
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n, cnt = 0;
cin >> n;
for (int i = 0; i < n; ++i) {
int d1, d2;
cin >> d1 >> d2;
if (d1 == d2)
cnt++;
else
cnt = 0;
if (cnt == 3) {
puts("Yes");
return 0;
}
}
puts("No");
}
| [["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 94 |
N = int(input())
Flag = False
MAXC = 0
Cont = 0
for TN in range(0,N):
D1,D2 = (int(T) for T in input().split())
if Flag==False and D1==D2:
Flag = True
Cout = 1
elif Flag==True and D1==D2:
Cout += 1
elif Flag==True and D1!=D2:
Flag = False
MAXC = max(MAXC,Cout)
MAX... | N = int(input())
Flag = False
MAXC = 0
Cout = 0
for TN in range(0,N):
D1,D2 = (int(T) for T in input().split())
if Flag==False and D1==D2:
Flag = True
Cout = 1
elif Flag==True and D1==D2:
Cout += 1
elif Flag==True and D1!=D2:
Flag = False
MAXC = max(MAXC,Cout)
MAX... | [["-", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22]] | 5 | 126 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, i;
bool pass = false;
vector<bool> v;
cin >> n;
for (i = 0; i < n; i++) {
int a, b;
cin >> a >> b;
if (a == b)
v.push_back(true);
else
v.push_back(false);
}
for (i = 1; i < n - 1; i++) {
if (v[i - 1] && v[i]... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, i;
bool pass = false;
vector<bool> v;
cin >> n;
for (i = 0; i < n; i++) {
int a, b;
cin >> a >> b;
if (a == b)
v.push_back(true);
else
v.push_back(false);
}
for (i = 1; i < n - 1; i++) {
if (v[i - 1] && v[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 | 138 |
n = gets.to_i
ds = []
n.times {
d1, d2 = gets.split.map &:to_i
if d1 == d2 then
ds << true
end
}
ds.each_cons(3){ |x|
if x.all? then
puts 'Yes'
exit
end
}
puts 'No'
| n = gets.to_i
ds = []
n.times {
d1, d2 = gets.split.map &:to_i
if d1 == d2 then
ds << true
else
ds << false
end
}
ds.each_cons(3){ |x|
if x.all? then
puts 'Yes'
exit
end
}
puts 'No'
| [["+", 196, 196, 8, 734, 0, 121, 75, 95, 0, 95], ["+", 8, 734, 0, 121, 75, 95, 0, 738, 31, 22], ["+", 8, 734, 0, 121, 75, 95, 0, 738, 17, 151], ["+", 8, 734, 0, 121, 75, 95, 0, 738, 12, 147]] | 4 | 60 |
/*
quid-pro-quo: LOGIC for AC
written by: codercell07
LANG: C++ 11
Problem: random
*/
#include <bits/stdc++.h>
#define fastio \
ios::sync_with_stdio(false); \
cin.tie(NULL)
#define testcas... | /*
quid-pro-quo: LOGIC for AC
written by: codercell07
LANG: C++ 11
Problem: random
*/
#include <bits/stdc++.h>
#define fastio \
ios::sync_with_stdio(false); \
cin.tie(NULL)
#define testcas... | [["-", 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 | 404 |
N = int(input())
t = 0
for i in range(N):
a, b = [int(x) for x in input().split()]
if a != b:
t = 0
else:
t += 1
if t == 2:
break
if t == 3:
print("Yes")
else:
print("No")
| N = int(input())
t = 0
for i in range(N):
a, b = [int(x) for x in input().split()]
if a != b:
t = 0
else:
t += 1
if t > 2:
break
if t > 2:
print("Yes")
else:
print("No")
| [["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 60], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 47], ["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 60], ["-", 36, 36, 0, 656, 0, 57, 15, 666, 0, 612], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 47], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 0, 612]] | 5 | 77 |
#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
int n, a, b, count = 0;
bool inRow = false;
cin >> n;
while (n--) {
cin >> a >> b;
if (a == b)
count++;
else
count = 0;
if (count >= 3)
inRow = true;
}
if (true)
cout << "Yes";
else
... | #include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
int n, a, b, count = 0;
bool inRow = false;
cin >> n;
while (n--) {
cin >> a >> b;
if (a == b)
count++;
else
count = 0;
if (count >= 3)
inRow = true;
}
if (inRow)
cout << "Yes";
else
... | [["-", 0, 14, 8, 9, 0, 57, 15, 339, 51, 146], ["+", 0, 14, 8, 9, 0, 57, 15, 339, 51, 22]] | 1 | 89 |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
vector<pair<int, int>> v(n);
for (int i = 0; i < n; i++) {
cin >> v[i].first >> v[i].second;
}
bool flag = true;
for (int i = 0; i <= n - 3; i++) {
flag = true;
for (int... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
vector<pair<int, int>> v(n);
for (int i = 0; i < n; i++) {
cin >> v[i].first >> v[i].second;
}
bool flag = true;
for (int i = 0; i <= n - 3; i++) {
flag = true;
for (int... | [["-", 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 | 182 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long n, i, j, k;
cin >> n;
vector<int> a(n, 0);
for (i = 0; i < n; i++) {
cin >> j >> k;
if (j == k)
a[i]++;
}
k = 0;
for (i = 0; i < n - 2; i++) {
if (a[i] && a[i + 1] && a[i + 2]) {
k = 1;
break;
}
}
i... | #include <bits/stdc++.h>
using namespace std;
int main() {
long long n, i, j, k;
cin >> n;
vector<int> a(n, 0);
for (i = 0; i < n; i++) {
cin >> j >> k;
if (j == k)
a[i]++;
}
k = 0;
for (i = 0; i < n - 2; i++) {
if (a[i] && a[i + 1] && a[i + 2]) {
k = 1;
break;
}
}
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 | 142 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, a, n) for (int i = a; i < n; i++) // iをaからn
#define per(i, a, n) for (int i = a - 1; i >= n; i--) // iをnからa
#define db(x) cout << #x << " = " << x << endl
#define db2(x, y) \
cout << "(" << #... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, a, n) for (int i = a; i < n; i++) // iをaからn
#define per(i, a, n) for (int i = a - 1; i >= n; i--) // iをnからa
#define db(x) cout << #x << " = " << x << endl
#define db2(x, y) \
cout << "(" << #... | [["-", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 186 |
n = int(input())
D_1 = [0 for i in range(n)]
D_2 = [0 for i in range(n)]
for i in range(n):
D_1[i], D_2[i] = map(int, input().split())
tmp = 0
ans = 0
for i in range(n):
if D_1[i] == D_2[i]:
tmp += 1
else:
ans = max(tmp, ans)
tmp = 0
ans = max(tmp, ans)
print(ans)
if ans >= 3:
... | n = int(input())
D_1 = [0 for i in range(n)]
D_2 = [0 for i in range(n)]
for i in range(n):
D_1[i], D_2[i] = map(int, input().split())
tmp = 0
ans = 0
for i in range(n):
if D_1[i] == D_2[i]:
tmp += 1
else:
ans = max(tmp, ans)
tmp = 0
ans = max(tmp, ans)
if ans >= 3:
print("Yes"... | [["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 134 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int a[n], b[n];
bool flag = false;
int c = 0;
for (int i = 0; i < n; i++) {
cin >> a[i] >> b[i];
if (a[i] == b[i])
c++;
if (c >= 3 && flag == false) {
flag = true;
}
}
if (flag == false)
cout << "... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int a[n], b[n];
bool flag = false;
int c = 0;
for (int i = 0; i < n; i++) {
cin >> a[i] >> b[i];
if (a[i] == b[i])
c++;
else
c = 0;
if (c >= 3 && flag == false) {
flag = true;
}
}
if (flag ... | [["+", 0, 7, 8, 9, 0, 57, 75, 76, 0, 95], ["+", 0, 57, 75, 76, 0, 1, 0, 11, 31, 22], ["+", 0, 57, 75, 76, 0, 1, 0, 11, 17, 32], ["+", 0, 57, 75, 76, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 57, 75, 76, 0, 1, 0, 35]] | 1 | 121 |
n=int(input())
xy=[map(int,input().split()) for i in range(n)]
x,y=[list(v) for v in zip(*xy)]
cnt=0
for i in range(n):
if x[i]==y[i]:
cnt+=1
else:
cnt=0
if cnt==3:
print('Yes')
break
if cnt==0:
print('No') | n=int(input())
xy=[map(int,input().split()) for i in range(n)]
x,y=[list(v) for v in zip(*xy)]
cnt=0
for i in range(n):
if x[i]==y[i]:
cnt+=1
else:
cnt=0
if cnt==3:
print('Yes')
break
if cnt!=3:
print('No') | [["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 60], ["-", 36, 36, 0, 656, 0, 57, 15, 666, 0, 612], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 79], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 0, 612]] | 5 | 102 |
#include <bits/stdc++.h>
using namespace std;
int d[105][3];
int main() {
int n;
cin >> n;
for (int i = 1; i <= n; i++) {
cin >> d[i][1] >> d[i][2];
}
for (int i = 1; i <= n - 2; i++) {
bool flg = true;
for (int j = i; j <= i + 2; j++) {
if (d[j][1] != d[j][2])
flg = false;
}
... | #include <bits/stdc++.h>
using namespace std;
int d[105][3];
int main() {
int n;
cin >> n;
for (int i = 1; i <= n; i++) {
cin >> d[i][1] >> d[i][2];
}
for (int i = 1; i <= n - 2; i++) {
bool flg = true;
for (int j = i; j <= i + 2; j++) {
if (d[j][1] != d[j][2])
flg = false;
}
... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 151 |
#include <bits/stdc++.h>
#define int long long
#define deb(x) cout << #x << " = " << x << "\n";
using namespace std;
signed main() {
int n;
cin >> n;
int prev = 0, prev2 = 0, cur = 0;
string ans = "No";
for (int i = 0, x, y; i < n; i++) {
cin >> x >> y;
if (x != y)
continue;
if (x + prev +... | #include <bits/stdc++.h>
#define int long long
#define deb(x) cout << #x << " = " << x << "\n";
using namespace std;
signed main() {
int n;
cin >> n;
int prev = 0, prev2 = 0, cur = 0;
string ans = "No";
for (int i = 0, x, y; i < n; i++) {
cin >> x >> y;
cur = (x == y);
if (cur + prev + prev2 == ... | [["-", 8, 9, 0, 7, 8, 9, 0, 57, 0, 121], ["+", 0, 7, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 7, 8, 9, 0, 1, 0, 11, 17, 32], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79], ["+", 0, 1, 0, 11, 12, 23, 0, 16, 17, 60], ["-", 0, 7, 8, 9, 0, 57, 64, 116, 0, 117], ["-", 15, 339, 51, 16, 31, 16, 31, 16, 31, 22], ["+", 15, 339, 51, 1... | 1 | 110 |
#include <bits/stdc++.h>
using namespace std;
#define mod 1000000007
#define int long long
#define big 998244353
#define ff first
#define se second
#define pb push_back
#define pii pair<int, int>
#define fast \
ios_base::sync_with_stdio(0); ... | #include <bits/stdc++.h>
using namespace std;
#define mod 1000000007
#define int long long
#define big 998244353
#define ff first
#define se second
#define pb push_back
#define pii pair<int, int>
#define fast \
ios_base::sync_with_stdio(0); ... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 384 |
#include <bits/stdc++.h>
#include <cmath>
#define ll long long
#define pb push_back
#define mp make_pair
#define vi vector<int>
#define vl vector<int>
#define endl "\n"
#define allb(x) sort((x).begin(), (x).end())
#define allg(x) sort((x).begin(), (x).end(), greater<int>())
using namespace std;
const ll M = 1e9 + 7;
l... | #include <bits/stdc++.h>
#include <cmath>
#define ll long long
#define pb push_back
#define mp make_pair
#define vi vector<int>
#define vl vector<int>
#define endl "\n"
#define allb(x) sort((x).begin(), (x).end())
#define allg(x) sort((x).begin(), (x).end(), greater<int>())
using namespace std;
const ll M = 1e9 + 7;
l... | [["+", 0, 57, 64, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 79], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 18]] | 1 | 522 |
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int n;
cin >> n;
vector<int> d1(n), d2(n);
for (int i = 0; i < n; i += 1) {
cin >> d1[i] >> d2[i];
}
bool ans = false;
for (int i = 1; i < n - 1;... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int n;
cin >> n;
vector<int> d1(n), d2(n);
for (int i = 0; i < n; i += 1) {
cin >> d1[i] >> d2[i];
}
bool ans = false;
for (int i = 1; i < n - 1;... | [["-", 51, 16, 31, 16, 12, 16, 12, 69, 28, 22], ["+", 51, 16, 31, 16, 12, 16, 12, 69, 28, 22]] | 1 | 191 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int a[n][n];
for (int i = 0; i < n; i++) {
cin >> a[i][0];
cin >> a[i][1];
}
int count = 0;
for (int i = 0; i < n; i++) {
if (a[i][0] == a[i][1])
count++;
else
count = 0;
if (count == 3) {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int a[n][n];
for (int i = 0; i < n; i++) {
cin >> a[i][0];
cin >> a[i][1];
}
int count = 0;
for (int i = 0; i < n; i++) {
if (a[i][0] == a[i][1])
count++;
else
count = 0;
if (count == 3) {
... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 149 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int arr[n][2];
int f = 0;
for (int i = 0; i < n; i++) {
cin >> arr[i][0];
cin >> arr[i][1];
}
for (int i = 0; i < n - 3; i++) {
if (arr[i][0] == arr[i][1] && arr[i + 1][0] == arr[i + 1][1] &&
arr[i + 1][0] == a... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int arr[n][2];
int f = 0;
for (int i = 0; i < n; i++) {
cin >> arr[i][0];
cin >> arr[i][1];
}
for (int i = 0; i < n - 2; i++) {
if (arr[i][0] == arr[i][1] && arr[i + 1][0] == arr[i + 1][1] &&
arr[i + 2][0] == a... | [["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13], ["-", 31, 69, 28, 69, 341, 342, 0, 16, 12, 13], ["+", 31, 69, 28, 69, 341, 342, 0, 16, 12, 13], ["-", 12, 69, 28, 69, 341, 342, 0, 16, 12, 13], ["+", 12, 69, 28, 69, 341, 342, 0, 16, 12, 13], ["+", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35], [... | 1 | 174 |
#include <bits/stdc++.h>
#pragma GCC optimize("O999")
//示例:#define ll long long
// unsigned long long ;
const int INF = 0x3f3f3f3f;
const int maxn = 50000005;
using namespace std;
int main() {
// freopen(".in", "r",stdin );
// freopen(".out","w",stdout);
ios::sync_with_stdio(0);
int n;
cin >> n;
int a[n + ... | #include <bits/stdc++.h>
#pragma GCC optimize("O999")
//示例:#define ll long long
// unsigned long long ;
const int INF = 0x3f3f3f3f;
const int maxn = 50000005;
using namespace std;
int main() {
// freopen(".in", "r",stdin );
// freopen(".out","w",stdout);
ios::sync_with_stdio(0);
int n;
cin >> n;
int a[n + ... | [["-", 0, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 0, 9, 0, 57, 15, 339, 51, 16, 17, 20], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 158 |
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
from math import gcd
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, ... | from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
from math import gcd
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, ... | [["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 60], ["+", 8, 196, 0, 57, 15, 679, 31, 679, 17, 355], ["+", 0, 7, 8, 196, 0, 57, 15, 679, 17, 355]] | 5 | 371 |
N=int(input())
x=[]
for i in range(N):
x.append(list(map(int,input().split())))
for i in range(N-2):
if x[i][0]==x[i][1] and x[i+1][0]==x[i+1][1] and x[i+2][0]==x[i+2][1]:
print("Yes")
break
else:
print("No")
break | N=int(input())
x=[]
for i in range(N):
x.append(list(map(int,input().split())))
for i in range(N-2):
if x[i][0]==x[i][1] and x[i+1][0]==x[i+1][1] and x[i+2][0]==x[i+2][1]:
print("Yes")
break
else:
print("No") | [["-", 0, 57, 75, 76, 8, 196, 0, 93, 0, 94]] | 5 | 123 |
N = int(input())
D = []
for i in range(N):
a = list(map(int,input().split()))
if(a[0] == a[1]):
D.append(1)
else:
D.append(0)
for i in range(N-2):
if D[i] == D[i+1] == D[i+2] == 1:
tf = 1
if tf == 1:
print("Yes")
else:
print("No") | N = int(input())
D = []
for i in range(N):
a = list(map(int,input().split()))
if(a[0] == a[1]):
D.append(1)
else:
D.append(0)
tf = 0
for i in range(N-2):
if D[i] == D[i+1] == D[i+2] == 1:
tf = 1
if tf == 1:
print("Yes")
else:
print("No") | [["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612]] | 5 | 118 |
a = gets.to_i
cnt = 0
a.times {
d1, d2 = gets.chomp.split(" ").map(&:to_i);
d1 == d2 ? cnt += 1 : cnt = 0
if cnt >= 3
return p "Yes"
end
}
puts "No" | a = gets.to_i
cnt = 0
a.times {
d1, d2 = gets.chomp.split(" ").map(&:to_i);
d1 == d2 ? cnt += 1 : cnt = 0
if cnt >= 3
return puts "Yes"
end
}
puts "No" | [["-", 64, 749, 0, 38, 0, 4, 0, 652, 735, 22], ["+", 64, 749, 0, 38, 0, 4, 0, 652, 735, 22]] | 4 | 59 |
n = int(input())
z = []
y = 0
for i in range(n):
line = input().split(" ")
if int(line[0])==int(line[1]):
z.append(i)
for i in range(n-3):
if z[i]==z[i+1]-1:
if z[i+1]==z[i+2]-1:
y += 1
if y > 0:
print("Yes")
else:
print("No")
| n = int(input())
z = []
y = 0
for i in range(n):
line = input().split(" ")
if int(line[0])==int(line[1]):
z.append(i)
for i in range(len(z)-2):
if z[i]==z[i+1]-1:
if z[i+1]==z[i+2]-1:
y += 1
if y > 0:
print("Yes")
else:
print("No") | [["-", 0, 7, 12, 652, 3, 4, 0, 657, 31, 22], ["+", 12, 652, 3, 4, 0, 657, 31, 652, 63, 22], ["+", 3, 4, 0, 657, 31, 652, 3, 4, 0, 24], ["+", 3, 4, 0, 657, 31, 652, 3, 4, 0, 22], ["+", 3, 4, 0, 657, 31, 652, 3, 4, 0, 25], ["-", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 122 |
n=int(input())
flag=0
for i in range(n):
d1,d2=map(int,input().split())
if d1==d2:
flag+=1
if flag==3:
ans=1
else:
flag=0
if ans!=1:
print("No")
else:
print("Yes")
| n=int(input())
flag=0
ans=0
for i in range(n):
d1,d2=map(int,input().split())
if d1==d2:
flag+=1
if flag==3:
ans=1
else:
flag=0
if ans!=1:
print("No")
else:
print("Yes")
| [["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612]] | 5 | 75 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ff first
#define ss second
#define pb push_back
#define clr(a) memset(a, 0, sizeof(a))
#define reset(a) memset(a, -1, sizeof(a))
#define mod 1000000007
#define pi acos(-1)
#define fastio ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ff first
#define ss second
#define pb push_back
#define clr(a) memset(a, 0, sizeof(a))
#define reset(a) memset(a, -1, sizeof(a))
#define mod 1000000007
#define pi acos(-1)
#define fastio ... | [["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 228 |
n = int(input())
d1d2 = [map(int, input().split()) for _ in range(n)]
d1, d2 = [list(i) for i in zip(*d1d2)]
count = 0
for i in range(n):
if d1[i] == d2[i] and d1[i+1] == d2[i+1] and d1[i+2] == d2[i+2]:
count += 1
if count > 0:
print("Yes")
else:
print("No") | n = int(input())
d1d2 = [map(int, input().split()) for _ in range(n)]
d1, d2 = [list(i) for i in zip(*d1d2)]
count = 0
for i in range(n-2):
if d1[i] == d2[i] and d1[i+1] == d2[i+1] and d1[i+2] == d2[i+2]:
count += 1
if count > 0:
print("Yes")
else:
print("No") | [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 33], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 121 |
n = int(input())
d = []
for i in range(n) :
input_line = list(map(int, input().split(" ")))
d.append(input_line)
count = 0
answer = "no"
for i in range(n) :
if d[i][0] == d[i][1] :
count += 1
if count > 1 :
answer = "yes"
else :
count = 0
if answer == "yes" :
... |
n = int(input())
d = []
for i in range(n) :
input_line = list(map(int, input().split(" ")))
d.append(input_line)
count = 0
answer = "no"
for i in range(n) :
if d[i][0] == d[i][1] :
count += 1
if count > 2 :
answer = "yes"
else :
count = 0
if answer == "yes" :
... | [["-", 0, 57, 64, 196, 0, 57, 15, 666, 0, 612], ["+", 0, 57, 64, 196, 0, 57, 15, 666, 0, 612]] | 5 | 118 |
n = int(input())
d = [input().split(" ") for _ in range(n)]
f = False
for i in range(n-2):
if d[i][0] == d[i][1] or not f :
if d[i+1][0] == d[i+1][1] and d[i+2][0] == d[i+2][1]:
f = True
if f:
print("Yes")
else:
print("No") | n = int(input())
d = [input().split(" ") for _ in range(n)]
f = False
for i in range(n-2):
if d[i][0] == d[i][1] and not f :
if d[i+1][0] == d[i+1][1] and d[i+2][0] == d[i+2][1]:
f = True
if f:
print("Yes")
else:
print("No") | [["-", 0, 7, 8, 196, 0, 57, 15, 679, 17, 354], ["+", 0, 7, 8, 196, 0, 57, 15, 679, 17, 355]] | 5 | 123 |
N=int(input())
j=0
for i in range(N):
D1,D2=map(int,input().split())
if D1==D2:
j+=1
if j>=3:
J=3
else:
j=0
if J>=3:
print('Yes')
else:
print('No') | N=int(input())
j=0
J=0
for i in range(N):
D1,D2=map(int,input().split())
if D1==D2:
j+=1
if j>=3:
J=3
else:
j=0
if J>=3:
print('Yes')
else:
print('No') | [["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612]] | 5 | 75 |
N=int(input())
count=0
for i in range(N):
a,b=map(int,input().split())
if a==b:
count+=1
if count==3:
print("Yes")
exit()
else:
pass
if a!=b:
count==0
if count!=3:
print('No')
| N=int(input())
count=0
for i in range(N):
a,b=map(int,input().split())
if a==b:
count+=1
if count==3:
print("Yes")
exit()
else:
pass
else :
count=0
if count !=3:
print('No') | [["-", 0, 656, 0, 7, 8, 196, 0, 57, 0, 121], ["-", 0, 7, 8, 196, 0, 57, 15, 666, 0, 22], ["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 79], ["+", 0, 7, 8, 196, 0, 57, 75, 76, 0, 95], ["-", 0, 57, 64, 196, 0, 1, 0, 666, 667, 60], ["+", 75, 76, 8, 196, 0, 1, 0, 662, 0, 32]] | 5 | 79 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int cnt = 0, a, b;
while (n--) {
cin >> a >> b;
if (a == b)
cnt++;
if (cnt == 1 || cnt == 3) {
if (a != b)
cnt = 0;
}
}
if (cnt >= 3)
cout << "Yes";
else
cout << "No";
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int cnt = 0, a, b;
while (n--) {
cin >> a >> b;
if (a == b)
cnt++;
if (cnt == 1 || cnt == 2) {
if (a != b)
cnt = 0;
}
}
if (cnt >= 3)
cout << "Yes";
else
cout << "No";
return 0;
} | [["-", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 94 |
#include <bits/stdc++.h>
#define fi first
#define se second
using namespace std;
pair<int, int> d[105];
bool oke(int pos) {
if (d[pos].fi == d[pos].se && d[pos + 1].fi == d[pos + 1].se &&
d[pos + 2].fi == d[pos + 2].se)
return true;
return false;
}
int main() {
int n;
cin >> n;
for (int i = 1; i ... | #include <bits/stdc++.h>
#define fi first
#define se second
using namespace std;
pair<int, int> d[105];
bool oke(int pos) {
if (d[pos].fi == d[pos].se && d[pos + 1].fi == d[pos + 1].se &&
d[pos + 2].fi == d[pos + 2].se)
return true;
return false;
}
int main() {
int n;
cin >> n;
for (int i = 1; i ... | [["-", 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 | 179 |
#include <iostream>
using namespace std;
int main() {
int N;
int counter = 0;
int D1, D2;
cin >> N;
for (int i = 0; i < N; i++) {
cin >> D1 >> D2;
if (D1 == D2) {
counter++;
} else {
counter = 0;
}
if (counter == 3)
cout << "Yes" << endl;
break;
}
cout << "No" <<... | #include <iostream>
using namespace std;
int main() {
int N;
int counter = 0;
int D1, D2;
cin >> N;
for (int i = 0; i < N; i++) {
cin >> D1 >> D2;
if (D1 == D2) {
counter++;
} else {
counter = 0;
}
if (counter == 3) {
cout << "Yes" << endl;
return 0;
}
}
co... | [["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 45], ["-", 8, 9, 0, 7, 8, 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], ["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46]] | 1 | 93 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, s = 0, t = 0, a, b;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> a >> b;
if (a == b) {
s++;
}
else {
if (s > t) {
t = s;
}
s = 0;
}
}
if (t >= 3) {
cout << "Yes" << endl;
} else {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, s = 0, t = 0, a, b;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> a >> b;
if (a == b) {
s++;
}
else {
if (s >= t) {
t = s;
}
s = 0;
}
}
if (t >= 3 || s >= 3) {
cout << "Yes" << endl;
}... | [["-", 0, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 0, 9, 0, 57, 15, 339, 51, 16, 17, 20], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 20], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22]] | 1 | 113 |
import sys
n = int(input())
d1 = []
d2 = []
for i in range(n):
t,u = map(int,input().split())
d1.append(t)
d2.append(u)
c = 0
for i in range(n):
if d1[i] == d2[i]:
c += 1
else:
c == 0
if c == 3:
print("Yes")
sys.exit()
print("No") | import sys
n = int(input())
d1 = []
d2 = []
for i in range(n):
t,u = map(int,input().split())
d1.append(t)
d2.append(u)
c = 0
for i in range(n):
if d1[i] == d2[i]:
c += 1
else:
c = 0
if c == 3:
print("Yes")
sys.exit()
print("No") | [["-", 75, 76, 8, 196, 0, 1, 0, 666, 667, 60], ["+", 75, 76, 8, 196, 0, 1, 0, 662, 0, 32]] | 5 | 106 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <utility>
#include <vector>
#define inf 0x3f3f3f3f
#define lowbit(x) (x & -x)
typedef long long ll;
const int maxn = 1e5 + 5;
const int mod = 1e9 + 7;
... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <utility>
#include <vector>
#define inf 0x3f3f3f3f
#define lowbit(x) (x & -x)
typedef long long ll;
const int maxn = 1e5 + 5;
const int mod = 1e9 + 7;
... | [["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 217 |
n = int(input())
a = []
for i in range(n):
d,e = map(int,input().split())
a.append([d,e])
b = []
for i in range(n):
if a[i][0] == a[i][1]:
b.append(1)
else:
b.append(0)
c = 0
for i in range(n):
if b[i] == 1 and b[i+1] == 1 and b[i+2] == 1:
c = 1
break
if c == 1:
... | n = int(input())
a = []
for i in range(n):
d,e = map(int,input().split())
a.append([d,e])
b = []
for i in range(n):
if a[i][0] == a[i][1]:
b.append(1)
else:
b.append(0)
c = 0
for i in range(n-2):
if b[i] == 1 and b[i+1] == 1 and b[i+2] == 1:
c = 1
break
if c == 1... | [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 33], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 149 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
try (Scanner sc = new Scanner(System.in)) {
int N = Integer.parseInt(sc.next());
int count = 0;
String result = "No";
for (int i = 0; i < N; i++) {
int d1 = Integer.parseInt(sc.next());
... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
try (Scanner sc = new Scanner(System.in)) {
int N = Integer.parseInt(sc.next());
int count = 0;
String result = "No";
for (int i = 0; i < N; i++) {
int d1 = Integer.parseInt(sc.next());
... | [["-", 64, 196, 0, 1, 0, 11, 12, 5, 0, 491], ["+", 64, 196, 0, 1, 0, 11, 12, 5, 0, 491]] | 3 | 152 |
N=int(input())
D=[list(map(int, input().split())) for i in range(N)]
count=0
for j in range(N-2):
if D[j][0]==D[j][1]:
if D[j+1][0]==D[j+1][1]:
if D[j+2][0]==D[j+2][1]:
count = 1
if count==0:
print('NO')
else:
print('Yes') | N=int(input())
D=[list(map(int, input().split())) for i in range(N)]
count=0
for j in range(N-2):
if D[j][0]==D[j][1]:
if D[j+1][0]==D[j+1][1]:
if D[j+2][0]==D[j+2][1]:
count = 1
if count==0:
print('No')
else:
print('Yes') | [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 128 |
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define in insert
#define PI 3.1415926535897932384626433832795
#define F first
#define S second
#define aLL(str) (str).begin(), (str).end()
#define IOS \
ios::sync_with_stdio(0); ... | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define in insert
#define PI 3.1415926535897932384626433832795
#define F first
#define S second
#define aLL(str) (str).begin(), (str).end()
#define IOS \
ios::sync_with_stdio(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 | 423 |
N=int(input()) #縦2列
XY=[map(int, input().split()) for _ in range(N)]
X,Y=[list(i) for i in zip(*XY)]
ans="no"
for j in range(0,N-2):
if X[j]==Y[j] and X[j+1]==Y[j+1] and X[j+2]==Y[j+2]:
ans="Yes"
break
print(ans) | N=int(input()) #縦2列
XY=[map(int, input().split()) for _ in range(N)]
X,Y=[list(i) for i in zip(*XY)]
ans="No"
for j in range(0,N-2):
if X[j]==Y[j] and X[j+1]==Y[j+1] and X[j+2]==Y[j+2]:
ans="Yes"
break
print(ans) | [["-", 0, 656, 0, 1, 0, 662, 12, 557, 0, 6], ["+", 0, 656, 0, 1, 0, 662, 12, 557, 0, 6]] | 5 | 116 |
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class Main {
void solve(Scanner in, PrintWriter out) {
int t = in.nextInt();
int cpt = 0;
for (int i = 0; i < t - 1; ++i) {
int a1 = in.nextInt();
int b1 = i... | import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class Main {
void solve(Scanner in, PrintWriter out) {
int t = in.nextInt();
int cpt = 0;
for (int i = 0; i < t; ++i) {
int a1 = in.nextInt();
int b1 = in.ne... | [["-", 8, 196, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 8, 196, 0, 7, 15, 16, 12, 16, 12, 499], ["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["-", 64, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 64, 1, 0, 492, 3, 4, 0, 5, 0, 491]] | 3 | 203 |
#include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define mod 1000000007
#define pi acos(-1.0)
#define test \
int t; \
cin >> t; ... | #include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define mod 1000000007
#define pi acos(-1.0)
#define test \
int t; \
cin >> t; ... | [["-", 8, 9, 0, 57, 15, 339, 51, 11, 17, 32], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 0, 57, 64, 9, 0, 57, 15, 339, 0, 24], ["+", 0, 57, 15, 339, 51, 16, 31, 23, 0, 25], ["+", 0, 57, 15, 339, 51, 16, 12, 23, 0, 24], ["+", 0, 57, 15, 339, 51, 16, 12, 23, 0, 25]] | 1 | 220 |
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
const int mod = 998244353;
const int N = 1e5 + 5;
int main() {
ios::sync_with_stdio(false);
cout.tie(NULL);
int n;
cin >> n;
int f = 0, t = 0;
for (int i = 1; i <= n; i++) {
int a, b;
cin >> a >> b;
if (a == b) {
t++;
... | #include <bits/stdc++.h>
typedef long long ll;
using namespace std;
const int mod = 998244353;
const int N = 1e5 + 5;
int main() {
ios::sync_with_stdio(false);
cout.tie(NULL);
int n;
cin >> n;
int f = 0, t = 0;
for (int i = 1; i <= n; i++) {
int a, b;
cin >> a >> b;
if (a == b) {
t++;
... | [["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 20], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 141 |
#include <algorithm>
#include <assert.h>
#include <bitset>
#include <chrono>
#include <cstdio>
#include <ctime>
#include <ctype.h>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <r... | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <chrono>
#include <cstdio>
#include <ctime>
#include <ctype.h>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <r... | [["+", 0, 57, 15, 339, 51, 16, 31, 69, 28, 22], ["+", 15, 339, 51, 16, 31, 69, 341, 342, 0, 70], ["+", 15, 339, 51, 16, 31, 69, 341, 342, 0, 22], ["+", 15, 339, 51, 16, 31, 69, 341, 342, 0, 73], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98]] | 1 | 291 |
#include <bits/stdc++.h>
#define fi first
#define se second
#define mp make_pair
#define For(i, a, b) for (long long i = a; i < b; i++)
#define pb push_back
using namespace std;
typedef long long ll;
ll power(ll x, ll y, ll p) {
ll res = 1;
x = x % p;
while (y > 0) {
if (y & 1) {
res = (res * x) % p;
... | #include <bits/stdc++.h>
#define fi first
#define se second
#define mp make_pair
#define For(i, a, b) for (long long i = a; i < b; i++)
#define pb push_back
using namespace std;
typedef long long ll;
ll power(ll x, ll y, ll p) {
ll res = 1;
x = x % p;
while (y > 0) {
if (y & 1) {
res = (res * x) % p;
... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 363 |
# -*- coding: utf-8 -*-
"""
Created on Sat Sep 19 13:06:46 2020
@author: Admin
"""
n=int(input())
l=[]
flag=0
for i in range(n):
a,b=input().split()
w=[int(a),int(b)]
l.append(w)
for i in range(len(l)-2):
if l[i][0]==l[i][1] and l[i+1][0]==l[i+1][1] and l[i+2][0]==l[i+2][1]:
print('yes')
... | # -*- coding: utf-8 -*-
"""
Created on Sat Sep 19 13:06:46 2020
@author: Admin
"""
n=int(input())
l=[]
flag=0
for i in range(n):
a,b=input().split()
w=[int(a),int(b)]
l.append(w)
for i in range(len(l)-2):
if l[i][0]==l[i][1] and l[i+1][0]==l[i+1][1] and l[i+2][0]==l[i+2][1]:
print('Yes')
... | [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 148 |
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define Go_ \
ios_base::sync_with_stdio(false); \
cin.... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define Go_ \
ios_base::sync_with_stdio(false); \
cin.... | [["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 458 |
#include <bits/stdc++.h>
#define FAST \
ios_base::sync_with_stdio(false); \
cin.tie(nullptr);
#define ll long long int
#define f(i, a, b) for (int i = a; i < b; i++)
#define fr(i, a, b) for (int i = a; i >= ... | #include <bits/stdc++.h>
#define FAST \
ios_base::sync_with_stdio(false); \
cin.tie(nullptr);
#define ll long long int
#define f(i, a, b) for (int i = a; i < b; i++)
#define fr(i, a, b) for (int i = a; i >= ... | [["-", 64, 9, 0, 52, 15, 339, 51, 27, 17, 68], ["+", 0, 52, 8, 9, 0, 1, 0, 27, 28, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 27, 17, 68], ["+", 64, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 1 | 252 |
#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;
typedef tree<int, null_type, less_equal<int>, rb_tree_tag,
tree_order_statistics_node_update>
ordered_set;
const int MAX_N = 1e5 + 5;
const int MAX_... | #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;
typedef tree<int, null_type, less_equal<int>, rb_tree_tag,
tree_order_statistics_node_update>
ordered_set;
const int MAX_N = 1e5 + 5;
const int MAX_... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 306 |
doubletCount = 0
cases = int(input())
for roll in range(cases):
d1, d2 = map(int, input().split())
if d1 == d2:
doubletCount += 1
else:
doubleCount = 0
if doubletCount >= 3:
print("Yes")
break
if roll == cases - 1:
print("No") | doubletCount = 0
cases = int(input())
for roll in range(cases):
d1, d2 = map(int, input().split())
if d1 == d2:
doubletCount += 1
else:
doubletCount = 0
if doubletCount >= 3:
print("Yes")
break
if roll == cases - 1:
print("No") | [["-", 75, 76, 8, 196, 0, 1, 0, 662, 31, 22], ["+", 75, 76, 8, 196, 0, 1, 0, 662, 31, 22]] | 5 | 73 |
def input_int():
return(int(input()))
def input_int_list():
return(list(map(int,input().split())))
def input_int_map():
return(map(int,input().split()))
def run():
q_num = input_int()
count_num = 0
for _ in range(q_num):
a, b = input_int_map()
if a == b:
count... |
def input_int():
return(int(input()))
def input_int_list():
return(list(map(int,input().split())))
def input_int_map():
return(map(int,input().split()))
def run():
q_num = input_int()
count_num = 0
for _ in range(q_num):
a, b = input_int_map()
if a == b:
count... | [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 119 |
/*
**
** author: Blue Fire
** created: 19/09/2020
**
*/
#include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <iter... | /*
**
** author: Blue Fire
** created: 19/09/2020
**
*/
#include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <iter... | [["-", 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 | 157 |
n=int(input())
count=0
ren=0
for i in range(n):
a,b=map(int,input().split())
if a==b and count<3:
count+=1
ren=1
else:
count=0
if count>=3:
print("Yes")
else:
print("No") | n=int(input())
count=0
ren=0
for i in range(n):
a,b=map(int,input().split())
if a==b:
if count<3:
count+=1
ren=1
elif count<3:
count=0
if count>=3:
print("Yes")
else:
print("No") | [["-", 0, 7, 8, 196, 0, 57, 15, 679, 17, 355], ["+", 0, 656, 0, 7, 8, 196, 0, 57, 0, 102], ["+", 8, 196, 0, 57, 64, 196, 0, 57, 0, 121], ["-", 0, 7, 8, 196, 0, 57, 75, 76, 0, 95], ["+", 0, 7, 8, 196, 0, 57, 75, 665, 0, 683], ["+", 8, 196, 0, 57, 75, 665, 15, 666, 0, 22], ["+", 8, 196, 0, 57, 75, 665, 15, 666, 667, 18],... | 5 | 77 |
//インクルード(アルファベット順)
#include <algorithm> //sort,二分探索,など
#include <bitset> //固定長bit集合
#include <cmath> //pow,logなど
#include <complex> //複素数
#include <deque> //両端アクセスのキュー
#include <functional> //sortのgreater
#include <iomanip> //setprecision(浮動小数点の出力の誤差)
#include <iostream> /... | //インクルード(アルファベット順)
#include <algorithm> //sort,二分探索,など
#include <bitset> //固定長bit集合
#include <cmath> //pow,logなど
#include <complex> //複素数
#include <deque> //両端アクセスのキュー
#include <functional> //sortのgreater
#include <iomanip> //setprecision(浮動小数点の出力の誤差)
#include <iostream> /... | [["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 75, 76, 0, 9, 0, 1, 0, 16, 17, 60], ["+", 75, 76, 0, 9, 0, 1, 0, 11, 17, 32]] | 1 | 162 |
n=int(input())
ans=0
for _ in range(n):
a,b=map(int,input().split())
if a==b:
ans+=1
if ans==3:
break
else:
n=0
if ans==3:
print("Yes")
else:
print("No") | n=int(input())
ans=0
for _ in range(n):
a,b=map(int,input().split())
if a==b:
ans+=1
if ans==3:
break
else:
ans=0
if ans==3:
print("Yes")
else:
print("No") | [["-", 75, 76, 8, 196, 0, 1, 0, 662, 31, 22], ["+", 75, 76, 8, 196, 0, 1, 0, 662, 31, 22]] | 5 | 73 |
import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int[] x = new int[N];
int[] y = new int[N];
int maxc = 0;
int c = 0;
for (int i = 0; i < N; i++) {
x[i] = sc.nextInt();
... | import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int[] x = new int[N];
int[] y = new int[N];
int maxc = 0;
int c = 0;
for (int i = 0; i < N; i++) {
x[i] = sc.nextInt();
... | [["+", 0, 7, 8, 196, 0, 57, 64, 196, 0, 45], ["+", 0, 7, 8, 196, 0, 57, 64, 196, 0, 46], ["-", 0, 57, 75, 196, 0, 1, 0, 11, 12, 499], ["+", 0, 57, 75, 196, 0, 1, 0, 11, 12, 499]] | 3 | 186 |
n = int(input())
t = []
i = 0
for _ in range(n):
x, y = map(int, input().split())
if x == y:
i += 1
else:
i = 0
t.append(i)
if(len(filter(lambda x: x >= 3, t)) == 0):
print("No")
else:
print("Yes")
| n = int(input())
t = []
i = 0
for _ in range(n):
x, y = map(int, input().split())
if x == y:
i += 1
else:
i = 0
t.append(i)
if(len(list(filter(lambda x: x >= 3, t))) == 0):
print("No")
else:
print("Yes")
| [["+", 0, 666, 0, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 92 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int a, b;
int c = 0;
bool f = false;
while (n--) {
cin >> a >> b;
if (a == b)
c++;
else
c = 0;
if (c >= 3)
f = true;
}
if (f)
cout << "YES";
else
cout << "NO";
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int a, b;
int c = 0;
bool f = false;
while (n--) {
cin >> a >> b;
if (a == b)
c++;
else
c = 0;
if (c >= 3)
f = true;
}
if (f)
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 | 88 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int a, b, count = 0;
string s;
s = "NO";
for (int i = 0; i < n; i++) {
cin >> a >> b;
if (a == b)
count++;
else
count = 0;
if (count == 3)
s = "YES";
}
cout << s;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int a, b, count = 0;
string s;
s = "No";
for (int i = 0; i < n; i++) {
cin >> a >> b;
if (a == b)
count++;
else
count = 0;
if (count == 3)
s = "Yes";
}
cout << s;
return 0;
} | [["-", 8, 9, 0, 1, 0, 11, 12, 5, 0, 6], ["+", 8, 9, 0, 1, 0, 11, 12, 5, 0, 6], ["-", 0, 57, 64, 1, 0, 11, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 11, 12, 5, 0, 6]] | 1 | 92 |
N = gets.to_i
D = N.times.map{gets.split.map(&:to_i)}
count = 0
N.times do |i|
if D[i][0] == D[i][1]
if D[i+1][0] == D[i+1][1]
if D[i+2][0] == D[i+2][1]
count += 1
end
end
end
end
if count > 0
puts "Yes"
else
puts "No"
end | N = gets.to_i
D = N.times.map{gets.split.map(&:to_i)}
count = 0
(N-2).times do |i|
if D[i][0] == D[i][1]
if D[i+1][0] == D[i+1][1]
if D[i+2][0] == D[i+2][1]
count += 1
end
end
end
end
if count > 0
puts "Yes"
else
puts "No"
end | [["+", 36, 36, 0, 493, 0, 652, 486, 739, 0, 24], ["+", 0, 493, 0, 652, 486, 739, 0, 738, 17, 33], ["+", 0, 493, 0, 652, 486, 739, 0, 738, 12, 612], ["+", 36, 36, 0, 493, 0, 652, 486, 739, 0, 25]] | 4 | 110 |
/* Everything happens for a reason.
Be patient, things will be at their rightful place.
It was meant to happen this way, accept it.
And now decide what you can do about it.
*/
#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define pb push_back
#define ip pair<ll, ll>
#define vii vector<ll>
#define... | /* Everything happens for a reason.
Be patient, things will be at their rightful place.
It was meant to happen this way, accept it.
And now decide what you can do about it.
*/
#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define pb push_back
#define ip pair<ll, ll>
#define vii vector<ll>
#define... | [["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["-", 12, 118, 28, 69, 341, 342, 0, 16, 12, 13], ["+", 12, 118, 28, 69, 341, 342, 0, 16, 12, 13]] | 1 | 621 |
n=int(input())
l=[list(map(int,input().split())) for _ in range(n)]
f=[]
for x in l:
f.append(x[0]==x[1])
l=f.copy()
i=0
while i<n:
j=0
while i+j<n and l[i+j]==l[i]:
j+=1
if j>2:
print('Yes')
break
i+=j
else:
print('No')
| n=int(input())
l=[list(map(int,input().split())) for _ in range(n)]
f=[]
for x in l:
f.append(x[0]==x[1])
l=f.copy()
i=0
while i<n:
j=1
while i+j<n and l[i+j]==l[i] and l[i]:
j+=1
if j>2:
print('Yes')
break
i+=j
else:
print('No')
| [["-", 0, 52, 8, 196, 0, 1, 0, 662, 12, 612], ["+", 0, 52, 8, 196, 0, 1, 0, 662, 12, 612], ["+", 15, 679, 31, 679, 12, 666, 0, 206, 51, 22], ["+", 15, 679, 31, 679, 12, 666, 0, 206, 0, 70], ["+", 15, 679, 31, 679, 12, 666, 0, 206, 206, 22], ["+", 15, 679, 31, 679, 12, 666, 0, 206, 0, 73], ["+", 0, 52, 8, 196, 0, 52, 15... | 5 | 120 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.