problem_id stringlengths 6 6 | language stringclasses 2
values | original_status stringclasses 3
values | original_src stringlengths 19 243k | changed_src stringlengths 19 243k | change stringclasses 3
values | i1 int64 0 8.44k | i2 int64 0 8.44k | j1 int64 0 8.44k | j2 int64 0 8.44k | error stringclasses 270
values | stderr stringlengths 0 226k |
|---|---|---|---|---|---|---|---|---|---|---|---|
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long int
#define MAXN 100001
using namespace std;
ll spf[MAXN];
void sieve() {
spf[1] = 1;
for (ll i = 2; i < MAXN; i++)
spf[i] = i;
for (ll i = 4; i < MAXN; i += 2)
spf[i] = 2;
for (ll i = 3; i * i < MAXN; i++) {
if (spf[i] == i) {
for (ll j = i * i; ... | #include <bits/stdc++.h>
#define ll long long int
#define MAXN 1000001
using namespace std;
ll spf[MAXN];
void sieve() {
spf[1] = 1;
for (ll i = 2; i < MAXN; i++)
spf[i] = i;
for (ll i = 4; i < MAXN; i += 2)
spf[i] = 2;
for (ll i = 3; i * i < MAXN; i++) {
if (spf[i] == i) {
for (ll j = i * i;... | replace | 2 | 3 | 2 | 3 | 0 | |
p02574 | C++ | Runtime Error | /* Simplicity and Goodness */
#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
using namespace std;
// using namespace __gnu_pbds;
// typedef tree<int, null_type, less<int>, rb_tree_tag,
// tree_order_statistics_node_update> indexed_set;
void my_dbg() { cou... | /* Simplicity and Goodness */
#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
using namespace std;
// using namespace __gnu_pbds;
// typedef tree<int, null_type, less<int>, rb_tree_tag,
// tree_order_statistics_node_update> indexed_set;
void my_dbg() { cou... | replace | 37 | 38 | 37 | 38 | 0 | |
p02574 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cassert>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <string.h>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
using namespace std;
typedef long l... | #include <algorithm>
#include <cassert>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <string.h>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
using namespace std;
typedef long l... | replace | 44 | 45 | 44 | 45 | TLE | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
#define F(i, a, b) for (ll i = a; i <= (b); ++i)
#define dF(i, a, b) for (int i = a; i >= (b); --i)
#define inf 0x3f3f3f3f
#define infll 0x3f3f3f3f3f3f3f3f
#define pb push_back
#define maxnkp make_pair
#define fi first
#define se second
#define eps 1e-7
#define PI acos(-1.0)
using namespace std... | #include <bits/stdc++.h>
#define F(i, a, b) for (ll i = a; i <= (b); ++i)
#define dF(i, a, b) for (int i = a; i >= (b); --i)
#define inf 0x3f3f3f3f
#define infll 0x3f3f3f3f3f3f3f3f
#define pb push_back
#define maxnkp make_pair
#define fi first
#define se second
#define eps 1e-7
#define PI acos(-1.0)
using namespace std... | replace | 61 | 62 | 61 | 62 | 0 | |
p02574 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
// map<pair<long long int,long long int>,long long int>mapa;
// pair<ll,ll>v[200005];
map<ll, ll> mp, mpp;
// priority_queue<ll>pq;
class Myfirst {
private:
string *name;
ll *age;
public:
ll gcd(ll a, ll b) {
if (b == 0)
return a;
... | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
// map<pair<long long int,long long int>,long long int>mapa;
// pair<ll,ll>v[200005];
map<ll, ll> mp, mpp;
// priority_queue<ll>pq;
class Myfirst {
private:
string *name;
ll *age;
public:
ll gcd(ll a, ll b) {
if (b == 0)
return a;
... | replace | 87 | 88 | 87 | 88 | TLE | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, N) for (ll i = 0; i < N; i++)
using ll = long long;
using namespace std;
#define MOD 1000000007
typedef pair<ll, ll> Pl;
typedef vector<int> vi;
int main() {
int n;
cin >> n;
vi a(n);
rep(i, n) cin >> a[i];
int ggg = a[0];
rep(i, n - 1) ggg = __gcd(ggg, a[i + 1]);
... | #include <bits/stdc++.h>
#define rep(i, N) for (ll i = 0; i < N; i++)
using ll = long long;
using namespace std;
#define MOD 1000000007
typedef pair<ll, ll> Pl;
typedef vector<int> vi;
int main() {
int n;
cin >> n;
vi a(n);
rep(i, n) cin >> a[i];
int ggg = a[0];
rep(i, n - 1) ggg = __gcd(ggg, a[i + 1]);
... | replace | 46 | 47 | 46 | 47 | 0 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define PI 3.14159265358979323846
#define int long long
constexpr long long INF = numeric_limits<long long>::max() / 2;
constexpr int MOD = 1000000007;
using Graph = vector<vector<int>>;
signed main() {
cin.tie(nullptr... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define PI 3.14159265358979323846
#define int long long
constexpr long long INF = numeric_limits<long long>::max() / 2;
constexpr int MOD = 1000000007;
using Graph = vector<vector<int>>;
signed main() {
cin.tie(nullptr... | replace | 17 | 19 | 17 | 19 | 0 | |
p02574 | Python | Runtime Error | n = int(input())
(*A,) = map(int, input().split())
m = max(A)
C = [0 for a in range(m + 1)]
for a in A:
C[a] += 1
s = max(sum(C[a::a]) for a in range(2, m + 1))
if s < 2:
print("pairwise coprime")
elif s < n:
print("setwise coprime")
else:
print("not coprime")
| n = int(input())
(*A,) = map(int, input().split())
m = max(A)
C = [0 for a in range(m + 1)]
for a in A:
C[a] += 1
s = 0
for a in range(2, m + 1):
s = max(s, sum(C[a::a]))
if s < 2:
print("pairwise coprime")
elif s < n:
print("setwise coprime")
else:
print("not coprime")
| replace | 6 | 7 | 6 | 9 | 0 | |
p02574 | Python | Runtime Error | n = int(input())
(*A,) = map(int, input().split())
m = max(A)
is_prime = [True] * (m + 1)
is_prime[0] = False
is_prime[1] = False
for i in range(2, m + 1):
for j in range(i * 2, m + 1, i):
is_prime[j] = False
primes = [i for i in range(m + 1) if is_prime[i]]
Amap = {a: 0 for a in range(1, m + 1)}
for a in... | n = int(input())
(*A,) = map(int, input().split())
m = max(A)
is_prime = [True] * (m + 1)
is_prime[0] = False
is_prime[1] = False
for i in range(2, m + 1):
for j in range(i * 2, m + 1, i):
is_prime[j] = False
primes = [i for i in range(m + 1) if is_prime[i]]
Amap = {a: 0 for a in range(1, m + 1)}
for a in... | replace | 22 | 24 | 22 | 27 | 0 | |
p02574 | C++ | Runtime Error | /******
AUTHOR : RUDRANSH TRIPATHI, IIIT NAGPUR, CCID(rt24) & CFID(rsgt24)
MOTTO : Use criticism as fuel and you will never run out of energy.
AIM : TO BECOME A BETTER CODER
INTROSPECT + COURSE CORRECTIONS = CATALYST FOR SUCCESS
Every moment is an opportunity to better yourself
*******/
#inc... | /******
AUTHOR : RUDRANSH TRIPATHI, IIIT NAGPUR, CCID(rt24) & CFID(rsgt24)
MOTTO : Use criticism as fuel and you will never run out of energy.
AIM : TO BECOME A BETTER CODER
INTROSPECT + COURSE CORRECTIONS = CATALYST FOR SUCCESS
Every moment is an opportunity to better yourself
*******/
#inc... | replace | 98 | 99 | 98 | 99 | -11 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define forn(i, a, n) for (int i = a; i < n; i++)
int n;
int a[1000001];
vector<int> v;
map<int, int> mp;
int isp[1000001];
void buildprime() {
isp[0] = isp[1] = 1;
forn(i, 2, 1000001) {
if (isp[i])
continue;
for (int j = i + i; j ... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define forn(i, a, n) for (int i = a; i < n; i++)
int n;
int a[1000001];
vector<int> v;
map<int, int> mp;
int isp[1000001];
void buildprime() {
isp[0] = isp[1] = 1;
forn(i, 2, 1000001) {
if (isp[i])
continue;
for (int j = i + i; j ... | replace | 40 | 41 | 40 | 41 | 0 | |
p02574 | C++ | Runtime Error | #include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
const int N = 2e5 + 100;
typedef long long ll;
// prime次数
int num[N], n;
inline void divide(int x) {
for (int i = 2; i <= x / i; i++) {
if (x % i == 0) {
num[i]++;
while (x % i == 0)
x /= i;
}
... | #include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
const int N = 1e6 + 100;
typedef long long ll;
// prime次数
int num[N], n;
inline void divide(int x) {
for (int i = 2; i <= x / i; i++) {
if (x % i == 0) {
num[i]++;
while (x % i == 0)
x /= i;
}
... | replace | 5 | 6 | 5 | 6 | 0 | |
p02574 | C++ | Runtime Error |
#include <algorithm>
#include <bitset>
#include <deque>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unordered_map>
#include <vector>
long long mod = 1e9 + 7;
class Mint {
public:
long long ... |
#include <algorithm>
#include <bitset>
#include <deque>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unordered_map>
#include <vector>
long long mod = 1e9 + 7;
class Mint {
public:
long long ... | replace | 165 | 170 | 165 | 172 | -11 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
vector<int> vis(100001, 0);
int flag;
int gcd(int a, int b) {
if (a == 0)
return b;
return gcd(b % a, a);
}
int findGCD(vector<int> arr, int n) {
int result = arr[0];
for (int i = 1; i < n; i++) {
result = gcd(arr[i], result);
if (result == 1) {
... | #include <bits/stdc++.h>
using namespace std;
vector<int> vis(1000001, 0);
int flag;
int gcd(int a, int b) {
if (a == 0)
return b;
return gcd(b % a, a);
}
int findGCD(vector<int> arr, int n) {
int result = arr[0];
for (int i = 1; i < n; i++) {
result = gcd(arr[i], result);
if (result == 1) {
... | replace | 2 | 3 | 2 | 3 | 0 | |
p02574 | C++ | Time Limit Exceeded | #include "bits/stdc++.h"
using namespace std;
using ll = long long;
int a[1000005];
unordered_map<int, int> mp;
int num[1000005];
int main() {
#ifdef LOCAL
freopen("in1.txt", "r", stdin);
freopen("out1.txt", "w", stdout);
#endif
int n;
cin >> n;
// bool cjs = false;
for (int i = 0; i < n; i++) {
cin ... | #include "bits/stdc++.h"
using namespace std;
using ll = long long;
int a[1000005];
unordered_map<int, int> mp;
int num[1000010];
int main() {
#ifdef LOCAL
freopen("in1.txt", "r", stdin);
freopen("out1.txt", "w", stdout);
#endif
int n;
cin >> n;
// bool cjs = false;
for (int i = 0; i < n; i++) {
cin ... | replace | 6 | 7 | 6 | 7 | TLE | |
p02574 | C++ | Runtime Error | #ifndef ONLINE_JUDGE
#define DEBUG 1
#if DEBUG
#define _GLIBCXX_DEBUG
#endif
#endif
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set... | #ifndef ONLINE_JUDGE
#define DEBUG 1
#if DEBUG
#define _GLIBCXX_DEBUG
#endif
#endif
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set... | replace | 271 | 272 | 271 | 272 | 0 | |
p02574 | C++ | Runtime Error | #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);
rep(i, n) scanf("%d", a[i]);
vector<int> cnt(1000005);
vector<int> m(1000005);
rep(i, n) m[a[i]]++;
bool flag = t... | #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);
rep(i, n) scanf("%d", &a[i]);
vector<int> cnt(1000005);
vector<int> m(1000005);
rep(i, n) m[a[i]]++;
bool flag = ... | replace | 10 | 11 | 10 | 11 | -11 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef long double ld;
typedef set<int>::iterator sit;
typedef map<int, int>::iterator mit;
typedef vector<int>::iterator vit;
const int INF = 1e9 + 7;
const int MOD = 1e9 +... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef long double ld;
typedef set<int>::iterator sit;
typedef map<int, int>::iterator mit;
typedef vector<int>::iterator vit;
const int INF = 1e9 + 7;
const int MOD = 1e9 +... | replace | 60 | 61 | 60 | 61 | 0 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = int64_t;
using ull = uint64_t;
const ll INF = 9e18;
void print() { cout << endl; }
template <typename Head, typename... Tail> void print(Head head, Tail... tail) {
int size = sizeof...(Tail);
cout << head;
if (size > 0) {
cout << " ";
}
print(tail.... | #include <bits/stdc++.h>
using namespace std;
using ll = int64_t;
using ull = uint64_t;
const ll INF = 9e18;
void print() { cout << endl; }
template <typename Head, typename... Tail> void print(Head head, Tail... tail) {
int size = sizeof...(Tail);
cout << head;
if (size > 0) {
cout << " ";
}
print(tail.... | insert | 44 | 44 | 44 | 48 | 0 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <stdlib.h>
#include <sys/time.h>
#include <unistd.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<P, ll> T;
typedef pair<long double, ll> Ps;
typedef pair<ll, bool> Pb;
const ll INF = 1e18;
const ll fact_table = 3200008;
long double Pi = 3.14159265... | #include <bits/stdc++.h>
#include <stdlib.h>
#include <sys/time.h>
#include <unistd.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<P, ll> T;
typedef pair<long double, ll> Ps;
typedef pair<ll, bool> Pb;
const ll INF = 1e18;
const ll fact_table = 3200008;
long double Pi = 3.14159265... | replace | 137 | 138 | 137 | 138 | 0 | |
p02574 | C++ | Time Limit Exceeded | #include <iostream>
#include <map>
#include <string>
#include <vector>
using ll = long long;
ll n;
const ll MAX = 100000000;
std::vector<bool> table(MAX + 1, true);
std::vector<ll> fact;
long long gcd(long long a, long long b) {
if (b == 0)
return a;
else
return gcd(b, a % b);
}
void initTable() {
tabl... | #include <iostream>
#include <map>
#include <string>
#include <vector>
using ll = long long;
ll n;
const ll MAX = 1000000;
std::vector<bool> table(MAX + 1, true);
std::vector<ll> fact;
long long gcd(long long a, long long b) {
if (b == 0)
return a;
else
return gcd(b, a % b);
}
void initTable() {
table[... | replace | 7 | 8 | 7 | 8 | TLE | |
p02574 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdint>
#include <cstring>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <s... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdint>
#include <cstring>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <s... | replace | 78 | 79 | 78 | 79 | -11 | |
p02574 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define fi first
#define se second
#define MOD 1000000007
vector<int> prime;
bool is[1000001];
int cnt[1000001];
void gen() {
for (int i = 0; i <= 1000000; i++)
is[i] = true;
is[0] = is[1] = false;
for (int i = 2; i <= 1000000; i++) {
... | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define fi first
#define se second
#define MOD 1000000007
vector<int> prime;
bool is[1000001];
int cnt[1000001];
void gen() {
for (int i = 0; i <= 1000000; i++)
is[i] = true;
is[0] = is[1] = false;
for (int i = 2; i <= 1000000; i++) {
... | insert | 39 | 39 | 39 | 43 | TLE | |
p02574 | C++ | Runtime Error | #include <assert.h>
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll inf = 1e18;
#define rep(i, a, b) for (int i = a; i < b; i++)
#define per(i, a, b) for (int i = b - 1; i >= a; i--)
#define int ll
using pint = pair<int, int>;
int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
int gcd(int a... | #include <assert.h>
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll inf = 1e18;
#define rep(i, a, b) for (int i = a; i < b; i++)
#define per(i, a, b) for (int i = b - 1; i >= a; i--)
#define int ll
using pint = pair<int, int>;
int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
int gcd(int a... | replace | 38 | 39 | 38 | 39 | 0 | |
p02574 | C++ | Runtime Error | #include <assert.h>
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll inf = 1e18;
#define rep(i, a, b) for (int i = a; i < b; i++)
#define per(i, a, b) for (int i = b - 1; i >= a; i--)
#define int ll
using pint = pair<int, int>;
int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
int gcd(int a... | #include <assert.h>
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll inf = 1e18;
#define rep(i, a, b) for (int i = a; i < b; i++)
#define per(i, a, b) for (int i = b - 1; i >= a; i--)
#define int ll
using pint = pair<int, int>;
int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
int gcd(int a... | replace | 25 | 26 | 25 | 26 | -6 | 2d214d0d-ecd3-4f99-a290-1b0d40c9c2f9.out: /home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02574/C++/s843041518.cpp:26: int main(): Assertion `(*st.find(j)==j)&&(st.count(j)>0)' failed.
|
p02574 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
using namespace std;
... | #include <algorithm>
#include <bitset>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
using namespace std;
... | replace | 311 | 312 | 311 | 312 | 0 | |
p02574 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <stdio.h>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
typedef unsigned long long ll;
const int MAX_N = ... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <stdio.h>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
typedef unsigned long long ll;
const int MAX_N = ... | replace | 79 | 81 | 79 | 81 | TLE | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long int
#define mp make_pair
#define F first
#define S second
#define pb push_back
#define rep(i, a, b) for (ll i = a; i <= b; i++)
#define all(a) a.begin(), a.end()
#define Nmax 1000005
#define INF 1000000000
#define MOD 1000000007
#define MAXN 1000000
using namespace std;
l... | #include <bits/stdc++.h>
#define ll long long int
#define mp make_pair
#define F first
#define S second
#define pb push_back
#define rep(i, a, b) for (ll i = a; i <= b; i++)
#define all(a) a.begin(), a.end()
#define Nmax 1000005
#define INF 1000000000
#define MOD 1000000007
#define MAXN 1000005
using namespace std;
l... | replace | 11 | 12 | 11 | 12 | 0 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int t = 1;
for (int T = 0; T < t; T++) {
ll n;
cin >> n;
ll a[n], cnt[100000001] = {0};
for (int i = 0; i < n; i++) {
cin >> a[i];
cnt[a[i]]++;
}
... | #include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int t = 1;
for (int T = 0; T < t; T++) {
ll n;
cin >> n;
ll a[n], cnt[10000001] = {0};
for (int i = 0; i < n; i++) {
cin >> a[i];
cnt[a[i]]++;
}
b... | replace | 11 | 12 | 11 | 12 | -11 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int maxm = 1e4 + 5;
int a[maxm], mf[maxm];
unordered_map<int, int> ump;
bool not_pairwise = false;
void init() {
mf[1] = 1;
for (int i = 2; i < maxm; i += 2) {
mf[i] = 2;
}
for (int i = 3; i < maxm; i += 2) {
if (!mf[i]) {
mf[i] = i;
fo... | #include <bits/stdc++.h>
using namespace std;
const int maxm = 1e6 + 5;
int a[maxm], mf[maxm];
unordered_map<int, int> ump;
bool not_pairwise = false;
void init() {
mf[1] = 1;
for (int i = 2; i < maxm; i += 2) {
mf[i] = 2;
}
for (int i = 3; i < maxm; i += 2) {
if (!mf[i]) {
mf[i] = i;
fo... | replace | 4 | 5 | 4 | 5 | 0 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define fastIO \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0)... | #include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define fastIO \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0)... | replace | 60 | 61 | 60 | 61 | 0 | |
p02574 | C++ | Time Limit Exceeded | /////////////////////////////////TEST CASES////////////////////////////////////
/*
*/
/////////////////////////////////////CODE//////////////////////////////////////
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (ll i = (a); i < (b); i++)
#define FORD(i, a, b) for (ll i = a; i > b; i--)
#defin... | /////////////////////////////////TEST CASES////////////////////////////////////
/*
*/
/////////////////////////////////////CODE//////////////////////////////////////
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
#... | insert | 4 | 4 | 4 | 7 | TLE | |
p02574 | Python | Time Limit Exceeded | import collections
N = int(input())
A = [int(_) for _ in input().split()]
class Prime:
@staticmethod
def trial_division(x):
if x % 2 == 0:
return True
for p in range(3, int(x**0.5 + 1), 2):
if x % p == 0:
return False
return True
@staticmet... | import collections
N = int(input())
A = [int(_) for _ in input().split()]
class Prime:
@staticmethod
def trial_division(x):
if x % 2 == 0:
return True
for p in range(3, int(x**0.5 + 1), 2):
if x % p == 0:
return False
return True
@staticmet... | replace | 17 | 33 | 17 | 32 | TLE | |
p02574 | Python | Runtime Error | import collections
N = int(input())
A = [int(_) for _ in input().split()]
def prime_factorize(n):
a = set()
while n % 2 == 0:
a.add(2)
n //= 2
f = 3
while f * f <= n:
if n % f == 0:
a.add(f)
n //= f
else:
f += 2
if n != 1:
... | import collections
N = int(input())
A = [int(_) for _ in input().split()]
def prime_factorize(n):
a = set()
while n % 2 == 0:
a.add(2)
n //= 2
f = 3
while f * f <= n:
if n % f == 0:
a.add(f)
n //= f
else:
f += 2
if n != 1:
... | replace | 27 | 29 | 27 | 30 | 0 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
#define rep(i, n) for (int i = 0; i < (int)n; i++)
const ll INF = (1LL << 60);
vector<int> Eratosthenes(const int N) {
vector<bool> is_prime(N + 1);
for (int i = 0; i <= N; i++) {
is_prime[i] = true;
}
vector<int> P... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
#define rep(i, n) for (int i = 0; i < (int)n; i++)
const ll INF = (1LL << 60);
vector<int> Eratosthenes(const int N) {
vector<bool> is_prime(N + 1);
for (int i = 0; i <= N; i++) {
is_prime[i] = true;
}
vector<int> P... | insert | 55 | 55 | 55 | 59 | 0 | |
p02574 | Python | Runtime Error | N = int(input())
A = [int(s) for s in input().split()]
PRIME_LENGTH = 10**6
prime_list = [[] for _ in range(PRIME_LENGTH)]
for i in range(2, PRIME_LENGTH):
if not prime_list[i]:
idx = i
while idx < PRIME_LENGTH:
prime_list[idx].append(i)
idx += i
vote = [0] * (PRIME_LENGT... | N = int(input())
A = [int(s) for s in input().split()]
PRIME_LENGTH = 10**6 + 1
prime_list = [[] for _ in range(PRIME_LENGTH)]
for i in range(2, PRIME_LENGTH):
if not prime_list[i]:
idx = i
while idx < PRIME_LENGTH:
prime_list[idx].append(i)
idx += i
vote = [0] * (PRIME_L... | replace | 3 | 4 | 3 | 4 | 1 | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02574/Python/s630548682.py", line 13, in <module>
idx += i
MemoryError
|
p02574 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define pii pair<int, int>
#define pp pair<pair<ll, ll>, pair<ll, ll>>
#define pll pair<ll, ll>
#define ppll pair<ll, pll>
#define pdd pair<double, double>
#define vii vector<int>
#define vll vector<ll>
#define mat vector<vector<ll>>
#define l... | #include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define pii pair<int, int>
#define pp pair<pair<ll, ll>, pair<ll, ll>>
#define pll pair<ll, ll>
#define ppll pair<ll, pll>
#define pdd pair<double, double>
#define vii vector<int>
#define vll vector<ll>
#define mat vector<vector<ll>>
#define l... | insert | 107 | 107 | 107 | 109 | TLE | |
p02574 | C++ | Runtime Error | #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>
// 素因数分解
// pair<ll,ll>型
// auto pf=prime_factorize(ll N);で呼ぶ
// for(auto p:p... | #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>
// 素因数分解
// pair<ll,ll>型
// auto pf=prime_factorize(ll N);で呼ぶ
// for(auto p:p... | replace | 24 | 25 | 24 | 25 | 0 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
std::vector<bool> IsPrime;
void sieve(size_t max) {
if (max + 1 > IsPrime.size()) { // resizeで要素数が減らないように
IsPrime.resize(max + 1, true); // IsPrimeに必要な要素数を確保
}
IsPrime[0] = false; // 0は素数ではない
IsPrime[1] = false; // 1は素数ではない
for (size_t i = 2; i * i <= max;... | #include <bits/stdc++.h>
using namespace std;
std::vector<bool> IsPrime;
void sieve(size_t max) {
if (max + 1 > IsPrime.size()) { // resizeで要素数が減らないように
IsPrime.resize(max + 1, true); // IsPrimeに必要な要素数を確保
}
IsPrime[0] = false; // 0は素数ではない
IsPrime[1] = false; // 1は素数ではない
for (size_t i = 2; i * i <= max;... | replace | 42 | 43 | 42 | 43 | 0 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define REPr(i, n) for (int i = (n)-1; i >= 0; --i)
#define FORq(i, m, n) for (int i = (m); i <= (n); ++i)
#define FORqr(i, m, n) for (int i = (n); i >= (m); --i)
#define M... | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define REPr(i, n) for (int i = (n)-1; i >= 0; --i)
#define FORq(i, m, n) for (int i = (m); i <= (n); ++i)
#define FORqr(i, m, n) for (int i = (n); i >= (m); --i)
#define M... | replace | 78 | 79 | 78 | 79 | -11 | |
p02574 | Python | Runtime Error | from math import gcd
N = int(input())
A = list(map(int, input().split()))
# setwise validation
tmp = 0
for a in A:
tmp = gcd(tmp, a)
isSetwise = tmp == 1
# pairwise validation
M = 10**6
A = set(A)
isPairwise = True
for i in range(2, M):
cnt = 0
ni = 0
while (ni := ni + i) <= M:
cnt += ni in... | from math import gcd
N = int(input())
A = list(map(int, input().split()))
# setwise validation
tmp = 0
for a in A:
tmp = gcd(tmp, a)
isSetwise = tmp == 1
# pairwise validation
M = 10**6
sieve = [0] * (M + 1)
for a in A:
sieve[a] += 1
cnt = 0
for i in range(2, M + 1):
cnt = max(cnt, sum(sieve[j] for j ... | replace | 15 | 23 | 15 | 23 | TLE | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;
#define INF LONG_MAX
#define MOD 1000000007
#define rng(a) a.begin(), a.end()
#define rrng(a) a.end(), a.begin()
#define endl "\n"
int_fast64_t gcd(int_fast64_t a, int_fast64_t b) {
if (b... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;
#define INF LONG_MAX
#define MOD 1000000007
#define rng(a) a.begin(), a.end()
#define rrng(a) a.end(), a.begin()
#define endl "\n"
int_fast64_t gcd(int_fast64_t a, int_fast64_t b) {
if (b... | replace | 61 | 62 | 61 | 62 | TLE | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, a, b) for (ll i = a; i < b; i++)
#define Rep(i, a, b) for (ll i = a; i <= b; i++)
#define repr(i, a, b) for (ll i = b - 1; i >= a; i--)
#define _GLIBCXX_DEBUG
#define Vl vector<ll>
#define Vs vector<string>
#define Vp vector<pair<ll, ll>>
using ll = long long... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, a, b) for (ll i = a; i < b; i++)
#define Rep(i, a, b) for (ll i = a; i <= b; i++)
#define repr(i, a, b) for (ll i = b - 1; i >= a; i--)
#define _GLIBCXX_DEBUG
#define Vl vector<ll>
#define Vs vector<string>
#define Vp vector<pair<ll, ll>>
using ll = long long... | replace | 94 | 95 | 94 | 95 | 0 | |
p02574 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
typedef long long ll;
typedef vector<ll> v;
typedef vector<vector<ll>> vv;
#define MOD 1000000007
#defi... | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
typedef long long ll;
typedef vector<ll> v;
typedef vector<vector<ll>> vv;
#define MOD 1000000007
#defi... | replace | 64 | 65 | 64 | 65 | 0 | |
p02574 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
#define MOD 1000000007
using namespace std;
typedef long long ll;
#include <cstring>
int gcd(int a, int b) {
if (b == 0) ... | #include <algorithm>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
#define MOD 1000000007
using namespace std;
typedef long long ll;
#include <cstring>
int gcd(int a, int b) {
if (b == 0) ... | replace | 33 | 34 | 33 | 34 | TLE | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define endl "\n"
#define MAXN 100001
// stores smallest prime factor for every number
int spf[MAXN];
// Calculating SPF (Smallest Prime Factor) for every
// number till MAXN.
// Time Complexity : O(nloglogn)
void sieve() {
spf[1] = 1;
for (int i ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define endl "\n"
#define MAXN 10000001
// stores smallest prime factor for every number
int spf[MAXN];
// Calculating SPF (Smallest Prime Factor) for every
// number till MAXN.
// Time Complexity : O(nloglogn)
void sieve() {
spf[1] = 1;
for (int ... | replace | 4 | 5 | 4 | 5 | 0 | |
p02574 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
#define ll long long
#define rep(i, n) for (int i = 0; i < (n); i++)
#define mod 1000000007
#define ma 1000005
ll gcd(ll, ll);
int main() {
ll n;
ll x;
ll gc = 0;
bool pc = true;
cin >> n;
vector<ll> a(n);
vector<ll> c(ma);
rep(i, n) {
cin >> a[i];
... | #include "bits/stdc++.h"
using namespace std;
#define ll long long
#define rep(i, n) for (int i = 0; i < (n); i++)
#define mod 1000000007
#define ma 1000005
ll gcd(ll, ll);
int main() {
ll n;
ll x;
ll gc = 0;
bool pc = true;
cin >> n;
vector<ll> a(n);
vector<ll> c(ma);
rep(i, n) {
cin >> a[i];
... | replace | 48 | 49 | 48 | 49 | 0 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 1e6;
bool is_prime[N + 5];
int d[N + 5]; // d[i]=iの最小の素因数
int mp[N + 5];
int main() {
for (int i = 0; i < N; i++)
is_prime[i] = true; // エラトステネス
for (int i = 2; i < N; i++) {
if (is_prime[i])
d[i] = i;
for (int j = ... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 1000005;
bool is_prime[N + 5];
int d[N + 5]; // d[i]=iの最小の素因数
int mp[N + 5];
int main() {
for (int i = 0; i < N; i++)
is_prime[i] = true; // エラトステネス
for (int i = 2; i < N; i++) {
if (is_prime[i])
d[i] = i;
for (int ... | replace | 4 | 5 | 4 | 5 | 0 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
using ll = long long;
using VL = vector<ll>;
using VVL = vector<vector<ll>>;
using P = pair<ll, ll>;
// chmin, chmax関数
template <typename T, typename U, typename... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
using ll = long long;
using VL = vector<ll>;
using VVL = vector<vector<ll>>;
using P = pair<ll, ll>;
// chmin, chmax関数
template <typename T, typename U, typename... | insert | 69 | 69 | 69 | 72 | 0 | |
p02574 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
void fastio() {
cin.tie(nullptr);
cin.sync_with_stdio(false);
}
using LL = long long;
using LD = long double;
const LL MOD = 1e9 + 7;
const LL INF = LLONG_MAX;
const LL N = 1e6 + 1;
int main() {
fastio();
LL n;
cin >> n;
vector<LL> a(n);
for (auto &e :... | #include <bits/stdc++.h>
using namespace std;
void fastio() {
cin.tie(nullptr);
cin.sync_with_stdio(false);
}
using LL = long long;
using LD = long double;
const LL MOD = 1e9 + 7;
const LL INF = LLONG_MAX;
const LL N = 1e6 + 1;
int main() {
fastio();
LL n;
cin >> n;
vector<LL> a(n);
for (auto &e :... | replace | 41 | 42 | 41 | 42 | TLE | |
p02574 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#define ll long long
#define lson (rt << 1)
#define rson (rt << 1 | 1)
#define gmid ((l + r) >> 1)
using namespace std;
const int maxn = 10050;
const int maxm = 1000050;
ll p[maxm], a[maxm], s[maxm], cnt = 0;
bool vis[maxm];
... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#define ll long long
#define lson (rt << 1)
#define rson (rt << 1 | 1)
#define gmid ((l + r) >> 1)
using namespace std;
const int maxn = 1020;
const int maxm = 1000050;
ll p[maxm], a[maxm], s[maxm], cnt = 0;
bool vis[maxm];
v... | replace | 11 | 12 | 11 | 12 | TLE | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define FOR(i, l, r) for (i = l; i < r; i++)
#define REP(i, n) FOR(i, 0, n)
#define ALL(x) x.begin(), x.end()
#define P pair<ll, ll>
#define F first
#define S second
int main() {
int N, ans, i;
cin >> N;
int A[N];
REP(i, N) cin >> A[i];
a... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define FOR(i, l, r) for (i = l; i < r; i++)
#define REP(i, n) FOR(i, 0, n)
#define ALL(x) x.begin(), x.end()
#define P pair<ll, ll>
#define F first
#define S second
int main() {
int N, ans, i;
cin >> N;
int A[N];
REP(i, N) cin >> A[i];
a... | replace | 36 | 38 | 36 | 40 | 0 | |
p02574 | C++ | Runtime Error | #ifdef __APPLE__
#include <algorithm>
#include <cassert>
#include <chrono>
#include <cmath>
#include <ctgmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#... | #ifdef __APPLE__
#include <algorithm>
#include <cassert>
#include <chrono>
#include <cmath>
#include <ctgmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#... | replace | 61 | 62 | 61 | 62 | 0 | |
p02574 | C++ | Runtime Error |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pll = pair<ll, ll>;
using vvll = vector<vector<ll>>;
using vll = vector<ll>;
const ll MOD = 9998903;
ll GCD(ll a, ll b) {
if (b == 0)
return a;
else
return GCD(b, a % b);
}
void solve() {
ll i, j, count;
ll N;
cin >> N;
vec... |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pll = pair<ll, ll>;
using vvll = vector<vector<ll>>;
using vll = vector<ll>;
const ll MOD = 9998903;
ll GCD(ll a, ll b) {
if (b == 0)
return a;
else
return GCD(b, a % b);
}
void solve() {
ll i, j, count;
ll N;
cin >> N;
vec... | replace | 21 | 22 | 21 | 22 | -11 | |
p02574 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define d(x) cerr << #x ":" << x << endl;
#define dd(x, y) cerr << "(" #x "," #y "):(" << x << "," << y << ")" << endl
#define rep(i, n) for (int i = (int)(0); i < (int)(n); i++)
#define all(v) v.begin(), v.end()
#define dump(v) ... | #include <bits/stdc++.h>
using namespace std;
#define d(x) cerr << #x ":" << x << endl;
#define dd(x, y) cerr << "(" #x "," #y "):(" << x << "," << y << ")" << endl
#define rep(i, n) for (int i = (int)(0); i < (int)(n); i++)
#define all(v) v.begin(), v.end()
#define dump(v) ... | replace | 53 | 54 | 53 | 54 | TLE | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long int
using namespace std;
ll i, temp, t, n, j, a[200600], ans, g, C[200010];
bool cond;
char c;
string s;
void solve(ll x) {
if (cond)
return;
for (j = 1; j * j <= x; j++) {
if (x % j == 0) {
ll a = j;
ll b = x / j;
if (a == b) {
a = j;
... | #include <bits/stdc++.h>
#define ll long long int
using namespace std;
ll i, temp, t, n, j, a[2000010], ans, g, C[2000010];
bool cond;
char c;
string s;
void solve(ll x) {
if (cond)
return;
for (j = 1; j * j <= x; j++) {
if (x % j == 0) {
ll a = j;
ll b = x / j;
if (a == b) {
a = j... | replace | 3 | 4 | 3 | 4 | 0 | |
p02574 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define ll long long
#define ld long double
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define ll long long
#define ld long double
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
... | replace | 73 | 74 | 73 | 74 | TLE | |
p02574 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <climits>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef ... | #include <algorithm>
#include <cassert>
#include <climits>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef ... | replace | 75 | 88 | 75 | 88 | 0 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
vector<int> sieve(int n) {
std::vector<int> res(n);
std::iota(res.begin(), res.end(), 0);
for (int i = 2; i * i < n; ++i) {
if (res[i] < i)
continue;
for (int j = i * i; j < n; j += i)
if (res[j] == j)
res[j] = i;
}
return res;
}
voi... | #include <bits/stdc++.h>
using namespace std;
vector<int> sieve(int n) {
std::vector<int> res(n);
std::iota(res.begin(), res.end(), 0);
for (int i = 2; i * i < n; ++i) {
if (res[i] < i)
continue;
for (int j = i * i; j < n; j += i)
if (res[j] == j)
res[j] = i;
}
return res;
}
voi... | replace | 39 | 40 | 39 | 40 | 0 | |
p02574 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#define NDEBUG
#include <bitset>
#include <cassert>
usin... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#define NDEBUG
#include <bitset>
#include <cassert>
usin... | replace | 107 | 108 | 107 | 108 | TLE | |
p02574 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define endl '\n'
#define ll long long
#define double long double
using namespace std;
const ll inf = 1000000000000000000;
ll n, a[1000005], x;
set<ll> myset;
bool f = true;
bool is_prime(ll x) {
if (x <= 1)
return false;
for (ll i = 2; i <= (ll)sqrt(x); ++i)
if (x % i == 0)
... | #include <bits/stdc++.h>
#define endl '\n'
#define ll long long
#define double long double
using namespace std;
const ll inf = 1000000000000000000;
ll n, a[1000005], x;
set<ll> myset;
bool f = true;
bool is_prime(ll x) {
if (x <= 1)
return false;
for (ll i = 2; i <= (ll)sqrt(x); ++i)
if (x % i == 0)
... | insert | 19 | 19 | 19 | 21 | TLE | |
p02574 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
typedef long long ll;
using namespace std;
ll MOD = 1000000007;
#define vec vector<int>
#define vecll vector<ll>
#define vecd vector<double>
#define vecst vector<string>
#define vecb vector<bool>
#define vec2(var, n, m) vector<vector<int>> var(n, vector<int>(m, 0))
#define vecll2(var, n, m) ve... | #include <bits/stdc++.h>
typedef long long ll;
using namespace std;
ll MOD = 1000000007;
#define vec vector<int>
#define vecll vector<ll>
#define vecd vector<double>
#define vecst vector<string>
#define vecb vector<bool>
#define vec2(var, n, m) vector<vector<int>> var(n, vector<int>(m, 0))
#define vecll2(var, n, m) ve... | replace | 46 | 47 | 46 | 51 | TLE | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
#define X first
#define Y second
using namespace std;
typedef long long llint;
const int maxn = 2e5 + 10;
const int maxm = 1e6 + 10;
const int base = 31337;
const int mod = 1e9 + 7;
const int inf = 0x3f3f3f3f;
const int logo = 20;
const int off = 1 << logo;
const int treesiz = off << 1;
int ... | #include <bits/stdc++.h>
#define X first
#define Y second
using namespace std;
typedef long long llint;
const int maxn = 1e6 + 10;
const int maxm = 1e6 + 10;
const int base = 31337;
const int mod = 1e9 + 7;
const int inf = 0x3f3f3f3f;
const int logo = 20;
const int off = 1 << logo;
const int treesiz = off << 1;
int ... | replace | 7 | 8 | 7 | 8 | 0 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
#define f first
#define s second
using namespace std;
const int N = 1e6 + 5;
unordered_map<int, int> prcnt;
int lp[N], n, vvod, pair_copr, set_copr;
vector<int> pr, lispr, mas;
void fact(int chis) {
if (chis <= 1) {
return;
}
lispr.push_back(lp[chis]);
fact(chis / lp[chis]);
}
... | #include <bits/stdc++.h>
#define f first
#define s second
using namespace std;
const int N = 1e6 + 5;
unordered_map<int, int> prcnt;
int lp[N], n, vvod, pair_copr, set_copr;
vector<int> pr, lispr, mas;
void fact(int chis) {
if (chis <= 1) {
return;
}
lispr.push_back(lp[chis]);
fact(chis / lp[chis]);
}
... | replace | 48 | 52 | 48 | 54 | 0 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using ll = long long;
#define FOR(i, k, n) for (ll i = (k); i < (n); i++)
#define FORe(i, k, n) for (ll i = (k); i <= (n); i++)
#define FORr(i, k, n) for (ll i = (k)-1; i > (n); i--)
#define FORre(i, k, n) for (ll i = (k)-1; i >= (n); i--)
#define REP(i, n) FOR(i, 0, n)
#define REPr(i, n) FORre... | #include <bits/stdc++.h>
using ll = long long;
#define FOR(i, k, n) for (ll i = (k); i < (n); i++)
#define FORe(i, k, n) for (ll i = (k); i <= (n); i++)
#define FORr(i, k, n) for (ll i = (k)-1; i > (n); i--)
#define FORre(i, k, n) for (ll i = (k)-1; i >= (n); i--)
#define REP(i, n) FOR(i, 0, n)
#define REPr(i, n) FORre... | replace | 63 | 64 | 63 | 64 | 0 | |
p02574 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define sz(x) (int)x.size()
#define pb push_back
#define mp make_pair
#define ll long long
#define mod 1000000007
void fast() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
}
int main() {
fast();
int n;
cin >> n;
int a[n];
map<int, int> m;
for (int i = ... | #include <bits/stdc++.h>
using namespace std;
#define sz(x) (int)x.size()
#define pb push_back
#define mp make_pair
#define ll long long
#define mod 1000000007
void fast() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
}
int main() {
fast();
int n;
cin >> n;
int a[n];
map<int, int> m;
for (int i = ... | insert | 58 | 58 | 58 | 61 | TLE | |
p02574 | C++ | Runtime Error | #include <algorithm>
#include <array>
#include <cassert>
#include <climits>
#include <iostream>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <vector>
#define IN(a, b) (a.find(b) != a.end())
#define p(a, b) make_pair(a, b)
#define readVec(a) ... | #include <algorithm>
#include <array>
#include <cassert>
#include <climits>
#include <iostream>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <vector>
#define IN(a, b) (a.find(b) != a.end())
#define p(a, b) make_pair(a, b)
#define readVec(a) ... | replace | 45 | 46 | 45 | 46 | 0 | |
p02574 | Python | Time Limit Exceeded | #!/usr/bin/env python3
import sys
sys.setrecursionlimit(10**6)
INF = 10**9 + 1 # sys.maxsize # float("inf")
MOD = 10**9 + 7
def debug(*x):
print(*x, file=sys.stderr)
def precompute():
maxAS = 1000000
eratree = [0] * (maxAS + 10)
for p in range(2, maxAS + 1):
if eratree[p]:
cont... | #!/usr/bin/env python3
import sys
sys.setrecursionlimit(10**6)
INF = 10**9 + 1 # sys.maxsize # float("inf")
MOD = 10**9 + 7
def debug(*x):
print(*x, file=sys.stderr)
def precompute():
maxAS = 1000000
eratree = [0] * (maxAS + 10)
for p in range(2, maxAS + 1):
if eratree[p]:
cont... | insert | 138 | 138 | 138 | 144 | TLE | |
p02574 | C++ | Time Limit Exceeded | // #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
#define pb push_back
#define str to_string
#define endl "\n"
#define PI 3.141592653589
using namespace std;
using lint = long long;
template <class T> ostream &operator<<(ostream &o, const vector<T> &v) {
o << "{";
for (int i =... | // #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
#define pb push_back
#define str to_string
#define endl "\n"
#define PI 3.141592653589
using namespace std;
using lint = long long;
template <class T> ostream &operator<<(ostream &o, const vector<T> &v) {
o << "{";
for (int i =... | insert | 32 | 32 | 32 | 34 | TLE | |
p02574 | Python | Runtime Error | from math import gcd
def eratosthenes(n):
prime = []
data = [i for i in range(n - 1)]
while True:
p = data[0]
if n <= p**2:
return prime + data
prime.append(p)
data = [e for e in data if e % p != 0]
return data
def factorize(N): # 素因数分解
prime = set()
... | from math import gcd
def eratosthenes(n):
prime = []
data = [i for i in range(2, n + 1)]
while True:
p = data[0]
if n <= p**2:
return prime + data
prime.append(p)
data = [e for e in data if e % p != 0]
return data
def factorize(N): # 素因数分解
prime = set... | replace | 5 | 6 | 5 | 6 | ZeroDivisionError: integer division or modulo by zero | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02574/Python/s445965325.py", line 39, in <module>
prime_list = eratosthenes(10 ** 6)
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02574/Python/s445965325.py", line 12, in eratosthenes
... |
p02574 | Python | Runtime Error | import math
from functools import reduce
n = int(input())
a_list = list(map(int, input().split()))
max = a_list[-1] + 1
memo = [0] * max
for a in a_list:
memo[a] += 1
for i in range(2, max):
if sum(memo[i::i]) > 1:
if reduce(math.gcd, a_list) == 1:
print("setwise coprime")
exi... | import math
from functools import reduce
n = int(input())
a_list = list(map(int, input().split()))
max = 10**6 + 1
memo = [0] * max
for a in a_list:
memo[a] += 1
for i in range(2, max):
if sum(memo[i::i]) > 1:
if reduce(math.gcd, a_list) == 1:
print("setwise coprime")
exit()
... | replace | 5 | 6 | 5 | 6 | 0 | |
p02574 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define mp make_pair
#define pb push_back
#define int int64_t
#define ld long double
const int MOD = 1e9 + 7;
const int N = 1e6 + 5;
vector<int> primes;
bool isPrime[N];
int cnt[N];
int32_t main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n;
cin >... | #include <bits/stdc++.h>
using namespace std;
#define mp make_pair
#define pb push_back
#define int int64_t
#define ld long double
const int MOD = 1e9 + 7;
const int N = 1e6 + 5;
vector<int> primes;
bool isPrime[N];
int cnt[N];
int32_t main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n;
cin >... | replace | 39 | 40 | 39 | 40 | TLE | |
p02574 | Python | Runtime Error | import math
from functools import reduce
n = int(input())
a_list = list(map(int, input().split()))
max = a_list[n - 1] + 100
memo = [0] * max
for a in a_list:
memo[a] += 1
for i in range(2, max):
if sum(memo[i::i]) > 1:
if reduce(math.gcd, a_list) == 1:
print("setwise coprime")
... | import math
from functools import reduce
n = int(input())
a_list = list(map(int, input().split()))
max = 10**6 + 1
memo = [0] * max
for a in a_list:
memo[a] += 1
for i in range(2, max):
if sum(memo[i::i]) > 1:
if reduce(math.gcd, a_list) == 1:
print("setwise coprime")
exit()
... | replace | 5 | 6 | 5 | 6 | 0 | |
p02574 | C++ | Time Limit Exceeded | #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 ALL(x) x.begin(), x.end()
using ll = long long;
using pii = pair<int, int>;
using vi = vector<int>;
const ll INF = 1e18;
const int mod = 1e9 + 7;
const int MAX = 1e6... | #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 ALL(x) x.begin(), x.end()
using ll = long long;
using pii = pair<int, int>;
using vi = vector<int>;
const ll INF = 1e18;
const int mod = 1e9 + 7;
const int MAX = 1e6... | replace | 49 | 50 | 49 | 50 | TLE | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define pii pair<int, int>
#define F first
#define S second
#define ll long long
#define io \
ios_base::sync_with_stdio(0); \
cin.tie(0);... | #include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define pii pair<int, int>
#define F first
#define S second
#define ll long long
#define io \
ios_base::sync_with_stdio(0); \
cin.tie(0);... | replace | 12 | 13 | 12 | 13 | 0 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const int INF = 1e9;
int gcd(int a, int b) {
if (a % b == 0) {
return (b);
} else {
return (gcd(b, a % b));
}
}
bool IsPrime(long long n) {
if (n == 1)
return false;
for (long long i = 2; i * i < n; i++) {
if (n % i =... | #include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const int INF = 1e9;
int gcd(int a, int b) {
if (a % b == 0) {
return (b);
} else {
return (gcd(b, a % b));
}
}
bool IsPrime(long long n) {
if (n == 1)
return false;
for (long long i = 2; i * i < n; i++) {
if (n % i =... | replace | 71 | 72 | 71 | 72 | 0 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
template <typename A, typename B> string to_string(pair<A, B> p);
template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p);
template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p);
string to_string(const st... | #include <bits/stdc++.h>
using namespace std;
template <typename A, typename B> string to_string(pair<A, B> p);
template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p);
template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p);
string to_string(const st... | replace | 81 | 82 | 81 | 82 | 0 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define ld double
#define mp make_pair
#define pb push_back
#define mod 1000000007
#define ff first
#define ss second
#define pll pair<ll, ll>
#define nl "\n"
const int L = 1000006;
ll spf[L + 10];
map<ll, ll> x;
ll soe() {
ll i, j;
for (i = 1; ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define ld double
#define mp make_pair
#define pb push_back
#define mod 1000000007
#define ff first
#define ss second
#define pll pair<ll, ll>
#define nl "\n"
const int L = 1000006;
ll spf[L + 10];
map<ll, ll> x;
void soe() {
ll i, j;
for (i = 1... | replace | 14 | 15 | 14 | 15 | 0 | |
p02574 | Python | Runtime Error | from math import gcd
n = int(input())
a = list(map(int, input().split()))
# 解説AC(a*loga)
ans = 0
cnt = [0] * (max(a) + 1)
for ai in a:
ans = gcd(ans, ai)
cnt[ai] += 1
if ans != 1:
print("not coprime")
elif any(sum(cnt[i::i]) > 1 for i in range(max(a) + 1)):
print("setwise coprime")
else:
print("p... | from math import gcd
n = int(input())
a = list(map(int, input().split()))
# 解説AC(a*loga)
ans = 0
cnt = [0] * (max(a) + 1)
for ai in a:
ans = gcd(ans, ai)
cnt[ai] += 1
if ans != 1:
print("not coprime")
elif any(sum(cnt[i::i]) > 1 for i in range(2, max(a) + 1)):
print("setwise coprime")
else:
print... | replace | 14 | 15 | 14 | 15 | ValueError: slice step cannot be zero | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02574/Python/s213124389.py", line 15, in <module>
elif any(sum(cnt[i::i]) > 1 for i in range(max(a) + 1)):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02574/Python/s213124389.py", lin... |
p02575 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ls (p << 1)
#define rs (p << 1 | 1)
#define mid (l + r) / 2
#define rep(i, l, r) for (int i = l; i <= r; ++i)
typedef long long ll;
const int N = 800000 + 5;
struct tree {
int min, tag;
} t[N];
int n, m, a, b, fir;
int read() {
char c;
int x = 0, f = 1;
c = ... | #include <bits/stdc++.h>
using namespace std;
#define ls (p << 1)
#define rs (p << 1 | 1)
#define mid (l + r) / 2
#define rep(i, l, r) for (int i = l; i <= r; ++i)
typedef long long ll;
const int N = 80000000 + 5;
struct tree {
int min, tag;
} t[N];
int n, m, a, b, fir;
int read() {
char c;
int x = 0, f = 1;
c ... | replace | 7 | 8 | 7 | 8 | 0 | |
p02575 | C++ | Time Limit Exceeded | #include <iostream>
#include <set>
#include <string>
#include <vector>
#define rep(i, start, end) for (int i = (int)start; i < (int)end; ++i)
#define rrep(i, start, end) for (int i = (int)start - 1; i >= (int)end; --i)
#define all(x) (x).begin(), (x).end()
using namespace std;
using ll = long long;
template <typename T... | #include <iostream>
#include <set>
#include <string>
#include <vector>
#define rep(i, start, end) for (int i = (int)start; i < (int)end; ++i)
#define rrep(i, start, end) for (int i = (int)start - 1; i >= (int)end; --i)
#define all(x) (x).begin(), (x).end()
using namespace std;
using ll = long long;
template <typename T... | replace | 46 | 47 | 46 | 48 | TLE | |
p02575 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define N 200020
const int inf = 0x3f3f3f3f;
struct tree {
int l, r, min, tag;
} t[N << 2];
int a[N], b[N];
int n, m;
int ls(int cur) { return cur << 1; }
int rs(int cur) { return cur << 1 | 1; }
void lazy(int cur, int k) {
t[cur].tag = k;
t[cur].min = k;
}
void pushd... | #include <bits/stdc++.h>
using namespace std;
#define N 200020
const int inf = 0x3f3f3f3f;
struct tree {
int l, r, min, tag;
} t[N << 3];
int a[N], b[N];
int n, m;
int ls(int cur) { return cur << 1; }
int rs(int cur) { return cur << 1 | 1; }
void lazy(int cur, int k) {
t[cur].tag = k;
t[cur].min = k;
}
void pushd... | replace | 6 | 7 | 6 | 7 | 0 | |
p02575 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cmath>
#include <complex>
#include <cstring>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <vector>
#define f f... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <complex>
#include <cstring>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <vector>
#define f f... | replace | 83 | 84 | 83 | 84 | TLE | |
p02575 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int n, m, dis[101010];
set<int> st;
multiset<int> sstt;
int main() {
cin >> n >> m;
for (int i = 0; i < m; i++) {
st.insert(i);
sstt.insert(0);
}
for (int i = 0; i < n; i++) {
int a, b;
cin >> a >> b;
a--;
set<int>::iterator it = st.lower_bou... | #include <bits/stdc++.h>
using namespace std;
int n, m, dis[202020];
set<int> st;
multiset<int> sstt;
int main() {
cin >> n >> m;
for (int i = 0; i < m; i++) {
st.insert(i);
sstt.insert(0);
}
for (int i = 0; i < n; i++) {
int a, b;
cin >> a >> b;
a--;
set<int>::iterator it = st.lower_bou... | replace | 2 | 3 | 2 | 3 | 0 | |
p02575 | C++ | Runtime Error | // 22:30 -
#include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define all(x) x.begin(), x.end()
#define lch (o << 1)
#define rch (o << 1 | 1)
typedef double db;
typedef long long ll;
typedef unsigned int ui;
typedef pair<int, int> pint;
typedef tuple<int, int, int> tint;
const int N = 2... | // 22:30 -
#include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define all(x) x.begin(), x.end()
#define lch (o << 1)
#define rch (o << 1 | 1)
typedef double db;
typedef long long ll;
typedef unsigned int ui;
typedef pair<int, int> pint;
typedef tuple<int, int, int> tint;
const int N = 2... | insert | 57 | 57 | 57 | 59 | 0 | |
p02575 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define reps(i, n) for (int i = 1; i <= (int)(n); i++)
#define all(x) (x).begin(), (x).end()
#define uniq(x) (x).erase(unique(all(x)), (x).end())
#define bit(n) (1LL << (n))
#define dump(x) cerr << ... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define reps(i, n) for (int i = 1; i <= (int)(n); i++)
#define all(x) (x).begin(), (x).end()
#define uniq(x) (x).erase(unique(all(x)), (x).end())
#define bit(n) (1LL << (n))
#define dump(x) cerr << ... | replace | 195 | 196 | 195 | 196 | TLE | |
p02575 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
#define MOD 1000000007
#... | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
#define MOD 1000000007
#... | replace | 226 | 227 | 226 | 227 | 0 | |
p02575 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define chmax(a, b) a = max(a, b)
#define chmin(a, b) a = min(a, b)
#define all(x) (x).begin(), (x).end()
using namespace std;
using ll = long long;
using P = pair<int, int>;
using VI = vector<int>;
using VVI = vector<VI>;
int main() {
int h, w... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define chmax(a, b) a = max(a, b)
#define chmin(a, b) a = min(a, b)
#define all(x) (x).begin(), (x).end()
using namespace std;
using ll = long long;
using P = pair<int, int>;
using VI = vector<int>;
using VVI = vector<VI>;
int main() {
int h, w... | replace | 41 | 42 | 41 | 42 | 0 | |
p02575 | C++ | Time Limit Exceeded | #include <stdio.h>
#include <string.h>
#pragma GCC optimize("O3")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
static inline void PUT(char c) {
static char buf[1 << 15], *ptr = buf;
if (ptr == buf + strlen(buf) || c == 0) {
fwrite(buf, 1, ptr - buf, stdout), ptr = buf;
}
*pt... | #include <stdio.h>
#include <string.h>
#pragma GCC optimize("O3")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
static inline void PUT(char c) {
static char buf[1 << 15], *ptr = buf;
if (ptr == buf + strlen(buf) || c == 0) {
fwrite(buf, 1, ptr - buf, stdout), ptr = buf;
}
*pt... | insert | 92 | 92 | 92 | 95 | TLE | |
p02575 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for (int i = 0; i < (n); i++)
#define chmin(x, y) (x) = min((x), (y))
#define chmax(x, y) (x) = max((x), (y))
#define endl "\n"
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
template <ty... | #include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for (int i = 0; i < (n); i++)
#define chmin(x, y) (x) = min((x), (y))
#define chmax(x, y) (x) = max((x), (y))
#define endl "\n"
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
template <ty... | replace | 63 | 64 | 63 | 64 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): map::at
|
p02575 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using pll = pair<ll, ll>;
using pld = pair<ld, ld>;
const int INF = 1e9 + 7;
const ll LINF = 9223372036854775807;
const ll MOD = 1e9 + 7;
const ld PI = acos(-1);
const ld EPS = 1e-10; // 微調整用(EPSより小さいと0と判定など)
int ii() {
int ... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using pll = pair<ll, ll>;
using pld = pair<ld, ld>;
const int INF = 1e9 + 7;
const ll LINF = 9223372036854775807;
const ll MOD = 1e9 + 7;
const ld PI = acos(-1);
const ld EPS = 1e-10; // 微調整用(EPSより小さいと0と判定など)
int ii() {
int ... | replace | 162 | 166 | 162 | 166 | TLE | |
p02575 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define srep(i, s, t) for (int i = s; i < t; ++i)
using namespace std;
typedef pair<int, int> P;
typedef long long int ll;
#define dame ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define srep(i, s, t) for (int i = s; i < t; ++i)
using namespace std;
typedef pair<int, int> P;
typedef long long int ll;
#define dame ... | replace | 85 | 86 | 85 | 86 | TLE | |
p02575 | C++ | Runtime Error | /*/ Author: kal013 /*/
// #pragma GCC optimize ("O3")
#include "bits/stdc++.h"
#include "ext/pb_ds/assoc_container.hpp"
#include "ext/pb_ds/tree_policy.hpp"
using namespace std;
using namespace __gnu_pbds;
template <class T>
using ordered_set =
tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_up... | /*/ Author: kal013 /*/
// #pragma GCC optimize ("O3")
#include "bits/stdc++.h"
#include "ext/pb_ds/assoc_container.hpp"
#include "ext/pb_ds/tree_policy.hpp"
using namespace std;
using namespace __gnu_pbds;
template <class T>
using ordered_set =
tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_up... | delete | 257 | 258 | 257 | 257 | 0 | |
p02575 | C++ | Time Limit Exceeded | #include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <random>
#include ... | #include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <random>
#include ... | replace | 155 | 158 | 155 | 158 | TLE | |
p02575 | C++ | Runtime Error | // #pragma GCC optimize ("O3","unroll-loops")
#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <functional>
#include <numeric>
#include <bitset>
#include <deque>
#include <map>
#include <queue>
#include <set>
#include <stack>... | // #pragma GCC optimize ("O3","unroll-loops")
#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <functional>
#include <numeric>
#include <bitset>
#include <deque>
#include <map>
#include <queue>
#include <set>
#include <stack>... | replace | 258 | 259 | 258 | 259 | 0 | |
p02575 | C++ | Runtime Error | #include "bits/stdc++.h"
#define ll long long
#define lld long double
#define MOD 1000000007
#define inf 1000000000000000000ll
#define pii pair<int, int>
#define f first
#define s second
#define pb push_back
#define mp make_pair
#define all(v) v.begin(), v.end()
#define fast ... | #include "bits/stdc++.h"
#define ll long long
#define lld long double
#define MOD 1000000007
#define inf 1000000000000000000ll
#define pii pair<int, int>
#define f first
#define s second
#define pb push_back
#define mp make_pair
#define all(v) v.begin(), v.end()
#define fast ... | replace | 40 | 41 | 40 | 41 | 0 | |
p02575 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdint>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#inclu... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdint>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#inclu... | replace | 123 | 124 | 123 | 124 | 0 | |
p02575 | C++ | Runtime Error | #include <algorithm>
#include <climits>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
#define MOD 1000000007
using namespace std;
typedef long long ll;
#include <cstring>
const int MAX_N = 1 ... | #include <algorithm>
#include <climits>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
#define MOD 1000000007
using namespace std;
typedef long long ll;
#include <cstring>
const int MAX_N = 1 ... | replace | 16 | 17 | 16 | 17 | 0 | |
p02575 | C++ | Time Limit Exceeded | #line 2 "header.hpp"
//%snippet.set('header')%
//%snippet.fold()%
#ifndef HEADER_H
#define HEADER_H
// template version 2.0
using namespace std;
#include <bits/stdc++.h>
// varibable settings
const long long INF = 1e18;
template <class T> constexpr T inf = numeric_limits<T>::max() / 2.1;
#define _overload3(_1, _2, ... | #line 2 "header.hpp"
//%snippet.set('header')%
//%snippet.fold()%
#ifndef HEADER_H
#define HEADER_H
// template version 2.0
using namespace std;
#include <bits/stdc++.h>
// varibable settings
const long long INF = 1e18;
template <class T> constexpr T inf = numeric_limits<T>::max() / 2.1;
#define _overload3(_1, _2, ... | replace | 246 | 247 | 246 | 247 | TLE | |
p02575 | C++ | Runtime Error | #include <bits/stdc++.h>
#define pb emplace_back
using namespace std;
using ll = long long;
#ifdef KEV
#define DE(i, e) cerr << #i << ' ' << i << e
void debug(auto L, auto R) {
while (L < R)
cerr << *L << " \n"[L + 1 == R], ++L;
}
#else
#define DE(...) 0
void debug(...) {}
#endif
const int maxn = 200010, maxm = m... | #include <bits/stdc++.h>
#define pb emplace_back
using namespace std;
using ll = long long;
#ifdef KEV
#define DE(i, e) cerr << #i << ' ' << i << e
void debug(auto L, auto R) {
while (L < R)
cerr << *L << " \n"[L + 1 == R], ++L;
}
#else
#define DE(...) 0
void debug(...) {}
#endif
const int maxn = 200010, maxm = m... | replace | 151 | 152 | 151 | 152 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.