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;
int main() {
int n;
scanf("%d", &n);
int c = 0;
for (int i = 1; i <= n; i++) {
int a, b;
scanf("%d %d", &a, &b);
if (a == b) {
c++;
} else {
c = 0;
}
if (c == 3) {
printf("Yes");
return 0;
}
printf("No");
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
scanf("%d", &n);
int c = 0;
for (int i = 1; i <= n; i++) {
int a, b;
scanf("%d %d", &a, &b);
if (a == b) {
c++;
} else {
c = 0;
}
if (c == 3) {
printf("Yes");
return 0;
}
}
printf("No");
... | [["+", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46], ["-", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46]] | 1 | 110 |
#include <bits/stdc++.h>
#define fr(i, c, b) for (int i = c; i < b; i++)
#define frl(i, c, b) for (ll i = c; i < b; i++)
#define si(x) \
int x; \
scanf("%d", &x)
#define sll(x) ... | #include <bits/stdc++.h>
#define fr(i, c, b) for (int i = c; i < b; i++)
#define frl(i, c, b) for (ll i = c; i < b; i++)
#define si(x) \
int x; \
scanf("%d", &x)
#define sll(x) ... | [["+", 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 | 167 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
vector<bool> vec(N);
for (int i = 0; i < N; i++) {
int a, b;
cin >> a >> b;
if (a == b) {
vec[i] = false;
}
}
for (int i = 0; i < N - 2; i++) {
if (vec[i] == false && vec[i + 1] == false && vec[i + 2] == f... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
vector<bool> vec(N, true);
for (int i = 0; i < N; i++) {
int a, b;
cin >> a >> b;
if (a == b) {
vec[i] = false;
}
}
for (int i = 0; i < N - 2; i++) {
if (vec[i] == false && vec[i + 1] == false && vec[i + 2... | [["+", 8, 9, 0, 43, 49, 53, 54, 55, 0, 21], ["+", 0, 43, 49, 53, 54, 55, 0, 56, 39, 78]] | 1 | 136 |
#include <bits/stdc++.h>
using namespace std;
int a[105][2];
int main() {
int n;
cin >> n;
for (int i = 1; i <= n; i++)
cin >> a[i][0] >> a[i][1];
for (int i = 1; i + 2 <= n; i++)
if (a[i][0] == a[i][1] && a[i + 1][0] == a[i + 1][1] &&
a[i + 2][0] == a[i + 1][1]) {
cout << "Yes";
ret... | #include <bits/stdc++.h>
using namespace std;
int a[105][2];
int main() {
int n;
cin >> n;
for (int i = 1; i <= n; i++)
cin >> a[i][0] >> a[i][1];
for (int i = 1; i + 2 <= 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]) {
cout << "Yes";
ret... | [["-", 12, 69, 28, 69, 341, 342, 0, 16, 12, 13], ["+", 12, 69, 28, 69, 341, 342, 0, 16, 12, 13]] | 1 | 154 |
s=0
for i in range(int(input())):
a,b=input().split()
if a==b:s+=1
else:s=0
if s==3:print('Yes')
else:print('No') | s=0
for i in range(int(input())):
a,b=input().split()
if a==b:s+=1
else:s=0
if s==3:
print('Yes')
break
else:print('No') | [["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94]] | 5 | 59 |
import sys
import math
import itertools
import collections
from collections import deque
from collections import defaultdict
sys.setrecursionlimit(1000000)
MOD = 10 ** 9 + 7
MOD2 = 998244353
INF = float('inf')
input = lambda: sys.stdin.readline().strip()
NI = lambda: int(input())
NMI = lambda: map(int, input().split(... | import sys
import math
import itertools
import collections
from collections import deque
from collections import defaultdict
sys.setrecursionlimit(1000000)
MOD = 10 ** 9 + 7
MOD2 = 998244353
INF = float('inf')
input = lambda: sys.stdin.readline().strip()
NI = lambda: int(input())
NMI = lambda: map(int, input().split(... | [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 33], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 216 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long n, ren = 0;
string ans = "No";
cin >> n;
vector<long> d1(n), d2(n);
for (long i = 0; i < n; i++) {
cin >> d1[i] >> d2[i];
if (d1[i] == d2[i]) {
ren++;
} else {
ren == 0;
}
if (ren >= 3)
ans = "Yes";
}
co... | #include <bits/stdc++.h>
using namespace std;
int main() {
long n, ren = 0;
string ans = "No";
cin >> n;
vector<long> d1(n), d2(n);
for (long i = 0; i < n; i++) {
cin >> d1[i] >> d2[i];
if (d1[i] == d2[i]) {
ren++;
} else {
ren = 0;
}
if (ren >= 3)
ans = "Yes";
}
cou... | [["-", 75, 76, 0, 9, 0, 1, 0, 16, 17, 60], ["+", 75, 76, 0, 9, 0, 1, 0, 11, 17, 32]] | 1 | 114 |
n=int(input())
g=0
for i in range(n):
a,b=map(int,input().split(" "))
if a==b:
g=g+1
if g==3:
break
break
else:
g=0
print(g)
if g==3:
print("Yes")
else:
print("No") | n=int(input())
g=0
for i in range(n):
a,b=map(int,input().split(" "))
if a==b:
g=g+1
if g==3:
break
break
else:
g=0
if g==3:
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 | 83 |
#include <bits/stdc++.h>
#define ss second
#define ff first
#define all(x) x.begin(), x.end()
// #define DEBUG 100
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
const ll oo = 1e18 + 7;
const ll mod = 1e9 + 7, maxn = 1e5 + 100, maxm = 1e5 + 100;
const double PI = aco... | #include <bits/stdc++.h>
#define ss second
#define ff first
#define all(x) x.begin(), x.end()
// #define DEBUG 100
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
const ll oo = 1e18 + 7;
const ll mod = 1e9 + 7, maxn = 1e5 + 100, maxm = 1e5 + 100;
const double PI = aco... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 223 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef map<int, int> mii;
typedef map<ll, ll> mll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<ll> vl;
#define f(i, n) for (i = 0; i < n; i++)
#define f1(i, n) for (i = 1... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef map<int, int> mii;
typedef map<ll, ll> mll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<ll> vl;
#define f(i, n) for (i = 0; i < n; i++)
#define f1(i, n) for (i = 1... | [["-", 51, 16, 12, 16, 12, 69, 341, 342, 0, 13], ["+", 51, 16, 12, 16, 12, 69, 341, 342, 0, 13]] | 1 | 408 |
#pragma region Macros
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define REP2(i, n) for (int i = 0, i##_len = (int)(n); i < i##_len; ++i)
#define REP3(i, l, r) for (int i = (l), i##_len = (int)(r); i < i##_len; ++i)
#define GET_MACRO_REP(_1, _2, _3, NAME, ...) NAME
#define REP(...) GET_MACRO_... | #pragma region Macros
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define REP2(i, n) for (int i = 0, i##_len = (int)(n); i < i##_len; ++i)
#define REP3(i, l, r) for (int i = (l), i##_len = (int)(r); i < i##_len; ++i)
#define GET_MACRO_REP(_1, _2, _3, NAME, ...) NAME
#define REP(...) GET_MACRO_... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 299 |
//#include <bits/stdc++.h>
#include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
#define free \
freopen("... | //#include <bits/stdc++.h>
#include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
#define free \
freopen("... | [["+", 0, 7, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 8, 9, 0, 1, 0, 16, 12, 69, 28, 22], ["+", 0, 1, 0, 16, 12, 69, 341, 342, 0, 70], ["+", 0, 1, 0, 16, 12, 69, 341, 342, 0, 22], ["+", 0, 1, 0, 16, 12, 69, 341, 342, 0, 73]] | 1 | 339 |
#include <bits/stdc++.h>
using namespace std;
using int64 = long long;
constexpr int DEBUG = 0;
template <class T> inline bool UpdateMin(T &a, T b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool UpdateMax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0... | #include <bits/stdc++.h>
using namespace std;
using int64 = long long;
constexpr int DEBUG = 0;
template <class T> inline bool UpdateMin(T &a, T b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool UpdateMax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 31, 22], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 31, 22]] | 1 | 206 |
#include <bits/stdc++.h>
#define ll long long
#define IOS \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define deb(x... | #include <bits/stdc++.h>
#define ll long long
#define IOS \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define deb(x... | [["-", 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 | 159 |
#include <algorithm>
#include <cstdio>
#include <vector>
int main(void) {
int N;
scanf("%d", &N);
int max = 0;
int cnt = 0;
while (N--) {
int x, y;
scanf("%d%d", &x, &y);
if (x == y) {
cnt++;
if (max < cnt) {
max = cnt;
}
} else {
cnt = 0;
}
}
printf(... | #include <algorithm>
#include <cstdio>
#include <vector>
int main(void) {
int N;
scanf("%d", &N);
int max = 0;
int cnt = 0;
while (N--) {
int x, y;
scanf("%d%d", &x, &y);
if (x == y) {
cnt++;
if (max < cnt) {
max = cnt;
}
} else {
cnt = 0;
}
}
printf(... | [["-", 0, 2, 3, 4, 0, 41, 64, 5, 0, 6], ["+", 0, 2, 3, 4, 0, 41, 64, 5, 0, 6], ["-", 0, 2, 3, 4, 0, 41, 75, 5, 0, 6], ["+", 0, 2, 3, 4, 0, 41, 75, 5, 0, 6]] | 1 | 113 |
#include <algorithm>
#include <assert.h>
#include <cstring>
#include <ctime>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <set>
#include <sstream>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
const unsigned long long MOD = (unsign... | #include <algorithm>
#include <assert.h>
#include <cstring>
#include <ctime>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <set>
#include <sstream>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
const unsigned long long MOD = (unsign... | [["-", 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 | 168 |
#include <bits/stdc++.h>
using namespace std;
int main() {
cin.tie(0)->sync_with_stdio(0);
cin.exceptions(ios::badbit | ios::failbit);
int n;
cin >> n;
vector<array<int, 2>> a(n);
for (auto i = 0; i < n; ++i) {
for (auto j = 0; j < 2; ++j) {
cin >> a[i][j];
}
}
for (auto i = 1; i < n - 1;... | #include <bits/stdc++.h>
using namespace std;
int main() {
cin.tie(0)->sync_with_stdio(0);
cin.exceptions(ios::badbit | ios::failbit);
int n;
cin >> n;
vector<array<int, 2>> a(n);
for (auto i = 0; i < n; ++i) {
for (auto j = 0; j < 2; ++j) {
cin >> a[i][j];
}
}
for (auto i = 1; i < n - 1;... | [["-", 31, 16, 31, 16, 12, 69, 341, 342, 0, 13], ["+", 31, 16, 31, 16, 12, 69, 341, 342, 0, 13]] | 1 | 204 |
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define f first
#define s second
#define ub upper_bound
#define lb lower_bound
#define pb push_back
#define all(c) (c).begin(), (c).end()
#define sz(x) (int)(x).size()
#define fastio \
ios... | #include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define f first
#define s second
#define ub upper_bound
#define lb lower_bound
#define pb push_back
#define all(c) (c).begin(), (c).end()
#define sz(x) (int)(x).size()
#define fastio \
ios... | [["-", 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 | 210 |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
int n;
cin >> n;
int lx = -1, ly = -1, c = 0, f = 0;
while (n--) {
int x, y;
cin >> x >> y;
if (x == y) {
c++;
} else
c = 0;
if (c >= 3)
f = 1;
lx = x;
... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
int n;
cin >> n;
int lx = -1, ly = -1, c = 0, f = 0;
while (n--) {
int x, y;
cin >> x >> y;
if (x == y) {
c++;
} else
c = 0;
if (c >= 3)
f = 1;
lx = x;
... | [["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 131 |
#include <bits/stdc++.h>
using namespace std;
#define pb(a) push_back((a))
#define mp(a, b) make_pair((a), (b))
#define REP(a, b) for (ll i = (a); i < (b); i++)
#define REP2(a, b) for (ll j = (a); j < (b); j++)
#define REPE(a, b, c, d) \
REP(a, b) ... | #include <bits/stdc++.h>
using namespace std;
#define pb(a) push_back((a))
#define mp(a, b) make_pair((a), (b))
#define REP(a, b) for (ll i = (a); i < (b); i++)
#define REP2(a, b) for (ll j = (a); j < (b); j++)
#define REPE(a, b, c, d) \
REP(a, b) ... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 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 | 761 |
#include "algorithm"
#include "bitset"
#include "cassert"
#include "climits"
#include "cmath"
#include "cstdio"
#include "ctime"
#include "functional"
#include "iomanip"
#include "iostream"
#include "list"
#include "map"
#include "numeric"
#include "queue"
#include "random"
#include "set"
#include "stack"
#include "str... | #include "algorithm"
#include "bitset"
#include "cassert"
#include "climits"
#include "cmath"
#include "cstdio"
#include "ctime"
#include "functional"
#include "iomanip"
#include "iostream"
#include "list"
#include "map"
#include "numeric"
#include "queue"
#include "random"
#include "set"
#include "stack"
#include "str... | [["-", 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 | 222 |
import sys, re
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left, bisect_right
... | import sys, re
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left, bisect_right
... | [["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 60], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 0, 612]] | 5 | 390 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
#include <vector>
#define ll long long
#define N 200010
using namespace std;
inline int read() {
int neg = 1, num = 0;
char c = getchar();
for (; !isdigit(c); c = getchar())
if (c == '-')
neg ... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
#include <vector>
#define ll long long
#define N 200010
using namespace std;
inline int read() {
int neg = 1, num = 0;
char c = getchar();
for (; !isdigit(c); c = getchar())
if (c == '-')
neg ... | [["-", 0, 34, 31, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 34, 31, 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 | 273 |
#include <bits/stdc++.h>
#define fast() \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define ll long long int
using nam... | #include <bits/stdc++.h>
#define fast() \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define ll long long int
using nam... | [["-", 0, 7, 15, 16, 31, 16, 31, 16, 17, 72], ["-", 0, 7, 15, 16, 31, 16, 31, 16, 12, 22]] | 1 | 173 |
#include <bits/stdc++.h>
#define ios \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define ll long long
#define bit(x... | #include <bits/stdc++.h>
#define ios \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define ll long long
#define bit(x... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 678 |
#include <bits/stdc++.h>
using namespace std;
//#define ull unsigned long long
#define int long long int
#define lld long double
#define endl "\n"
#define S second
#define F first
#define pir pair<int, int>
#define vtr vector<int>
#define mpp map<int, int>
#define pb push_back
#define popb pop_back()
#define mk make_... | #include <bits/stdc++.h>
using namespace std;
//#define ull unsigned long long
#define int long long int
#define lld long double
#define endl "\n"
#define S second
#define F first
#define pir pair<int, int>
#define vtr vector<int>
#define mpp map<int, int>
#define pb push_back
#define popb pop_back()
#define mk make_... | [["-", 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 | 707 |
/* --------------------
| LOSER |
| ~NOOBOSS~ |
--------------------
*/
#include <bits/stdc++.h>
using namespace std;
#define mxx LLONG_MAX
#define mnn LLONG_MIN
#define Y() cout << "YES" << endl
#define N() cout << "NO" << endl
#define endl "\n"
#define max_3(a, b, c) max(a, max(b,... | /* --------------------
| LOSER |
| ~NOOBOSS~ |
--------------------
*/
#include <bits/stdc++.h>
using namespace std;
#define mxx LLONG_MAX
#define mnn LLONG_MIN
#define Y() cout << "Yes" << endl
#define N() cout << "No" << endl
#define endl "\n"
#define max_3(a, b, c) max(a, max(b,... | [["-", 36, 36, 36, 36, 0, 30, 0, 112, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 112, 51, 59]] | 1 | 543 |
#include <bits/stdc++.h>
using namespace std;
template <typename T> using vec = vector<T>;
int main() {
int n;
cin >> n;
int a, b;
int cnt = 0;
while (cin >> a >> b) {
if (a == b) {
cnt++;
} else {
cnt = 0;
}
if (cnt = 3) {
cout << "Yes" << endl;
return 0;
}
}
... | #include <bits/stdc++.h>
using namespace std;
template <typename T> using vec = vector<T>;
int main() {
int n;
cin >> n;
int a, b;
int cnt = 0;
while (cin >> a >> b) {
if (a == b) {
cnt++;
} else {
cnt = 0;
}
if (cnt == 3) {
cout << "Yes" << endl;
return 0;
}
}
... | [["-", 8, 9, 0, 57, 15, 339, 51, 11, 17, 32], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60]] | 1 | 97 |
n = int(input())
count = 0
flag = False
for i in range(n):
a, b = map(int, input().split())
if a == b:
if count == 2:
flag = True
else:
count += 1
else:
count = 0
if flag:
print(Yes)
else:
print("No") | n = int(input())
count = 0
flag = False
for i in range(n):
a, b = map(int, input().split())
if a == b:
if count == 2:
flag = True
else:
count += 1
else:
count = 0
if flag:
print("Yes")
else:
print("No") | [["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 654], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 655]] | 5 | 76 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define int long long
#define all(sdk) sdk.begin(), sdk.end()
#define mll map<ll, ll>
#define pb push_back
#define lb lower_bound
#define ub upper_bound
#define rep(i, a, b) for (ll i = a; i < b; ++i)
#define repd(i, a, b) for (ll i = a; i >= b; --i)
//... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define int long long
#define all(sdk) sdk.begin(), sdk.end()
#define mll map<ll, ll>
#define pb push_back
#define lb lower_bound
#define ub upper_bound
#define rep(i, a, b) for (ll i = a; i < b; ++i)
#define repd(i, a, b) for (ll i = a; i >= b; --i)
//... | [["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6]] | 1 | 574 |
#include <bits/stdc++.h>
using namespace std;
int N, a[100004];
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cin >> N;
for (int i = 0; i < N; i++) {
int x, y;
cin >> x >> y;
a[i] = x == y;
}
int ans = 0;
for (int i = 0; i + 2 < N; i++) {
ans |= a[i] and a[i + 1] and a[2];
}
c... | #include <bits/stdc++.h>
using namespace std;
int N, a[100004];
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cin >> N;
for (int i = 0; i < N; i++) {
int x, y;
cin >> x >> y;
a[i] = x == y;
}
int ans = 0;
for (int i = 0; i + 2 < N; i++) {
ans |= a[i] and a[i + 1] and a[i + 2];
}
... | [["+", 12, 16, 12, 69, 341, 342, 0, 16, 31, 22], ["+", 12, 16, 12, 69, 341, 342, 0, 16, 17, 72]] | 1 | 134 |
#include <algorithm>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define PI 3.14159265359
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pa... | #include <algorithm>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define PI 3.14159265359
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pa... | [["+", 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 | 166 |
N=int(input())
p=False
s=0
for i in range(N):
a,b=map(int,input().split())
if a==b:
s+=1
if s==3:
break
else:
s=0
print("Yes" if p else "No") | N=int(input())
p=False
s=0
for i in range(N):
a,b=map(int,input().split())
if a==b:
s+=1
if s==3:
p=True
break
else:
s=0
print("Yes" if p else "No")
| [["+", 0, 57, 64, 196, 0, 1, 0, 662, 31, 22], ["+", 0, 57, 64, 196, 0, 1, 0, 662, 0, 32], ["+", 0, 57, 64, 196, 0, 1, 0, 662, 12, 146]] | 5 | 69 |
n=int(input())
from itertools import groupby as gb
l=[eval(input().replace(' ','==')) for i in range(n)]
var=[(a,len(list(b))) for a,b in gb(l)]
for a,b in var:
if b>=3:print("Yes");exit()
print("No") | n=int(input())
from itertools import groupby as gb
l=[eval(input().replace(' ','==')) for i in range(n)]
var=[(a,len(list(b))) for a,b in gb(l)]
for a,b in var:
if a and b>=3:print("Yes");exit()
print("No")
| [["+", 0, 7, 8, 196, 0, 57, 15, 679, 31, 22], ["+", 0, 7, 8, 196, 0, 57, 15, 679, 17, 355]] | 5 | 94 |
N=gets.to_i
c=0
r="No"
N.times{
x,y=gets.split.map(&:to_i)
if x==y
c+=1
if c>=3
r="Yes"
end
end
}
puts r
| N=gets.to_i
c=0
r="No"
N.times{
x,y=gets.split.map(&:to_i)
if x==y
c+=1
if c>=3
r="Yes"
end
else
c=0
end
}
puts r
| [["+", 196, 196, 8, 734, 0, 121, 75, 95, 0, 95], ["+", 8, 734, 0, 121, 75, 95, 0, 662, 31, 22], ["+", 8, 734, 0, 121, 75, 95, 0, 662, 0, 32], ["+", 8, 734, 0, 121, 75, 95, 0, 662, 12, 612]] | 4 | 51 |
s = int(input())
ok = 0
c = 1
for _ in range(s):
x,y = list(map(int,input().split()))
if x==y:
c+=1
else:
c=0
if c==3:
ok = 1
if ok==1:
print('Yes')
else:
print('No') | s = int(input())
ok = 0
c = 0
for _ in range(s):
x,y = list(map(int,input().split()))
if x==y:
c+=1
else:
c=0
if c==3:
ok = 1
if ok==1:
print('Yes')
else:
print('No') | [["-", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612]] | 5 | 81 |
def main():
n = int(input())
count = 0
answer = 'No'
for i in range(n):
d = list(map(int, input().split()))
if d[0] == d[1]:
count += 1
if count >= 3:
answer = 'Yes'
break
print(answer)
if __name__ == '__main__':
main()
| def main():
n = int(input())
count = 0
answer = 'No'
for i in range(n):
d = list(map(int, input().split()))
if d[0] == d[1]:
count += 1
else:
count = 0
if count >= 3:
answer = 'Yes'
print(answer)
if __name__ == '__main__':
m... | [["+", 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], ["-", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94]] | 5 | 85 |
#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
ll n;
cin >> n;
ll c = 0, ok = 0;
while (n--) {
ll a, b;
cin >> a >> b;
if (a == b)
c++;
if (a != b)
c = 0;
if (c == 3)
... | #include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
ll n;
cin >> n;
ll c = 0, ok = 0;
while (n--) {
ll a, b;
cin >> a >> b;
if (a == b)
c++;
if (a != b)
c = 0;
if (c == 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 | 118 |
n=int(input())
cnt=0
ans=0
for i in range(n):
d,e=map(int,input().split())
if d!=e:
if cnt==3:
ans=0
break
cnt=1
else:
cnt+=1
if cnt==3:
ans=1
break
if cnt>=3:
ans=1
if ans==1:
print("Yes")
else:
print("No")
| n=int(input())
cnt=0
ans=0
for i in range(n):
d,e=map(int,input().split())
if d!=e:
if cnt==3:
ans=1
break
cnt=0
else:
cnt+=1
if cnt==3:
ans=1
break
if cnt>=3:
ans=1
if ans==1:
print("Yes")
else:
print("No")
| [["-", 0, 57, 64, 196, 0, 1, 0, 662, 12, 612], ["+", 0, 57, 64, 196, 0, 1, 0, 662, 12, 612]] | 5 | 96 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define endl "\n"
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int t = 1;
// cin>>t;
while (t--) {
int n;
cin >> n;
int a[n], b[n];
bool flag = 0;
cin >> a[0] >> b[0];
cin >... | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define endl "\n"
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int t = 1;
// cin>>t;
while (t--) {
int n;
cin >> n;
int a[n], b[n];
bool flag = 0;
cin >> a[0] >> b[0];
cin >... | [["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 44], ["+", 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 | 199 |
#include <bits/stdc++.h>
#include <functional>
#include <stdio.h>
using namespace std;
#define ll long long int
#define dd long double
#define pb push_back
#define pf push_front
#define pi pair<ll, ll>
#define vi vector<ll>
#define vpi vector<pi>
#define mi map<ll, ll>
#define vvi vector<vector<ll>>
#define mpi map<pi,... | #include <bits/stdc++.h>
#include <functional>
#include <stdio.h>
using namespace std;
#define ll long long int
#define dd long double
#define pb push_back
#define pf push_front
#define pi pair<ll, ll>
#define vi vector<ll>
#define vpi vector<pi>
#define mi map<ll, ll>
#define vvi vector<vector<ll>>
#define mpi map<pi,... | [["+", 0, 9, 0, 57, 64, 9, 0, 93, 0, 94], ["+", 0, 9, 0, 57, 64, 9, 0, 93, 0, 35]] | 1 | 441 |
n = int(input())
df_de = [list(map(int, input().split())) for _ in range(n)]
ans = 0
cand = []
for d1, d2 in df_de:
if d1 == d2:
ans += 1
else:
cand.append(ans)
ans = 0
print("Yes" if len([i for i in cand if i >= 3]) else "No") | n = int(input())
df_de = [list(map(int, input().split())) for _ in range(n)]
ans = 0
cand = []
for d1, d2 in df_de:
if d1 == d2:
ans += 1
else:
cand.append(ans)
ans = 0
cand.append(ans)
print("Yes" if len([i for i in cand if i >= 3]) else "No") | [["+", 0, 656, 0, 1, 0, 652, 63, 319, 500, 22], ["+", 0, 656, 0, 1, 0, 652, 63, 319, 0, 131], ["+", 0, 656, 0, 1, 0, 652, 63, 319, 319, 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 | 92 |
#include <bits/stdc++.h>
#define ll long long
using namespace std;
bool vis[105];
int main() {
int n;
cin >> n;
for (int i = 1; i <= n; i++) {
int x, y;
scanf("%d%d", &x, &y);
vis[i] = (x == y);
}
for (int i = 1; i <= n - 2; i++) {
if (vis[i] && vis[i + 1] && vis[i + 2]) {
puts("yes");
... | #include <bits/stdc++.h>
#define ll long long
using namespace std;
bool vis[105];
int main() {
int n;
cin >> n;
for (int i = 1; i <= n; i++) {
int x, y;
scanf("%d%d", &x, &y);
vis[i] = (x == y);
}
for (int i = 1; i <= n - 2; i++) {
if (vis[i] && vis[i + 1] && vis[i + 2]) {
puts("Yes");
... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 134 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int N;
cin >> N;
vector<int> a(N), b(N);
for (int i = 0; i < N; i++) {
cin >> a[i] >> b[i];
}
for (int i = 0; i < N - 2; i++) {
if (a[i] == b[i] && a[i + 1] == b[i + 1] && a[i + 2] == b[i + 1]) {
cout << "Yes" ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int N;
cin >> N;
vector<int> a(N), b(N);
for (int i = 0; i < N; i++) {
cin >> a[i] >> b[i];
}
for (int i = 0; i < N - 2; i++) {
if (a[i] == b[i] && a[i + 1] == b[i + 1] && a[i + 2] == b[i + 2]) {
cout << "Yes" ... | [["-", 12, 16, 12, 69, 341, 342, 0, 16, 12, 13], ["+", 12, 16, 12, 69, 341, 342, 0, 16, 12, 13]] | 1 | 148 |
/***********************************************
* *
* author: raghav_0901 (Raghav Dalmia) *
* updated on: 19-09-2020, 5:35:24 pm IST *
* *
\***********************************************/
#include <bits/stdc++.h>... | /***********************************************
* *
* author: raghav_0901 (Raghav Dalmia) *
* updated on: 19-09-2020, 5:36:09 pm IST *
* *
\***********************************************/
#include <bits/stdc++.h>... | [["-", 3, 4, 0, 23, 0, 41, 64, 5, 0, 6], ["+", 3, 4, 0, 23, 0, 41, 64, 5, 0, 6], ["-", 3, 4, 0, 23, 0, 41, 75, 5, 0, 6], ["+", 3, 4, 0, 23, 0, 41, 75, 5, 0, 6]] | 1 | 975 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define pb push_back
#define f(i, n) for (int i = 0; i < n; ++i)
#define fi(i, st, n) for (int i = st; i <= n; ++i)
#define veci vector<int>
#define vecp vector<pair<int, int>>
#define vecl vector<ll>
int prime[100000 + ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define pb push_back
#define f(i, n) for (int i = 0; i < n; ++i)
#define fi(i, st, n) for (int i = st; i <= n; ++i)
#define veci vector<int>
#define vecp vector<pair<int, int>>
#define vecl vector<ll>
int prime[100000 + ... | [["-", 0, 52, 8, 9, 0, 1, 0, 34, 0, 21], ["+", 0, 52, 8, 9, 0, 1, 0, 16, 17, 152]] | 1 | 375 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using Vec = vector<int>;
bool IsPrime(int num) {
if (num < 2)
return false;
else if (num == 2)
return true;
else if (num % 2 == 0)
return false;
double sqrtNum = sqrt(num);
for (int i = 3; i <= sqrtNum; i... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using Vec = vector<int>;
bool IsPrime(int num) {
if (num < 2)
return false;
else if (num == 2)
return true;
else if (num % 2 == 0)
return false;
double sqrtNum = sqrt(num);
for (int i = 3; i <= sqrtNum; i... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 272 |
#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long double pi = acos(-1.0);
typedef long long ll;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int n;
cin >> n;
int cnt = 0;
int ans = 0;
for (int i = 0; i < n; i++) {
int d1, d2;
cin >> d1 >> d2;
if... | #include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long double pi = acos(-1.0);
typedef long long ll;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int n;
cin >> n;
int cnt = 0;
int ans = 0;
for (int i = 0; i < n; i++) {
int d1, d2;
cin >> d1 >> d2;
if... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 31, 22], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 31, 22]] | 1 | 148 |
#include <bits/stdc++.h>
#define fo(i, a, b) for (int i = a; i < b; ++i)
#define rep(i, n) fo(i, 0, n)
#define pln(n) printf("%lld\n", n)
#define sll(n) scanf("%lld", &n)
#define ss(n) scanf("%s", n)
#define vi vector<int>
#define pii pair<int, int>
#define pb push_back
#define mp make_pair
#define ll long long
#defin... | #include <bits/stdc++.h>
#define fo(i, a, b) for (int i = a; i < b; ++i)
#define rep(i, n) fo(i, 0, n)
#define pln(n) printf("%lld\n", n)
#define sll(n) scanf("%lld", &n)
#define ss(n) scanf("%s", n)
#define vi vector<int>
#define pii pair<int, int>
#define pb push_back
#define mp make_pair
#define ll long long
#defin... | [["-", 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 | 240 |
N = int(input())
flug = False
cnt = 0
for _ in range(N):
D1, D2 = list(map(int, input().split()))
if D1 == D2:
cnt += 1
else:
cnt = 0
if cnt >= 3:
flug = True
if flug:
print("YES")
else:
print("NO") | N = int(input())
flug = False
cnt = 0
for _ in range(N):
D1, D2 = list(map(int, input().split()))
if D1 == D2:
cnt += 1
else:
cnt = 0
if cnt >= 3:
flug = True
if flug:
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 | 79 |
#include <iostream>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
using ll = long long;
using P = pair<int, int>;
#include <algorithm>
#include <map>
#include <math.h>
#include <queue>
#include <set>
int main() {
int n;
cin >> n;
int cnt(0);
bool ok = false;
rep(i, n)... | #include <iostream>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
using ll = long long;
using P = pair<int, int>;
#include <algorithm>
#include <map>
#include <math.h>
#include <queue>
#include <set>
int main() {
int n;
cin >> n;
int cnt(0);
bool ok = false;
rep(i, n)... | [["-", 0, 57, 75, 76, 0, 1, 0, 16, 17, 60], ["+", 0, 57, 75, 76, 0, 1, 0, 11, 17, 32]] | 1 | 131 |
print("YNEOS"["000" not in "".join([str(eval(input().replace(" ","-")))for _ in "_"*int(input())])::2]) | print("YNeos"["000" not in "".join([str(eval(input().replace(" ","-")))for _ in "_"*int(input())])::2]) | [["-", 0, 652, 3, 4, 0, 206, 51, 557, 0, 6], ["+", 0, 652, 3, 4, 0, 206, 51, 557, 0, 6]] | 5 | 57 |
#include <algorithm>
#include <cassert>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
int n;
ci... | #include <algorithm>
#include <cassert>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
int n;
ci... | [["-", 15, 339, 51, 16, 12, 69, 341, 342, 0, 13], ["+", 15, 339, 51, 16, 12, 69, 341, 342, 0, 22]] | 1 | 154 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, k = 0, a, b, res = 0;
cin >> N;
for (auto i = 0; i < N; ++i) {
std::cin >> a >> b;
if (a == b) {
k++;
res = (k == 3);
} else
k = 0;
}
if (res)
cout << "Yes" << std::endl;
else
cout << "No" << std::endl;... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, k = 0, a, b, res = 0;
cin >> N;
for (auto i = 0; i < N; ++i) {
std::cin >> a >> b;
if (a == b) {
k++;
res += (k == 3);
} else
k = 0;
}
if (res)
cout << "Yes" << std::endl;
else
cout << "No" << std::endl... | [["-", 0, 57, 64, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 17, 107]] | 1 | 104 |
#include <bits/stdc++.h>
int main() {
using namespace std;
unsigned long N;
cin >> N;
unsigned long cnt{0};
for (unsigned long i{0}, d1, d2; i < N; ++i) {
cin >> d1 >> d2;
if (d1 == d2) {
if (++cnt = 3)
return 0 & puts("Yes");
} else
cnt = 0;
}
puts("No");
return 0;
}
| #include <bits/stdc++.h>
int main() {
using namespace std;
unsigned long N;
cin >> N;
unsigned long cnt{0};
for (unsigned long i{0}, d1, d2; i < N; ++i) {
cin >> d1 >> d2;
if (d1 == d2) {
if (++cnt == 3)
return 0 & puts("Yes");
} else
cnt = 0;
}
puts("No");
return 0;
}
| [["-", 0, 57, 15, 339, 51, 27, 28, 11, 17, 32], ["+", 64, 9, 0, 57, 15, 339, 51, 16, 17, 60]] | 1 | 95 |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0), cout.tie(0);
int n;
cin >> n;
int c = 0;
while (n--) {
int d, dd;
cin >> d >> dd;
if (d == dd) {
++c;
if (c == 3) {
cout << "YES";
return 0;
}
} else
c =... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0), cout.tie(0);
int n;
cin >> n;
int c = 0;
while (n--) {
int d, dd;
cin >> d >> dd;
if (d == dd) {
++c;
if (c == 3) {
cout << "Yes";
return 0;
}
} else
c =... | [["-", 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 | 105 |
n=gets.to_i
c=0
n.times do
d=gets.split.map(&:to_i)
if d[0]==d[1]
c+=1
if c==3
puts "Yes"
end
else
c=0
end
end
puts "No"
| n=gets.to_i
c=0
n.times do
d=gets.split.map(&:to_i)
if d[0]==d[1]
c+=1
if c==3
puts "Yes"
exit
end
else
c=0
end
end
puts "No"
| [["+", 0, 121, 64, 749, 0, 121, 64, 749, 0, 22]] | 4 | 55 |
// g++ -std=c++17 -O2 -Wall C.cpp -o C -D _DEBUG
#include <bits/stdc++.h>
using namespace std;
int main() {
#ifdef _DEBUG
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
ios::sync_with_stdio(false);
cin.tie(NULL);
int n;
cin >> n;
int ans = 0;
for (int i = 1; i < n; i++)
... | // g++ -std=c++17 -O2 -Wall C.cpp -o C -D _DEBUG
#include <bits/stdc++.h>
using namespace std;
int main() {
#ifdef _DEBUG
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
ios::sync_with_stdio(false);
cin.tie(NULL);
int n;
cin >> n;
int ans = 0;
for (int i = 1; i < n; i++)
... | [["+", 0, 7, 8, 1, 0, 11, 12, 16, 17, 85], ["+", 0, 7, 8, 1, 0, 11, 12, 16, 12, 22]] | 1 | 94 |
#include <iostream>
using namespace std;
int main() {
int n;
int count = 0;
cin >> n;
for (int a = 1; a <= n - 1; a++) {
for (int b = 1; b <= (n - 1) / a; b++) {
count++;
}
}
} | #include <iostream>
using namespace std;
int main() {
int n;
int count = 0;
cin >> n;
for (int a = 1; a <= n - 1; a++) {
for (int b = 1; b <= (n - 1) / a; b++) {
count++;
}
}
cout << count;
}
| [["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 67 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, n, num = 0;
cin >> n;
for (a = 1; a < n; a++) {
num += n - 1 / a;
}
cout << num << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int a, n, num = 0;
cin >> n;
for (a = 1; a < n; a++) {
num += (n - 1) / a;
}
cout << num << endl;
}
| [["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 24], ["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 25]] | 1 | 54 |
#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... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 112 |
n = int(input())
for i in range(1,n):
ans += (n-1)//i
print(ans) | n = int(input())
ans = 0
for i in range(1,n):
ans += (n-1)//i
print(ans) | [["+", 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 | 31 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
int n;
cin >> n;
ll cnt = 0;
for (int i = 1; i <= n; ++i) {
for (int j = i; j <= n; ++j) {
if (i * j < n) {
if (i != j)
cnt += 2;
else
cnt++;
} else
break;
}
}
cou... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
int n;
cin >> n;
ll cnt = 0;
for (ll i = 1; i <= n; ++i) {
for (ll j = i; j <= n; ++j) {
if (i * j < n) {
if (i != j)
cnt += 2;
else
cnt++;
} else
break;
}
}
cout ... | [["-", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 7, 10, 43, 39, 78], ["-", 0, 7, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 0, 7, 8, 9, 0, 7, 10, 43, 39, 78]] | 1 | 98 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
int n;
cin >> n;
vector<int> a(n);
for (int i = 1; i * i < (n - 1); ++i) {
a[i * i - 1] += 1;
int j = i * i - 1 + i;
while (j < (n - 1)) {
... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
int n;
cin >> n;
vector<int> a(n);
for (int i = 1; i * i < (n); ++i) {
a[i * i - 1] += 1;
int j = i * i - 1 + i;
while (j < (n - 1)) {
a[j... | [["-", 0, 7, 15, 16, 12, 23, 0, 16, 17, 33], ["-", 0, 7, 15, 16, 12, 23, 0, 16, 12, 13]] | 1 | 143 |
#include <bits/stdc++.h>
using namespace std;
#define ff first
#define ss second
#define ins insert
#define ll long long
#define ld long double
#define vl vector<ll>
#define sz(c) (ll) c.size()
#define all(c) begin(c), end(c)
#define trv(x, c) for (auto &x : c)
#define tc ... | #include <bits/stdc++.h>
using namespace std;
#define ff first
#define ss second
#define ins insert
#define ll long long
#define ld long double
#define vl vector<ll>
#define sz(c) (ll) c.size()
#define all(c) begin(c), end(c)
#define trv(x, c) for (auto &x : c)
#define tc ... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["+", 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]] | 1 | 111 |
#ifndef DEBUG
#pragma GCC optimize("O3,no-stack-protector")
#pragma GCC optimize("unroll-loops")
#if __cplusplus < 201703L
#pragma GCC target("avx")
#else
#pragma GCC target("avx2")
#endif
#endif
#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
#define dump(x) cout << x << endl
#define all(x) (x).begin(), (x).end(... | #ifndef DEBUG
#pragma GCC optimize("O3,no-stack-protector")
#pragma GCC optimize("unroll-loops")
#if __cplusplus < 201703L
#pragma GCC target("avx")
#else
#pragma GCC target("avx2")
#endif
#endif
#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
#define dump(x) cout << x << endl
#define all(x) (x).begin(), (x).end(... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 694 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define mod 1e9 + 7
#define INF 1 << 30
#define MAX (1 << 20)
#define NINF (-(1 << 30))
#define Point pair<int, int>
#define triplet pair<pair<int, int>, int>
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NU... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define mod 1e9 + 7
#define INF 1 << 30
#define MAX (1 << 20)
#define NINF (-(1 << 30))
#define Point pair<int, int>
#define triplet pair<pair<int, int>, int>
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NU... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18]] | 1 | 147 |
n = int(input())
ans=0
for i in range(1,n):
ans+=int(cnt-1)
print(ans) | n = int(input())
ans=0
for i in range(1,n):
ans+=int((n-1)/i)
print(ans) | [["-", 0, 677, 12, 652, 3, 4, 0, 657, 31, 22], ["+", 12, 652, 3, 4, 0, 657, 31, 23, 0, 24], ["+", 3, 4, 0, 657, 31, 23, 0, 657, 31, 22], ["+", 12, 652, 3, 4, 0, 657, 31, 23, 0, 25], ["+", 0, 677, 12, 652, 3, 4, 0, 657, 17, 85], ["+", 0, 677, 12, 652, 3, 4, 0, 657, 12, 22]] | 5 | 33 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define ALL(x) ((x).begin()), ((x).end())
#define READ(x) (cin >> (x))
#define WRITE_N(x) (cout << (x) << endl)
#define WRITE(x) (cout << (x))
#define WRITE_Y... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define ALL(x) ((x).begin()), ((x).end())
#define READ(x) (cin >> (x))
#define WRITE_N(x) (cout << (x) << endl)
#define WRITE(x) (cout << (x))
#define WRITE_Y... | [["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 172 |
N = int(input())
ans = 0
for a in range(1,N):
ans += N//a
print(ans)
| N = int(input())
ans = 0
for a in range(1,N):
ans += (N-1)//a
print(ans)
| [["+", 0, 1, 0, 677, 12, 657, 31, 23, 0, 24], ["+", 0, 677, 12, 657, 31, 23, 0, 657, 17, 33], ["+", 0, 677, 12, 657, 31, 23, 0, 657, 12, 612], ["+", 0, 1, 0, 677, 12, 657, 31, 23, 0, 25]] | 5 | 30 |
#include <iostream>
using namespace std;
typedef long long ll;
int main() {
ll N;
cin >> N;
ll ans = 0;
for (ll i = 1ll; i < N; i++) {
ans += (N / i);
}
cout << ans << endl;
} | #include <iostream>
using namespace std;
typedef long long ll;
int main() {
ll N;
cin >> N;
ll ans = 0;
for (ll i = 1ll; i < N; i++) {
ans += ((N - 1) / i);
}
cout << ans << endl;
}
| [["+", 0, 11, 12, 23, 0, 16, 31, 23, 0, 24], ["+", 12, 23, 0, 16, 31, 23, 0, 16, 17, 33], ["+", 12, 23, 0, 16, 31, 23, 0, 16, 12, 13], ["+", 0, 11, 12, 23, 0, 16, 31, 23, 0, 25]] | 1 | 59 |
#!/usr/bin/env python
from typing import List
def input_int() -> int:
return int(input())
def input_list_int() -> List[int]:
return list(map(lambda x: int(x), input().split()))
def f(n: int) -> int:
ans = 0
for a in range(1, n - 1):
ans += (n - 1) // a
return ans
if __name__ == '__m... | #!/usr/bin/env python
from typing import List
def input_int() -> int:
return int(input())
def input_list_int() -> List[int]:
return list(map(lambda x: int(x), input().split()))
def f(n: int) -> int:
ans = 0
for a in range(1, n):
ans += (n - 1) // a
return ans
if __name__ == '__main__... | [["-", 0, 7, 12, 652, 3, 4, 0, 657, 17, 33], ["-", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 106 |
N=int(input())
ans=0
for i in range(N):
ans+=(N-1)//i
print(ans) | N=int(input())
ans=0
for i in range(1,N):
ans+=(N-1)//i
print(ans) | [["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21]] | 5 | 32 |
N =int(input())
c = 0
for i in range(N):
c += N-1//i+1
print(c)
| N =int(input())
c = 0
for i in range(N):
c += (N-1)//(i+1)
print(c)
| [["+", 0, 1, 0, 677, 12, 657, 31, 23, 0, 24], ["+", 0, 1, 0, 677, 12, 657, 31, 23, 0, 25], ["+", 0, 1, 0, 677, 12, 657, 12, 23, 0, 24], ["+", 0, 1, 0, 677, 12, 657, 12, 23, 0, 25]] | 5 | 32 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define go(i, a, n) for (ll i = a; i < (ll)n; i++)
#define gor(i, a, n) for (ll i = (ll)n - 1; i >= 0; i--)
#define gos(i, a, n, step) for (ll i = a; i < (ll)n; i += step)
#define show(a) cout << a << '\n'
#define show2(a, b) cout << a << " " << b << '\... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define go(i, a, n) for (ll i = a; i < (ll)n; i++)
#define gor(i, a, n) for (ll i = (ll)n - 1; i >= 0; i--)
#define gos(i, a, n, step) for (ll i = a; i < (ll)n; i += step)
#define show(a) cout << a << '\n'
#define show2(a, b) cout << a << " " << b << '\... | [["-", 0, 1, 0, 11, 12, 23, 0, 16, 17, 18], ["+", 0, 1, 0, 11, 12, 23, 0, 16, 17, 47]] | 1 | 285 |
#pragma GCC optimize("Ofast")
#pragma GCC target("sse4")
#include <bits/stdc++.h>
using namespace std;
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;
// template <class T> using Tree = tree<T, null_type, less<T>, rb_tree_tag,
// tree_order_statistics... | #pragma GCC optimize("Ofast")
#pragma GCC target("sse4")
#include <bits/stdc++.h>
using namespace std;
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;
// template <class T> using Tree = tree<T, null_type, less<T>, rb_tree_tag,
// tree_order_statistics... | [["-", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 7, 10, 43, 39, 78], ["-", 0, 7, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 0, 7, 8, 9, 0, 7, 10, 43, 39, 78]] | 1 | 644 |
from sys import stdin,stdout
def INPUT():return list(int(i) for i in stdin.readline().split())
def inp():return stdin.readline()
def out(x):return stdout.write(x)
import math
import random
########################################################
F=[1]*(10**6+1)
for i in range(2,10**6+1):
for j in range(i,10**6+1,i)... | from sys import stdin,stdout
def INPUT():return list(int(i) for i in stdin.readline().split())
def inp():return stdin.readline()
def out(x):return stdout.write(x)
import math
import random
########################################################
F=[1]*(10**6+1)
for i in range(2,10**6+1):
for j in range(i,10**6+1,i)... | [["-", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612], ["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 662, 12, 652, 3, 4, 0, 652, 63, 22], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25]] | 5 | 137 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, fl = 0;
cin >> n;
for (int i = 1; i < n; i++) {
fl += (n - 1) / i;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, fl = 0;
cin >> n;
for (int i = 1; i < n; i++) {
fl += (n - 1) / i;
}
cout << fl;
} | [["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 49 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
const ll mod = 1000000007;
int main() {
int n;
cin >> n;
double s = sqrt(n);
int k = (int)s;
ll count = 0;
ll ans = 0;
for (int i = 1; i < k + 1; i++) {
for (i... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
const ll mod = 1000000007;
int main() {
int n;
cin >> n;
double s = sqrt(n);
int k = (int)s;
ll count = 0;
ll ans = 0;
for (int i = 1; i < k + 1; i++) {
for (l... | [["-", 0, 7, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 0, 7, 8, 9, 0, 7, 10, 43, 39, 78], ["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 22], ["-", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13]] | 1 | 149 |
from math import sqrt
# Function to return count of Ordered pairs
# whose product are less than N
def countOrderedPairs(N):
# Initialize count to 0
count_pairs = int(0)
# count total pairs
p = int(sqrt(N - 1)) # + 1
q = N
# q = int(sqrt(N)) + 2
for i in range(1, p, 1):
for j in ra... | from math import sqrt
# Function to return count of Ordered pairs
# whose product are less than N
def countOrderedPairs(N):
# Initialize count to 0
count_pairs = int(0)
# count total pairs
p = int(sqrt(N - 1)) + 1
q = N
# q = int(sqrt(N)) + 2
for i in range(1, p, 1):
for j in range... | [["+", 8, 196, 0, 1, 0, 662, 12, 657, 17, 72], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 12, 612], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 17, 33], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 12, 612]] | 5 | 111 |
import java.io.*;
import java.util.*;
public class Main {
public static void main(String args[]) {
FastScanner in = new FastScanner();
long n = in.nextLong();
long ans = 0;
for (int a = 1; a < n; a++) {
long low = 1, high = n - 1;
long b = 1;
while (low < high - 1) {
long mid... | import java.io.*;
import java.util.*;
public class Main {
public static void main(String args[]) {
FastScanner in = new FastScanner();
long n = in.nextLong();
long ans = 0;
for (int a = 1; a < n; a++) {
long low = 0, high = n;
long b = 1;
while (low < high - 1) {
long mid = l... | [["-", 0, 7, 8, 196, 0, 503, 49, 200, 51, 499], ["+", 0, 7, 8, 196, 0, 503, 49, 200, 51, 499], ["-", 8, 196, 0, 503, 49, 200, 51, 16, 17, 33], ["-", 8, 196, 0, 503, 49, 200, 51, 16, 12, 499], ["-", 0, 1, 0, 492, 3, 4, 0, 16, 17, 72], ["-", 0, 1, 0, 492, 3, 4, 0, 16, 12, 499]] | 3 | 312 |
N = int(input())
count = 0
for a in range(1, N):
tmp = (N-1) // a
if a < (N) // 2:
count += tmp
else:
count += 1
print(count) | N = int(input())
count = 0
for a in range(1, N):
tmp = (N-1) // a
if a <= (N) // 2:
count += tmp
else:
count += 1
print(count) | [["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 18], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 19]] | 5 | 51 |
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
long int sum = 0;
for (int i = 0; i < n; i++) {
sum += n / i;
if (n % i == 0)
sum--;
}
cout << sum;
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
long int sum = 0;
for (int i = 1; i < n; i++) {
sum += n / i;
if (n % i == 0)
sum--;
}
cout << sum;
return 0;
}
| [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 65 |
N = int(input())
ans = 0
for i in range(1,N-1):
x = (N-1)//i
ans += x
print(ans) | N = int(input())
ans = 0
for i in range(1,N):
x = (N-1)//i
ans += x
print(ans) | [["-", 0, 7, 12, 652, 3, 4, 0, 657, 17, 33], ["-", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 39 |
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < (n); ++i)
#define FOR(i, m, n) for (ll i = m; i < (n); i++)
#define all(x) (x).begin(), (x).end()
using namespace std;
typedef long long ll;
using vi = vector<int>;
using vii = vector<vi>;
using pii = pair<int, int>;
using vl = vector<... | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < (n); ++i)
#define FOR(i, m, n) for (ll i = m; i < (n); i++)
#define all(x) (x).begin(), (x).end()
using namespace std;
typedef long long ll;
using vi = vector<int>;
using vii = vector<vi>;
using pii = pair<int, int>;
using vl = vector<... | [["+", 0, 14, 8, 9, 0, 57, 64, 9, 0, 45], ["+", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35], ["+", 8, 9, 0, 57, 64, 9, 0, 116, 0, 117], ["+", 0, 14, 8, 9, 0, 57, 64, 9, 0, 46]] | 1 | 349 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, b = 1, c = 0;
cin >> n;
for (int j = 1; j <= n; j++) {
b = 1;
while (j * b <= n) {
b++;
c++;
}
}
cout << c << "\n";
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, b = 1, c = 0;
cin >> n;
for (int j = 1; j <= n; j++) {
b = 1;
while (j * b < n) {
b++;
c++;
}
}
cout << c << "\n";
} | [["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18]] | 1 | 71 |
def solve():
ans = 0
for a in range(1, N):
for b in range(1, N):
x = a * b
if x >= N:
break
ans += 1
return ans
N = int(input())
ans = solve()
print(ans)
| def solve():
ans = 0
for a in range(1, N):
for b in range(1, N):
c = N - a * b
if c <= 0:
break
ans += 1
return ans
N = int(input())
ans = solve()
print(ans)
| [["-", 0, 7, 8, 196, 0, 1, 0, 662, 31, 22], ["+", 0, 7, 8, 196, 0, 1, 0, 662, 31, 22], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 31, 22], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 17, 33], ["-", 0, 7, 8, 196, 0, 57, 15, 666, 0, 22], ["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 20], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 0, 22], ["+", 0... | 5 | 61 |
#include <bits/stdc++.h>
using namespace std;
//#define FOA(x) for(int i=0;i<x;i++)
int main() {
int N;
cin >> N;
int count = 0;
for (int i = 1; i < N - 1; i++) {
count = count + (N - 1) / i;
}
cout << count << endl;
} | #include <bits/stdc++.h>
using namespace std;
//#define FOA(x) for(int i=0;i<x;i++)
int main() {
int N;
cin >> N;
int count = 0;
for (int i = 1; i < N; i++) {
count = count + (N - 1) / i;
}
cout << count << endl;
} | [["-", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 61 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n;
cin >> n;
ll ans = 0;
for (int c = 1; c < n; c++) {
int num = n - c;
int l = sqrt(num);
for (int i = 1; i <= l; ++i) {
if (num % i == 0)
if (i == l) {
ans++;
} else {
a... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n;
cin >> n;
ll ans = 0;
for (int c = 1; c < n; c++) {
int num = n - c;
int l = sqrt(num);
for (int i = 1; i <= l; ++i) {
if (num % i == 0)
if (num / i == i) {
ans++;
} else {
... | [["+", 64, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["+", 64, 57, 15, 339, 51, 16, 31, 16, 17, 85], ["-", 0, 57, 64, 57, 15, 339, 51, 16, 12, 22], ["+", 0, 57, 64, 57, 15, 339, 51, 16, 12, 22]] | 1 | 108 |
n = int(input())
cnt = 0
for i in range(3,n):
for j in range(1,n//i+1):
if i * j < n:
cnt +=1
print(cnt+n-1+n//2-1)
| n = int(input())
cnt = 0
for i in range(3,n):
for j in range(1,n//i+1):
if i * j < n:
cnt +=1
print(cnt+n-1+(n-1)//2) | [["+", 3, 4, 0, 657, 12, 657, 31, 23, 0, 24], ["-", 3, 4, 0, 657, 31, 657, 12, 657, 17, 676], ["-", 3, 4, 0, 657, 31, 657, 12, 657, 12, 612], ["+", 3, 4, 0, 657, 12, 657, 31, 23, 0, 25], ["+", 0, 652, 3, 4, 0, 657, 12, 657, 17, 676], ["+", 0, 652, 3, 4, 0, 657, 12, 657, 12, 612]] | 5 | 59 |
N = int(input())
k = 0
for s in range(1,N) :
k = (N-1) // s
t += k
print(k) | N = int(input())
k=0
for s in range(1,N):
k += (N-1) // s
print (k)
| [["-", 0, 7, 8, 196, 0, 1, 0, 662, 0, 32], ["+", 0, 7, 8, 196, 0, 1, 0, 677, 17, 107], ["-", 0, 7, 8, 196, 0, 1, 0, 677, 31, 22], ["-", 0, 7, 8, 196, 0, 1, 0, 677, 17, 107], ["-", 0, 7, 8, 196, 0, 1, 0, 677, 12, 22]] | 5 | 37 |
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
int total = 1;
for (int a = 1; a < n; ++a) {
total += (n - 1) / a;
}
cout << total << endl;
} | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
int total = 0;
for (int a = 1; a < n; ++a) {
total += (n - 1) / a;
}
cout << total << endl;
} | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 60 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
#define rep(i, n) for (int i = 0; i < n; ++i)
main() {
int n;
cin >> n;
if (n == 2) {
cout << 2 << endl;
return 0;
}
int ans = 0;
for (int i = 1; i < n; i++) {
ans += (n - 1) / i;
}
cout << ans << ... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
#define rep(i, n) for (int i = 0; i < n; ++i)
main() {
int n;
cin >> n;
if (n == 2) {
cout << 1 << endl;
return 0;
}
int ans = 0;
for (int i = 1; i < n; i++) {
ans += (n - 1) / i;
}
cout << ans << ... | [["-", 64, 9, 0, 1, 0, 16, 31, 16, 12, 13], ["+", 64, 9, 0, 1, 0, 16, 31, 16, 12, 13]] | 1 | 96 |
import math
N = int(input())
ans = 0
ve = math.floor(math.sqrt(N))
for st in range(ve):
tmp = math.floor(N/(st+1)-0.000001)
score = 2*(tmp - st)
if score > 0:
score -= 1
ans += score | import math
N = int(input())
ans = 0
ve = math.floor(math.sqrt(N))
for st in range(ve):
tmp = math.floor(N/(st+1)-0.000001)
score = 2*(tmp - st)
if score > 0:
score -= 1
ans += score
print(ans) | [["+", 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 | 70 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
#define rep(i, n) for (ll i = 0; i < n; ++i)
#define ocut cout
#define ouct cout
#define itn int
struct Union {
vector<ll> par;
Union(ll a) { par = vector<ll>(a, -1); }
ll find(ll a) {
if (par[a] < 0) {
... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
#define rep(i, n) for (ll i = 0; i < n; ++i)
#define ocut cout
#define ouct cout
#define itn int
struct Union {
vector<ll> par;
Union(ll a) { par = vector<ll>(a, -1); }
ll find(ll a) {
if (par[a] < 0) {
... | [["-", 0, 1, 0, 2, 3, 4, 0, 16, 17, 33], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["-", 0, 1, 0, 2, 3, 4, 0, 25, 0, 35]] | 1 | 668 |
#include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(), (x).end()
#define ll long long
#define ld long double
#define pb push_back
#define FR first
#define SC second
#define MOD 1000000007
#define LLMN LLONG_MIN
#define LLMX LLONG_MAX
#define LDMX LDBL_MAX
#define LDMN LDBL_MIN
#define MAX 1000000
#d... | #include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(), (x).end()
#define ll long long
#define ld long double
#define pb push_back
#define FR first
#define SC second
#define MOD 1000000007
#define LLMN LLONG_MIN
#define LLMX LLONG_MAX
#define LDMX LDBL_MAX
#define LDMN LDBL_MIN
#define MAX 1000010
#d... | [["-", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["-", 8, 9, 0, 7, 15, 16, 31, 16, 31, 22], ["-", 8, 9, 0, 7, 15, 16, 31, 16, 17, 48]] | 1 | 199 |
n = gets.to_i - 1
count = 0
for i in 1..n do
count += (n-1)/i
end
p count | n = gets.to_i - 1
count = 0
for i in 1..n do
count += n/i
end
p count | [["-", 8, 170, 0, 755, 12, 738, 31, 739, 0, 24], ["-", 0, 755, 12, 738, 31, 739, 0, 738, 17, 33], ["-", 0, 755, 12, 738, 31, 739, 0, 738, 12, 612], ["-", 8, 170, 0, 755, 12, 738, 31, 739, 0, 25]] | 4 | 29 |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int n;
cin >> n;
long long ans = 0, podwojne = 0;
for (int i = 1; i < n; i++) {
for (int j = 1; j <= i; j++) {
if (j * i < n) {
ans++;
if (n / i == i) {
pod... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int n;
cin >> n;
long long ans = 0, podwojne = 0;
for (int i = 1; i < n; i++) {
for (int j = 1; j <= i; j++) {
if (j * i < n) {
ans++;
if (j == i) {
podwojn... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 85], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22], ["+", 64, 9, 0, 57, 15, 339, 51, 16, 31, 22]] | 1 | 128 |
n = int(input()) # nは入力回数
a = n-1
count = 0
d = 0
for l in range(n):
d = int(a/(l+1))
if d > (l+1):
count += (d-l-1)*2+1
else:
break
print(count) | n = int(input()) # nは入力回数
a = n-1
count = 0
d = 0
for l in range(n):
d = int(a/(l+1))
if d >= (l+1):
count += (d-l-1)*2+1
else:
break
print(count) | [["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 20]] | 5 | 69 |
def main():
n = int(input())
cnt = 0
same = 0
for a in range(1, n):
for b in range(a, n):
if a * b >= n:
break
cnt += 1
if a == b:
same += 0
print((cnt - same) * 2 + same)
main()
|
def main():
n = int(input())
cnt = 0
same = 0
for a in range(1, n):
for b in range(a, n):
if a * b >= n:
break
cnt += 1
if a == b:
same += 1
print((cnt - same) * 2 + same)
main()
| [["-", 0, 57, 64, 196, 0, 1, 0, 677, 12, 612], ["+", 0, 57, 64, 196, 0, 1, 0, 677, 12, 612]] | 5 | 73 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.