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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p02573 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ks \
ios::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0)
#define fr first
#define sc second
#de... | #include <bits/stdc++.h>
#define ks \
ios::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0)
#define fr first
#define sc second
#de... | replace | 50 | 51 | 50 | 51 | 0 | |
p02573 | C++ | Runtime Error | #include <bits/stdc++.h>
// #include<atcoder/all>
using namespace std;
// using namespace atcoder;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define repl(i, l, r) for (ll i = (l); i < (r); i++)
#define per(i, n) for (ll i = n - 1; i >= 0; i--)
#define perl(i, r, l) for (ll i = r - 1; i >= l; i--)
#define fi first
#d... | #include <bits/stdc++.h>
// #include<atcoder/all>
using namespace std;
// using namespace atcoder;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define repl(i, l, r) for (ll i = (l); i < (r); i++)
#define per(i, n) for (ll i = n - 1; i >= 0; i--)
#define perl(i, r, l) for (ll i = r - 1; i >= l; i--)
#define fi first
#d... | replace | 73 | 76 | 73 | 76 | 0 | |
p02573 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define endl '\n'
using namespace std;
typedef long long ll;
#define forn(i, n) for (ll i = 0; i < ll(n); i++)
class DisjointSet {
vector<ll> Parent, Rank;
public:
DisjointSet(ll n) { forn(i, n + 1) Parent.push_back(i), Rank.push_back(0); }
ll Find(ll x) {
while (Parent[x] != x)
... | #include <bits/stdc++.h>
#define endl '\n'
using namespace std;
typedef long long ll;
#define forn(i, n) for (ll i = 0; i < ll(n); i++)
class DisjointSet {
vector<ll> Parent, Rank;
public:
DisjointSet(ll n) { forn(i, n + 1) Parent.push_back(i), Rank.push_back(0); }
ll Find(ll x) {
if (Parent[x] == x)
... | replace | 12 | 15 | 12 | 17 | TLE | |
p02573 | C++ | Runtime Error | // コンパイラ最適化用
#pragma GCC optimize("Ofast")
#define _GLIBCXX_DEBUG
// インクルード(アルファベット順)
#include <algorithm> //sort,二分探索,など
#include <bits/stdc++.h>
#include <bitset> //固定長bit集合
#include <chrono> //実行時間計測
#include <cmath> //pow,logなど
#include <complex> //複素数
#include <deque> //両端アクセスのキ... | // コンパイラ最適化用
#pragma GCC optimize("Ofast")
#define _GLIBCXX_DEBUG
// インクルード(アルファベット順)
#include <algorithm> //sort,二分探索,など
#include <bits/stdc++.h>
#include <bitset> //固定長bit集合
#include <chrono> //実行時間計測
#include <cmath> //pow,logなど
#include <complex> //複素数
#include <deque> //両端アクセスのキ... | replace | 100 | 102 | 100 | 102 | -6 | /usr/include/c++/12/debug/vector:442:
In function:
std::debug::vector<_Tp, _Allocator>::reference std::debug::vector<_Tp,
_Allocator>::operator[](size_type) [with _Tp = int; _Allocator =
std::allocator<int>; reference = int&; size_type = long unsigned int]
Error: attempt to subscript container with out-o... |
p02573 | C++ | Runtime Error | // This file is a "Hello, world!" in C++ language by GCC for wandbox.
#include <algorithm>
#include <bits/stdc++.h>
#include <cstdlib>
#include <iostream>
using namespace std;
vector<bool> seen;
int dfs(const vector<vector<int>> &G, int v) {
int size = 1, p = 0;
seen[v] = true; // v を訪問済にする
// v から行ける各頂点 next_v ... | // This file is a "Hello, world!" in C++ language by GCC for wandbox.
#include <algorithm>
#include <bits/stdc++.h>
#include <cstdlib>
#include <iostream>
using namespace std;
vector<bool> seen;
int dfs(const vector<vector<int>> &G, int v) {
int size = 1, p = 0;
seen[v] = true; // v を訪問済にする
// v から行ける各頂点 next_v ... | replace | 23 | 24 | 23 | 24 | 0 | |
p02573 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(v) v.begin(), v.end()
#define SP << " "
#define LLi long long int
using namespace std;
void PV(vector<int> pvv) {
rep(i, pvv.size()) cout << pvv[i] SP;
cout << endl;
}
void PVL(vector<LLi> pvv) {
rep(i, pvv.size()) cout ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(v) v.begin(), v.end()
#define SP << " "
#define LLi long long int
using namespace std;
void PV(vector<int> pvv) {
rep(i, pvv.size()) cout << pvv[i] SP;
cout << endl;
}
void PVL(vector<LLi> pvv) {
rep(i, pvv.size()) cout ... | insert | 62 | 62 | 62 | 63 | TLE | |
p02573 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
vector<int> e[200005];
int n, m, ans;
bool vis[200005];
int bfs(int x) {
queue<int> q;
int num = 1;
q.push(x);
vis[x] = 1;
while (!q.empty()) {
int k = q.front();
q.pop();
for (int i = 0; i < e[k].size(); ++i)
if (!vis[e[k][i]]) {
vis[e[k... | #include <bits/stdc++.h>
using namespace std;
vector<int> e[200005];
int n, m, ans;
bool vis[200005];
void bfs(int x) {
queue<int> q;
int num = 1;
q.push(x);
vis[x] = 1;
while (!q.empty()) {
int k = q.front();
q.pop();
for (int i = 0; i < e[k].size(); ++i)
if (!vis[e[k][i]]) {
vis[e[... | replace | 5 | 6 | 5 | 6 | 0 | |
p02573 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define MP make_pair
#define PB push_back
#define SZ size()
#define B begin()
#define E end()
#define ll ... | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define MP make_pair
#define PB push_back
#define SZ size()
#define B begin()
#define E end()
#define ll ... | replace | 54 | 55 | 54 | 55 | 0 | |
p02573 | C++ | Runtime Error | // C++ implementation of the above approach
#include <bits/stdc++.h>
using namespace std;
const int maxx = 100005;
vector<int> graph[maxx];
void dfs(int curr, int &cnt, int *visited, vector<int> &duringdfs) {
visited[curr] = 1;
++cnt;
duringdfs.push_back(curr);
for (auto &child : graph[curr]) {
if (visited[... | // C++ implementation of the above approach
#include <bits/stdc++.h>
using namespace std;
const int maxx = 200005;
vector<int> graph[maxx];
void dfs(int curr, int &cnt, int *visited, vector<int> &duringdfs) {
visited[curr] = 1;
++cnt;
duringdfs.push_back(curr);
for (auto &child : graph[curr]) {
if (visited[... | replace | 3 | 4 | 3 | 4 | 0 | |
p02573 | C++ | Runtime Error | #include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
using namespace std;
using ll = long long;
#define rep(i, n) for (ll i = 0; i < ll(n); i++)
#define YESNO(T) \
if (T) { \
cout << "YES"... | #include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
using namespace std;
using ll = long long;
#define rep(i, n) for (ll i = 0; i < ll(n); i++)
#define YESNO(T) \
if (T) { \
cout << "YES"... | replace | 87 | 88 | 87 | 88 | 0 | |
p02573 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define int long long
struct UnionFind {
vector<int> par;
vector<int> siz;
UnionFind(int n) : par(n), siz(n) {
for (int i = 0; i < n; i++) {
par[i] = i;
siz[i] = 1;
}
}
int root(int x) {
if (par[x] == x)
return x;
else
re... | #include <bits/stdc++.h>
using namespace std;
#define int long long
struct UnionFind {
vector<int> par;
vector<int> siz;
UnionFind(int n) : par(n), siz(n) {
for (int i = 0; i < n; i++) {
par[i] = i;
siz[i] = 1;
}
}
int root(int x) {
if (par[x] == x)
return x;
else
re... | replace | 22 | 28 | 22 | 23 | TLE | |
p02573 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define int long long
struct UnionFind {
vector<int> par;
vector<int> siz;
UnionFind(int n) : par(n), siz(n) {
for (int i = 0; i < n; i++) {
par[i] = i;
siz[i] = 1;
}
}
int root(int x) {
if (par[x] == x)
return x;
else
re... | #include <bits/stdc++.h>
using namespace std;
#define int long long
struct UnionFind {
vector<int> par;
vector<int> siz;
UnionFind(int n) : par(n), siz(n) {
for (int i = 0; i < n; i++) {
par[i] = i;
siz[i] = 1;
}
}
int root(int x) {
if (par[x] == x)
return x;
else
re... | replace | 56 | 57 | 56 | 57 | TLE | |
p02573 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#pragma GCC optimize(3)
#define endl '\n'
#define ll long long
#define ld long double
#define ull unsigned long long
using namespace std;
struct _IO {
_IO() {
ios::sync_with_stdio(0);
cin.tie(0);
}
} _io;
int parent[200005], value[200005];
int maxn = 1;
int find(int a) {
if (pare... | #include <bits/stdc++.h>
#pragma GCC optimize(3)
#define endl '\n'
#define ll long long
#define ld long double
#define ull unsigned long long
using namespace std;
struct _IO {
_IO() {
ios::sync_with_stdio(0);
cin.tie(0);
}
} _io;
int parent[200005], value[200005];
int maxn = 1;
int find(int a) {
if (pare... | insert | 39 | 39 | 39 | 41 | TLE | |
p02573 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define repp(i, n, m) for (int(i) = (n); (i) < (m); (i)++)
#define repn(i, n) for (int(i) = 1; (i) <= (n); (i)++)
#define repr(i, n) for (int(i) = (n - 1); (i) >= 0; (i)--)
#define all(x) (x).begin(), (x).end()
#define l... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define repp(i, n, m) for (int(i) = (n); (i) < (m); (i)++)
#define repn(i, n) for (int(i) = 1; (i) <= (n); (i)++)
#define repr(i, n) for (int(i) = (n - 1); (i) >= 0; (i)--)
#define all(x) (x).begin(), (x).end()
#define l... | replace | 39 | 40 | 39 | 40 | 0 | |
p02573 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <cstdio>
#include <map>
#include <math.h>
#include <queue>
#include <set>
using namespace std;
using ll = long long;
ll find(ll x, vector<ll> &par) {
if (par.at(x) == x) {
return x;
} else {
return par.at(x) = find(par.at(x), par);
}
}
int main() {
ll N, M;
cin >> N... | #include <bits/stdc++.h>
#include <cstdio>
#include <map>
#include <math.h>
#include <queue>
#include <set>
using namespace std;
using ll = long long;
ll find(ll x, vector<ll> &par) {
if (par.at(x) == x) {
return x;
} else {
return par.at(x) = find(par.at(x), par);
}
}
int main() {
ll N, M;
cin >> N... | replace | 31 | 33 | 31 | 33 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): vector::_M_range_check: __n (which is 5) >= this->size() (which is 5)
|
p02573 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vl = vector<ll>;
using vvl = vector<vl>;
using vs = vector<string>;
using vb = vector<bool>;
using pll = pair<ll, ll>;
using vpll = vector<pll>;
const ll oo = 0x3f3f3f3f3f3f3f3fLL;
const double eps = 1e-9;
#define sz(c) ll... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vl = vector<ll>;
using vvl = vector<vl>;
using vs = vector<string>;
using vb = vector<bool>;
using pll = pair<ll, ll>;
using vpll = vector<pll>;
const ll oo = 0x3f3f3f3f3f3f3f3fLL;
const double eps = 1e-9;
#define sz(c) ll... | delete | 44 | 48 | 44 | 44 | TLE | |
p02573 | C++ | Runtime Error | #include <iostream>
using namespace std;
const int maN = 1e5;
int parent[maN];
int sz[maN];
void make_set(int v) { parent[v] = v; }
int find_set(int v) {
if (v == parent[v])
return v;
return parent[v] = find_set(parent[v]);
}
void union_sets(int a, int b) {
int u = find_set(a);
int v = find_set(b);
if (u... | #include <iostream>
using namespace std;
const int maN = 2e5 + 5;
int parent[maN];
int sz[maN];
void make_set(int v) { parent[v] = v; }
int find_set(int v) {
if (v == parent[v])
return v;
return parent[v] = find_set(parent[v]);
}
void union_sets(int a, int b) {
int u = find_set(a);
int v = find_set(b);
i... | replace | 2 | 3 | 2 | 3 | 0 | |
p02573 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
multimap<int, int> relation;
for (int i = 0; i < m; i++) {
int a, b;
cin >> a >> b;
bool flg = true;
auto p = relation.equal_range(a);
for (auto it = p.first; it != p.second; ++it) {
if (it->second ... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
multimap<int, int> relation;
for (int i = 0; i < m; i++) {
int a, b;
cin >> a >> b;
// bool flg=true;
// auto p = relation.equal_range(a);
// for (auto it = p.first; it != p.second; ++it... | replace | 13 | 25 | 13 | 25 | TLE | |
p02573 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int bfs(int s, vector<vector<int>> &adj, vector<int> visited) {
queue<int> q;
q.push(s);
visited[s] = 1;
int size = 1;
while (!q.empty()) {
int t = q.front();
q.pop();
for (auto x : adj[t]) {
if (visited[x] == 0) {
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int bfs(int s, vector<vector<int>> &adj, vector<int> &visited) {
queue<int> q;
q.push(s);
visited[s] = 1;
int size = 1;
while (!q.empty()) {
int t = q.front();
q.pop();
for (auto x : adj[t]) {
if (visited[x] == 0) {
... | replace | 4 | 5 | 4 | 5 | TLE | |
p02573 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double db;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<int, ll> pil;
typedef pair<ll, int> pli;
#define Fi first
#define Se second
#define _Out(a) cerr << #a << " = " << (a) << endl
const int INF = 0x3f3f3f3f, MAXN = 1e3 ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double db;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<int, ll> pil;
typedef pair<ll, int> pli;
#define Fi first
#define Se second
#define _Out(a) cerr << #a << " = " << (a) << endl
const int INF = 0x3f3f3f3f, MAXN = 3e5 ... | replace | 11 | 12 | 11 | 12 | 0 | |
p02573 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef tree<int, null_type, less_equal<int>, rb_tree_tag,
tree_order_statistics_node_update>
ordered_set;
const int MAX_N = 1e5 + 5;
const int MAX_... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef tree<int, null_type, less_equal<int>, rb_tree_tag,
tree_order_statistics_node_update>
ordered_set;
const int MAX_N = 2e5 + 5;
const int MAX_... | replace | 11 | 12 | 11 | 12 | 0 | |
p02573 | C++ | Runtime Error |
/*
ID: Bipin Singh [bipinsingh061]
LANG: C++
TASK: gift1
*/
#include <bits/stdc++.h>
using namespace std;
#define deb(x) cout << "\n" << (#x) << " = " << (x) << "\n"
#define int long long int
void inputoutput() {
ios_base::sync_with_stdio(0);
cin.tie(0);
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
... |
/*
ID: Bipin Singh [bipinsingh061]
LANG: C++
TASK: gift1
*/
#include <bits/stdc++.h>
using namespace std;
#define deb(x) cout << "\n" << (#x) << " = " << (x) << "\n"
#define int long long int
void inputoutput() {
ios_base::sync_with_stdio(0);
cin.tie(0);
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
... | replace | 45 | 47 | 45 | 47 | 0 | |
p02573 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
class UnionFind {
public:
UnionFind(int &n) { r = vector<int>(n + 1, -1); }
int findRoot(int x) {
if (r[x] < 0)
return x... | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
class UnionFind {
public:
UnionFind(int &n) { r = vector<int>(n + 1, -1); }
int findRoot(int x) {
if (r[x] < 0)
return x... | replace | 17 | 19 | 17 | 18 | -11 | |
p02573 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define ll long long
#define ALL(x) x.begin(), x.end()
#define MOD (1000000000 + 7)
using namespace std;
#define PI 3.14159265359
#define tMOD 998244353
#define mkpr(x, y) make_pair(x, y)
int N, M;
int v[200400];
int vs[203000] = {0};
int root(int i) {
if (v[i] == i) {
return i;
} else... | #include <bits/stdc++.h>
#define ll long long
#define ALL(x) x.begin(), x.end()
#define MOD (1000000000 + 7)
using namespace std;
#define PI 3.14159265359
#define tMOD 998244353
#define mkpr(x, y) make_pair(x, y)
int N, M;
int v[200400];
int vs[203000] = {0};
int root(int i) {
if (v[i] == i) {
return i;
} else... | replace | 25 | 26 | 25 | 26 | TLE | |
p02573 | C++ | Time Limit Exceeded | #include <iostream>
#include <vector>
using namespace std;
class Group {
public:
vector<int> root;
int maxSize = -1;
Group(int n) { root = vector<int>(n, -1); }
int getRoot(int c) { return root[c] < 0 == c ? c : getRoot(root[c]); }
void merge(int a, int b) {
int rootA = getRoot(a);
int rootB = ge... | #include <iostream>
#include <vector>
using namespace std;
class Group {
public:
vector<int> root;
int maxSize = -1;
Group(int n) { root = vector<int>(n, -1); }
int getRoot(int c) { return root[c] < 0 ? c : root[c] = getRoot(root[c]); }
void merge(int a, int b) {
int rootA = getRoot(a);
int rootB... | replace | 12 | 13 | 12 | 13 | TLE | |
p02573 | C++ | Runtime Error | #include <iostream>
#include <queue>
#include <vector>
using namespace std;
bool t[100];
vector<int> e[100];
int dfs(int v) {
int y = 1;
t[v] = true;
for (int i = 0; i < e[v].size(); i++) {
int u = e[v][i];
if (!t[u]) {
y += dfs(u);
}
}
return y;
}
int main() {
int n;
int m;
cin >> n;
... | #include <iostream>
#include <queue>
#include <vector>
using namespace std;
bool t[200010];
vector<int> e[200010];
int dfs(int v) {
int y = 1;
t[v] = true;
for (int i = 0; i < e[v].size(); i++) {
int u = e[v][i];
if (!t[u]) {
y += dfs(u);
}
}
return y;
}
int main() {
int n;
int m;
cin ... | replace | 4 | 6 | 4 | 6 | 0 | |
p02574 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
std::vector<int> Eratosthenes(const int N) {
std::vector<bool> is_prime(N + 1);
for (int i = 0; i <= N; i++) {
is_prime[i] = true;
}
std::vector<int> P;
for (int i... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
std::vector<int> Eratosthenes(const int N) {
std::vector<bool> is_prime(N + 1);
for (int i = 0; i <= N; i++) {
is_prime[i] = true;
}
std::vector<int> P;
for (int i... | insert | 40 | 40 | 40 | 42 | TLE | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
#define sp putchar(' ')
#define en putchar('\n')
#define MOD(x) ((((x) % Mod) + Mod) % Mod)
#define int64_t int
const int MAXN = 500005;
using namespace std;
int n, m;
int64_t a;
bool isP[MAXN];
vector<int> primes;
void getP() {
memset(isP, true, sizeof(isP));
isP[0] = isP[1] = false;
pr... | #include <bits/stdc++.h>
#define sp putchar(' ')
#define en putchar('\n')
#define MOD(x) ((((x) % Mod) + Mod) % Mod)
#define int64_t int
const int MAXN = 1000005;
using namespace std;
int n, m;
int64_t a;
bool isP[MAXN];
vector<int> primes;
void getP() {
memset(isP, true, sizeof(isP));
isP[0] = isP[1] = false;
p... | replace | 5 | 6 | 5 | 6 | 0 | |
p02574 | C++ | Runtime Error | /// You just can't beat the person who never gives up
/// ICPC next year
// #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5;
int n, a[N];
int... | /// You just can't beat the person who never gives up
/// ICPC next year
// #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5;
int n, a[N];
int... | insert | 53 | 53 | 53 | 54 | 0 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
// FILE *fi = freopen("1.txt", "r", stdin);
// FILE *fo = freopen("1", "w", stdout);
// FILE *fi = freopen("P.inp", "r", stdin);
// FILE *fo = freopen("P.out", "w", stdout);
bool used[1000001];
void bfs(int x) {
queue<int> q;
if (used[x])
return;... | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
// FILE *fi = freopen("1.txt", "r", stdin);
// FILE *fo = freopen("1", "w", stdout);
// FILE *fi = freopen("P.inp", "r", stdin);
// FILE *fo = freopen("P.out", "w", stdout);
bool used[1000001];
void bfs(int x) {
queue<int> q;
if (used[x])
return;... | replace | 19 | 20 | 19 | 20 | 0 | |
p02574 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define ll long long
#define MODV 1000000007
#define INFLL LLONG_MAX // 9223372036854775807
#define EPS 1e-9
#define rep(i, n) for (ll i = 0, i##_len = (ll)(n); i < i##_len; i++)
#define repf(i, n) for (ll i = 1, i##_len = (ll)(n + 1); i < i##_len; i++)
#define all(v) v.begin(), v.end()
#define... | #include <bits/stdc++.h>
#define ll long long
#define MODV 1000000007
#define INFLL LLONG_MAX // 9223372036854775807
#define EPS 1e-9
#define rep(i, n) for (ll i = 0, i##_len = (ll)(n); i < i##_len; i++)
#define repf(i, n) for (ll i = 1, i##_len = (ll)(n + 1); i < i##_len; i++)
#define all(v) v.begin(), v.end()
#define... | insert | 79 | 79 | 79 | 81 | TLE | |
p02574 | C++ | Runtime Error | // CPP program to find the number of pairs
// such that gcd equals to 1
#include <bits/stdc++.h>
using namespace std;
#define N 100050
int lpf[N], mobius[N];
// Function to calculate least
// prime factor of each number
void least_prime_factor() {
for (int i = 2; i < N; i++)
// If it is a prime number
if ... | // CPP program to find the number of pairs
// such that gcd equals to 1
#include <bits/stdc++.h>
using namespace std;
#define N 1000050
int lpf[N], mobius[N];
// Function to calculate least
// prime factor of each number
void least_prime_factor() {
for (int i = 2; i < N; i++)
// If it is a prime number
if... | replace | 5 | 6 | 5 | 6 | 0 | |
p02574 | C++ | Time Limit Exceeded |
// #pragma GCC target("avx2")
#pragma GCC optimize("O3")
// #pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include <prettyprint.hpp>
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]: ", d_err(__VA_ARGS__);
#else
#define debug(...) 83;
#endif
void d_err() { cerr... |
// #pragma GCC target("avx2")
#pragma GCC optimize("O3")
// #pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include <prettyprint.hpp>
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]: ", d_err(__VA_ARGS__);
#else
#define debug(...) 83;
#endif
void d_err() { cerr... | replace | 78 | 79 | 78 | 79 | TLE | |
p02574 | C++ | Runtime Error | // AUTHOR - NAVEEN KUMAR(@naveen19991124)
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
// #include<boost/multiprecision/cpp_int.hpp>
// #inlcude<boost/multiprecision/cpp_dec_float.hpp>
#define ll long... | // AUTHOR - NAVEEN KUMAR(@naveen19991124)
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
// #include<boost/multiprecision/cpp_int.hpp>
// #inlcude<boost/multiprecision/cpp_dec_float.hpp>
#define ll long... | replace | 188 | 189 | 188 | 189 | 0 | |
p02574 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
const int N = 1e6 + 9;
vector<int> prime;
bool flag[N];
void seive() {
for (int i = 4; i < N; i += 2)
flag[i] = true;
for (int i = 3; i * i < N; i += 2) {
if (!flag[i]) {
for (int j = i * 3; j < N; j += i * 2)
flag[j] = true;
}
}
prime.p... | #include "bits/stdc++.h"
using namespace std;
const int N = 1e6 + 9;
vector<int> prime;
bool flag[N + 100];
void seive() {
for (int i = 4; i < N; i += 2)
flag[i] = true;
for (int i = 3; i * i < N; i += 2) {
if (!flag[i]) {
for (int j = i * 3; j < N; j += i * 2)
flag[j] = true;
}
}
p... | replace | 6 | 7 | 6 | 7 | 0 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
#define A_MAX 1000000
#define A_MAX_HALF 500000
using namespace std;
int min_factor[A_MAX + 1];
int q[A_MAX + 1];
int a[A_MAX + 1];
vector<int> primes{
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43,
47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103... | #include <bits/stdc++.h>
#define A_MAX 1000000
#define A_MAX_HALF 500000
using namespace std;
int min_factor[A_MAX + 1];
int q[A_MAX + 1];
int a[A_MAX + 1];
vector<int> primes{
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43,
47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103... | replace | 26 | 27 | 26 | 27 | 0 | |
p02574 | C++ | Time Limit Exceeded | // #pragma GCC optimize ("O3")
// #pragma GCC target ("sse4")
#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 29;
const int NINF = -1 * INF;
const long long LLINF = 1ll << 60;
const long long LLNINF = -1 * LLINF;
template <class Ch, class Tr, class Container>
basic_ostream<Ch, Tr> &operator<<(basic... | // #pragma GCC optimize ("O3")
// #pragma GCC target ("sse4")
#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 29;
const int NINF = -1 * INF;
const long long LLINF = 1ll << 60;
const long long LLNINF = -1 * LLINF;
template <class Ch, class Tr, class Container>
basic_ostream<Ch, Tr> &operator<<(basic... | replace | 150 | 151 | 150 | 151 | TLE | |
p02574 | C++ | Runtime Error | // #pragma GCC optimize ("O3")
// #pragma GCC target ("sse4")
#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 29;
const int NINF = -1 * INF;
const long long LLINF = 1ll << 60;
const long long LLNINF = -1 * LLINF;
template <class Ch, class Tr, class Container>
basic_ostream<Ch, Tr> &operator<<(basic... | // #pragma GCC optimize ("O3")
// #pragma GCC target ("sse4")
#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 29;
const int NINF = -1 * INF;
const long long LLINF = 1ll << 60;
const long long LLNINF = -1 * LLINF;
template <class Ch, class Tr, class Container>
basic_ostream<Ch, Tr> &operator<<(basic... | replace | 62 | 63 | 62 | 63 | -11 | |
p02574 | C++ | Runtime Error | // #pragma GCC optimize ("O3")
// #pragma GCC target ("sse4")
#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 29;
const int NINF = -1 * INF;
const long long LLINF = 1ll << 60;
const long long LLNINF = -1 * LLINF;
template <class Ch, class Tr, class Container>
basic_ostream<Ch, Tr> &operator<<(basic... | // #pragma GCC optimize ("O3")
// #pragma GCC target ("sse4")
#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 29;
const int NINF = -1 * INF;
const long long LLINF = 1ll << 60;
const long long LLNINF = -1 * LLINF;
template <class Ch, class Tr, class Container>
basic_ostream<Ch, Tr> &operator<<(basic... | replace | 91 | 92 | 91 | 92 | 0 | |
p02574 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define int long long
using namespace std;
vector<int> primes(int x) {
vector<int> ret;
for (int i = 2; i * i <= x; i++) {
if (x % i)
continue;
while (x % i == 0)
x /= i;
ret.push_back(i);
}
if (x != 1)
ret.push_back(x);
return ret;
}
signed main() {
int ... | #include <bits/stdc++.h>
#define int long long
using namespace std;
vector<int> primes(int x) {
vector<int> ret;
if (x % 2 == 0) {
ret.push_back(2);
while (x % 2 == 0)
x /= 2;
}
for (int i = 3; i * i <= x; i += 2) {
if (x % i)
continue;
while (x % i == 0)
x /= i;
ret.push_b... | replace | 5 | 6 | 5 | 11 | TLE | |
p02574 | C++ | Time Limit Exceeded | #pragma GCC optimize(3, "Ofast", "inline")
#include <bits/stdc++.h>
#define ios std::ios::sync_with_stdio(false)
#define rep(i, a, n) for (int i = a; i <= n; i++)
#define per(i, n, a) for (int i = n; i >= a; i--)
#define repp(i, a, b) for (int i = a; i < b; i++)
#define mm(a, n) memset(a, n, sizeof(a))
#define pb push_... | #pragma GCC optimize(3, "Ofast", "inline")
#include <bits/stdc++.h>
#define ios std::ios::sync_with_stdio(false)
#define rep(i, a, n) for (int i = a; i <= n; i++)
#define per(i, n, a) for (int i = n; i >= a; i--)
#define repp(i, a, b) for (int i = a; i < b; i++)
#define mm(a, n) memset(a, n, sizeof(a))
#define pb push_... | replace | 278 | 280 | 278 | 279 | TLE | |
p02574 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <stdio.h>
using namespace std;
#include <vector>
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define INF 1e9
#define llINF 1e18
#define base10_4 10000 // 1e4
#define base10_5 100000 // 1e5
#define base10_6 1000000 // 1e6
... | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <stdio.h>
using namespace std;
#include <vector>
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define INF 1e9
#define llINF 1e18
#define base10_4 10000 // 1e4
#define base10_5 100000 // 1e5
#define base10_6 1000000 // 1e6
... | replace | 111 | 113 | 111 | 115 | TLE | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define mem(a, b) memset(a, b, sizeof(a))
typedef long long LL;
typedef pair<int, int> PII;
#define X first
#define Y second
inline int read() {
int x = 0, f = 1;
char c = getchar();
while (!isdigit(c)) {
if (c == '-')
f = -1;
c = getchar();
}
while ... | #include <bits/stdc++.h>
using namespace std;
#define mem(a, b) memset(a, b, sizeof(a))
typedef long long LL;
typedef pair<int, int> PII;
#define X first
#define Y second
inline int read() {
int x = 0, f = 1;
char c = getchar();
while (!isdigit(c)) {
if (c == '-')
f = -1;
c = getchar();
}
while ... | replace | 21 | 22 | 21 | 22 | 0 | |
p02574 | C++ | Runtime Error | // K-OS WITH THE OCDE
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("unroll-loops")
#include <algorithm>
#include <cassert>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#incl... | // K-OS WITH THE OCDE
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("unroll-loops")
#include <algorithm>
#include <cassert>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#incl... | replace | 57 | 58 | 57 | 58 | -11 | |
p02574 | C++ | Runtime Error | #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 mp std::make_pair
#define rep(i, n) for (int i = 0; i < n; i++)
#define lrep(i, n) for (long long i = 0; i < n; ... | #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 mp std::make_pair
#define rep(i, n) for (int i = 0; i < n; i++)
#define lrep(i, n) for (long long i = 0; i < n; ... | replace | 67 | 68 | 67 | 68 | 0 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define pb push_back
#define f(i, n) for (int i = 0; i < n; ++i)
#define fi(i, st, n) for (int i = st; i <= n; ++i)
#define veci vector<int>
#define vecp vector<pair<int, int>>
#define vecl vector<ll>
int prime[1000000 +... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define pb push_back
#define f(i, n) for (int i = 0; i < n; ++i)
#define fi(i, st, n) for (int i = st; i <= n; ++i)
#define veci vector<int>
#define vecp vector<pair<int, int>>
#define vecl vector<ll>
int prime[1000000 +... | replace | 69 | 70 | 69 | 70 | 0 | |
p02574 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
// #define int long long
#define rep(i, a) for (int i = 0; i < (a); i++)
#define repd(i, a) for (int i = (a)-1; i >= 0; i--)
#define reps(i, a, j) for (int i = (j); i < (a); i++)
#define deb(x) cout << #x << " " << x << endl;
#define debs(x) cout << #x << " " << x << " ";
... | #include <bits/stdc++.h>
using namespace std;
// #define int long long
#define rep(i, a) for (int i = 0; i < (a); i++)
#define repd(i, a) for (int i = (a)-1; i >= 0; i--)
#define reps(i, a, j) for (int i = (j); i < (a); i++)
#define deb(x) cout << #x << " " << x << endl;
#define debs(x) cout << #x << " " << x << " ";
... | insert | 52 | 52 | 52 | 61 | TLE | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define BIT(n) (1LL << (n))
#define BITF(n, i) (((n) >> (i)) & 1)
#define REP(i, n) for (int i = 0; i < n; i++)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define REPI(i, x) for (int i = 1; i <= x; i++)
#define FORI(i, m, n) for (int i = m; i <= n; i++)
#define REPR(i... | #include <bits/stdc++.h>
using namespace std;
#define BIT(n) (1LL << (n))
#define BITF(n, i) (((n) >> (i)) & 1)
#define REP(i, n) for (int i = 0; i < n; i++)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define REPI(i, x) for (int i = 1; i <= x; i++)
#define FORI(i, m, n) for (int i = m; i <= n; i++)
#define REPR(i... | replace | 128 | 129 | 128 | 129 | 0 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define INIT \
ios_base ::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL); ... | #include <bits/stdc++.h>
using namespace std;
#define INIT \
ios_base ::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL); ... | replace | 16 | 17 | 16 | 17 | 0 | |
p02574 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
bool br[2000000];
void siv() {
memset(br, true, 2000000);
int i, j;
br[0] = false;
br[1] = false;
for (i = 2; i * i <= 2000000; i++) {
if (br[i] == true) {
for (j = i * i; j <= 2000000; j += i) {
br[j] = false;
}
}
}
}
int prime(int ... | #include <bits/stdc++.h>
using namespace std;
bool br[2000000];
void siv() {
memset(br, true, 2000000);
int i, j;
br[0] = false;
br[1] = false;
for (i = 2; i * i <= 2000000; i++) {
if (br[i] == true) {
for (j = i * i; j <= 2000000; j += i) {
br[j] = false;
}
}
}
}
int prime(int ... | replace | 49 | 58 | 49 | 65 | TLE | |
p02574 | C++ | Runtime Error | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
typedef long long ll;
using namespace std;
int gcd(int a, int b) {
if (b == 0)
return a;
el... | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
typedef long long ll;
using namespace std;
int gcd(int a, int b) {
if (b == 0)
return a;
el... | replace | 63 | 64 | 63 | 64 | 0 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define ld long double
#define pb push_back
#define mp make_pair
#define ff first
#define se second
#define endl '\n'
#define fd(n) fixed << setprecision(n)
#define MAX 100000000000000000
#define MAXN 100050
#define mod 1000000007
#define pi 3.1415... | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define ld long double
#define pb push_back
#define mp make_pair
#define ff first
#define se second
#define endl '\n'
#define fd(n) fixed << setprecision(n)
#define MAX 100000000000000000
#define MAXN 1000050
#define mod 1000000007
#define pi 3.141... | replace | 12 | 13 | 12 | 13 | 0 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
/* #define int long long */
/* #define double long double */
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define repa(i, s, n) for (int i = s; i < (int)n; i++)
#define MOD 1000000007
using namespace std;
using ll = long long;
typedef vector<int> vi;
typedef pair<int, int> P;
#define rrep... | #include <bits/stdc++.h>
/* #define int long long */
/* #define double long double */
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define repa(i, s, n) for (int i = s; i < (int)n; i++)
#define MOD 1000000007
using namespace std;
using ll = long long;
typedef vector<int> vi;
typedef pair<int, int> P;
#define rrep... | replace | 26 | 27 | 26 | 27 | 0 | |
p02574 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define ll long long
const int mod = 1000000007;
const int MOD = 998244353;
const ll INF = 10000000000... | #include <algorithm>
#include <cmath>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define ll long long
const int mod = 1000000007;
const int MOD = 998244353;
const ll INF = 10000000000... | replace | 62 | 63 | 62 | 63 | 0 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define AC 0
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
int n, gcd = 0;
cin >> n;
vector<int> a(n), prime(n);
bool p = 1;
for (int i = 0; i < n; i++) {
cin >> a[i];
int tmp = a[i];
for (int j = 2; 1ll * j * j <= tmp; j++)
if (... | #include <bits/stdc++.h>
using namespace std;
#define AC 0
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
int n, gcd = 0;
cin >> n;
vector<int> a(n), prime(1e6 + 1);
bool p = 1;
for (int i = 0; i < n; i++) {
cin >> a[i];
int tmp = a[i];
for (int j = 2; 1ll * j * j <= tmp; j++)
... | replace | 8 | 9 | 8 | 9 | 0 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
typedef long long ll;
#define endl "\n"
#define all(s) s.begin(), s.end()
#define pb push_back
#define uno unordered_map
#define pi 3.1415926536
#define dig(a) fixed << setprecision(a)
#define test(zz) \
int zz; ... | #include <bits/stdc++.h>
typedef long long ll;
#define endl "\n"
#define all(s) s.begin(), s.end()
#define pb push_back
#define uno unordered_map
#define pi 3.1415926536
#define dig(a) fixed << setprecision(a)
#define test(zz) \
int zz; ... | replace | 44 | 45 | 44 | 45 | 0 | |
p02574 | C++ | Runtime Error | #include <cstdio>
#include <iostream>
using namespace std;
int sieve[1000002], cnt[1000002], a[1000002], n, m, i, j, g, t;
int gcd(int x, int y) { return y ? gcd(y, x % y) : x; }
int main() {
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%d", a + i);
if (a[i] > m)
m = a[i];
if (g)
g ... | #include <cstdio>
#include <iostream>
using namespace std;
int sieve[1000002], cnt[1000002], a[1000002], n, m, i, j, g, t;
int gcd(int x, int y) { return y ? gcd(y, x % y) : x; }
int main() {
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%d", a + i);
if (a[i] > m)
m = a[i];
if (g)
g ... | replace | 27 | 31 | 27 | 32 | 0 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int INF = 1e9 + 100;
const int S = 1e3 + 5;
vector<int> pr;
vector<int> isp(S, 1);
void sieve() {
for (int p = 2; p < S; p++) {
if (isp[p]) {
pr.push_back(p);
for (int j = p * 2; j < S; j += p) {
isp[j] = 0;
}
... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int INF = 1e9 + 100;
const int S = 1e3 + 5;
vector<int> pr;
vector<int> isp(S, 1);
void sieve() {
for (int p = 2; p < S; p++) {
if (isp[p]) {
pr.push_back(p);
for (int j = p * 2; j < S; j += p) {
isp[j] = 0;
}
... | replace | 23 | 24 | 23 | 24 | 0 | |
p02574 | C++ | Time Limit Exceeded | /// BISMILLAHIR RAHMANIR RAHEEM
/// ALLAH IS WATCHING ME
/// ALLAH save us from COVID-19.Amin.
/// Every soul shall taste death.
/// Tag ::
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/pb_ds/tree_policy.hpp>
/// order_of... | /// BISMILLAHIR RAHMANIR RAHEEM
/// ALLAH IS WATCHING ME
/// ALLAH save us from COVID-19.Amin.
/// Every soul shall taste death.
/// Tag ::
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/pb_ds/tree_policy.hpp>
/// order_of... | replace | 142 | 143 | 142 | 143 | TLE | |
p02574 | C++ | Time Limit Exceeded | // 😄😄😄😄😄😄😄😄😄😄😄😄😄
// Apno Swagat che//
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define vll vector<ll>
#define vi vector<int>
#define pi pair<int, int>
#define vp vector<pi>
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define For(i, a, b) for (ll i = ... | // 😄😄😄😄😄😄😄😄😄😄😄😄😄
// Apno Swagat che//
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define vll vector<ll>
#define vi vector<int>
#define pi pair<int, int>
#define vp vector<pi>
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define For(i, a, b) for (ll i = ... | replace | 61 | 74 | 61 | 82 | TLE | |
p02574 | C++ | Runtime Error | #pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("Ofast")
#pragma GCC optimization("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<pii> vii;
typedef vector<pll> vll;
#define mod 1000000007
#define rep(i... | #pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("Ofast")
#pragma GCC optimization("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<pii> vii;
typedef vector<pll> vll;
#define mod 1000000007
#define rep(i... | replace | 94 | 97 | 94 | 96 | 0 | |
p02574 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int INF = 1e9;
const ll LINF = 1e18;
inline ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
inline ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
template <class S, class T>
ostream &op... | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int INF = 1e9;
const ll LINF = 1e18;
inline ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
inline ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
template <class S, class T>
ostream &op... | insert | 90 | 90 | 90 | 91 | -11 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define F first
#define S second
#define pb push_back
#define mp make_pair
ll gcd(ll a, ll b) {
if (a == 0)
return b;
return gcd(b % a, a);
}
ll lcm(ll a, ll b) { return (a / gcd(a, b)) * b; }
int main() {
ios_base::sync_with_stdio(fa... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define F first
#define S second
#define pb push_back
#define mp make_pair
ll gcd(ll a, ll b) {
if (a == 0)
return b;
return gcd(b % a, a);
}
ll lcm(ll a, ll b) { return (a / gcd(a, b)) * b; }
int main() {
ios_base::sync_with_stdio(fa... | replace | 25 | 26 | 25 | 26 | -11 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long lint;
#define rep(i, n) for (lint(i) = 0; (i) < (n); (i)++)
#define repp(i, m, n) for (lint(i) = (m); (i) < (n); (i)++)
#define repm(i, n) for (lint(i) = (n - 1); (i) >= 0; (i)--)
#define INF (1ll << 60)
#define all(x) (x).begin(), (x).end()
const lint MOD... | #include <bits/stdc++.h>
using namespace std;
typedef long long lint;
#define rep(i, n) for (lint(i) = 0; (i) < (n); (i)++)
#define repp(i, m, n) for (lint(i) = (m); (i) < (n); (i)++)
#define repm(i, n) for (lint(i) = (n - 1); (i) >= 0; (i)--)
#define INF (1ll << 60)
#define all(x) (x).begin(), (x).end()
const lint MOD... | insert | 102 | 102 | 102 | 104 | 0 | |
p02574 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define ALL(A) (A).begin(), (A).end()
#define ll long long
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a ... | #include <bits/stdc++.h>
#define ALL(A) (A).begin(), (A).end()
#define ll long long
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a ... | replace | 46 | 47 | 46 | 47 | TLE | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
using namespace std;
#define fast ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
int arr[100001];
int main() {
fast int n, z;
cin >> n;
int g;
bool b = 1;
for (int i = 0; i < n; i++) {
cin >> z;
if (i == 0)
g = z;
else
g = __gcd(z,... | #include <bits/stdc++.h>
#define ll long long
using namespace std;
#define fast ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
int arr[1000001];
int main() {
fast int n, z;
cin >> n;
int g;
bool b = 1;
for (int i = 0; i < n; i++) {
cin >> z;
if (i == 0)
g = z;
else
g = __gcd(z... | replace | 5 | 6 | 5 | 6 | 0 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
#define _overload3(_1, _2, _3, name, ...) name
#define _rep(i, n) repi(i, 0, n)
#define repi(i, a, b) \
for (ll i = static_cast<int>(a); i < static_cast<int>(b); ++i)
#define rep(...) _overload3(__VA_ARGS__, repi, _rep, )(__VA_ARGS__) /... | #include <bits/stdc++.h>
#define _overload3(_1, _2, _3, name, ...) name
#define _rep(i, n) repi(i, 0, n)
#define repi(i, a, b) \
for (ll i = static_cast<int>(a); i < static_cast<int>(b); ++i)
#define rep(...) _overload3(__VA_ARGS__, repi, _rep, )(__VA_ARGS__) /... | replace | 51 | 52 | 51 | 52 | 0 | |
p02574 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define debug(n) cerr << #n << ':' << n << endl;
#define dline cerr << __LINE__ << endl;
using ll = long long;
using ull = unsigned long long;
template <class T, class U> using P = pair<T, U>;
template <class T> using Heap = priority_queue<T>;
template <class T> using he... | #include <bits/stdc++.h>
using namespace std;
#define debug(n) cerr << #n << ':' << n << endl;
#define dline cerr << __LINE__ << endl;
using ll = long long;
using ull = unsigned long long;
template <class T, class U> using P = pair<T, U>;
template <class T> using Heap = priority_queue<T>;
template <class T> using he... | insert | 70 | 70 | 70 | 72 | TLE | |
p02574 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <chrono>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#inclu... | #include <algorithm>
#include <bitset>
#include <chrono>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#inclu... | replace | 54 | 55 | 54 | 55 | 0 | |
p02574 | C++ | Runtime Error | #include <cmath>
#include <iostream>
#include <string>
using namespace std;
int is_prime(int n) {
int i;
i = 2;
if (n == 1) {
return 0;
} else if (n == 2) {
return 1;
} else {
while (1) {
if (n % i == 0) {
return 0;
} else if (n < i * i) {
return 1;
} else ... | #include <cmath>
#include <iostream>
#include <string>
using namespace std;
int is_prime(int n) {
int i;
i = 2;
if (n == 1) {
return 0;
} else if (n == 2) {
return 1;
} else {
while (1) {
if (n % i == 0) {
return 0;
} else if (n < i * i) {
return 1;
} else ... | replace | 85 | 86 | 85 | 86 | 0 | |
p02574 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define pb push_back
#define fo(i, n) for (int i = 0; i < n; i++)
#define ll long long
#define int long long
#define Mod 1000000007
#define MAX 4294967296 // 2^32
const int M = 1e9 + 7;
#define ip pair<int, int>
#define test(t) \
... | #include <bits/stdc++.h>
#define pb push_back
#define fo(i, n) for (int i = 0; i < n; i++)
#define ll long long
#define int long long
#define Mod 1000000007
#define MAX 4294967296 // 2^32
const int M = 1e9 + 7;
#define ip pair<int, int>
#define test(t) \
... | replace | 56 | 57 | 56 | 57 | TLE | |
p02574 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define all(x) (x).begin(), (x).end()
int main() {
ll i, j, n, m;
cin >> n;
vector<ll> a(n);
for (i = 0; i < n; i++)
cin >> a[i];
map<ll, bool> mp;
for (i = 0; i < n; i++) {
ll cur = a[i];
ll pr = 0;
whi... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define all(x) (x).begin(), (x).end()
int main() {
ll i, j, n, m;
cin >> n;
vector<ll> a(n);
for (i = 0; i < n; i++)
cin >> a[i];
map<ll, bool> mp;
for (i = 0; i < n; i++) {
ll cur = a[i];
ll pr = 0;
whi... | replace | 34 | 35 | 34 | 35 | TLE | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define pii pair<int, int>
#define pll pair<long long, long long>
#define fastio() \
ios_base::sync_with_stdio(false); ... | #include <bits/stdc++.h>
#define ll long long
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define pii pair<int, int>
#define pll pair<long long, long long>
#define fastio() \
ios_base::sync_with_stdio(false); ... | replace | 62 | 63 | 62 | 63 | -11 | |
p02574 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#include <fstream>
#define ll long long
#define ld long double
// #define int long long
#define MOD 1000000007
#define mod 1000000007
#define ff first
#define ss second
#define pb push_back
#define vi vector<int>
#define pii pair<int, int>
#define vii vector<pii>
#define vvi vector<vi>
#define ... | #include <bits/stdc++.h>
#include <fstream>
#define ll long long
#define ld long double
// #define int long long
#define MOD 1000000007
#define mod 1000000007
#define ff first
#define ss second
#define pb push_back
#define vi vector<int>
#define pii pair<int, int>
#define vii vector<pii>
#define vvi vector<vi>
#define ... | replace | 79 | 80 | 79 | 80 | TLE | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define ld long double
#define ull unsigned long long
#define pii pair<int, int>
#define pll pair<ll, ll>
#define _h cout << "here" << endl;
#define fill(a, v) memset(a, v, sizeof(a));
#define all(v) v.begin(), v.end()
#define rep(i, n) for (int i =... | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define ld long double
#define ull unsigned long long
#define pii pair<int, int>
#define pll pair<ll, ll>
#define _h cout << "here" << endl;
#define fill(a, v) memset(a, v, sizeof(a));
#define all(v) v.begin(), v.end()
#define rep(i, n) for (int i =... | insert | 42 | 42 | 42 | 46 | 0 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define rep(i, n, m) for (int i = (n); i < (m); i++)
#define rep_d(i, n, m) for (int i = (n)-1; i >= (m); i--)
#define sort_asc(X) sort((X).begin(), (X).end())
#define sort_desc(X) sort((X).begin(), (X).end(), greater<>())
#define endl "\n"
templ... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define rep(i, n, m) for (int i = (n); i < (m); i++)
#define rep_d(i, n, m) for (int i = (n)-1; i >= (m); i--)
#define sort_asc(X) sort((X).begin(), (X).end())
#define sort_desc(X) sort((X).begin(), (X).end(), greater<>())
#define endl "\n"
templ... | replace | 59 | 60 | 59 | 60 | 0 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vl = vector<ll>;
using pll = pair<ll, ll>;
#define rep(i, n) for (ll i = 0, xxx_rep_end = (n); i < xxx_rep_end; ++i)
#define all(x) (x).begin(), (x).end()
template <class T1, class T2> inline void chmax(T1 &a, const T2 &b) {
if (a < b)
a... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vl = vector<ll>;
using pll = pair<ll, ll>;
#define rep(i, n) for (ll i = 0, xxx_rep_end = (n); i < xxx_rep_end; ++i)
#define all(x) (x).begin(), (x).end()
template <class T1, class T2> inline void chmax(T1 &a, const T2 &b) {
if (a < b)
a... | replace | 46 | 47 | 46 | 47 | 0 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
const int MX = 100003;
int main() {
ll n;
cin >> n;
vector<ll> a(n), c(MX, 0);
rep(i, n) cin >> a[i], c[a[i]]++;
ll g = 0;
rep(i, n) g = __gcd(g, a[i]);
if (g != 1) {
cout << "not co... | #include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
const int MX = 1000003;
int main() {
ll n;
cin >> n;
vector<ll> a(n), c(MX, 0);
rep(i, n) cin >> a[i], c[a[i]]++;
ll g = 0;
rep(i, n) g = __gcd(g, a[i]);
if (g != 1) {
cout << "not c... | replace | 6 | 7 | 6 | 7 | 0 | |
p02574 | C++ | Runtime Error | // abc177_e
#include <bits/stdc++.h>
#ifdef LOCAL
#include "../cxx-prettyprint/prettyprint.hpp"
#endif
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> P;
#define REP(i, n) for (int(i) = 0; (i) < (int)(n); ++(i))
#define REPN(i, m, n) for (int(i) = m; (i) < (int)(n); +... | // abc177_e
#include <bits/stdc++.h>
#ifdef LOCAL
#include "../cxx-prettyprint/prettyprint.hpp"
#endif
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> P;
#define REP(i, n) for (int(i) = 0; (i) < (int)(n); ++(i))
#define REPN(i, m, n) for (int(i) = m; (i) < (int)(n); +... | replace | 60 | 61 | 60 | 61 | 0 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define ld long double
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define fo(i, n) for (i = 0; i < n; i++)
#define fo1(i, n) for (i = 1; i <= n; i++)
#define foab(i, a, b) for (i = a; i <= b; i++)
#define of(i, n) for... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define ld long double
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define fo(i, n) for (i = 0; i < n; i++)
#define fo1(i, n) for (i = 1; i <= n; i++)
#define foab(i, a, b) for (i = a; i <= b; i++)
#define of(i, n) for... | replace | 108 | 109 | 108 | 109 | 0 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define F first
#define S second
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pb push_back
#define ppb pop_back
#define vll vector<ll>
#define vi vector<int>
#define endl "\n"
const ll INF = 1000000007;
/*
const ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define F first
#define S second
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pb push_back
#define ppb pop_back
#define vll vector<ll>
#define vi vector<int>
#define endl "\n"
const ll INF = 1000000007;
/*
const ... | replace | 72 | 73 | 72 | 73 | 0 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
#define all(X) (X).begin(), (X).end()
#define ll long long
#define linf (1ll << 60)
using namespace std;
// -------- FUNCS -------- //
vector<string> SPLIT(string str, char ch) {
vector<string> res;
stringstream ss(str);
string s;
while (getline(ss, s, ch))
res.push_back(s);
re... | #include <bits/stdc++.h>
#define all(X) (X).begin(), (X).end()
#define ll long long
#define linf (1ll << 60)
using namespace std;
// -------- FUNCS -------- //
vector<string> SPLIT(string str, char ch) {
vector<string> res;
stringstream ss(str);
string s;
while (getline(ss, s, ch))
res.push_back(s);
re... | replace | 105 | 106 | 105 | 106 | 0 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
/* typedef */
typedef long long ll;
typedef pair<int, int> pii;
/* constant */
const int INF = 1 << 30;
const int MAX = 1000005;
const int mod = 1000000007;
/* global variables */
// vector<int> cnt(MAX, 0);
vector<int> cnt(20, 0);
vector<int> p(MAX);
vector<int> a;
int N;
... | #include <bits/stdc++.h>
using namespace std;
/* typedef */
typedef long long ll;
typedef pair<int, int> pii;
/* constant */
const int INF = 1 << 30;
const int MAX = 1000005;
const int mod = 1000000007;
/* global variables */
// vector<int> cnt(MAX, 0);
vector<int> cnt(MAX, 0);
vector<int> p(MAX);
vector<int> a;
int N;... | replace | 11 | 12 | 11 | 12 | 0 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
/* typedef */
typedef long long ll;
typedef pair<int, int> pii;
/* constant */
const int INF = 1 << 30;
// const int MAX = 1000005;
const int MAX = 60;
const int mod = 1000000007;
/* global variables */
vector<int> cnt(MAX, 0);
vector<int> a;
int N;
/* function */
int gcd(i... | #include <bits/stdc++.h>
using namespace std;
/* typedef */
typedef long long ll;
typedef pair<int, int> pii;
/* constant */
const int INF = 1 << 30;
const int MAX = 1000005;
const int mod = 1000000007;
/* global variables */
vector<int> cnt(MAX, 0);
vector<int> a;
int N;
/* function */
int gcd(int a, int b) { return (... | replace | 7 | 9 | 7 | 8 | 0 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep_lr(i, l, r) for (int i = (l); i < (r); i++)
#define all(x) (x).begin(), (x).end()
#define V vector
typedef V<int> vi;
typedef V<vi> vvi;
typedef long long ll;
typedef pair<ll, ll> P;
typedef tuple<int, int, int> T;... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep_lr(i, l, r) for (int i = (l); i < (r); i++)
#define all(x) (x).begin(), (x).end()
#define V vector
typedef V<int> vi;
typedef V<vi> vvi;
typedef long long ll;
typedef pair<ll, ll> P;
typedef tuple<int, int, int> T;... | replace | 53 | 54 | 53 | 54 | 0 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rp(i, k, n) for (int i = k; i < n; i++)
typedef long long ll;
typedef double ld;
template <class T> inline bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, const T &b) {
if (b < a... | #include <bits/stdc++.h>
using namespace std;
#define rp(i, k, n) for (int i = k; i < n; i++)
typedef long long ll;
typedef double ld;
template <class T> inline bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, const T &b) {
if (b < a... | replace | 39 | 40 | 39 | 40 | -11 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int nax = 2e5 + 7;
int lpf[nax], mobius[nax];
void least_prime_factor() {
for (int i = 2; i < nax; i++) {
if (!lpf[i]) {
for (int j = i; j < nax; j += i) {
if (!lpf[j]) {
lpf[j] = i;
}
}
}
}
... | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int nax = 1e6 + 7;
int lpf[nax], mobius[nax];
void least_prime_factor() {
for (int i = 2; i < nax; i++) {
if (!lpf[i]) {
for (int j = i; j < nax; j += i) {
if (!lpf[j]) {
lpf[j] = i;
}
}
}
}
... | replace | 4 | 5 | 4 | 5 | 0 | |
p02574 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bits/stdc++.h>
using namespace std;
#define fio \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie... | #include <algorithm>
#include <bits/stdc++.h>
using namespace std;
#define fio \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie... | replace | 23 | 24 | 23 | 24 | TLE | |
p02574 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#include <cmath>
#include <string>
using namespace std;
#define ll long long int
#define ld long double
#define loop(i, n) for (int i = 0; i < n; i++)
#define loops(i, s, n) for (int i = s; i < n; i++)
#define pb push_back
#define mp make_pair
#define all(v) v.begin(), v.end()
#define sz(x) (... | #include <bits/stdc++.h>
#include <cmath>
#include <string>
using namespace std;
#define ll long long int
#define ld long double
#define loop(i, n) for (int i = 0; i < n; i++)
#define loops(i, s, n) for (int i = s; i < n; i++)
#define pb push_back
#define mp make_pair
#define all(v) v.begin(), v.end()
#define sz(x) (... | replace | 47 | 48 | 47 | 48 | TLE | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pld pair<long double, int>
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pb push_back
#define ff first
#define ss second
#define SZ(x) ((int)(x).size())
#define ld long double
mt19937 rng(chrono::steady_clock::now().time_since_epoc... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pld pair<long double, int>
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pb push_back
#define ff first
#define ss second
#define SZ(x) ((int)(x).size())
#define ld long double
mt19937 rng(chrono::steady_clock::now().time_since_epoc... | replace | 29 | 30 | 29 | 30 | 0 | |
p02574 | C++ | Runtime Error | #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 | 33 | 34 | 33 | 34 | 0 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vll;
typedef vector<vll> vvll;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef pair<int, int> P;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).be... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vll;
typedef vector<vll> vvll;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef pair<int, int> P;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).be... | replace | 16 | 19 | 16 | 19 | 0 | |
p02574 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define INF 1e9 + 7
typedef long long int ll;
const int maxn = 1000000;
ll mod = INF;
int d[maxn + 1];
int n;
int a[maxn];
int cnt[maxn + 1];
int used[maxn + 1];
int ans = 0;
int main() {
cin >> n;
for (int i = 0; i < n; i++)
cin >> a[i];
for (int i = 0; i <= ma... | #include <bits/stdc++.h>
using namespace std;
#define INF 1e9 + 7
typedef long long int ll;
const int maxn = 1000000;
ll mod = INF;
int d[maxn + 1];
int n;
int a[maxn];
int cnt[maxn + 1];
int used[maxn + 1];
int ans = 0;
int main() {
cin >> n;
for (int i = 0; i < n; i++)
cin >> a[i];
for (int i = 0; i <= ma... | replace | 23 | 29 | 23 | 27 | TLE | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
template <class T> T gcd(T a, T b) { return (b ? gcd(b, a % b) : a); }
const int MAX = 1e6;
vector<int> prime(MAX + 1, -1);
void settable() {
for (int i = 2; i <= MAX; i++) {
if (prime[i] == -1) {
prime[i] = i;
for (int j = i + i; j <= MAX; j += i) {
... | #include <bits/stdc++.h>
using namespace std;
template <class T> T gcd(T a, T b) { return (b ? gcd(b, a % b) : a); }
const int MAX = 1e6;
vector<int> prime(MAX + 1, -1);
void settable() {
for (int i = 2; i <= MAX; i++) {
if (prime[i] == -1) {
prime[i] = i;
for (int j = i + i; j <= MAX; j += i) {
... | insert | 31 | 31 | 31 | 33 | 0 | |
p02574 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
// conversion
//------------------------------------------
inline int toInt(string s) {
int v;
istringstream sin(s);
sin >> v;
return v;
}
template <class T> inline string toString(T x) {
ostringstream sout;
sout << x;
return sout.str();
}
// math
//--------... | #include <bits/stdc++.h>
using namespace std;
// conversion
//------------------------------------------
inline int toInt(string s) {
int v;
istringstream sin(s);
sin >> v;
return v;
}
template <class T> inline string toString(T x) {
ostringstream sout;
sout << x;
return sout.str();
}
// math
//--------... | replace | 200 | 201 | 200 | 201 | TLE | |
p02574 | C++ | Runtime Error | /**
* code generated by JHelper
* More info: https://github.com/AlexeyDmitriev/JHelper
* @author
*/
#include <fstream>
#include <iostream>
#include "bits/stdc++.h"
#include <iostream>
using namespace std;
typedef unsigned long long ll;
typedef int integer;
#define int long long
#define ii pair<int, int>
#define... | /**
* code generated by JHelper
* More info: https://github.com/AlexeyDmitriev/JHelper
* @author
*/
#include <fstream>
#include <iostream>
#include "bits/stdc++.h"
#include <iostream>
using namespace std;
typedef unsigned long long ll;
typedef int integer;
#define int long long
#define ii pair<int, int>
#define... | replace | 44 | 45 | 44 | 45 | 0 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
#define rep(A, B, C) for (A = B; A < C; ++A)
#define pii pair<int, int>
#define pll pair<ll, ll>
#define fi first
#define se second
#define all(A) A.begin(), A.end()
using namespace std;
/////////////////////////////////////////////////////
#define MOD (ll)(1e9 + 7)
#de... | #include <bits/stdc++.h>
#define ll long long
#define rep(A, B, C) for (A = B; A < C; ++A)
#define pii pair<int, int>
#define pll pair<ll, ll>
#define fi first
#define se second
#define all(A) A.begin(), A.end()
using namespace std;
/////////////////////////////////////////////////////
#define MOD (ll)(1e9 + 7)
#de... | replace | 24 | 25 | 24 | 25 | 0 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define INF 1000000007
#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 (... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define INF 1000000007
#define MAXN 1000001
// 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 ... | replace | 4 | 5 | 4 | 5 | 0 | |
p02574 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define INF 1LL << 62
#define inf 1000000007
ll dep(ll a, ll b) {
if (b == 0) {
return a;
}
return dep(b, a % b);
}
int main() {
ll n;
cin >> n;
ll ch[1000010];
for (ll i = 0; i < n; i++) {
cin >> ch[i];
}
ll ch2[1000010] = {}... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define INF 1LL << 62
#define inf 1000000007
ll dep(ll a, ll b) {
if (b == 0) {
return a;
}
return dep(b, a % b);
}
int main() {
ll n;
cin >> n;
ll ch[1000010];
for (ll i = 0; i < n; i++) {
cin >> ch[i];
}
ll ch2[1000010] = {}... | replace | 23 | 24 | 23 | 24 | -11 | |
p02574 | C++ | Time Limit Exceeded | /******************************************************************************
Online C++ Compiler.
Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.
******************************************... | /******************************************************************************
Online C++ Compiler.
Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.
******************************************... | insert | 21 | 21 | 21 | 23 | TLE |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.