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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p02964 | C++ | Runtime Error | // #include "pch.h"
#include <algorithm>
#include <bitset>
#include <cmath>
#include <deque>
#include <iostream>
#include <limits.h>
#include <map>
#include <queue>
#include <set>
#include <stdio.h>
#include <string>
#include <time.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define rip(i,... | // #include "pch.h"
#include <algorithm>
#include <bitset>
#include <cmath>
#include <deque>
#include <iostream>
#include <limits.h>
#include <map>
#include <queue>
#include <set>
#include <stdio.h>
#include <string>
#include <time.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define rip(i,... | replace | 57 | 58 | 57 | 58 | 0 | |
p02964 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <tuple>
#include ... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <tuple>
#include ... | replace | 80 | 81 | 80 | 83 | 127 | /tmp/cd53750b-a4aa-4349-aae6-b682e12ee07b.out: error while loading shared libraries: libc.so.6: failed to map segment from shared object
|
p02964 | C++ | Runtime Error | #include <bits/stdc++.h>
int N;
int64_t K;
std::vector<int> A;
void calcAns(int, int64_t);
int main() {
scanf("%d%lld", &N, &K);
K *= N;
A.resize(N);
for (int &e : A) {
scanf("%d", &e);
e--;
}
std::vector<int> to(N), dp_table(200'000);
for (int i{N - 1}; i >= 0; i--)
dp_table[A[i]] = N + i;... | #include <bits/stdc++.h>
int N;
int64_t K;
std::vector<int> A;
void calcAns(int, int64_t);
int main() {
scanf("%d%lld", &N, &K);
K *= N;
A.resize(N);
for (int &e : A) {
scanf("%d", &e);
e--;
}
std::vector<int> to(N), dp_table(200'000);
for (int i{N - 1}; i >= 0; i--)
dp_table[A[i]] = N + i;... | replace | 82 | 84 | 82 | 83 | 0 | |
p02964 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int N = (int)2 * 1e5 + 5;
int n;
long long len;
int a[N];
long long jump[N][70], gap[N][70];
int rem[N];
int main() {
freopen("input.txt", "r", stdin);
iostream::sync_with_stdio(0);
cin >> n >> len;
for (int i = 1; i <= n; i++)
cin >> a[i];
for (int ... | #include <bits/stdc++.h>
using namespace std;
const int N = (int)2 * 1e5 + 5;
int n;
long long len;
int a[N];
long long jump[N][70], gap[N][70];
int rem[N];
int main() {
iostream::sync_with_stdio(0);
cin >> n >> len;
for (int i = 1; i <= n; i++)
cin >> a[i];
for (int i = n; i >= 1; i--)
jump[i][0] =... | delete | 11 | 12 | 11 | 11 | -11 | |
p02964 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using lint = long long;
const lint mod = 1e9 + 7;
#define all(x) (x).begin(), (x).end()
#define bitcount(n) __builtin_popcountl((lint)(n))
#define fcout cout << fixed << setprecision(15)
#define highest(x) (63 - __builtin_clzl(x))
template <class T> inline void YES(T condit... | #include <bits/stdc++.h>
using namespace std;
using lint = long long;
const lint mod = 1e9 + 7;
#define all(x) (x).begin(), (x).end()
#define bitcount(n) __builtin_popcountl((lint)(n))
#define fcout cout << fixed << setprecision(15)
#define highest(x) (63 - __builtin_clzl(x))
template <class T> inline void YES(T condit... | insert | 146 | 146 | 146 | 147 | 0 | |
p02964 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
// #include <atcoder/all>
using namespace std;
// using namespace atcoder;
template <class T, class U>
ostream &operator<<(ostream &os, const pair<T, U> &p) {
os << "(" << p.first << "," << p.second << ")";
return os;
}
#ifdef __LOCAL
#define debug(x) cerr << __LINE__ << ": " << #x << " = "... | #include <bits/stdc++.h>
// #include <atcoder/all>
using namespace std;
// using namespace atcoder;
template <class T, class U>
ostream &operator<<(ostream &os, const pair<T, U> &p) {
os << "(" << p.first << "," << p.second << ")";
return os;
}
#ifdef __LOCAL
#define debug(x) cerr << __LINE__ << ": " << #x << " = "... | insert | 75 | 75 | 75 | 93 | TLE | |
p02964 | C++ | Runtime Error | #include <bits/stdc++.h>
#define MIN_INT -2147483648
#define MAX_INT 2147483647
#define MIN_LONG -9223372036854775808L
#define MAX_LONG 9223372036854775807L
#define long long long int
using namespace std;
// @author: pashka
int main() {
ios::sync_with_stdio(false);
int n;
long k;
cin >> n >> k;
vector<i... | #include <bits/stdc++.h>
#define MIN_INT -2147483648
#define MAX_INT 2147483647
#define MIN_LONG -9223372036854775808L
#define MAX_LONG 9223372036854775807L
#define long long long int
using namespace std;
// @author: pashka
int main() {
ios::sync_with_stdio(false);
int n;
long k;
cin >> n >> k;
vector<i... | replace | 24 | 25 | 24 | 25 | 0 | |
p02964 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define FOR(i, a, b) for (ll i = (a); i < (b); ++i)
#define FORR(i, a, b) for (ll i = (a); i > (b); --i)
#define REP(i, n) for (ll i = 0; i < (n); ++i)
#define REPR(i, n) for (ll i = n; i >= 0; i--)
#define FOREACH(x, a) for (auto &(x) : (a))
#define... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define FOR(i, a, b) for (ll i = (a); i < (b); ++i)
#define FORR(i, a, b) for (ll i = (a); i > (b); --i)
#define REP(i, n) for (ll i = 0; i < (n); ++i)
#define REPR(i, n) for (ll i = n; i >= 0; i--)
#define FOREACH(x, a) for (auto &(x) : (a))
#define... | replace | 112 | 113 | 112 | 113 | 0 | |
p02964 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int N, A[200009], nx[200009], c[200009], P[200009];
long long K, L, fi[200009], a, b;
void putans(int x) {
vector<int> S;
vector<bool> chk(200009, 0);
for (int i = x; i < N; i++) {
if (chk[A[i]]) {
while (chk[A[i]]) {
chk[S.back()] = 0;
S.p... | #include <bits/stdc++.h>
using namespace std;
int N, A[400009], nx[200009], c[200009], P[200009];
long long K, L, fi[200009], a, b;
void putans(int x) {
vector<int> S;
vector<bool> chk(200009, 0);
for (int i = x; i < N; i++) {
if (chk[A[i]]) {
while (chk[A[i]]) {
chk[S.back()] = 0;
S.p... | replace | 3 | 4 | 3 | 4 | 0 | |
p02964 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
vector<int> pos[200005];
int A[200005];
int prev1[400005];
int next1[400005];
bool present[200005];
vector<int> stack1;
int main() {
int N;
long long K;
scanf("%lld%lld", &N, &K);
for (int i = 0; i < N; i++) {
scanf("%d", &A[i]);
A[N + i] = A[i];
}
... | #include <bits/stdc++.h>
using namespace std;
int A[400005];
int prev1[400005];
int next1[400005];
bool present[200005];
vector<int> stack1;
int main() {
int N;
long long K;
scanf("%lld%lld", &N, &K);
for (int i = 0; i < N; i++) {
scanf("%d", &A[i]);
A[N + i] = A[i];
}
A[2 * N] = A[0];
mems... | replace | 3 | 6 | 3 | 4 | 0 | |
p02964 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define pb push_back
#define pll pair<ll, ll>
#define mp make_pair
#define pyshnapyshnakaa \
ios_base ::sync_with_stdio(0); \
cin.tie(0); ... | #include <bits/stdc++.h>
#define pb push_back
#define pll pair<ll, ll>
#define mp make_pair
#define pyshnapyshnakaa \
ios_base ::sync_with_stdio(0); \
cin.tie(0); ... | replace | 66 | 71 | 66 | 71 | TLE | |
p02964 | C++ | Runtime Error | // #pragma GCC optimize ("-O3","unroll-loops")
#include <algorithm>
#include <bitset>
#include <cassert>
#include <complex>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits.h>
#include <map>
#include <math.h>
#include <numeric>
#inclu... | // #pragma GCC optimize ("-O3","unroll-loops")
#include <algorithm>
#include <bitset>
#include <cassert>
#include <complex>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits.h>
#include <map>
#include <math.h>
#include <numeric>
#inclu... | replace | 61 | 62 | 61 | 62 | 127 | /tmp/fe040f05-f383-4917-9610-eb37a4a5c9b0.out: error while loading shared libraries: libstdc++.so.6: failed to map segment from shared object
|
p02964 | C++ | Runtime Error | #include <bits/stdc++.h>
#if MYDEBUG
#include "lib/cp_debug.hpp"
#else
#define DBG(...) ;
#endif
#if __cplusplus <= 201402L
template <typename T> T gcd(T a, T b) {
return ((a % b == 0) ? b : gcd(b, a % b));
}
template <typename T> T lcm(T a, T b) { return a / gcd(a, b) * b; }
#endif
using LL = long long;
constexpr L... | #include <bits/stdc++.h>
#if MYDEBUG
#include "lib/cp_debug.hpp"
#else
#define DBG(...) ;
#endif
#if __cplusplus <= 201402L
template <typename T> T gcd(T a, T b) {
return ((a % b == 0) ? b : gcd(b, a % b));
}
template <typename T> T lcm(T a, T b) { return a / gcd(a, b) * b; }
#endif
using LL = long long;
constexpr L... | replace | 28 | 29 | 28 | 29 | 0 | |
p02964 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define INF 2000000000000000000
#define ll long long
using namespace std;
ll MAX = pow(10, 5) * 2 + 1;
ll N, K;
vector<ll> calc(vector<ll> &ans) {
vector<vector<ll>> place(MAX);
for (ll i = 0; i < ans.size(); ++i) {
place.at(ans.at(i)).push_back(i);
}
vector<ll> res;
ll index = ... | #include <bits/stdc++.h>
#define INF 2000000000000000000
#define ll long long
using namespace std;
ll MAX = pow(10, 5) * 2 + 1;
ll N, K;
vector<ll> calc(vector<ll> &ans) {
vector<vector<ll>> place(MAX);
for (ll i = 0; i < ans.size(); ++i) {
place.at(ans.at(i)).push_back(i);
}
vector<ll> res;
ll index = ... | replace | 44 | 45 | 44 | 45 | TLE | |
p02964 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define repr(i, n) for (int i = (n)-1; i >= 0; i--)
using namespace std;
using ll = long long;
void naive() {
int n, k;
cin >> n >> k;
vector<int> a(n);
rep(i, n) cin >> a[i];
vector<int> v;
rep(i, k) {
rep(j, n) {
if (fin... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define repr(i, n) for (int i = (n)-1; i >= 0; i--)
using namespace std;
using ll = long long;
void naive() {
int n, k;
cin >> n >> k;
vector<int> a(n);
rep(i, n) cin >> a[i];
vector<int> v;
rep(i, k) {
rep(j, n) {
if (fin... | insert | 64 | 64 | 64 | 65 | 0 | |
p02964 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#define _USE_MATH_DEFINES
#include <complex>
#include <functional>
#include <math.h>
using namespace std;
#define rep(i, x) for (ll i = 0; i < x; i++)
#define r... | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#define _USE_MATH_DEFINES
#include <complex>
#include <functional>
#include <math.h>
using namespace std;
#define rep(i, x) for (ll i = 0; i < x; i++)
#define r... | replace | 168 | 169 | 168 | 169 | 0 | sh: 1: PAUSE: not found
|
p02964 | C++ | Runtime Error | #include <bits/stdc++.h>
template <size_t N, typename T, typename U = T,
std::enable_if_t<N == 1, std::nullptr_t> = nullptr>
auto make_vector(size_t sz, T t) {
return std::vector<U>(sz, t);
}
template <size_t N, typename T,
std::enable_if_t<N == 1, std::nullptr_t> = nullptr>
auto make_vector(size... | #include <bits/stdc++.h>
template <size_t N, typename T, typename U = T,
std::enable_if_t<N == 1, std::nullptr_t> = nullptr>
auto make_vector(size_t sz, T t) {
return std::vector<U>(sz, t);
}
template <size_t N, typename T,
std::enable_if_t<N == 1, std::nullptr_t> = nullptr>
auto make_vector(size... | replace | 55 | 56 | 55 | 56 | 0 | |
p02964 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define FOR(i, a, b) for (ll i = (a); i < (b); ++i)
#define FORR(i, a, b) for (ll i = (a); i > (b); --i)
#define REP(i, n) for (ll i = 0; i < (n); ++i)
#define REPR(i, n) for (ll i = n; i >= 0; i--)
#define FOREACH(x, a) for (auto &(x) : (a))
#define... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define FOR(i, a, b) for (ll i = (a); i < (b); ++i)
#define FORR(i, a, b) for (ll i = (a); i > (b); --i)
#define REP(i, n) for (ll i = 0; i < (n); ++i)
#define REPR(i, n) for (ll i = n; i >= 0; i--)
#define FOREACH(x, a) for (auto &(x) : (a))
#define... | replace | 89 | 90 | 89 | 90 | -11 | |
p02964 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define TRACE
#ifdef TRACE
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1> void __f(const char *name, Arg1 &&arg1) {
cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char *names, Arg1 &&ar... | #include <bits/stdc++.h>
using namespace std;
#define TRACE
#ifdef TRACE
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1> void __f(const char *name, Arg1 &&arg1) {
cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char *names, Arg1 &&ar... | insert | 51 | 51 | 51 | 52 | TLE | |
p02964 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 2e5 + 10;
int a[maxn * 2];
int pre[maxn];
int net[maxn];
vector<int> s;
int vis[maxn];
ll stute[maxn];
int main() {
int n;
ll k;
cin >> n >> k;
for (int i = 1; i <= n; i++)
cin >> a[i], a[i + n] = a[i];
for (int i = 2 * n... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 4e5 + 10;
int a[maxn];
int pre[maxn];
int net[maxn];
vector<int> s;
int vis[maxn];
ll stute[maxn];
int main() {
int n;
ll k;
cin >> n >> k;
for (int i = 1; i <= n; i++)
cin >> a[i], a[i + n] = a[i];
for (int i = 2 * n; i ... | replace | 3 | 5 | 3 | 5 | 0 | |
p02964 | C++ | Runtime Error | #include <bits/stdc++.h>
#define int long long
#define x first
#define y second
#define pb push_back
#define speed \
ios_base::sync_with_stdio(0); \
cin.tie(0);
using namespace std;
signed main() {
#ifnd... | #include <bits/stdc++.h>
#define int long long
#define x first
#define y second
#define pb push_back
#define speed \
ios_base::sync_with_stdio(0); \
cin.tie(0);
using namespace std;
signed main() {
spe... | delete | 11 | 15 | 11 | 11 | -6 | terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
|
p02964 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
#define ll long long int
#define rep(i, n) for (int i = 0; i < n; i++)
#define rrep(i, n) for (int i = n; i >= 0; i--)
#define REP(i, s, t) for (int i = s; i <= t; i++)
#define RREP(i, s, t) for (int i = s; i >= t; i--)
#define dump(x) cerr << #x << " = " << (x) << endl;
#d... | #include "bits/stdc++.h"
using namespace std;
#define ll long long int
#define rep(i, n) for (int i = 0; i < n; i++)
#define rrep(i, n) for (int i = n; i >= 0; i--)
#define REP(i, s, t) for (int i = s; i <= t; i++)
#define RREP(i, s, t) for (int i = s; i >= t; i--)
#define dump(x) cerr << #x << " = " << (x) << endl;
#d... | replace | 69 | 70 | 69 | 70 | -11 | |
p02964 | C++ | Runtime Error | #include <cstdio>
#include <fstream>
#include <iostream>
using namespace std;
int a[500005], g[200005], ans[200005];
long long f[200005][70];
int main() {
int n = 0;
long long k = 0;
scanf("%d%lld", &n, &k);
for (int i = 1; i <= n; i++)
scanf("%d", &a[i]), a[n + i] = a[i];
for (int i = 1; i <= n + n; i++)... | #include <cstdio>
#include <fstream>
#include <iostream>
using namespace std;
int a[500005], g[200005], ans[200005];
long long f[200005][70];
int main() {
int n = 0;
long long k = 0;
scanf("%d%lld", &n, &k);
for (int i = 1; i <= n; i++)
scanf("%d", &a[i]), a[n + i] = a[i];
for (int i = 1; i <= n + n; i++)... | replace | 41 | 42 | 41 | 42 | -11 | |
p02964 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> l_l;
typedef pair<int, int> i_i;
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;
re... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> l_l;
typedef pair<int, int> i_i;
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;
re... | replace | 70 | 71 | 70 | 71 | -11 | |
p02964 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
#define fast_io ... | #include <algorithm>
#include <bitset>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
#define fast_io ... | replace | 124 | 125 | 124 | 125 | 0 | |
p02964 | C++ | Runtime Error | #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++)
const ll mod = 1e9 + 7;
const ll INF = -1 * ((1LL << 63) + 1);
const int inf = -1 * ((1 << 31) + 1);
using namespace std;
int main(void) {
cin.tie(0);
ios::sync_with_stdio(false);
... | #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++)
const ll mod = 1e9 + 7;
const ll INF = -1 * ((1LL << 63) + 1);
const int inf = -1 * ((1 << 31) + 1);
using namespace std;
int main(void) {
cin.tie(0);
ios::sync_with_stdio(false);
... | replace | 79 | 80 | 79 | 80 | 0 | |
p02964 | C++ | Runtime Error | #include <bits/stdc++.h>
#define last last2
using namespace std;
typedef long long ll;
int f[200005][60];
ll g[200005][60];
int num[400005], last[200005];
void pre(int n) {
for (int i = 0; i < n; i++)
num[n + i] = num[i];
for (int i = 2 * n - 1; i >= 0; i--) {
if (i < n) {
f[i][0] = (last[num[i]]... | #include <bits/stdc++.h>
#define last last2
using namespace std;
typedef long long ll;
int f[200005][60];
ll g[200005][60];
int num[400005], last[200005];
void pre(int n) {
for (int i = 0; i < n; i++)
num[n + i] = num[i];
for (int i = 2 * n - 1; i >= 0; i--) {
if (i < n) {
f[i][0] = (last[num[i]]... | replace | 25 | 26 | 25 | 26 | -11 | |
p02964 | C++ | Runtime Error | /* cerberus97 - Hanit Banga */
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
#define pb push_back
#define fa... | /* cerberus97 - Hanit Banga */
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
#define pb push_back
#define fa... | replace | 28 | 29 | 28 | 29 | 0 | |
p02964 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
#define fi first
#define se second
typedef pair<ll, ll> P;
#define Mod 1000000007
using VP = vector<P>;
using VVP = vector<VP>;
using VI = vector<ll>;
using VVI = vector<VI>;
using VVVI = vector<VVI>;
#define INF 1ll << 59
#pragma... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
#define fi first
#define se second
typedef pair<ll, ll> P;
#define Mod 1000000007
using VP = vector<P>;
using VVP = vector<VP>;
using VI = vector<ll>;
using VVI = vector<VI>;
using VVVI = vector<VVI>;
#define INF 1ll << 59
#pragma... | insert | 21 | 21 | 21 | 31 | TLE | |
p02964 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define mod 1000000007
using ll = long long;
// 1ブロックごとに必ず1回は全部消すことになる→全部消した後の始点の推移を書く?
vector<int> v[20001]; // v[n]には A_k = n となるkが入ってる,
// ソート済みなので二分探索で値がlog n
// v[i] の k = j の index を二分探索で取得
int biSearch(int i, int j) {
int lb = 0, ub = v[i].... | #include <bits/stdc++.h>
using namespace std;
#define mod 1000000007
using ll = long long;
// 1ブロックごとに必ず1回は全部消すことになる→全部消した後の始点の推移を書く?
vector<int> v[200001]; // v[n]には A_k = n となるkが入ってる,
// ソート済みなので二分探索で値がlog n
// v[i] の k = j の index を二分探索で取得
int biSearch(int i, int j) {
int lb = 0, ub = v[i... | replace | 7 | 9 | 7 | 9 | 0 | |
p02964 | C++ | Runtime Error | #ifdef LOCAL
// #define _GLIBCXX_DEBUG
#endif
// #pragma GCC target("avx512f,avx512dq,avx512cd,avx512bw,avx512vl")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<int, int> Pi;
typedef vector<ll> V... | #ifdef LOCAL
// #define _GLIBCXX_DEBUG
#endif
// #pragma GCC target("avx512f,avx512dq,avx512cd,avx512bw,avx512vl")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<int, int> Pi;
typedef vector<ll> V... | replace | 189 | 190 | 189 | 190 | 0 | |
p02964 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ff(i, x, y) for (int i = x; i <= y; i++)
#define fs(i, x, y) for (int i = x; i >= y; i--)
using namespace std;
typedef long long ll;
int n, vis[300010], a[200010], ans[400010];
ll dp[400010][60], sum, d;
int main() {
scanf("%d%lld", &n, &sum);
d = n * sum;
memset(vis, -1, sizeof(v... | #include <bits/stdc++.h>
#define ff(i, x, y) for (int i = x; i <= y; i++)
#define fs(i, x, y) for (int i = x; i >= y; i--)
using namespace std;
typedef long long ll;
int n, vis[300010], a[400010], ans[200010];
ll dp[400010][60], sum, d;
int main() {
scanf("%d%lld", &n, &sum);
d = n * sum;
memset(vis, -1, sizeof(v... | replace | 5 | 6 | 5 | 6 | -11 | |
p02964 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); i++)
using... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); i++)
using... | insert | 81 | 81 | 81 | 82 | 0 | |
p02964 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MAXN = 200005;
int A[MAXN];
ll nxt[MAXN][64];
vector<int> p[MAXN];
bitset<MAXN> inv;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
ll N, K;
cin >> N >> K;
for (int i = 0; i < N; ++i)
cin >> A[i];
for (int i... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MAXN = 200005;
int A[MAXN];
ll nxt[MAXN][64];
vector<int> p[MAXN];
bitset<MAXN> inv;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
ll N, K;
cin >> N >> K;
for (int i = 0; i < N; ++i)
cin >> A[i];
for (int i... | replace | 29 | 31 | 29 | 31 | TLE | |
p02964 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 2e5 + 5;
int tot, n, a[N << 1], b[N], nex[N], bk[N], pre[N];
ll k, A, B;
bool vis[N];
ll getdis(int s, int t) {
if (s == 0)
s = n;
ll ans = 0;
while (s != t) {
ans += nex[s];
s = (s + nex[s]) % n;
if (s == 0)
s... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 2e5 + 5;
int tot, n, a[N << 1], b[N], nex[N], bk[N], pre[N];
ll k, A, B;
bool vis[N];
ll getdis(int s, int t) {
if (s == 0)
s = n;
ll ans = 0;
while (s != t) {
ans += nex[s];
s = (s + nex[s]) % n;
if (s == 0)
s... | replace | 53 | 55 | 53 | 59 | TLE | |
p02964 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
inline int read() {
int ret = 0;
char c = getchar();
while (c < 48 || c > 57)
c = getchar();
while (c >= 48 && c <= 57)
ret = ret * 10 + c - 48, c = getchar();
return ret;
}
#define N 200093
long long k;
int T, f[N], g[N], u, v, st[N], t, n, a[N], h[N], t... | #include <bits/stdc++.h>
using namespace std;
inline int read() {
int ret = 0;
char c = getchar();
while (c < 48 || c > 57)
c = getchar();
while (c >= 48 && c <= 57)
ret = ret * 10 + c - 48, c = getchar();
return ret;
}
#define N 200093
long long k;
int T, f[N], g[N], u, v, st[N], t, n, a[N], h[N], t... | insert | 45 | 45 | 45 | 46 | 0 | |
p02964 | C++ | Runtime Error | #include <bits/stdc++.h>
#define For(i, j, k) for (int i = (int)(j); i <= (int)(k); i++)
#define Rep(i, j, k) for (int i = (int)(j); i >= (int)(k); i--)
#define pii pair<int, int>
#define fi first
#define se second
#define PB push_back
#define ll long long
using namespace std;
const int N = 200005;
int a[N], las[N], q[... | #include <bits/stdc++.h>
#define For(i, j, k) for (int i = (int)(j); i <= (int)(k); i++)
#define Rep(i, j, k) for (int i = (int)(j); i >= (int)(k); i--)
#define pii pair<int, int>
#define fi first
#define se second
#define PB push_back
#define ll long long
using namespace std;
const int N = 400005;
int a[N], las[N], q[... | replace | 9 | 10 | 9 | 10 | 0 | |
p02964 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define debug(n) cerr << #n << ':' << n << endl;
#define dline cerr << __LINE__ << endl;
#define rep(i, s, e) for (int i = (int)(s); i < (int)(e); ++i)
#define per(i, s, e) for (int i = (int)(s)-1; i >= (int)(e); --i)
using ll = long long;
template <class T, class U> usi... | #include <bits/stdc++.h>
using namespace std;
#define debug(n) cerr << #n << ':' << n << endl;
#define dline cerr << __LINE__ << endl;
#define rep(i, s, e) for (int i = (int)(s); i < (int)(e); ++i)
#define per(i, s, e) for (int i = (int)(s)-1; i >= (int)(e); --i)
using ll = long long;
template <class T, class U> usi... | replace | 45 | 46 | 45 | 46 | 0 | |
p02964 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define fi first
#define se second
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define rep1(i, n) for (int i = 1; i <= (int)(n); ++i)
#define rep11(i, n) for (int i = 1; i < (int)(n); ++i)
#define repo(i, o, n) for (int i = o; i < (int)(n); +... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define fi first
#define se second
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define rep1(i, n) for (int i = 1; i <= (int)(n); ++i)
#define rep11(i, n) for (int i = 1; i < (int)(n); ++i)
#define repo(i, o, n) for (int i = o; i < (int)(n); +... | replace | 34 | 35 | 34 | 35 | TLE | |
p02964 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int maxn = 2001000;
int n, a[maxn], nxt[maxn], flag[maxn];
long long k, f[maxn][100];
vector<int> pos[maxn];
vector<int> ans;
int main() {
scanf("%d%lld", &n, &k);
for (int i = 1; i <= n; i++)
scanf("%d", a + i), pos[a[i]].push_back(i);
for (int i = 1; i <= ... | #include <bits/stdc++.h>
using namespace std;
const int maxn = 2001000;
int n, a[maxn], nxt[maxn], flag[maxn];
long long k, f[maxn][100];
vector<int> pos[maxn];
vector<int> ans;
int main() {
scanf("%d%lld", &n, &k);
for (int i = 1; i <= n; i++)
scanf("%d", a + i), pos[a[i]].push_back(i);
for (int i = 1; i <= ... | replace | 32 | 33 | 32 | 33 | -11 | |
p02964 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vi = vector<int>;
using vl = vector<ll>;
using vvi = vector<vi>;
using vvl = vector<vl>;
const ll INF = 1LL << 60;
const ll MOD = 1000000007;
template <class T> bool chmax(T &a, const T &b) {
... | #include "bits/stdc++.h"
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vi = vector<int>;
using vl = vector<ll>;
using vvi = vector<vi>;
using vvl = vector<vl>;
const ll INF = 1LL << 60;
const ll MOD = 1000000007;
template <class T> bool chmax(T &a, const T &b) {
... | replace | 27 | 28 | 27 | 28 | 0 | |
p02964 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
#define mod 1000000007ll
#define INF 1000000000000000000ll
#define MAX_N 200010
int tab[MAX_N];
vector<int> v[MAX_N];
int skok[MAX_N][50];
int dist[MAX_N][50];
bool jest[MAX_N];
int32_t main() {
ios_base::sync_with_s... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
#define mod 1000000007ll
#define INF 1000000000000000000ll
#define MAX_N 200010
int tab[MAX_N];
vector<int> v[MAX_N];
int skok[MAX_N][50];
int dist[MAX_N][50];
bool jest[MAX_N];
int32_t main() {
ios_base::sync_with_s... | replace | 45 | 46 | 45 | 50 | -11 | |
p02964 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < (n); ++i)
#define repr(i, n) for (ll i = (n); i >= 0; --i)
#define FOR(i, m, n) for (ll i = (m); i < (n); ++i)
#define FORR(i, m, n) for (ll i = (m); i >= (n); --i)
#define equals(a, b) (fabs((a) - (b)) < EPS)
using namespace std;
typedef long long ll;
typed... | #include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < (n); ++i)
#define repr(i, n) for (ll i = (n); i >= 0; --i)
#define FOR(i, m, n) for (ll i = (m); i < (n); ++i)
#define FORR(i, m, n) for (ll i = (m); i >= (n); --i)
#define equals(a, b) (fabs((a) - (b)) < EPS)
using namespace std;
typedef long long ll;
typed... | insert | 42 | 42 | 42 | 52 | 0 | |
p02964 | C++ | Runtime Error | #pragma GCC optimize("Ofast")
#pragma GCC target( \
"sse,sse2,sse3,ssse3,sse4,popcnt,fma,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp>
#include <functional> //... | #pragma GCC optimize("Ofast")
#pragma GCC target( \
"sse,sse2,sse3,ssse3,sse4,popcnt,fma,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp>
#include <functional> //... | replace | 138 | 139 | 138 | 139 | 0 | |
p02964 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#includ... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#includ... | replace | 44 | 45 | 44 | 45 | -11 | |
p02964 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 10;
int n;
long long k;
int a[maxn << 1], nxt[maxn], b[maxn << 1];
bool inq[maxn];
long long vis[maxn];
vector<pair<long long, int>> v;
vector<int> u;
int main() {
cin >> n >> k;
k *= n;
for (int i = 0; i < n; ++i) {
scanf("%d", a + i);
... | #include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 10;
int n;
long long k;
int a[maxn << 1], nxt[maxn], b[maxn << 1];
bool inq[maxn];
long long vis[maxn];
vector<pair<long long, int>> v;
vector<int> u;
int main() {
cin >> n >> k;
k *= n;
for (int i = 0; i < n; ++i) {
scanf("%d", a + i);
... | replace | 49 | 50 | 49 | 50 | TLE | |
p02964 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ul;
typedef signed long long ll;
mt19937 mt(time(nullptr));
// uniform_int_distribution< int > rand_int(0, 10) // rand[0, 10] inclusive
int main(void) {
cin.tie(0);
ios::sync_with_stdio(false);
cout << fixed;
ll n, k;
cin >> n >> k;
... | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ul;
typedef signed long long ll;
mt19937 mt(time(nullptr));
// uniform_int_distribution< int > rand_int(0, 10) // rand[0, 10] inclusive
int main(void) {
cin.tie(0);
ios::sync_with_stdio(false);
cout << fixed;
ll n, k;
cin >> n >> k;
... | insert | 44 | 44 | 44 | 45 | TLE | |
p02964 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
const int maxn = 2e5 + 10;
int a[maxn], n, r[maxn], c[maxn], f[maxn], d[maxn];
ll k;
bool vis[maxn];
int ask() {
int l = 1, cost = 0;
while (1) {
cost += c[l];
l = r[l];
if (l == n)
return cost + 1;
l++;
if (l == n + 1)
... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
const int maxn = 2e5 + 10;
int a[maxn], n, r[maxn], c[maxn], f[maxn], d[maxn];
ll k;
bool vis[maxn];
int ask() {
int l = 1, cost = 0;
while (1) {
cost += c[l];
l = r[l];
if (l == n)
return cost + 1;
l++;
if (l == n + 1)
... | replace | 30 | 31 | 30 | 31 | 0 | |
p02964 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i, n) for (int i = 0, _n = (int)(n); i < _n; ++i)
#define ALL(v) (v).begin(), (v).end()
#define CLR(t, v) memset(t, (v), sizeof(t))
template <class T1, class T2>
ostream &operator<<(ostream &os, const pair<T1, T2> &a) {
return os << "(" ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i, n) for (int i = 0, _n = (int)(n); i < _n; ++i)
#define ALL(v) (v).begin(), (v).end()
#define CLR(t, v) memset(t, (v), sizeof(t))
template <class T1, class T2>
ostream &operator<<(ostream &os, const pair<T1, T2> &a) {
return os << "(" ... | replace | 44 | 45 | 44 | 45 | 0 | |
p02964 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <ciso646>
#include <cmath>
#include <complex>
#include <cstdio>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <utility>
#in... | #include <algorithm>
#include <bitset>
#include <ciso646>
#include <cmath>
#include <complex>
#include <cstdio>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <utility>
#in... | replace | 48 | 49 | 48 | 49 | 0 | |
p02964 | C++ | Runtime Error | #pragma GCC optimize("O3")
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <bits/stdc++.h>
#include <stdio.h>
#define _USE_MATH_DEFINES_
#define ll long long
#define ld long double
#define Accepted 0
#define pb push_back
#define mp make_pair
#define sz(x) (int)(x.size())
#defin... | #pragma GCC optimize("O3")
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <bits/stdc++.h>
#include <stdio.h>
#define _USE_MATH_DEFINES_
#define ll long long
#define ld long double
#define Accepted 0
#define pb push_back
#define mp make_pair
#define sz(x) (int)(x.size())
#defin... | replace | 80 | 81 | 80 | 82 | 0 | |
p02964 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <tuple>
#include <unordered_map>
#include <vector>
using namespace std;
#define int long long
#define lint long long
#define rep(i, n) for (int i = 0; i < n; ++i)
#de... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <tuple>
#include <unordered_map>
#include <vector>
using namespace std;
#define int long long
#define lint long long
#define rep(i, n) for (int i = 0; i < n; ++i)
#de... | replace | 91 | 92 | 91 | 92 | TLE | |
p02964 | C++ | Time Limit Exceeded | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
const ll MOD = 1e9 + 7;
const ll INF = 1LL << 60;
int A[400000];
ll d[61][200000];
int pos[200001];
int main() {
ll N, K;
cin >> N >> K;
for (int i = 0; i < N; i++) {
cin >> A[i];
A[i + N] = A[i];
}
for (int i = 2 * N - 1; i >= 0; i--... | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
const ll MOD = 1e9 + 7;
const ll INF = 1LL << 60;
int A[400000];
ll d[61][200000];
int pos[200001];
int main() {
ll N, K;
cin >> N >> K;
for (int i = 0; i < N; i++) {
cin >> A[i];
A[i + N] = A[i];
}
for (int i = 2 * N - 1; i >= 0; i--... | replace | 26 | 27 | 26 | 27 | TLE | |
p02964 | C++ | Time Limit Exceeded | #include "bits/stdc++.h"
#define REP(i, x, y) for (int i = (x); i < (y); i++)
#define RREP(i, x, y) for (int i = (y)-1; i >= (x); i--)
#define all(x) (x).begin(), (x).end()
#define int long long
using namespace std;
// conversion
inline int toInt(string s) {
int v;
istringstream sin(s);
sin >> v;
return v;
}... | #include "bits/stdc++.h"
#define REP(i, x, y) for (int i = (x); i < (y); i++)
#define RREP(i, x, y) for (int i = (y)-1; i >= (x); i--)
#define all(x) (x).begin(), (x).end()
#define int long long
using namespace std;
// conversion
inline int toInt(string s) {
int v;
istringstream sin(s);
sin >> v;
return v;
}... | insert | 122 | 122 | 122 | 127 | TLE | |
p02964 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
vector<int> v[200001];
long long int vis[200001];
int a[200001];
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
int n;
long long int k;
cin >> n >> k;
for (int i = 0, x; i < n; i++) {
cin >> x;
a[i] = x;
v[x].emplace_back(i);
}
memset(... | #include <bits/stdc++.h>
using namespace std;
vector<int> v[200001];
long long int vis[200001];
int a[200001];
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
int n;
long long int k;
cin >> n >> k;
for (int i = 0, x; i < n; i++) {
cin >> x;
a[i] = x;
v[x].emplace_back(i);
}
memset(... | replace | 65 | 66 | 65 | 66 | 0 | |
p02964 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
using namespace std;
const int N = 2e5 + 10;
int n;
long long k;
int a[N], las[N], pos[N], b[N], len[N];
bool c[N];
int main() {
scanf("%d%lld", &n, &k);
for (int i = 1; i <= n; i++)
scanf("%d", &a[i]);
for (int i = n; i >= 1; i--)
las[i] = pos[a[i]], pos[a[i]... | #include <bits/stdc++.h>
#define ll long long
using namespace std;
const int N = 2e5 + 10;
int n;
long long k;
int a[N], las[N], pos[N], b[N], len[N];
bool c[N];
int main() {
scanf("%d%lld", &n, &k);
for (int i = 1; i <= n; i++)
scanf("%d", &a[i]);
for (int i = n; i >= 1; i--)
las[i] = pos[a[i]], pos[a[i]... | replace | 39 | 40 | 39 | 40 | 0 | |
p02964 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <stack>
#include <vector>
#define maxn 200 // 100
using namespace std;
vector<long long> q[maxn];
int main() {
long long N, K;
long long a[maxn];
long long ma[maxn], L[maxn];
scanf("%lld%lld",... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <stack>
#include <vector>
#define maxn 200100
using namespace std;
vector<long long> q[maxn];
int main() {
long long N, K;
long long a[maxn];
long long ma[maxn], L[maxn];
scanf("%lld%lld", &N,... | replace | 8 | 9 | 8 | 9 | 0 | |
p02964 | C++ | Runtime Error |
#include <algorithm>
#include <array>
#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 {
pub... |
#include <algorithm>
#include <array>
#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 {
pub... | replace | 235 | 236 | 235 | 236 | 0 | |
p02964 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define ALL(v) (v).begin(), (v).end()
using ll = long long;
using P = pair<int, int>;
const int INF = 1e9;
const long long LINF = 1e18;
const long long MOD = 1e9 + 7;
#define MAX_A 200000
#define MAX 50
signed main() {
ll ... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define ALL(v) (v).begin(), (v).end()
using ll = long long;
using P = pair<int, int>;
const int INF = 1e9;
const long long LINF = 1e18;
const long long MOD = 1e9 + 7;
#define MAX_A 200000
#define MAX 40
signed main() {
ll ... | replace | 11 | 12 | 11 | 12 | 0 | |
p02964 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;
typedef pair<ll, P> P3;
typedef pair<P, P> PP;
constexpr ll MOD = ll(1e9) + 7;
constexpr int IINF = INT_MAX;
constexpr ll LLINF = LLONG_MAX;
constexpr int MAX_N = int(2e5) + 5;
constexpr double EP... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;
typedef pair<ll, P> P3;
typedef pair<P, P> PP;
constexpr ll MOD = ll(1e9) + 7;
constexpr int IINF = INT_MAX;
constexpr ll LLINF = LLONG_MAX;
constexpr int MAX_N = int(2e5) + 5;
constexpr double EP... | replace | 36 | 38 | 36 | 38 | TLE | |
p02964 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <tuple>
#include <vector>
using namespace std;
#define rep(i, n) for (int64_t i = 0; i < (n); i++)
#define irep(i, n) for (int64_t i = 0; i <= (n... | #include <algorithm>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <tuple>
#include <vector>
using namespace std;
#define rep(i, n) for (int64_t i = 0; i < (n); i++)
#define irep(i, n) for (int64_t i = 0; i <= (n... | insert | 90 | 90 | 90 | 99 | 0 | |
p02964 | C++ | Runtime Error | #include <iomanip>
#include <iostream>
// #include<cstdio>
#include <algorithm>
#include <cassert>
#include <cmath>
#include <map>
#include <queue>
#include <vector>
using namespace std;
typedef long long ll;
const int Nmax = 2e5;
int N, A[Nmax];
ll K;
int main() {
cin >> N >> K;
for (int i = 0; i < N; i++)
ci... | #include <iomanip>
#include <iostream>
// #include<cstdio>
#include <algorithm>
#include <cassert>
#include <cmath>
#include <map>
#include <queue>
#include <vector>
using namespace std;
typedef long long ll;
const int Nmax = 2e5;
int N, A[Nmax];
ll K;
int main() {
cin >> N >> K;
for (int i = 0; i < N; i++)
ci... | replace | 20 | 21 | 20 | 21 | 0 | |
p02964 | C++ | Runtime Error | #define DEBUG 0
/**
* File : B2.cpp
* Author : Kazune Takahashi
* Created : 7/22/2019, 3:04:34 AM
* Powered by Visual Studio Code
*/
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <chrono>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <f... | #define DEBUG 0
/**
* File : B2.cpp
* Author : Kazune Takahashi
* Created : 7/22/2019, 3:04:34 AM
* Powered by Visual Studio Code
*/
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <chrono>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <f... | delete | 123 | 126 | 123 | 123 | -11 | |
p02964 | C++ | Runtime Error | #define DEBUG 0
/**
* File : B.cpp
* Author : Kazune Takahashi
* Created : 7/21/2019, 9:18:18 PM
* Powered by Visual Studio Code
*/
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <chrono>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <fu... | #define DEBUG 0
/**
* File : B.cpp
* Author : Kazune Takahashi
* Created : 7/21/2019, 9:18:18 PM
* Powered by Visual Studio Code
*/
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <chrono>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <fu... | replace | 214 | 215 | 214 | 218 | 0 | |
p02964 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
inline void prep() {
cin.tie(0);
cin.sync_with_stdio(0);
};
const double pi = acos(-1.);
// printf(%.12lf\n,mid);
// __builtin_popcount(int) count 1's in binary
// get decimal part of number
/*
double intpart;
double thiss = modf((double)(n*m)/(double)k, &intpart);
*... | #include <bits/stdc++.h>
using namespace std;
inline void prep() {
cin.tie(0);
cin.sync_with_stdio(0);
};
const double pi = acos(-1.);
// printf(%.12lf\n,mid);
// __builtin_popcount(int) count 1's in binary
// get decimal part of number
/*
double intpart;
double thiss = modf((double)(n*m)/(double)k, &intpart);
*... | replace | 37 | 38 | 37 | 38 | 0 | |
p02964 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
long long N, K, A[1 << 18], P[1 << 18], nex[1 << 18];
long long par[1 << 18][66];
bool used[1 << 18];
int main() {
cin >> N >> K;
for (int i = 0; i < N; i++) {
cin >> A[i];
A[N + i] = A[i];
}
for (int i = N * 2 - 1; i >= 0... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
long long N, K, A[1 << 19], P[1 << 19], nex[1 << 19];
long long par[1 << 19][66];
bool used[1 << 19];
int main() {
cin >> N >> K;
for (int i = 0; i < N; i++) {
cin >> A[i];
A[N + i] = A[i];
}
for (int i = N * 2 - 1; i >= 0... | replace | 5 | 8 | 5 | 8 | -11 | |
p02964 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <iostream>
#include <iterator>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <str... | #include <algorithm>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <iostream>
#include <iterator>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <str... | replace | 241 | 242 | 241 | 242 | 0 | |
p02964 | C++ | Runtime Error | // #define DEB1 //input from input.txt
// #define NDEBUG
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <mutex>
#include <queue>
#include <set>
#include <stack>
#include <s... | // #define DEB1 //input from input.txt
// #define NDEBUG
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <mutex>
#include <queue>
#include <set>
#include <stack>
#include <s... | replace | 141 | 142 | 141 | 142 | -11 | error test
|
p02964 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll INF = 1e9 + 7;
int main() {
ll n, k;
cin >> n >> k;
vector<ll> a(n);
for (int i = 0; i < n; i++)
cin >> a[i];
vector<ll> ar = a;
reverse(ar.begin(), ar.end());
vector<set<ll>> pos(2 * 1e5);
for (int i = 0; i < n; i++) {
pos[a... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll INF = 1e9 + 7;
int main() {
ll n, k;
cin >> n >> k;
vector<ll> a(n);
for (int i = 0; i < n; i++)
cin >> a[i];
vector<ll> ar = a;
reverse(ar.begin(), ar.end());
vector<set<ll>> pos(2 * 1e5 + 10);
for (int i = 0; i < n; i++) {
... | replace | 12 | 13 | 12 | 13 | 0 | |
p02965 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define REP(i, n) for (int i = 0; i < n; i++)
/*
* Modint struct
* library author : @snuke
* */
const int mod = 998244353;
struct mint {
long long x; // typedef long long ll;
mint(long long x = 0) : x((x % mod + mod) % mod) {}
mint &operator... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define REP(i, n) for (int i = 0; i < n; i++)
/*
* Modint struct
* library author : @snuke
* */
const int mod = 998244353;
struct mint {
long long x; // typedef long long ll;
mint(long long x = 0) : x((x % mod + mod) % mod) {}
mint &operator... | replace | 56 | 57 | 56 | 57 | 0 | |
p02965 | C++ | Runtime Error | #include <algorithm>
#include <array>
#include <climits>
#include <cmath>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#includ... | #include <algorithm>
#include <array>
#include <climits>
#include <cmath>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#includ... | replace | 42 | 43 | 42 | 43 | 0 | |
p02965 | C++ | Runtime Error | /*Lucky_Glass*/
#include <algorithm>
#include <cstdio>
#include <cstring>
using namespace std;
typedef long long ll;
const int N = 2e6;
const ll MOD = 998244353;
ll Efac[N + 3], Einv[N + 3];
ll QPow(ll Va, ll Vb) {
ll Rr = 1;
while (Vb) {
if (Vb & 1)
Rr = Va * Rr % MOD;
Va = Va * Va % MOD;
Vb >... | /*Lucky_Glass*/
#include <algorithm>
#include <cstdio>
#include <cstring>
using namespace std;
typedef long long ll;
const int N = 3e6;
const ll MOD = 998244353;
ll Efac[N + 3], Einv[N + 3];
ll QPow(ll Va, ll Vb) {
ll Rr = 1;
while (Vb) {
if (Vb & 1)
Rr = Va * Rr % MOD;
Va = Va * Va % MOD;
Vb >... | replace | 7 | 8 | 7 | 8 | 0 | |
p02965 | C++ | Runtime Error | #include <iostream>
#define llint long long
#define mod 998244353
using namespace std;
llint n, m;
const int FACT_MAX = 4000005;
llint fact[FACT_MAX], fact_inv[FACT_MAX];
llint modpow(llint a, llint n) {
if (n == 0)
return 1;
if (n % 2) {
return ((a % mod) * (modpow(a, n - 1) % mod)) % mod;
} else {
... | #include <iostream>
#define llint long long
#define mod 998244353
using namespace std;
llint n, m;
const int FACT_MAX = 4000005;
llint fact[FACT_MAX], fact_inv[FACT_MAX];
llint modpow(llint a, llint n) {
if (n == 0)
return 1;
if (n % 2) {
return ((a % mod) * (modpow(a, n - 1) % mod)) % mod;
} else {
... | replace | 47 | 48 | 47 | 48 | 0 | |
p02965 | C++ | Runtime Error | #define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
#define fi first
#define se second
#define pb push_back
#define E "\n"
using namespace std;
const long long MOD = 998244353;
int N, M;
long long dat[2000009];
long long quickpow(long long b, long long e) {
return e ? ((e & 1 ? b : 1) * quickpow((b * b) % MOD... | #define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
#define fi first
#define se second
#define pb push_back
#define E "\n"
using namespace std;
const long long MOD = 998244353;
int N, M;
long long dat[2000009];
long long quickpow(long long b, long long e) {
return e ? ((e & 1 ? b : 1) * quickpow((b * b) % MOD... | replace | 32 | 33 | 32 | 33 | 0 | |
p02965 | C++ | Runtime Error | #define _CRT_SECURE_NO_WARNINGS
#pragma target("avx")
#pragma optimize("O3")
#pragma optimize("unroll-loops")
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#inc... | #define _CRT_SECURE_NO_WARNINGS
#pragma target("avx")
#pragma optimize("O3")
#pragma optimize("unroll-loops")
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#inc... | replace | 188 | 189 | 188 | 193 | 0 | |
p02965 | C++ | Runtime Error | #define DEBUG 0
#include <bits/stdc++.h>
using namespace std;
#if DEBUG
// basic debugging macros
int __i__, __j__;
#define printLine(l) \
for (__i__ = 0; __i__ < l; __i__++) { \
cout << "-"; ... | #define DEBUG 0
#include <bits/stdc++.h>
using namespace std;
#if DEBUG
// basic debugging macros
int __i__, __j__;
#define printLine(l) \
for (__i__ = 0; __i__ < l; __i__++) { \
cout << "-"; ... | replace | 114 | 115 | 114 | 115 | 0 | |
p02965 | C++ | Runtime Error | #include <bits/stdc++.h>
#define syosu(x) fixed << setprecision(x)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> P;
typedef pair<double, double> pdd;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<double> vd;
typedef vector<vd... | #include <bits/stdc++.h>
#define syosu(x) fixed << setprecision(x)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> P;
typedef pair<double, double> pdd;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<double> vd;
typedef vector<vd... | replace | 58 | 59 | 58 | 59 | 0 | |
p02965 | C++ | Runtime Error | // #pragma GCC optimize("O3")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/rope>
#define mem(a, v) memset((a), (v), sizeof(a))
#define enl printf("\n")
#define case(t) printf("Case #%d: ", (t))
#define ni(n) scanf("%d", &(n))
#define nl(n) scanf("%... | // #pragma GCC optimize("O3")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/rope>
#define mem(a, v) memset((a), (v), sizeof(a))
#define enl printf("\n")
#define case(t) printf("Case #%d: ", (t))
#define ni(n) scanf("%d", &(n))
#define nl(n) scanf("%... | replace | 40 | 41 | 40 | 41 | 0 | |
p02965 | C++ | Runtime Error | #include <bits/stdc++.h>
#define int long long
#define ll long long
using ull = unsigned long long;
using namespace std;
const int INF = 1ll << 50;
const int MOD = 998244353;
#define dump(x) \
if (dbg) { ... | #include <bits/stdc++.h>
#define int long long
#define ll long long
using ull = unsigned long long;
using namespace std;
const int INF = 1ll << 50;
const int MOD = 998244353;
#define dump(x) \
if (dbg) { ... | replace | 95 | 96 | 95 | 96 | 0 | |
p02965 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <time.h>
#include <tuple>
#include <utility>
#include <vector>
#define int long long
#define ... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <time.h>
#include <tuple>
#include <utility>
#include <vector>
#define int long long
#define ... | replace | 71 | 72 | 71 | 72 | -6 | terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
|
p02965 | C++ | Runtime Error | /*
ЗАПУСКАЕМ
░ГУСЯ░▄▀▀▀▄░РАБОТЯГУ░░
▄███▀░◐░░░▌░░░░░░░
░░░░▌░░░░░▐░░░░░░░
░░░░▐░░░░░▐░░░░░░░
░░░░▌░░░░░▐▄▄░░░░░
░░░░▌░░░░▄▀▒▒▀▀▀▀▄
░░░▐░░░░▐▒▒▒▒▒▒▒▒▀▀▄
░░░▐░░░░▐▄▒▒▒▒▒▒▒▒▒▒▀▄
░░░░▀▄░░░░▀▄▒▒▒▒▒▒▒▒▒▒▀▄
░░░░░░▀▄▄▄▄▄█▄▄▄▄▄▄▄▄▄▄▄▀▄
░░░░░░░░░░░▌▌░▌▌░░░░░
░░░░░░░░░░░▌▌░▌▌░░░░░
░░░░░░░░░▄▄▌▌▄▌▌░░░░░
*/
#include <algorithm>
#i... | /*
ЗАПУСКАЕМ
░ГУСЯ░▄▀▀▀▄░РАБОТЯГУ░░
▄███▀░◐░░░▌░░░░░░░
░░░░▌░░░░░▐░░░░░░░
░░░░▐░░░░░▐░░░░░░░
░░░░▌░░░░░▐▄▄░░░░░
░░░░▌░░░░▄▀▒▒▀▀▀▀▄
░░░▐░░░░▐▒▒▒▒▒▒▒▒▀▀▄
░░░▐░░░░▐▄▒▒▒▒▒▒▒▒▒▒▀▄
░░░░▀▄░░░░▀▄▒▒▒▒▒▒▒▒▒▒▀▄
░░░░░░▀▄▄▄▄▄█▄▄▄▄▄▄▄▄▄▄▄▀▄
░░░░░░░░░░░▌▌░▌▌░░░░░
░░░░░░░░░░░▌▌░▌▌░░░░░
░░░░░░░░░▄▄▌▌▄▌▌░░░░░
*/
#include <algorithm>
#i... | insert | 116 | 116 | 116 | 119 | 0 | |
p02965 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
// #define double long double
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define FORR(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; i >= 0; i--)
#define FOREACH(x... | #include <bits/stdc++.h>
using namespace std;
#define int long long
// #define double long double
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define FORR(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; i >= 0; i--)
#define FOREACH(x... | replace | 192 | 193 | 192 | 193 | 0 | |
p02965 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define modulo 998244353
#define mod(mod_x) ((((long long)mod_x) + modulo) % modulo)
#define Inf 1000000000000
// aのb乗
int beki(int a, int b, int M = modulo) {
int x = 1;
while (b != 0) {
if (b & 1) {
x = ((long long)x * a) % M;
}
a = ((long long)a * ... | #include <bits/stdc++.h>
using namespace std;
#define modulo 998244353
#define mod(mod_x) ((((long long)mod_x) + modulo) % modulo)
#define Inf 1000000000000
// aのb乗
int beki(int a, int b, int M = modulo) {
int x = 1;
while (b != 0) {
if (b & 1) {
x = ((long long)x * a) % M;
}
a = ((long long)a * ... | replace | 81 | 82 | 81 | 82 | 0 | |
p02965 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <climits>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#i... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <climits>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#i... | replace | 60 | 61 | 60 | 61 | 0 | |
p02965 | C++ | Runtime Error | #define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef unsigned long long ULL;
#define SZ(x) ((int)((x).size()))
template <typename T1, typename T2>
string print_iterable(T1 begin_iter, T2 end_iter, int counter) {
bool done_something = false;
stringstream res;
res <... | #define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef unsigned long long ULL;
#define SZ(x) ((int)((x).size()))
template <typename T1, typename T2>
string print_iterable(T1 begin_iter, T2 end_iter, int counter) {
bool done_something = false;
stringstream res;
res <... | replace | 124 | 125 | 124 | 125 | 0 | |
p02965 | C++ | Runtime Error | // ios::sync_with_stdio(false);
#include <bits/stdc++.h>
#define LL long long
#define F(x, y, z) for (int x = y; x <= z; ++x)
#define D(x, y, z) for (int x = y; x >= z; --x)
using namespace std;
const int Mod = 998244353;
const int N = 3000010;
const int maxn = 3000001;
LL Min(LL x, LL y) { return x < y ? x : y; }
LL M... | // ios::sync_with_stdio(false);
#include <bits/stdc++.h>
#define LL long long
#define F(x, y, z) for (int x = y; x <= z; ++x)
#define D(x, y, z) for (int x = y; x >= z; --x)
using namespace std;
const int Mod = 998244353;
const int N = 3000010;
const int maxn = 3000001;
LL Min(LL x, LL y) { return x < y ? x : y; }
LL M... | replace | 25 | 26 | 25 | 27 | 0 | |
p02965 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
using namespace std;
ll p = 998244353, jc[4000010], ny[4000010];
ll ksm(ll x, ll y) {
ll xlh = 1;
while (y) {
if (y & 1)
xlh = xlh * x % p;
x = x * x % p;
y /= 2;
}
return xlh;
}
ll C(ll x, ll y) { return jc[x] * ny[y] % p * ny[x - y] % p; }
ll sol... | #include <bits/stdc++.h>
#define ll long long
using namespace std;
ll p = 998244353, jc[4000010], ny[4000010];
ll ksm(ll x, ll y) {
ll xlh = 1;
while (y) {
if (y & 1)
xlh = xlh * x % p;
x = x * x % p;
y /= 2;
}
return xlh;
}
ll C(ll x, ll y) {
if (x < 0 || y < 0 || x < y)
return 0;
ret... | replace | 14 | 15 | 14 | 19 | 0 | |
p02965 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int MX = 3000000, md = 998244353;
long long inv[MX], f[MX], inv_f[MX];
long long c(int n, int k) {
if (k == -1)
return n == -1 ? 1 : 0;
return f[n] * inv_f[n - k] % md * inv_f[k] % md;
}
int main() {
inv[1] = f[0] = f[1] = inv_f[0] = inv_f[1] = 1;
fo... | #include <bits/stdc++.h>
using namespace std;
const int MX = 3000000, md = 998244353;
long long inv[MX], f[MX], inv_f[MX];
long long c(int n, int k) {
if (k == -1)
return n == -1 ? 1 : 0;
return f[n] * inv_f[n - k] % md * inv_f[k] % md;
}
int main() {
inv[1] = f[0] = f[1] = inv_f[0] = inv_f[1] = 1;
fo... | replace | 27 | 28 | 27 | 28 | 0 | |
p02965 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int p = 998244353;
#define int long long
#define vel vector<long long>
#define vvel vector<vel>
#define rep(i, n) for ... | #include <algorithm>
#include <bitset>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int p = 998244353;
#define int long long
#define vel vector<long long>
#define vvel vector<vel>
#define rep(i, n) for ... | replace | 147 | 152 | 147 | 154 | 0 | |
p02965 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <ciso646>
#include <cmath>
#include <complex>
#include <cstdio>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#incl... | #include <algorithm>
#include <bitset>
#include <ciso646>
#include <cmath>
#include <complex>
#include <cstdio>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#incl... | replace | 164 | 165 | 164 | 165 | 0 | |
p02965 | C++ | Runtime Error | #include <bits/stdc++.h>
typedef long long int ll;
typedef long double ld;
#define pb push_back
#define pii pair<int, int>
#define F first
#define S second
#define endl '\n'
#define int long long
#define sync \
ios_base::sync_with_stdio(false); ... | #include <bits/stdc++.h>
typedef long long int ll;
typedef long double ld;
#define pb push_back
#define pii pair<int, int>
#define F first
#define S second
#define endl '\n'
#define int long long
#define sync \
ios_base::sync_with_stdio(false); ... | replace | 16 | 17 | 16 | 17 | 0 | |
p02965 | C++ | Runtime Error | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <string.h>
#define N 2000005
using namespace std;
typedef long long ll;
const int mod = 998244353;
int n, m;
ll f[N], inv[N];
ll C(int n, int m) { return f[n] * inv[m] % mod * inv[n - m] % mod; }
ll solve(int n, int m) {
ll ans = 0;
... | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <string.h>
#define N 2000005
using namespace std;
typedef long long ll;
const int mod = 998244353;
int n, m;
ll f[N], inv[N];
ll C(int n, int m) { return f[n] * inv[m] % mod * inv[n - m] % mod; }
ll solve(int n, int m) {
ll ans = 0;
... | replace | 14 | 15 | 14 | 15 | 0 | |
p02965 | C++ | Runtime Error | #include <bits/stdc++.h>
#define fo(i, a, b) for (int i = a; i <= b; i++)
#define fd(i, a, b) for (int i = a; i >= b; i--)
using namespace std;
typedef long long LL;
const int maxn = 1e6 + 5;
const LL mo = 998244353;
int n, m;
LL mi(LL x, LL y) {
LL re = 1;
for (; y; y >>= 1, x = x * x % mo)
if (y & 1)
... | #include <bits/stdc++.h>
#define fo(i, a, b) for (int i = a; i <= b; i++)
#define fd(i, a, b) for (int i = a; i >= b; i--)
using namespace std;
typedef long long LL;
const int maxn = 1e6 + 5;
const LL mo = 998244353;
int n, m;
LL mi(LL x, LL y) {
LL re = 1;
for (; y; y >>= 1, x = x * x % mo)
if (y & 1)
... | replace | 27 | 28 | 27 | 30 | 0 | |
p02965 | C++ | Runtime Error | #ifndef __INTMOD_H__0001__
#define __INTMOD_H__0001__
#include <cassert>
#include <iostream>
#include <vector>
/* Modulus must be less than 0x80000000, and must not be 0. */
template <uint32_t Modulus> class IntMod {
typedef int Int;
typedef unsigned int UInt;
typedef long long Long;
typedef unsigned long lon... | #ifndef __INTMOD_H__0001__
#define __INTMOD_H__0001__
#include <cassert>
#include <iostream>
#include <vector>
/* Modulus must be less than 0x80000000, and must not be 0. */
template <uint32_t Modulus> class IntMod {
typedef int Int;
typedef unsigned int UInt;
typedef long long Long;
typedef unsigned long lon... | replace | 409 | 410 | 409 | 410 | 0 | |
p02965 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define ll long long
#define N 1000005
int P[N];
int PI[N];
#define MOD 998244353
ll modInverse(ll a, ll m) {
ll m0 = m;
ll y = 0, x = 1;
if (m == 1)
return 0;
while (a > 1) {
int q = a / m;
int t = m;
m = a % m, a = t;
... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define ll long long
#define N 3000005
int P[N];
int PI[N];
#define MOD 998244353
ll modInverse(ll a, ll m) {
ll m0 = m;
ll y = 0, x = 1;
if (m == 1)
return 0;
while (a > 1) {
int q = a / m;
int t = m;
m = a % m, a = t;
... | replace | 7 | 8 | 7 | 8 | 0 | |
p02965 | C++ | Runtime Error | #include <bits/stdc++.h>
#define itn int
#define all(x) (x).begin(), (x).end()
#define make_unique(x) \
sort(all((x))); \
(x).resize(unique(all((x))) - (x).begin())
#define random_shuffle(...) shuf... | #include <bits/stdc++.h>
#define itn int
#define all(x) (x).begin(), (x).end()
#define make_unique(x) \
sort(all((x))); \
(x).resize(unique(all((x))) - (x).begin())
#define random_shuffle(...) shuf... | insert | 24 | 24 | 24 | 27 | -11 | |
p02965 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
using ll = long long;
using namespace std;
#include <cassert>
#define MOD (long)(998244353)
#define MAX 1000000 // 階乗をいくつまで計算するか
class modlong {
long val;
static const long mod = MOD;
static long *invs, *facts, *finv... | #include <algorithm>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
using ll = long long;
using namespace std;
#include <cassert>
#define MOD (long)(998244353)
#define MAX 5000000 // 階乗をいくつまで計算するか
class modlong {
long val;
static const long mod = MOD;
static long *invs, *facts, *finv... | replace | 12 | 13 | 12 | 13 | 0 | |
p02965 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <map>
#include <vector>
using namespace std;
typedef long long int ll;
ll mod = 998244353;
ll mod_pow(ll a, ll b) {
a %= mod;
if (b == 0)
return 1;
if (b == 1)
return a;
ll res = mod_pow(a, b / 2) % mod;
res *= res;
res %= mod;
if (b % 2)
res... | #include <algorithm>
#include <iostream>
#include <map>
#include <vector>
using namespace std;
typedef long long int ll;
ll mod = 998244353;
ll mod_pow(ll a, ll b) {
a %= mod;
if (b == 0)
return 1;
if (b == 1)
return a;
ll res = mod_pow(a, b / 2) % mod;
res *= res;
res %= mod;
if (b % 2)
res... | replace | 47 | 48 | 47 | 48 | 0 | |
p02965 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
#define mod 998244353
#define mad(a, b) a = (a + b) % mod
#define mul(a, b) a = (a * b) % mod
#define N 1500010
ll fac[N], inv[N], ivf[N];
ll C(ll n, ll k) {
if (n < k)
return 0;
return fac[n] * ivf[n - k] % mo... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
#define mod 998244353
#define mad(a, b) a = (a + b) % mod
#define mul(a, b) a = (a * b) % mod
#define N 5000010
ll fac[N], inv[N], ivf[N];
ll C(ll n, ll k) {
if (n < k)
return 0;
return fac[n] * ivf[n - k] % mo... | replace | 8 | 9 | 8 | 9 | 0 | |
p02965 | C++ | Runtime Error | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <complex>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using na... | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <complex>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using na... | replace | 39 | 40 | 39 | 40 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.