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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
using vb = vector<bool>;
using vl = vector<long>;
using vs = vector<string>;
using vvi = vector<vector<int>>;
using vvb = vector<vector<bool>>;
using vvc = vector<vector<char>>;
using vvl = vector<vector<long>>;
using pii = pair<int, int>;
using pil ... | #include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
using vb = vector<bool>;
using vl = vector<long>;
using vs = vector<string>;
using vvi = vector<vector<int>>;
using vvb = vector<vector<bool>>;
using vvc = vector<vector<char>>;
using vvl = vector<vector<long>>;
using pii = pair<int, int>;
using pil ... | replace | 23 | 24 | 23 | 24 | 0 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long int
#define pb push_back
#define mp make_pair
#define mod 1000000007
#define pi 3.141592653589793
using namespace std;
ll power(ll a, ll b) {
ll ans = 1;
ll t = a;
while (b) {
if (b % 2) {
ans = (ans * t) % mod;
}
t = (t * t) % mod;
b /= 2;
}... | #include <bits/stdc++.h>
#define ll long long int
#define pb push_back
#define mp make_pair
#define mod 1000000007
#define pi 3.141592653589793
using namespace std;
ll power(ll a, ll b) {
ll ans = 1;
ll t = a;
while (b) {
if (b % 2) {
ans = (ans * t) % mod;
}
t = (t * t) % mod;
b /= 2;
}... | insert | 42 | 42 | 42 | 46 | -11 | |
p02862 | C++ | Runtime Error | #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>
#define int long long
using namespace std;
int mod = 1e9 + 7;
int fac[2000005];
int modInverse(int a, int m) {
int m0 = m;
int y = 0, x = ... | #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>
#define int long long
using namespace std;
int mod = 1e9 + 7;
int fac[2000005];
int modInverse(int a, int m) {
int m0 = m;
int y = 0, x = ... | insert | 56 | 56 | 56 | 60 | 0 | Time: 0.000002
|
p02862 | C++ | Time Limit Exceeded | #include <iostream>
#include <vector>
using namespace std;
const int det = -3;
long long C[2000005];
bool ipr[1000005];
vector<int> primelessthanN(int n) {
// vector<bool> isprime(n + 1, true);
vector<int> prime;
prime.push_back(2);
int i;
for (i = 3; i * i <= n; i += 2) {
if (!ipr[i]) {
prime.... | #include <iostream>
#include <vector>
using namespace std;
const int det = -3;
long long C[2000005];
bool ipr[1000005];
vector<int> primelessthanN(int n) {
// vector<bool> isprime(n + 1, true);
vector<int> prime;
prime.push_back(2);
int i;
for (i = 3; i * i <= n; i += 2) {
if (!ipr[i]) {
prime.... | insert | 74 | 74 | 74 | 76 | TLE | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
ll modex(ll x, ll n, ll m) {
ll res = 1;
while (n > 0) {
if (n & 1)
res = (res * x) % m;
x = (x * x) % m;
n = n / 2;
}
return res;
}
int main() {
ios_base::sync_with_stdio(0);
cout.tie(0);
cin.tie(0);
#ifndef ONLINE_JU... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
ll modex(ll x, ll n, ll m) {
ll res = 1;
while (n > 0) {
if (n & 1)
res = (res * x) % m;
x = (x * x) % m;
n = n / 2;
}
return res;
}
int main() {
ios_base::sync_with_stdio(0);
cout.tie(0);
cin.tie(0);
// #ifndef ONLI... | replace | 20 | 24 | 20 | 24 | 0 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define repd(i, a, b) for (int i = (a); i < (b); i++)
#define FORR(i, a, b) for (int i = (b)-1; i >= (a); --i)
typedef long long ll;
using namespace std;
const ll MOD = 1000000007ll;
const int MAX = 510000;
ll fact[MAX], fact_inv[MAX];
// 繰り返し二乗... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define repd(i, a, b) for (int i = (a); i < (b); i++)
#define FORR(i, a, b) for (int i = (b)-1; i >= (a); --i)
typedef long long ll;
using namespace std;
const ll MOD = 1000000007ll;
const int MAX = 5100000;
ll fact[MAX], fact_inv[MAX];
// 繰り返し二... | replace | 7 | 8 | 7 | 8 | 0 | |
p02862 | C++ | Runtime Error | #include <cstdio>
#define mod 1000000007
#define int long long
int x, y, fac[20010000];
int quickpow(int x, int y) {
if (y == 0)
return 1;
if (y % 2 == 0)
return quickpow(x * x % mod, y / 2);
else
return quickpow(x * x % mod, y / 2) * x % mod;
}
int C(int n, int m) {
if (m == 0 || n == m)
return... | #include <cstdio>
#define mod 1000000007
#define int long long
int x, y, fac[20010000];
int quickpow(int x, int y) {
if (y == 0)
return 1;
if (y % 2 == 0)
return quickpow(x * x % mod, y / 2);
else
return quickpow(x * x % mod, y / 2) * x % mod;
}
int C(int n, int m) {
if (m == 0 || n == m)
return... | insert | 25 | 25 | 25 | 27 | -11 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
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 < MAX; i++) {
fac[i] = fac[i - 1] * i % M... | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
const int MAX = 1000000;
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 < MAX; i++) {
fac[i] = fac[i - 1] * i % ... | replace | 4 | 5 | 4 | 5 | 0 | |
p02862 | C++ | Runtime Error | #include <iostream>
using namespace std;
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 < MAX; i++) {
fac[i] = fac[i - 1] * i % MOD;
inv[i] = MOD - inv[MOD % i] * (... | #include <iostream>
using namespace std;
const int MAX = 1000000;
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 < MAX; i++) {
fac[i] = fac[i - 1] * i % MOD;
inv[i] = MOD - inv[MOD % i] * ... | replace | 3 | 4 | 3 | 4 | 0 | |
p02862 | C++ | Runtime Error | #include <stdio.h>
#define MOD 1000000007
typedef long long ll;
ll fct[1333333] = {1, 1}, inv[1333333] = {1, 1}, fiv[1333333] = {1, 1};
ll combination(ll n, ll r) { return fct[n] * fiv[r] % MOD * fiv[n - r] % MOD; }
int main(void) {
ll X, Y, i;
scanf("%lld %lld", &X, &Y);
if ((X + Y) % 3) {
puts("0");
... | #include <stdio.h>
#define MOD 1000000007
typedef long long ll;
ll fct[1333333] = {1, 1}, inv[1333333] = {1, 1}, fiv[1333333] = {1, 1};
ll combination(ll n, ll r) { return fct[n] * fiv[r] % MOD * fiv[n - r] % MOD; }
int main(void) {
ll X, Y, i;
scanf("%lld %lld", &X, &Y);
if ((X + Y) % 3) {
puts("0");
... | insert | 22 | 22 | 22 | 27 | 0 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, a, b) for (int i = a; i < (int)b; i++)
#define all(v) v.begin(), v.end()
const int MOD = 1e9 + 7;
const int INF = 1e9;
//'A' = 65, 'Z' = 90, 'a' = 97, 'z' = 122
const ll MAX = 510000;
ll fac[MAX], finv[MAX], inv[MAX];
void cominit() {
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, a, b) for (int i = a; i < (int)b; i++)
#define all(v) v.begin(), v.end()
const int MOD = 1e9 + 7;
const int INF = 1e9;
//'A' = 65, 'Z' = 90, 'a' = 97, 'z' = 122
const ll MAX = 1000000;
ll fac[MAX], finv[MAX], inv[MAX];
void cominit() {... | replace | 9 | 10 | 9 | 10 | 0 | |
p02862 | C++ | Runtime Error | #ifdef DEBUG
#else
#pragma GCC optimize("O3,no-stack-protector")
#pragma GCC optimize("unroll-loops")
#if __cplusplus >= 201703L
#pragma GCC target("avx2")
#else
#pragma GCC target("avx")
#endif
#endif
// 実数の場合
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define _USE_MATH_DEFIN... | #ifdef DEBUG
#else
#pragma GCC optimize("O3,no-stack-protector")
#pragma GCC optimize("unroll-loops")
#if __cplusplus >= 201703L
#pragma GCC target("avx2")
#else
#pragma GCC target("avx")
#endif
#endif
// 実数の場合
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define _USE_MATH_DEFIN... | replace | 132 | 133 | 132 | 133 | 0 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define ff first
#define ss second
#define inf 1000000000
#define IOS \
ios_base::sync_with_stdio(0); \
cin.tie(0)... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define ff first
#define ss second
#define inf 1000000000
#define IOS \
ios_base::sync_with_stdio(0); \
cin.tie(0)... | replace | 51 | 52 | 51 | 52 | 0 | |
p02862 | C++ | Runtime Error | #include <iostream>
#define rep(i, j, k) for (int i = j; (i) < (k); (i)++)
using namespace std;
#define mod 1000000007
#define mmax 1000000
typedef long long ll;
ll f[mmax], rf[mmax];
ll inv(ll x) {
ll res = 1;
ll k = mod - 2;
ll y = x;
while (k) {
if (k & 1)
res = (res * y) % mod;
y = (y * y) % m... | #include <iostream>
#define rep(i, j, k) for (int i = j; (i) < (k); (i)++)
using namespace std;
#define mod 1000000007
#define mmax 1000000
typedef long long ll;
ll f[mmax], rf[mmax];
ll inv(ll x) {
ll res = 1;
ll k = mod - 2;
ll y = x;
while (k) {
if (k & 1)
res = (res * y) % mod;
y = (y * y) % m... | replace | 41 | 44 | 41 | 49 | 0 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
#define clr(x, i) memset(x, i, sizeof(x))
using namespace std;
const int N = 2000005;
const ll mod = 1e9 + 7, inv2 = 5e8 + 4;
inline int read() {
int x = 0, f = 1;
char ch = getchar();
while (ch < '0' || ch > '9') {
if (ch == '-')
f = -1;
ch = getchar();... | #include <bits/stdc++.h>
#define ll long long
#define clr(x, i) memset(x, i, sizeof(x))
using namespace std;
const int N = 2000005;
const ll mod = 1e9 + 7, inv2 = 5e8 + 4;
inline int read() {
int x = 0, f = 1;
char ch = getchar();
while (ch < '0' || ch > '9') {
if (ch == '-')
f = -1;
ch = getchar();... | insert | 45 | 45 | 45 | 49 | 0 | |
p02862 | C++ | Runtime Error | #include <algorithm>
#include <cstdbool>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
typedef long long ll;
... | #include <algorithm>
#include <cstdbool>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
typedef long long ll;
... | replace | 110 | 111 | 110 | 112 | 0 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
#define fi first
#define se second
#define sz(a) int((a).size())
#define pb push_back
#define eb emplace_back
#define FOR(var, from, to) for (int var = (from); var <= (to); ++var)
#define rep(var, n) for (int var = 0; var < (n); ++var)
#define rep1(var, n) for (int var = 1;... | #include <bits/stdc++.h>
#define ll long long
#define fi first
#define se second
#define sz(a) int((a).size())
#define pb push_back
#define eb emplace_back
#define FOR(var, from, to) for (int var = (from); var <= (to); ++var)
#define rep(var, n) for (int var = 0; var < (n); ++var)
#define rep1(var, n) for (int var = 1;... | replace | 32 | 33 | 32 | 33 | 0 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
typedef long long ll;
#define rep(i, a, n) for (ll i = a; i < n; i++)
#define rrep(i, a, n) for (ll i = n; i >= a; i--)
#define index_check(i, n) \
if (i > n - 1 || i < 0) \
continue;... | #include <bits/stdc++.h>
typedef long long ll;
#define rep(i, a, n) for (ll i = a; i < n; i++)
#define rrep(i, a, n) for (ll i = n; i >= a; i--)
#define index_check(i, n) \
if (i > n - 1 || i < 0) \
continue;... | replace | 107 | 108 | 107 | 108 | 0 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
using pii = pair<int, int>;
using pli = pair<ll, int>;
using pll = pair<ll, ll>;
using vpii = vector<pii>;
using vpli = vector<pli>;
using vpll = vector<pll>... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
using pii = pair<int, int>;
using pli = pair<ll, int>;
using pll = pair<ll, ll>;
using vpii = vector<pii>;
using vpli = vector<pli>;
using vpll = vector<pll>... | replace | 37 | 39 | 37 | 39 | 0 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
vector<long long> fac;
vector<long long> fac_inv;
vector<long long> inv;
void init_combination(long long n, long long mod) {
fac.resize(n + 1);
fac_inv.resize(n + 1);
inv.resize(n + 1);
fac[0] = 1;
fac[1] = 1;
fac_inv[0] = 1;
fac_inv[1] = 1;
inv[1] = 1;
... | #include <bits/stdc++.h>
using namespace std;
vector<long long> fac;
vector<long long> fac_inv;
vector<long long> inv;
void init_combination(long long n, long long mod) {
fac.resize(n + 1);
fac_inv.resize(n + 1);
inv.resize(n + 1);
fac[0] = 1;
fac[1] = 1;
fac_inv[0] = 1;
fac_inv[1] = 1;
inv[1] = 1;
... | insert | 43 | 43 | 43 | 48 | 0 | |
p02862 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll M = 1e9 + 7;
int x, y;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
cin >> x >> y;
int a = (2 * x - y) / 3, b = (2 * y - x) / 3;
if ((x + y) % 3 || a < 0 || b < 0) {
cout << 0 << endl;
return 0;
}
ll D = 1, d =... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll M = 1e9 + 7;
int x, y;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
cin >> x >> y;
int a = (2 * x - y) / 3, b = (2 * y - x) / 3;
if ((x + y) % 3 || a < 0 || b < 0) {
cout << 0 << endl;
return 0;
}
ll D = 1, d =... | replace | 21 | 24 | 21 | 33 | TLE | |
p02862 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
const int MAX = 100000000;
const long long 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 < MAX; i++) {
fac[i] = fac[i - 1] * i % MOD;
inv[... | #include <bits/stdc++.h>
using namespace std;
const int MAX = 1000000;
const long long 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 < MAX; i++) {
fac[i] = fac[i - 1] * i % MOD;
inv[i]... | replace | 3 | 4 | 3 | 4 | TLE | |
p02862 | C++ | Runtime Error | #include <algorithm>
#include <array>
#include <assert.h>
#include <bitset>
#include <cmath>
#include <complex>
#include <cstdio>
#include <deque>
#include <float.h>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#inclu... | #include <algorithm>
#include <array>
#include <assert.h>
#include <bitset>
#include <cmath>
#include <complex>
#include <cstdio>
#include <deque>
#include <float.h>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#inclu... | replace | 184 | 188 | 184 | 201 | 0 | |
p02862 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#inc... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#inc... | replace | 30 | 31 | 30 | 31 | 0 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define MOD 1000000007
int f[10000010];
void init() {
f[0] = 1;
for (int i = 1; i < 10000010; i++) {
f[i] = f[i - 1] * i % MOD;
}
}
int pow_mod(int a, int b) {
int ans = 1;
while (b != 0) {
if (b & 1)
ans = (ans * a) % MOD;
... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define MOD 1000000007
int f[10000010];
void init() {
f[0] = 1;
for (int i = 1; i < 10000010; i++) {
f[i] = f[i - 1] * i % MOD;
}
}
int pow_mod(int a, int b) {
int ans = 1;
while (b != 0) {
if (b & 1)
ans = (ans * a) % MOD;
... | insert | 67 | 67 | 67 | 72 | 0 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
using ll = long long;
constexpr int MOD = 1000000007;
using namespace std;
ll f[1000010];
void init() {
f[0] = 1;
for (int i = 1; i < 1000010; i++)
f[i] = (f[i - 1] * i) % MOD;
}
ll inv(ll x) {
ll res = 1;
ll k = MOD - 2;
ll y = x;
while (k) {
if (k & 1)
res = (res * ... | #include <bits/stdc++.h>
using ll = long long;
constexpr int MOD = 1000000007;
using namespace std;
ll f[1000010];
void init() {
f[0] = 1;
for (int i = 1; i < 1000010; i++)
f[i] = (f[i - 1] * i) % MOD;
}
ll inv(ll x) {
ll res = 1;
ll k = MOD - 2;
ll y = x;
while (k) {
if (k & 1)
res = (res * ... | replace | 40 | 41 | 40 | 41 | 0 | |
p02862 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <iterator>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
const long long MOD = 1000000007;
int a;
int b;
int x, y;
const int MAXN = 1000010;
int p[1000010];... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <iterator>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
const long long MOD = 1000000007;
int a;
int b;
int x, y;
const int MAXN = 1000010;
int p[1000010];... | insert | 75 | 75 | 75 | 80 | TLE | |
p02862 | C++ | Runtime Error | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <vector>
using namespace std;
#define int long long
#if defined(__GNUC__)
#define __int32 __int32_t
#endif // __GNUC__
#define itn __int32
#define REP(i, n) for (itn(i) = 0; (i) < (n); (i)++)
#define REP2(i, x, n) for (itn(i) = x;... | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <vector>
using namespace std;
#define int long long
#if defined(__GNUC__)
#define __int32 __int32_t
#endif // __GNUC__
#define itn __int32
#define REP(i, n) for (itn(i) = 0; (i) < (n); (i)++)
#define REP2(i, x, n) for (itn(i) = x;... | replace | 38 | 41 | 38 | 41 | 0 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, l, r) for (register int i = (l); i <= (r); i++)
#define LOG(...) fprintf(stderr, __VA_ARGS__)
using namespace std;
typedef long long ll;
const int N = 2000000 + 5, MOD = 1000000007;
int fac[N], n, x, y, ifac[N];
int qpow(int a, int b) {
int res = 1;
while (b) {
if (b & 1... | #include <bits/stdc++.h>
#define rep(i, l, r) for (register int i = (l); i <= (r); i++)
#define LOG(...) fprintf(stderr, __VA_ARGS__)
using namespace std;
typedef long long ll;
const int N = 2000000 + 5, MOD = 1000000007;
int fac[N], n, x, y, ifac[N];
int qpow(int a, int b) {
int res = 1;
while (b) {
if (b & 1... | replace | 33 | 34 | 33 | 34 | 0 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int M = (int)1e9 + 7;
const int N = (int)2e6 + 5;
ll f[N], rf[N];
ll powmod(ll a, ll b) {
if (b == 0)
return 1;
ll ans = powmod(a, b / 2);
ans = ans * ans % M;
if (b % 2)
ans = ans * a % M;
return ans;
}
ll C(ll a, ll b) {
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int M = (int)1e9 + 7;
const int N = (int)2e6 + 5;
ll f[N], rf[N];
ll powmod(ll a, ll b) {
if (b == 0)
return 1;
ll ans = powmod(a, b / 2);
ans = ans * ans % M;
if (b % 2)
ans = ans * a % M;
return ans;
}
ll C(ll a, ll b) {
... | insert | 41 | 41 | 41 | 45 | 0 | |
p02862 | C++ | Runtime Error | #include <cstdio>
#include <iostream>
#define N 1000005
using namespace std;
typedef long long ll;
ll x, y, s, M = 1e9 + 7;
ll fac[N] = {1, 1}, inv[N] = {1, 1}, fiv[N] = {1, 1};
int main() {
cin >> x >> y;
s = x + y;
if (s % 3) {
puts("0");
return 0;
}
x -= s / 3;
y -= s / 3;
for (int i = 2; i <=... | #include <cstdio>
#include <iostream>
#define N 1000005
using namespace std;
typedef long long ll;
ll x, y, s, M = 1e9 + 7;
ll fac[N] = {1, 1}, inv[N] = {1, 1}, fiv[N] = {1, 1};
int main() {
cin >> x >> y;
s = x + y;
if (s % 3) {
puts("0");
return 0;
}
x -= s / 3;
y -= s / 3;
if (x < 0 || y < 0) ... | insert | 17 | 17 | 17 | 21 | 0 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace ::std;
#define all(x) (x).begin(), (x).end()
typedef long long ll;
typedef array<int, 3> tri;
typedef long double ld;
template <class T> istream &operator>>(istream &I, vector<T> &v) {
for (T &e : v)
I >> e;
return I;
}
template <class T> ostream &operator<<(ostream &... | #include <bits/stdc++.h>
using namespace ::std;
#define all(x) (x).begin(), (x).end()
typedef long long ll;
typedef array<int, 3> tri;
typedef long double ld;
template <class T> istream &operator>>(istream &I, vector<T> &v) {
for (T &e : v)
I >> e;
return I;
}
template <class T> ostream &operator<<(ostream &... | insert | 47 | 47 | 47 | 52 | 0 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
#define fast \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
using namespace ... | #include <bits/stdc++.h>
#define ll long long
#define fast \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
using namespace ... | replace | 57 | 58 | 57 | 58 | 0 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const int max_size = 1000000;
vector<long long> fac(max_size + 1), ifac(max_size + 1);
long long pow_mod(long long x, long long n) {
long long ans = 1;
while (n != 0) {
if (n & 1)
ans = ans * x % mod;
x = x * x % mod;
... | #include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const int max_size = 1000000;
vector<long long> fac(max_size + 1), ifac(max_size + 1);
long long pow_mod(long long x, long long n) {
long long ans = 1;
while (n != 0) {
if (n & 1)
ans = ans * x % mod;
x = x * x % mod;
... | insert | 39 | 39 | 39 | 42 | 0 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
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 < MAX; i++) {
fac[i] = fac[i - 1] * i % MOD;
inv[i] = MOD ... | #include <bits/stdc++.h>
using namespace std;
const int MAX = 7000000;
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 < MAX; i++) {
fac[i] = fac[i - 1] * i % MOD;
inv[i] = MOD... | replace | 2 | 3 | 2 | 3 | 0 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll M = 1e9 + 7;
ll mul(ll a, ll b) { return a * b % M; }
ll add(ll a, ll b) {
ll res = a + b;
if (res >= M)
res -= M;
return res;
}
ll mod_pow(ll x, ll n) {
if (n == 0)
return 1;
if (n & 1)
return mul(x, mod_pow(mul(x, ... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll M = 1e9 + 7;
ll mul(ll a, ll b) { return a * b % M; }
ll add(ll a, ll b) {
ll res = a + b;
if (res >= M)
res -= M;
return res;
}
ll mod_pow(ll x, ll n) {
if (n == 0)
return 1;
if (n & 1)
return mul(x, mod_pow(mul(x, ... | insert | 47 | 47 | 47 | 49 | 0 | |
p02862 | C++ | Runtime Error | #include <cassert>
#include <iostream>
#include <vector>
using namespace std;
template <long long mod> class modint {
private:
long long a;
public:
constexpr modint(const long long x = 0) noexcept : a(x % mod) {}
constexpr long long &value() noexcept { return a; }
constexpr const long long &value() const noex... | #include <cassert>
#include <iostream>
#include <vector>
using namespace std;
template <long long mod> class modint {
private:
long long a;
public:
constexpr modint(const long long x = 0) noexcept : a(x % mod) {}
constexpr long long &value() noexcept { return a; }
constexpr const long long &value() const noex... | replace | 90 | 91 | 90 | 91 | 0 | |
p02862 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <fstream>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
const long long mod = 1e9 + 7;
lon... | #include <algorithm>
#include <cmath>
#include <fstream>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
const long long mod = 1e9 + 7;
lon... | replace | 64 | 65 | 64 | 65 | 0 | |
p02862 | C++ | Runtime Error | #define _USE_MATH_DEFINES
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#i... | #define _USE_MATH_DEFINES
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#i... | insert | 72 | 72 | 72 | 77 | 0 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
long long fact[1000005];
const long long MOD = 1e9 + 7;
long long powmod(long long a, long long b) {
if (b == 0) {
return 1 % MOD;
} else if (b == 1) {
return a % MOD;
} else if (b % 2 == 0) {
long long temp = powmod(a, b / 2);
return (temp * temp) ... | #include <bits/stdc++.h>
using namespace std;
long long fact[1000005];
const long long MOD = 1e9 + 7;
long long powmod(long long a, long long b) {
if (b == 0) {
return 1 % MOD;
} else if (b == 1) {
return a % MOD;
} else if (b % 2 == 0) {
long long temp = powmod(a, b / 2);
return (temp * temp) ... | insert | 32 | 32 | 32 | 36 | 0 | |
p02862 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <tuple>
#include <vector>
#define MOD (1000000007)
using namespace std;
typedef long long ll;
vector<ll> fac(2000100, 0); // n!(mod M)
vector<ll> ifac(2000100, 0); // k!^{M-2} (... | #include <algorithm>
#include <cmath>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <tuple>
#include <vector>
#define MOD (1000000007)
using namespace std;
typedef long long ll;
vector<ll> fac(2000100, 0); // n!(mod M)
vector<ll> ifac(2000100, 0); // k!^{M-2} (... | replace | 55 | 56 | 55 | 58 | 0 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define SPEED \
ios::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0);
#define ll unsig... | #include <bits/stdc++.h>
using namespace std;
#define SPEED \
ios::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0);
#define ll long ... | replace | 6 | 7 | 6 | 7 | 0 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; ++i)
#define per(i, n) for (int i = n - 1; i >= 0; --i)
#define sc1(a) scanf("%d", &a)
#define sc2(a, b) scanf("%d %d", &a, &b)
#define sc3(a, b, c) scanf("%d %d %d", &a, &b, &c)
#define sl1(a) scanf("%lld", &a)
#define sl2(a, b) sc... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; ++i)
#define per(i, n) for (int i = n - 1; i >= 0; --i)
#define sc1(a) scanf("%d", &a)
#define sc2(a, b) scanf("%d %d", &a, &b)
#define sc3(a, b, c) scanf("%d %d %d", &a, &b, &c)
#define sl1(a) scanf("%lld", &a)
#define sl2(a, b) sc... | replace | 15 | 16 | 15 | 16 | 0 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define sz(x) int(x.size())
typedef long long ll;
typedef pair<int, int> P;
const int MAX = 510000;
const int MOD = 1000000007;
long long fac[MAX], finv[MAX], inv[MAX];
// テーブルを作る前処理
void COMinit() {
fac[0] = fac[1] = 1;
... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define sz(x) int(x.size())
typedef long long ll;
typedef pair<int, int> P;
const int MAX = 1000001;
const int MOD = 1000000007;
long long fac[MAX], finv[MAX], inv[MAX];
// テーブルを作る前処理
void COMinit() {
fac[0] = fac[1] = 1;... | replace | 7 | 8 | 7 | 8 | 0 | |
p02862 | C++ | Runtime Error | // Copyright 2019 yaito3014
#include "bits/stdc++.h"
using namespace std;
using namespace literals;
#include <ostream>
template <size_t Mod = 1000000007, class T = long long int> struct modint {
T value;
constexpr modint() = default;
constexpr modint(const modint &) = default;
constexpr modint(modint &&) = de... | // Copyright 2019 yaito3014
#include "bits/stdc++.h"
using namespace std;
using namespace literals;
#include <ostream>
template <size_t Mod = 1000000007, class T = long long int> struct modint {
T value;
constexpr modint() = default;
constexpr modint(const modint &) = default;
constexpr modint(modint &&) = de... | replace | 124 | 125 | 124 | 125 | 0 | |
p02862 | C++ | Runtime Error | // Author:: MUKUL KUMAR RAI
// Institution:: Jalpaiguri Government Engineering College
// If you are not doing well now just stick to it and learn new things one day
// you will be... Compete with yourself
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define ld long double
#define fi first
#de... | // Author:: MUKUL KUMAR RAI
// Institution:: Jalpaiguri Government Engineering College
// If you are not doing well now just stick to it and learn new things one day
// you will be... Compete with yourself
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define ld long double
#define fi first
#de... | replace | 108 | 109 | 108 | 109 | 0 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll modinv(ll a, ll m) {
ll b = m, u = 1, v = 0;
while (b) {
ll t = a / b;
a -= t * b;
swap(a, b);
u -= t * v;
swap(u, v);
}
u %= m;
if (u < 0)
u += m;
return u;
}
int main() {
ll X, Y;
cin >> X >> Y;
if ((X +... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll modinv(ll a, ll m) {
ll b = m, u = 1, v = 0;
while (b) {
ll t = a / b;
a -= t * b;
swap(a, b);
u -= t * v;
swap(u, v);
}
u %= m;
if (u < 0)
u += m;
return u;
}
int main() {
ll X, Y;
cin >> X >> Y;
if ((X +... | insert | 26 | 26 | 26 | 30 | 0 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int(i) = 0; (i) < (int)(n); (i)++)
#define frep(i, m, n) for (int(i) = (m); (i) < (int)(n); (i)++)
#define rrep(i, n) for (int(i) = (n)-1; (i) > -1; (i)--)
#define frrep(i, m, n) for (int(i) = (n)-1; (i) > (int)(m)-1; (i)--)
#define ALL(x) (x).begin(... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int(i) = 0; (i) < (int)(n); (i)++)
#define frep(i, m, n) for (int(i) = (m); (i) < (int)(n); (i)++)
#define rrep(i, n) for (int(i) = (n)-1; (i) > -1; (i)--)
#define frrep(i, m, n) for (int(i) = (n)-1; (i) > (int)(m)-1; (i)--)
#define ALL(x) (x).begin(... | replace | 52 | 53 | 52 | 54 | 0 | |
p02862 | C++ | Runtime Error | #include <algorithm>
#include <complex>
#include <cstdlib>
#include <ctime>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
const long long int mod = 1000000007;
const... | #include <algorithm>
#include <complex>
#include <cstdlib>
#include <ctime>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
const long long int mod = 1000000007;
const... | replace | 79 | 80 | 79 | 80 | 0 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define REP(i, n) for (int i = 1; i <= n; i++)
typedef long long ll;
const ll M = 1000000007;
vector<ll> fac(2000005);
vector<ll> ifac(2000005);
// べき乗高速化
ll mpow(ll x, ll n) {
ll ans = 1;
while (n != 0) {
if (n & 1)
... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define REP(i, n) for (int i = 1; i <= n; i++)
typedef long long ll;
const ll M = 1000000007;
vector<ll> fac(2000005);
vector<ll> ifac(2000005);
// べき乗高速化
ll mpow(ll x, ll n) {
ll ans = 1;
while (n != 0) {
if (n & 1)
... | replace | 49 | 50 | 49 | 54 | 0 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
const int N = 1e6 + 6;
const int mod = 1e9 + 7;
ll fact[N], inv[N];
ll fp(ll b, ll p) {
if (p == 0)
return 1;
if (p & 1)
return (b * fp(b, p - 1)) % mod;
return fp((b * b) % mod, p / 2);
}
ll nCk(ll n, ll k) { return ((fact[n] * inv... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
const int N = 1e6 + 6;
const int mod = 1e9 + 7;
ll fact[N], inv[N];
ll fp(ll b, ll p) {
if (p == 0)
return 1;
if (p & 1)
return (b * fp(b, p - 1)) % mod;
return fp((b * b) % mod, p / 2);
}
ll nCk(ll n, ll k) { return ((fact[n] * inv... | replace | 19 | 22 | 19 | 22 | -11 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int mod = 1e9 + 7;
const int N = 2e6 + 23;
int f[N];
int binpow(long long b, long long e) {
if (!e)
return 1;
if (e & 1)
return b * binpow(b, e - 1) % mod;
return binpow(b * b % mod, e / 2);
}
int C(int n, int k) {
return 1LL *... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int mod = 1e9 + 7;
const int N = 2e6 + 23;
int f[N];
int binpow(long long b, long long e) {
if (!e)
return 1;
if (e & 1)
return b * binpow(b, e - 1) % mod;
return binpow(b * b % mod, e / 2);
}
int C(int n, int k) {
if (n - k < ... | insert | 17 | 17 | 17 | 21 | 0 | |
p02862 | C++ | Runtime Error | // shan61916
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef double dll;
#define mp make_pair
#define pb push_back
#define ff first
#define ss second
#define IOS \
ios::sync_with_stdio(false... | // shan61916
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef double dll;
#define mp make_pair
#define pb push_back
#define ff first
#define ss second
#define IOS \
ios::sync_with_stdio(false... | insert | 40 | 40 | 40 | 42 | 0 | |
p02862 | C++ | Runtime Error |
// Best practice
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <functional> // for less
#define int long long
#define pb emplace_back
#define pf emplace_front
#define all(a) (a).begin(),... |
// Best practice
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <functional> // for less
#define int long long
#define pb emplace_back
#define pf emplace_front
#define all(a) (a).begin(),... | replace | 83 | 84 | 83 | 84 | 0 | |
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 pb push_back
#define fastio \
ios_base::sync_with_stdio(false); \
cin.tie(NUL... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ll long long
#define pb push_back
#define fastio \
ios_base::sync_with_stdio(false); \
cin.tie(NUL... | insert | 46 | 46 | 46 | 50 | 0 | |
p02862 | C++ | Runtime Error | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define rep0(N) for (int COUNTER = 0; COUNTER < (int)(N); COUNTER++)
#define rep(i, N) for (int i = 0; i < (int)(N); i++)
#define rep1(i, N) for (int i = 0; i < (int)(N); i++)
#define rep2(i, START, GOAL) for (int i = (int)(START); i < (int)(GOAL); i+... | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define rep0(N) for (int COUNTER = 0; COUNTER < (int)(N); COUNTER++)
#define rep(i, N) for (int i = 0; i < (int)(N); i++)
#define rep1(i, N) for (int i = 0; i < (int)(N); i++)
#define rep2(i, START, GOAL) for (int i = (int)(START); i < (int)(GOAL); i+... | replace | 157 | 158 | 157 | 158 | 0 | |
p02862 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
//-------------------- Modulo --------------------//
#def... | #include <algorithm>
#include <cassert>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
//-------------------- Modulo --------------------//
#def... | insert | 69 | 69 | 69 | 74 | 0 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
const ll mod = 1e9 + 7;
const int maxn = 1e6 + 7;
ll fac[maxn];
ll inv[maxn];
ll C(int m, int n) {
if (m > n)
return -1;
return fac[n] * inv[m] % mod * inv[n - m] % mod;
}
ll quick_mod(ll a, ll m) {
ll tmp = a % mod;
ll ans = 1;
while (m) ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
const ll mod = 1e9 + 7;
const int maxn = 1e6 + 7;
ll fac[maxn];
ll inv[maxn];
ll C(int m, int n) {
if (m > n)
return -1;
return fac[n] * inv[m] % mod * inv[n - m] % mod;
}
ll quick_mod(ll a, ll m) {
ll tmp = a % mod;
ll ans = 1;
while (m) ... | replace | 42 | 43 | 42 | 46 | 0 | |
p02862 | C++ | Runtime Error |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MOD = 1e9 + 7;
const int N = 1e6 + 5;
int x, y;
ll fac[N], inv[N];
ll power(ll a, ll b) {
ll res = 1;
while (b) {
if (b & 1) {
res = (res * a) % MOD;
}
a = a * a % MOD;
b >>= 1;
}
return res;
}
void init() {... |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MOD = 1e9 + 7;
const int N = 1e6 + 5;
int x, y;
ll fac[N], inv[N];
ll power(ll a, ll b) {
ll res = 1;
while (b) {
if (b & 1) {
res = (res * a) % MOD;
}
a = a * a % MOD;
b >>= 1;
}
return res;
}
void init() {... | insert | 47 | 47 | 47 | 51 | 0 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef pair<int, int> pii;
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define fi first
#define se second
#define debug(x) \
do { ... | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef pair<int, int> pii;
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define fi first
#define se second
#define debug(x) \
do { ... | insert | 98 | 98 | 98 | 100 | 0 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = int64_t;
using Vi = vector<int>;
using Vl = vector<ll>;
using Pii = pair<int, int>;
using Pll = pair<ll, ll>;
constexpr int I_INF = INT_MAX;
constexpr ll L_INF = LLONG_MAX;
//===
constexpr int64_t MOD = static_cast<int64_t>(1e9 + 7);
// ModInt
//
// 宣言:
// ... | #include <bits/stdc++.h>
using namespace std;
using ll = int64_t;
using Vi = vector<int>;
using Vl = vector<ll>;
using Pii = pair<int, int>;
using Pll = pair<ll, ll>;
constexpr int I_INF = INT_MAX;
constexpr ll L_INF = LLONG_MAX;
//===
constexpr int64_t MOD = static_cast<int64_t>(1e9 + 7);
// ModInt
//
// 宣言:
// ... | insert | 192 | 192 | 192 | 198 | 0 | |
p02862 | C++ | Runtime Error | #include <algorithm>
#include <bits/stdc++.h>
#include <bitset>
#include <cmath>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
#define ll long long
#define itn int
#define co(ans) cout << ans << endl;
#define COYE cout << "YES" << endl;
#define COYe cout << "Yes" << endl;
#define COye cout <<... | #include <algorithm>
#include <bits/stdc++.h>
#include <bitset>
#include <cmath>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
#define ll long long
#define itn int
#define co(ans) cout << ans << endl;
#define COYE cout << "YES" << endl;
#define COYe cout << "Yes" << endl;
#define COye cout <<... | replace | 41 | 42 | 41 | 42 | 0 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops,no-stack-protector")
#pragma GCC target("sse,sse2,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define watch(x) cout << (#x) << " is " << (x) << endl
#define debug cout << "hi" << endl
using namespace std;
typedef long long ll;
typedef long double ld;
typedef ... | #include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops,no-stack-protector")
#pragma GCC target("sse,sse2,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define watch(x) cout << (#x) << " is " << (x) << endl
#define debug cout << "hi" << endl
using namespace std;
typedef long long ll;
typedef long double ld;
typedef ... | replace | 48 | 49 | 48 | 49 | 0 | |
p02862 | C++ | Runtime Error | #include <algorithm>
#include <cstring>
#include <iostream>
#include <vector>
using namespace std;
long long f[1000000], rf[1000000];
long long mod = 1000000007;
long long inv(long long x) {
long long res = 1;
long long k = mod - 2;
long long y = x;
while (k) {
if (k & 1)
res = (res * y) % mod;
... | #include <algorithm>
#include <cstring>
#include <iostream>
#include <vector>
using namespace std;
long long f[1000000], rf[1000000];
long long mod = 1000000007;
long long inv(long long x) {
long long res = 1;
long long k = mod - 2;
long long y = x;
while (k) {
if (k & 1)
res = (res * y) % mod;
... | replace | 41 | 42 | 41 | 42 | 0 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef vector<char> vc;
typedef vector<ll> vll;
typedef vector<vector<int>> vvi;
typedef vector<vector<string>> vvs;
typedef vector<vector<char>> vvc;
typedef vector<vector<bo... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef vector<char> vc;
typedef vector<ll> vll;
typedef vector<vector<int>> vvi;
typedef vector<vector<string>> vvs;
typedef vector<vector<char>> vvc;
typedef vector<vector<bo... | replace | 71 | 72 | 71 | 72 | 0 | |
p02862 | C++ | Runtime Error | #include <iostream>
#include <vector>
#define MOD 1000000007
using namespace std;
int X, Y;
uint64_t mod_power(uint64_t x, uint64_t y) {
uint64_t result = 1;
while (y > 0) {
if (y & 1) {
result = (result * x) % MOD;
}
y = y >> 1;
x = (x * x) % MOD;
}
return result;
}
uint64_t mod_i... | #include <iostream>
#include <vector>
#define MOD 1000000007
using namespace std;
int X, Y;
uint64_t mod_power(uint64_t x, uint64_t y) {
uint64_t result = 1;
while (y > 0) {
if (y & 1) {
result = (result * x) % MOD;
}
y = y >> 1;
x = (x * x) % MOD;
}
return result;
}
uint64_t mod_i... | replace | 41 | 50 | 41 | 43 | 0 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; ++i)
using namespace std;
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>
#define rep(i, n) for (int i = 0; i < n; ++i)
using namespace std;
typedef long long ll;
const int MAX = 10000000;
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;
#define CPP_STR(x) CPP_STR_I(x)
#define CPP_CAT(x, y) CPP_CAT_I(x, y)
#define CPP_STR_I(args...) #args
#define CPP_CAT_I(x, y) x##y
using i8 = int8_t;
using u8 = uint8_t;
using i16 = int16_t;
using u16 = uint16_t;
using i32 = int32_t;
using u32 = uint32_t;
using i64 = int... | #include <bits/stdc++.h>
using namespace std;
#define CPP_STR(x) CPP_STR_I(x)
#define CPP_CAT(x, y) CPP_CAT_I(x, y)
#define CPP_STR_I(args...) #args
#define CPP_CAT_I(x, y) x##y
using i8 = int8_t;
using u8 = uint8_t;
using i16 = int16_t;
using u16 = uint16_t;
using i32 = int32_t;
using u32 = uint32_t;
using i64 = int... | replace | 194 | 195 | 194 | 200 | 0 | |
p02862 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
int main() {
using namespace std;
unsigned long X, Y;
cin >> X >> Y;
if ((X + Y) % 3)
return 0 & puts("0");
{
unsigned long k{(X + Y) / 3};
X -= k;
Y -= k;
}
unsigned long N{X + Y}, d{1}, n{1};
constexpr unsigned long MOD = 1000000007;
for (unsigned long i = 0... | #include <bits/stdc++.h>
int main() {
using namespace std;
unsigned long X, Y;
cin >> X >> Y;
if ((X + Y) % 3)
return 0 & puts("0");
{
unsigned long k{(X + Y) / 3};
if (X < k || Y < k)
return 0 & puts("0");
X -= k;
Y -= k;
}
unsigned long N{X + Y}, d{1}, n{1};
constexpr unsign... | insert | 10 | 10 | 10 | 12 | TLE | |
p02862 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
typedef int64_t ll;
typedef vector<int64_t> vll;
typedef vector<vll> vvll;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef vector<int> vin;
typedef pair<ll, ll> P;
typedef vector<P> vp;
typedef vector<double> vd;
typedef vector<vd> vvd;
#define FOR(i, a, b) for (i... | #include "bits/stdc++.h"
using namespace std;
typedef int64_t ll;
typedef vector<int64_t> vll;
typedef vector<vll> vvll;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef vector<int> vin;
typedef pair<ll, ll> P;
typedef vector<P> vp;
typedef vector<double> vd;
typedef vector<vd> vvd;
#define FOR(i, a, b) for (i... | replace | 44 | 45 | 44 | 45 | 0 | |
p02862 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
#define int int64_t
#define mp make_pair
#define f first
#define s second
#define mod 1000 * 1000 * 1000 + 7
int dp[1000001];
int power(int a, int b) {
int ans = 1;
while (b > 0) {
if (b & 1) {
ans *= a;
ans %= mod;
b--;
}
b /= 2;
a *= ... | #include "bits/stdc++.h"
using namespace std;
#define int int64_t
#define mp make_pair
#define f first
#define s second
#define mod 1000 * 1000 * 1000 + 7
int dp[1000001];
int power(int a, int b) {
int ans = 1;
while (b > 0) {
if (b & 1) {
ans *= a;
ans %= mod;
b--;
}
b /= 2;
a *= ... | replace | 42 | 44 | 42 | 44 | 0 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
int frac(int n) {
if (!n)
return 1;
int64_t ret = (int64_t)n * frac(n - 1);
return ret % mod;
}
int modinv(int i) {
int64_t x = 1, y = 0, z = 0, w = 1;
int m = mod;
while (m > 0) {
int q = i / m, r = i % m;
int64_t temp1... | #include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
int frac(int n) {
if (!n)
return 1;
int64_t ret = (int64_t)n * frac(n - 1);
return ret % mod;
}
int modinv(int i) {
int64_t x = 1, y = 0, z = 0, w = 1;
int m = mod;
while (m > 0) {
int q = i / m, r = i % m;
int64_t temp1... | insert | 47 | 47 | 47 | 48 | 0 | |
p02862 | C++ | Runtime Error | #pragma GCC optimize("O3")
#include <algorithm>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unordered_map>
#include <unordered_set>
using namespace std;
using QWORD = uint64... | #pragma GCC optimize("O3")
#include <algorithm>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unordered_map>
#include <unordered_set>
using namespace std;
using QWORD = uint64... | insert | 282 | 282 | 282 | 291 | 0 | |
p02862 | C++ | Time Limit Exceeded | // 解説前
#include <cstdint>
#include <iostream>
#include <vector>
// x^y (mod m)を計算する
// 参考:https://stackoverflow.com/questions/8496182/calculating-powa-b-mod-n
template <typename T> T pow(T x, T y, T m) noexcept {
T r = 1;
while (y > 0) {
// 指数のiビット目を見て、xの2^i乗をかける
if (y & 1) {
r *= x;
if (r >= m... | // 解説前
#include <cstdint>
#include <iostream>
#include <vector>
// x^y (mod m)を計算する
// 参考:https://stackoverflow.com/questions/8496182/calculating-powa-b-mod-n
template <typename T> T pow(T x, T y, T m) noexcept {
T r = 1;
while (y > 0) {
// 指数のiビット目を見て、xの2^i乗をかける
if (y & 1) {
r *= x;
if (r >= m... | insert | 30 | 30 | 30 | 33 | TLE | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
using namespace std;
ll fac[1000010];
ll binpow(ll a, ll b, ll MOD) {
ll res = 1;
a %= MOD;
while (b > 0) {
if (b & 1)
res = res * a % MOD;
a = a * a % MOD;
b >>= 1;
}
return res;
}
void cal_fac(ll n, ll MOD) {
fac[0] = 1;
for (ll i = 1; i <=... | #include <bits/stdc++.h>
#define ll long long
using namespace std;
ll fac[1000010];
ll binpow(ll a, ll b, ll MOD) {
ll res = 1;
a %= MOD;
while (b > 0) {
if (b & 1)
res = res * a % MOD;
a = a * a % MOD;
b >>= 1;
}
return res;
}
void cal_fac(ll n, ll MOD) {
fac[0] = 1;
for (ll i = 1; i <=... | replace | 37 | 38 | 37 | 41 | 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>;
using pll = pair<ll, ll>;
using pull = pair<ull, ll>;
#define INF 1000000000
#define LLINF 10000000000000000ll
#define MOD 1000000007LL
bool dbgflag = false;
ll modPow(ll a, ll n, ll p) {
... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using pull = pair<ull, ll>;
#define INF 1000000000
#define LLINF 10000000000000000ll
#define MOD 1000000007LL
bool dbgflag = false;
ll modPow(ll a, ll n, ll p) {
... | insert | 34 | 34 | 34 | 38 | 0 | |
p02862 | C++ | Runtime Error | // -----------------------------------
// author : MatsuTaku
// country : Japan
// created : 06/11/20 21:59:34
// -----------------------------------
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <typename T, T MOD> class modular {
private:
T val_;
public:
constexpr modular() ... | // -----------------------------------
// author : MatsuTaku
// country : Japan
// created : 06/11/20 21:59:34
// -----------------------------------
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <typename T, T MOD> class modular {
private:
T val_;
public:
constexpr modular() ... | replace | 105 | 106 | 105 | 107 | 0 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
#define fi first
#define se second
#define mp make_pair
#define pb push_back
using namespace std;
typedef long long ll;
const int maxn = 1e6 + 5;
const int mod = 1e9 + 7;
int fact[maxn], ifact[maxn];
void addmod(int &a, int b) {
a += b;
if (a >= mod)
a -= mod;
if (a < 0)
a +=... | #include <bits/stdc++.h>
#define fi first
#define se second
#define mp make_pair
#define pb push_back
using namespace std;
typedef long long ll;
const int maxn = 1e6 + 5;
const int mod = 1e9 + 7;
int fact[maxn], ifact[maxn];
void addmod(int &a, int b) {
a += b;
if (a >= mod)
a -= mod;
if (a < 0)
a +=... | insert | 61 | 61 | 61 | 65 | 0 | |
p02862 | C++ | Runtime Error | // Author: πα
#include <bits/stdc++.h>
using namespace std;
#define long int64_t
const int MOD = 1000000007;
long modexp(long x, long y, long mod = MOD) {
long res = 1;
x = (x % mod + mod) % mod;
while (y) {
if (y & 1)
res = (res * x) % mod;
y >>= 1;
x = (x * x) % mod;
}
return res;
}
int... | // Author: πα
#include <bits/stdc++.h>
using namespace std;
#define long int64_t
const int MOD = 1000000007;
long modexp(long x, long y, long mod = MOD) {
long res = 1;
x = (x % mod + mod) % mod;
while (y) {
if (y & 1)
res = (res * x) % mod;
y >>= 1;
x = (x * x) % mod;
}
return res;
}
int... | replace | 26 | 27 | 26 | 29 | 0 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
long long int dizi[10000005];
long long int hizlius(long long int a, long long int b) {
if (b == 0) {
return 1;
}
if (b == 1) {
return a;
}
long long int kl = hizlius(a, b / 2);
if (b % 2 == 0) {
return (kl * kl) % MOD;
}... | #include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
long long int dizi[10000005];
long long int hizlius(long long int a, long long int b) {
if (b == 0) {
return 1;
}
if (b == 1) {
return a;
}
long long int kl = hizlius(a, b / 2);
if (b % 2 == 0) {
return (kl * kl) % MOD;
}... | insert | 43 | 43 | 43 | 47 | 0 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
long long mod = 1e9 + 7;
long long inv[3000001];
long long fac[3000001];
long long facinv[3000001];
int main() {
int x, y;
cin >> x >> y;
if ((2 * y - x) % 3 != 0 || (2 * x - y) % 3 != 0) {
cout << 0 << endl;
} else {
int a = (2 * y - x) / 3;
int b = (2... | #include <bits/stdc++.h>
using namespace std;
long long mod = 1e9 + 7;
long long inv[3000001];
long long fac[3000001];
long long facinv[3000001];
int main() {
int x, y;
cin >> x >> y;
if ((2 * y - x) % 3 != 0 || (2 * x - y) % 3 != 0) {
cout << 0 << endl;
} else {
int a = (2 * y - x) / 3;
int b = (2... | insert | 15 | 15 | 15 | 20 | 0 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define debug(x) cout << #x << " " << x << endl;
const int P = 1e9 + 7;
const int N = 1e6 + 5;
const double eps = 1e-9;
const int INF = 1e18;
int X, Y;
int fac[N], I[N], inv[N];
void Init() {
fac[0] = I[0] = inv[0] = 1, fac[1] = I[1] = inv[1] = 1... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define debug(x) cout << #x << " " << x << endl;
const int P = 1e9 + 7;
const int N = 1e6 + 5;
const double eps = 1e-9;
const int INF = 1e18;
int X, Y;
int fac[N], I[N], inv[N];
void Init() {
fac[0] = I[0] = inv[0] = 1, fac[1] = I[1] = inv[1] = 1... | insert | 43 | 43 | 43 | 47 | 0 | |
p02862 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rrep(ri, n) for (int ri = (int)(n - 1); ri >= 0; ri--)
#define rep2(i, x, n) for (int i = (int)(x); i < (int)(n); i++)
#define rrep2(ri, x, n) for (int ri = (int)(n - 1); ri >= (int)(x); ri--)
#define repit(itr, x) for (auto itr = x.b... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rrep(ri, n) for (int ri = (int)(n - 1); ri >= 0; ri--)
#define rep2(i, x, n) for (int i = (int)(x); i < (int)(n); i++)
#define rrep2(ri, x, n) for (int ri = (int)(n - 1); ri >= (int)(x); ri--)
#define repit(itr, x) for (auto itr = x.b... | insert | 81 | 81 | 81 | 85 | TLE | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define per(i, n) for (int i = n - 1; i >= 0; i--)
typedef long long ll;
typedef pair<int, int> P;
typedef pair<long long, long long> Pll;
typedef vector<int> vi;
typedef vector<ll> vll;
const long long mod = 1000000007LL;
ll f... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define per(i, n) for (int i = n - 1; i >= 0; i--)
typedef long long ll;
typedef pair<int, int> P;
typedef pair<long long, long long> Pll;
typedef vector<int> vi;
typedef vector<ll> vll;
const long long mod = 1000000007LL;
ll f... | replace | 19 | 20 | 19 | 20 | -11 | |
p02862 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <complex>
#include <cstdlib>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
using Int = long long;
Int INF = 1LL << 60;
const Int MOD = 1... | #include <algorithm>
#include <cmath>
#include <complex>
#include <cstdlib>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
using Int = long long;
Int INF = 1LL << 60;
const Int MOD = 1... | insert | 108 | 108 | 108 | 110 | TLE | |
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;
typedef pair<ll, ll> P;
#define MOD 1000000007
const int MAX = 510000;
ll gcd(ll a, ll b) { return (b == 0) ? a : gcd(b, a % b); }
long long fac[MAX], finv[MAX], inv[MAX];
// テーブルを作る前処理
void COMinit() {... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
typedef long long ll;
typedef pair<ll, ll> P;
const int MOD = 1000000007;
const int MAX = 5100000;
ll gcd(ll a, ll b) { return (b == 0) ? a : gcd(b, a % b); }
long long fac[MAX], finv[MAX], inv[MAX];
// テーブルを作る前処理
void COMin... | replace | 5 | 7 | 5 | 7 | 0 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
#define ll long long
#define dd double
#define MOD 1000000007
#define nl cout << endl
#define rt ll Q[100005] = {0}
#define mp make_pair
#define test() \
... | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
#define ll long long
#define dd double
#define MOD 1000000007
#define nl cout << endl
#define rt ll Q[100005] = {0}
#define mp make_pair
#define test() \
... | replace | 49 | 50 | 49 | 50 | 0 | |
p02862 | C++ | Runtime Error | #include <algorithm>
#include <array>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <limits>
#include <numeric>
#include <queue>
#include <regex>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
using ll = long long;
int main() {
ll X, ... | #include <algorithm>
#include <array>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <limits>
#include <numeric>
#include <queue>
#include <regex>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
using ll = long long;
int main() {
ll X, ... | insert | 27 | 27 | 27 | 31 | 0 | |
p02862 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <complex>
#include <functional>
#include <iostream>
#include <limits.h>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <unordered_map>
#include <unordered... | #include <algorithm>
#include <cmath>
#include <complex>
#include <functional>
#include <iostream>
#include <limits.h>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <unordered_map>
#include <unordered... | replace | 509 | 510 | 509 | 510 | 0 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int add(int a, int b) {
int s = a + b;
if (s >= mod)
s -= mod;
return s;
}
int mul(int a, int b) { return (long long)a * b % mod; }
int pow(int b, int e) {
int r = 1;
while (e > 0) {
if (e & 1) {
r = mul(r, b);
}
... | #include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int add(int a, int b) {
int s = a + b;
if (s >= mod)
s -= mod;
return s;
}
int mul(int a, int b) { return (long long)a * b % mod; }
int pow(int b, int e) {
int r = 1;
while (e > 0) {
if (e & 1) {
r = mul(r, b);
}
... | replace | 43 | 44 | 43 | 44 | 0 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
#define all(x) begin(x), end(x)
#define dbg(x) cerr << #x << " = " << x << endl
#define _ << ' ' <<
using namespace std;
using ll = long long;
using vi = vector<int>;
const int mod = 1000000007;
int add(int a, int b) { return (a += b) < mod ? a : a - mod; }
int sub(int a, int b) { return (a -=... | #include <bits/stdc++.h>
#define all(x) begin(x), end(x)
#define dbg(x) cerr << #x << " = " << x << endl
#define _ << ' ' <<
using namespace std;
using ll = long long;
using vi = vector<int>;
const int mod = 1000000007;
int add(int a, int b) { return (a += b) < mod ? a : a - mod; }
int sub(int a, int b) { return (a -=... | insert | 49 | 49 | 49 | 51 | 0 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll MM = 1000000000;
ll mod = MM + 7;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define Rep(i, j, n) for (int i = j; i < n; i++)
#define all(vec) vec.begin(), vec.end()
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll MM = 1000000000;
ll mod = MM + 7;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define Rep(i, j, n) for (int i = j; i < n; i++)
#define all(vec) vec.begin(), vec.end()
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;... | insert | 38 | 38 | 38 | 42 | 0 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
using namespace std;
const ll mod = 1e9 + 7;
ll x, y, a, b, fact[2000010];
ll power(ll a, ll b = mod - 2) {
ll ans = 1;
while (b) {
if (b & 1)
ans = ans * a % mod;
a = a * a % mod;
b >>= 1;
}
return ans;
}
void init(ll n) {
fact[0] = 1;
for (ll... | #include <bits/stdc++.h>
#define ll long long
using namespace std;
const ll mod = 1e9 + 7;
ll x, y, a, b, fact[2000010];
ll power(ll a, ll b = mod - 2) {
ll ans = 1;
while (b) {
if (b & 1)
ans = ans * a % mod;
a = a * a % mod;
b >>= 1;
}
return ans;
}
void init(ll n) {
fact[0] = 1;
for (ll... | replace | 29 | 30 | 29 | 30 | 0 | |
p02862 | C++ | Runtime Error | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <cctype>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_map>
#in... | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <cctype>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_map>
#in... | insert | 89 | 89 | 89 | 90 | 0 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (ll i = 0; i < (ll)n; ++i)
using P = pair<ll, ll>;
const ll MOD = 1000000007;
// nのcnt乗
ll pow2(ll n, ll cnt) {
if (cnt == 0)
return 1;
if (cnt == 1)
return n;
ll tmp = pow2(n, cnt / 2);
if (cnt % 2 == 0)
ret... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (ll i = 0; i < (ll)n; ++i)
using P = pair<ll, ll>;
const ll MOD = 1000000007;
// nのcnt乗
ll pow2(ll n, ll cnt) {
if (cnt == 0)
return 1;
if (cnt == 1)
return n;
ll tmp = pow2(n, cnt / 2);
if (cnt % 2 == 0)
ret... | insert | 45 | 45 | 45 | 49 | 0 | |
p02862 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
#define int ll
#define fi first
#define se second
#define SORT(a) sort(a.begin(), a.end())
#define rep(i, n) for (int i = 0; i < (n); i++)
#define REP(i, n) for (int i = 0; i < (n); i++)
#define MP(a, b) make_pair(a, b)
#define... | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
#define int ll
#define fi first
#define se second
#define SORT(a) sort(a.begin(), a.end())
#define rep(i, n) for (int i = 0; i < (n); i++)
#define REP(i, n) for (int i = 0; i < (n); i++)
#define MP(a, b) make_pair(a, b)
#define... | replace | 53 | 54 | 53 | 54 | 0 | |
p02862 | C++ | Memory Limit Exceeded | #include <algorithm>
#include <climits>
#include <cstring>
#include <iostream>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define rep(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define all(x) (x).begin(), (x).end()
#define MEMSET(v, h) memset((v)... | #include <algorithm>
#include <climits>
#include <cstring>
#include <iostream>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define rep(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define all(x) (x).begin(), (x).end()
#define MEMSET(v, h) memset((v)... | replace | 18 | 19 | 18 | 19 | MLE | |
p02862 | C++ | Runtime Error | #include <algorithm>
#include <complex>
#include <cstdio>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <string.h>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < (int)n; i++)
using namespace std;
typedef long long ll;
typedef ... | #include <algorithm>
#include <complex>
#include <cstdio>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <string.h>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < (int)n; i++)
using namespace std;
typedef long long ll;
typedef ... | insert | 70 | 70 | 70 | 74 | 0 | |
p02862 | C++ | Runtime Error | // includes
#include "bits/stdc++.h"
using namespace std;
// macros
#define ll long long
#define MOD 1000000007 // 998244353 //100000000 //
#define pii pair<ll, ll>
#define piii pair<ll, pii>
#define sz(x) ((ll)(x).size())
#define ft first
#define sd second
#define pb push_back
#define rep(i, n) for (ll i = 0; i < n; ... | // includes
#include "bits/stdc++.h"
using namespace std;
// macros
#define ll long long
#define MOD 1000000007 // 998244353 //100000000 //
#define pii pair<ll, ll>
#define piii pair<ll, pii>
#define sz(x) ((ll)(x).size())
#define ft first
#define sd second
#define pb push_back
#define rep(i, n) for (ll i = 0; i < n; ... | replace | 164 | 165 | 164 | 165 | 0 | |
p02862 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll i, j;
ll x, y;
cin >> x >> y;
if ((x + y) % 3) {
cout << 0 << endl;
return 0;
}
ll max_number = (x + y) / 3;
int MOD = 1e9 + 7;
ll l = x - max_number;
vector<ll> fac(max_number + 1, 1);
vector<ll> inv(max... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll i, j;
ll x, y;
cin >> x >> y;
if ((x + y) % 3) {
cout << 0 << endl;
return 0;
}
ll max_number = (x + y) / 3;
int MOD = 1e9 + 7;
ll l = x - max_number;
ll k = y - max_number;
if (l < 0 || k < 0) {
cout ... | replace | 17 | 18 | 17 | 22 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.