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>
#define ff first
#define ss second
#define pb push_back
#define pf push_front
#define eb emplace_back
#define emp emplace
#define ins insert
#define mp make_pair
#define mt make_tuple
#define sz(s) (int)s.size()
#define forp(i, a, b) for (int i = a; i <= b; i++)
#define rep(i, n) for (int i = 0... | #include <bits/stdc++.h>
#define ff first
#define ss second
#define pb push_back
#define pf push_front
#define eb emplace_back
#define emp emplace
#define ins insert
#define mp make_pair
#define mt make_tuple
#define sz(s) (int)s.size()
#define forp(i, a, b) for (int i = a; i <= b; i++)
#define rep(i, n) for (int i = 0... | [["-", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 734 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
/*
*/
void test_case() {
string s;
cin >> s;
if (s.back() == 's')
s += "es";
else
s += "es";
cout << s << endl;
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int t;
t = 1;
// cin >> t;
while (t--)
... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
/*
*/
void test_case() {
string s;
cin >> s;
if (s.back() == 's')
s += "es";
else
s += "s";
cout << s << endl;
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int t;
t = 1;
// cin >> t;
while (t--)
... | [["-", 75, 76, 0, 1, 0, 11, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 11, 12, 5, 0, 6]] | 1 | 97 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
template <typename T>
using oset =
tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
stri... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
template <typename T>
using oset =
tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
stri... | [["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 518 |
s = gets.chomp.chars
if s[-1] == "s"
s[-1] = "es"
puts s.join
else
s << "s"
puts s.join
end | s = gets.chomp.chars
if s[-1] == "s"
s << "es"
puts s.join
else
s << "s"
puts s.join
end | [["-", 0, 121, 64, 749, 0, 662, 31, 742, 0, 70], ["-", 64, 749, 0, 662, 31, 742, 0, 748, 17, 33], ["-", 64, 749, 0, 662, 31, 742, 0, 748, 439, 612], ["-", 0, 121, 64, 749, 0, 662, 31, 742, 0, 73], ["-", 0, 493, 0, 121, 64, 749, 0, 662, 0, 32], ["+", 0, 493, 0, 121, 64, 749, 0, 738, 17, 151]] | 4 | 41 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
if (s[s.size() - 1] == 's')
cout << s << "es";
else
cout << s << 's';
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
if (s[s.size() - 1] == 's')
cout << s << "es";
else
cout << s << 's';
return 0;
} | [["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 52 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
const int maxn = 1e6 + 5;
int main() {
string s;
cin >> s;
cout << s;
if (s.back())
cout << "es";
else
cout << "s";
return 0;
} | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
const int maxn = 1e6 + 5;
int main() {
string s;
cin >> s;
cout << s;
if (s.back() == 's')
cout << "es";
else
cout << "s";
return 0;
} | [["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 12, 103, 0, 104], ["+", 0, 57, 15, 339, 51, 16, 12, 103, 0, 125]] | 1 | 69 |
//#pragma GCC optimize "trapv"
//-D_GLIBCXX_DEBUG
#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 pm(m) \
for (auto itr = (m).begin(); itr !=... | //#pragma GCC optimize "trapv"
//-D_GLIBCXX_DEBUG
#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 pm(m) \
for (auto itr = (m).begin(); itr !=... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79], ["-", 0, 57, 15, 339, 51, 16, 12, 103, 0, 125], ["+", 0, 57, 15, 339, 51, 16, 12, 103, 0, 125]] | 1 | 154 |
#include <bits/stdc++.h>
#define ff first
#define ss second
#define pb push_back
#define ll long long
#define MX 100005
#define inf 1000000
#define mod 1000000007
#define endl "\n"
#define W(t) while (t--)
#define all(v) v.begin(), v.end()
#define ZERO(a) memset(a, 0, sizeof(a))
#define MINUS(a) memset(a, -1, sizeof(... | #include <bits/stdc++.h>
#define ff first
#define ss second
#define pb push_back
#define ll long long
#define MX 100005
#define inf 1000000
#define mod 1000000007
#define endl "\n"
#define W(t) while (t--)
#define all(v) v.begin(), v.end()
#define ZERO(a) memset(a, 0, sizeof(a))
#define MINUS(a) memset(a, -1, sizeof(... | [["-", 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 | 122 |
import java.util.*;
public class Main {
static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
String s = sc.nextLine();
String ans = "";
if (s.charAt(s.length() - 1) == 's') {
ans = ans + "es";
} else {
ans = ans + "s";
}
System.out.println(ans);
... | import java.util.*;
public class Main {
static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
String s = sc.nextLine();
String ans = s;
if (s.charAt(s.length() - 1) == 's') {
ans = ans + "es";
} else {
ans = ans + "s";
}
System.out.println(ans);
... | [["-", 8, 196, 0, 503, 49, 200, 51, 5, 0, 62], ["+", 0, 195, 8, 196, 0, 503, 49, 200, 51, 22]] | 3 | 98 |
#pragma GCC optimize("O3")
#include <bits/stdc++.h>
#define sp " "
#define endl "\n"
#define MAX 10e9
#define MAXN 100001
#define mod 1000000007
#define inf_int 2e9
#define inf_ll 2e18
#define e 1e-9
#define vi vector<int>
#define vl vector<ll>
#define vc vector<char>
#define vs vector<string>
#define vpl vector<pair<... | #pragma GCC optimize("O3")
#include <bits/stdc++.h>
#define sp " "
#define endl "\n"
#define MAX 10e9
#define MAXN 100001
#define mod 1000000007
#define inf_int 2e9
#define inf_ll 2e18
#define e 1e-9
#define vi vector<int>
#define vl vector<ll>
#define vc vector<char>
#define vs vector<string>
#define vpl vector<pair<... | [["-", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 341 |
a = str(input())
if a[-1] != 's':
print(a+'s')
else:
ans = a[:-1] + 'es'
print(ans) | a = str(input())
if a[-1] != 's':
print(a+'s')
else:
ans = a+ 'es'
print(ans) | [["-", 0, 1, 0, 662, 12, 657, 31, 206, 0, 70], ["-", 0, 662, 12, 657, 31, 206, 206, 663, 0, 102], ["-", 12, 657, 31, 206, 206, 663, 0, 664, 17, 33], ["-", 12, 657, 31, 206, 206, 663, 0, 664, 28, 612], ["-", 0, 1, 0, 662, 12, 657, 31, 206, 0, 73]] | 5 | 45 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
if (*S.end() == '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[S.size() - 1] == 's') {
cout << S << "es" << endl;
} else {
cout << S << "s" << endl;
}
} | [["-", 0, 57, 15, 339, 51, 16, 31, 66, 17, 48], ["+", 0, 57, 15, 339, 51, 16, 31, 69, 28, 22], ["+", 15, 339, 51, 16, 31, 69, 341, 342, 0, 70], ["-", 51, 16, 31, 66, 28, 2, 63, 118, 119, 120], ["+", 341, 342, 0, 16, 31, 2, 63, 118, 119, 120], ["+", 51, 16, 31, 69, 341, 342, 0, 16, 17, 33], ["+", 51, 16, 31, 69, 341, 34... | 1 | 57 |
n=input()
l=len(n)
if n[l-1]==s:
print(n+"es")
else:
print(n+"s") | n=input()
l=len(n)
if n[l-1]=="s":
print(n+"es")
else:
print(n+"s") | [["+", 0, 656, 0, 57, 15, 666, 0, 557, 0, 654], ["+", 0, 656, 0, 57, 15, 666, 0, 557, 0, 655]] | 5 | 39 |
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
string s;
cin >> s;
if (s.back() == 's') {
cout << s << 'es';
} else {
cout << s << 's';
}
return 0;
} | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
string s;
cin >> s;
if (s.back() == 's') {
cout << s << 'e' << 's';
} else {
cout << s << 's';
}
return 0;
} | [["+", 0, 1, 0, 16, 31, 16, 12, 103, 0, 104], ["+", 0, 57, 64, 9, 0, 1, 0, 16, 17, 151], ["+", 64, 9, 0, 1, 0, 16, 12, 103, 0, 104]] | 1 | 68 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, a[111][3];
cin >> n;
cin >> a[1][1] >> a[1][2] >> a[2][1] >> a[2][2];
for (int i = 3; i <= n; i++) {
cin >> a[i][1] >> a[i][2];
if (a[i][1] == a[i][2] && a[i - 1][1] == a[i - 1][2] &&
a[i - 2][2] == a[i - 2][1]) {
cout << "y... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, a[111][3];
cin >> n;
cin >> a[1][1] >> a[1][2] >> a[2][1] >> a[2][2];
for (int i = 3; i <= n; i++) {
cin >> a[i][1] >> a[i][2];
if (a[i][1] == a[i][2] && a[i - 1][1] == a[i - 1][2] &&
a[i - 2][2] == a[i - 2][1]) {
cout << "Y... | [["-", 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 | 170 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
static const auto _____ = []() {
// fast IO code : this I understand
ios::sync_with_stdio(false);
cout.tie(NULL);
cin.tie(0);
return 0;
}();
int main() {
int n;
cin >> n;
int a[2][n];
int cnt = 0;
int flag = 0;
for (int i = ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
static const auto _____ = []() {
// fast IO code : this I understand
ios::sync_with_stdio(false);
cout.tie(NULL);
cin.tie(0);
return 0;
}();
int main() {
int n;
cin >> n;
int a[n][2];
int cnt = 0;
int flag = 0;
for (int i = ... | [["-", 8, 9, 0, 43, 49, 80, 49, 80, 81, 13], ["+", 8, 9, 0, 43, 49, 80, 49, 80, 81, 22], ["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 22], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13]] | 1 | 176 |
#include <bits/stdc++.h>
using namespace std;
int main(void) {
int n, a, b;
cin >> n;
int count = 0;
for (int i = 0; i < n; i++) {
cin >> a >> b;
if (a == b)
count++;
else {
if (count >= 3) {
cout << "Yes";
return 0;
} else {
count = 0;
}
}
if ... | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int n, a, b;
cin >> n;
int count = 0;
for (int i = 0; i < n; i++) {
cin >> a >> b;
if (a == b)
count++;
else {
if (count >= 3) {
cout << "Yes";
return 0;
} else {
count = 0;
}
}
}
i... | [["+", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46], ["-", 0, 7, 8, 9, 0, 57, 64, 9, 0, 45], ["-", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46], ["-", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46]] | 1 | 108 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int a[100][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] &&
a[i + 2][0] == a[i + 2][1]) {
cou... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int a[100][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] &&
a[i + 2][0] == a[i + 2][1]) {
... | [["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 154 |
n = int(input())
ds1 = []
ds2 = []
for _ in range(n):
d1,d2 = list(map(int, input().split()))
ds1.append(d1)
ds2.append(d2)
matched = [d1 == d2 for d1,d2 in zip(ds1,ds2)]
cnt = 0
for m in matched:
cnt = cnt+1 if m else 0
if m == 3:
break
if cnt == 3:
print('Yes')
else:
print('No') | n = int(input())
ds1 = []
ds2 = []
for _ in range(n):
d1,d2 = list(map(int, input().split()))
ds1.append(d1)
ds2.append(d2)
matched = [d1 == d2 for d1,d2 in zip(ds1,ds2)]
cnt = 0
for m in matched:
cnt = cnt+1 if m else 0
if cnt == 3:
break
if cnt == 3:
print('Yes')
else:
print('No'... | [["-", 0, 7, 8, 196, 0, 57, 15, 666, 0, 22], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 0, 22]] | 5 | 115 |
N = int(input())
sub_yes = 0
max_yes = 0
for i in range(N):
d1,d2 = map(int,input().split())
if d1 == d2:
sub_yes += 1
if sub_yes > max_yes:
max_yes = sub_yes
else:
if sub_yes > max_yes:
max_yes = sub_yes
sub_yes = 0
if max_yes >= 3:
print("yes")
e... | N = int(input())
sub_yes = 0
max_yes = 0
for i in range(N):
d1,d2 = map(int,input().split())
if d1 == d2:
sub_yes += 1
if sub_yes > max_yes:
max_yes = sub_yes
else:
if sub_yes > max_yes:
max_yes = sub_yes
sub_yes = 0
if max_yes >= 3:
print("Yes")
e... | [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 86 |
cnt = 0
zorome = 0
num = input()
while cnt < num:
mass = input().split()
if(mass[0] == mass[1]):
zorome += 1
if(zorome >= 3):
break
else:
zorome = 0
cnt += 1
print("Yes" if zorome >= 3 else "No")
| cnt = 0
zorome = 0
num = int(input())
while cnt < num:
mass = input().split()
if(mass[0] == mass[1]):
zorome += 1
if(zorome >= 3):
break
else:
zorome = 0
cnt += 1
print("Yes" if zorome >= 3 else "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 | 71 |
N=input()
n=int(N)
x=0
for s in range(n):
ds1,ds2=input().split()
if ds1==ds2:
x+=1
else:
x==0
if x==3:
print("Yes")
break
else:
print("No")
| N=input()
n=int(N)
x=0
for s in range(n):
ds1,ds2=input().split()
if ds1==ds2:
x+=1
else:
x=0
if x==3:
print("Yes")
break
else:
print("No") | [["-", 75, 76, 8, 196, 0, 1, 0, 666, 667, 60], ["+", 75, 76, 8, 196, 0, 1, 0, 662, 0, 32]] | 5 | 66 |
#include <bits/stdc++.h>
//#include <windows.h>
using namespace std;
int main() {
int n, i;
cin >> n;
vector<int> a(n);
vector<int> b(n);
for (i = 0; i < n; i++) {
cin >> a[i] >> b[i];
}
for (i = 0; i < n; i++) {
if (a[i] == b[i]) {
if (a[i + 1] == b[i + 1]) {
if (a[i + 2] == b[i +... | #include <bits/stdc++.h>
//#include <windows.h>
using namespace std;
int main() {
int n, i;
cin >> n;
vector<int> a(n);
vector<int> b(n);
for (i = 0; i < n; i++) {
cin >> a[i] >> b[i];
}
for (i = 0; i < n - 2; i++) {
if (a[i] == b[i]) {
if (a[i + 1] == b[i + 1]) {
if (a[i + 2] == b... | [["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 155 |
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math")
#pragma GCC target("avx,avx2,fma")
#include <bits/stdc++.h>
#define f first
#define s second
#define fore(i, a, b) for (int i = (a), ThxMK = (b); i < ThxMK; ++i)
#define pb push_back
#define all(s) begin(s), end(s)
#define _ ... | #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math")
#pragma GCC target("avx,avx2,fma")
#include <bits/stdc++.h>
#define f first
#define s second
#define fore(i, a, b) for (int i = (a), ThxMK = (b); i < ThxMK; ++i)
#define pb push_back
#define all(s) begin(s), end(s)
#define _ ... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 191 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int cnt = 0;
for (int i = 0; i < n; i++) {
int a, b;
cin >> a >> b;
if (a == b) {
++cnt;
if (cnt == 3) {
cout << "YES\n";
return 0;
}
} else {
cnt = 0;
}
}
cout << "NO\n";
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int cnt = 0;
for (int i = 0; i < n; i++) {
int a, b;
cin >> a >> b;
if (a == b) {
++cnt;
if (cnt == 3) {
cout << "Yes\n";
return 0;
}
} else {
cnt = 0;
}
}
cout << "No\n";
... | [["-", 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 | 97 |
print('NYoe s'['111'in''.join(str(len({*t.split()}))for t in open(0))::2]) | print('NYoe s'['111'in''.join(str(len({*t.split()}))for t in open(0))[1:]::2]) | [["+", 0, 206, 206, 663, 0, 666, 0, 206, 0, 70], ["+", 206, 663, 0, 666, 0, 206, 206, 663, 0, 612], ["+", 206, 663, 0, 666, 0, 206, 206, 663, 0, 102], ["+", 0, 206, 206, 663, 0, 666, 0, 206, 0, 73]] | 5 | 42 |
n = int(input())
c, d = [], []
for i in range(n):
a, b = [int(i) for i in input().split()]
c.append(a)
d.append(b)
count = 1
for i in range(0, n):
if c[i] == d[i]:
count += 1
else:
count = 1
if count == 3:
break
if count == 3:
print('Yes')
else:
print('No')
| n = int(input())
c, d = [], []
for i in range(n):
a, b = [int(i) for i in input().split()]
c.append(a)
d.append(b)
count = 0
for i in range(0, n):
if c[i] == d[i]:
count += 1
else:
count = 0
if count == 3:
break
if count == 3:
print('Yes')
else:
print('No')
| [["-", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612], ["-", 75, 76, 8, 196, 0, 1, 0, 662, 12, 612], ["+", 75, 76, 8, 196, 0, 1, 0, 662, 12, 612]] | 5 | 114 |
#include <bits/stdc++.h>
#include <iostream>
#include <math.h>
#include <stdlib.h>
#define IOS \
ios_base::sync_with_stdio(false); \
cin.tie(0); ... | #include <bits/stdc++.h>
#include <iostream>
#include <math.h>
#include <stdlib.h>
#define IOS \
ios_base::sync_with_stdio(false); \
cin.tie(0); ... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 130 |
#include <bits/stdc++.h>
#define ll long long int
#define pb push_back
#define mp make_pair
#define pii pair<int, int>
#define vi vector<int>
#define vii vector<pair<int, int>>
#define mi map<int, int>
#define all(a) (a).begin(), (a).end()
#define F first
#define S second
#define sz(x) (int)x.size()
#define endl '\n'
... | #include <bits/stdc++.h>
#define ll long long int
#define pb push_back
#define mp make_pair
#define pii pair<int, int>
#define vi vector<int>
#define vii vector<pair<int, int>>
#define mi map<int, int>
#define all(a) (a).begin(), (a).end()
#define F first
#define S second
#define sz(x) (int)x.size()
#define endl '\n'
... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 106], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 98], ["-", 0, 9, 0, 57, 15, 339, 51, 16, 17, 106], ["+", 0, 9, 0, 57, 15, 339, 51, 16, 17, 98]] | 1 | 304 |
import java.io.*;
public class Main {
public static void main(String args[]) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine());
int i, c = 0, flag = 0;
String s = "";
for (i = 0; i < n; i++) {
s = br.readLin... | import java.io.*;
public class Main {
public static void main(String args[]) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine());
int i, c = 0, flag = 0;
String s = "";
for (i = 0; i < n; i++) {
s = br.readLin... | [["-", 64, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 64, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["-", 75, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 75, 1, 0, 492, 3, 4, 0, 5, 0, 491]] | 3 | 166 |
n=int(intpu())
flag=0
for i in range(n):
a=list(map(int,input().split()))
if a[0]==a[1]:
flag+=1
else:
flag=0
if flag==3:
break
if flag==3:
print("Yes")
else:
print("No") | n=int(input())
flag=0
for i in range(n):
a=list(map(int,input().split()))
if a[0]==a[1]:
flag+=1
else:
flag=0
if flag==3:
break
if flag==3:
print("Yes")
else:
print("No") | [["-", 0, 662, 12, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 662, 12, 652, 3, 4, 0, 652, 63, 22]] | 5 | 80 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<pair<int, int>> v(n);
for (int i = 0; i < n; i++) {
cin >> v[i].first >> v[i].second;
}
int cnt = 0;
int fcnt = 0;
for (int i = 0; i < n; i++) {
if (v[i].first == v[i].second) {
cnt++;
} else {
cnt... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<pair<int, int>> v(n);
for (int i = 0; i < n; i++) {
cin >> v[i].first >> v[i].second;
}
int cnt = 0;
int fcnt = 0;
for (int i = 0; i < n; i++) {
if (v[i].first == v[i].second) {
cnt++;
} else {
cnt... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 167 |
#import sys
#import numpy as np
import math
#from fractions import Fraction
import itertools
from collections import deque
from collections import Counter
import heapq
from math import gcd
#input=sys.stdin.readline
#import bisect
n=int(input())
cnt=0
for i in range(n):
x,y=map(int,input())
if x==y:
cnt+... | #import sys
#import numpy as np
import math
#from fractions import Fraction
import itertools
from collections import deque
from collections import Counter
import heapq
from math import gcd
#input=sys.stdin.readline
#import bisect
n=int(input())
cnt=0
for i in range(n):
x,y=map(int,input().split())
if x==y:
... | [["+", 12, 652, 3, 4, 0, 652, 63, 319, 0, 131], ["+", 12, 652, 3, 4, 0, 652, 63, 319, 319, 22], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25]] | 5 | 87 |
#include <iostream>
using namespace std;
int main() {
int n;
int d[110][2] = {};
cin >> n;
for (int i = 0; i < n; i++) {
cin >> d[i][0] >> d[i][1];
}
int count = 0;
for (int j = 0; j < n; j++) {
if (count == 3)
break;
if (d[j][0] == d[j][1])
++count;
else if (d[j][0] != d[j][... | #include <iostream>
using namespace std;
int main() {
int n;
int d[110][2] = {};
cin >> n;
for (int i = 0; i < n; i++) {
cin >> d[i][0] >> d[i][1];
}
int count = 0;
for (int j = 0; j < n; j++) {
if (count == 3)
break;
if (d[j][0] == d[j][1])
++count;
else if (d[j][0] != d[j][... | [["-", 31, 16, 12, 23, 0, 41, 64, 5, 0, 6], ["+", 31, 16, 12, 23, 0, 41, 64, 5, 0, 6], ["-", 31, 16, 12, 23, 0, 41, 75, 5, 0, 6], ["+", 31, 16, 12, 23, 0, 41, 75, 5, 0, 6]] | 1 | 159 |
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int i;
int d[100][2];
for (i = 0; i < n; i++) {
cin >> d[i][0] >> d[i][1];
}
for (i = 0; i < n - 2; i++) {
if (d[i][0] == d[i][1] && d[i + 1][0] == d[i + 1][1] &&
d[i + 2][0] == d[i + 2][1]) {
cout << "YES";
... | #include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int i;
int d[100][2];
for (i = 0; i < n; i++) {
cin >> d[i][0] >> d[i][1];
}
for (i = 0; i < n - 2; i++) {
if (d[i][0] == d[i][1] && d[i + 1][0] == d[i + 1][1] &&
d[i + 2][0] == d[i + 2][1]) {
cout << "Yes";
... | [["-", 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 | 156 |
n = int(input())
cnt = 0
is_ok = False
for _ in range(n):
d1, d2 = map(int, input().split())
if d1 == d2:
cnt += 1
else:
cnt = 1
if cnt >= 3:
is_ok = True
else:
pass
if is_ok:
print('Yes')
else:
print('No')
| n = int(input())
cnt = 0
is_ok = False
for _ in range(n):
d1, d2 = map(int, input().split())
if d1 == d2:
cnt += 1
else:
cnt = 0
if cnt >= 3:
is_ok = True
else:
pass
if is_ok:
print('Yes')
else:
print('No')
| [["-", 75, 76, 8, 196, 0, 1, 0, 662, 12, 612], ["+", 75, 76, 8, 196, 0, 1, 0, 662, 12, 612]] | 5 | 79 |
n = int(input())
count = 0
for i in range(n):
d1, d2 = map(int, input().split())
if count > 2:
break
elif d1 == d2:
count += 1
else:
count == 0
if count > 2:
print("Yes")
else:
print("No") | n = int(input())
count = 0
for i in range(n):
d1, d2 = map(int, input().split())
if count > 2:
break
else:
if d1 == d2:
count += 1
else:
count = 0
if count > 2:
print("Yes")
else:
print("No") | [["-", 0, 7, 8, 196, 0, 57, 75, 665, 0, 683], ["+", 0, 7, 8, 196, 0, 57, 75, 76, 0, 95], ["+", 0, 7, 8, 196, 0, 57, 75, 76, 0, 102], ["+", 0, 57, 75, 76, 8, 196, 0, 57, 0, 121], ["-", 75, 76, 8, 196, 0, 1, 0, 666, 667, 60], ["+", 75, 76, 8, 196, 0, 1, 0, 662, 0, 32]] | 5 | 73 |
#include <bits/stdc++.h>
#pragma GCC target("avx2")
#pragma GCC optimization("O3")
#pragma GCC optimization("unroll-loops")
#define X first
#define Y second
#define debug(x) cerr << #x << ": " << x << endl;
#define ll long long int
#define endl '\n'
#define mp make_pair
#define pb push_back
#define rep(i, l, r) for (ll... | #include <bits/stdc++.h>
#pragma GCC target("avx2")
#pragma GCC optimization("O3")
#pragma GCC optimization("unroll-loops")
#define X first
#define Y second
#define debug(x) cerr << #x << ": " << x << endl;
#define ll long long int
#define endl '\n'
#define mp make_pair
#define pb push_back
#define rep(i, l, r) for (ll... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 199 |
N = int(input())
cnt = 0
ans = False
for i in range(N):
D1, D2 = map(int, input().split())
if D1 == D2:
cnt += 1
else:
cnt = 0
if cnt > 2:
ans = True
break
print(ans) | N = int(input())
cnt = 0
ans = 'No'
for i in range(N):
D1, D2 = map(int, input().split())
if D1 == D2:
cnt += 1
else:
cnt = 0
if cnt > 2:
ans = 'Yes'
break
print(ans) | [["-", 36, 36, 0, 656, 0, 1, 0, 662, 12, 147], ["+", 0, 656, 0, 1, 0, 662, 12, 557, 0, 654], ["+", 0, 656, 0, 1, 0, 662, 12, 557, 0, 6], ["+", 0, 656, 0, 1, 0, 662, 12, 557, 0, 655], ["-", 0, 57, 64, 196, 0, 1, 0, 662, 12, 146], ["+", 64, 196, 0, 1, 0, 662, 12, 557, 0, 654], ["+", 64, 196, 0, 1, 0, 662, 12, 557, 0, 6],... | 5 | 64 |
#include <bits/stdc++.h>
#define ll long long int
#define out cout <<
using namespace std;
int main() {
ll n;
cin >> n;
ll a[n][2];
for (ll i = 0; i < n; i++) {
for (ll j = 0; j < 2; j++) {
cin >> a[i][j];
}
}
// for(ll i=0;i<n;i++)
// cout<<indx[i]<<"\n";
bool flag = false;
for (ll k... | #include <bits/stdc++.h>
#define ll long long int
#define out cout <<
using namespace std;
int main() {
ll n;
cin >> n;
ll a[n][n];
for (ll i = 0; i < n; i++) {
for (ll j = 0; j < 2; j++) {
cin >> a[i][j];
}
}
// for(ll i=0;i<n;i++)
// cout<<indx[i]<<"\n";
bool flag = false;
for (ll k... | [["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 22], ["-", 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 | 203 |
#include <algorithm>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <vector>
#define endl "\n"
using ll = long long;
using namespace std;
int main() {
int N;
cin >> N;
string three = "NO";
int count = 0;
while (N--) {
pair<int, int> roll;
cin >> roll.first;
cin >> r... | #include <algorithm>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <vector>
#define endl "\n"
using ll = long long;
using namespace std;
int main() {
int N;
cin >> N;
string three = "No";
int count = 0;
while (N--) {
pair<int, int> roll;
cin >> roll.first;
cin >> r... | [["-", 8, 9, 0, 43, 49, 50, 51, 5, 0, 6], ["+", 8, 9, 0, 43, 49, 50, 51, 5, 0, 6], ["-", 64, 9, 0, 1, 0, 11, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 11, 12, 5, 0, 6]] | 1 | 134 |
// In The Name Of God
#include <bits/stdc++.h>
#define IOS ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define ll long long
using namespace std;
int n;
const int maxn = 1e2 + 100;
int a[maxn], b[maxn], ans, maxx;
int main() {
IOS;
cin >> n;
for (int i = 0; i < n; i++)
cin >> a[i] >> b[i];
for (... | // In The Name Of God
#include <bits/stdc++.h>
#define IOS ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define ll long long
using namespace std;
int n;
const int maxn = 1e2 + 100;
int a[maxn], b[maxn], ans, maxx;
int main() {
IOS;
cin >> n;
for (int i = 0; i < n; i++)
cin >> a[i] >> b[i];
for (... | [["-", 0, 41, 64, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 41, 64, 16, 31, 16, 12, 5, 0, 6], ["-", 0, 41, 75, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 41, 75, 16, 31, 16, 12, 5, 0, 6]] | 1 | 157 |
class Main:
n = int(input())
num_list =[]
count = 0
for i in range(n):
num_list.append(list(map(int,input().split())))
for i in range(n-2):
if num_list[i][0]==num_list[i][1] and num_list[i+1][0]==num_list[i+1][1] and num_list[i+2][0]==num_list[i+2][1]:
count +=1
if ... | class Main:
n = int(input())
num_list =[]
count = 0
for i in range(n):
num_list.append(list(map(int,input().split())))
for i in range(n-2):
if num_list[i][0]==num_list[i][1] and num_list[i+1][0]==num_list[i+1][1] and num_list[i+2][0]==num_list[i+2][1]:
count +=1
if ... | [["-", 0, 682, 8, 196, 0, 57, 15, 666, 667, 60], ["+", 0, 682, 8, 196, 0, 57, 15, 666, 667, 20]] | 5 | 135 |
def func(D):
comb = 0
for item in D:
if item[0]==item[1]:
comb+=1
else:
comb=0
if comb==3:
return "Yes"
return "No"
if __name__ == "__main__":
N = int(input())
D = [map(int, input().split()) for _ in range(N)]
print(func(D)) | def func(D):
comb = 0
for item in D:
if item[0]==item[1]:
comb+=1
else:
comb=0
if comb==3:
return "Yes"
return "No"
if __name__ == "__main__":
N = int(input())
D = [list(map(int, input().split())) for _ in range(N)]
print(func(D)) | [["+", 0, 1, 0, 662, 12, 658, 8, 652, 63, 22], ["+", 0, 662, 12, 658, 8, 652, 3, 4, 0, 24], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 91 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int a;
cin >> a;
cin.ignore();
int count(0);
while (a--) {
string inp;
getline(cin, inp);
if (inp[0] == inp[2])
count++;
else
count = 0;
if (count == 3) {
cout << "Yes";
return 0;
}
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int a;
cin >> a;
cin.ignore();
int count(0);
while (a--) {
string inp;
getline(cin, inp);
if (inp[0] == inp[2])
count++;
else
count = 0;
if (count == 3) {
cout << "Yes";
return 0;
}
}
cout << "No";
... | [["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 8, 9, 0, 1, 0, 16, 12, 5, 0, 62], ["+", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 88 |
#include <bits/stdc++.h>
#define fastio \
ios_base::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0)
using namespace std;
int main() {
fa... | #include <bits/stdc++.h>
#define fastio \
ios_base::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0)
using namespace std;
int main() {
fa... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["-", 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 | 83 |
#include <bits/stdc++.h>
#define endl '\n'
#define int long long
using namespace std;
int32_t main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int n;
cin >> n;
bool ans = 0;
int count = 0;
for (int i = 0; i < n; i++) {
int x, y;
cin >> x >> y;
if (x == y)
count++;
... | #include <bits/stdc++.h>
#define endl '\n'
#define int long long
using namespace std;
int32_t main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int n;
cin >> n;
bool ans = 0;
int count = 0;
for (int i = 0; i < n; i++) {
int x, y;
cin >> x >> y;
if (x == y)
count++;
... | [["-", 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 | 131 |
#include <algorithm>
#include <cctype>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <stack>
#include <string>
#include <unordered_map>
using namespace std;
typedef long long ll;
const ll INF = 1000000007;
const ll mod = 1000000007... | #include <algorithm>
#include <cctype>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <stack>
#include <string>
#include <unordered_map>
using namespace std;
typedef long long ll;
const ll INF = 1000000007;
const ll mod = 1000000007... | [["-", 15, 339, 51, 16, 12, 69, 341, 342, 0, 13], ["+", 15, 339, 51, 16, 12, 69, 341, 342, 0, 13]] | 1 | 198 |
def solve():
N = int(input())
lines = [input().split() for i in range(N)]
for d,e in lines:
if d==e:
count += 1
if count>=3:
print("Yes")
return
else:
count = 0
print("No")
return
solve() | def solve():
N = int(input())
lines = [input().split() for i in range(N)]
count = 0
for d,e in lines:
if d==e:
count += 1
if count>=3:
print("Yes")
return
else:
count = 0
print("No")
return
solve()
| [["+", 0, 14, 8, 196, 0, 1, 0, 662, 31, 22], ["+", 0, 14, 8, 196, 0, 1, 0, 662, 0, 32], ["+", 0, 14, 8, 196, 0, 1, 0, 662, 12, 612]] | 5 | 73 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
void solve() {
ll n, m, j, y, i, k, x, d, c = 0, z, p, q;
cin >> n;
ll a[n + 1], b[n + 1];
for (i = 0; i < n; i++) {
cin >> a[i] >> b[i];
}
ll mx = -1;
for (i = 0; i < n; i++) {
if (a[i] == b[i])
c++;
else {
mx ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
void solve() {
ll n, m, j, y, i, k, x, d, c = 0, z, p, q;
cin >> n;
ll a[n + 1], b[n + 1];
for (i = 0; i < n; i++) {
cin >> a[i] >> b[i];
}
ll mx = -1;
for (i = 0; i < n; i++) {
if (a[i] == b[i])
c++;
else {
mx ... | [["+", 0, 57, 15, 339, 51, 16, 31, 2, 63, 22], ["+", 15, 339, 51, 16, 31, 2, 3, 4, 0, 24], ["+", 15, 339, 51, 16, 31, 2, 3, 4, 0, 22], ["+", 15, 339, 51, 16, 31, 2, 3, 4, 0, 21], ["+", 15, 339, 51, 16, 31, 2, 3, 4, 0, 25]] | 1 | 188 |
#include <bits/stdc++.h>
#define int long long
#define endl '\n'
#define mod 1000000007
#define pb push_back
#define fi first
#define se second
#define ii pair<int, int>
#define vi vector<int>
#define vii vector<ii>
#define fastIO \
ios_base::sync_with_... | #include <bits/stdc++.h>
#define int long long
#define endl '\n'
#define mod 1000000007
#define pb push_back
#define fi first
#define se second
#define ii pair<int, int>
#define vi vector<int>
#define vii vector<ii>
#define fastIO \
ios_base::sync_with_... | [["-", 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 | 233 |
#include <stdio.h>
#include <string.h>
int main(void) {
// Your code here!
int n, dice[1][1000];
scanf("%d", &n);
int sum = 0, flag = 0;
for (int i = 1; i <= n; i++) {
scanf("%d%d", &dice[0][i], &dice[1][i]);
if (dice[0][i] == dice[1][i])
sum++;
else
sum = 0;
if (sum == 3) {
... | #include <stdio.h>
#include <string.h>
int main(void) {
// Your code here!
int n, dice[3][1000];
scanf("%d", &n);
int sum = 0, flag = 0;
for (int i = 1; i <= n; i++) {
scanf("%d%d", &dice[0][i], &dice[1][i]);
if (dice[0][i] == dice[1][i])
sum++;
else
sum = 0;
if (sum == 3) {
... | [["-", 8, 9, 0, 43, 49, 80, 49, 80, 81, 13], ["+", 8, 9, 0, 43, 49, 80, 49, 80, 81, 13]] | 0 | 149 |
import sys
def main():
N = int(input())
zoro = 0
for i in range(N):
Ds = [int(s) for s in sys.stdin.readline().split()]
if(Ds[0] == Ds[1]):
zoro += 1
if(zoro > 2):
print("Yes")
return(0)
print("No")
main() | import sys
def main():
N = int(input())
zoro = 0
for i in range(N):
Ds = [int(s) for s in sys.stdin.readline().split()]
if(Ds[0] == Ds[1]):
zoro += 1
if(zoro > 2):
print("Yes")
return(0)
else:
zoro = 0
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 | 90 |
if __name__ == '__main__':
try:
count = []
result = 0
T = int(input())
for _ in range(T):
x, y = map(int, input().split())
count.append([x, y])
for i in range(T-2):
if count[i][0] == count[i][1] and count[i+1][0] == count[i+1][1] and count... | if __name__ == '__main__':
try:
count = []
result = 0
T = int(input())
for _ in range(T):
x, y = map(int, input().split())
count.append([x, y])
for i in range(T-2):
if count[i][0] == count[i][1] and count[i+1][0] == count[i+1][1] and count... | [["-", 0, 7, 8, 196, 0, 57, 75, 76, 0, 95], ["-", 0, 7, 8, 196, 0, 57, 75, 76, 0, 102]] | 5 | 147 |
s=int(input())
d = [list(map(int,input().split())) for _ in range(s)]
def p(val):
print(val)
def calc(s,d):
for i in range(s-2):
if d[i][0] == d[i][1] and d[i+1][0]==d[i+1][1] and d[i+2][0] == d[i+1][1]:
return 'Yes'
return 'No'
p(calc(s,d)) | s=int(input())
d = [list(map(int,input().split())) for _ in range(s)]
def p(val):
print(val)
def calc(s,d):
for i in range(s-2):
if d[i][0] == d[i][1] and d[i+1][0]==d[i+1][1] and d[i+2][0] == d[i+2][1]:
return 'Yes'
return 'No'
p(calc(s,d)) | [["-", 12, 666, 0, 206, 51, 206, 206, 657, 12, 612], ["+", 12, 666, 0, 206, 51, 206, 206, 657, 12, 612]] | 5 | 136 |
n = int(input())
ans = "No"
count = 0
for i in range(n):
D1,D2 = map(int,input().split())
count+=1 if D1==D2 else 0
ans="Yes" if D1 >= 3 else ans
print(ans) | n = int(input())
ans = "No"
count = 0
for i in range(n):
D1,D2 = map(int,input().split())
count=count+1 if D1==D2 else 0
ans="Yes" if count>=3 else ans
print(ans) | [["-", 0, 7, 8, 196, 0, 1, 0, 677, 17, 107], ["+", 0, 7, 8, 196, 0, 1, 0, 662, 0, 32], ["+", 0, 1, 0, 662, 12, 41, 0, 657, 31, 22], ["+", 0, 1, 0, 662, 12, 41, 0, 657, 17, 72], ["-", 0, 1, 0, 662, 12, 41, 0, 666, 0, 22], ["+", 0, 1, 0, 662, 12, 41, 0, 666, 0, 22]] | 5 | 64 |
import math
ini = lambda : int(input())
inm = lambda : map(int,input().split())
inl = lambda : list(map(int,input().split()))
gcd = lambda x,y : gcd(y,x%y) if x%y else y
def factorization(n):
arr = []
temp = n
for i in range(2, int(-(-n**0.5//1))+1):
if temp%i==0:
cnt=0
while... | import math
ini = lambda : int(input())
inm = lambda : map(int,input().split())
inl = lambda : list(map(int,input().split()))
gcd = lambda x,y : gcd(y,x%y) if x%y else y
def factorization(n):
arr = []
temp = n
for i in range(2, int(-(-n**0.5//1))+1):
if temp%i==0:
cnt=0
while... | [["-", 31, 679, 31, 23, 0, 666, 0, 206, 51, 22], ["+", 31, 679, 31, 23, 0, 666, 0, 206, 51, 22], ["-", 31, 679, 12, 23, 0, 666, 0, 206, 51, 22], ["+", 31, 679, 12, 23, 0, 666, 0, 206, 51, 22], ["-", 15, 679, 12, 23, 0, 666, 0, 206, 51, 22], ["+", 15, 679, 12, 23, 0, 666, 0, 206, 51, 22]] | 5 | 706 |
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
#define mod 1e9 + 7
#define MOD 998244353
#define ll long long
#define mp make_pair
#define F first
#define S second
#define pb emplace_back
#define pf emplace_front
#define all(p) p.begin(), p.end()
#defi... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
#define mod 1e9 + 7
#define MOD 998244353
#define ll long long
#define mp make_pair
#define F first
#define S second
#define pb emplace_back
#define pf emplace_front
#define all(p) p.begin(), p.end()
#defi... | [["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6]] | 1 | 496 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long int n, d, d2, a[200000], e = 0, i;
cin >> n;
for (i = 0; i < n; i++)
a[i] = 0;
for (i = 0; i < n; i++) {
cin >> d >> d2;
if (d == d2)
a[i] = 1;
if (i >= 2) {
if (a[i] == 1 && a[i - 1] == 1 && a[i - 2] == 1) {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
long long int n, d, d2, a[20000], e = 0, i;
cin >> n;
for (i = 0; i < n; i++)
a[i] = 0;
for (i = 0; i < n; i++) {
cin >> d >> d2;
if (d == d2)
a[i] = 1;
if (i >= 2) {
if (a[i] == 1 && a[i - 1] == 1 && a[i - 2] == 1) {
... | [["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 64, 9, 0, 57, 64, 9, 0, 1, 0, 35], ["+", 64, 9, 0, 57, 64, 9, 0, 93, 0, 94]] | 1 | 149 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
vector<int> D1(110);
vector<int> D2(110);
bool s = true;
for (int i = 0; i < N; i++)
cin >> D1.at(i) >> D2.at(i);
for (int i = 0; i < N - 1; i++) {
if (D1.at(i) != D2.at(i))
continue;
if (D1.at(i + 1) != D2.at(i... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
vector<int> D1(110);
vector<int> D2(110);
bool s = true;
for (int i = 0; i < N; i++)
cin >> D1.at(i) >> D2.at(i);
for (int i = 0; i < N - 2; i++) {
if (D1.at(i) != D2.at(i))
continue;
if (D1.at(i + 1) != D2.at(i... | [["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13], ["+", 8, 9, 0, 7, 8, 9, 0, 1, 0, 35], ["+", 8, 9, 0, 7, 8, 9, 0, 93, 0, 94]] | 1 | 176 |
import itertools
n = int(input())
count = 0
ans = 0
line = [input().split() for i in range(n)]
for j in line:
if j[0] == j[1]:
count += 1
if count >= 3:
ans += 1
else:
continue
else:
count = 1
if ans == 0:
print('No')
else:
print('Yes') | n = int(input())
count = 0
ans = 0
line = [input().split() for i in range(n)]
for j in line:
if j[0] == j[1]:
count += 1
if count >= 3:
ans += 1
else:
continue
else:
count = 0
if ans == 0:
print('No')
else:
print('Yes') | [["-", 36, 36, 36, 36, 0, 656, 0, 596, 0, 487], ["-", 36, 36, 0, 656, 0, 596, 141, 673, 0, 22], ["-", 75, 76, 8, 196, 0, 1, 0, 662, 12, 612], ["+", 75, 76, 8, 196, 0, 1, 0, 662, 12, 612]] | 5 | 88 |
#include <bits/stdc++.h>
using namespace std;
int main() {
// freopen("input.txt", "r", stdin);
int n, a, b, c = 0;
bool f = false;
cin >> n;
for (int i = 1; i <= n; i++) {
cin >> a >> b;
if (a == b) {
c++;
if (c > 2) {
f = true;
break;
}
} else if (c > 2) ... | #include <bits/stdc++.h>
using namespace std;
int main() {
// freopen("input.txt", "r", stdin);
int n, a, b, c = 0;
bool f = false;
cin >> n;
for (int i = 1; i <= n; i++) {
cin >> a >> b;
if (a == b) {
c++;
if (c > 2) {
f = true;
break;
}
} else if (c > 2) ... | [["-", 31, 16, 12, 23, 0, 41, 75, 5, 0, 6], ["+", 31, 16, 12, 23, 0, 41, 75, 5, 0, 6]] | 1 | 125 |
N = int(input())
D = [input().split() for _ in range(N)]
ans = "no"
for i in range(N - 2):
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]:
ans = "yes"
break
print(ans) | N = int(input())
D = [input().split() for _ in range(N)]
ans = "No"
for i in range(N - 2):
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]:
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], ["-", 64, 196, 0, 1, 0, 662, 12, 557, 0, 6], ["+", 64, 196, 0, 1, 0, 662, 12, 557, 0, 6]] | 5 | 110 |
//*Here I go out to sea again
//*The sunshine fills my hair
//*And dreams hang in the air
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define mp make_pair
#define pb push_back
void input() {
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
}
int main() {
ios_base::sy... | //*Here I go out to sea again
//*The sunshine fills my hair
//*And dreams hang in the air
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define mp make_pair
#define pb push_back
void input() {
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
}
int main() {
ios_base::sy... | [["+", 64, 9, 0, 57, 64, 9, 0, 93, 0, 94], ["+", 64, 9, 0, 57, 64, 9, 0, 93, 0, 35], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 167 |
N = int(input())
D = []
for i in range(N):
Da,Db = (map(int,input().split()))
if Da == Db:
D.append(1)
else:
D.append(0)
for i in range(N-2):
if D[i]==1 and D[i+1] == 1 and D[i+2] == 1:
ans = "Yes"
else:
ans = "No"
print(ans) | N = int(input())
D = []
for i in range(N):
Da,Db = (map(int,input().split()))
if Da == Db:
D.append(1)
else:
D.append(0)
for i in range(N-2):
if D[i]==1 and D[i+1] == 1 and D[i+2] == 1:
ans = "Yes"
break
else:
ans = "No"
print(ans) | [["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94]] | 5 | 109 |
n=int(input())
ans=0
c=True
d=[]
for i in range(n):
a,b=map(int,input().split())
if a==b:
d.append()
if len(d)<3:
print("No")
else:
j=0
for i in range(1,len(d)):
if d[i]-d[i-1]==1 and d[i+1]-d[i]==1:
print("Yes")
c=False
break
if c==Fa... | n=int(input())
ans=0
c=True
d=[]
for i in range(n):
a,b=map(int,input().split())
if a==b:
d.append(i)
if len(d)<3:
print("No")
else:
j=0
for i in range(1,len(d)-1):
if d[i]-d[i-1]==1 and d[i+1]-d[i]==1:
print("Yes")
c=False
break
if c==True:
... | [["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 33], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612], ["-", 75, 76, 8, 196, 0, 57, 15, 666, 0, 147], ["+", 75, 76, 8, 196, 0, 57, 15, 666, 0, 146]] | 5 | 134 |
n = int(input())
ans = 0
f1, f2, f3 = 0, 0, 0
for i in range(n):
f3 = f2
f2 = f1
d1, d2 = map(int, input().split())
f1 = d1 == d2
if f1 == f2 == f3:
ans = 1
print('Yes' if ans else 'No') | n = int(input())
ans = 0
f1, f2, f3 = 0, 0, 0
for i in range(n):
f3 = f2
f2 = f1
d1, d2 = map(int, input().split())
f1 = d1 == d2
if f1 == f2 == f3 == 1:
ans = 1
print('Yes' if ans else 'No') | [["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 60], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 0, 612]] | 5 | 79 |
#include <stdio.h>
int main(void) {
int gyo;
int a[100], b[100];
scanf("%d", &gyo);
int count = 0;
for (int i = 0; i < gyo; i++) {
scanf("%d %d", &a[i], &b[i]);
// printf("%d %d\n", a[i], b[i]);
if (a[i] == b[i]) {
count = count + 1;
}
if (count >= 3)
break;
if (a[i]... | #include <stdio.h>
int main(void) {
int gyo;
int a[100], b[100];
scanf("%d", &gyo);
int count = 0;
for (int i = 0; i < gyo; i++) {
scanf("%d %d", &a[i], &b[i]);
// printf("%d %d\n", a[i], b[i]);
if (a[i] == b[i]) {
count = count + 1;
}
if (count >= 3)
break;
if (a[i]... | [["-", 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]] | 0 | 140 |
#include <stdio.h>
int main() {
int N, i, x, y, count = 0, check = 0;
scanf("%d", &N);
for (i = 0; i < N; i++) {
scanf("%d %d", &x, &y);
if (x == y) {
count++;
if (count == 3) {
check = 1;
}
} else {
count = 0;
}
}
if (check == 1) {
printf("yes");
} else ... | #include <stdio.h>
int main() {
int N, i, x, y, count = 0, check = 0;
scanf("%d", &N);
for (i = 0; i < N; i++) {
scanf("%d %d", &x, &y);
if (x == y) {
count++;
if (count == 3) {
check = 1;
}
} else {
count = 0;
}
}
if (check == 1) {
printf("Yes");
} else ... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 121 |
N = int(input())
count = 0
c = 0
for i in range(N):
d1,d2 = input().split()
if d1==d2:
count+=1
if count==3:
c =1
sys.exit()
else:
count=0
if count==1:
print('Yes')
else:
print('No') | N = int(input())
count = 0
c = 0
for i in range(N):
d1,d2 = input().split()
if d1==d2:
count+=1
if count==3:
c =1
else:
count=0
if c==1:
print('Yes')
else:
print('No') | [["-", 64, 196, 0, 1, 0, 652, 63, 319, 500, 22], ["-", 64, 196, 0, 1, 0, 652, 63, 319, 0, 131], ["-", 64, 196, 0, 1, 0, 652, 63, 319, 319, 22], ["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 25], ["-", 36, 36, 0, 656, 0, 57, 15, 666, 0, 22], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 0, 22]... | 5 | 78 |
N = int(input())
z,w = [],[]
K = 0
for i in range(N):
x,y = map(int,input().split())
z.append(x)
w.append(y)
for j in range(N):
if z[j] == w[j] and z[j+1] == w[j+1] and z[j+2] == w[j+2]:
K += 1
if K >= 1:
print("Yes")
else:
print("No") | N = int(input())
z,w = [],[]
K = 0
for i in range(N):
x,y = map(int,input().split())
z.append(x)
w.append(y)
for j in range(N-2):
if z[j] == w[j] and z[j+1] == w[j+1] and z[j+2] == w[j+2]:
K += 1
if K >= 1:
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 | 125 |
n = int(input())
flag= True
count = 0
for i in range(n):
a,b = list(map(int, input().split()))
if a==b:
count += 1
else:
count= 0
if count==3:
flag = True
if flag:
print("yes")
else:
print("no") | n = int(input())
flag= False
count = 0
for i in range(n):
a,b = list(map(int, input().split()))
if a==b:
count += 1
else:
count= 0
if count==3:
flag = True
if flag:
print("Yes")
else:
print("No") | [["-", 36, 36, 0, 656, 0, 1, 0, 662, 12, 146], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 12, 147], ["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 79 |
#include <iostream>
#include <string>
using namespace std;
int main() {
int N;
int count = 0;
int cmax = 0;
cin >> N;
int n[N];
int n2[N];
for (int i = 0; i < N; i++) {
cin >> n[i] >> n2[i];
}
for (int i = 0; i < N; i++) {
if (n[i] == n2[i]) {
count += 1;
if (count > cmax) {
... | #include <iostream>
#include <string>
using namespace std;
int main() {
int N;
int count = 0;
int cmax = 0;
cin >> N;
int n[N];
int n2[N];
for (int i = 0; i < N; i++) {
cin >> n[i] >> n2[i];
}
for (int i = 0; i < N; i++) {
if (n[i] == n2[i]) {
count += 1;
if (count > cmax) {
... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 31, 22], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 31, 22]] | 1 | 151 |
n = int(input())
data = []
zoro = []
yn = False
for i in range(n):
data = input().split()
if data[0] == data[1]:
zoro += [True]
else:
zoro += [False]
if i > 1 and (zoro[i] == True or zoro[i-1] == True or zoro[i-2] == True):
yn = True
print(zoro)
print("Yes") if yn == True else pr... | n = int(input())
data = []
zoro = []
yn = False
for i in range(n):
data = input().split()
if data[0] == data[1]:
zoro += [True]
else:
zoro += [False]
if i > 1 and (zoro[i] == True and zoro[i-1] == True and zoro[i-2] == True):
yn = True
print("Yes") if yn == True else print("No") | [["-", 15, 679, 12, 23, 0, 679, 31, 679, 17, 354], ["+", 15, 679, 12, 23, 0, 679, 31, 679, 17, 355], ["-", 0, 57, 15, 679, 12, 23, 0, 679, 17, 354], ["+", 0, 57, 15, 679, 12, 23, 0, 679, 17, 355], ["-", 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,... | 5 | 115 |
#include <stdio.h>
int main() {
int sum = 0;
int n = 0, i, j;
int flag = 0;
int a[200][10];
int b = 0, c = 0;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%d %d", &b, &c);
for (j = 0; j < 2; j++) {
if (j == 0) {
a[i][j] = b;
} else {
a[i][j] = c;
}
}
... | #include <stdio.h>
int main() {
int sum = 0;
int n = 0, i, j;
int flag = 0;
int a[200][10];
int b = 0, c = 0;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%d %d", &b, &c);
for (j = 0; j < 2; j++) {
if (j == 0) {
a[i][j] = b;
} else {
a[i][j] = c;
}
}
... | [["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 0 | 235 |
import java.util.Scanner;
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];
for (int i = 0; i < N; i++) {
X[i] = sc.nextInt();
Y[i] = sc.nextInt();
}
int ans = 0;
... | import java.util.Scanner;
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];
for (int i = 0; i < N; i++) {
X[i] = sc.nextInt();
Y[i] = sc.nextInt();
}
int ans = 0;
... | [["+", 8, 196, 0, 7, 15, 16, 12, 16, 17, 33], ["+", 8, 196, 0, 7, 15, 16, 12, 16, 12, 499]] | 3 | 203 |
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> d;
for (int i = 0; i < 2 * n; i++) {
int _d;
cin >> _d;
d.push_back(_d);
}
string ans = "a";
for (int i = 0; i < n; i++) {
if (d[2 * i] == d[2 * i + 1] && d[2 * (i + 1)... | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> d;
for (int i = 0; i < 2 * n; i++) {
int _d;
cin >> _d;
d.push_back(_d);
}
string ans = "a";
for (int i = 0; i < n - 2; i++) {
if (d[2 * i] == d[2 * i + 1] && d[2 * (i ... | [["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 178 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int d1[N], d2[N];
for (int i = 0; i < N; i++) {
cin >> d1[i] >> d2[i];
}
int count = 0;
for (int i = 0; i < N; i++) {
if (d1[i] == d2[i] && d1[i + 1] == d2[i + 1] && d1[i + 2] == d2[i + 2]) {
count++;
}
}
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int d1[N], d2[N];
for (int i = 0; i < N; i++) {
cin >> d1[i] >> d2[i];
}
int count = 0;
for (int i = 0; i < N; i++) {
if (d1[i] == d2[i] && d1[i + 1] == d2[i + 1] && d1[i + 2] == d2[i + 2]) {
count++;
}
}
... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 157 |
N = int(input())
num_list = []
for i in range(N):
num_list.append(list(map(int,input().split())))
for j in range(N-2):
if num_list[j][0] == num_list[j][1] and num_list[j+1][0] == num_list[j+1][1] and num_list[j+2][0] == num_list[j+2][1]:
print ("Yes")
break
elif j != N-3 and num_list[j][0] ... | N = int(input())
num_list = []
for i in range(N):
num_list.append(list(map(int,input().split())))
for j in range(N-2):
if num_list[j][0] == num_list[j][1] and num_list[j+1][0] == num_list[j+1][1] and num_list[j+2][0] == num_list[j+2][1]:
print ("Yes")
break
elif j != N-3 and (num_list[j][0]... | [["+", 0, 57, 75, 665, 15, 679, 12, 23, 0, 24], ["+", 0, 57, 75, 665, 15, 679, 12, 23, 0, 25]] | 5 | 186 |
n =int(input())
first =[]
second =[]
for i in range(n):
d1 , d2 = map(int , input().split())
first.append(d1)
second.append(d2)
for i in range(n-2):
count = 0
for j in range(i ,i+3):
if first[j]==second[j]:
count +=1
if count ==3:
print("YES")
br... | n =int(input())
first =[]
second =[]
for i in range(n):
d1 , d2 = map(int , input().split())
first.append(d1)
second.append(d2)
for i in range(n-2):
count = 0
for j in range(i ,i+3):
if first[j]==second[j]:
count +=1
else:
break
if count ==3:... | [["+", 0, 7, 8, 196, 0, 57, 75, 76, 0, 95], ["+", 0, 7, 8, 196, 0, 57, 75, 76, 0, 102], ["+", 0, 57, 75, 76, 8, 196, 0, 93, 0, 94], ["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 111 |
#include <stdio.h>
int main(void) {
int a, b, i, k, n, s;
k = 0;
scanf("%d", &n);
for (i = 1; i < n + 1; i++) {
scanf("%d", &a);
scanf("%d", &b);
if (a == b)
k = k + 1;
if (a = !b)
k = 0;
if (k == 3)
s = 100;
}
if (s == 100)
printf("Yes\n");
else {
printf("No\... | #include <stdio.h>
int main(void) {
int a, b, i, k, n, s;
k = 0;
s = 0;
scanf("%d", &n);
for (i = 1; i < n + 1; i++) {
scanf("%d", &a);
scanf("%d", &b);
if (a == b)
k = k + 1;
if (a != b)
k = 0;
if (k == 3)
s = 100;
}
if (s == 100)
printf("Yes\n");
else {
pr... | [["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["-", 8, 9, 0, 57, 15, 23, 0, 11, 17, 32], ["-", 0, 57, 15, 23, 0, 11, 12, 91, 17, 111], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 79]] | 0 | 134 |
#include <iostream>
using namespace std;
int main() {
int n, a, b;
cin >> n;
int x = 0;
bool r = false;
for (int i = 0; i < n; i++) {
cin >> a >> b;
if (a == b) {
x++;
if (x == 2) {
r = true;
}
} else {
x = 0;
}
}
if (r) {
cout << "Yes";
} else {
... | #include <iostream>
using namespace std;
int main() {
int n, a, b;
cin >> n;
int x = 0;
bool r = false;
for (int i = 0; i < n; i++) {
cin >> a >> b;
if (a == b) {
x++;
if (x == 3) {
r = true;
}
} else {
x = 0;
}
}
if (r) {
cout << "Yes";
} else {
... | [["-", 64, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 64, 9, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 106 |
#include <iostream>
#include <string>
using namespace std;
int main() {
int n, count{0}, get{0};
cin >> n;
for (int i{0}; i < n; i++) {
int a, b;
cin >> a >> b;
if (a == b) {
count++;
if (count >= 3) {
get++;
}
} else
count = 0;
}
if (get >= 1)
cout << "YE... | #include <iostream>
#include <string>
using namespace std;
int main() {
int n, count{0}, get{0};
cin >> n;
for (int i{0}; i < n; i++) {
int a, b;
cin >> a >> b;
if (a == b) {
count++;
if (count >= 3) {
get++;
}
} else
count = 0;
}
if (get >= 1)
cout << "Ye... | [["-", 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 | 109 |
#include <iostream>
const int maxn = 105;
int a[maxn], b[maxn];
using namespace std;
int main() {
int T, n = 0, x = 0;
bool fal = true;
cin >> T;
while (T--) {
cin >> a[n];
cin >> b[n];
n++;
}
for (int i = 0; i < n; i++) {
if (a[i] == b[i])
x++;
else
x = 0;
if (x == 3) {
... | #include <iostream>
const int maxn = 105;
int a[maxn], b[maxn];
using namespace std;
int main() {
int T, n = 0, x = 0;
bool fal = true;
cin >> T;
while (T--) {
cin >> a[n];
cin >> b[n];
n++;
}
for (int i = 0; i < n; i++) {
if (a[i] == b[i])
x++;
else
x = 0;
if (x == 3) {
... | [["-", 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>
/*-------------------------------Template---------------------------------------*/
#define shameem \
ios::sync_with_stdio(0); \
cin.tie(0); ... | #include <bits/stdc++.h>
/*-------------------------------Template---------------------------------------*/
#define shameem \
ios::sync_with_stdio(0); \
cin.tie(0); ... | [["-", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46], ["-", 0, 7, 8, 9, 0, 57, 75, 76, 0, 95], ["-", 8, 9, 0, 57, 75, 76, 0, 9, 0, 45], ["+", 8, 9, 0, 57, 15, 339, 51, 91, 17, 111]] | 1 | 241 |
#include <iostream>
using namespace std;
int main() {
int n, sum = 0;
cin >> n;
int a[2][n];
cin >> a[0][0] >> a[0][1] >> a[1][0] >> a[1][1];
for (int i = 2; i < n; i++) {
cin >> a[i][0] >> a[i][1];
if (a[i - 2][1] == a[i - 2][0] && a[i - 1][1] == a[i - 1][0] &&
a[i][1] == a[i][0]) {
sum... | #include <iostream>
using namespace std;
int main() {
int n, sum = 0;
cin >> n;
int a[n][2];
cin >> a[0][0] >> a[0][1] >> a[1][0] >> a[1][1];
for (int i = 2; i < n; i++) {
cin >> a[i][0] >> a[i][1];
if (a[i - 2][1] == a[i - 2][0] && a[i - 1][1] == a[i - 1][0] &&
a[i][1] == a[i][0]) {
sum... | [["-", 8, 9, 0, 43, 49, 80, 49, 80, 81, 13], ["+", 8, 9, 0, 43, 49, 80, 49, 80, 81, 22], ["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 22], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13]] | 1 | 186 |
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
int main() {
int N, a, b;
cin >> N;
int flag = 0, cnt = 0;
while (N--) {
cin >> a >> b;
if (a == b)
cnt++;
else
cnt = 0;
if (cnt == 3) {
flag = 1;
}
}
if (flag == 1)
cout << "YES";
else
... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
int main() {
int N, a, b;
cin >> N;
int flag = 0, cnt = 0;
while (N--) {
cin >> a >> b;
if (a == b)
cnt++;
else
cnt = 0;
if (cnt == 3) {
flag = 1;
}
}
if (flag == 1)
cout << "Yes";
else
... | [["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 99 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using ll = long long;
using namespace std;
int main() {
int N;
cin >> N;
int a[105] = {};
int b[105] = {};
for (int i = 0; i < N; i++) {
cin >> a[i] >> b[i];
}
int count = 0;
for (int i = 0; i < 105; i++) {
if (i == N)... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using ll = long long;
using namespace std;
int main() {
int N;
cin >> N;
int a[105] = {};
int b[105] = {};
for (int i = 0; i < N; i++) {
cin >> a[i] >> b[i];
}
int count = 0;
for (int i = 0; i < 105; i++) {
if (i == N)... | [["-", 0, 57, 75, 76, 0, 1, 0, 16, 17, 60], ["+", 0, 57, 75, 76, 0, 1, 0, 11, 17, 32]] | 1 | 157 |
#include <iostream>
using namespace std;
int main(void) {
int n;
cin >> n;
int d[2 * n], count = 0;
for (int i = 0; i < (2 * n); i++)
cin >> d[i];
for (int i = 0; i < (2 * n); i += 2) {
if (d[i] == d[i + 1])
count++;
else if (d[i] != d[i + 1])
count == 0;
if (count == 3)
br... | #include <iostream>
using namespace std;
int main(void) {
int n;
cin >> n;
int d[2 * n], count = 0;
for (int i = 0; i < (2 * n); i++)
cin >> d[i];
for (int i = 0; i < (2 * n); i += 2) {
if (d[i] == d[i + 1])
count++;
else if (d[i] != d[i + 1])
count = 0;
if (count == 3)
bre... | [["-", 75, 76, 0, 57, 64, 1, 0, 16, 17, 60], ["+", 75, 76, 0, 57, 64, 1, 0, 11, 17, 32]] | 1 | 144 |
#include <algorithm>
#include <array>
#include <bits/stdc++.h>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <istream>
#include <limits>
#include <li... | #include <algorithm>
#include <array>
#include <bits/stdc++.h>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <istream>
#include <limits>
#include <li... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13], ["-", 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... | 1 | 282 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N = 0;
cin >> N;
int Di, Dj;
int i;
int renzorosu = 0;
while (i < N) {
cin >> Di >> Dj;
if (Di == Dj) {
renzorosu++;
if (renzorosu++ >= 3) {
break;
}
} else {
renzorosu = 0;
}
i++;
}
if (r... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N = 0;
cin >> N;
int Di, Dj;
int i = 0;
int renzorosu = 0;
while (i < N) {
cin >> Di >> Dj;
if (Di == Dj) {
renzorosu++;
if (renzorosu >= 3) {
break;
}
} else {
renzorosu = 0;
}
i++;
}
if ... | [["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 0, 57, 15, 339, 51, 16, 31, 27, 17, 29]] | 1 | 110 |
#include <bits/stdc++.h>
using namespace std;
#define vi vector<int>
#define sl set<ll>
#define vs vector<string>
#define vl vector<ll>
#define vi vector<int>
#define vpl vector<pair<ll, ll>>
#define pb push_back
#define PI 3.14159265358979323846
#define ll long long
#define ld long double
#define endl "\n"
#define rep... | #include <bits/stdc++.h>
using namespace std;
#define vi vector<int>
#define sl set<ll>
#define vs vector<string>
#define vl vector<ll>
#define vi vector<int>
#define vpl vector<pair<ll, ll>>
#define pb push_back
#define PI 3.14159265358979323846
#define ll long long
#define ld long double
#define endl "\n"
#define rep... | [["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6]] | 1 | 195 |
#include <bits/stdc++.h>
using namespace std;
#define vi vector<int>
#define sl set<ll>
#define vs vector<string>
#define vl vector<ll>
#define vi vector<int>
#define vpl vector<pair<ll, ll>>
#define pb push_back
#define PI 3.14159265358979323846
#define ll long long
#define ld long double
#define endl "\n"
#define rep... | #include <bits/stdc++.h>
using namespace std;
#define vi vector<int>
#define sl set<ll>
#define vs vector<string>
#define vl vector<ll>
#define vi vector<int>
#define vpl vector<pair<ll, ll>>
#define pb push_back
#define PI 3.14159265358979323846
#define ll long long
#define ld long double
#define endl "\n"
#define rep... | [["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6]] | 1 | 250 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
vector<vector<int>> data(N, vector<int>(2));
for (int i = 0; i < N; i++) {
for (int j = 0; j < 2; j++) {
cin >> data.at(i).at(j);
}
}
bool answer = false;
for (int i = 0; i < N - 2; i++) {
for (int j = 0; j ... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
vector<vector<int>> data(N, vector<int>(2));
for (int i = 0; i < N; i++) {
for (int j = 0; j < 2; j++) {
cin >> data.at(i).at(j);
}
}
bool answer = false;
for (int i = 0; i < N - 2; i++) {
for (int j = 0; j ... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 237 |
N=int(input())
xy = [map(int, input().split()) for _ in range(N)]
x, y = [list(i) for i in zip(*xy)]
cnt=0
result="No"
# 出力して確認
#for n in range(N-1):
for i in range(N):
cnt+=1 if x[i]==y[i] else 0
if cnt>2:
result="Yes"
print(result) | N=int(input())
xy = [map(int, input().split()) for _ in range(N)]
x, y = [list(i) for i in zip(*xy)]
cnt=0
result="No"
# 出力して確認
#for n in range(N-1):
for i in range(N):
cnt=cnt+1 if x[i]==y[i] else 0
if cnt>2:
result="Yes"
print(result) | [["-", 0, 7, 8, 196, 0, 1, 0, 677, 17, 107], ["+", 0, 7, 8, 196, 0, 1, 0, 662, 0, 32], ["+", 0, 1, 0, 662, 12, 41, 0, 657, 31, 22], ["+", 0, 1, 0, 662, 12, 41, 0, 657, 17, 72]] | 5 | 96 |
#include <stdio.h>
int main() {
int n;
scanf("%d", &n);
int D1[n], D2[n];
for (int i = 0; i < n; i++)
scanf("%d%d", &D1[i], &D2[i]);
int ans = 0;
for (int i = 0; i < n; i++) {
if (D1[i] == D2[i] && D1[i + 1] == D2[i + 1] && D1[i + 2] == D2[i + 2]) {
ans = 1;
break;
}
}
if (ans =... | #include <stdio.h>
int main() {
int n;
scanf("%d", &n);
int D1[n], D2[n];
for (int i = 0; i < n; i++)
scanf("%d%d", &D1[i], &D2[i]);
int ans = 0;
for (int i = 0; i < n - 2; i++) {
if (D1[i] == D2[i] && D1[i + 1] == D2[i + 1] && D1[i + 2] == D2[i + 2]) {
ans = 1;
break;
}
}
if (a... | [["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 0 | 158 |
#include <bits/stdc++.h>
using namespace std;
bool flag = 0;
int main() {
int N, k;
int num[110][5];
cin >> N;
for (int i = 0; i < N; i++)
for (int j = 0; j < 2; j++) {
cin >> num[i][j];
}
for (int i = 0; i < N - 2; i++) {
if (num[i][0] == num[i][1] && num[i + 1][0] == num[i + 1][1] &&... | #include <bits/stdc++.h>
using namespace std;
bool flag = 0;
int main() {
int N;
int num[110][5];
cin >> N;
for (int i = 0; i < N; i++)
for (int j = 0; j < 2; j++) {
cin >> num[i][j];
}
for (int i = 0; i < N - 2; i++) {
if (num[i][0] == num[i][1] && num[i + 1][0] == num[i + 1][1] &&
... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["-", 8, 9, 0, 57, 15, 339, 51, 11, 17, 32], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60]] | 1 | 177 |
import math
def a():
s = input()
if s[-1] == 's':
print(s + 'es')
else:
print(s + 's')
def b():
n = int(input())
d = []
for i in range(n):
d.append(list(map(int, input().split())))
for i in range(n - 2):
if d[i + 2][0] == d[i + 2][1] and \
d[i ... | import math
def a():
s = input()
if s[-1] == 's':
print(s + 'es')
else:
print(s + 's')
def b():
n = int(input())
d = []
for i in range(n):
d.append(list(map(int, input().split())))
for i in range(n - 2):
if d[i + 2][0] == d[i + 2][1] and \
d[i ... | [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 188 |
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int count = 0;
int a, b, flag = 0;
for (int i = 0; i < n; i++) {
cin >> a >> b;
if (a == b) {
count++;
if (count >= 3) {
flag = 1;
}
} else
count = 0;
}
if (flag == 1)
cout << "Yes";
... | #include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int count = 0;
int a, b, flag = 0;
for (int i = 0; i < n; i++) {
cin >> a >> b;
if (a == b) {
count++;
if (count >= 3) {
flag = 1;
}
} else
count = 0;
}
if (flag == 1)
cout << "Yes";
... | [["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 105 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int a;
cin >> a;
int arr[a][2];
for (int i = 0; i < a; i++) {
for (int j = 0; j < 2; j++) {
cin >> arr[i][j];
}
}
int s = 1;
for (int i = 0; i < a; i++) {
for (int j = 0; j < 2; j++) {
if (arr[i][j] == arr[i][j + 1] && arr[... | #include <bits/stdc++.h>
using namespace std;
int main() {
int a;
cin >> a;
int arr[a][2];
for (int i = 0; i < a; i++) {
for (int j = 0; j < 2; j++) {
cin >> arr[i][j];
}
}
int s = 1;
for (int i = 0; i < a; i++) {
for (int j = 0; j < 2; j++) {
if (arr[i][j] == arr[i][j + 1] && arr[... | [["-", 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 | 200 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.