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, tmp;
int flg = 0;
cin >> n;
vector<int> a(n);
vector<int> prime(1000001, 1);
bitset<1000001> prime_num;
prime_num.set();
for (int i = 0; i < n; i++) {
cin >> a[i];
if (a[i] == 1) {
if (flg == 0) {
flg++;
} els... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, tmp;
int flg = 0;
cin >> n;
vector<int> a(n);
vector<int> prime(1000001, 1);
bitset<1000001> prime_num;
prime_num.set();
for (int i = 0; i < n; i++) {
cin >> a[i];
if (a[i] == 1) {
if (flg == 0) {
flg++;
} els... | [["-", 0, 9, 0, 1, 0, 16, 31, 16, 12, 13], ["+", 0, 9, 0, 1, 0, 16, 31, 16, 12, 13]] | 1 | 225 |
#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
// const long long MOD = 998244353;
const long long INF_LL = 1e18 + 11;
const int INF_int = 1e9 + 11;
#define ll long long
#define rep(i, n) for (int i = 0; i < n; i++)
#define lrep(i, n) for (long long i = 0; i < n; i++)
#define All(a) a.begi... | #include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
// const long long MOD = 998244353;
const long long INF_LL = 1e18 + 11;
const int INF_int = 1e9 + 11;
#define ll long long
#define rep(i, n) for (int i = 0; i < n; i++)
#define lrep(i, n) for (long long i = 0; i < n; i++)
#define All(a) a.begi... | [["-", 0, 2, 3, 4, 0, 2, 3, 4, 0, 22], ["+", 0, 2, 3, 4, 0, 2, 3, 4, 0, 22]] | 1 | 296 |
#include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < n; ++i)
#define all(v) v.begin(), v.end()
using namespace std;
using ll = long long;
typedef pair<int, int> P;
const int INF = 1001001001;
const long double PI = (acos(-1));
const int mod = 1e9 + 7;
const int vx[6] = {0, 1, 0, -1, 1, -1};
const int vy[6] =... | #include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < n; ++i)
#define all(v) v.begin(), v.end()
using namespace std;
using ll = long long;
typedef pair<int, int> P;
const int INF = 1001001001;
const long double PI = (acos(-1));
const int mod = 1e9 + 7;
const int vx[6] = {0, 1, 0, -1, 1, -1};
const int vy[6] =... | [["-", 0, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["-", 0, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 0, 9, 0, 57, 15, 339, 51, 16, 17, 79], ["+", 0, 9, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 316 |
#include <bits/stdc++.h>
#define ll long long int
#define ld long double
#define fast \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
co... | #include <bits/stdc++.h>
#define ll long long int
#define ld long double
#define fast \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
co... | [["-", 64, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 64, 9, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 289 |
require "prime"
lines = []
while line = gets
lines << line.chomp.split(' ').map(&:to_i)
end
N = lines[0][0]
Max = 10 ** 6
a = []
for i in 1..Max do
a[i-1] = 0
end
lines[1].each do |i|
a[i-1] = 1
end
for i in 1..Max do
if a[i-1] == 1 then
j = 2
while i * j <= Max do
a[i*j-1] = 0
j += 1
... | lines = []
while line = gets
lines << line.chomp.split(' ').map(&:to_i)
end
N = lines[0][0]
Max = 10 ** 6
a = []
for i in 1..Max do
a[i-1] = 0
end
lines[1].each do |i|
a[i-1] += 1
end
for i in 1..Max do
if a[i-1] >= 1 then
j = 2
while i * j <= Max do
a[i*j-1] = 0
j += 1
end
end
en... | [["-", 36, 36, 36, 36, 0, 493, 0, 652, 735, 22], ["-", 0, 493, 0, 652, 3, 4, 0, 557, 0, 62], ["-", 0, 493, 0, 652, 3, 4, 0, 557, 0, 6], ["-", 0, 652, 196, 737, 8, 736, 0, 662, 0, 32], ["+", 0, 652, 196, 737, 8, 736, 0, 755, 17, 107], ["-", 0, 88, 8, 170, 0, 121, 15, 738, 17, 60], ["+", 0, 88, 8, 170, 0, 121, 15, 738, 1... | 4 | 154 |
#include <algorithm>
#include <cstdlib>
#include <iostream>
using namespace std;
#define SIZE 1000010
int main(void) {
int N;
cin >> N;
int *A = (int *)malloc(sizeof(int) * N);
for (int i = 0; i < N; i++) {
cin >> A[i];
}
sort(A, A + N);
bool *ok = (bool *)malloc(sizeof(bool) * SIZE);
for (int i =... | #include <algorithm>
#include <cstdlib>
#include <iostream>
using namespace std;
#define SIZE 1000010
int main(void) {
int N;
cin >> N;
int *A = (int *)malloc(sizeof(int) * N);
for (int i = 0; i < N; i++) {
cin >> A[i];
}
sort(A, A + N);
bool *ok = (bool *)malloc(sizeof(bool) * SIZE);
for (int i =... | [["+", 51, 91, 28, 69, 341, 342, 0, 69, 28, 22], ["+", 28, 69, 341, 342, 0, 69, 341, 342, 0, 70], ["+", 28, 69, 341, 342, 0, 69, 341, 342, 0, 73], ["+", 0, 1, 0, 11, 31, 69, 341, 342, 0, 70], ["+", 0, 11, 31, 69, 341, 342, 0, 69, 28, 22], ["+", 31, 69, 341, 342, 0, 69, 341, 342, 0, 73]] | 1 | 250 |
#include <bits/stdc++.h>
//#include <string>
using namespace std;
#define typeof(x) __typeof__(x)
#define bit(x, i) (x & (1 << i)) // select the bit of position i of x
#define lowbit(x) ((x) & ((x) ^ ((x)-1))) // get the lowest bit of x
#define hBit(msb, n) ... | #include <bits/stdc++.h>
//#include <string>
using namespace std;
#define typeof(x) __typeof__(x)
#define bit(x, i) (x & (1 << i)) // select the bit of position i of x
#define lowbit(x) ((x) & ((x) ^ ((x)-1))) // get the lowest bit of x
#define hBit(msb, n) ... | [["-", 8, 9, 0, 57, 75, 76, 0, 9, 0, 46], ["+", 8, 9, 0, 57, 75, 76, 0, 9, 0, 46]] | 1 | 1,076 |
def main():
N = int(input())
A = list(map(int, input().split()))
d = dict()
for v in A:
d[v] = d.get(v, 0) + 1
if 1 in d:
if d[1] == 1: return 1
else: return 0
A = list(set(A))
A.sort()
s = set()
ans = 0
for i in range(N):
if d[A[i]] == 1:
... | def main():
N = int(input())
A = list(map(int, input().split()))
d = dict()
for v in A:
d[v] = d.get(v, 0) + 1
if 1 in d:
if d[1] == 1: return 1
else: return 0
A = list(set(A))
A.sort()
s = set()
ans = 0
for i in range(len(A)):
if d[A[i]] == 1:
... | [["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 22], ["+", 0, 7, 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, 22], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 173 |
#include <stdio.h>
int lb(int l, int r, long long n, long long *d) {
int m = (l + r) / 2;
if (l == r)
return m;
return n <= d[m] ? lb(l, m, n, d) : lb(m + 1, r, n, d);
}
int ub(int l, int r, long long n, long long *d) {
int m = (l + r) / 2;
if (l == r)
return m;
return n < d[m] ? ub(l, m, n, d) : ub... | #include <stdio.h>
int lb(int l, int r, long long n, long long *d) {
int m = (l + r) / 2;
if (l == r)
return m;
return n <= d[m] ? lb(l, m, n, d) : lb(m + 1, r, n, d);
}
int ub(int l, int r, long long n, long long *d) {
int m = (l + r) / 2;
if (l == r)
return m;
return n < d[m] ? ub(l, m, n, d) : ub... | [["-", 0, 7, 8, 9, 0, 57, 64, 9, 0, 45], ["-", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35], ["-", 8, 9, 0, 57, 64, 9, 0, 116, 0, 117], ["-", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46]] | 0 | 644 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int INF = 1e9;
const int MOD = 1e9 + 7;
const ll LINF = 1e18;
ll cnt[1000010] = {};
int main() {
ll n;
cin >> n;
vector<ll> a(n);
for (ll i = 0; i < n; ++i) {
cin >> a[i];
}
sort(a.begin(), a.end());
for (ll i = 0; i < n; ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int INF = 1e9;
const int MOD = 1e9 + 7;
const ll LINF = 1e18;
ll cnt[1000010] = {};
int main() {
ll n;
cin >> n;
vector<ll> a(n);
for (ll i = 0; i < n; ++i) {
cin >> a[i];
}
sort(a.begin(), a.end());
for (ll i = 0; i < n; ... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 238 |
#include <bits/stdc++.h>
#define int long long int
#define ii pair<int, int>
#define fi first
#define se second
#define mp make_pair
#define pb push_back
using namespace std;
#define output(x) \
for (auto a : x) ... | #include <bits/stdc++.h>
#define int long long int
#define ii pair<int, int>
#define fi first
#define se second
#define mp make_pair
#define pb push_back
using namespace std;
#define output(x) \
for (auto a : x) ... | [["-", 49, 53, 54, 55, 0, 356, 0, 42, 0, 13], ["+", 49, 53, 54, 55, 0, 356, 0, 42, 0, 13]] | 1 | 587 |
#include <bits/stdc++.h>
using namespace std;
int n, a[2333333], vis[2333333], ans;
int main() {
ios::sync_with_stdio(0);
cin >> n;
for (int i = 1; i <= n; i++)
cin >> a[i], vis[a[i]]++;
for (int i = 1; i <= n; i++) {
int flg = 1;
for (int j = 2; j * j <= a[i]; j++)
if (a[i] % j == 0) {
... | #include <bits/stdc++.h>
using namespace std;
int n, a[2333333], vis[2333333], ans;
int main() {
ios::sync_with_stdio(0);
cin >> n;
for (int i = 1; i <= n; i++)
cin >> a[i], vis[a[i]]++;
for (int i = 1; i <= n; i++) {
int flg = 1;
for (int j = 1; j * j <= a[i]; j++)
if (a[i] % j == 0) {
... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 216 |
#include <bits/stdc++.h>
//#include <boost/multiprecision/cpp_int.hpp>
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
#pragma GCC optimize("O3")
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPP(i, n) for (int i = 1; i <= n; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#d... | #include <bits/stdc++.h>
//#include <boost/multiprecision/cpp_int.hpp>
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
#pragma GCC optimize("O3")
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPP(i, n) for (int i = 1; i <= n; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#d... | [["-", 8, 9, 0, 57, 64, 9, 0, 116, 0, 117], ["-", 8, 9, 0, 57, 64, 9, 0, 116, 0, 35]] | 1 | 470 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define INF 1LL << 62
#define inf 1000000007
bool ch[1000010], ch2[1000010];
ll b[1000010];
int main() {
ll n, a[200010];
cin >> n;
for (ll i = 0; i < n; i++) {
cin >> a[i];
b[a[i]]++;
}
for (ll i = 0; i < n; i++) {
ll now = a[i]... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define INF 1LL << 62
#define inf 1000000007
bool ch[1000010], ch2[1000010];
ll b[1000010];
int main() {
ll n, a[200010];
cin >> n;
for (ll i = 0; i < n; i++) {
cin >> a[i];
b[a[i]]++;
}
for (ll i = 0; i < n; i++) {
ll now = a[i]... | [["-", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94], ["+", 8, 9, 0, 57, 64, 9, 0, 116, 0, 117]] | 1 | 229 |
#include "algorithm"
#include "cmath"
#include "cstdio"
#include "cstring"
#include "iostream"
#include "map"
#include "queue"
#include "set"
#include "vector"
using namespace std;
#define MAXN 1000006
//#define int long long
#define rep(i, a, b) for (int i = (a), i##end = (b); i <= i##end; ++i)
#define per(i, a, b) fo... | #include "algorithm"
#include "cmath"
#include "cstdio"
#include "cstring"
#include "iostream"
#include "map"
#include "queue"
#include "set"
#include "vector"
using namespace std;
#define MAXN 1000006
//#define int long long
#define rep(i, a, b) for (int i = (a), i##end = (b); i <= i##end; ++i)
#define per(i, a, b) fo... | [["-", 8, 9, 0, 9, 0, 1, 0, 11, 17, 32], ["-", 8, 9, 0, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 9, 0, 1, 0, 27, 17, 29]] | 1 | 249 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define per(i, n) for (ll i = n - 1; i >= 0; i--)
#define REP(i, n) for (ll i = 1; i < n; i++)
#define PER(i, n) for (ll i = n; i >= 1; i--)
#define sz(x) int(x.size())
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define per(i, n) for (ll i = n - 1; i >= 0; i--)
#define REP(i, n) for (ll i = 1; i < n; i++)
#define PER(i, n) for (ll i = n; i >= 1; i--)
#define sz(x) int(x.size())
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(... | [["-", 51, 2, 3, 4, 0, 2, 3, 4, 0, 22], ["+", 51, 2, 3, 4, 0, 2, 3, 4, 0, 22]] | 1 | 627 |
n = int(input())
a = list(map(int, input().split()))
a.sort()
box = [1] * (a[-1] + 1)
ans = 0
if n == 1:
print(1)
else:
for i in range(n):
if i == 0:
for j in range(a[-1] // a[i]):
box[a[i] * (j + 1)] = 0
if a[1] != a[0]:
ans += 1
elif i =... | n = int(input())
a = list(map(int, input().split()))
a.sort()
box = [1] * (a[-1] + 1)
ans = 0
if n == 1:
print(1)
else:
for i in range(n):
if i == 0:
for j in range(a[-1] // a[i]):
box[a[i] * (j + 1)] = 0
if a[1] != a[0]:
ans += 1
elif i =... | [["-", 8, 196, 0, 57, 75, 665, 15, 666, 667, 79], ["+", 8, 196, 0, 57, 75, 665, 15, 666, 667, 60]] | 5 | 259 |
#include <algorithm>
#include <iostream>
#include <map>
#include <set>
#include <vector>
using namespace std;
typedef long long int ll;
#define f first
#define s second
int main() {
int n;
cin >> n;
vector<int> a(n), v(n);
int cnt[1000001] = {0};
for (int i = 0; i < n; i++) {
cin >> a[i];
++cnt[a[i]];... | #include <algorithm>
#include <iostream>
#include <map>
#include <set>
#include <vector>
using namespace std;
typedef long long int ll;
#define f first
#define s second
int main() {
int n;
cin >> n;
vector<int> a(n), v(n);
int cnt[1000001] = {0};
for (int i = 0; i < n; i++) {
cin >> a[i];
++cnt[a[i]];... | [["-", 8, 57, 15, 339, 51, 16, 12, 16, 17, 47], ["+", 8, 57, 15, 339, 51, 16, 12, 16, 17, 60]] | 1 | 322 |
import java.io.*;
import java.util.*;
public class Main {
static void main() throws Exception {
int maxn = 1000001;
int n = sc.nextInt();
int[] in = new int[n];
int[] occ = new int[maxn];
for (int i = 0; i < n; i++) {
in[i] = sc.nextInt();
occ[in[i]]++;
}
boolean[] yes = new b... | import java.io.*;
import java.util.*;
public class Main {
static void main() throws Exception {
int maxn = 1000001;
int n = sc.nextInt();
int[] in = new int[n];
int[] occ = new int[maxn];
for (int i = 0; i < n; i++) {
in[i] = sc.nextInt();
occ[in[i]]++;
}
boolean[] yes = new b... | [["-", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["+", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499]] | 3 | 973 |
n = int(input())
a = list(map(int,input().split()))
if n == 1:
print(1)
exit()
flag = [True for i in range(10**6+1)]
a.sort()
for i in range(n):
if flag[a[i]] == False:
continue
if i >= 1:
if a[i] == a[i-1]:
continue
for j in range(2,(10**6)//a[i]+1):
flag[a[i]*j]... | n = int(input())
a = list(map(int,input().split()))
if n == 1:
print(1)
exit()
flag = [True for i in range(10**6+1)]
a.sort()
for i in range(n):
if flag[a[i]] == False:
continue
if i >= 1:
if a[i] == a[i-1]:
continue
for j in range(2,(10**6)//a[i]+1):
flag[a[i]*j]... | [["-", 0, 57, 64, 196, 0, 57, 15, 666, 667, 60], ["-", 0, 57, 64, 196, 0, 57, 15, 666, 0, 612], ["+", 0, 57, 64, 196, 0, 57, 15, 666, 667, 18], ["+", 64, 196, 0, 57, 15, 666, 0, 657, 31, 22], ["+", 64, 196, 0, 57, 15, 666, 0, 657, 17, 33], ["+", 64, 196, 0, 57, 15, 666, 0, 657, 12, 612]] | 5 | 194 |
import java.util.Arrays;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int A[] = new int[N];
int count = 0;
Set<Integer> set = new HashSet<Integer>(... | import java.util.Arrays;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int A[] = new int[N];
int count = 0;
Set<Integer> set = new HashSet<Integer>(... | [["-", 8, 196, 0, 57, 15, 15, 0, 16, 17, 60], ["-", 8, 196, 0, 57, 15, 15, 0, 16, 12, 499], ["+", 8, 196, 0, 57, 15, 15, 0, 16, 17, 79], ["+", 8, 196, 0, 57, 15, 15, 0, 16, 12, 499]] | 3 | 323 |
#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int INF = 1e9;
const ll MOD = 1e9 + 7;
const ll MOD2 = 998244353;
const ll LINF = 1e18;
#define y0 y3487465
#define y1 y8687969
#define j0 j1347829
#define j1 j234892
#define next asdnext
#define prev asdprev
#define MP... | #define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int INF = 1e9;
const ll MOD = 1e9 + 7;
const ll MOD2 = 998244353;
const ll LINF = 1e18;
#define y0 y3487465
#define y1 y8687969
#define j0 j1347829
#define j1 j234892
#define next asdnext
#define prev asdprev
#define MP... | [["-", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94], ["+", 8, 9, 0, 57, 64, 9, 0, 116, 0, 117]] | 1 | 323 |
//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
#define mii map<int, int>
#define mll map<ll, ll>
#define pii pair<int, int>
#define pll pair<ll, ll>
#define vi vector<int>
#define vd vector<double>
#define vll vector<ll>
#define fi first
#define se seco... | //#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
#define mii map<int, int>
#define mll map<ll, ll>
#define pii pair<int, int>
#define pll pair<ll, ll>
#define vi vector<int>
#define vd vector<double>
#define vll vector<ll>
#define fi first
#define se seco... | [["+", 64, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 79], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 22]] | 1 | 359 |
N = int(input())
A = [int(n) for n in input().split()]
seen = set()
A_set = set()
A_largest = 0
for a in A:
if a > A_largest:
A_largest = a
if a not in seen:
A_set.add(a)
seen.add(a)
else:
if a in A_set:
A_set.remove(a)
for b in range(1, A_largest+1):
if b i... | N = int(input())
A = [int(n) for n in input().split()]
seen = set()
A_set = set()
A_largest = 0
for a in A:
if a > A_largest:
A_largest = a
if a not in seen:
A_set.add(a)
seen.add(a)
else:
if a in A_set:
A_set.remove(a)
for b in range(1, A_largest+1):
if b i... | [["-", 0, 7, 8, 196, 0, 57, 15, 666, 0, 22], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 0, 22]] | 5 | 134 |
#include <bits/stdc++.h>
#define FORR(i, a, b) for (int i = (a); i <= (b); ++i)
#define FORD(i, a, b) for (int i = (b); i >= (a); --i)
#define REPP(i, a, b) for (int i = (a); i < (b); ++i)
#define REPD(i, a, b) for (int i = (b); i > (a); --i)
#define fi first
#define se second
#define mp make_pair
#define pb push_back
... | #include <bits/stdc++.h>
#define FORR(i, a, b) for (int i = (a); i <= (b); ++i)
#define FORD(i, a, b) for (int i = (b); i >= (a); --i)
#define REPP(i, a, b) for (int i = (a); i < (b); ++i)
#define REPD(i, a, b) for (int i = (b); i > (a); --i)
#define fi first
#define se second
#define mp make_pair
#define pb push_back
... | [["-", 0, 7, 8, 9, 0, 57, 64, 9, 0, 45], ["-", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46]] | 1 | 362 |
#include <bits/stdc++.h>
using namespace std;
constexpr long long int mod = 1000000007, MOD = 998244353;
constexpr double PI = 3.14159265358979323846;
int main() {
int N;
cin >> N;
map<int, int> U;
queue<int> Q;
for (size_t i = 0; i < N; i++) {
int p;
cin >> p;
U[p] = U[p] + 1;
Q.push(p);
}... | #include <bits/stdc++.h>
using namespace std;
constexpr long long int mod = 1000000007, MOD = 998244353;
constexpr double PI = 3.14159265358979323846;
int main() {
int N;
cin >> N;
map<int, int> U;
queue<int> Q;
for (size_t i = 0; i < N; i++) {
int p;
cin >> p;
U[p] = U[p] + 1;
Q.push(p);
}... | [["-", 0, 57, 64, 9, 0, 1, 0, 16, 12, 13], ["+", 0, 57, 64, 9, 0, 1, 0, 16, 12, 13]] | 1 | 255 |
// itne me hi thakk gaye?
#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("-O3")
#define ll long long
#define ull unsigned long long
using ld = long double;
const ll mod = 1e9 + 7;
const ll inf = 1e18;
const ll rk = 256;
const ll mod2 = 998244353;
const ld PI = 3.141592653589793;
#define pb push_back... | // itne me hi thakk gaye?
#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("-O3")
#define ll long long
#define ull unsigned long long
using ld = long double;
const ll mod = 1e9 + 7;
const ll inf = 1e18;
const ll rk = 256;
const ll mod2 = 998244353;
const ld PI = 3.141592653589793;
#define pb push_back... | [["-", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94], ["-", 8, 9, 0, 57, 64, 9, 0, 93, 0, 35], ["+", 0, 338, 8, 9, 0, 57, 75, 76, 0, 95], ["+", 8, 9, 0, 57, 75, 76, 0, 9, 0, 45], ["+", 0, 338, 8, 9, 0, 57, 64, 9, 0, 46]] | 1 | 666 |
#include <bits/stdc++.h>
using namespace std;
using int64 = long long;
const int mod = 1e9 + 7;
// const int mod = 998244353;
const int64 infll = (1LL << 62) - 1;
const int inf = (1 << 30) - 1;
struct IoSetup {
IoSetup() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
cout << fixed << setprecision(10... | #include <bits/stdc++.h>
using namespace std;
using int64 = long long;
const int mod = 1e9 + 7;
// const int mod = 998244353;
const int64 infll = (1LL << 62) - 1;
const int inf = (1 << 30) - 1;
struct IoSetup {
IoSetup() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
cout << fixed << setprecision(10... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 7, 15, 16, 12, 2, 63, 118, 28, 22], ["+", 0, 7, 15, 16, 12, 2, 63, 118, 17, 131], ["+", 0, 7, 15, 16, 12, 2, 63, 118, 119, 120], ["+", 0, 7, 15, 16, 12, 2, 3, 4, 0, 24], ["+", 0, 7, 15, 16, 12, 2, 3, 4, 0, 25]] | 1 | 890 |
// I am so vegetable
//#define err
#pragma GCC optimize(2)
#include <bits/stdc++.h>
#define FIO ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define PB push_back
#define IN insert
#define ER erase
#define CT count
#define EP empty
#define _for(i, a, b) for (int i = (a); i < (b); ++i)
#define _rfor(i, a, b) for ... | // I am so vegetable
//#define err
#pragma GCC optimize(2)
#include <bits/stdc++.h>
#define FIO ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define PB push_back
#define IN insert
#define ER erase
#define CT count
#define EP empty
#define _for(i, a, b) for (int i = (a); i < (b); ++i)
#define _rfor(i, a, b) for ... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47]] | 1 | 619 |
#pragma GCC optimize("O3")
#include "bits/stdc++.h"
using namespace std;
using ll = long long int;
#define all(v) (v).begin(), (v).end()
#define repeat(cnt, l) \
for (typename remove_const< \
typename... | #pragma GCC optimize("O3")
#include "bits/stdc++.h"
using namespace std;
using ll = long long int;
#define all(v) (v).begin(), (v).end()
#define repeat(cnt, l) \
for (typename remove_const< \
typename... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 1,471 |
// ~zaletaet~
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/rope>
#define fi first
#define se second
#define sz(x) int(x.size())
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define pb push_bac... | // ~zaletaet~
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/rope>
#define fi first
#define se second
#define sz(x) int(x.size())
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define pb push_bac... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 598 |
n = int(input())
a = list(map(int, input().split()))
x = [False]*(10**6+1)
a.sort()
for i in range(1, n):
if a[i] == a[i-1]:
if x[a[i]]:
continue
else:
x[a[i]] = True
for r in range(a[i], 10 ** 6 + 1, a[i]):
x[i] = True
ans = 0
for v in a:
if... | n = int(input())
a = list(map(int, input().split()))
x = [False]*(10**6+1)
a.sort()
for i in range(1, n):
if a[i] == a[i-1]:
if x[a[i]]:
continue
else:
x[a[i]] = True
for r in range(a[i], 10 ** 6 + 1, a[i]):
x[r] = True
ans = 0
for v in a:
if... | [["-", 8, 196, 0, 1, 0, 662, 31, 206, 206, 22], ["+", 8, 196, 0, 1, 0, 662, 31, 206, 206, 22]] | 5 | 159 |
#include <bits/stdc++.h>
using namespace std;
const int sz = 1e6 + 5;
int cnt[sz];
int hit[sz];
int pos[sz];
int main() {
int N;
cin >> N;
memset(pos, -1, sizeof pos);
int dat[N];
for (int i = 0; i < N; ++i) {
cin >> dat[i];
pos[dat[i]] = i + 1;
++cnt[dat[i]];
}
for (int i = 1; i < sz; ++i) ... | #include <bits/stdc++.h>
using namespace std;
const int sz = 1e6 + 5;
int cnt[sz];
int hit[sz];
int pos[sz];
int main() {
int N;
cin >> N;
memset(pos, -1, sizeof pos);
int dat[N];
for (int i = 0; i < N; ++i) {
cin >> dat[i];
pos[dat[i]] = i + 1;
++cnt[dat[i]];
}
for (int i = 1; i < sz; ++i) ... | [["-", 8, 9, 0, 57, 64, 9, 0, 37, 0, 38], ["-", 8, 9, 0, 57, 64, 9, 0, 37, 0, 13], ["-", 8, 9, 0, 57, 64, 9, 0, 37, 0, 35]] | 1 | 223 |
#include <stdio.h>
#include <stdlib.h>
int asc(const void *a, const void *b) {
if (*(int *)a < *(int *)b)
return -1;
return 1;
}
int main() {
int n;
scanf("%d", &n);
int i, j, k;
int a[200005];
for (i = 0; i < n; i++)
scanf("%d", &a[i]);
qsort(a, n, sizeof(int), asc);
int c[1000006];
for (i ... | #include <stdio.h>
#include <stdlib.h>
int asc(const void *a, const void *b) {
if (*(int *)a < *(int *)b)
return -1;
return 1;
}
int main() {
int n;
scanf("%d", &n);
int i, j, k;
int a[200005];
for (i = 0; i < n; i++)
scanf("%d", &a[i]);
qsort(a, n, sizeof(int), asc);
int c[1000006];
for (i ... | [["-", 64, 9, 0, 57, 15, 23, 0, 16, 17, 18], ["+", 64, 9, 0, 57, 15, 23, 0, 16, 17, 79]] | 0 | 261 |
n = int(input())
a = list(map(int, input().split()))
l = [0] * 1000001
ans = 0
for i in range(n):
l[a[i]] += 1
for i in range(1, 1000001):
if l[i] > 0:
if l[i] == 1:
ans += 1
for j in range(2, 1000001//i + 1):
l[i * j] = 0
print(ans) | n = int(input())
a = list(map(int, input().split()))
l = [0] * 1000001
ans = 0
for i in range(n):
l[a[i]] += 1
for i in range(1, 1000001):
if l[i] > 0:
if l[i] == 1:
ans += 1
for j in range(2, 1000000//i + 1):
l[i * j] = 0
print(ans) | [["-", 12, 652, 3, 4, 0, 657, 31, 657, 31, 612], ["+", 12, 652, 3, 4, 0, 657, 31, 657, 31, 612]] | 5 | 107 |
#include "bits/stdc++.h"
using namespace std;
#ifdef LOCAL
#include "debug.h"
#define input \
freopen("input.txt", "r", stdin); \
freopen("output.txt", "w", stdout); ... | #include "bits/stdc++.h"
using namespace std;
#ifdef LOCAL
#include "debug.h"
#define input \
freopen("input.txt", "r", stdin); \
freopen("output.txt", "w", stdout); ... | [["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["-", 0, 7, 8, 9, 0, 1, 0, 11, 17, 32], ["-", 0, 7, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 7, 8, 9, 0, 1, 0, 27, 17, 29]] | 1 | 201 |
#include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> a(1000001);
int x = 1001001001, n, o = 0;
scanf("%d", &n);
for (int i = 0; i < n; i++) {
int t;
scanf("%d", &t);
x = min(x, t);
a[t]++;
}
while (x * x <= 1000000) {
for (int i = x * 2; i <= 1000000; i += x)
a[i... | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> a(1000001);
int x = 1001001001, n, o = 0;
scanf("%d", &n);
for (int i = 0; i < n; i++) {
int t;
scanf("%d", &t);
x = min(x, t);
a[t]++;
}
while (x <= 1000000) {
for (int i = x * 2; i <= 1000000; i += x)
a[i] = ... | [["-", 0, 52, 15, 339, 51, 16, 31, 16, 17, 48], ["-", 0, 52, 15, 339, 51, 16, 31, 16, 12, 22], ["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 169 |
#include <algorithm>
#include <cstdio>
#include <iostream>
using namespace std;
int n, a[200010], ans, cnt[1000010], num[1000010];
int main() {
cin >> n;
for (int i = 1; i <= n; i++) {
cin >> a[i];
num[a[i]]++;
}
sort(a + 1, a + 1 + n);
for (int i = 1; i <= n; i++) {
if (num[a[i]] > 0) {
cnt... | #include <algorithm>
#include <cstdio>
#include <iostream>
using namespace std;
int n, a[200010], ans, cnt[1000010], num[1000010];
int main() {
cin >> n;
for (int i = 1; i <= n; i++) {
cin >> a[i];
num[a[i]]++;
}
sort(a + 1, a + 1 + n);
for (int i = 1; i <= n; i++) {
if (num[a[i]] > 1) {
cnt... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 218 |
#include <bits/stdc++.h>
using namespace std;
// T+N
//#pragma GCC optimize ("O3")
//#pragma GCC target ("sse4")
#define endl "\n"
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
template <class T, class T2> inline bool chkmax(T &x, const T2 &y) {
return x < y ? x = y, 1 : 0;
}
template ... | #include <bits/stdc++.h>
using namespace std;
// T+N
//#pragma GCC optimize ("O3")
//#pragma GCC target ("sse4")
#define endl "\n"
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
template <class T, class T2> inline bool chkmax(T &x, const T2 &y) {
return x < y ? x = y, 1 : 0;
}
template ... | [["+", 15, 339, 51, 16, 31, 16, 31, 69, 28, 22], ["+", 51, 16, 31, 16, 31, 69, 341, 342, 0, 70], ["+", 51, 16, 31, 16, 31, 69, 341, 342, 0, 73]] | 1 | 379 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define pb push_back
#define dbg(x) cerr << #x << " " << x << "\n"
const int N = 1e6;
int cnt[1 + N];
int many[1 + N];
int a[1 + N];
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int n;
cin >> n;
for (int i = 1; i ... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define pb push_back
#define dbg(x) cerr << #x << " " << x << "\n"
const int N = 1e6;
int cnt[1 + N];
int many[1 + N];
int a[1 + N];
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int n;
cin >> n;
for (int i = 1; i ... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 202 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define int ll
// [a -> b-1]
#define reps(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
// [0 -> a-1]
#define rep(i, a) reps(i, 0, (a))
// [a-1 -> b]
#define rreps(i, a, b) for (int i = (int)((a)-1); i >= (int)(b); i--)
// [a-1 -> 0]
#define rre... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define int ll
// [a -> b-1]
#define reps(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
// [0 -> a-1]
#define rep(i, a) reps(i, 0, (a))
// [a-1 -> b]
#define rreps(i, a, b) for (int i = (int)((a)-1); i >= (int)(b); i--)
// [a-1 -> 0]
#define rre... | [["-", 0, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 0, 9, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 1,314 |
#pragma GCC optimize(3, "Ofast", "inline")
#include <bits/stdc++.h>
#define IOS ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define ms(a, b) memset(a, b, sizeof(a))
#define msn(a, n, b) \
for (int i = 0; i <= n; i++) ... | #pragma GCC optimize(3, "Ofast", "inline")
#include <bits/stdc++.h>
#define IOS ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define ms(a, b) memset(a, b, sizeof(a))
#define msn(a, n, b) \
for (int i = 0; i <= n; i++) ... | [["-", 0, 11, 12, 2, 3, 4, 0, 69, 28, 22], ["+", 0, 11, 12, 2, 3, 4, 0, 69, 28, 22]] | 1 | 1,928 |
#include <bits/stdc++.h>
#include <queue>
using namespace std;
typedef long long ll;
int main() {
int H, W, K;
cin >> H >> W >> K;
int si, sj, gi, gj;
cin >> si >> sj >> gi >> gj;
vector<vector<char>> pond(H + 2, vector<char>(W + 2));
for (int i = 1; i <= H; i++) {
for (int j = 1; j <= W; j++) {
c... | #include <bits/stdc++.h>
#include <queue>
using namespace std;
typedef long long ll;
int main() {
int H, W, K;
cin >> H >> W >> K;
int si, sj, gi, gj;
cin >> si >> sj >> gi >> gj;
vector<vector<char>> pond(H + 2, vector<char>(W + 2));
for (int i = 1; i <= H; i++) {
for (int j = 1; j <= W; j++) {
c... | [["-", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13]] | 1 | 779 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll gcdEx(ll a, ll b, ll *x, ll *y) {
if (!a) {
*x = 0;
*y = 1;
return b;
}
ll x1, y1, gcd = gcdEx(b % a, a, &x1, &y1);
*x = y1 - (b / a) * x1;
*y = x1;
return gcd;
}
ll modI(ll b, ll m) {
ll x, y;
gcdEx(b, m, &x, &y);
retu... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll gcdEx(ll a, ll b, ll *x, ll *y) {
if (!a) {
*x = 0;
*y = 1;
return b;
}
ll x1, y1, gcd = gcdEx(b % a, a, &x1, &y1);
*x = y1 - (b / a) * x1;
*y = x1;
return gcd;
}
ll modI(ll b, ll m) {
ll x, y;
gcdEx(b, m, &x, &y);
retu... | [["-", 8, 9, 0, 57, 64, 9, 0, 116, 0, 117], ["-", 8, 9, 0, 57, 64, 9, 0, 116, 0, 35]] | 1 | 865 |
#include <algorithm>
#include <cstdio>
int vis[1000005];
int a[200005];
int main() {
int n;
scanf("%d", &n);
for (int i = 1; i <= n; i++)
scanf("%d", &a[i]);
std::sort(a + 1, a + 1 + n);
int cnt = 0;
int upper = 1000000;
// same segment...
int p = 1;
while (p <= n) {
int u = a[p];
int np ... | #include <algorithm>
#include <cstdio>
int vis[1000005];
int a[200005];
int main() {
int n;
scanf("%d", &n);
for (int i = 1; i <= n; i++)
scanf("%d", &a[i]);
std::sort(a + 1, a + 1 + n);
int cnt = 0;
int upper = 1000000;
// same segment...
int p = 1;
while (p <= n) {
int u = a[p];
int np ... | [["-", 0, 52, 8, 9, 0, 43, 49, 50, 51, 22], ["+", 0, 52, 8, 9, 0, 43, 49, 50, 51, 22]] | 1 | 197 |
/*
Author: Alam Khan
AUST CSE 40th Batch
*/
#include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
typedef long long ll;
typedef pair<ll, ll> pll;
typedef vector<... | /*
Author: Alam Khan
AUST CSE 40th Batch
*/
#include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
typedef long long ll;
typedef pair<ll, ll> pll;
typedef vector<... | [["+", 64, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 79], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 22]] | 1 | 479 |
#include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <ctime>
#include <deque>
#include <float.h>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include... | #include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <ctime>
#include <deque>
#include <float.h>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include... | [["-", 15, 16, 12, 16, 31, 2, 3, 4, 0, 22], ["+", 12, 16, 31, 2, 3, 4, 0, 69, 28, 22], ["+", 31, 2, 3, 4, 0, 69, 341, 342, 0, 70], ["+", 31, 2, 3, 4, 0, 69, 341, 342, 0, 22], ["+", 31, 2, 3, 4, 0, 69, 341, 342, 0, 73]] | 1 | 719 |
#include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <utility>
#include <vector>
using namespace std;
typedef long long LL;
typedef pair<int, int> pii;
const int MAXN = 2 * 100005;
... | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <utility>
#include <vector>
using namespace std;
typedef long long LL;
typedef pair<int, int> pii;
const int MAXN = 2 * 100005;
... | [["-", 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 | 357 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> P;
typedef pair<ll, ll> Pll;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define srep(i, l, n) for (int i = l; i < (int)(n); i++)
#define drep(i, n) for (int i = (int)(n - 1); i >= 0; i--)
#define... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> P;
typedef pair<ll, ll> Pll;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define srep(i, l, n) for (int i = l; i < (int)(n); i++)
#define drep(i, n) for (int i = (int)(n - 1); i >= 0; i--)
#define... | [["-", 8, 9, 0, 57, 15, 339, 51, 91, 17, 111], ["-", 0, 338, 8, 9, 0, 57, 64, 116, 0, 117], ["-", 0, 338, 8, 9, 0, 57, 64, 116, 0, 35]] | 1 | 567 |
#include <iostream>
#include <vector>
const int MAXVAL = 1e2;
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
vector<int> a(n);
vector<int> cnt(MAXVAL + 1);
vector<int> ans(MAXVAL + 1, 1);
for (int i = 0; i < n; i++) {
cin >> a[i];
cnt[a[i]]++;
}
... | #include <iostream>
#include <vector>
const int MAXVAL = 1e6;
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
vector<int> a(n);
vector<int> cnt(MAXVAL + 1);
vector<int> ans(MAXVAL + 1, 1);
for (int i = 0; i < n; i++) {
cin >> a[i];
cnt[a[i]]++;
}
... | [["-", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13], ["+", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13]] | 1 | 208 |
#include <bits/stdc++.h>
using namespace std;
int m[1000005];
int d[1000005];
int main() {
int x, n;
scanf("%d", &n);
int a[n + 1];
for (int i = 0; i <= 1000000; i++)
m[i] = 0, d[i] = 0;
int tot = 0;
for (int i = 0; i < n; i++)
scanf("%d", &a[i]), m[a[i]]++;
;
for (int i = 1; i <= 1e6; i++) {
... | #include <bits/stdc++.h>
using namespace std;
int m[1000005];
int d[1000005];
int main() {
int x, n;
scanf("%d", &n);
int a[n + 1];
for (int i = 0; i <= 1000000; i++)
m[i] = 0, d[i] = 0;
int tot = 0;
for (int i = 0; i < n; i++)
scanf("%d", &a[i]), m[a[i]]++;
;
for (int i = 1; i <= 1e6; i++) {
... | [["-", 0, 57, 64, 9, 0, 1, 0, 27, 17, 29], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 17, 107], ["+", 64, 9, 0, 1, 0, 11, 12, 69, 28, 22], ["+", 0, 1, 0, 11, 12, 69, 341, 342, 0, 70], ["+", 0, 1, 0, 11, 12, 69, 341, 342, 0, 22], ["+", 0, 1, 0, 11, 12, 69, 341, 342, 0, 73]] | 1 | 241 |
#include "bits/stdc++.h"
using namespace std;
#define int long long
#define double long double
#define endl '\n'
#define vi vector<int>
#define vvi vector<vi>
#define vpii vector<pii>
#define vpipii vector<pipii>
#define vpiipi vector<piipi>
#define pb push_back
#define pob pop_back
#define pii pair<int, int>
#define p... | #include "bits/stdc++.h"
using namespace std;
#define int long long
#define double long double
#define endl '\n'
#define vi vector<int>
#define vvi vector<vi>
#define vpii vector<pii>
#define vpipii vector<pipii>
#define vpiipi vector<piipi>
#define pb push_back
#define pob pop_back
#define pii pair<int, int>
#define p... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 60], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 47], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]] | 1 | 678 |
#include <bits/stdc++.h>
#define int long long
using namespace std;
const int MAXN = 1e6 + 1000;
bool ok[MAXN];
main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int N;
cin >> N;
memset(ok, true, sizeof(ok));
set<int> s;
for (int i = 0; i < N; i++) {
int n;
cin >> n;
if (s.count(n)... | #include <bits/stdc++.h>
#define int long long
using namespace std;
const int MAXN = 1e6 + 1000;
bool ok[MAXN];
main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int N;
cin >> N;
memset(ok, true, sizeof(ok));
set<int> s;
for (int i = 0; i < N; i++) {
int n;
cin >> n;
if (s.count(n)... | [["-", 0, 338, 8, 9, 0, 57, 64, 9, 0, 45], ["-", 0, 57, 64, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 338, 8, 9, 0, 7, 15, 16, 17, 18], ["-", 0, 338, 8, 9, 0, 57, 64, 9, 0, 46]] | 1 | 168 |
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
typedef long long ll;
const int N = 2e5 + 4;
const int A = 1e6 + 4;
int vis[N];
int n, a[N];
inline int read() {
int x = 0;
char c = getchar();
while (c < '0' || c > '9')
c = getchar();
while (c >= '0' && c <=... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
typedef long long ll;
const int N = 2e5 + 4;
const int A = 1e6 + 4;
int vis[A];
int n, a[N];
inline int read() {
int x = 0;
char c = getchar();
while (c < '0' || c > '9')
c = getchar();
while (c >= '0' && c <=... | [["-", 36, 36, 0, 30, 0, 43, 49, 80, 81, 22], ["+", 36, 36, 0, 30, 0, 43, 49, 80, 81, 22], ["+", 75, 76, 0, 57, 75, 76, 0, 9, 0, 45], ["+", 0, 57, 75, 76, 0, 9, 0, 1, 0, 35], ["+", 0, 57, 75, 76, 0, 9, 0, 116, 0, 117], ["+", 75, 76, 0, 57, 75, 76, 0, 9, 0, 46]] | 1 | 325 |
import math
import collections
import itertools
import copy
def YesNo(Bool):
if(Bool):
print("YES")
else:
print("NO")
return
def resolve():
A,V=map(int,input().split())
B,W=map(int,input().split())
T=int(input())
if(A<B and V<=W):
print("NO")
return
i... | import math
import collections
import itertools
import copy
def YesNo(Bool):
if(Bool):
print("YES")
else:
print("NO")
return
def resolve():
A,V=map(int,input().split())
B,W=map(int,input().split())
T=int(input())
if(A<B and V<=W):
print("NO")
return
i... | [["-", 0, 57, 15, 23, 0, 679, 12, 666, 667, 20], ["+", 0, 57, 15, 23, 0, 679, 12, 666, 667, 19], ["-", 0, 57, 15, 23, 0, 666, 0, 657, 17, 72], ["+", 0, 57, 15, 23, 0, 666, 0, 657, 17, 33]] | 5 | 185 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
const int MOD = (int)1e9 + 7;
const int INF = (int)1e9 * 2;
int main() {
int a, v, b, w, t;
cin >> a >> v >> b >> w >> t;
cout << ((v - w) * t > abs(b - a) ? "YES" : ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
const int MOD = (int)1e9 + 7;
const int INF = (int)1e9 * 2;
int main() {
ll a, v, b, w, t;
cin >> a >> v >> b >> w >> t;
cout << ((v - w) * t >= abs(a - b) ? "YES" : ... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["-", 31, 16, 12, 23, 0, 41, 15, 16, 17, 47], ["+", 31, 16, 12, 23, 0, 41, 15, 16, 17, 20], ["-", 15, 16, 12, 2, 3, 4, 0, 16, 31, 22], ["-", 15, 16, 12, 2, 3, 4, 0, 16, 17, 33], ["+", 15, 16, 12, 2, 3, 4, 0, 16, 17, 33], ["+", 15, 16, ... | 1 | 108 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using ll = long long;
const ll M = 998244353;
int si[] = {-1, 0, 1, 0};
int sj[] = {0, -1, 0, 1};
int main() {
ll a, v, b, w, t;
cin >> a >> v;
cin >> b >> w;
cin >> t;
if (w >= v) {
cout << "NO" << endl;
... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using ll = long long;
const ll M = 998244353;
int si[] = {-1, 0, 1, 0};
int sj[] = {0, -1, 0, 1};
int main() {
ll a, v, b, w, t;
cin >> a >> v;
cin >> b >> w;
cin >> t;
if (w >= v) {
cout << "NO" << endl;
... | [["+", 15, 339, 51, 16, 31, 16, 31, 74, 0, 24], ["+", 51, 16, 31, 16, 31, 74, 39, 77, 39, 40], ["+", 15, 339, 51, 16, 31, 16, 31, 74, 0, 25], ["+", 15, 339, 51, 16, 31, 16, 12, 74, 0, 24], ["+", 51, 16, 31, 16, 12, 74, 39, 77, 39, 40], ["+", 15, 339, 51, 16, 31, 16, 12, 74, 0, 25]] | 1 | 158 |
a,v,b,w,t=map(int,open(0).read().split());print('YNEOS'[w>=v or t<-(-abs(a-b)//(w-v))::2]) | a,v,b,w,t=map(int,open(0).read().split());print('YNEOS'[w>=v or t<-(-abs(a-b)//(v-w))::2]) | [["-", 28, 23, 0, 657, 12, 23, 0, 657, 31, 22], ["-", 28, 23, 0, 657, 12, 23, 0, 657, 17, 33], ["+", 28, 23, 0, 657, 12, 23, 0, 657, 17, 33], ["+", 28, 23, 0, 657, 12, 23, 0, 657, 12, 22]] | 5 | 61 |
#!/usr/bin/env python
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
if v <= w:
print('NO')
exit()
if abs(b-a)//(v-w) > t:
print('NO')
exit()
print('YES')
| #!/usr/bin/env python
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
if v <= w:
print('NO')
exit()
if abs(b-a)/(v-w) > t:
print('NO')
exit()
print('YES')
| [["-", 0, 656, 0, 57, 15, 666, 0, 657, 17, 676], ["+", 0, 656, 0, 57, 15, 666, 0, 657, 17, 85]] | 5 | 86 |
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
print('YES' if (b-a)-(v-w)*t <= 0 else 'NO') | a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
print('YES' if abs(b-a)-(v-w)*t <= 0 else 'NO') | [["+", 0, 41, 0, 666, 0, 657, 31, 652, 63, 22]] | 5 | 66 |
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())
a = V*T+A
b = W*T+B
if V >= W:
if abs(A-B)/(V-W) <= T:
print("YES")
else:
print("NO")
else:
print("NO") | A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())
a = V*T+A
b = W*T+B
if V > W:
if abs(A-B)/(V-W) <= T:
print("YES")
else:
print("NO")
else:
print("NO") | [["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 20], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 47]] | 5 | 97 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long A, V, B, W, T;
cin >> A >> V >> B >> W >> T;
long long D1 = abs(A - B);
long long D2 = V - W * T;
if (D1 <= D2)
cout << "YES" << endl;
else
cout << "NO" << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
long long A, V, B, W, T;
cin >> A >> V >> B >> W >> T;
long long D1 = abs(A - B);
long long D2 = (V - W) * T;
if (D1 <= D2)
cout << "YES" << endl;
else
cout << "NO" << endl;
} | [["+", 0, 43, 49, 50, 51, 16, 31, 23, 0, 24], ["+", 0, 43, 49, 50, 51, 16, 31, 23, 0, 25]] | 1 | 80 |
#include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
int a, b, v, w;
int t;
int main() {
scanf("%d%d", &a, &v);
scanf("%d%d", &b, &w);
scanf("%d", &t);
if (v <= w)
printf("No");
else if (ceil((double)abs(a - b) / (v - w)) > t)
printf("No");
else
printf("Yes");
return 0;
... | #include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
int a, b, v, w;
int t;
int main() {
scanf("%d%d", &a, &v);
scanf("%d%d", &b, &w);
scanf("%d", &t);
if (v <= w)
printf("NO");
else if (ceil((double)abs(a - b) / (v - w)) > t)
printf("NO");
else
printf("YES");
return 0;
... | [["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 119 |
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
int main() {
LL a, b, v, w, t;
scanf("%lld%lld%lld%lld%lld", &a, &b, &v, &w, &t);
puts((v - w) * t >= abs(a - b) ? "YES" : "NO");
return 0;
} | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
int main() {
LL a, b, v, w, t;
scanf("%lld%lld%lld%lld%lld", &a, &v, &b, &w, &t);
puts((v - w) * t >= abs(a - b) ? "YES" : "NO");
return 0;
} | [["-", 0, 1, 0, 2, 3, 4, 0, 66, 28, 22], ["+", 0, 1, 0, 2, 3, 4, 0, 66, 28, 22]] | 1 | 79 |
A,V = map(int,input().split())
B,W = map(int,input().split())
N = int(input())
if W > V:
print('No')
else:
if abs(A-B) <= N*(V-W):
print('YES')
else:
print('NO')
| A,V = map(int,input().split())
B,W = map(int,input().split())
N = int(input())
if W > V:
print('NO')
else:
if abs(A-B) <= N*(V-W):
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 | 83 |
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
if w >= v:
print("NO")
elif (v - w)*3 >= b - a:
print("YES")
else:
print("NO")
| a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
if w >= v:
print("NO")
elif (v - w)*t >= abs(b - a):
print("YES")
else:
print("NO")
| [["-", 0, 57, 75, 665, 15, 666, 0, 657, 12, 612], ["+", 0, 57, 75, 665, 15, 666, 0, 657, 12, 22], ["+", 0, 57, 75, 665, 15, 666, 0, 652, 63, 22], ["+", 75, 665, 15, 666, 0, 652, 3, 4, 0, 24], ["+", 75, 665, 15, 666, 0, 652, 3, 4, 0, 25]] | 5 | 78 |
#include <bits/stdc++.h>
using namespace std;
int main() {
double A, B, V, W, T;
cin >> A >> V >> B >> W >> T;
if ((B - A) <= (V - W) * T) {
cout << "YES" << endl;
return 0;
}
cout << "NO" << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
double A, B, V, W, T;
cin >> A >> V >> B >> W >> T;
if (abs(B - A) <= (V - W) * T) {
cout << "YES" << endl;
return 0;
}
cout << "NO" << endl;
return 0;
}
| [["+", 0, 57, 15, 339, 51, 16, 31, 2, 63, 22]] | 1 | 75 |
from sys import stdin
rs = lambda : stdin.readline().strip()
ri = lambda : int(rs())
ril = lambda : list(map(int, rs().split()))
def main():
A, V = ril()
B, W = ril()
T = ri()
print('Yes' if abs(A - B) <= T * (V - W) else 'No')
if __name__ == '__main__':
main()
| from sys import stdin
rs = lambda : stdin.readline().strip()
ri = lambda : int(rs())
ril = lambda : list(map(int, rs().split()))
def main():
A, V = ril()
B, W = ril()
T = ri()
print('YES' if abs(A - B) <= T * (V - W) else 'NO')
if __name__ == '__main__':
main()
| [["-", 0, 652, 3, 4, 0, 41, 0, 557, 0, 6], ["+", 0, 652, 3, 4, 0, 41, 0, 557, 0, 6]] | 5 | 105 |
#include <bits/stdc++.h>
using namespace std;
int main() {
typedef long long ll;
ll a, v;
cin >> a >> v;
ll b, w;
cin >> b >> w;
ll t;
cin >> t;
ll s = abs(a - b);
ll s1 = (v - w) * t;
if (s < s1)
cout << "YES" << endl;
else
cout << "NO" << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
typedef long long ll;
ll a, v;
cin >> a >> v;
ll b, w;
cin >> b >> w;
ll t;
cin >> t;
ll s = abs(a - b);
ll s1 = (v - w) * t;
if (s <= s1)
cout << "YES" << endl;
else
cout << "NO" << endl;
return 0;
}
| [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19]] | 1 | 93 |
a,v = gets.chomp.split(' ').map(&:to_i)
b,w = gets.chomp.split(' ').map(&:to_i)
t = gets.to_i
if (v - w) * t >= (a - b).abs
puts "Yes"
else
puts "No"
end |
a,v = gets.chomp.split(' ').map(&:to_i)
b,w = gets.chomp.split(' ').map(&:to_i)
t = gets.to_i
if (v - w) * t >= (a - b).abs
puts "YES"
else
puts "NO"
end | [["-", 64, 749, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 64, 749, 0, 652, 3, 4, 0, 557, 0, 6], ["-", 75, 95, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 75, 95, 0, 652, 3, 4, 0, 557, 0, 6]] | 4 | 71 |
import sys
input = sys.stdin.readline
def read():
A, V = map(int, input().strip().split())
B, W = map(int, input().strip().split())
T = int(input().strip())
return A, V, B, W, T
def solve(A, V, B, W, T):
if A < B:
a = A + V * T
b = B + W + T
return "YES" if a >= b else "N... | import sys
input = sys.stdin.readline
def read():
A, V = map(int, input().strip().split())
B, W = map(int, input().strip().split())
T = int(input().strip())
return A, V, B, W, T
def solve(A, V, B, W, T):
if A < B:
a = A + V * T
b = B + W * T
return "YES" if a >= b else "N... | [["-", 64, 196, 0, 1, 0, 662, 12, 657, 17, 72], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 17, 48], ["-", 8, 196, 0, 1, 0, 662, 12, 657, 17, 72]] | 5 | 173 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long A, V;
cin >> A >> V;
long B, W;
cin >> B >> W;
long T;
cin >> T;
long dist;
bool can;
if (V <= W)
can = false;
else {
long catchup = W - V;
if (A > B)
dist = A - B;
else
dist = B - A;
if (catchup * T >= ... | #include <bits/stdc++.h>
using namespace std;
int main() {
long A, V;
cin >> A >> V;
long B, W;
cin >> B >> W;
long T;
cin >> T;
long dist;
bool can;
if (V <= W)
can = false;
else {
long catchup = V - W;
if (A > B)
dist = A - B;
else
dist = B - A;
if (catchup * T >= ... | [["-", 0, 9, 0, 43, 49, 50, 51, 16, 31, 22], ["-", 0, 9, 0, 43, 49, 50, 51, 16, 17, 33], ["+", 0, 9, 0, 43, 49, 50, 51, 16, 17, 33], ["+", 0, 9, 0, 43, 49, 50, 51, 16, 12, 22]] | 1 | 124 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> VI;
ll mm = 1000000000;
ll MM = mm + 7;
#define rep(i, n) for (int i = 0; i < n; i++)
#define PI 3.141592653589793
int main() {
ll a, b, v, w, t;
cin >> a >> v >> b >> w >> t;
ll dis = abs(b - a);
ll spd = v - w;
if (dis... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> VI;
ll mm = 1000000000;
ll MM = mm + 7;
#define rep(i, n) for (int i = 0; i < n; i++)
#define PI 3.141592653589793
int main() {
ll a, b, v, w, t;
cin >> a >> v >> b >> w >> t;
ll dis = abs(b - a);
ll spd = v - w;
if (dis... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47]] | 1 | 112 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep2(i, a, n) for (int i = (a); i < (n); i++)
#define all(vec) vec.begin(), vec.end()
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<ll>;
int main() {
ll A, V, B, W, T;
cin >... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep2(i, a, n) for (int i = (a); i < (n); i++)
#define all(vec) vec.begin(), vec.end()
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<ll>;
int main() {
ll A, V, B, W, T;
cin >... | [["-", 8, 9, 0, 43, 49, 50, 51, 16, 31, 22], ["-", 8, 9, 0, 43, 49, 50, 51, 16, 17, 33], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 17, 33], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 22]] | 1 | 150 |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
long A = sc.nextLong();
long V = sc.nextLong();
long B = sc.nextLong();
long W = sc.nextLong();
long T = sc.nextLong();
long ab = B - A;
long speed = V - W;
if... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
long A = sc.nextLong();
long V = sc.nextLong();
long B = sc.nextLong();
long W = sc.nextLong();
long T = sc.nextLong();
long ab = Math.abs(B - A);
long speed = V - ... | [["+", 8, 196, 0, 503, 49, 200, 51, 492, 500, 22], ["+", 8, 196, 0, 503, 49, 200, 51, 492, 0, 131], ["+", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22], ["+", 0, 503, 49, 200, 51, 492, 3, 4, 0, 24], ["+", 0, 503, 49, 200, 51, 492, 3, 4, 0, 25]] | 3 | 129 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)n; ++i)
#define REP(i, a, b) for (int i = int(a); i < (int)b; ++i)
#define Graph vector<vecctor<ll>>
#define pairs vector<pair<ll, ll>>
#define pb push_back
using namespace std;
using ll = long long;
const ll INF = 1e18;
const double PI = acos(-1);
t... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)n; ++i)
#define REP(i, a, b) for (int i = int(a); i < (int)b; ++i)
#define Graph vector<vecctor<ll>>
#define pairs vector<pair<ll, ll>>
#define pb push_back
using namespace std;
using ll = long long;
const ll INF = 1e18;
const double PI = acos(-1);
t... | [["-", 0, 57, 15, 339, 51, 16, 12, 2, 63, 22], ["-", 15, 339, 51, 16, 12, 2, 3, 4, 0, 24], ["-", 12, 2, 3, 4, 0, 16, 12, 23, 0, 25]] | 1 | 218 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long a, v, b, w, t;
cin >> a >> v >> b >> w >> t;
string ans = "NO";
long long distance = abs(a - b);
long long speed = abs(v - w);
if (distance <= speed * t) {
ans = "YES";
}
cout << ans << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
long long a, v, b, w, t;
cin >> a >> v >> b >> w >> t;
string ans = "NO";
long long distance = abs(a - b);
long long speed = v - w;
if (distance <= speed * t) {
ans = "YES";
}
cout << ans << endl;
}
| [["-", 8, 9, 0, 43, 49, 50, 51, 2, 63, 22], ["-", 0, 43, 49, 50, 51, 2, 3, 4, 0, 24], ["-", 0, 43, 49, 50, 51, 2, 3, 4, 0, 25]] | 1 | 87 |
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
yes = True
if v <= w:
yes = False
elif abs(b - a) // (v - w) > t:
yes = False
if yes:
print("YES")
else:
print("NO") | a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
yes = True
if v <= w:
yes = False
elif abs(b - a) / (v - w) > t:
yes = False
if yes:
print("YES")
else:
print("NO") | [["-", 0, 57, 75, 665, 15, 666, 0, 657, 17, 676], ["+", 0, 57, 75, 665, 15, 666, 0, 657, 17, 85]] | 5 | 87 |
// include
// ------------------------------------------------
#include <bits/stdc++.h>
#include <math.h>
using namespace std;
// func
// ------------------------------------------------
int CalcSumOfDigit(int n); // 各桁の和を計算する。
int getDigit(int n); // 数字の桁数を取得する。
string upper(string str); // 英字を大文字に変換する。
strin... | // include
// ------------------------------------------------
#include <bits/stdc++.h>
#include <math.h>
using namespace std;
// func
// ------------------------------------------------
int CalcSumOfDigit(int n); // 各桁の和を計算する。
int getDigit(int n); // 数字の桁数を取得する。
string upper(string str); // 英字を大文字に変換する。
strin... | [["-", 8, 9, 0, 43, 49, 50, 51, 16, 31, 22], ["-", 8, 9, 0, 43, 49, 50, 51, 16, 17, 33], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 17, 33], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 22]] | 1 | 816 |
def solve(a, v, b, w, t):
return "YES" if 0 < (v-w) and abs(b-a) / (v-w) < t else "NO"
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
print(solve(a, v, b, w, t)) | def solve(a, v, b, w, t):
return "YES" if 0 < (v-w) and abs(b-a) / (v-w) <= t else "NO"
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
print(solve(a, v, b, w, t)) | [["-", 0, 37, 0, 41, 0, 679, 12, 666, 667, 18], ["+", 0, 37, 0, 41, 0, 679, 12, 666, 667, 19]] | 5 | 100 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long double A, B, V, W, T;
double X;
cin >> A >> V >> B >> W >> T;
if (W < V) {
X = abs(A - B) / (W - V);
if (X <= T) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
} else {
cout << "NO" << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
long double A, B, V, W, T;
double X;
cin >> A >> V >> B >> W >> T;
if (W < V) {
X = abs(A - B) / (V - W);
if (X <= T) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
} else {
cout << "NO" << endl;
}
}
| [["-", 0, 11, 12, 16, 12, 23, 0, 16, 31, 22], ["-", 0, 11, 12, 16, 12, 23, 0, 16, 17, 33], ["+", 0, 11, 12, 16, 12, 23, 0, 16, 17, 33], ["+", 0, 11, 12, 16, 12, 23, 0, 16, 12, 22]] | 1 | 100 |
a,v = map(int, input().split())
b,w = map(int, input().split())
t = int(input())
if (v - w) * t - (b - a) > 0:
print("YES")
else:
print("NO") | a,v = map(int, input().split())
b,w = map(int, input().split())
t = int(input())
if (v - w) * t - abs(b - a) >= 0:
print("YES")
else:
print("NO") | [["+", 0, 57, 15, 666, 0, 657, 12, 652, 63, 22], ["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 47], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 20]] | 5 | 71 |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
// String str = sc.next();
int A = sc.nextInt();
int V = sc.nextInt();
int B = sc.nextInt();
int W = sc.nextInt();
long T = sc.nextLong();
if (V <= W) {
System.... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
// String str = sc.next();
int A = sc.nextInt();
int V = sc.nextInt();
int B = sc.nextInt();
int W = sc.nextInt();
long T = sc.nextLong();
if (V <= W) {
System.... | [["-", 0, 57, 15, 15, 0, 16, 31, 16, 17, 85], ["-", 0, 57, 15, 15, 0, 16, 31, 16, 12, 22], ["+", 0, 57, 15, 15, 0, 16, 12, 16, 17, 48], ["+", 0, 57, 15, 15, 0, 16, 12, 16, 12, 22]] | 3 | 159 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long a, b, v, w;
int t;
cin >> a >> v >> b >> w >> t;
if (abs(a - b) <= abs(v - w) * t) {
cout << "YES";
} else {
cout << "NO";
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
long long a, b, v, w;
int t;
cin >> a >> v >> b >> w >> t;
if (abs(a - b) <= (v - w) * t) {
cout << "YES";
} else {
cout << "NO";
}
return 0;
} | [["-", 15, 339, 51, 16, 12, 16, 31, 2, 63, 22]] | 1 | 75 |
#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n - 1; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i <= n; i++)
#define FORR(i, m, n) for (int i = m; i >= n; i--)
#define SORT(v, n) sort(v, v + n);
#define VSORT(v) sort(v.begin(), v.end()... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n - 1; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i <= n; i++)
#define FORR(i, m, n) for (int i = m; i >= n; i--)
#define SORT(v, n) sort(v, v + n);
#define VSORT(v) sort(v.begin(), v.end()... | [["-", 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 | 312 |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int v = sc.nextInt();
int b = sc.nextInt();
int w = sc.nextInt();
int t = sc.nextInt();
if (Math.abs(b - a) <= (long)t * Math.abs(w - v))
System... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int v = sc.nextInt();
int b = sc.nextInt();
int w = sc.nextInt();
int t = sc.nextInt();
if (Math.abs(b - a) <= (long)t * Math.abs(w - v) && v > w)
... | [["+", 8, 196, 0, 57, 15, 15, 0, 16, 17, 98], ["+", 0, 57, 15, 15, 0, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 15, 0, 16, 12, 16, 17, 47], ["+", 0, 57, 15, 15, 0, 16, 12, 16, 12, 22]] | 3 | 128 |
#include <bits/stdc++.h>
using namespace std;
/// ----------------------------- (Debug) ------------------------------
#define sim template <class c
#define ris return *this
#define dor > debug &operator<<
#define eni(x) \
sim > typename enable_if<size... | #include <bits/stdc++.h>
using namespace std;
/// ----------------------------- (Debug) ------------------------------
#define sim template <class c
#define ris return *this
#define dor > debug &operator<<
#define eni(x) \
sim > typename enable_if<size... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 109], ["+", 75, 76, 0, 57, 15, 339, 51, 16, 17, 19], ["-", 75, 76, 0, 57, 15, 339, 51, 16, 17, 60], ["-", 75, 76, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 48], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 22]] | 1 | 663 |
import math
import sys
A,V = map(int, input().split())
B,W = map(int, input().split())
T=int(input())
kyo=abs(A-B)
hay=V-W
if hay<=0 :
print("NO")
sys.exit()
if T>=math.floor(kyo/hay) :
print("YES")
else:
print("NO") | import math
import sys
A,V = map(int, input().split())
B,W = map(int, input().split())
T=int(input())
kyo=abs(A-B)
hay=V-W
if hay<=0 :
print("NO")
sys.exit()
if T>=math.ceil(kyo/hay) :
print("YES")
else:
print("NO") | [["-", 0, 57, 15, 666, 0, 652, 63, 319, 319, 22], ["+", 0, 57, 15, 666, 0, 652, 63, 319, 319, 22]] | 5 | 99 |
import copy
def main():
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())
if V <= W:
print('NO')
elif (abs(A-B) / (V-W)) <= t:
print('YES')
else:
print('NO')
main() | import copy
def main():
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())
if V <= W:
print('NO')
elif (abs(A-B) / (V-W)) <= T:
print('YES')
else:
print('NO')
main() | [["-", 8, 196, 0, 57, 75, 665, 15, 666, 0, 22], ["+", 8, 196, 0, 57, 75, 665, 15, 666, 0, 22]] | 5 | 93 |
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())
if(V-W > 0):
if(abs(A-B)//(V-W) <= T):
print("YES")
else:
print("NO")
else:
print("NO") | A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())
if(V-W > 0):
if(abs(A-B)/(V-W) <= T):
print("YES")
else:
print("NO")
else:
print("NO") | [["-", 0, 57, 15, 23, 0, 666, 0, 657, 17, 676], ["+", 0, 57, 15, 23, 0, 666, 0, 657, 17, 85]] | 5 | 89 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
ll A, B, V, W, T;
cin >> A >> V >> B >> W >> T;
if (W >= V) {
cout << "NO" << endl;
return 0;
}
ll dist = abs(A - B);
if ((V - W) >= dist / T) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
ll A, B, V, W, T;
cin >> A >> V >> B >> W >> T;
if (W >= V) {
cout << "NO" << endl;
return 0;
}
ll dist = abs(A - B);
if ((V - W) * T >= dist) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
} | [["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 48], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 85], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 12, 22]] | 1 | 100 |
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
ans = (b - a) - (v - w) * t
if ans > 0:
print('NO')
else:
print('YES') | a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
ans = abs(b - a) - (v - w) * t
if ans > 0:
print('NO')
else:
print('YES')
| [["+", 0, 1, 0, 662, 12, 657, 31, 652, 63, 22]] | 5 | 74 |
#include <bits/stdc++.h>
using namespace std;
int main(void) {
long long A, V, B, W, T;
cin >> A >> V;
cin >> B >> W;
cin >> T;
long long D = A - B;
long long dist = (V - W) * T;
if (dist >= D) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main(void) {
long long A, V, B, W, T;
cin >> A >> V;
cin >> B >> W;
cin >> T;
long long D = abs(A - B);
long long dist = (V - W) * T;
if (dist >= D) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
return 0;
}
| [["+", 8, 9, 0, 43, 49, 50, 51, 2, 63, 22], ["+", 0, 43, 49, 50, 51, 2, 3, 4, 0, 24], ["+", 0, 43, 49, 50, 51, 2, 3, 4, 0, 25]] | 1 | 91 |
///......বিসমিল্লাহির রাহমানির রাহিম......///
///......পরম করুণাময় অসীম দয়ালু আল্লাহতায়ালার নামে শুরু করছি.....///
/*
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─████████████████───██████──██████────────████████████████───██████████████─... | ///......বিসমিল্লাহির রাহমানির রাহিম......///
///......পরম করুণাময় অসীম দয়ালু আল্লাহতায়ালার নামে শুরু করছি.....///
/*
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─████████████████───██████──██████────────████████████████───██████████████─... | [["-", 8, 9, 0, 43, 49, 50, 51, 2, 63, 22], ["-", 0, 43, 49, 50, 51, 2, 3, 4, 0, 24], ["-", 0, 43, 49, 50, 51, 2, 3, 4, 0, 25], ["+", 0, 41, 15, 23, 0, 16, 12, 23, 0, 24], ["+", 0, 41, 15, 23, 0, 16, 12, 23, 0, 25]] | 1 | 903 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long int A, V, B, W, T;
cin >> A >> V >> B >> W >> T;
if (A < B) {
if (B - A < (V - W) * T) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
} else {
if (A - B < (V - W) * T) {
cout << "YES" << endl;
... | #include <bits/stdc++.h>
using namespace std;
int main() {
long long int A, V, B, W, T;
cin >> A >> V >> B >> W >> T;
if (A < B) {
if (B - A <= (V - W) * T) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
} else {
if (A - B <= (V - W) * T) {
cout << "YES" << endl;
... | [["-", 64, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 64, 9, 0, 57, 15, 339, 51, 16, 17, 19], ["-", 0, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 0, 9, 0, 57, 15, 339, 51, 16, 17, 19]] | 1 | 118 |
import java.lang.*;
import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
long a = sc.nextLong();
long v = sc.nextLong();
long b = sc.nextLong();
long w = sc.nextLong();
long t = sc.nextLong();
long p = Math.abs(a - b);
lo... | import java.lang.*;
import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
long a = sc.nextLong();
long v = sc.nextLong();
long b = sc.nextLong();
long w = sc.nextLong();
long t = sc.nextLong();
long p = Math.abs(a - b);
lo... | [["-", 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 | 139 |
#!/usr/bin/env python3
import sys
import numpy as np
input = sys.stdin.readline
a, b = map(int, input().split())
c, d = map(int, input().split())
t = int(input())
if b==d :
print('NO')
elif (abs(a-c)//(b-d))<= t and d<b :
print('YES')
else:
print('NO') | #!/usr/bin/env python3
import sys
import numpy as np
input = sys.stdin.readline
a, b = map(int, input().split())
c, d = map(int, input().split())
t = int(input())
if b==d :
print('NO')
elif (abs(a-c)/(b-d))<= t and d<b :
print('YES')
else:
print('NO') | [["-", 15, 679, 31, 666, 0, 23, 0, 657, 17, 676], ["+", 15, 679, 31, 666, 0, 23, 0, 657, 17, 85]] | 5 | 101 |
A, V = gets.split.map(&:to_i)
B, W = gets.split.map(&:to_i)
T = gets.to_i
if A < B
print A+(V*T) > B+(W*T) ? "YES" : "NO"
else
print A-(V*T) < B-(W*T) ? "YES" : "NO"
end | A, V = gets.split.map(&:to_i)
B, W = gets.split.map(&:to_i)
T = gets.to_i
if A < B
print A+(V*T) >= B+(W*T) ? "YES" : "NO"
else
print A-(V*T) <= B-(W*T) ? "YES" : "NO"
end | [["-", 0, 652, 3, 4, 0, 754, 15, 738, 17, 47], ["+", 0, 652, 3, 4, 0, 754, 15, 738, 17, 20], ["-", 0, 652, 3, 4, 0, 754, 15, 738, 17, 18], ["+", 0, 652, 3, 4, 0, 754, 15, 738, 17, 19]] | 4 | 85 |
#include <iostream>
using namespace std;
int main() {
int a, b, v, w, t;
cin >> a >> v;
cin >> b >> w;
cin >> t;
if ((v - w) * t > abs(a - b)) {
cout << "YES" << endl;
return 0;
} else {
cout << "NO" << endl;
return 0;
}
} | #include <iostream>
using namespace std;
int main() {
long long a, b, v, w, t;
cin >> a >> v;
cin >> b >> w;
cin >> t;
if ((v - w) * t >= abs(a - b)) {
cout << "YES" << endl;
return 0;
} else {
cout << "NO" << endl;
return 0;
}
} | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 83 |
<?php
fscanf(STDIN, "%d %d", $A, $V);
fscanf(STDIN, "%d %d", $B, $W);
fscanf(STDIN, "%d", $T);
echo (($V >= $W) || ($T < abs($A - $B) / ($W - $V))) ? "NO" : "YES";
| <?php
fscanf(STDIN, "%d %d", $A, $V);
fscanf(STDIN, "%d %d", $B, $W);
fscanf(STDIN, "%d", $T);
echo (($W >= $V) || ($T < abs($A - $B) / ($V - $W))) ? "NO" : "YES";
| [["-", 0, 16, 31, 23, 0, 16, 31, 606, 0, 141], ["+", 0, 16, 31, 23, 0, 16, 31, 606, 0, 141], ["-", 0, 16, 31, 23, 0, 16, 12, 606, 0, 141], ["+", 0, 16, 31, 23, 0, 16, 12, 606, 0, 141], ["-", 12, 16, 12, 23, 0, 16, 31, 606, 0, 141], ["+", 12, 16, 12, 23, 0, 16, 31, 606, 0, 141], ["-", 12, 16, 12, 23, 0, 16, 12, 606, 0, ... | 6 | 84 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.