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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p02631 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#define int long long
#define rr register
#define inf 1e9
#define MAXN 1010
using namespace std;
inline int read() {
int s = 0, f = 0;
char ch = getchar();
while (!isdigit(ch))
f |= ch == '-', ... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#define int long long
#define rr register
#define inf 1e9
#define MAXN 200010
using namespace std;
inline int read() {
int s = 0, f = 0;
char ch = getchar();
while (!isdigit(ch))
f |= ch == '-'... | replace | 11 | 12 | 11 | 12 | 0 | |
p02631 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define all(x) x.begin(), x.end()
#define vi vector<int>
#define vll vector<ll>
#define print(x) \
for (auto it = x.begin(); it != x.end(); it++) ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define all(x) x.begin(), x.end()
#define vi vector<int>
#define vll vector<ll>
#define print(x) \
for (auto it = x.begin(); it != x.end(); it++) ... | replace | 34 | 45 | 34 | 43 | TLE | |
p02631 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int mas[100000], input[100000];
int main() {
int n, p, in, pans = 0;
cin >> n >> p;
input[0] = p;
mas[0] = 0;
for (int i = 1; i < n; i++) {
cin >> input[i];
in = input[i];
int k = pans ^ in ^ p;
mas[i] = k;
pans = k;
p = in;
}
int test... | #include <bits/stdc++.h>
using namespace std;
int mas[200005], input[200005];
int main() {
int n, p, in, pans = 0;
cin >> n >> p;
input[0] = p;
mas[0] = 0;
for (int i = 1; i < n; i++) {
cin >> input[i];
in = input[i];
int k = pans ^ in ^ p;
mas[i] = k;
pans = k;
p = in;
}
int test... | replace | 3 | 4 | 3 | 4 | 0 | |
p02631 | C++ | Time Limit Exceeded | #include "bits/stdc++.h"
#define DEBUG(x) cout << #x << ": " << x << endl;
#define DEBUG_VEC(v) \
cout << #v << ":"; \
for (int i = 0; i < v.size(); i++) \
... | #include "bits/stdc++.h"
#define DEBUG(x) cout << #x << ": " << x << endl;
#define DEBUG_VEC(v) \
cout << #v << ":"; \
for (int i = 0; i < v.size(); i++) \
... | replace | 35 | 43 | 35 | 42 | TLE | |
p02631 | C++ | Runtime Error | // BISMILLAHIR RAHMANIR RAHIM
#include <bits/stdc++.h>
#define mem(a, b) (memset(a, b, sizeof(a)))
#define pb push_back
#define mk make_pair
#define ff first
#define ss second
#define PI acos(-1)
#define INF 2147483647
#define MOD 1000000007
#define MAX 100005
using namespace std;
typedef long long ll;
typedef vector<... | // BISMILLAHIR RAHMANIR RAHIM
#include <bits/stdc++.h>
#define mem(a, b) (memset(a, b, sizeof(a)))
#define pb push_back
#define mk make_pair
#define ff first
#define ss second
#define PI acos(-1)
#define INF 2147483647
#define MOD 1000000007
#define MAX 200005
using namespace std;
typedef long long ll;
typedef vector<... | replace | 10 | 11 | 10 | 11 | 0 | |
p02631 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <map>
using namespace std;
#define ll long long
map<int, int> mo;
const int maxn = 1e5 + 5;
int a[maxn], b[maxn];
int main() {
int n;
cin >> n;
for (int i = 0; i < n; i++)
cin >> a[i];
int xsum = a[0];
for (int i = 1; i < n; i++) {
xsum ^= a[i];
}
... | #include <algorithm>
#include <iostream>
#include <map>
using namespace std;
#define ll long long
map<int, int> mo;
const int maxn = 2e5 + 5;
int a[maxn], b[maxn];
int main() {
int n;
cin >> n;
for (int i = 0; i < n; i++)
cin >> a[i];
int xsum = a[0];
for (int i = 1; i < n; i++) {
xsum ^= a[i];
}
... | replace | 6 | 7 | 6 | 7 | 0 | |
p02631 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, a, n) for (int i = a; i < n; i++)
#define per(i, a, n) for (int i = n - 1; i >= a; i--)
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define fi first
#define se second
#define SZ(x) ((int)(x).size())
#define INF 0x3f3f3f3f
t... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, a, n) for (int i = a; i < n; i++)
#define per(i, a, n) for (int i = n - 1; i >= a; i--)
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define fi first
#define se second
#define SZ(x) ((int)(x).size())
#define INF 0x3f3f3f3f
t... | replace | 30 | 31 | 30 | 31 | 0 | |
p02631 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
template <typename T> inline void read(T &x) {
x = 0;
T f = 1;
char c = getchar();
for (; !isdigit(c); c = getchar())
if (c == '-')
f = -1;
for (; isdigit(c); c = getchar())
x = (x << 1) + (x << 3) + (c ^ 48);
x *= f;
}
template <typename T> inline... | #include <bits/stdc++.h>
using namespace std;
template <typename T> inline void read(T &x) {
x = 0;
T f = 1;
char c = getchar();
for (; !isdigit(c); c = getchar())
if (c == '-')
f = -1;
for (; isdigit(c); c = getchar())
x = (x << 1) + (x << 3) + (c ^ 48);
x *= f;
}
template <typename T> inline... | replace | 26 | 27 | 26 | 27 | 0 | |
p02631 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<ll, ll> p;
vector<ll> v;
ll arr[100001] = {0};
int main() {
ll n, k, a, b, c, ans = 0;
cin >> n;
for (ll i = 0; i < n; i++) {
cin >> arr[i];
ans ^= arr[i];
}
// cout<<arr[1]<<endl;
for (ll i = 0; i < n; i++) {
... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<ll, ll> p;
vector<ll> v;
ll arr[200001];
int main() {
ll n, k, a, b, c, ans = 0;
cin >> n;
for (ll i = 0; i < n; i++) {
cin >> arr[i];
ans ^= arr[i];
}
// cout<<arr[1]<<endl;
for (ll i = 0; i < n; i++) {
b = a... | replace | 5 | 6 | 5 | 6 | 0 | |
p02631 | C++ | Time Limit Exceeded | /* https://codeforces.com/contest/1360/problem/H */
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vs = vector<string>;
using vi = vector<int>;
using vl = vector<ll>;
using vb = vector<bool>;
using pi = pair<int, int>;
using pl = pair<ll, ll>;
using vpi = vector<pair<int, int>>;
using vpl = ... | /* https://codeforces.com/contest/1360/problem/H */
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vs = vector<string>;
using vi = vector<int>;
using vl = vector<ll>;
using vb = vector<bool>;
using pi = pair<int, int>;
using pl = pair<ll, ll>;
using vpi = vector<pair<int, int>>;
using vpl = ... | insert | 48 | 48 | 48 | 53 | TLE | |
p02631 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <iostream>
#include <vector>
using ll = long long;
#define rep(i, n) for (ll i = 0; i < (n); i++)
using namespace std;
int main() {
ll n;
cin >> n;
vector<ll> a(n);
vector<ll> x(20, 0);
ll maxNum = 0;
rep(i, n) {
cin >> a[i];
ll now = a[i];
ll s = ... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <vector>
using ll = long long;
#define rep(i, n) for (ll i = 0; i < (n); i++)
using namespace std;
int main() {
ll n;
cin >> n;
vector<ll> a(n);
vector<ll> x(60, 0);
ll maxNum = 0;
rep(i, n) {
cin >> a[i];
ll now = a[i];
ll s = ... | replace | 12 | 13 | 12 | 13 | 0 | |
p02631 | C++ | Runtime Error | #include <bits/stdc++.h>
#define MEM 100006
#define sanic ios_base::sync_with_stdio(0)
#define pb push_back
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pii;
const ll MOD = 1e9 + 7;
ll n, m, sum;
ll c[MEM];
string s;
int main() {
sanic;
cin.tie(0);
cin >> n;
ll sxm = 0;
for (int i = 0; i < ... | #include <bits/stdc++.h>
#define MEM 200006
#define sanic ios_base::sync_with_stdio(0)
#define pb push_back
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pii;
const ll MOD = 1e9 + 7;
ll n, m, sum;
ll c[MEM];
string s;
int main() {
sanic;
cin.tie(0);
cin >> n;
ll sxm = 0;
for (int i = 0; i < ... | replace | 1 | 2 | 1 | 2 | 0 | |
p02631 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define LL long long
#define ULL unsigned long long
const LL INF = 1LL << 59;
const double PI = 2.0 * acos(0.0);
typedef pair<int, int> pii;
typedef pair<LL, LL> pll;
typedef vector<int> vi;
typedef vector<LL> vl;
typedef vector<pii> vii;
typedef vector<... | #include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define LL long long
#define ULL unsigned long long
const LL INF = 1LL << 59;
const double PI = 2.0 * acos(0.0);
typedef pair<int, int> pii;
typedef pair<LL, LL> pll;
typedef vector<int> vi;
typedef vector<LL> vl;
typedef vector<pii> vii;
typedef vector<... | replace | 118 | 119 | 118 | 119 | 0 | |
p02631 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, ar[100000];
cin >> n;
long x = 0;
for (int i = 0; i < n; i++) {
cin >> ar[i];
x ^= ar[i];
}
for (int i = 0; i < n; i++) {
ar[i] ^= x;
}
for (int i = 0; i < n; i++)
cout << ar[i] << " ";
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int n, ar[200000];
cin >> n;
long x = 0;
for (int i = 0; i < n; i++) {
cin >> ar[i];
x ^= ar[i];
}
for (int i = 0; i < n; i++) {
ar[i] ^= x;
}
for (int i = 0; i < n; i++)
cout << ar[i] << " ";
return 0;
}
| replace | 3 | 4 | 3 | 4 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
#define PI 3.14159265358979323846
#define MAXINF (1e18L)
#define INF (1e9L)
#define EPS (1e-9)
#define MOD ((ll)(1e9 + 7))
#define REP(i, n) for (int i = 0; i < int(n); ++i)
#define Rep(i, sta, n) for (int i = sta; i < n; i++)
#define RREP(i, n) for (int i = int(n) - 1; i >= 0; --i)
#define ALL... | #include <bits/stdc++.h>
#define PI 3.14159265358979323846
#define MAXINF (1e18L)
#define INF (1e9L)
#define EPS (1e-9)
#define MOD ((ll)(1e9 + 7))
#define REP(i, n) for (int i = 0; i < int(n); ++i)
#define Rep(i, sta, n) for (int i = sta; i < n; i++)
#define RREP(i, n) for (int i = int(n) - 1; i >= 0; --i)
#define ALL... | replace | 113 | 114 | 113 | 114 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> //required
#include <ext/pb_ds/tree_policy.hpp> //required
#define pb push_back
#define pf push_front
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define sz(x) (long long)(x).size()
#define sqr(x) (x) * (x)
#define ... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> //required
#include <ext/pb_ds/tree_policy.hpp> //required
#define pb push_back
#define pf push_front
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define sz(x) (long long)(x).size()
#define sqr(x) (x) * (x)
#define ... | replace | 19 | 20 | 19 | 20 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int64_t MAX = 1e+6 + 10;
const int64_t MOD = 1000000007;
int64_t fac[MAX], finv[MAX], inv[MAX];
// テーブルを作る前処理
void COMinit() {
fac[0] = fac[1] = 1;
finv[0] = finv[1] = 1;
inv[1] = 1;
for (int64_t i = 2; i < MAX; i++) {
fac[i] = fac[i - 1] * i % MOD;
... | #include <bits/stdc++.h>
using namespace std;
const int64_t MAX = 2e+6 + 10;
const int64_t MOD = 1000000007;
int64_t fac[MAX], finv[MAX], inv[MAX];
// テーブルを作る前処理
void COMinit() {
fac[0] = fac[1] = 1;
finv[0] = finv[1] = 1;
inv[1] = 1;
for (int64_t i = 2; i < MAX; i++) {
fac[i] = fac[i - 1] * i % MOD;
... | replace | 3 | 4 | 3 | 4 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define fir first
#define sec second
#define SZ(a) (int)((a).size())
using namespace std;
typedef long long ll;
typedef double db;
typedef pair<int, int> Pii;
typedef pair<ll, int> Pli;
typedef unsigned long long ull;
const double eps = 1e-8;
const ll i... | #include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define fir first
#define sec second
#define SZ(a) (int)((a).size())
using namespace std;
typedef long long ll;
typedef double db;
typedef pair<int, int> Pii;
typedef pair<ll, int> Pli;
typedef unsigned long long ull;
const double eps = 1e-8;
const ll i... | replace | 16 | 17 | 16 | 17 | 0 | |
p02632 | C++ | Runtime Error | /* Simplicity and Goodness */
#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;
using namespace std;
// typedef tree<int, null_type, less<int>, rb_tree_tag,
// tree_order_statistics_node_update> indexed_set;
void my... | /* Simplicity and Goodness */
#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;
using namespace std;
// typedef tree<int, null_type, less<int>, rb_tree_tag,
// tree_order_statistics_node_update> indexed_set;
void my... | replace | 37 | 38 | 37 | 38 | 0 | |
p02632 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define chmin(x, y) x = min(x, y)
#define chmax(x, y) x = max(x, y)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int inf = 1 << 21;
const ll INF = 1LL << 60;
const ll mod = 1e9 + 7;
const int dx[4] = {-1, 0, 1, 0};
co... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define chmin(x, y) x = min(x, y)
#define chmax(x, y) x = max(x, y)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int inf = 1 << 21;
const ll INF = 1LL << 60;
const ll mod = 1e9 + 7;
const int dx[4] = {-1, 0, 1, 0};
co... | replace | 26 | 27 | 26 | 27 | TLE | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define repr(i, n) for (int i = (n - 1); i >= 0; --i)
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> bool chmin(T &a, const T &b) {
if (b < a)... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define repr(i, n) for (int i = (n - 1); i >= 0; --i)
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> bool chmin(T &a, const T &b) {
if (b < a)... | replace | 106 | 107 | 106 | 107 | 0 | |
p02632 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
long long MOD = 1e9 + 7;
long long fac[2000005], inv[2000005];
long long modpow(long long x, long long e) {
if (x == 1 || e == 0)
return 1;
long long c = modpow(x, e / 2);
long long c1 = (c * c) % MOD;
if (e % 2 == 0)
return c1;
else
return (c1 * x) % ... | #include <bits/stdc++.h>
using namespace std;
long long MOD = 1e9 + 7;
long long fac[2000005], inv[2000005];
long long modpow(long long x, long long e) {
if (x == 1 || e == 0)
return 1;
long long c = modpow(x, e / 2);
long long c1 = (c * c) % MOD;
if (e % 2 == 0)
return c1;
else
return (c1 * x) % ... | replace | 26 | 27 | 26 | 28 | TLE | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> P;
typedef long long ll;
typedef long double ld;
const int inf = 1e9 + 7;
const ll longinf = 1LL << 60;
#define REP(i, m, n) for (int i = (int)(m); i < (int)(n); ++i)
#define rep(i, n) REP(i, 0, n)
#define F first
#define S second
constexpr char ln = ... | #include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> P;
typedef long long ll;
typedef long double ld;
const int inf = 1e9 + 7;
const ll longinf = 1LL << 60;
#define REP(i, m, n) for (int i = (int)(m); i < (int)(n); ++i)
#define rep(i, n) REP(i, 0, n)
#define F first
#define S second
constexpr char ln = ... | replace | 13 | 14 | 13 | 14 | 0 | |
p02632 | C++ | Runtime Error | #include <algorithm>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
using namespace std;
using ll = long long;
using ld = long double;
usi... | #include <algorithm>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
using namespace std;
using ll = long long;
using ld = long double;
usi... | replace | 86 | 87 | 86 | 87 | 0 | |
p02632 | C++ | Runtime Error | typedef long long ll;
typedef long double ld;
#include <bits/stdc++.h>
using namespace std;
const int MAX = 1000010;
const ll 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++) {
f... | typedef long long ll;
typedef long double ld;
#include <bits/stdc++.h>
using namespace std;
const int MAX = 2000010;
const ll 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++) {
f... | replace | 5 | 6 | 5 | 6 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define dub long double
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define ROF(i, a, b) for (int i = (a); i > (b); --i)
#define CASET \
int _T; ... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define dub long double
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define ROF(i, a, b) for (int i = (a); i > (b); --i)
#define CASET \
int _T; ... | replace | 125 | 126 | 125 | 126 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
const long long MOD = 1000000007;
const int MAX = int(1e6) + 5;
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; ... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
const long long MOD = 1000000007;
const int MAX = int(1e6) * 2 + 5;
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 < M... | replace | 6 | 7 | 6 | 7 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define REP(i, m, n) for (int i = (int)(m); i < (int)(n); i++)
#define rep(i, n) REP(i, 0, n)
#define RREP(i, m, n) for (int i = (int)(m); i >= (int)(n); i--)
#define rrep(i, n) RREP(i, n - 1, 0)
#define all(v) v.begin(), v.end()
const int inf = 1e9 + 7... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define REP(i, m, n) for (int i = (int)(m); i < (int)(n); i++)
#define rep(i, n) REP(i, 0, n)
#define RREP(i, m, n) for (int i = (int)(m); i >= (int)(n); i--)
#define rrep(i, n) RREP(i, n - 1, 0)
#define all(v) v.begin(), v.end()
const int inf = 1e9 + 7... | replace | 12 | 13 | 12 | 13 | 0 | |
p02632 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <iostream>
#include <iterator>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <str... | #include <algorithm>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <iostream>
#include <iterator>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <str... | replace | 200 | 204 | 200 | 205 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define rrep(i, n) for (int i = n - 1; i >= 0; i--)
using namespace std;
#define INF ((1 << 30) - 1)
#define LINF (1LL << 60)
#define EPS (1e-10)
typedef long long ll;
typedef pair<ll, ll> P;
const int MOD = 1000000007;
const int MOD2 = 998244353;
... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define rrep(i, n) for (int i = n - 1; i >= 0; i--)
using namespace std;
#define INF ((1 << 30) - 1)
#define LINF (1LL << 60)
#define EPS (1e-10)
typedef long long ll;
typedef pair<ll, ll> P;
const int MOD = 1000000007;
const int MOD2 = 998244353;
... | replace | 12 | 13 | 12 | 13 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
#define endl '\n'
#define fi first
#define se second
#define pb push_back
#define debug(x) cout << "[debug] " << #x << ": " << x << endl
using namespace std;
typedef long long ll;
typedef pair<int, int> PII;
typedef pair<ll, ll> PLL;
const int MOD = 1e9 + 7;
const int maxn = 1e6 + 5;
const int... | #include <bits/stdc++.h>
#define endl '\n'
#define fi first
#define se second
#define pb push_back
#define debug(x) cout << "[debug] " << #x << ": " << x << endl
using namespace std;
typedef long long ll;
typedef pair<int, int> PII;
typedef pair<ll, ll> PLL;
const int MOD = 1e9 + 7;
const int maxn = 2e6 + 5;
const int... | replace | 12 | 13 | 12 | 13 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using lint = long long int;
using P = pair<lint, lint>;
#define FOR(i, begin, end) \
for (int i = (begin), i##_end_ = (end); i < i##_end_; i++)
#define IFOR(i, begin, end) ... | #include <bits/stdc++.h>
using namespace std;
using lint = long long int;
using P = pair<lint, lint>;
#define FOR(i, begin, end) \
for (int i = (begin), i##_end_ = (end); i < i##_end_; i++)
#define IFOR(i, begin, end) ... | replace | 14 | 15 | 14 | 15 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
#define pb push_back
#define fi first
#define se second
#define eb emplace_back
using namespace std;
typedef pair<int, int> ii;
typedef long long ll;
const int N = 1000007, inf = 0x3f3f3f3f;
const int M = 1e9 + 7;
ll fat[N];
ll fast_pow(ll a, ll b) {
ll ans = 1;
while (b) {
if (b ... | #include <bits/stdc++.h>
#define pb push_back
#define fi first
#define se second
#define eb emplace_back
using namespace std;
typedef pair<int, int> ii;
typedef long long ll;
const int N = 2000007, inf = 0x3f3f3f3f;
const int M = 1e9 + 7;
ll fat[N];
ll fast_pow(ll a, ll b) {
ll ans = 1;
while (b) {
if (b ... | replace | 11 | 12 | 11 | 12 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int MAX = 510000;
const ll MOD = 1000000007;
ll 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;
... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int MAX = 2000000;
const ll MOD = 1000000007;
ll 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;
... | replace | 4 | 5 | 4 | 5 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
#define int long long
#define double long double
using namespace std;
const int MOD = 1000000007;
const int INF = 1e15;
using Graph = vector<vector<int>>;
// AのN乗(mod M)を高速に計算する(O(logN))
// Aの逆元を取る場合、modpow(A, MOD-2, MOD)で求まる
long long modpow(long long a, long long n, long long mod) {
long l... | #include <bits/stdc++.h>
#define int long long
#define double long double
using namespace std;
const int MOD = 1000000007;
const int INF = 1e15;
using Graph = vector<vector<int>>;
// AのN乗(mod M)を高速に計算する(O(logN))
// Aの逆元を取る場合、modpow(A, MOD-2, MOD)で求まる
long long modpow(long long a, long long n, long long mod) {
long l... | replace | 21 | 22 | 21 | 22 | 0 | |
p02632 | C++ | Runtime Error | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <complex>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
us... | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <complex>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
us... | replace | 53 | 54 | 53 | 54 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define int long long int
// #define ll int128_t
#define ld long double
#define ff first
#define ss second
#define mp make_pair
#define IOS ... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define int long long int
// #define ll int128_t
#define ld long double
#define ff first
#define ss second
#define mp make_pair
#define IOS ... | replace | 49 | 50 | 49 | 50 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep1(i, n) for (int i = 1; i <= (int)(n); i++)
typedef int64_t Int;
const Int MOD = 1000000007;
const Int MAX = 1000010;
Int fac[MAX], finv[MAX], inv[MAX];
void COMinit() {
fac[0] = fac[1] = 1;
finv[0] = fi... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep1(i, n) for (int i = 1; i <= (int)(n); i++)
typedef int64_t Int;
const Int MOD = 1000000007;
const Int MAX = 2000010;
Int fac[MAX], finv[MAX], inv[MAX];
void COMinit() {
fac[0] = fac[1] = 1;
finv[0] = fi... | replace | 7 | 8 | 7 | 8 | 0 | |
p02632 | Python | Runtime Error | import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10**9)
INF = 1 << 60
MOD = 1000000007
def main():
K = int(readline())
S = readline().strip()
COM_MAX = 10**6
fac, finv, inv = [0] * (COM_MAX + 1), [0] * (COM_MAX + 1), [0] * (COM_MAX... | import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10**9)
INF = 1 << 60
MOD = 1000000007
def main():
K = int(readline())
S = readline().strip()
COM_MAX = 2 * 10**6
fac, finv, inv = [0] * (COM_MAX + 1), [0] * (COM_MAX + 1), [0] * (COM... | replace | 14 | 15 | 14 | 15 | 1 | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02632/Python/s867257816.py", line 49, in <module>
main()
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02632/Python/s867257816.py", line 25, in main
finv[i] = finv[i - 1] * inv[i] %... |
p02632 | Python | Runtime Error | import sys
K = int(sys.stdin.readline())
S = sys.stdin.readline().rstrip("\n")
# ## COMBINATION (MOD) ###
N_MAX = 10**6 # 問題サイズに合わせて変えておく
MOD = 10**9 + 7
inv = [0, 1] # 逆元テーブル計算用テーブル
for i in range(2, N_MAX + 1):
inv.append((-inv[MOD % i] * (MOD // i)) % MOD)
# K 文字追加
ans = 0
ln = len(S)
p1 = 1
p2 = 1
s2 =... | import sys
K = int(sys.stdin.readline())
S = sys.stdin.readline().rstrip("\n")
# ## COMBINATION (MOD) ###
N_MAX = 10**6 # 問題サイズに合わせて変えておく
MOD = 10**9 + 7
inv = [0, 1] # 逆元テーブル計算用テーブル
for i in range(2, N_MAX + 2):
inv.append((-inv[MOD % i] * (MOD // i)) % MOD)
# K 文字追加
ans = 0
ln = len(S)
p1 = 1
p2 = 1
s2 =... | replace | 11 | 12 | 11 | 12 | 0 | |
p02632 | Python | Runtime Error | MOD = 10**9 + 7
K = int(input())
S = input()
N = len(S)
class Combination:
"""
O(n)の前計算を1回行うことで,O(1)でnCr mod mを求められる
n_max = 10**6のとき前処理は約950ms (PyPyなら約340ms, 10**7で約1800ms)
使用例:
comb = Combination(1000000)
print(comb(5, 3)) # 10
"""
def __init__(self, n_max, mod=10**9 + 7):
... | MOD = 10**9 + 7
K = int(input())
S = input()
N = len(S)
class Combination:
"""
O(n)の前計算を1回行うことで,O(1)でnCr mod mを求められる
n_max = 10**6のとき前処理は約950ms (PyPyなら約340ms, 10**7で約1800ms)
使用例:
comb = Combination(1000000)
print(comb(5, 3)) # 10
"""
def __init__(self, n_max, mod=10**9 + 7):
... | replace | 44 | 45 | 44 | 45 | 1 | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02632/Python/s364186313.py", line 46, in <module>
comb = Combination(1000000)
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02632/Python/s364186313.py", line 19, in __init__
self.fa... |
p02632 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <iostream>
#include <queue>
#include <set>
#include <string>
#include <vector>
// #include<bits/stdc++.h>
#define int long long
#define for0(i, n) for (int i = 0; i < (n); i++)
#define for1(i, n) for (int i = 1; i <= (n); i++)
#define mp make_pair
#define all(x) x.begin(),... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <queue>
#include <set>
#include <string>
#include <vector>
// #include<bits/stdc++.h>
#define int long long
#define for0(i, n) for (int i = 0; i < (n); i++)
#define for1(i, n) for (int i = 1; i <= (n); i++)
#define mp make_pair
#define all(x) x.begin(),... | replace | 22 | 23 | 22 | 23 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
#define MOD 1000000007
#define N 200123
#define ll long long
using namespace std;
char cs[N];
int k, n, m;
string s;
ll fat[N], inv_fat[N], p[N], z[N];
ll gcd(ll a, ll b, ll &x, ll &y) {
if (b == 0) {
x = 1;
y = 0;
return a;
}
ll x1, y1;
ll g = gcd(b, a % b, x1, y1);
x ... | #include <bits/stdc++.h>
#define MOD 1000000007
#define N 2000123
#define ll long long
using namespace std;
char cs[N];
int k, n, m;
string s;
ll fat[N], inv_fat[N], p[N], z[N];
ll gcd(ll a, ll b, ll &x, ll &y) {
if (b == 0) {
x = 1;
y = 0;
return a;
}
ll x1, y1;
ll g = gcd(b, a % b, x1, y1);
x... | replace | 2 | 3 | 2 | 3 | 0 | |
p02632 | C++ | Runtime Error | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
template <typename T> bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <typename T> bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
#define rep(i, n) for (int i ... | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
template <typename T> bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <typename T> bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
#define rep(i, n) for (int i ... | replace | 28 | 29 | 28 | 29 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vvvi = vector<vector<vector<int>>>;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
using vvvl = vector<vector<vector<ll>>>;
#define FOR(i, m, n) for (int i ... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vvvi = vector<vector<vector<int>>>;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
using vvvl = vector<vector<vector<ll>>>;
#define FOR(i, m, n) for (int i ... | replace | 125 | 126 | 125 | 126 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
#define MODV 1000000007
#define INFLL LLONG_MAX // 9223372036854775807
#define EPS 1e-9
#define rep(i, n) for (ll i = 0, i##_len = (ll)(n); i < i##_len; i++)
#define repf(i, n) for (ll i = 1, i##_len = (ll)(n + 1); i < i##_len; i++)
#define all(v) v.begin(), v.end()
#define... | #include <bits/stdc++.h>
#define ll long long
#define MODV 1000000007
#define INFLL LLONG_MAX // 9223372036854775807
#define EPS 1e-9
#define rep(i, n) for (ll i = 0, i##_len = (ll)(n); i < i##_len; i++)
#define repf(i, n) for (ll i = 1, i##_len = (ll)(n + 1); i < i##_len; i++)
#define all(v) v.begin(), v.end()
#define... | replace | 146 | 147 | 146 | 147 | 0 | |
p02632 | C++ | Runtime Error | #include <cstdio>
#include <cstring>
using namespace std;
const int md = 1000000007;
const int N = 1000000;
int fact[N + 1], factinv[N + 1];
inline int add(int a, int b) {
a += b;
if (a >= md)
a -= md;
return a;
}
inline int mul(int a, int b) { return (int)((long long)a * b % md); }
inline int po(int a, in... | #include <cstdio>
#include <cstring>
using namespace std;
const int md = 1000000007;
const int N = 2000000;
int fact[N + 1], factinv[N + 1];
inline int add(int a, int b) {
a += b;
if (a >= md)
a -= md;
return a;
}
inline int mul(int a, int b) { return (int)((long long)a * b % md); }
inline int po(int a, in... | replace | 6 | 7 | 6 | 7 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int MOD = 1e9 + 7;
const int MAX_N = 1e6 + 10;
int K;
string S;
ll fact[MAX_N];
ll invf[MAX_N];
ll powmod(ll x, int y) {
ll res = 1;
while (y) {
if (y & 1)
(res *= x) %= MOD;
(x *= x) %= MOD;
y >>= 1;
}
return res;
}
... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int MOD = 1e9 + 7;
const int MAX_N = 2e6 + 10;
int K;
string S;
ll fact[MAX_N];
ll invf[MAX_N];
ll powmod(ll x, int y) {
ll res = 1;
while (y) {
if (y & 1)
(res *= x) %= MOD;
(x *= x) %= MOD;
y >>= 1;
}
return res;
}
... | replace | 5 | 6 | 5 | 6 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define all(x) (x).begin(), (x).end()
typedef vector<bool> vb;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<vector<bool>> vvb;
typedef vector<vector<int>> vvi;
typedef vector<vector<ll>> vvl;
typedef pair<int, int> pii;
typedef pair<l... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define all(x) (x).begin(), (x).end()
typedef vector<bool> vb;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<vector<bool>> vvb;
typedef vector<vector<int>> vvi;
typedef vector<vector<ll>> vvl;
typedef pair<int, int> pii;
typedef pair<l... | replace | 34 | 35 | 34 | 35 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
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++) {
... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
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 = 2; i < MAX; i++) {
... | replace | 6 | 7 | 6 | 7 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
// #include <boost/multiprecision/cpp_int.hpp>
// namespace mp = boost::multiprecision;
using namespace std;
const double PI = 3.14159265358979323846;
typedef long long ll;
const double EPS = 1e-9;
#define rep(i, n) for (int i = 0; i < (n); ++i)
// #define rep(i, n) for (ll i = 0; i < (n); ++... | #include <bits/stdc++.h>
// #include <boost/multiprecision/cpp_int.hpp>
// namespace mp = boost::multiprecision;
using namespace std;
const double PI = 3.14159265358979323846;
typedef long long ll;
const double EPS = 1e-9;
#define rep(i, n) for (int i = 0; i < (n); ++i)
// #define rep(i, n) for (ll i = 0; i < (n); ++... | replace | 132 | 133 | 132 | 133 | 0 | |
p02632 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#includ... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#includ... | replace | 141 | 142 | 141 | 142 | -11 | |
p02632 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <iostream>
#include <limits.h>
#include <map>
#include <set>
#include <utility>
#include <vector>
using namespace std;
using P = pair<int, int>;
using ll = long long;
constexpr int MOD = 1000000007;
constexpr int MAX = 510000;
long long fac[MAX], finv[MAX], inv[MAX];
bool ... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <limits.h>
#include <map>
#include <set>
#include <utility>
#include <vector>
using namespace std;
using P = pair<int, int>;
using ll = long long;
constexpr int MOD = 1000000007;
constexpr int MAX = 2000100;
long long fac[MAX], finv[MAX], inv[MAX];
bool... | replace | 12 | 13 | 12 | 13 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int MOD = 1000000007;
ll pd[1000010];
ll rd[1000010];
ll Ep(int x, int y) {
if (y == 0)
return 1;
if (y == 1)
return x;
ll r = Ep(x, y / 2);
if (y % 2 == 1)
return r * r % MOD * x % MOD;
else
return r * r % MOD;
}
ll Ft... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int MOD = 1000000007;
ll pd[2000010];
ll rd[2000010];
ll Ep(int x, int y) {
if (y == 0)
return 1;
if (y == 1)
return x;
ll r = Ep(x, y / 2);
if (y % 2 == 1)
return r * r % MOD * x % MOD;
else
return r * r % MOD;
}
ll Ft... | replace | 5 | 7 | 5 | 7 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define N 1000010
#define Mod 1000000007
char s[N];
int fac[N], inv[N];
inline void init(int n) {
fac[0] = fac[1] = inv[0] = inv[1] = 1;
for (int i = 1; i <= n; i++)
fac[i] = 1LL * fac[i - 1] * i % Mod;
for (int i = 2; i <= n; i++)
inv[i] = 1LL * (Mod - Mod / ... | #include <bits/stdc++.h>
using namespace std;
#define N 2000010
#define Mod 1000000007
char s[N];
int fac[N], inv[N];
inline void init(int n) {
fac[0] = fac[1] = inv[0] = inv[1] = 1;
for (int i = 1; i <= n; i++)
fac[i] = 1LL * fac[i - 1] * i % Mod;
for (int i = 2; i <= n; i++)
inv[i] = 1LL * (Mod - Mod / ... | replace | 2 | 3 | 2 | 3 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ALL(x) x.begin(), x.end()
#define rep(i, n) for (int i = 0; i < (n); i++)
#define debug(v) \
cout << #v << ":"; \
for (auto x : v) { ... | #include <bits/stdc++.h>
using namespace std;
#define ALL(x) x.begin(), x.end()
#define rep(i, n) for (int i = 0; i < (n); i++)
#define debug(v) \
cout << #v << ":"; \
for (auto x : v) { ... | replace | 32 | 33 | 32 | 33 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef long long ll;
typedef unsigned long long ull;
#define faster \
ios_base::sync_with_stdio(false); ... | #include <bits/stdc++.h>
using namespace std;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef long long ll;
typedef unsigned long long ull;
#define faster \
ios_base::sync_with_stdio(false); ... | replace | 18 | 19 | 18 | 19 | 0 | |
p02632 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define ll long long int
using namespace std;
const ll mod = 1000000007;
const ll inf = 1e18;
ll factmod(ll a, ll b, ll m) {
if (a < b)
return 0;
ll s = 1;
while (a >= b) {
s = s * a % m;
a -= 1;
}
return s;
}
ll modinv(ll a, ll m) {
ll b = m, u = 1, v = 0;
while (... | #include <bits/stdc++.h>
#define ll long long int
using namespace std;
const ll mod = 1000000007;
const ll inf = 1e18;
ll factmod(ll a, ll b, ll m) {
if (a < b)
return 0;
ll s = 1;
while (a >= b) {
s = s * a % m;
a -= 1;
}
return s;
}
ll modinv(ll a, ll m) {
ll b = m, u = 1, v = 0;
while (... | replace | 63 | 71 | 63 | 85 | TLE | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ios std::ios::sync_with_stdio(false)
#define sd(n) scanf("%d", &n)
#define sdd(n, m) scanf("%d%d", &n, &m)
#define sddd(n, m, k) scanf("%d%d%d", &n, &m, &k)
#define pd(n) printf("%d\n", (n))
#define pdd(n, m) printf("%d %d\n", n, m)
#define pld(n) printf("%lld\n", n)
#define pldd(n, m) ... | #include <bits/stdc++.h>
#define ios std::ios::sync_with_stdio(false)
#define sd(n) scanf("%d", &n)
#define sdd(n, m) scanf("%d%d", &n, &m)
#define sddd(n, m, k) scanf("%d%d%d", &n, &m, &k)
#define pd(n) printf("%d\n", (n))
#define pdd(n, m) printf("%d %d\n", n, m)
#define pld(n) printf("%lld\n", n)
#define pldd(n, m) ... | replace | 229 | 230 | 229 | 230 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <iostream>
// #include <algorithm>
// #include <iomanip>
#define ll long long
#define map unordered_map
#define set unordered_set
#define pll pair<ll, ll>
#define vll vector<ll>
#define mll map<ll, ll>
using namespace std;
const ll MOD = 1000000007LL;
const ll INF = (1LL << 60LL);
... | #include <bits/stdc++.h>
#include <iostream>
// #include <algorithm>
// #include <iomanip>
#define ll long long
#define map unordered_map
#define set unordered_set
#define pll pair<ll, ll>
#define vll vector<ll>
#define mll map<ll, ll>
using namespace std;
const ll MOD = 1000000007LL;
const ll INF = (1LL << 60LL);
... | replace | 17 | 18 | 17 | 18 | 0 | |
p02632 | 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;
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> bool chmin(T &a, const T &b) {
if (a > b) {
a = b;
return 1;
... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = (0); i < (n); i++)
using namespace std;
typedef long long ll;
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> bool chmin(T &a, const T &b) {
if (a > b) {
a = b;
return 1;
... | replace | 26 | 27 | 26 | 27 | 0 | |
p02632 | 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 f[N], inv[N], finv[N];
// inv[]: inverse element
int powMod(int u, int v) {
int res = 1;
while (v) {
if (v & 1)
res = (ll)res * u % MOD;
v >>= 1;
u = (ll)u * u % MOD;
}
r... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MOD = 1e9 + 7;
const int N = 2e6 + 5;
int f[N], inv[N], finv[N];
// inv[]: inverse element
int powMod(int u, int v) {
int res = 1;
while (v) {
if (v & 1)
res = (ll)res * u % MOD;
v >>= 1;
u = (ll)u * u % MOD;
}
r... | replace | 6 | 7 | 6 | 7 | 0 | |
p02632 | C++ | Runtime Error | // FIRST THINK, THEN CODE.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define MOD 998244353
#define rep(i, a, b) for (ll i = a; i < b; ++i)
#define rrep(i, a, b) for (ll i = a; i > b; --i)
#define vi vector<int>
#define vl vector<ll>
#define ld long double
#define vvi vector<vector<int>>
#d... | // FIRST THINK, THEN CODE.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define MOD 998244353
#define rep(i, a, b) for (ll i = a; i < b; ++i)
#define rrep(i, a, b) for (ll i = a; i > b; --i)
#define vi vector<int>
#define vl vector<ll>
#define ld long double
#define vvi vector<vector<int>>
#d... | replace | 61 | 62 | 61 | 62 | 0 | |
p02632 | C++ | Runtime Error | #pragma optimize("O3")
#pragma GCC target("sse4")
#include <bits/stdc++.h>
// #include<iomanip>
using namespace std;
typedef long long int ll;
typedef pair<ll, ll> pii;
#define f(i, a, b) for (ll i = a; i < b; i++)
#define fo(i, a, b) for (ll i = a; i <= b; i += 1)
#define rf(i, a, b) for (ll i = a; i >= b; i--)
#def... | #pragma optimize("O3")
#pragma GCC target("sse4")
#include <bits/stdc++.h>
// #include<iomanip>
using namespace std;
typedef long long int ll;
typedef pair<ll, ll> pii;
#define f(i, a, b) for (ll i = a; i < b; i++)
#define fo(i, a, b) for (ll i = a; i <= b; i += 1)
#define rf(i, a, b) for (ll i = a; i >= b; i--)
#def... | replace | 92 | 93 | 92 | 93 | 0 | |
p02632 | C++ | Runtime Error | #define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll mod = 1e9 + 7;
const int sz = 1e6 + 1;
int k;
string s;
ll fact[sz], inv_fact[sz];
ll bpow(ll x, ll p) {
if (p == 0)
return 1;
if (p % 2)
return (x * bpow(x, p - 1)) % mod;
else {
ll b = b... | #define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll mod = 1e9 + 7;
const int sz = 2e6 + 1;
int k;
string s;
ll fact[sz], inv_fact[sz];
ll bpow(ll x, ll p) {
if (p == 0)
return 1;
if (p % 2)
return (x * bpow(x, p - 1)) % mod;
else {
ll b = b... | replace | 8 | 9 | 8 | 9 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i, n) for (int i = 0; i < (n); i++)
#define pb push_back
#define eb emplace_back
#define all(v) (v).begin(), (v).end()
#define fi first
#define se second
using vint = vector<int>;
using pint = pair<int, int>;
using vpint = vector<pint>;
... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i, n) for (int i = 0; i < (n); i++)
#define pb push_back
#define eb emplace_back
#define all(v) (v).begin(), (v).end()
#define fi first
#define se second
using vint = vector<int>;
using pint = pair<int, int>;
using vpint = vector<pint>;
... | replace | 132 | 133 | 132 | 133 | 0 | |
p02632 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
#define int long long
#define REP(i, n) for (int i = 0; i < (int)n; ++i)
#define RREP(i, n) for (int i = (int)n - 1; i >= 0; --i)
#define FOR(i, s, n) for (int i = s; i < (int)n; ++i)
#define RFOR(i, s, n) for (int i = (int)n - 1; i >= s; --i)
#define ALL(a) a.begin(), a.en... | #include "bits/stdc++.h"
using namespace std;
#define int long long
#define REP(i, n) for (int i = 0; i < (int)n; ++i)
#define RREP(i, n) for (int i = (int)n - 1; i >= 0; --i)
#define FOR(i, s, n) for (int i = s; i < (int)n; ++i)
#define RFOR(i, s, n) for (int i = (int)n - 1; i >= s; --i)
#define ALL(a) a.begin(), a.en... | replace | 137 | 138 | 137 | 138 | 0 | |
p02632 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <unordered_set>
#include <vector>
using namespace std;
using ll = long long;
using ull = unsigned long long;
... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <unordered_set>
#include <vector>
using namespace std;
using ll = long long;
using ull = unsigned long long;
... | replace | 162 | 163 | 162 | 163 | 0 | |
p02632 | C++ | Runtime Error | // Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools
#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
const long long MOD = 1e9 + 7;
const i64 INF = i64(1e18) + 7;
template <typename T> bool chmin(T &x, T y) {
if (x > y) {
x = y;
return true;
}
return false;
}
t... | // Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools
#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
const long long MOD = 1e9 + 7;
const i64 INF = i64(1e18) + 7;
template <typename T> bool chmin(T &x, T y) {
if (x > y) {
x = y;
return true;
}
return false;
}
t... | replace | 191 | 192 | 191 | 192 | 0 | |
p02632 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
typedef long double ld;
typedef long long ll;
#define sz(x) (int)(x).size()
#define pb push_back
#define mp make_pair
#define f first
#define s second
template <typename T, typename U> bool ckmin(T &a, U b) {
return b < a ? a = b, true : false;
}
template <typename T,... | #include "bits/stdc++.h"
using namespace std;
typedef long double ld;
typedef long long ll;
#define sz(x) (int)(x).size()
#define pb push_back
#define mp make_pair
#define f first
#define s second
template <typename T, typename U> bool ckmin(T &a, U b) {
return b < a ? a = b, true : false;
}
template <typename T,... | replace | 54 | 55 | 54 | 55 | 0 | |
p02632 | C++ | Runtime Error | /*BISMILLAH
THE WHITE WOLF
NO DREAM IS TOO BIG AND NO DREAMER IS TOO SMALL*/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef vector<long long> vll;
typedef vector<int> vi;
#define io ios_base::sync_with_stdio(false)
#define pb pus... | /*BISMILLAH
THE WHITE WOLF
NO DREAM IS TOO BIG AND NO DREAMER IS TOO SMALL*/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef vector<long long> vll;
typedef vector<int> vi;
#define io ios_base::sync_with_stdio(false)
#define pb pus... | replace | 18 | 19 | 18 | 19 | 0 | |
p02632 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string... | replace | 87 | 88 | 87 | 88 | 0 | |
p02632 | C++ | Runtime Error | // #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
//----------------------- Print Function ----------------------//
inline void print() { cout << '\n'; }
template <typename First, typename... Rest>
void print(const First &first, const Rest &...rest) {
cout << first << ' ';
print(rest...);
}... | // #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
//----------------------- Print Function ----------------------//
inline void print() { cout << '\n'; }
template <typename First, typename... Rest>
void print(const First &first, const Rest &...rest) {
cout << first << ' ';
print(rest...);
}... | replace | 79 | 80 | 79 | 80 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; ++i)
#define ALL(a) (a).begin(), (a).end()
#define rALL(a) (a).rbegin(), (a).rend()
#define SZ(x) ((int)(x).size())
using ll = long long;
using ull = unsigned long long;
using P = pair<int, int>;
using llP = pair<ll, ll>;
using DoP ... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; ++i)
#define ALL(a) (a).begin(), (a).end()
#define rALL(a) (a).rbegin(), (a).rend()
#define SZ(x) ((int)(x).size())
using ll = long long;
using ull = unsigned long long;
using P = pair<int, int>;
using llP = pair<ll, ll>;
using DoP ... | replace | 137 | 138 | 137 | 138 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
#define ld long double
#define mk make_pair
#define fi first
#define se second
#define vll vector<ll>
#define pii pair<ll, ll>
#define vvll vector<vector<ll>>
#define pb push_back
#define sz(v) (ll)(v).size()
#define inf 1e18
#define md 1000000007
#define all(v) (v).begin()... | #include <bits/stdc++.h>
#define ll long long
#define ld long double
#define mk make_pair
#define fi first
#define se second
#define vll vector<ll>
#define pii pair<ll, ll>
#define vvll vector<vector<ll>>
#define pb push_back
#define sz(v) (ll)(v).size()
#define inf 1e18
#define md 1000000007
#define all(v) (v).begin()... | replace | 49 | 50 | 49 | 50 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define fi first
#define se second
#define pb push_back
#define pr pair<int, int>
#define mod 1000000007
#define endl "\n"
int power(int a, int b, int m = mod) {
if (b == 0)
return 1;
if (b == 1)
return a;
int res = power(a, b / 2, m);
... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define fi first
#define se second
#define pb push_back
#define pr pair<int, int>
#define mod 1000000007
#define endl "\n"
int power(int a, int b, int m = mod) {
if (b == 0)
return 1;
if (b == 1)
return a;
int res = power(a, b / 2, m);
... | replace | 37 | 38 | 37 | 38 | 0 | |
p02632 | C++ | Runtime Error | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define MOD 1000000007
vector<ll> fact(2000000);
void init_fact(int n) {
fact[0] = 1;
for (int i = 1; i < n + 1; i++) {
fact[i] = fact[i - 1] * i;
fact[i] %= MOD;
}
}
ll mod_pow(ll x, ll p) {
ll res = 1;
ll n = ... | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define MOD 1000000007
vector<ll> fact(2000001);
void init_fact(int n) {
fact[0] = 1;
for (int i = 1; i < n + 1; i++) {
fact[i] = fact[i - 1] * i;
fact[i] %= MOD;
}
}
ll mod_pow(ll x, ll p) {
ll res = 1;
ll n = ... | replace | 5 | 6 | 5 | 6 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define sint(a) scanf("%d", &a)
#define sint2(a, b) scanf("%d %d", &a, &b)
#define sll(a) scanf("%lld", &a)
#define sll2(a, b) scanf("%lld %lld", &a, &b)
#define mem(a, i) memset(a, i, sizeof(a))
#define pb push_back
#define ll long long
#define lson node << 1
#define rson... | #include <bits/stdc++.h>
using namespace std;
#define sint(a) scanf("%d", &a)
#define sint2(a, b) scanf("%d %d", &a, &b)
#define sll(a) scanf("%lld", &a)
#define sll2(a, b) scanf("%lld %lld", &a, &b)
#define mem(a, i) memset(a, i, sizeof(a))
#define pb push_back
#define ll long long
#define lson node << 1
#define rson... | replace | 13 | 14 | 13 | 14 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
// headers {{{
using namespace std;
// using namespace rel_ops;
const double pi = acos(-1.0);
const double eps = 1e-11;
const int INF = 0x7FFFFFFF;
template <class T> inline bool checkmin(T &a, T b) {
return b < a ? a = b, 1 : 0;
}
template <class T> inline bool checkmax(T &a, T b) {
retu... | #include <bits/stdc++.h>
// headers {{{
using namespace std;
// using namespace rel_ops;
const double pi = acos(-1.0);
const double eps = 1e-11;
const int INF = 0x7FFFFFFF;
template <class T> inline bool checkmin(T &a, T b) {
return b < a ? a = b, 1 : 0;
}
template <class T> inline bool checkmax(T &a, T b) {
retu... | replace | 140 | 141 | 140 | 141 | 0 | |
p02632 | C++ | Runtime Error | #include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <bitset>
#include <complex>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>... | #include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <bitset>
#include <complex>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>... | replace | 48 | 49 | 48 | 49 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define boost \
ios_base::sync_with_stdio(false); \
cin.tie(nullptr)
const int N = 1e6 + 5;
const int M = 1e9 + 7;
int mod(int m) {
m %=... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define boost \
ios_base::sync_with_stdio(false); \
cin.tie(nullptr)
const int N = 2e6 + 5;
const int M = 1e9 + 7;
int mod(int m) {
m %=... | replace | 7 | 8 | 7 | 8 | 0 | |
p02632 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
using namespace std;
... | #include <algorithm>
#include <bitset>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
using namespace std;
... | replace | 29 | 30 | 29 | 30 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define TRACE
#ifdef TRACE
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1> void __f(const char *name, Arg1 &&arg1) {
cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char *names, Arg1 &&ar... | #include <bits/stdc++.h>
using namespace std;
#define TRACE
#ifdef TRACE
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1> void __f(const char *name, Arg1 &&arg1) {
cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char *names, Arg1 &&ar... | replace | 30 | 31 | 30 | 31 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int MAX = 510000;
const int MOD = 1000000007;
//
int 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;... | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int MAX = 2000007;
const int MOD = 1000000007;
//
int 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... | replace | 3 | 4 | 3 | 4 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
#define pii pair<ll, ll>
#define debug(a) cout << a << '\n'
#define maxn 1000009 /// I wanna be the wind
#define MOD 1000000007
#define F first
#define S second
#define rep(i, a, b) for (ll i = a; i < (b); ++i)
#define per(i, b, a) for (ll i = b - 1; i >= a; i--)
#define tr... | #include <bits/stdc++.h>
#define ll long long
#define pii pair<ll, ll>
#define debug(a) cout << a << '\n'
#define maxn 2000009 /// I wanna be the wind
#define MOD 1000000007
#define F first
#define S second
#define rep(i, a, b) for (ll i = a; i < (b); ++i)
#define per(i, b, a) for (ll i = b - 1; i >= a; i--)
#define tr... | replace | 4 | 5 | 4 | 5 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#pragma region Macros
using ll = long long;
#define int ll
using pii = pair<int, int>;
using tiii = tuple<int, int, int>;
template <class T = ll> using V = vector<T>;
template <class T = ll> using VV = V<V<T>>;
#define IOS ... | #include <bits/stdc++.h>
using namespace std;
#pragma region Macros
using ll = long long;
#define int ll
using pii = pair<int, int>;
using tiii = tuple<int, int, int>;
template <class T = ll> using V = vector<T>;
template <class T = ll> using VV = V<V<T>>;
#define IOS ... | replace | 179 | 180 | 179 | 180 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define repp(i, n, m) for (int(i) = (n); (i) < (m); (i)++)
#define repn(i, n) for (int(i) = 1; (i) <= (n); (i)++)
#define repr(i, n) for (int(i) = (n - 1); (i) >= 0; (i)--)
#define all(x) (x).begin(), (x).end()
#define l... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define repp(i, n, m) for (int(i) = (n); (i) < (m); (i)++)
#define repn(i, n) for (int(i) = 1; (i) <= (n); (i)++)
#define repr(i, n) for (int(i) = (n - 1); (i) >= 0; (i)--)
#define all(x) (x).begin(), (x).end()
#define l... | replace | 39 | 40 | 39 | 40 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define _rep(n, a, b) for (int n = (a); n <= (b); ++n)
#define _rev(n, a, b) for (int n = (a); n >= (b); --n)
#define _for(n, a, b) for (int n = (a); n < (b); ++n)
#define _rof(n, a, b) for (int n = (a); n > (b); --n)
#define oo 0x3f3f3f3f3f3f
#define ll long long
#define ... | #include <bits/stdc++.h>
using namespace std;
#define _rep(n, a, b) for (int n = (a); n <= (b); ++n)
#define _rev(n, a, b) for (int n = (a); n >= (b); --n)
#define _for(n, a, b) for (int n = (a); n < (b); ++n)
#define _rof(n, a, b) for (int n = (a); n > (b); --n)
#define oo 0x3f3f3f3f3f3f
#define ll long long
#define ... | replace | 19 | 20 | 19 | 20 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define ar array
const ll mod = 1e9 + 7;
ll pwr(ll a, ll b) {
ll ret = 1;
while (b > 0) {
if (b % 2 == 1)
ret = ret * a % mod;
a = a * a % mod;
b /= 2;
}
return ret;
}
const int N = 1e6 + 5;
... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define ar array
const ll mod = 1e9 + 7;
ll pwr(ll a, ll b) {
ll ret = 1;
while (b > 0) {
if (b % 2 == 1)
ret = ret * a % mod;
a = a * a % mod;
b /= 2;
}
return ret;
}
const int N = 2e6 + 5;
... | replace | 21 | 22 | 21 | 22 | 0 | |
p02632 | C++ | Runtime Error | /*بِسْمِ اللَّهِ الرَّحْمَنِ الرَّحِيم*/
// #pragma GCC optimize("O3,unroll-loops")
// #pragma GCC target("avx,avx2,fma")
#include <bits/stdc++.h>
using namespace std;
#define FASTIO ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
typedef long long ll;
const double PI = acos(-1.0);
const ll mod = 1e9 + 7;
... | /*بِسْمِ اللَّهِ الرَّحْمَنِ الرَّحِيم*/
// #pragma GCC optimize("O3,unroll-loops")
// #pragma GCC target("avx,avx2,fma")
#include <bits/stdc++.h>
using namespace std;
#define FASTIO ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
typedef long long ll;
const double PI = acos(-1.0);
const ll mod = 1e9 + 7;
... | replace | 140 | 141 | 140 | 141 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define sz(a) ((int)a.size())
#define mp make_pair
#define fi first
#define se second
const int maxn = 1e6 + 5;
const int maxv = 1e9;
const int mod = 1e9 + 7;
int T, tc;
int n;
int a[maxn];
long long fact[maxn], inv[maxn];
string s;
long long powe... | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define sz(a) ((int)a.size())
#define mp make_pair
#define fi first
#define se second
const int maxn = 2e6 + 5;
const int maxv = 1e9;
const int mod = 1e9 + 7;
int T, tc;
int n;
int a[maxn];
long long fact[maxn], inv[maxn];
string s;
long long powe... | replace | 10 | 11 | 10 | 11 | 0 | |
p02632 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cfloat>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <list>
#include <map>
#include <math.h>
#include <numeric>
#incl... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cfloat>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <list>
#include <map>
#include <math.h>
#include <numeric>
#incl... | replace | 321 | 322 | 321 | 322 | 0 | |
p02632 | C++ | Runtime Error | // #pragma GCC optimize("unroll-loops", "omit-frame-pointer", "inline")
// #pragma GCC option("arch=native", "tune=native", "no-zero-upper")
// #pragma GCC
// target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
// #pragma GCC optimize("Ofast")
// #pragma GCC optimize("tree-vectorize","openmp","predic... | // #pragma GCC optimize("unroll-loops", "omit-frame-pointer", "inline")
// #pragma GCC option("arch=native", "tune=native", "no-zero-upper")
// #pragma GCC
// target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
// #pragma GCC optimize("Ofast")
// #pragma GCC optimize("tree-vectorize","openmp","predic... | replace | 183 | 184 | 183 | 184 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define endl '\n'
const int N = 1000005;
const int M = 1000000007;
long long power(long long a, long long b) {
if (b == 0)
return 1;
long long r = power(a, b / 2);
r = (r * r) % M;
if (b & 1)
return (r * a) % M;
return r;
}
long long f[N], inv[N];
int... | #include <bits/stdc++.h>
using namespace std;
#define endl '\n'
const int N = 3000005;
const int M = 1000000007;
long long power(long long a, long long b) {
if (b == 0)
return 1;
long long r = power(a, b / 2);
r = (r * r) % M;
if (b & 1)
return (r * a) % M;
return r;
}
long long f[N], inv[N];
int... | replace | 5 | 6 | 5 | 6 | 0 | |
p02632 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <complex>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
typedef long long... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <complex>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
typedef long long... | replace | 31 | 32 | 31 | 32 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
template <typename T>
using ordered_set =
tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
inline void fastio() {
cin.tie(nullptr);... | #include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
template <typename T>
using ordered_set =
tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
inline void fastio() {
cin.tie(nullptr);... | replace | 23 | 24 | 23 | 24 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
// mod逆元を使ったnCkの計算(速)
const int64_t MAX = 1000010;
const int64_t MOD = 1000000007;
int64_t 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]... | #include <bits/stdc++.h>
using namespace std;
// mod逆元を使ったnCkの計算(速)
const int64_t MAX = 3000010;
const int64_t MOD = 1000000007;
int64_t 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]... | replace | 3 | 4 | 3 | 4 | 0 | |
p02632 | C++ | Runtime Error | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <complex>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using na... | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <complex>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using na... | replace | 25 | 26 | 25 | 26 | 0 | |
p02632 | C++ | Runtime Error | #include <bits/stdc++.h>
#define REP(i, n) for (long long i = 0; i < (long long)n; i++)
// #define _GLIBCXX_DEBUG
using namespace std;
using ll = long long;
using Pi = pair<int, int>;
using Pl = pair<ll, ll>;
using Vl = vector<ll>;
using vi = vector<int>;
using Graph = vector<vi>;
const int MAX = 1001000;
const ll MOD... | #include <bits/stdc++.h>
#define REP(i, n) for (long long i = 0; i < (long long)n; i++)
// #define _GLIBCXX_DEBUG
using namespace std;
using ll = long long;
using Pi = pair<int, int>;
using Pl = pair<ll, ll>;
using Vl = vector<ll>;
using vi = vector<int>;
using Graph = vector<vi>;
const int MAX = 2001000;
const ll MOD... | replace | 11 | 12 | 11 | 12 | 0 | |
p02632 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
// #define MODE... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
// #define MODE... | replace | 123 | 124 | 123 | 124 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.