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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p02990 | C++ | Runtime Error | /*||>>>> Praveen Ojha <<<<>>>> 30 June 2019 <<<<>>>> 01:09:32 <<<<||*/
// #pragma GCC optimize("Ofast") //(Very Fast but Inaccurate)
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
// //(Small operations in many loops) #pragma GCC optimize("unroll-loops")
// #pragma comment(linker, "/st... | /*||>>>> Praveen Ojha <<<<>>>> 30 June 2019 <<<<>>>> 01:09:32 <<<<||*/
// #pragma GCC optimize("Ofast") //(Very Fast but Inaccurate)
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
// //(Small operations in many loops) #pragma GCC optimize("unroll-loops")
// #pragma comment(linker, "/st... | insert | 80 | 80 | 80 | 82 | 0 | |
p02990 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
const int MOD = 1e+9 + 7;
int main() {
int N, K;
cin >> N >> K;
// C[i][j]: iをj個に分割する仕方(分割数)
vector<vector<long long>> C(N, vector<long long>(N));
for (int i = 0; i < N; ++i) {
C[i][0] = C[i][i] = 1;
for (int j = 1; j <... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
const int MOD = 1e+9 + 7;
int main() {
int N, K;
cin >> N >> K;
// C[i][j]: iをj個に分割する仕方(分割数)
vector<vector<long long>> C(N + 1, vector<long long>(N + 1));
for (int i = 0; i <= N; ++i) {
C[i][0] = C[i][i] = 1;
for (int j... | replace | 12 | 14 | 12 | 14 | 0 | |
p02990 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
long N = 2000, K = 2000;
long DP_SIZE_N = N + 1;
long DP_SIZE_K = K + 1;
// 全体計算
// nCk
vector<vector<long>> DP;
void init() {
DP.resize(DP_SIZE_N);
for (int i = 0; i < DP_SIZE_N; ++i) {
DP[i].resize(DP_SIZE_K);
}
}
void calc_Comb... | #include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
long N = 2000, K = 2000;
long DP_SIZE_N = N + 1;
long DP_SIZE_K = K + 1;
// 全体計算
// nCk
vector<vector<long>> DP;
void init() {
DP.resize(DP_SIZE_N);
for (int i = 0; i < DP_SIZE_N; ++i) {
DP[i].resize(DP_SIZE_K);
}
}
void calc_Comb... | insert | 42 | 42 | 42 | 50 | 0 | |
p02990 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <iostream>
#define ll long long
using namespace std;
ll mod = 1e9 + 7, ans, c[2002][2002];
int n, k;
void pre() {
c[0][0] = 1;
for (int i = 1; i <= n; i++)
for (int j = 0; j <= i; j++) {
if (i == j || j == 0)
c[i][j] = 1;
else
c[i][j] =... | #include <algorithm>
#include <cstdio>
#include <iostream>
#define ll long long
using namespace std;
ll mod = 1e9 + 7, ans, c[2002][2002];
int n, k;
void pre() {
c[0][0] = 1;
for (int i = 1; i <= n; i++)
for (int j = 0; j <= i; j++) {
if (i == j || j == 0)
c[i][j] = 1;
else
c[i][j] =... | replace | 20 | 25 | 20 | 22 | 0 | |
p02990 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace ::std;
#define all(x) (x).begin(), (x).end()
#define sz(x) (int)(x).size()
typedef long long ll;
typedef array<int, 3> tri;
typedef array<int, 2> duo;
typedef long double ld;
template <class T> istream &operator>>(istream &I, vector<T> &v) {
for (T &e : v)
I >> e;
ret... | #include <bits/stdc++.h>
using namespace ::std;
#define all(x) (x).begin(), (x).end()
#define sz(x) (int)(x).size()
typedef long long ll;
typedef array<int, 3> tri;
typedef array<int, 2> duo;
typedef long double ld;
template <class T> istream &operator>>(istream &I, vector<T> &v) {
for (T &e : v)
I >> e;
ret... | insert | 35 | 35 | 35 | 37 | 0 | |
p02990 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <vector>
using namespace std;
static const uint64_t MOD = 1000000007LL;
// uint64_t dp[100005][13];
/* nCk == (n-1)C(k-1) + (n-1)Ck*/
// long mem[4000][4000];
// long combi(int n, int k)
// {
// if (mem[n][k])
// ... | #include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <vector>
using namespace std;
static const uint64_t MOD = 1000000007LL;
// uint64_t dp[100005][13];
/* nCk == (n-1)C(k-1) + (n-1)Ck*/
// long mem[4000][4000];
// long combi(int n, int k)
// {
// if (mem[n][k])
// ... | replace | 46 | 48 | 46 | 52 | 0 | |
p02990 | C++ | Runtime Error | // include
//------------------------------------------
#include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include... | // include
//------------------------------------------
#include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include... | replace | 402 | 403 | 402 | 403 | 0 | |
p02990 | C++ | Runtime Error | #define _CRT_SECURE_NO_WARNINGS
#include "bits/stdc++.h"
#if defined(_MSC_VER) || defined(ONLINE_JUDGE)
#define getchar_unlocked _getchar_nolock
#define putchar_unlocked _putchar_nolock
#endif
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define FOR(i, m, n) for (int i = (m); i < (n); ++i)
#defi... | #define _CRT_SECURE_NO_WARNINGS
#include "bits/stdc++.h"
#if defined(_MSC_VER) || defined(ONLINE_JUDGE)
#define getchar_unlocked _getchar_nolock
#define putchar_unlocked _putchar_nolock
#endif
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define FOR(i, m, n) for (int i = (m); i < (n); ++i)
#defi... | replace | 302 | 303 | 302 | 303 | 0 | |
p02990 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
// const int mod = 998244353;
const int mod = 1000000007;
struct mint {
ll x; // typedef long long ll;
mint(ll x = 0) : x((x % mod + mod) % mod) {}
mint operator-() const { return mint(-x); }
mint &operator+=(const mint a) {
if ((x += a.x... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
// const int mod = 998244353;
const int mod = 1000000007;
struct mint {
ll x; // typedef long long ll;
mint(ll x = 0) : x((x % mod + mod) % mod) {}
mint operator-() const { return mint(-x); }
mint &operator+=(const mint a) {
if ((x += a.x... | replace | 54 | 55 | 54 | 59 | 0 | |
p02990 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using ll = long long;
const ll MOD = 1000000007;
#define rep(i, n) for (ll i = 0; i < (n); i++)
using namespace std;
int get_gcd(int a, int b) {
while (1) {
if (a < b)
swap(a, b);
if (b == 0)
return a;
a %= b;
}
}
int get_lcm(int a, int b) { return a * b / get_gcd(a,... | #include <bits/stdc++.h>
using ll = long long;
const ll MOD = 1000000007;
#define rep(i, n) for (ll i = 0; i < (n); i++)
using namespace std;
int get_gcd(int a, int b) {
while (1) {
if (a < b)
swap(a, b);
if (b == 0)
return a;
a %= b;
}
}
int get_lcm(int a, int b) { return a * b / get_gcd(a,... | replace | 28 | 29 | 28 | 29 | TLE | |
p02990 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
// 定数
const long long MOD1 = 1000000007;
const long long MOD2 = 998244353;
const long long INF = 1152921504606846976;
const long double PI = 3.1415926535897932;
// 型名省略
#define ll long long
#define ull unsigned long long
#define ld long double
#define pll pair<long long, ... | #include <bits/stdc++.h>
using namespace std;
// 定数
const long long MOD1 = 1000000007;
const long long MOD2 = 998244353;
const long long INF = 1152921504606846976;
const long double PI = 3.1415926535897932;
// 型名省略
#define ll long long
#define ull unsigned long long
#define ld long double
#define pll pair<long long, ... | insert | 197 | 197 | 197 | 201 | 0 | |
p02990 | C++ | Runtime Error | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(x) (x).begin(), (x).end()
using namespace std;
template <typename T> T &chmin(T &a, const T &b) { return a = min(a, b); }
template <typename T> T &chmax(T &a, const T &b) { return a = max(a, b); }
using ll = long long;
using l... | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(x) (x).begin(), (x).end()
using namespace std;
template <typename T> T &chmin(T &a, const T &b) { return a = min(a, b); }
template <typename T> T &chmax(T &a, const T &b) { return a = max(a, b); }
using ll = long long;
using l... | replace | 76 | 79 | 76 | 81 | 0 | |
p02990 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define M 2005
#define mod 1000000007
long long n, k, C[M][M];
int main() {
cin >> n >> k;
int m = n - k;
for (int i = 1; i < M; i++) {
C[i][i] = C[i][0] = 1;
for (int j = 1; j < i; j++)
C[i][j] = (C[i - 1][j] + C[i - 1][j - 1]) % mod;
}
printf("%lld... | #include <bits/stdc++.h>
using namespace std;
#define M 2005
#define mod 1000000007
long long n, k, C[M][M];
int main() {
cin >> n >> k;
int m = n - k;
if (m == 0) {
for (int i = 1; i <= k; i++)
if (i == 1)
puts("1");
else
puts("0");
return 0;
}
for (int i = 1; i < M; i++) ... | insert | 8 | 8 | 8 | 16 | 0 | |
p02990 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <math.h>
#include <queue>
#include <stdio.h>
#include <string>
#include <vector>
#define MOD 1000000007LL
#define ALL(v) v.begin(), v.end()
#define rep(i, n) for (ll i = 0; i < (n); i++)
using namespace std;
typedef long long int ll;
typedef vector<ll> llvec;
typedef ... | #include <algorithm>
#include <iostream>
#include <math.h>
#include <queue>
#include <stdio.h>
#include <string>
#include <vector>
#define MOD 1000000007LL
#define ALL(v) v.begin(), v.end()
#define rep(i, n) for (ll i = 0; i < (n); i++)
using namespace std;
typedef long long int ll;
typedef vector<ll> llvec;
typedef ... | replace | 100 | 103 | 100 | 107 | 0 | |
p02990 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
using namespace std;
const ll N = 2005, mod = 1000000007;
ll pr[N], pi[N];
ll power(ll x, ll y) {
ll re = 1;
while (y > 0) {
if (y % 2)
re = re * x % mod;
y = y / 2;
x = x * x % mod;
}
return re;
}
ll ncr(ll n, ll r) { return ((pr[n] * pi[r]) % mod... | #include <bits/stdc++.h>
#define ll long long
using namespace std;
const ll N = 2005, mod = 1000000007;
ll pr[N], pi[N];
ll power(ll x, ll y) {
ll re = 1;
while (y > 0) {
if (y % 2)
re = re * x % mod;
y = y / 2;
x = x * x % mod;
}
return re;
}
ll ncr(ll n, ll r) { return ((pr[n] * pi[r]) % mod... | replace | 28 | 29 | 28 | 31 | 0 | |
p02990 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll MOD = 1000000007LL;
const int SZ = 2005;
ll combi[SZ][SZ];
ll dp(int a, int b) {
if (a == b)
return 1LL;
if (b == 0)
return 1LL;
if (combi[a][b] != 0LL)
return combi[a][b];
return combi[a][b] = (dp(a - 1, b - 1) + dp(a - 1,... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll MOD = 1000000007LL;
const int SZ = 2005;
ll combi[SZ][SZ];
ll dp(int a, int b) {
if (a < b)
return 0LL;
if (a == b)
return 1LL;
if (b == 0)
return 1LL;
if (combi[a][b] != 0LL)
return combi[a][b];
return combi[a][b] = ... | insert | 7 | 7 | 7 | 9 | 0 | |
p02990 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll mod = 1e9 + 7;
const ll nmax = 2005;
ll facts[nmax];
void calc_fact() {
facts[0] = 1;
for (ll i = 1; i < nmax; i++) {
facts[i] = facts[i - 1] * i % mod;
}
}
ll powmod(ll a, ll b) {
ll ans = 1;
while (b) {
if (b % 2) {
... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll mod = 1e9 + 7;
const ll nmax = 2005;
ll facts[nmax];
void calc_fact() {
facts[0] = 1;
for (ll i = 1; i < nmax; i++) {
facts[i] = facts[i - 1] * i % mod;
}
}
ll powmod(ll a, ll b) {
ll ans = 1;
while (b) {
if (b % 2) {
... | replace | 41 | 42 | 41 | 46 | 0 | |
p02990 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < int(n); ++i)
#define all(a) (a).begin(), (a).end()
typedef long long ll;
#define rep1(i, n) for (int i = 1; i <= int(n); ++i)
class modint {
public:
using ll = long long;
ll num;
static const ll MOD = 1e9 + 7;
static vector<mod... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < int(n); ++i)
#define all(a) (a).begin(), (a).end()
typedef long long ll;
#define rep1(i, n) for (int i = 1; i <= int(n); ++i)
class modint {
public:
using ll = long long;
ll num;
static const ll MOD = 1e9 + 7;
static vector<mod... | replace | 69 | 70 | 69 | 74 | 0 | |
p02990 | C++ | Runtime Error | #define _USE_MATH_DEFINES
#include <bits/stdc++.h>
#define dump(x) cout << x << endl
typedef int64_t Int;
using namespace std;
using Graph = vector<vector<Int>>;
const double pi = M_PI;
const Int MOD = 1000000007;
Int modpow(Int a, Int n, Int mod) {
Int ret = 1;
while (n > 0) {
if (n & 1) {
ret = ret *... | #define _USE_MATH_DEFINES
#include <bits/stdc++.h>
#define dump(x) cout << x << endl
typedef int64_t Int;
using namespace std;
using Graph = vector<vector<Int>>;
const double pi = M_PI;
const Int MOD = 1000000007;
Int modpow(Int a, Int n, Int mod) {
Int ret = 1;
while (n > 0) {
if (n & 1) {
ret = ret *... | replace | 92 | 93 | 92 | 93 | -6 | munmap_chunk(): invalid pointer
|
p02990 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define forn(i, n) for (ll i = 0; i < (n); i++)
#define fori(i, b, e) for (ll i = (b); i < (e); i++)
#define forr(i, b, e) for (ll i = (b); i >= (e); i--)
#define allele(v) v.begin(), v.end()
#define fi first
#define se second
#de... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define forn(i, n) for (ll i = 0; i < (n); i++)
#define fori(i, b, e) for (ll i = (b); i < (e); i++)
#define forr(i, b, e) for (ll i = (b); i >= (e); i--)
#define allele(v) v.begin(), v.end()
#define fi first
#define se second
#de... | replace | 55 | 56 | 55 | 56 | 0 | |
p02990 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define SPEED \
ios::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0)
#define read() f... | #include <bits/stdc++.h>
using namespace std;
#define SPEED \
ios::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0)
#define read() f... | insert | 62 | 62 | 62 | 64 | 0 | |
p02990 | C++ | Runtime Error | #include <bits/stdc++.h>
#define mod 1000000007
#define mod998 998244353
#define sp ' '
#define intmax 2147483647
#define llmax 9223372036854775807
#define mkp make_pair
typedef long long ll;
using namespace std;
int N, K;
ll f[2001];
ll pw(ll x, int y) {
ll a = 1;
while (y) {
if (y & 1) {
a = a * x % m... | #include <bits/stdc++.h>
#define mod 1000000007
#define mod998 998244353
#define sp ' '
#define intmax 2147483647
#define llmax 9223372036854775807
#define mkp make_pair
typedef long long ll;
using namespace std;
int N, K;
ll f[2001];
ll pw(ll x, int y) {
ll a = 1;
while (y) {
if (y & 1) {
a = a * x % m... | insert | 28 | 28 | 28 | 30 | 0 | |
p02990 | C++ | Runtime Error | #include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <numeric>
#include <queue>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
long long factorial(long long i) { // 階乗
if (i > 0)
... | #include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <numeric>
#include <queue>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
long long factorial(long long i) { // 階乗
if (i > 0)
... | replace | 40 | 41 | 40 | 41 | 0 | |
p02990 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int N = 2002, mod = 1e9 + 7;
int fact[N * 2];
int fastpower(int b, int p) {
int res = 1;
int v = b;
while (p) {
if (p & 1)
res = (1ll * res * v) % mod;
p >>= 1;
v = (1ll * v * v) % mod;
}
return res;
}
void pre() {
fact[0] = fact[1] = ... | #include <bits/stdc++.h>
using namespace std;
const int N = 2002, mod = 1e9 + 7;
int fact[N * 2];
int fastpower(int b, int p) {
int res = 1;
int v = b;
while (p) {
if (p & 1)
res = (1ll * res * v) % mod;
p >>= 1;
v = (1ll * v * v) % mod;
}
return res;
}
void pre() {
fact[0] = fact[1] = ... | insert | 26 | 26 | 26 | 28 | 0 | |
p02990 | C++ | Runtime Error | #include <iostream>
const int mod = 1000000007;
long long power(long long b, int p) {
long long ans = 1;
while (p) {
if (p % 2)
ans = (ans * b) % mod;
b = (b * b) % mod;
p /= 2;
}
return ans;
}
const int size = 20005;
int fact[size]{1, 1};
int df[size]{1, 1};
void Compute() {
for (int ... | #include <iostream>
const int mod = 1000000007;
long long power(long long b, int p) {
long long ans = 1;
while (p) {
if (p % 2)
ans = (ans * b) % mod;
b = (b * b) % mod;
p /= 2;
}
return ans;
}
const int size = 20005;
int fact[size]{1, 1};
int df[size]{1, 1};
void Compute() {
for (int ... | insert | 29 | 29 | 29 | 31 | 0 | |
p02990 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int mod = 1e9 + 7;
void comb(vector<vector<long long>> &v) {
for (int i = 0; i < v.size(); i++) {
v[i][0] = 1;
v[i][i] = 1;
}
for (int k = 1; k < v.size(); k++) {
for (int j = 1; j < k; j++) {
v[k][j] = (v[k - 1][j - 1] + v[k - 1][j]) % mod;
}
... | #include <bits/stdc++.h>
using namespace std;
int mod = 1e9 + 7;
void comb(vector<vector<long long>> &v) {
for (int i = 0; i < v.size(); i++) {
v[i][0] = 1;
v[i][i] = 1;
}
for (int k = 1; k < v.size(); k++) {
for (int j = 1; j < k; j++) {
v[k][j] = (v[k - 1][j - 1] + v[k - 1][j]) % mod;
}
... | replace | 28 | 29 | 28 | 29 | 0 | |
p02990 | C++ | Runtime Error | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <string>
#include <vector>
const int MOD = 1e9 + 7;
typedef long long ll;
using namespace std;
ll modfact[2001];
ll modpow(ll a, ll n) {
ll res = 1;
while (n > 0) {
if (n & 1)
res = res... | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <string>
#include <vector>
const int MOD = 1e9 + 7;
typedef long long ll;
using namespace std;
ll modfact[2001];
ll modpow(ll a, ll n) {
ll res = 1;
while (n > 0) {
if (n & 1)
res = res... | replace | 39 | 41 | 39 | 43 | 0 | |
p02990 | C++ | Runtime Error | #include <bits/stdc++.h>
#define F first
#define S second
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pll;
const int N = 5005, M = 1e9 + 7;
ll fact[N];
ll mul(ll a, ll b) {
a %= M;
b %= M;
return (a * b) % M;
}
void pre() {
fact[0] = 1;
for (int i = 1; i < N; ++i)
fact[i] = mul(fact[i ... | #include <bits/stdc++.h>
#define F first
#define S second
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pll;
const int N = 5005, M = 1e9 + 7;
ll fact[N];
ll mul(ll a, ll b) {
a %= M;
b %= M;
return (a * b) % M;
}
void pre() {
fact[0] = 1;
for (int i = 1; i < N; ++i)
fact[i] = mul(fact[i ... | replace | 36 | 40 | 36 | 43 | 0 | |
p02990 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define INF_LL (int64)1e18
#define INF (int32)1e9
#define REP(i, n) for (int64 i = 0; i < (n); i++)
#define FOR(i, a, b) for (int64 i = (a); i < (b); i++)
#define all(x) x.begin(), x.end()
#define fs first
#define sc second
using int32 = int_fast32_t;
using uint32 = uint_... | #include <bits/stdc++.h>
using namespace std;
#define INF_LL (int64)1e18
#define INF (int32)1e9
#define REP(i, n) for (int64 i = 0; i < (n); i++)
#define FOR(i, a, b) for (int64 i = (a); i < (b); i++)
#define all(x) x.begin(), x.end()
#define fs first
#define sc second
using int32 = int_fast32_t;
using uint32 = uint_... | replace | 235 | 236 | 235 | 237 | 0 | |
p02990 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define reg register
#define debug(x) cerr << #x << " = " << x << endl;
#define rep(a, b, c) for (reg int a = (b), a##_end_ = (c); a <= a##_end_; ++a)
#define ret(a, b, c) for (reg int a = (b), a##_end_ = (c); a < a##_end_; ++a)
#define drep(a, b, c)... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define reg register
#define debug(x) cerr << #x << " = " << x << endl;
#define rep(a, b, c) for (reg int a = (b), a##_end_ = (c); a <= a##_end_; ++a)
#define ret(a, b, c) for (reg int a = (b), a##_end_ = (c); a < a##_end_; ++a)
#define drep(a, b, c)... | insert | 41 | 41 | 41 | 46 | 0 | |
p02990 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int N = 100 * 1000 + 17;
const int MOD = 1000 * 1000 * 1000 + 7;
int n, k;
long long F[N];
bool read() {
if (!(cin >> n >> k))
return false;
return true;
}
long long binpow(long long a, int n) {
auto res = 1ll;
for (; n > 0; n /= 2, a = a * a % MOD)... | #include <bits/stdc++.h>
using namespace std;
const int N = 100 * 1000 + 17;
const int MOD = 1000 * 1000 * 1000 + 7;
int n, k;
long long F[N];
bool read() {
if (!(cin >> n >> k))
return false;
return true;
}
long long binpow(long long a, int n) {
auto res = 1ll;
for (; n > 0; n /= 2, a = a * a % MOD)... | replace | 29 | 30 | 29 | 32 | 0 | |
p02990 | C++ | Runtime Error | #include <algorithm>
#include <bits/stdc++.h>
#include <climits>
#include <cmath>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <sstream> // for string streams
#include <stack>
#include <string> // for string
#include <utility>
#include <vector>
#pragma comment(link... | #include <algorithm>
#include <bits/stdc++.h>
#include <climits>
#include <cmath>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <sstream> // for string streams
#include <stack>
#include <string> // for string
#include <utility>
#include <vector>
#pragma comment(link... | replace | 333 | 334 | 333 | 339 | 0 | |
p02990 | C++ | Memory Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = a; i < b; i++)
#define rep(i, b) FOR(i, 0, b)
#define INF mugen
#define dump(x) cerr << #x << "=" << x << endl
#define ALL(a) (a).begin(), (a).end()
#define EACH(e, v) for (auto &e : v)
#define SORT(v) sort(ALL(v))
#define PERM(v) ... | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = a; i < b; i++)
#define rep(i, b) FOR(i, 0, b)
#define INF mugen
#define dump(x) cerr << #x << "=" << x << endl
#define ALL(a) (a).begin(), (a).end()
#define EACH(e, v) for (auto &e : v)
#define SORT(v) sort(ALL(v))
#define PERM(v) ... | replace | 42 | 44 | 42 | 44 | MLE | |
p02990 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define sz(x) int(x.size())
using namespace std;
typedef long long ll;
const int mod = 1e9 + 7;
ll N, K;
struct mint {
ll x; // typedef long long ll;
mint(ll x = 0) : x((x % mod + mod) % mod) {}
mint operator-() const { return mint(-x); }... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define sz(x) int(x.size())
using namespace std;
typedef long long ll;
const int mod = 1e9 + 7;
ll N, K;
struct mint {
ll x; // typedef long long ll;
mint(ll x = 0) : x((x % mod + mod) % mod) {}
mint operator-() const { return mint(-x); }... | replace | 73 | 74 | 73 | 80 | -11 | |
p02990 | C++ | Runtime Error | #include <algorithm>
#include <chrono>
#include <cmath>
#include <fstream>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>
using namespace std;
const int MAX = 2001; // change here as problems
const int MOD = 1000000007;
int64_t fac[MAX], inv[MAX], finv[MAX]; // arrays for factor... | #include <algorithm>
#include <chrono>
#include <cmath>
#include <fstream>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>
using namespace std;
const int MAX = 2001; // change here as problems
const int MOD = 1000000007;
int64_t fac[MAX], inv[MAX], finv[MAX]; // arrays for factor... | replace | 44 | 45 | 44 | 48 | 0 | |
p02990 | C++ | Runtime Error | // Charan Sriramula
#include <bits/stdc++.h>
using namespace std;
typedef long double ld;
typedef long long int ll;
const ll lg = 22;
const ll N = 2e5 + 5;
const ll M = 5e8;
const ll INF = 1e18;
const ll mod = 1e9 + 7;
const double PI = 3.14159265358979323846;
#define is(n) scanf("%d", &n)
#define io(n) printf("%d\n... | // Charan Sriramula
#include <bits/stdc++.h>
using namespace std;
typedef long double ld;
typedef long long int ll;
const ll lg = 22;
const ll N = 2e5 + 5;
const ll M = 5e8;
const ll INF = 1e18;
const ll mod = 1e9 + 7;
const double PI = 3.14159265358979323846;
#define is(n) scanf("%d", &n)
#define io(n) printf("%d\n... | insert | 76 | 76 | 76 | 79 | 0 | |
p02990 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int mod = 1e9 + 7;
vector<vector<int>> dp(2009, vector<int>(2009, -1));
int comb(int k, int n) {
if (k > n)
return 0;
if (k == 0 || (n == k))
return 1;
if (dp[k][n] != -1)
return dp[k][n];
return dp[k][n] = (comb(k - 1, n ... | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int mod = 1e9 + 7;
vector<vector<int>> dp(2009, vector<int>(2009, -1));
int comb(int k, int n) {
if (k < 0 || n < 0 || k > n)
return 0;
if (k == 0 || (n == k))
return 1;
if (dp[k][n] != -1)
return dp[k][n];
return dp[k][n]... | replace | 10 | 11 | 10 | 11 | 0 | |
p02990 | C++ | Runtime Error | #include <limits.h>
#include <math.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int acs(const void *a, const void *b) {
return *(int *)a - *(int *)b;
} /* 1,2,3,4.. */
int des(const void *a, const void *b) {
return *(int *)b - *(int *)a;
} /* 8,7,6,5.. */
in... | #include <limits.h>
#include <math.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int acs(const void *a, const void *b) {
return *(int *)a - *(int *)b;
} /* 1,2,3,4.. */
int des(const void *a, const void *b) {
return *(int *)b - *(int *)a;
} /* 8,7,6,5.. */
in... | replace | 31 | 32 | 31 | 32 | -11 | |
p02990 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define mod 1000000007
ll com[2005][2005];
void solve(ll n, ll k) {
ll i, j;
for (i = 0; i <= n; i++) {
for (j = 0; j <= min(i, k); j++) {
if (j == 0 || j == i)
com[i][j] = 1;
else
com[i][j] = (com[i - 1][j - 1] + c... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define mod 1000000007
ll com[2005][2005];
void solve(ll n, ll k) {
ll i, j;
for (i = 0; i <= n; i++) {
for (j = 0; j <= min(i, k); j++) {
if (j == 0 || j == i)
com[i][j] = 1;
else
com[i][j] = (com[i - 1][j - 1] + c... | delete | 21 | 24 | 21 | 21 | -11 | |
p02990 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define... | #include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define... | replace | 85 | 88 | 85 | 89 | 0 | |
p02990 | C++ | Runtime Error | #include <iostream>
#include <stdio.h>
using namespace std;
#define REP(a, i, n) for (int i = a; i < n; ++i)
const int limitation = 2005;
long C[limitation][limitation]; // C[n][k] = n! / (k! * (n - k)!)
long calc(int i, int j) {
if (C[i][j] != 0)
return C[i][j];
if (i == j) {
C[i][j] = 1;
return 1... | #include <iostream>
#include <stdio.h>
using namespace std;
#define REP(a, i, n) for (int i = a; i < n; ++i)
const int limitation = 2005;
long C[limitation][limitation]; // C[n][k] = n! / (k! * (n - k)!)
long calc(int i, int j) {
if (C[i][j] != 0)
return C[i][j];
if (i < j) {
return 0;
} else if (i =... | replace | 14 | 15 | 14 | 17 | 0 | |
p02991 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define modulo 100000
#define mod(mod_x) ((((long long)mod_x) + modulo) % modulo)
#define Inf 1000000000
int dijkstra(vector<vector<pair<int, int>>> &E, int start, int goal) {
priority_queue<pair<int, pair<int, int>>, vector<pair<int, pair<int, int>>>,
g... | #include <bits/stdc++.h>
using namespace std;
#define modulo 100000
#define mod(mod_x) ((((long long)mod_x) + modulo) % modulo)
#define Inf 1000000000
int dijkstra(vector<vector<pair<int, int>>> &E, int start, int goal) {
priority_queue<pair<int, pair<int, int>>, vector<pair<int, pair<int, int>>>,
g... | replace | 10 | 11 | 10 | 11 | 0 | |
p02991 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
using std::cerr;
using std::cin;
using... | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
using std::cerr;
using std::cin;
using... | replace | 64 | 65 | 64 | 65 | 0 | |
p02991 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define all(x) (x).begin(), (x).end()
const int INF = 1001001001;
int N, M, S, T;
int dist[10005][3];
signed main() {
cin >> N >> M;
vector<vector<int>> edge(N);
rep(i, M) {
int x, y;
cin >> ... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define all(x) (x).begin(), (x).end()
const int INF = 1001001001;
int N, M, S, T;
int dist[100005][3];
signed main() {
cin >> N >> M;
vector<vector<int>> edge(N);
rep(i, M) {
int x, y;
cin >>... | replace | 7 | 8 | 7 | 8 | 0 | |
p02991 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
// long long
using ll = long long;
// pair<int, int>
using PII = pair<int, int>;
// 最大値、mod
const int MOD = 1000000007;
const int mod = 1000000007;
const int INF = 1000000000;
const long long LINF = 1e18;
const int MAX = 510000;
// 出力系
#define print(x) cout << x << endl... | #include <bits/stdc++.h>
using namespace std;
// long long
using ll = long long;
// pair<int, int>
using PII = pair<int, int>;
// 最大値、mod
const int MOD = 1000000007;
const int mod = 1000000007;
const int INF = 1000000000;
const long long LINF = 1e18;
const int MAX = 510000;
// 出力系
#define print(x) cout << x << endl... | insert | 326 | 326 | 326 | 328 | 0 | |
p02991 | C++ | Runtime Error | /*
* atcoder/abc132/e.cpp
*/
// C++ 14
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstring> // memset
#include <iostream>
#include <vector>
using namespace std;
#define ll long long
#define loop(__x, __start, __end) for (int __x = __start; __x < __end; __x++)
template <class T> ostream &operat... | /*
* atcoder/abc132/e.cpp
*/
// C++ 14
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstring> // memset
#include <iostream>
#include <vector>
using namespace std;
#define ll long long
#define loop(__x, __start, __end) for (int __x = __start; __x < __end; __x++)
template <class T> ostream &operat... | replace | 37 | 38 | 37 | 38 | 0 | |
p02991 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define loop(i, n) for (int i = 0; i < int(n); i++)
#define rloop(i, n) for (int i = int(n); i >= 0; i--)
#define range(i, a, b) for (int i = int(a); i <= int(b); i++)
#define SZ(c) int(c.size())
#define ALL(c) c.begin(), c.end()
#define RALL(c) c.rbegin(), c.rend()
#defi... | #include <bits/stdc++.h>
using namespace std;
#define loop(i, n) for (int i = 0; i < int(n); i++)
#define rloop(i, n) for (int i = int(n); i >= 0; i--)
#define range(i, a, b) for (int i = int(a); i <= int(b); i++)
#define SZ(c) int(c.size())
#define ALL(c) c.begin(), c.end()
#define RALL(c) c.rbegin(), c.rend()
#defi... | replace | 43 | 45 | 43 | 45 | -11 | |
p02991 | C++ | Time Limit Exceeded | #include <iostream>
#include <queue>
#include <tuple>
#include <utility>
#include <vector>
using namespace std;
constexpr int INF = 1e9;
int main() {
int N, M;
cin >> N >> M;
vector<vector<int>> G(N);
for (int i = 0; i < M; ++i) {
int u, v;
cin >> u >> v;
--u, --v;
G[u].push_back(v);
}
int ... | #include <iostream>
#include <queue>
#include <tuple>
#include <utility>
#include <vector>
using namespace std;
constexpr int INF = 1e9;
int main() {
int N, M;
cin >> N >> M;
vector<vector<int>> G(N);
for (int i = 0; i < M; ++i) {
int u, v;
cin >> u >> v;
--u, --v;
G[u].push_back(v);
}
int ... | replace | 32 | 33 | 32 | 33 | TLE | |
p02991 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define rep(i, N) for (int(i) = 0; (i) < (N); (i)++)
#define all(V) V.begin(), V.end()
using i64 = int_fast64_t;
using P = pair<int, int>;
void dfs(vector<vector<int>> &G, vector<vector<int>> &visited, int v,
int dist) {
if (visited[v][dist % 3] <= dist)
ret... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, N) for (int(i) = 0; (i) < (N); (i)++)
#define all(V) V.begin(), V.end()
using i64 = int_fast64_t;
using P = pair<int, int>;
void dfs(vector<vector<int>> &G, vector<vector<int>> &visited, int v,
int dist) {
if (visited[v][dist % 3] <= dist)
ret... | replace | 50 | 51 | 50 | 51 | TLE | |
p02991 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
// const bool debug=true;
const bool debug = false;
#define DEBUG if (debug == true)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const ll MOD = 1000000007;
int main(void) {
int n, m;
cin >> n >> m;
int ne... | #include <bits/stdc++.h>
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
// const bool debug=true;
const bool debug = false;
#define DEBUG if (debug == true)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const ll MOD = 1000000007;
int main(void) {
int n, m;
cin >> n >> m;
int ne... | replace | 38 | 39 | 38 | 39 | TLE | |
p02991 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i, l, r) for (int i = (int)(l); i < (int)(r); i++)
#define all(x) (x).begin(), (x).end()
#define pb push_back
template <class T> bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> bool chmi... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i, l, r) for (int i = (int)(l); i < (int)(r); i++)
#define all(x) (x).begin(), (x).end()
#define pb push_back
template <class T> bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> bool chmi... | replace | 50 | 51 | 50 | 53 | TLE | |
p02991 | C++ | Time Limit Exceeded | #define _USE_MATH_DEFINES
#include <algorithm>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
#define MOD 10... | #define _USE_MATH_DEFINES
#include <algorithm>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
#define MOD 10... | replace | 424 | 430 | 424 | 450 | TLE | |
p02991 | C++ | Runtime Error | #include <bits/stdc++.h>
#define F first
#define S second
#define PB push_back
using namespace std;
typedef long long LL;
typedef pair<int, int> PII;
typedef priority_queue<int> HEAP;
typedef priority_queue<int, vector<int>, greater<int>> RHEAP;
const int N = 100010, M = 3 * N;
int n, m;
int h[N], e[M], ne[M], idx... | #include <bits/stdc++.h>
#define F first
#define S second
#define PB push_back
using namespace std;
typedef long long LL;
typedef pair<int, int> PII;
typedef priority_queue<int> HEAP;
typedef priority_queue<int, vector<int>, greater<int>> RHEAP;
const int N = 300010, M = 3 * N;
int n, m;
int h[N], e[M], ne[M], idx... | replace | 13 | 14 | 13 | 14 | 0 | |
p02991 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define lli long long int
#define rep(i, n) for (lli i = 0; i < n; i++)
#define repb(i, n) for (lli i = n - 1; i >= 0; i--)
#define pb push_back
#define mp make_pair
#define bg() begin()
#define en() end()
#define ft first
#define sc second
#define vect_lli_it vector<lli>::... | #include <bits/stdc++.h>
using namespace std;
#define lli long long int
#define rep(i, n) for (lli i = 0; i < n; i++)
#define repb(i, n) for (lli i = n - 1; i >= 0; i--)
#define pb push_back
#define mp make_pair
#define bg() begin()
#define en() end()
#define ft first
#define sc second
#define vect_lli_it vector<lli>::... | replace | 62 | 63 | 62 | 65 | TLE | |
p02991 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define rep1(i, n) for (int i = 1; i <= (int)(n); ++i)
#define irep(i, a, n) for (int i = a; i < (int)(n); ++i)
#define rrep(i, n) for (int i = (int)(n)-1; i >= 0; --i)
#define rrep1(i, n) for (int i = (int)(n); i >= 1; --i)
#define allrep(V,... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define rep1(i, n) for (int i = 1; i <= (int)(n); ++i)
#define irep(i, a, n) for (int i = a; i < (int)(n); ++i)
#define rrep(i, n) for (int i = (int)(n)-1; i >= 0; --i)
#define rrep1(i, n) for (int i = (int)(n); i >= 1; --i)
#define allrep(V,... | replace | 68 | 69 | 68 | 80 | TLE | |
p02991 | 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)
#define all(a) (a).begin(), (a).end() // sort(all(vi S)) sort(all(string S))
#define print(v) \
{ ... | #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)
#define all(a) (a).begin(), (a).end() // sort(all(vi S)) sort(all(string S))
#define print(v) \
{ ... | replace | 35 | 36 | 35 | 36 | 0 | |
p02991 | C++ | Runtime Error | // Author : Sarthak Kapoor
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
#define rep(i, n) for (int i = 0; i < n; ++i)
#define repa(i, a, n) for (int i = a; i < n; ++i)
#define repr(i, n) for (int i = n - 1; i >= 0; --i)
#define repba(i, b, a) for (in... | // Author : Sarthak Kapoor
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
#define rep(i, n) for (int i = 0; i < n; ++i)
#define repa(i, a, n) for (int i = a; i < n; ++i)
#define repr(i, n) for (int i = n - 1; i >= 0; --i)
#define repba(i, b, a) for (in... | replace | 57 | 61 | 57 | 58 | -6 | terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
|
p02991 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 1;
int n, m;
int f[3][N];
vector<int> g[N];
int main() {
cin >> n >> m;
for (int i = 0; i < m; ++i) {
int u, v;
cin >> u >> v;
--u, --v;
g[u].push_back(v);
}
int S, F;
cin >> S >> F;
--S, --F;
for (int j = 0; j < 3; ++j... | #include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 1;
int n, m;
int f[3][N];
vector<int> g[N];
int main() {
cin >> n >> m;
for (int i = 0; i < m; ++i) {
int u, v;
cin >> u >> v;
--u, --v;
g[u].push_back(v);
}
int S, F;
cin >> S >> F;
--S, --F;
for (int j = 0; j < 3; ++j... | replace | 25 | 26 | 25 | 26 | 0 | |
p02991 | C++ | Runtime Error | #include <iostream>
#include <queue>
#include <vector>
#define NMAX 10000
#define MOD 1000000007
#define INF 2000000000
#define MIN(a, b) (a < b ? a : b)
using namespace std;
struct Node {
int node;
int level;
};
int n, m;
int s, t;
vector<int> graph[3 * NMAX];
queue<Node> Q;
bool vis[3 * NMAX];
int main() {
... | #include <iostream>
#include <queue>
#include <vector>
#define NMAX 100000
#define MOD 1000000007
#define INF 2000000000
#define MIN(a, b) (a < b ? a : b)
using namespace std;
struct Node {
int node;
int level;
};
int n, m;
int s, t;
vector<int> graph[3 * NMAX];
queue<Node> Q;
bool vis[3 * NMAX];
int main() {... | replace | 4 | 5 | 4 | 5 | 0 | |
p02991 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <functional>
#include <iostream>
#include <numeric>
#include <queue>
#include <string>
#include <vector>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define INF 2e9
#define A... | #include <algorithm>
#include <cmath>
#include <functional>
#include <iostream>
#include <numeric>
#include <queue>
#include <string>
#include <vector>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define INF 2e9
#define A... | replace | 60 | 66 | 60 | 68 | -11 | |
p02991 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define M 100001
struct D {
int x, step;
} nxt;
int n, m, st, ed;
vector<int> edge[M];
bool mark[M][3];
int spfa() {
queue<D> Q;
Q.push((D){st, 0});
mark[st][0] = 1;
while (!Q.empty()) {
D now = Q.front();
Q.pop();
for (int i = 0; i < edge[now.x].size(... | #include <bits/stdc++.h>
using namespace std;
#define M 100001
struct D {
int x, step;
} nxt;
int n, m, st, ed;
vector<int> edge[M];
bool mark[M][3];
int spfa() {
queue<D> Q;
Q.push((D){st, 0});
mark[st][0] = 1;
while (!Q.empty()) {
D now = Q.front();
Q.pop();
for (int i = 0; i < edge[now.x].size(... | insert | 21 | 21 | 21 | 22 | TLE | |
p02991 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (ll i = 0; i < (ll)(n); ++i)
#define erep(i, n) for (ll i = 0; i <= (ll)(n); ++i)
#define FOR(i, a, b) for (ll i = (a); i < (ll)(b); ++i)
#define EFOR(i, a, b) for (ll i = (a); i <= (ll)(b); ++i)
void chmax(ll &a, ll b) { a = max... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (ll i = 0; i < (ll)(n); ++i)
#define erep(i, n) for (ll i = 0; i <= (ll)(n); ++i)
#define FOR(i, a, b) for (ll i = (a); i < (ll)(b); ++i)
#define EFOR(i, a, b) for (ll i = (a); i <= (ll)(b); ++i)
void chmax(ll &a, ll b) { a = max... | replace | 57 | 59 | 57 | 69 | TLE | |
p02991 | C++ | Runtime Error | #include <iostream>
#include <queue>
#include <vector>
using namespace std;
const int MAX = 1000000;
typedef pair<int, int> P;
int main() {
int N, M, S, T, u, v;
vector<int> vec[30000];
int ans[30000];
priority_queue<P, vector<P>, greater<P>> que;
P p;
cin >> N >> M;
for (int i = 0; i < M; i++) {
cin ... | #include <iostream>
#include <queue>
#include <vector>
using namespace std;
const int MAX = 1000000;
typedef pair<int, int> P;
int main() {
int N, M, S, T, u, v;
vector<int> vec[300000];
int ans[300000];
priority_queue<P, vector<P>, greater<P>> que;
P p;
cin >> N >> M;
for (int i = 0; i < M; i++) {
ci... | replace | 8 | 10 | 8 | 10 | 0 | |
p02991 | C++ | Time Limit Exceeded | // #include<bits/stdc++.h>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
#define INF 1000... | // #include<bits/stdc++.h>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
#define INF 1000... | replace | 44 | 45 | 44 | 45 | TLE | |
p02991 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef pair<int, int> P;
const int INF = 1001001001;
int dist[20005][3];
int main() {
int n, m;
cin >> n >> m;
vector<vector<int>> to(n);
rep(i, m) {
int u, v;
cin >> u >> v;
u--;
v--;
to[u].push... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef pair<int, int> P;
const int INF = 1001001001;
int dist[100005][3];
int main() {
int n, m;
cin >> n >> m;
vector<vector<int>> to(n);
rep(i, m) {
int u, v;
cin >> u >> v;
u--;
v--;
to[u].pus... | replace | 6 | 7 | 6 | 7 | 0 | |
p02991 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#include <stdio.h>
using namespace std;
#define inputInt(a) \
int a; \
cin >> a;
#define inputInt2(a, b) \... | #include <bits/stdc++.h>
#include <stdio.h>
using namespace std;
#define inputInt(a) \
int a; \
cin >> a;
#define inputInt2(a, b) \... | replace | 329 | 330 | 329 | 331 | TLE | |
p02991 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define MIN(a) *min_element(all(a))
#define MAX(a) *max_element(all(a))
#define SUM(a) accumulate(all(a), 0LL)
#define REP(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define RREP(i, n) for (int(i)... | #include <bits/stdc++.h>
using namespace std;
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define MIN(a) *min_element(all(a))
#define MAX(a) *max_element(all(a))
#define SUM(a) accumulate(all(a), 0LL)
#define REP(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define RREP(i, n) for (int(i)... | replace | 207 | 208 | 207 | 208 | TLE | |
p02991 | C++ | Time Limit Exceeded | // #include <atcoder/all>
#include <bits/stdc++.h>
using namespace std;
// using namespace atcoder;
#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... | // #include <atcoder/all>
#include <bits/stdc++.h>
using namespace std;
// using namespace atcoder;
#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... | replace | 50 | 51 | 50 | 53 | TLE | |
p02991 | C++ | Runtime Error | /*
* じょえチャンネル
* 高評価・チャンネル登録よろしくおねがいします!
* https://www.youtube.com/channel/UCRXsI3FL_kvaVL9zoolBfbQ
*/
#include <bits/stdc++.h>
#define f(i, n) for (int i = 0; i < (n); i++)
#define inf (int)(3e18)
#define int long long
#define mod (int)(1000000007)
#define intt long long
#define P pair<int, int>
#define rep(i,... | /*
* じょえチャンネル
* 高評価・チャンネル登録よろしくおねがいします!
* https://www.youtube.com/channel/UCRXsI3FL_kvaVL9zoolBfbQ
*/
#include <bits/stdc++.h>
#define f(i, n) for (int i = 0; i < (n); i++)
#define inf (int)(3e18)
#define int long long
#define mod (int)(1000000007)
#define intt long long
#define P pair<int, int>
#define rep(i,... | replace | 234 | 237 | 234 | 237 | 0 | |
p02991 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
const ll mod = 1e9 + 7;
const ll MAXN = 2e3 + 5;
vector<vector<ll>> adj(MAXN, vector<ll>());
vector<vector<ll>> d(MAXN, vector<ll>(3, LLONG_MAX));
vector<bool> used(MAXN, false);
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
const ll mod = 1e9 + 7;
const ll MAXN = 1e5 + 5;
vector<vector<ll>> adj(MAXN, vector<ll>());
vector<vector<ll>> d(MAXN, vector<ll>(3, LLONG_MAX));
vector<bool> used(MAXN, false);
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
... | replace | 7 | 8 | 7 | 8 | 0 | |
p02991 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <st... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <st... | replace | 23 | 24 | 23 | 24 | 0 | |
p02991 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
struct edge {
int to, cost;
};
typedef pair<int, int> P;
int n;
vector<edge> g[300030];
int d[100010];
int inf = 2000000007;
void dijkstra(int s) {
priority_queue<P, vector<P>, greater<P>> que;
for (int i = 0; i <= 3 * n; i++) {
d[i] = inf;
}
d[s] = 0;
qu... | #include <bits/stdc++.h>
using namespace std;
struct edge {
int to, cost;
};
typedef pair<int, int> P;
int n;
vector<edge> g[300030];
int d[300030];
int inf = 2000000007;
void dijkstra(int s) {
priority_queue<P, vector<P>, greater<P>> que;
for (int i = 0; i <= 3 * n; i++) {
d[i] = inf;
}
d[s] = 0;
qu... | replace | 10 | 11 | 10 | 11 | 0 | |
p02991 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define rep1(i, n) for (int i = 1; i <= (int)(n); ++i)
#define irep(i, a, n) for (int i = a; i < (int)(n); ++i)
#define rrep(i, n) for (int i = (int)(n)-1; i >= 0; --i)
#define rrep1(i, n) for (int i = (int)(n); i >= 1; --i)
#define allrep(V,... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define rep1(i, n) for (int i = 1; i <= (int)(n); ++i)
#define irep(i, a, n) for (int i = a; i < (int)(n); ++i)
#define rrep(i, n) for (int i = (int)(n)-1; i >= 0; --i)
#define rrep1(i, n) for (int i = (int)(n); i >= 1; --i)
#define allrep(V,... | replace | 60 | 61 | 60 | 72 | TLE | |
p02991 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
using P = pair<int, int>;
int n, m;
vector<vector<int>> G;
int s, t;
ll dist[10010][3];
ll bfs() {
memset(dist, -1LL, sizeof(dist));
dist[s][0] = 0;
queue<P> stt;
stt.push(P(s, 0));
while (!stt.empty()) {
int v = stt.front().first;
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
using P = pair<int, int>;
int n, m;
vector<vector<int>> G;
int s, t;
ll dist[100010][3];
ll bfs() {
memset(dist, -1LL, sizeof(dist));
dist[s][0] = 0;
queue<P> stt;
stt.push(P(s, 0));
while (!stt.empty()) {
int v = stt.front().first;
... | replace | 8 | 9 | 8 | 9 | 0 | |
p02991 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define rep(i, a, b) for (int i = (a); i < (b); i++)
#define per(i, a, b) for (int i = (b)-1; i >= (a); i--)
#define pb push_back
#define mp make_pair
#define ... | #include <algorithm>
#include <cmath>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define rep(i, a, b) for (int i = (a); i < (b); i++)
#define per(i, a, b) for (int i = (b)-1; i >= (a); i--)
#define pb push_back
#define mp make_pair
#define ... | insert | 61 | 61 | 61 | 63 | TLE | |
p02991 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
template <typename T> vector<T> make_vector(size_t sz) { return vector<T>(sz); }
template <typename T, typename... U> auto make_vector(size_t sz, U... tail) {
return vector<decltype(make_vector<T>(tail...))>(sz, make_vector<T>(tail...));
}
template <typename T> void fi... | #include <bits/stdc++.h>
using namespace std;
template <typename T> vector<T> make_vector(size_t sz) { return vector<T>(sz); }
template <typename T, typename... U> auto make_vector(size_t sz, U... tail) {
return vector<decltype(make_vector<T>(tail...))>(sz, make_vector<T>(tail...));
}
template <typename T> void fi... | replace | 62 | 63 | 62 | 63 | 0 | |
p02991 | C++ | Time Limit Exceeded | /**
* @brief : c++ code for AtCoder
* @author : rk222
* @created: 2019.06.29 20:58:50
*/
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typed... | /**
* @brief : c++ code for AtCoder
* @author : rk222
* @created: 2019.06.29 20:58:50
*/
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typed... | replace | 85 | 86 | 85 | 108 | TLE | |
p02991 | C++ | Time Limit Exceeded | #pragma once
#include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>
... | #pragma once
#include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>
... | replace | 121 | 122 | 121 | 122 | TLE | |
p02991 | C++ | Time Limit Exceeded | /*input
*/
#include <bits/stdc++.h>
using namespace std;
#define all(a) a.begin(), a.end()
#define ff first
#define ss second
#define pb push_back
using ll = long long;
using pii = pair<int, int>;
template <typename T> using V = vector<T>;
const int MAX_N = 1e5 + 5;
vector<int> adj[3 * MAX_N];
bool visit[3 * MAX_N... | /*input
*/
#include <bits/stdc++.h>
using namespace std;
#define all(a) a.begin(), a.end()
#define ff first
#define ss second
#define pb push_back
using ll = long long;
using pii = pair<int, int>;
template <typename T> using V = vector<T>;
const int MAX_N = 1e5 + 5;
vector<int> adj[3 * MAX_N];
bool visit[3 * MAX_N... | insert | 44 | 44 | 44 | 46 | TLE | |
p02991 | C++ | Time Limit Exceeded | #include "bits/stdc++.h"
using namespace std;
using ll = long long;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
#define FOR(k, m, n) for (ll(k) = (m); (k) < (n); (k)++)
#define REP(i, n) FOR((i), 0, (n))
#define WAITING(str) \... | #include "bits/stdc++.h"
using namespace std;
using ll = long long;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
#define FOR(k, m, n) for (ll(k) = (m); (k) < (n); (k)++)
#define REP(i, n) FOR((i), 0, (n))
#define WAITING(str) \... | replace | 46 | 47 | 46 | 47 | TLE | |
p02991 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
// #include <ext/pb_ds/detail/standard_policies.hpp>
using namespace std;
using namespace __gnu_pbds;
// const ll RANDOM =
// chrono::high_resolution_clock::now().time_since_epoch().count();
// gp_hash_table<int, int>... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
// #include <ext/pb_ds/detail/standard_policies.hpp>
using namespace std;
using namespace __gnu_pbds;
// const ll RANDOM =
// chrono::high_resolution_clock::now().time_since_epoch().count();
// gp_hash_table<int, int>... | replace | 53 | 54 | 53 | 54 | 0 | |
p02991 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long int64;
#define repeat(i, n) forloop(i, 0, n)
#define forloop(i, a, b) for (int i = (a); i < (b); ++i)
#define debug(x) \
cerr << #x << ": " << x << " " ... | #include <bits/stdc++.h>
using namespace std;
typedef long long int64;
#define repeat(i, n) forloop(i, 0, n)
#define forloop(i, a, b) for (int i = (a); i < (b); ++i)
#define debug(x) \
cerr << #x << ": " << x << " " ... | replace | 65 | 66 | 65 | 66 | TLE | |
p02991 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define sz(x) int(x.size())
#define show(x) \
{ \
for (auto i : x) { ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define sz(x) int(x.size())
#define show(x) \
{ \
for (auto i : x) { ... | replace | 56 | 57 | 56 | 58 | TLE | |
p02991 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<int, int> Pi;
typedef vector<ll> Vec;
typedef vector<int> Vi;
typedef vector<string> Vs;
typedef vector<vector<ll>> VV;
#define REP(i, a, b) for (ll i = (a); i < (b); i++)
#define rep(i, n) REP(i, 0, n)
const int... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<int, int> Pi;
typedef vector<ll> Vec;
typedef vector<int> Vi;
typedef vector<string> Vs;
typedef vector<vector<ll>> VV;
#define REP(i, a, b) for (ll i = (a); i < (b); i++)
#define rep(i, n) REP(i, 0, n)
const int... | replace | 62 | 63 | 62 | 63 | 0 | |
p02991 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rp(i, k, n) for (int i = k; i < n; i++)
typedef long long ll;
typedef double ld;
ll mod = 1e9 + 7ll;
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 ... | #include <bits/stdc++.h>
using namespace std;
#define rp(i, k, n) for (int i = k; i < n; i++)
typedef long long ll;
typedef double ld;
ll mod = 1e9 + 7ll;
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 ... | replace | 23 | 24 | 23 | 24 | 0 | |
p02991 | 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 pb push_back
using ll = long long;
using P = pair<int, int>;
using Graph = vector<vector<int>>;
const int INF = 1001001001;
int dist[1000... | #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 pb push_back
using ll = long long;
using P = pair<int, int>;
using Graph = vector<vector<int>>;
const int INF = 1001001001;
int dist[1000... | delete | 16 | 17 | 16 | 16 | -6 | terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
|
p02991 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define Int int64_t
#define dump(x) cout << (x) << endl
#define fi first
#define se second
Int mod = 1e9 + 7;
Int INF = 1e18;
double EPS = 0.00000001;
// Int mod = 1e6+3;
Int n, m;
vector<Int> G[300005];
Int s, t;
Int d[300005];
void dfs(Int x) {
for (Int i = 0; i < (In... | #include <bits/stdc++.h>
using namespace std;
#define Int int64_t
#define dump(x) cout << (x) << endl
#define fi first
#define se second
Int mod = 1e9 + 7;
Int INF = 1e18;
double EPS = 0.00000001;
// Int mod = 1e6+3;
Int n, m;
vector<Int> G[300005];
Int s, t;
Int d[300005];
void dfs(Int x) {
for (Int i = 0; i < (In... | replace | 41 | 44 | 41 | 54 | TLE | |
p02991 | C++ | Time Limit Exceeded | #include "bits/stdc++.h"
using namespace std;
////////////// Prewritten code follows. Look down for solution. ////////////////
#define fs first
#define sc second
#define pb push_back
#define mp(a, b) make_pair(a, b)
#define len(x) ((int)(x).size())
#define all(x) (x).begin(), (x).end()
#define fastio ... | #include "bits/stdc++.h"
using namespace std;
////////////// Prewritten code follows. Look down for solution. ////////////////
#define fs first
#define sc second
#define pb push_back
#define mp(a, b) make_pair(a, b)
#define len(x) ((int)(x).size())
#define all(x) (x).begin(), (x).end()
#define fastio ... | insert | 56 | 56 | 56 | 57 | TLE | |
p02991 | 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>;
int n, m, s, t;
vi adj[100001];
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cin >> n >> m;
for (int i = 0; i... | #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>;
int n, m, s, t;
vi adj[100001];
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cin >> n >> m;
for (int i = 0; i... | replace | 23 | 24 | 23 | 24 | 0 | |
p02991 | 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;
typedef pair<ll, ll> P;
struct edge {
ll to, cost;
};
const int MAX_V = 100000;
const ll INF = 1LL << 60;
int V;
vector<edge> G[MAX_V];
ll d[MAX_V];
void dijkstra(ll s) {
// greater<P>を指定することでfirstが... | #include "bits/stdc++.h"
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
struct edge {
ll to, cost;
};
const int MAX_V = 300000;
const ll INF = 1LL << 60;
int V;
vector<edge> G[MAX_V];
ll d[MAX_V];
void dijkstra(ll s) {
// greater<P>を指定することでfirstが... | replace | 10 | 11 | 10 | 11 | 0 | |
p02991 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <queue>
#include <utility>
#include <vector>
using namespace std;
#define ll long long
// <最短距離, 頂点の番号>
typedef pair<ll, ll> P;
const int INF = 1e9;
const int MAX_N = 1000;
struct edge {
int to;
int cost;
};
// ノード数
int V;
// ある頂点から出るエッジを保持
vector<edge> G[MAX_N];
... | #include <algorithm>
#include <iostream>
#include <queue>
#include <utility>
#include <vector>
using namespace std;
#define ll long long
// <最短距離, 頂点の番号>
typedef pair<ll, ll> P;
const int INF = 1e9;
const int MAX_N = 3 * 1000000;
struct edge {
int to;
int cost;
};
// ノード数
int V;
// ある頂点から出るエッジを保持
vector<edge> G[M... | replace | 11 | 12 | 11 | 12 | 0 | |
p02991 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
using namespace std;
using namespace __gnu_pbds;
typedef tree<int, null_type, less<int>, rb_tree_tag,
tree_order_statistics_node_update>
o... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
using namespace std;
using namespace __gnu_pbds;
typedef tree<int, null_type, less<int>, rb_tree_tag,
tree_order_statistics_node_update>
o... | replace | 34 | 36 | 34 | 36 | TLE | |
p02991 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
int main() {
using namespace std;
size_t N, M;
cin >> N >> M;
vector<vector<unsigned long>> edge(3 * N);
for (size_t i = 0, u, v; i < M; ++i) {
cin >> u >> v;
--u;
--v;
edge[u].push_back(v + N);
edge[u + N].push_back(v + 2 * N);
edge[u + 2 * N].push_back(v);
... | #include <bits/stdc++.h>
int main() {
using namespace std;
size_t N, M;
cin >> N >> M;
vector<vector<unsigned long>> edge(3 * N);
for (size_t i = 0, u, v; i < M; ++i) {
cin >> u >> v;
--u;
--v;
edge[u].push_back(v + N);
edge[u + N].push_back(v + 2 * N);
edge[u + 2 * N].push_back(v);
... | insert | 25 | 25 | 25 | 27 | TLE | |
p02991 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
#include <string>
#include <unistd.h>
#include <vector>
#define mod (1e9 + 7)
#define pb push_back
using namespace std;
typedef pair<int, int> pii;
vector<vector<int>> vvi;
int vis[111111][3];
int main() {
int n, m;
ci... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
#include <string>
#include <unistd.h>
#include <vector>
#define mod (1e9 + 7)
#define pb push_back
using namespace std;
typedef pair<int, int> pii;
vector<vector<int>> vvi;
int vis[111111][3];
int main() {
int n, m;
ci... | replace | 47 | 48 | 47 | 48 | 0 | |
p02991 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <queue>
#include <utility>
using namespace std;
#define int long long
#define REP(i, n) for (int i = 0; i < (int)(n); ++i)
#define DEBUG(x) cerr << #x << " = " << x << endl
constexpr int INF = (int)1e9;
int d[10000][3];
signed main() {
int N, M;
cin >> N >> M;
vec... | #include <algorithm>
#include <iostream>
#include <queue>
#include <utility>
using namespace std;
#define int long long
#define REP(i, n) for (int i = 0; i < (int)(n); ++i)
#define DEBUG(x) cerr << #x << " = " << x << endl
constexpr int INF = (int)1e9;
int d[100000][3];
signed main() {
int N, M;
cin >> N >> M;
ve... | replace | 9 | 10 | 9 | 10 | 0 | |
p02991 | C++ | Runtime Error | #include <bits/stdc++.h>
#define For(a, b, c) for (int a = b; a <= c; ++a)
#define Dor(a, b, c) for (int a = b; a >= c; --a)
using namespace std;
const int N = 100007;
int n, m, s, e, hd[N], nt[N], to[N], Q[N * 3], D[N * 3], F[N * 3], B[N][3];
int main() {
scanf("%d%d", &n, &m);
For(i, 1, m) {
int x, y;
sca... | #include <bits/stdc++.h>
#define For(a, b, c) for (int a = b; a <= c; ++a)
#define Dor(a, b, c) for (int a = b; a >= c; --a)
using namespace std;
const int N = 100007;
int n, m, s, e, hd[N], nt[N], to[N], Q[N * 3], D[N * 3], F[N * 3], B[N][3];
int main() {
scanf("%d%d", &n, &m);
For(i, 1, m) {
int x, y;
sca... | replace | 20 | 21 | 20 | 22 | 0 | |
p02991 | C++ | Time Limit Exceeded | #pragma GCC optimize("Ofast")
#pragma GCC target( \
"sse,sse2,sse3,ssse3,sse4,popcnt,fma,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp>
#include <functional> //... | #pragma GCC optimize("Ofast")
#pragma GCC target( \
"sse,sse2,sse3,ssse3,sse4,popcnt,fma,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp>
#include <functional> //... | replace | 177 | 178 | 177 | 196 | TLE | |
p02991 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define M 1000000007
#define N 1000016
#define ff first.first
#define fs first.second
#define sf second.first
#define ss second.second
#define f first
#define s second
#define inf 9000000000000000000
ll dis[100001], cur;... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define M 1000000007
#define N 1000016
#define ff first.first
#define fs first.second
#define sf second.first
#define ss second.second
#define f first
#define s second
#define inf 9000000000000000000
ll dis[100001], cur;... | insert | 54 | 54 | 54 | 56 | TLE | |
p02991 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define REPr(i, n) for (int i = (n)-1; i >= 0; --i)
#define FORq(i, m, n) for (int i = (m); i <= (n); ++i)
#define FORqr(i, m, n) for (int i = (n); i >= (m); --i)
#define PB push_back
#define M... | #include <bits/stdc++.h>
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define REPr(i, n) for (int i = (n)-1; i >= 0; --i)
#define FORq(i, m, n) for (int i = (m); i <= (n); ++i)
#define FORqr(i, m, n) for (int i = (n); i >= (m); --i)
#define PB push_back
#define M... | insert | 87 | 87 | 87 | 88 | TLE | |
p02991 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int n, m, s, t;
vector<int> adjl[100002];
int dist[100002][3];
queue<pair<int, int>> bfs;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
memset(dist, -1, sizeof dist);
cin >> n >> m;
for (int i = 0; i < m; i++) {
int u, v;
cin >> u >> v;
adjl... | #include <bits/stdc++.h>
using namespace std;
int n, m, s, t;
vector<int> adjl[100002];
int dist[100002][3];
queue<pair<int, int>> bfs;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
memset(dist, -1, sizeof dist);
cin >> n >> m;
for (int i = 0; i < m; i++) {
int u, v;
cin >> u >> v;
adjl... | replace | 24 | 25 | 24 | 25 | TLE |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.