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
p02861
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; int n; int x[10], y[10]; double dist(int i, int j) { double dx = x[i] - x[j]; double dy = y[i] - y[j]; return pow(dx * dx + dy * dy, 0.5); } void solve() { cin >> n; for (int i = 1; i <= n; i++) cin >> x[i] >> y[i]; vector<int> v(n);...
#include <bits/stdc++.h> using namespace std; typedef long long ll; int n; int x[10], y[10]; double dist(int i, int j) { double dx = x[i] - x[j]; double dy = y[i] - y[j]; return pow(dx * dx + dy * dy, 0.5); } void solve() { cin >> n; for (int i = 1; i <= n; i++) cin >> x[i] >> y[i]; vector<int> v(n);...
replace
23
24
23
24
0
p02861
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, N) for (int i = 0; i < N; i++) using namespace std; int N; int x[10], y[10]; double dist(int i, int j) { double dx = x[i] - x[j]; double dy = y[i] - y[j]; return pow(dx * dx + dy * dy, 0.5); } void solve() { cin >> N; for (int i = 1; i <= N; i++) cin >> x[i] >> y[...
#include <bits/stdc++.h> #define rep(i, N) for (int i = 0; i < N; i++) using namespace std; int N; int x[10], y[10]; double dist(int i, int j) { double dx = x[i] - x[j]; double dy = y[i] - y[j]; return pow(dx * dx + dy * dy, 0.5); } void solve() { cin >> N; for (int i = 1; i <= N; i++) cin >> x[i] >> y[...
replace
21
22
21
22
0
p02861
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int N; int x[7], y[7]; double dist(int i, int j) { int dx = x[i] - x[j]; int dy = y[i] - y[j]; return pow(dx * dx + dy * dy, 0.5); } void solve() { cin >> N; for (int i = 0; i < N; i++) cin >> x[i] >> y[i]; double sum; vector<int> v(N); for (int i = 0...
#include <bits/stdc++.h> using namespace std; int N; int x[10], y[10]; double dist(int i, int j) { int dx = x[i] - x[j]; int dy = y[i] - y[j]; return pow(dx * dx + dy * dy, 0.5); } void solve() { cin >> N; for (int i = 0; i < N; i++) cin >> x[i] >> y[i]; double sum; vector<int> v(N); for (int i =...
replace
4
5
4
5
0
p02861
C++
Runtime Error
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define all(a) a.begin(), a.end() #define F first #define S second #define sz(x) (int)x.size() #define pb push_back #define ll long long #define vi vector<long long> #define pi pair<long long, long long> #define mp ma...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define all(a) a.begin(), a.end() #define F first #define S second #define sz(x) (int)x.size() #define pb push_back #define ll long long #define vi vector<long long> #define pi pair<long long, long long> #define mp ma...
replace
36
37
36
37
0
p02861
C++
Runtime Error
#pragma GCC optimize("Ofast") #pragma GCC target("avx,avx2") #include <bits/stdc++.h> #define whlie while #define pb push_back #define eb emplace_back #define fi first #define se second #define rep(i, N) for (int i = 0; i < (N); i++) #define repr(i, N) for (int i = (N)-1; i >= 0; i--) #define rep1(i, N) for (int i = 1...
#include <bits/stdc++.h> #define whlie while #define pb push_back #define eb emplace_back #define fi first #define se second #define rep(i, N) for (int i = 0; i < (N); i++) #define repr(i, N) for (int i = (N)-1; i >= 0; i--) #define rep1(i, N) for (int i = 1; i <= (N); i++) #define repr1(i, N) for (int i = (N); i > 0; ...
delete
0
3
0
0
0
p02861
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define All(a) a.begin(), a.end() #define INF 1000000007 const int MOD = 1000000007; // accumulate(vec.begin(), vec.end(), 0) int gcd(int x, int y) { if (x % y == 0) return y; else retur...
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define All(a) a.begin(), a.end() #define INF 1000000007 const int MOD = 1000000007; // accumulate(vec.begin(), vec.end(), 0) int gcd(int x, int y) { if (x % y == 0) return y; else retur...
replace
54
55
54
55
0
p02861
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <iostream> #include <vector> using namespace std; struct Point { double x; double y; Point() {} Point(int x, int y) { this->x = x; this->y = y; } }; long long factorial(int n) { if (n == 1) return 1; else return n * factorial(n - 1); } boo...
#include <algorithm> #include <cmath> #include <iostream> #include <vector> using namespace std; struct Point { double x; double y; Point() {} Point(int x, int y) { this->x = x; this->y = y; } }; long long factorial(int n) { if (n == 1) return 1; else return n * factorial(n - 1); } boo...
replace
28
29
28
29
TLE
p02861
C++
Runtime Error
#include <bits/stdc++.h> /* #include <algorithm> #include <cstdio> #include <functional> #include <iomainp> #include <iostream> #include <map> #include <math.h> #include <string> #include <vector> */ typedef long long ll; typedef unsigned long long ull; #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define RFOR...
#include <bits/stdc++.h> /* #include <algorithm> #include <cstdio> #include <functional> #include <iomainp> #include <iostream> #include <map> #include <math.h> #include <string> #include <vector> */ typedef long long ll; typedef unsigned long long ull; #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define RFOR...
replace
31
32
31
32
0
p02861
C++
Runtime Error
#include <bits/stdc++.h> #define endl "\n" #define ll long long int #define vi vector<ll> #define vll vector<ll> #define vvi vector<vi> #define pii pair<ll, ll> #define pll pair<long long, long long> #define mod 1000000007 #define inf 1000000000000000001; #define all(c) c.begin(), c.end() #define mp(x, y) make_pair(x,...
#include <bits/stdc++.h> #define endl "\n" #define ll long long int #define vi vector<ll> #define vll vector<ll> #define vvi vector<vi> #define pii pair<ll, ll> #define pll pair<long long, long long> #define mod 1000000007 #define inf 1000000000000000001; #define all(c) c.begin(), c.end() #define mp(x, y) make_pair(x,...
delete
21
28
21
21
-11
p02861
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define Love_coding int main #define trace(x) cerr << #x << ": " << x << " " << endl; #define fast ios::sync_with_stdio(0), cout.tie(0), cin.tie(0); #define fde(i, p, n) for (long long int i = p; i >= n; i--) #define f(i, p, n) for (long long int i = p; i < n; i++) #defin...
#include <bits/stdc++.h> using namespace std; #define Love_coding int main #define trace(x) cerr << #x << ": " << x << " " << endl; #define fast ios::sync_with_stdio(0), cout.tie(0), cin.tie(0); #define fde(i, p, n) for (long long int i = p; i >= n; i--) #define f(i, p, n) for (long long int i = p; i < n; i++) #defin...
delete
325
328
325
325
TLE
p02861
C++
Runtime Error
// #include "stdafx.h" #include <algorithm> #include <assert.h> #include <climits> #include <cmath> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #i...
// #include "stdafx.h" #include <algorithm> #include <assert.h> #include <climits> #include <cmath> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #i...
replace
65
66
65
66
-6
malloc(): corrupted top size
p02861
Python
Runtime Error
from itertools import permutations from functools import reduce from operator import mul def solve(string): n, *xy = map(int, string.split()) (*xy,) = zip(*[iter(xy)] * 2) return str( sum( sum( ((xy[p0][0] - xy[p1][0]) ** 2 + (xy[p0][1] - xy[p1][1]) ** 2) ** 0.5 ...
from itertools import permutations from functools import reduce from operator import mul def solve(string): n, *xy = map(int, string.split()) (*xy,) = zip(*[iter(xy)] * 2) return str( sum( sum( ((xy[p0][0] - xy[p1][0]) ** 2 + (xy[p0][1] - xy[p1][1]) ** 2) ** 0.5 ...
replace
21
22
21
23
IndexError: list index out of range
Traceback (most recent call last): File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02861/Python/s645937078.py", line 18, in <module> print(solve(input())) File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02861/Python/s645937078.py", line 10, in solve sum( File "/ho...
p02861
C++
Runtime Error
#include <algorithm> #include <bits/stdc++.h> #include <iterator> #include <set> using namespace std; #define forr(a, n) for (int i = a; i <= n; i++) #define MAX 1000000007LL #define mod 998244353 #define forn(n, a) for (int i = n; i >= a; i--) #define all(x) x.begin(), x.end() #define mp(x, y) make_pair(x, y) #define ...
#include <algorithm> #include <bits/stdc++.h> #include <iterator> #include <set> using namespace std; #define forr(a, n) for (int i = a; i <= n; i++) #define MAX 1000000007LL #define mod 998244353 #define forn(n, a) for (int i = n; i >= a; i--) #define all(x) x.begin(), x.end() #define mp(x, y) make_pair(x, y) #define ...
replace
32
36
32
36
0
p02861
Python
Runtime Error
from itertools import permutations import numpy as np N = int(input()) xys = [] for _ in range(N): xys.append(list(map(int, input().split()))) combs = np.array(list(permutations(xys, N))) ret = np.array( [np.linalg.norm(combs[:, i] - combs[:, i + 1], axis=1) for i in range(N - 1)] ).sum() / len(combs) prin...
from itertools import permutations import numpy as np N = int(input()) xys = [] for _ in range(N): xys.append(list(map(int, input().split()))) combs = np.array(list(permutations(xys, N))) ret = np.array( [np.linalg.norm(combs[:, i] - combs[:, i + 1], axis=1) for i in range(N - 1)] ).sum() / len(combs) prin...
replace
15
16
15
16
TLE
p02861
C++
Runtime Error
// 17571@nith.ac.in @Ankit Verma #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace std; using namespace __gnu_pbds; #pragma GCC optimize("O3") #define ll long long // Custom Hash Function for Unordered Maps struct custom_hash { static uint64_t splitmix64(uint64_t x) { // http://xor...
// 17571@nith.ac.in @Ankit Verma #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace std; using namespace __gnu_pbds; #pragma GCC optimize("O3") #define ll long long // Custom Hash Function for Unordered Maps struct custom_hash { static uint64_t splitmix64(uint64_t x) { // http://xor...
replace
160
164
160
164
-11
p02861
C++
Runtime Error
#include <algorithm> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> #include <vector> using namespace std; #define mod 1000000007 #define ten5 100005 #define ten52 200005 #define ten6 1000005 #define PI 3.141...
#include <algorithm> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> #include <vector> using namespace std; #define mod 1000000007 #define ten5 100005 #define ten52 200005 #define ten6 1000005 #define PI 3.141...
replace
76
77
76
77
0
p02862
C++
Runtime Error
#include "bits/stdc++.h" using namespace std; #define ll long long #define rep(i, n) for (ll i = 0; i < (ll)n; ++i) #define rrep(i, n) for (ll i = n - 1; i >= 0; --i) #define pp pair<ll, ll> #define ppp pair<ll, pp> #define pb push_back #define ALL(v) v.begin(), v.end() #define fi first #define se second const ll mod =...
#include "bits/stdc++.h" using namespace std; #define ll long long #define rep(i, n) for (ll i = 0; i < (ll)n; ++i) #define rrep(i, n) for (ll i = n - 1; i >= 0; --i) #define pp pair<ll, ll> #define ppp pair<ll, pp> #define pb push_back #define ALL(v) v.begin(), v.end() #define fi first #define se second const ll mod =...
insert
50
50
50
54
0
p02862
C++
Runtime Error
#include <iostream> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; typedef long long ll; const int mod = 1e9 + 7; const int M = 510000; ll fac[M], finv[M], inv[M]; // 前処理 void Cinit() { fac[0] = fac[1] = 1; finv[0] = finv[1] = 1; inv[1] = 1; for (int i = 2; i < M; i++) { fac[i] = fa...
#include <iostream> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; typedef long long ll; const int mod = 1e9 + 7; const int M = 10000000; ll fac[M], finv[M], inv[M]; // 前処理 void Cinit() { fac[0] = fac[1] = 1; finv[0] = finv[1] = 1; inv[1] = 1; for (int i = 2; i < M; i++) { fac[i] = ...
replace
6
7
6
7
0
p02862
C++
Runtime Error
#include <bits/stdc++.h> #define mod 1000000007 #define fr first #define se second #define ll long long #define PI 3.1415926535 #define pb push_back #define mpr make_pair #define all(a) a.begin(), a.end() #define rall(a) a.rbegin(), a.rend() #define senky_bansal ios_base::sync_with_stdio(false); #define IIIT_ALLAHABAD ...
#include <bits/stdc++.h> #define mod 1000000007 #define fr first #define se second #define ll long long #define PI 3.1415926535 #define pb push_back #define mpr make_pair #define all(a) a.begin(), a.end() #define rall(a) a.rbegin(), a.rend() #define senky_bansal ios_base::sync_with_stdio(false); #define IIIT_ALLAHABAD ...
insert
62
62
62
64
0
p02862
C++
Runtime Error
#include "bits/stdc++.h" #include <math.h> #include <time.h> using namespace std; long long mod = 1000000007; // 10^9 + 7 //--------------------------------------------------------------------------------------------------- vector<long long> f(1000010); vector<long long> rf(1000010); long long n; long long inv(long lon...
#include "bits/stdc++.h" #include <math.h> #include <time.h> using namespace std; long long mod = 1000000007; // 10^9 + 7 //--------------------------------------------------------------------------------------------------- vector<long long> f(1000010); vector<long long> rf(1000010); long long n; long long inv(long lon...
replace
45
55
45
57
0
p02862
C++
Runtime Error
#include <cstdio> #define int long long template <class T> void fr(T &a) { T w = 0, s = 1; char c = getchar(); while (c < '0' || c > '9') { if (c == '-') s = -1; c = getchar(); } while (c >= '0' && c <= '9') w = w * 10 + c - '0', c = getchar(); a = w * s; } template <class T> T fr() { ...
#include <cstdio> #define int long long template <class T> void fr(T &a) { T w = 0, s = 1; char c = getchar(); while (c < '0' || c > '9') { if (c == '-') s = -1; c = getchar(); } while (c >= '0' && c <= '9') w = w * 10 + c - '0', c = getchar(); a = w * s; } template <class T> T fr() { ...
replace
47
48
47
48
0
p02862
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; const int MAX = 1e6; const int MOD = 1e9 + 7; int mult(int a, int b) { return (a * 1ll * b) % MOD; } int binpow(int a) { int res = 1; int b = MOD - 2; while (b) { if (b & 1) res = mult(res, a); a = mult(a, a); b >>= 1; } ...
#include <bits/stdc++.h> using namespace std; using ll = long long; const int MAX = 1e6; const int MOD = 1e9 + 7; int mult(int a, int b) { return (a * 1ll * b) % MOD; } int binpow(int a) { int res = 1; int b = MOD - 2; while (b) { if (b & 1) res = mult(res, a); a = mult(a, a); b >>= 1; } ...
replace
47
48
47
48
0
p02862
C++
Runtime Error
#include <bits/stdc++.h> typedef long long ll; using namespace std; ll MOD = 1000000007; #define vec vector<int> #define vecll vector<ll> #define vecd vector<double> #define vecst vector<string> #define vecb vector<bool> #define v2(v, n, m, init) vector<vector<int>> v(n, vector<int>(m, init)) #define vb2(v, n, m, init...
#include <bits/stdc++.h> typedef long long ll; using namespace std; ll MOD = 1000000007; #define vec vector<int> #define vecll vector<ll> #define vecd vector<double> #define vecst vector<string> #define vecb vector<bool> #define v2(v, n, m, init) vector<vector<int>> v(n, vector<int>(m, init)) #define vb2(v, n, m, init...
replace
122
123
122
123
0
p02862
C++
Runtime Error
#include <bits/stdc++.h> #define ll long long #define pb push_back #define mp make_pair #define mod 1000000007 #define fast \ ios_base::sync_with_stdio(false); \ cin.tie(NULL) #define filein freopen("input.t...
#include <bits/stdc++.h> #define ll long long #define pb push_back #define mp make_pair #define mod 1000000007 #define fast \ ios_base::sync_with_stdio(false); \ cin.tie(NULL) #define filein freopen("input.t...
insert
36
36
36
38
0
p02862
C++
Runtime Error
#include <algorithm> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <string.h> #include <string> #include <vector> using namespace std; using ll = long long; using pll = pair<ll, ll>; using vl = vector<ll>; using vll = vector<vl>; using ...
#include <algorithm> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <string.h> #include <string> #include <vector> using namespace std; using ll = long long; using pll = pair<ll, ll>; using vl = vector<ll>; using vll = vector<vl>; using ...
replace
309
310
309
310
0
p02862
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef unsigned long long ULL; const int nMax = 2000001, MOD = 1e9 + 7; ULL inv[nMax], Fact[nMax], invF[nMax]; ULL Comb(int n, int r) { return (((Fact[n] * invF[r]) % MOD) * invF[n - r]) % MOD; } int main() { inv[1] = Fact[0] = Fact[1] = invF[0] = invF[1] = 1; for (...
#include <bits/stdc++.h> using namespace std; typedef unsigned long long ULL; const int nMax = 2000001, MOD = 1e9 + 7; ULL inv[nMax], Fact[nMax], invF[nMax]; ULL Comb(int n, int r) { return (((Fact[n] * invF[r]) % MOD) * invF[n - r]) % MOD; } int main() { inv[1] = Fact[0] = Fact[1] = invF[0] = invF[1] = 1; for (...
replace
26
27
26
27
0
p02862
C++
Runtime Error
#include <algorithm> #include <climits> #include <functional> #include <iostream> #include <math.h> #include <queue> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <string> #include <unordered_set> #include <vector> using namespace std; typedef long long ll; // auto mod int // https://youtu.be/L8...
#include <algorithm> #include <climits> #include <functional> #include <iostream> #include <math.h> #include <queue> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <string> #include <unordered_set> #include <vector> using namespace std; typedef long long ll; // auto mod int // https://youtu.be/L8...
insert
73
73
73
78
0
p02862
C++
Runtime Error
#include <iostream> #include <vector> using namespace std; int n, m; int mod = 1000000007; vector<long long> fac, inv, finv; void combinit() { fac.resize(n + m + 1); inv.resize(n + m + 1); finv.resize(n + m + 1); fac[0] = fac[1] = 1; inv[1] = 1; finv[0] = finv[1] = 1; for (int i = 2; i < n + m + 1; i+...
#include <iostream> #include <vector> using namespace std; int n, m; int mod = 1000000007; vector<long long> fac, inv, finv; void combinit() { fac.resize(n + m + 1); inv.resize(n + m + 1); finv.resize(n + m + 1); fac[0] = fac[1] = 1; inv[1] = 1; finv[0] = finv[1] = 1; for (int i = 2; i < n + m + 1; i+...
insert
35
35
35
40
0
p02862
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const int MOD = 1000000007; const int INF = 1e9; long long modpow(long long a, long long n, long long mod) { long long res = 1; while (n > 0) { // nを2進数に分解してビットの立っているところだけ掛け算していく。 if (n & 1) res = res * a % mod; a = a * a % mod; n >>= 1; } re...
#include <bits/stdc++.h> using namespace std; const int MOD = 1000000007; const int INF = 1e9; long long modpow(long long a, long long n, long long mod) { long long res = 1; while (n > 0) { // nを2進数に分解してビットの立っているところだけ掛け算していく。 if (n & 1) res = res * a % mod; a = a * a % mod; n >>= 1; } re...
replace
22
23
22
23
0
p02862
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef unsigned long long ull; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef pair<double, double> pdd; const ull mod = 1e9 + 7; #define REP(i, n) for (int i = 0; i < (int)n; ++i) // debug #define dump(x) cerr << #x << " = " << (x) <<...
#include <bits/stdc++.h> using namespace std; typedef unsigned long long ull; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef pair<double, double> pdd; const ull mod = 1e9 + 7; #define REP(i, n) for (int i = 0; i < (int)n; ++i) // debug #define dump(x) cerr << #x << " = " << (x) <<...
replace
69
70
69
70
0
p02862
C++
Runtime Error
#include <bits/stdc++.h> #define ll long long using namespace std; const int m = 1e6, M = 1e9 + 7; ll inverse[3 * m], fact[3 * m], invfact[3 * m]; ll nCr(ll n, ll r) { ll ans = fact[n] * invfact[r] % M; return (ans * invfact[n - r] % M); } int main() { ios::sync_with_stdio(0); cin.tie(0); // good luck, ki...
#include <bits/stdc++.h> #define ll long long using namespace std; const int m = 1e6, M = 1e9 + 7; ll inverse[3 * m], fact[3 * m], invfact[3 * m]; ll nCr(ll n, ll r) { ll ans = fact[n] * invfact[r] % M; return (ans * invfact[n - r] % M); } int main() { ios::sync_with_stdio(0); cin.tie(0); // good luck, ki...
insert
33
33
33
36
0
p02862
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cmath> #include <fstream> #include <iostream> #include <limits> #include <map> #include <queue> #include <set> #include <string> #include <unordered_set> #include <vector> #define MOD_BIG 1000000007 #define MOD_BIG2 998244353 using std::cerr; using std::cin; using std::...
#include <algorithm> #include <bitset> #include <cmath> #include <fstream> #include <iostream> #include <limits> #include <map> #include <queue> #include <set> #include <string> #include <unordered_set> #include <vector> #define MOD_BIG 1000000007 #define MOD_BIG2 998244353 using std::cerr; using std::cin; using std::...
insert
49
49
49
53
0
p02862
C++
Runtime Error
// ~maqsat~ /* */ // #pragma GCC target ("avx2") // #pragma GCC optimization ("Ofast") // #pragma GCC optimization ("unroll-loops") // #pragma comment(linker, "/stack:200000000") // #pragma GCC optimize("Ofast") // #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #include <bits/stdc++.h...
// ~maqsat~ /* */ // #pragma GCC target ("avx2") // #pragma GCC optimization ("Ofast") // #pragma GCC optimization ("unroll-loops") // #pragma comment(linker, "/stack:200000000") // #pragma GCC optimize("Ofast") // #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #include <bits/stdc++.h...
replace
89
90
89
90
0
p02862
C++
Runtime Error
/* 友利奈緒ぱわーでACしてくれ!!!!!!!!!!!! Charlotteまだ見てない人は見ような!!!!!!! /  /:/              \:ヽ \         /  /                     \  ヽ      \__L 彡                    ヽ  ',        フ /   /  /  /   ,         ヽ  ',  j        レ    /  /  /                ',  ヽ j         //...
/* 友利奈緒ぱわーでACしてくれ!!!!!!!!!!!! Charlotteまだ見てない人は見ような!!!!!!! /  /:/              \:ヽ \         /  /                     \  ヽ      \__L 彡                    ヽ  ',        フ /   /  /  /   ,         ヽ  ',  j        レ    /  /  /                ',  ヽ j         //...
insert
215
215
215
219
0
p02862
C++
Runtime Error
/** * いやなんでこれでサンプルと合わないのか全然分からない **/ #include <bits/stdc++.h> using namespace std; using ll = long long; const int inf = 1e9 + 7; const ll longinf = 1LL << 60; const ll mod = 1e9 + 7; const int MAX = 510000; const int MOD = 1000000007; long long fac[MAX], finv[MAX], inv[MAX]; // テーブルを作る前処理 void COMinit() { fac[0...
/** * いやなんでこれでサンプルと合わないのか全然分からない **/ #include <bits/stdc++.h> using namespace std; using ll = long long; const int inf = 1e9 + 7; const ll longinf = 1LL << 60; const ll mod = 1e9 + 7; const int MAX = 910000; const int MOD = 1000000007; long long fac[MAX], finv[MAX], inv[MAX]; // テーブルを作る前処理 void COMinit() { fac[0...
replace
10
11
10
11
0
p02862
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cmath> #include <iostream> #include <list> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> #include <tuple> #include <vector> //  ceil(a/b) (a + (b - 1))/ b using namespace std; #...
#include <algorithm> #include <bitset> #include <cmath> #include <iostream> #include <list> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> #include <tuple> #include <vector> //  ceil(a/b) (a + (b - 1))/ b using namespace std; #...
replace
110
118
110
125
0
p02862
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using pii = pair<int, int>; using pll = pair<long long, long long>; const int INF = 1 << 29; const int MOD = 1000000007; long long ruizyou(int m, int n) { if (m == 0) return 0; if (m == 1) return 1; long long ans = 1; long long tmp = m; for (int i = 0; i ...
#include <bits/stdc++.h> using namespace std; using pii = pair<int, int>; using pll = pair<long long, long long>; const int INF = 1 << 29; const int MOD = 1000000007; long long ruizyou(int m, int n) { if (m == 0) return 0; if (m == 1) return 1; long long ans = 1; long long tmp = m; for (int i = 0; i ...
replace
25
26
25
26
0
p02862
Python
Runtime Error
import sys def input(): return sys.stdin.readline().strip() sys.setrecursionlimit(20000000) MOD = 10**9 + 7 INF = float("inf") class Combination: """ O(n)の前計算を1回行うことで,O(1)でnCr mod mを求められる n_max = 10**6のとき前処理は約950ms (PyPyなら約340ms, 10**7で約1800ms) 使用例: comb = Combination(1000000) print(c...
import sys def input(): return sys.stdin.readline().strip() sys.setrecursionlimit(20000000) MOD = 10**9 + 7 INF = float("inf") class Combination: """ O(n)の前計算を1回行うことで,O(1)でnCr mod mを求められる n_max = 10**6のとき前処理は約950ms (PyPyなら約340ms, 10**7で約1800ms) 使用例: comb = Combination(1000000) print(c...
insert
60
60
60
64
0
p02862
Python
Runtime Error
from sys import stdin, setrecursionlimit setrecursionlimit(10**9) INF = 1 << 60 def input(): return stdin.readline().strip() MOD = 1000000007 X, Y = map(int, input().split()) n = (X + Y) // 3 x = (2 * X - Y) // 3 y = (-X + 2 * Y) // 3 if (X + Y) % 3 or x < 0 or y < 0: print(0) exit() def mod_com(n, ...
from sys import stdin, setrecursionlimit setrecursionlimit(10**9) INF = 1 << 60 def input(): return stdin.readline().strip() MOD = 1000000007 X, Y = map(int, input().split()) n = (X + Y) // 3 x = (2 * X - Y) // 3 y = (-X + 2 * Y) // 3 if (X + Y) % 3 or x < 0 or y < 0: print(0) exit() def mod_com(n, ...
insert
28
28
28
30
0
p02862
Python
Runtime Error
MOD = 10**9 + 7 def prepare(n): global MOD modFacts = [0] * (n + 1) modFacts[0] = 1 for i in range(n): modFacts[i + 1] = (modFacts[i] * (i + 1)) % MOD invs = [1] * (n + 1) invs[n] = pow(modFacts[n], MOD - 2, MOD) for i in range(n, 1, -1): invs[i - 1] = (invs[i] * i) % MOD ...
MOD = 10**9 + 7 def prepare(n): global MOD modFacts = [0] * (n + 1) modFacts[0] = 1 for i in range(n): modFacts[i + 1] = (modFacts[i] * (i + 1)) % MOD invs = [1] * (n + 1) invs[n] = pow(modFacts[n], MOD - 2, MOD) for i in range(n, 1, -1): invs[i - 1] = (invs[i] * i) % MOD ...
replace
19
20
19
20
0
p02862
Python
Runtime Error
import sys X, Y = map(int, input().split()) # 直交座標に直す if (2 * X - Y) % 3 != 0 or (2 * Y - X) % 3 != 0: print(0) sys.exit() x, y = (2 * X - Y) // 3, (2 * Y - X) // 3 def comb_inv(n, k, mod): f = [1 for _ in range(n + 1)] inv = [1 for _ in range(n + 1)] finv = [1 for _ in range(n + 1)] for i ...
import sys X, Y = map(int, input().split()) # 直交座標に直す if X > 2 * Y or Y > 2 * X or (2 * X - Y) % 3 != 0 or (2 * Y - X) % 3 != 0: print(0) sys.exit() x, y = (2 * X - Y) // 3, (2 * Y - X) // 3 def comb_inv(n, k, mod): f = [1 for _ in range(n + 1)] inv = [1 for _ in range(n + 1)] finv = [1 for _ in...
replace
5
6
5
6
0
p02862
Python
Runtime Error
from functools import reduce def modcombination(n, k, mod): # nCk % mod num = reduce(lambda x, y: x * y % mod, range(n, n - k, -1)) den = reduce(lambda x, y: x * y % mod, range(1, k + 1)) return num * pow(den, mod - 2, mod) % mod if __name__ == "__main__": MOD = 10**9 + 7 x, y = map(int, inp...
from functools import reduce def modcombination(n, k, mod): # nCk % mod num = reduce(lambda x, y: x * y % mod, range(n, n - k, -1)) den = reduce(lambda x, y: x * y % mod, range(1, k + 1)) return num * pow(den, mod - 2, mod) % mod if __name__ == "__main__": MOD = 10**9 + 7 x, y = map(int, inp...
insert
22
22
22
25
0
p02862
Python
Runtime Error
#!/usr/bin/python3 import os import sys def main(): X, Y = read_ints() print(solve(X, Y)) MOD = 10**9 + 7 def mpow(a, n): p = a v = 1 while n > 0: if n & 1: v *= p v %= MOD n >>= 1 p *= p p %= MOD return v def solve(X, Y): s = ...
#!/usr/bin/python3 import os import sys def main(): X, Y = read_ints() print(solve(X, Y)) MOD = 10**9 + 7 def mpow(a, n): p = a v = 1 while n > 0: if n & 1: v *= p v %= MOD n >>= 1 p *= p p %= MOD return v def solve(X, Y): s = ...
insert
35
35
35
38
0
p02862
Python
Time Limit Exceeded
LARGE = 10**9 + 7 def solve(x, y): if (x + y) % 3 != 0: return 0 z = (x + y) // 3 if x < z or y < z: return 0 # zC(x-z) r = min(x - z, y - z) res = 1 for i in range(r): res *= z - i res *= pow(i + 1, LARGE - 2, LARGE) res %= LARGE return res de...
LARGE = 10**9 + 7 def solve(x, y): if (x + y) % 3 != 0: return 0 z = (x + y) // 3 if x < z or y < z: return 0 # zC(x-z) r = min(x - z, y - z) res = 1 for i in range(r): res *= z - i res *= pow(i + 1, LARGE - 2, LARGE) res %= LARGE return res de...
replace
32
33
32
33
TLE
p02862
Python
Runtime Error
import sys input = sys.stdin.readline _x, _y = map(int, input().split()) def combination(n, r, mod=10**9 + 7): n1, r = n + 1, min(r, n - r) numer = denom = 1 for i in range(1, r + 1): numer = numer * (n1 - i) % mod denom = denom * i % mod return numer * pow(denom, mod - 2, mod) % mod...
import sys input = sys.stdin.readline _x, _y = map(int, input().split()) def nCk(n, k, m=10**9 + 7): a = b = 1 k = min(k, n - k) for i in range(k): a = (a * (n - i)) % m b = (b * (i + 1)) % m return (a * pow(b, m - 2, m)) % m def chker(x, y): if (x + y) % 3 != 0 or x > 2 * y o...
delete
5
24
5
5
ValueError: not enough values to unpack (expected 2, got 0)
Traceback (most recent call last): File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02862/Python/s588059150.py", line 16, in <module> X, Y = map(int, input().split()) ValueError: not enough values to unpack (expected 2, got 0)
p02862
C++
Runtime Error
#include "bits/stdc++.h" #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; using P = pair<int, int>; ll nck(ll n, ll k) { ll p = 1000000007; ll p2; p2 = p - 2; vector<int> r(35); vector<ll> r2(35); rep(j, 35) { r[j] = (p2 >> j) & 1; } ll ans; ans = 1; if (...
#include "bits/stdc++.h" #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; using P = pair<int, int>; ll nck(ll n, ll k) { ll p = 1000000007; ll p2; p2 = p - 2; vector<int> r(35); vector<ll> r2(36); rep(j, 35) { r[j] = (p2 >> j) & 1; } ll ans; ans = 1; if (...
replace
12
13
12
13
0
p02862
C++
Runtime Error
#include <bits/stdc++.h> using ll = long long; using namespace std; ll mod = 1e9 + 7; ll X, Y; const ll M = 1e9 + 7; vector<ll> fac(1000001); // n!(mod M) vector<ll> ifac(1000001); // k!^{M-2} (mod M) // a,bの範囲的にこれだけ配列を用意していけば十分 ll mpow(ll x, ll n) { // x^n(mod M) ←普通にpow(x,n)では溢れてしまうため,随時mod計算 ll ans = 1...
#include <bits/stdc++.h> using ll = long long; using namespace std; ll mod = 1e9 + 7; ll X, Y; const ll M = 1e9 + 7; vector<ll> fac(1000001); // n!(mod M) vector<ll> ifac(1000001); // k!^{M-2} (mod M) // a,bの範囲的にこれだけ配列を用意していけば十分 ll mpow(ll x, ll n) { // x^n(mod M) ←普通にpow(x,n)では溢れてしまうため,随時mod計算 ll ans = 1...
replace
43
44
43
44
0
p02862
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define Hello \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define endl '\n...
#include <bits/stdc++.h> using namespace std; #define Hello \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define endl '\n...
replace
27
29
27
34
0
p02862
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); ++i) typedef long long ll; const int MAX = 510000; const int MOD = 1000000007; long long fac[MAX], finv[MAX], inv[MAX]; // テーブルを作る前処理 void COMinit() { fac[0] = fac[1] = 1; finv[0] = finv[1] = 1; inv[1] = 1; for (int i = 2...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); ++i) typedef long long ll; const int MAX = 5100000; const int MOD = 1000000007; long long fac[MAX], finv[MAX], inv[MAX]; // テーブルを作る前処理 void COMinit() { fac[0] = fac[1] = 1; finv[0] = finv[1] = 1; inv[1] = 1; for (int i = ...
replace
5
6
5
6
0
p02862
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<int64_t, int64_t> pll; typedef vector<int64_t> vl; int dx[] = {1, -1, 0, 0, 1, -1, 1, -1}; int dy[] = {0, 0, 1, -1, 1, -1, -1, 1}; const long double PI = acos(-1); #define INF (2147483647) #define mod (100000000...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<int64_t, int64_t> pll; typedef vector<int64_t> vl; int dx[] = {1, -1, 0, 0, 1, -1, 1, -1}; int dy[] = {0, 0, 1, -1, 1, -1, -1, 1}; const long double PI = acos(-1); #define INF (2147483647) #define mod (100000000...
insert
58
58
58
62
0
p02862
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cctype> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <vector...
#include <algorithm> #include <bitset> #include <cctype> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <vector...
insert
70
70
70
75
0
p02862
C++
Runtime Error
#include <bits/stdc++.h> #define ll long long #define ld long double #define ft first #define sd second #define pb push_back using namespace std; const ll mod = 1e9 + 7; ll power(ll a, ll b, ll m = mod) { ll x = 1; while (b) { if (b & 1) { x = 1ll * x * a % m; } a = 1ll * a * a % m; b /= 2; ...
#include <bits/stdc++.h> #define ll long long #define ld long double #define ft first #define sd second #define pb push_back using namespace std; const ll mod = 1e9 + 7; ll power(ll a, ll b, ll m = mod) { ll x = 1; while (b) { if (b & 1) { x = 1ll * x * a % m; } a = 1ll * a * a % m; b /= 2; ...
replace
46
47
46
47
0
p02862
C++
Runtime Error
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < n; i++) #define ALL(obj) obj.begin(), obj.end() 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 > b) { a = b; return 1; } ret...
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < n; i++) #define ALL(obj) obj.begin(), obj.end() 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 > b) { a = b; return 1; } ret...
insert
149
149
149
155
0
p02862
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const long long md = 1e9 + 7; // mod const int maxn = 1001000; long long fac[maxn], inv[maxn]; // cal x^y in logy order long long powd(long long x, long long y) { long long res = 1; while (y) { if (y & 1) res = res * x % md; x = x * x % md; y >>= 1; ...
#include <bits/stdc++.h> using namespace std; const long long md = 1e9 + 7; // mod const int maxn = 1001000; long long fac[maxn], inv[maxn]; // cal x^y in logy order long long powd(long long x, long long y) { long long res = 1; while (y) { if (y & 1) res = res * x % md; x = x * x % md; y >>= 1; ...
replace
34
35
34
35
0
p02862
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define FOR(i, a, b) for (int i = a; i <= b; i++) #define ll long long #define INF 1000000007 ll f[1000001]; ll pow(ll a, ll b, ll MOD) { ll x = 1, y = a; while (b > 0) { if (b % 2 == 1) { x = (x * y); if (x > MOD) x %= MOD; } y = (y * ...
#include <bits/stdc++.h> using namespace std; #define FOR(i, a, b) for (int i = a; i <= b; i++) #define ll long long #define INF 1000000007 ll f[1000001]; ll pow(ll a, ll b, ll MOD) { ll x = 1, y = a; while (b > 0) { if (b % 2 == 1) { x = (x * y); if (x > MOD) x %= MOD; } y = (y * ...
replace
41
42
41
42
0
p02862
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; using pii = pair<int, int>; #define INF LONG_MAX #define MOD 1000000007 #define rng(a) a.begin(), a.end() #define rrng(a) a.end(), a.begin() #define Max 10000000 ll fact[Max], fact_inv[Max]; ll power(ll a, ll b) { ...
#include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; using pii = pair<int, int>; #define INF LONG_MAX #define MOD 1000000007 #define rng(a) a.begin(), a.end() #define rrng(a) a.end(), a.begin() #define Max 10000000 ll fact[Max], fact_inv[Max]; ll power(ll a, ll b) { ...
replace
50
51
50
55
-11
p02862
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <memory.h> #include <set> #include <unordered_set> #include <vector> using namespace std; #define sqr(a) ((a) * (a)) #define all(a) (a).begin(), (a).end() const int MOD = (int)1e9...
#include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <memory.h> #include <set> #include <unordered_set> #include <vector> using namespace std; #define sqr(a) ((a) * (a)) #define all(a) (a).begin(), (a).end() const int MOD = (int)1e9...
replace
56
57
56
57
0
p02862
C++
Runtime Error
/*author ADITYA BANSAL //~ MNNIT ALLAHABAD */ #include <bits/stdc++.h> using namespace std; #define ll long long #define ull unsigned long long ll power(ll, ll); ll ncr(ll, ll); ll add(ll a, ll b); void fact(); ll mul(ll a, ll b); #define watch(x) cerr << (#x) << "is" << x << nl; #define fast ...
/*author ADITYA BANSAL //~ MNNIT ALLAHABAD */ #include <bits/stdc++.h> using namespace std; #define ll long long #define ull unsigned long long ll power(ll, ll); ll ncr(ll, ll); ll add(ll a, ll b); void fact(); ll mul(ll a, ll b); #define watch(x) cerr << (#x) << "is" << x << nl; #define fast ...
replace
55
56
55
57
TLE
p02862
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> using std::bitset; using std::cin; using std::cout; using std::endl; using std::string; using std::vector; #define rep(i, n) for (int i = 0;...
#include <algorithm> #include <bitset> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> using std::bitset; using std::cin; using std::cout; using std::endl; using std::string; using std::vector; #define rep(i, n) for (int i = 0;...
insert
113
113
113
117
0
p02862
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const int64_t mod = 1000000007; int64_t power(int64_t n, int64_t k) { if (k == 0) return 1; int64_t half = power(n, k / 2), half2 = half * half % mod; if (k % 2) { return n * half2 % mod; } else { return half2; } } int main() { int x0, y0, n, x, y...
#include <bits/stdc++.h> using namespace std; const int64_t mod = 1000000007; int64_t power(int64_t n, int64_t k) { if (k == 0) return 1; int64_t half = power(n, k / 2), half2 = half * half % mod; if (k % 2) { return n * half2 % mod; } else { return half2; } } int main() { int x0, y0, n, x, y...
replace
26
27
26
31
0
p02862
C++
Runtime Error
#include <algorithm> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <vector> using namespace std; typedef long long ll; const ll MOD = 1000000007; #define N_MAX 2000001 ll inv[N_MAX], fac[N_MAX], finv[N_MAX]; void init() { fac[0] = fac[1] = 1; finv[0] = finv[1] = 1...
#include <algorithm> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <vector> using namespace std; typedef long long ll; const ll MOD = 1000000007; #define N_MAX 2000001 ll inv[N_MAX], fac[N_MAX], finv[N_MAX]; void init() { fac[0] = fac[1] = 1; finv[0] = finv[1] = 1...
insert
58
58
58
62
0
p02862
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cmath> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; typedef long long ll; #define rep(i, s, n) for (ll i = s; i < n; i++) #define repe(i, s, n) for (ll i = s...
#include <algorithm> #include <bitset> #include <cmath> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; typedef long long ll; #define rep(i, s, n) for (ll i = s; i < n; i++) #define repe(i, s, n) for (ll i = s...
replace
53
55
53
60
0
p02862
C++
Memory Limit Exceeded
#include <algorithm> #include <climits> #include <cmath> #include <cstdio> #include <cstring> #include <functional> #include <iostream> #include <list> #include <numeric> #include <queue> #include <sstream> #include <string> #include <tuple> #include <utility> #include <vector> #define REP(i, n) for (int i = 0, i##_MA...
#include <algorithm> #include <climits> #include <cmath> #include <cstdio> #include <cstring> #include <functional> #include <iostream> #include <list> #include <numeric> #include <queue> #include <sstream> #include <string> #include <tuple> #include <utility> #include <vector> #define REP(i, n) for (int i = 0, i##_MA...
replace
41
42
41
42
MLE
p02862
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int64_t MOD = 1e9 + 7; int64_t fact[1000005]; int64_t factorial(int n, int p) { return fact[n] % p; } //-RECIPE-START-// // Use 64 bits integers to avoid overflow errors during multiplication. int64_t modPow(int64_t a, int64_t x, int64_t p) { // calculates a^x mod p i...
#include <bits/stdc++.h> using namespace std; int64_t MOD = 1e9 + 7; int64_t fact[1000005]; int64_t factorial(int n, int p) { return fact[n] % p; } //-RECIPE-START-// // Use 64 bits integers to avoid overflow errors during multiplication. int64_t modPow(int64_t a, int64_t x, int64_t p) { // calculates a^x mod p i...
insert
67
67
67
72
0
p02862
C++
Runtime Error
#include <bits/stdc++.h> #include <cassert> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; using ll = long long; using P = pair<int, int>; // const long long MOD = 1000000007; const long long INF = 1LL << 60; const int INT_INF = 1000000000; // int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1}; in...
#include <bits/stdc++.h> #include <cassert> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; using ll = long long; using P = pair<int, int>; // const long long MOD = 1000000007; const long long INF = 1LL << 60; const int INT_INF = 1000000000; // int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1}; in...
replace
15
16
15
16
0
p02862
C++
Time Limit Exceeded
#include <iostream> using namespace std; template <typename T> T extgcd(T a, T b, T &x, T &y) { T d = a; if (b != 0) { d = extgcd(b, a % b, y, x); y -= (a / b) * x; } else { x = 1; y = 0; } return d; } // mを法としたときのaのモジュラ逆元を求める template <typename T> T mod_inverse(T a, T m) { T x, y; extgc...
#include <iostream> using namespace std; template <typename T> T extgcd(T a, T b, T &x, T &y) { T d = a; if (b != 0) { d = extgcd(b, a % b, y, x); y -= (a / b) * x; } else { x = 1; y = 0; } return d; } // mを法としたときのaのモジュラ逆元を求める template <typename T> T mod_inverse(T a, T m) { T x, y; extgc...
replace
43
44
43
45
TLE
p02862
C++
Runtime Error
// BROWNIE TK #include <bits/stdc++.h> typedef long long int lli; typedef unsigned long long int ulli; typedef long double ldb; #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; #define pb push_back #define popb pop_back() #define pf push_front #define popf pop...
// BROWNIE TK #include <bits/stdc++.h> typedef long long int lli; typedef unsigned long long int ulli; typedef long double ldb; #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; #define pb push_back #define popb pop_back() #define pf push_front #define popf pop...
replace
100
101
100
101
0
p02862
C++
Runtime Error
#include <bits/stdc++.h> #define ll long long int #define dbg(x) cout << "( " << #x << " -> " << x << " )" << endl; using namespace std; ll Power(ll a, ll b, ll p) { ll res = 1; while (b > 0) { if (b % 2 != 0) res = ((res % p) * (a % p)) % p; a = ((a % p) * (a % p)) % p; b = b / 2; } return re...
#include <bits/stdc++.h> #define ll long long int #define dbg(x) cout << "( " << #x << " -> " << x << " )" << endl; using namespace std; ll Power(ll a, ll b, ll p) { ll res = 1; while (b > 0) { if (b % 2 != 0) res = ((res % p) * (a % p)) % p; a = ((a % p) * (a % p)) % p; b = b / 2; } return re...
replace
27
28
27
28
-11
p02862
C++
Runtime Error
/* * Author: heyuhhh * Created Time: 2019/11/16 20:26:13 */ #include <bits/stdc++.h> #define MP make_pair #define fi first #define se second #define sz(x) (int)(x).size() #define all(x) (x).begin(), (x).end() #define INF 0x3f3f3f3f #define Local #ifdef Local #define dbg(args...) ...
/* * Author: heyuhhh * Created Time: 2019/11/16 20:26:13 */ #include <bits/stdc++.h> #define MP make_pair #define fi first #define se second #define sz(x) (int)(x).size() #define all(x) (x).begin(), (x).end() #define INF 0x3f3f3f3f #define Local #ifdef Local #define dbg(args...) ...
replace
66
67
66
67
0
p02862
C++
Runtime Error
#include <bits/stdc++.h> #define iint int #define pll std::pair<iint, iint> #define rep(i, a, b) for (iint i = (iint)a; i < (iint)b; i++) #define per(i, a, b) for (iint i = (iint)a; i > (iint)b; i--) #define F first #define S second #define pb push_back #define mp make_pair #define full(a) a.begin(), a.end() #define rf...
#include <bits/stdc++.h> #define iint int #define pll std::pair<iint, iint> #define rep(i, a, b) for (iint i = (iint)a; i < (iint)b; i++) #define per(i, a, b) for (iint i = (iint)a; i > (iint)b; i--) #define F first #define S second #define pb push_back #define mp make_pair #define full(a) a.begin(), a.end() #define rf...
replace
42
43
42
43
0
p02862
C++
Runtime Error
#include <bits/stdc++.h> #define For(i, a, b) for (int(i) = (a); (i) < (b); ++(i)) #define rFor(i, a, b) for (int(i) = (a)-1; (i) >= (b); --(i)) #define rep(i, n) For((i), 0, (n)) #define rrep(i, n) rFor((i), (n), 0) #define fi first #define se second using namespace std; typedef long long lint; typedef unsigned long l...
#include <bits/stdc++.h> #define For(i, a, b) for (int(i) = (a); (i) < (b); ++(i)) #define rFor(i, a, b) for (int(i) = (a)-1; (i) >= (b); --(i)) #define rep(i, n) For((i), 0, (n)) #define rrep(i, n) rFor((i), (n), 0) #define fi first #define se second using namespace std; typedef long long lint; typedef unsigned long l...
replace
68
69
68
69
0
p02862
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (int i = a; i < (b); ++i) #define all(x) begin(x), end(x) #define sz(x) (int)(x).size() typedef long long ll; typedef pair<int, int> pii; typedef vector<int> vi; template <typename H> bool chmin(H &v1, const H v2) { if (v1 > v2) { v1 = v2; ...
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (int i = a; i < (b); ++i) #define all(x) begin(x), end(x) #define sz(x) (int)(x).size() typedef long long ll; typedef pair<int, int> pii; typedef vector<int> vi; template <typename H> bool chmin(H &v1, const H v2) { if (v1 > v2) { v1 = v2; ...
replace
67
68
67
68
0
p02862
C++
Runtime Error
#pragma GCC optimize("Ofast,fast-math,unroll-loops") #include <bits/stdc++.h> #define int ll // #define double long double // #define endl '\n' #define all(C) (C).begin(), (C).end() #define rall(C) (C).rbegin(), (C).rend() #define mp make_pair #define pb emplace_back #define dbg(x) cerr << #x << " : " << x << endl #d...
#pragma GCC optimize("Ofast,fast-math,unroll-loops") #include <bits/stdc++.h> #define int ll // #define double long double // #define endl '\n' #define all(C) (C).begin(), (C).end() #define rall(C) (C).rbegin(), (C).rend() #define mp make_pair #define pb emplace_back #define dbg(x) cerr << #x << " : " << x << endl #d...
insert
103
103
103
105
0
p02862
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef double db; typedef string str; typedef pair<int, int> pi; typedef pair<ll, ll> pl; typedef pair<ld, ld> pd; typedef vector<int> vi; typedef vector<ll> vl; typedef vector<ld> vd; typedef vector<str> vs; typedef vector<...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef double db; typedef string str; typedef pair<int, int> pi; typedef pair<ll, ll> pl; typedef pair<ld, ld> pd; typedef vector<int> vi; typedef vector<ll> vl; typedef vector<ld> vd; typedef vector<str> vs; typedef vector<...
insert
89
89
89
93
0
p02862
C++
Time Limit Exceeded
/* AuThOr GaRyMr 技巧: 1.区别对待大数据&小数据! 2.Dp难推时算贡献! 3.long long (尤其乘法)! 4.long long INF 要大 5.Dp on trees: 换根法,每次清空当前的节点和换到的子节点 6.long double | 输出浮点数 7.注意特判!(prince and princess) */ #include <bits/stdc++.h> #define rb(a, b, c) for (int a = b; a <= c; ++a) #define rl(a, b, c) for (int a = b; a >= c; --a) #define niv vector<i...
/* AuThOr GaRyMr 技巧: 1.区别对待大数据&小数据! 2.Dp难推时算贡献! 3.long long (尤其乘法)! 4.long long INF 要大 5.Dp on trees: 换根法,每次清空当前的节点和换到的子节点 6.long double | 输出浮点数 7.注意特判!(prince and princess) */ #include <bits/stdc++.h> #define rb(a, b, c) for (int a = b; a <= c; ++a) #define rl(a, b, c) for (int a = b; a >= c; --a) #define niv vector<i...
replace
93
94
93
94
TLE
p02862
C++
Runtime Error
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <string> #include <utility> #include <vector> using namespace std; typedef long long ll; const ll MOD = 1e9 + 7; ll kai[2000001]; ll gyaku[2000001]; ll kuri2(ll x, ll a) { ll ret = 1; ll tmp = x; while (a > 0) { if (a & 1) ...
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <string> #include <utility> #include <vector> using namespace std; typedef long long ll; const ll MOD = 1e9 + 7; ll kai[2000001]; ll gyaku[2000001]; ll kuri2(ll x, ll a) { ll ret = 1; ll tmp = x; while (a > 0) { if (a & 1) ...
replace
51
52
51
52
0
p02862
C++
Memory Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, j, n) for (int i = j; i < n; i++) #define all(x) (x).begin(), (x).end() #define pii pair<int, int> #define pll pair<ll, ll> #define vc vector #define a first #define b second #define pb pusu_back #define INF (1000000000) #define MOD (100...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, j, n) for (int i = j; i < n; i++) #define all(x) (x).begin(), (x).end() #define pii pair<int, int> #define pll pair<ll, ll> #define vc vector #define a first #define b second #define pb pusu_back #define INF (1000000000) #define MOD (100...
replace
13
14
13
14
MLE
p02862
C++
Runtime Error
#include <bits/stdc++.h> #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define rep(i, n) for (int i = (0); i < (n); ++i) #define rng(x) (x).begin(), (x).end() #define rrng(x) (x).rbegin(), (x).rend() #define debug(x) cout << #x << " = " << (x) << endl; #define SUM(x) accumulate(rng(x), 0) #define fi first #defin...
#include <bits/stdc++.h> #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define rep(i, n) for (int i = (0); i < (n); ++i) #define rng(x) (x).begin(), (x).end() #define rrng(x) (x).rbegin(), (x).rend() #define debug(x) cout << #x << " = " << (x) << endl; #define SUM(x) accumulate(rng(x), 0) #define fi first #defin...
replace
108
109
108
109
0
p02862
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; long long X, Y; long long base = 1000000007LL; long long kaijo(long long a) { if (a == 0) return 1LL; else { return a * kaijo(a - 1) % base; } } long long ruijo(long long a, long long b) { if (b == 0LL) return 1LL; else { if (b % 2 == 0) r...
#include <bits/stdc++.h> using namespace std; long long X, Y; long long base = 1000000007LL; long long kaijo(long long a) { if (a == 0) return 1LL; else { return a * kaijo(a - 1) % base; } } long long ruijo(long long a, long long b) { if (b == 0LL) return 1LL; else { if (b % 2 == 0) r...
replace
27
28
27
28
TLE
p02862
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <complex> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <vector> #define rep(i, n) for...
#include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <complex> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <vector> #define rep(i, n) for...
insert
74
74
74
78
0
p02862
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; const int maxn = 1e6 + 6, M = 1e9 + 7; int fac[maxn], ifac[maxn]; int mult(int a, int b) { return (1LL * a * b) % M; } int modexp(int a, int b) { int res = 1; while (b > 0) { if (b & 1) res = mult(res, a); a = mult(a, a); b >>= 1...
#include <bits/stdc++.h> using namespace std; using ll = long long; const int maxn = 1e6 + 6, M = 1e9 + 7; int fac[maxn], ifac[maxn]; int mult(int a, int b) { return (1LL * a * b) % M; } int modexp(int a, int b) { int res = 1; while (b > 0) { if (b & 1) res = mult(res, a); a = mult(a, a); b >>= 1...
replace
37
38
37
42
0
p02862
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <vector> #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, a, n) for (int i = (int)(a); i <= (int)(n); i++) #define rrep(i, n) for (int i = (int)(n - 1); i > -1; i--) #define rrep2(i, n, a) for (int i = (int)(n); i >=...
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <vector> #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, a, n) for (int i = (int)(a); i <= (int)(n); i++) #define rrep(i, n) for (int i = (int)(n - 1); i > -1; i--) #define rrep2(i, n, a) for (int i = (int)(n); i >=...
replace
113
118
113
118
TLE
p02862
C++
Runtime Error
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define ll long long #define M 1000000007 #define sz(a) (ll) a.size() #define pll pair<ll, ll> #define rep(i, a, b) for (ll i = (ll)a; i < (ll)b; i++) #define sep(i, a, b) for (ll i = (ll)a; i >= (ll)b; i--) #define m...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define ll long long #define M 1000000007 #define sz(a) (ll) a.size() #define pll pair<ll, ll> #define rep(i, a, b) for (ll i = (ll)a; i < (ll)b; i++) #define sep(i, a, b) for (ll i = (ll)a; i >= (ll)b; i--) #define m...
replace
49
50
49
50
0
p02862
C++
Runtime Error
#include <bits/stdc++.h> #define fi first #define se second #define rep(i, n) for (int i = 0; i < (n); ++i) #define rrep(i, n) for (int i = 1; i <= (n); ++i) #define drep(i, n) for (int i = (n)-1; i >= 0; --i) #define srep(i, s, t) for (int i = s; i < t; ++i) #define rng(a) a.begin(), a.end() #define rrng(a) a.rbegin()...
#include <bits/stdc++.h> #define fi first #define se second #define rep(i, n) for (int i = 0; i < (n); ++i) #define rrep(i, n) for (int i = 1; i <= (n); ++i) #define drep(i, n) for (int i = (n)-1; i >= 0; --i) #define srep(i, s, t) for (int i = s; i < t; ++i) #define rng(a) a.begin(), a.end() #define rrng(a) a.rbegin()...
replace
126
127
126
129
0
p02862
C++
Runtime Error
#include <iostream> using namespace std; const int mod = int(1e9) + 7; int fact(int n) { if (n == 0) return 1; return ((long)n * (long)fact(n - 1)) % mod; } int pow(int n, int i) { long s = pow(n, i / 2); if (i % 2 == 0) { return (s * s) % mod; } else { return (((s * s) % mod) * (long)n) % mod;...
#include <iostream> using namespace std; const int mod = int(1e9) + 7; int fact(int n) { if (n == 0) return 1; return ((long)n * (long)fact(n - 1)) % mod; } int pow(int n, int i) { if (i == 0) return 1; long s = pow(n, i / 2); if (i % 2 == 0) { return (s * s) % mod; } else { return (((s *...
insert
12
12
12
14
-11
p02862
C++
Runtime Error
// #pragma GCC optimize("Ofast") #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; template <typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; #define ll ...
// #pragma GCC optimize("Ofast") #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; template <typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; #define ll ...
replace
92
93
92
93
0
p02862
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; const int MOD = (int)1e9 + 7; int add(int a, int b) { a += b; if (a >= MOD) { return a - MOD; } if (a < 0) { return a + MOD; } return a; } int mul(int a, int b) { return a * (ll)b % MOD; } int pw(int a,...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; const int MOD = (int)1e9 + 7; int add(int a, int b) { a += b; if (a >= MOD) { return a - MOD; } if (a < 0) { return a + MOD; } return a; } int mul(int a, int b) { return a * (ll)b % MOD; } int pw(int a,...
insert
61
61
61
65
0
p02862
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define res register int #define ll long long // #define cccgift // #define // getchar()(p1==p2&&(p2=(p1=buf)+fread(buf,1,1<<21,stdin),p1==p2)?EOF:*p1++) // char buf[1<<21],*p1=buf,*p2=buf; template <typename T> inline void read(T &x) { static char ch; bool f = 1; for...
#include <bits/stdc++.h> using namespace std; #define res register int #define ll long long // #define cccgift // #define // getchar()(p1==p2&&(p2=(p1=buf)+fread(buf,1,1<<21,stdin),p1==p2)?EOF:*p1++) // char buf[1<<21],*p1=buf,*p2=buf; template <typename T> inline void read(T &x) { static char ch; bool f = 1; for...
replace
51
52
51
52
0
p02862
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const int mod = 1e9 + 7; int add(int a, int b) { return a + b - mod * (a + b >= mod); } int mul(int a, int b) { return int(1ll * a * b % mod); } int power(int a, int x) { if (x == 0) { return 1; } return mul(power(mul(a, a), x >> 1), (x & 1 ? a : 1)); } int ...
#include <bits/stdc++.h> using namespace std; const int mod = 1e9 + 7; int add(int a, int b) { return a + b - mod * (a + b >= mod); } int mul(int a, int b) { return int(1ll * a * b % mod); } int power(int a, int x) { if (x == 0) { return 1; } return mul(power(mul(a, a), x >> 1), (x & 1 ? a : 1)); } int ...
insert
36
36
36
40
0
p02862
C++
Runtime Error
#include <iostream> #include <map> #include <vector> using namespace std; static const int INF = 1e9 + 7; vector<long long> fact; vector<long long> revfact; long long powMod(long long x, int k) { if (k == 0) return 1; if (k % 2 == 0) return powMod(x * x % INF, k / 2); else return x * powMod(x, k - ...
#include <iostream> #include <map> #include <vector> using namespace std; static const int INF = 1e9 + 7; vector<long long> fact; vector<long long> revfact; long long powMod(long long x, int k) { if (k == 0) return 1; if (k % 2 == 0) return powMod(x * x % INF, k / 2); else return x * powMod(x, k - ...
replace
42
43
42
43
0
p02862
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll N = 1e7 + 5; const ll mod = 1e9 + 7; ll fct[N], inv[N], invfct[N]; void init() { fct[0] = fct[1] = 1; inv[1] = 1; invfct[0] = invfct[1] = 1; for (ll i = 2; i < N; i++) { fct[i] = i * fct[i - 1] % mod; inv[i] = ll(mod - inv[mod ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll N = 1e7 + 5; const ll mod = 1e9 + 7; ll fct[N], inv[N], invfct[N]; void init() { fct[0] = fct[1] = 1; inv[1] = 1; invfct[0] = invfct[1] = 1; for (ll i = 2; i < N; i++) { fct[i] = i * fct[i - 1] % mod; inv[i] = ll(mod - inv[mod ...
replace
30
31
30
31
-11
p02862
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define int ll #define ll long long // const ll mod = 998244353; const ll mod = 1000000007; const int MX = 1000000; ll power(ll x, ll y, ll p) { ll res = 1ll; x = x % p; while (y) { if (y & 1ll) res = (res * x) % p; y = y >> 1ll; x = (x * x) % p; }...
#include <bits/stdc++.h> using namespace std; #define int ll #define ll long long // const ll mod = 998244353; const ll mod = 1000000007; const int MX = 1000000; ll power(ll x, ll y, ll p) { ll res = 1ll; x = x % p; while (y) { if (y & 1ll) res = (res * x) % p; y = y >> 1ll; x = (x * x) % p; }...
insert
41
41
41
43
0
p02862
C++
Runtime Error
#include <bits/stdc++.h> #define endl '\n' #define debug(X) cout << #X << " = " << X << endl using namespace std; const int MN = 1000010; const int MD = 1e9 + 7; long long fact[MN]; long long fastExp(long long b, long long e) { long long ans = 1; while (e > 0) { if (e & 1) ans = (ans * b) % MD; b ...
#include <bits/stdc++.h> #define endl '\n' #define debug(X) cout << #X << " = " << X << endl using namespace std; const int MN = 1000010; const int MD = 1e9 + 7; long long fact[MN]; long long fastExp(long long b, long long e) { long long ans = 1; while (e > 0) { if (e & 1) ans = (ans * b) % MD; b ...
replace
32
33
32
33
0
p02862
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll MOD = (ll)1e9 + 7; vector<long long> fact, fact_inv, inv; template <typename T> void init_combi(size_t size, const T mod) { size += 1; fact.resize(size); fact_inv.resize(size); inv.resize(size); fact[0] = fact[1] = 1; fact_inv[0]...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll MOD = (ll)1e9 + 7; vector<long long> fact, fact_inv, inv; template <typename T> void init_combi(size_t size, const T mod) { size += 1; fact.resize(size); fact_inv.resize(size); inv.resize(size); fact[0] = fact[1] = 1; fact_inv[0]...
insert
50
50
50
54
0
p02862
C++
Runtime Error
#include <bits/stdc++.h> #define _USE_MATH_DEFINES #include <algorithm> #include <math.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define all(x) x.begin(), x.end() #define rall(x) x.rbegin(), x.rend() #define print(s) cout << s << endl #define acc(v) accumulate(v.begin(), v.end(), 0) using namespace std; typed...
#include <bits/stdc++.h> #define _USE_MATH_DEFINES #include <algorithm> #include <math.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define all(x) x.begin(), x.end() #define rall(x) x.rbegin(), x.rend() #define print(s) cout << s << endl #define acc(v) accumulate(v.begin(), v.end(), 0) using namespace std; typed...
replace
16
17
16
17
0
p02862
C++
Runtime Error
#include <algorithm> #include <climits> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <utility> #include <vector> using namespace std; using ll = long long int; template <class T> ostream &operator<<(ostream &os, vector<T> &v) { for (auto i = v.begin(); i != v.end(); ...
#include <algorithm> #include <climits> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <utility> #include <vector> using namespace std; using ll = long long int; template <class T> ostream &operator<<(ostream &os, vector<T> &v) { for (auto i = v.begin(); i != v.end(); ...
insert
44
44
44
46
0
p02862
C++
Runtime Error
#include <algorithm> #include <deque> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stdio.h> #include <string.h> #include <string> #include <vector> // #include <bits/stdc++.h> typedef long long ll; using namespace std; const int mod = 1e9 + 7; const int N = 2e6 + 5; lon...
#include <algorithm> #include <deque> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stdio.h> #include <string.h> #include <string> #include <vector> // #include <bits/stdc++.h> typedef long long ll; using namespace std; const int mod = 1e9 + 7; const int N = 2e6 + 5; lon...
replace
47
48
47
48
0
p02862
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include "dump.hpp" #else #define dump(...) #define dumpv(...) #endif #define rep(i, n) for (int i = 0; i < (n); i++) #define mins(x, y) (x = min(x, y)) #define maxs(x, y) (x = max(x, y)) typedef long long ll; typedef pair<int, int> P; typedef vector<int> vi;...
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include "dump.hpp" #else #define dump(...) #define dumpv(...) #endif #define rep(i, n) for (int i = 0; i < (n); i++) #define mins(x, y) (x = min(x, y)) #define maxs(x, y) (x = max(x, y)) typedef long long ll; typedef pair<int, int> P; typedef vector<int> vi;...
insert
93
93
93
97
0
p02862
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define INF 1LL << 62 #define inf 1000000007 const int MAX = 510000; const int MOD = 1000000007; long long fac[MAX], finv[MAX], inv[MAX]; // テーブルを作る前処理 void COMinit() { fac[0] = fac[1] = 1; finv[0] = finv[1] = 1; inv[1] = 1; for (int i = 2; i...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define INF 1LL << 62 #define inf 1000000007 const int MAX = 1100000; const int MOD = 1000000007; long long fac[MAX], finv[MAX], inv[MAX]; // テーブルを作る前処理 void COMinit() { fac[0] = fac[1] = 1; finv[0] = finv[1] = 1; inv[1] = 1; for (int i = 2; ...
replace
5
6
5
6
0
p02862
C++
Runtime Error
#pragma GCC optimize("Ofast") #pragma GCC target("avx,avx2") #include <bits/stdc++.h> #define whlie while #define pb push_back #define eb emplace_back #define fi first #define se second #define rep(i, N) for (int i = 0; i < (N); i++) #define repr(i, N) for (int i = (N)-1; i >= 0; i--) #define rep1(i, N) for (int i = 1...
#include <bits/stdc++.h> #define whlie while #define pb push_back #define eb emplace_back #define fi first #define se second #define rep(i, N) for (int i = 0; i < (N); i++) #define repr(i, N) for (int i = (N)-1; i >= 0; i--) #define rep1(i, N) for (int i = 1; i <= (N); i++) #define repr1(i, N) for (int i = (N); i > 0; ...
delete
0
3
0
0
0