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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p03253 | C++ | Runtime Error | #include <algorithm>
#include <complex>
#include <iostream>
#include <map>
#include <vector>
using namespace std;
int main() {
long mod = 1000000007;
int n = 0, m = 0;
cin >> n;
cin >> m;
int mm = m;
vector<pair<int, int>> vec;
for (int i = 2; i * i <= mm; i++) {
int cnt = 0;
while (mm % i ==... | #include <algorithm>
#include <complex>
#include <iostream>
#include <map>
#include <vector>
using namespace std;
int main() {
long mod = 1000000007;
int n = 0, m = 0;
cin >> n;
cin >> m;
int mm = m;
vector<pair<int, int>> vec;
for (int i = 2; i * i <= mm; i++) {
int cnt = 0;
while (mm % i ==... | replace | 36 | 38 | 36 | 38 | 0 | |
p03253 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstring>
#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
#define MOD 1000000007
#define REP(var, n) for (int var = 0; var < (n); var++)
#define REPP(var, n) for (int var = 1; var < (n); var++)
#define ALL... | #include <algorithm>
#include <cmath>
#include <cstring>
#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
#define MOD 1000000007
#define REP(var, n) for (int var = 0; var < (n); var++)
#define REPP(var, n) for (int var = 1; var < (n); var++)
#define ALL... | replace | 22 | 23 | 22 | 23 | TLE | |
p03253 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
// 型定義
typedef long long ll;
typedef pair<ll, ll> P;
// forループ
#define REP(i, n) for (ll i = 0; i < (ll)(n); ++i)
// 定数宣言
const int INF = 1e9;
const int MOD = 1e9 + 7;
const ll LINF = 1e18;
// グラフ表現
using Graph = vector<vector<int>>;
// グラフの辺表現
using Edge = map<pair<in... | #include <bits/stdc++.h>
using namespace std;
// 型定義
typedef long long ll;
typedef pair<ll, ll> P;
// forループ
#define REP(i, n) for (ll i = 0; i < (ll)(n); ++i)
// 定数宣言
const int INF = 1e9;
const int MOD = 1e9 + 7;
const ll LINF = 1e18;
// グラフ表現
using Graph = vector<vector<int>>;
// グラフの辺表現
using Edge = map<pair<in... | replace | 38 | 39 | 38 | 39 | 0 | |
p03253 | C++ | Time Limit Exceeded | #include <cstdio>
#include <map>
#include <vector>
using namespace std;
#define MOD 1000000007
long long factorial[100010] = {};
long long fact_inv[100010] = {};
long long inv[100010] = {};
int N = 100000;
long long power(long long n, int p) {
if (p == 0) {
return 1;
}
if (p == 1) {
return n % MOD;
... | #include <cstdio>
#include <map>
#include <vector>
using namespace std;
#define MOD 1000000007
long long factorial[200010] = {};
long long fact_inv[200010] = {};
long long inv[200010] = {};
int N = 200001;
long long power(long long n, int p) {
if (p == 0) {
return 1;
}
if (p == 1) {
return n % MOD;
... | replace | 8 | 12 | 8 | 12 | TLE | |
p03253 | C++ | Runtime Error | #include <iostream>
#include <vector>
using namespace std;
using ll = long long;
const int MAX = 510000;
const int MOD = 1000000007;
long long fac[MAX], finv[MAX], inv[MAX];
// テーブルを作る事前計算
void COMinit() {
fac[0] = fac[1] = 1;
finv[0] = finv[1] = 1;
inv[1] = 1;
for (int i = 2; i < MAX; i++) {
fac[i] = fa... | #include <iostream>
#include <vector>
using namespace std;
using ll = long long;
const int MAX = 510000;
const int MOD = 1000000007;
long long fac[MAX], finv[MAX], inv[MAX];
// テーブルを作る事前計算
void COMinit() {
fac[0] = fac[1] = 1;
finv[0] = finv[1] = 1;
inv[1] = 1;
for (int i = 2; i < MAX; i++) {
fac[i] = fa... | insert | 47 | 47 | 47 | 51 | 0 | |
p03253 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define init_random \
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count())
#define start_routine \
cin.tie(0); ... | #include <bits/stdc++.h>
using namespace std;
#define init_random \
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count())
#define start_routine \
cin.tie(0); ... | replace | 69 | 70 | 69 | 70 | -11 | |
p03253 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define fi first
#define se second
#define pb push_back
#define all(v) (v).begin(), (v).end()
ll mod = 1000000007;
ll INF = 1000000099;
// cin.tie(0);
// ios::sync_with_stdio(false);
vector<pair<ll, ll>> factorize(ll x) { // mapを返す関数
vector<pair<ll,... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define fi first
#define se second
#define pb push_back
#define all(v) (v).begin(), (v).end()
ll mod = 1000000007;
ll INF = 1000000099;
// cin.tie(0);
// ios::sync_with_stdio(false);
vector<pair<ll, ll>> factorize(ll x) { // mapを返す関数
vector<pair<ll,... | replace | 32 | 33 | 32 | 33 | TLE | |
p03253 | C++ | Runtime Error | // header
#ifdef LOCAL
#include "/Users/takakurashokichi/Desktop/atcoder/cxx-prettyprint-master/prettyprint.hpp"
#define debug(x) cout << x << endl
#else
#define debug(...) 42
#endif
#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
// types
using namespace std;
using ll = long long;
using ul = unsigned long long;... | // header
#ifdef LOCAL
#include "/Users/takakurashokichi/Desktop/atcoder/cxx-prettyprint-master/prettyprint.hpp"
#define debug(x) cout << x << endl
#else
#define debug(...) 42
#endif
#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
// types
using namespace std;
using ll = long long;
using ul = unsigned long long;... | replace | 305 | 306 | 305 | 306 | 0 | |
p03253 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ull = unsigned long long;
using ll = long long;
#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 pb push_back
#define fill(x, y) memset(x, y, sizeof(x))
#define eve... | #include <bits/stdc++.h>
using namespace std;
using ull = unsigned long long;
using ll = long long;
#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 pb push_back
#define fill(x, y) memset(x, y, sizeof(x))
#define eve... | replace | 175 | 176 | 175 | 178 | TLE | |
p03253 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define REP(i, n) for (int(i) = 0; (i) < (n); ++(i))
#define MOD 1000000007
#define MAX 1000000
using namespace std;
typedef long long ll;
long long fac[MAX], finv[MAX], inv[MAX];
// テーブルを作る前処理
void COMinit() {
fac[0] = fac[1] = 1;
finv[0] = finv[1] = 1;
inv[1] = 1;
for (int i = 2;... | #include <bits/stdc++.h>
#define REP(i, n) for (int(i) = 0; (i) < (n); ++(i))
#define MOD 1000000007
#define MAX 1000000
using namespace std;
typedef long long ll;
long long fac[MAX], finv[MAX], inv[MAX];
// テーブルを作る前処理
void COMinit() {
fac[0] = fac[1] = 1;
finv[0] = finv[1] = 1;
inv[1] = 1;
for (int i = 2;... | replace | 53 | 60 | 53 | 62 | TLE | |
p03253 | C++ | Time Limit Exceeded | #include "bits/stdc++.h"
#define rep(i, b) for (ll i = 0; i < b; i++)
#define ll long long
using namespace std;
template <typename T> void SSS(T &t) { cin >> t; }
#define SS(T, ...) \
T __VA_ARGS__; ... | #include "bits/stdc++.h"
#define rep(i, b) for (ll i = 0; i < b; i++)
#define ll long long
using namespace std;
template <typename T> void SSS(T &t) { cin >> t; }
#define SS(T, ...) \
T __VA_ARGS__; ... | replace | 201 | 202 | 201 | 205 | TLE | |
p03253 | C++ | Runtime Error |
// include
//------------------------------------------
#include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
... |
// include
//------------------------------------------
#include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
... | replace | 156 | 157 | 156 | 157 | 0 | |
p03253 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const int inf = 0x3f3f3f3f;
const int mod = 1e9 + 7;
const int maxn = 2e5 + 100;
ll f[maxn], inv[maxn];
ll powmod(ll a, ll b) {
ll ret = 1;
while (b) {
if (b & 1)
ret = ret * a % mod;
a = a * a % mod... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const int inf = 0x3f3f3f3f;
const int mod = 1e9 + 7;
const int maxn = 2e5 + 100;
ll f[maxn], inv[maxn];
ll powmod(ll a, ll b) {
ll ret = 1;
while (b) {
if (b & 1)
ret = ret * a % mod;
a = a * a % mod... | replace | 43 | 46 | 43 | 44 | TLE | |
p03253 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
const int mod = 1e9 + 7;
struct mint {
int n;
mint(int n_ = 0) : n(n_) {}
};
mint operator+(mint a, mint b) { return (a.n += b.n) >= mod ? a.n - mod : a.n; }
mint operator-(mint a, mint b) { return (a.n -= b.n) < 0... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
const int mod = 1e9 + 7;
struct mint {
int n;
mint(int n_ = 0) : n(n_) {}
};
mint operator+(mint a, mint b) { return (a.n += b.n) >= mod ? a.n - mod : a.n; }
mint operator-(mint a, mint b) { return (a.n -= b.n) < 0... | replace | 22 | 23 | 22 | 23 | 0 | |
p03253 | C++ | Time Limit Exceeded | #include <algorithm>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef pair<int, int> P;
#define ll long long
#define int ll
#define INF (1LL << 60)
#define mod 1000... | #include <algorithm>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef pair<int, int> P;
#define ll long long
#define int ll
#define INF (1LL << 60)
#define mod 1000... | replace | 105 | 107 | 105 | 109 | TLE | |
p03253 | C++ | Runtime Error | #include <algorithm>
#include <climits>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
map<int, int> divisor_count;
bool is_prime[1000];
const long long MOD = 1000000007;... | #include <algorithm>
#include <climits>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
map<int, int> divisor_count;
bool is_prime[100000];
const long long MOD = 100000000... | replace | 15 | 16 | 15 | 16 | 0 | |
p03253 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <iostream>
#include <limits.h>
#include <numeric>
#include <vector>
#define YesNo(b) ((b) ? "Yes" : "No")
#define YESNO(b) ((b) ? "YES" : "NO")
using namespace std;
using vi = vector<int>;
using vvi = vector<vi>;
using ll = long long;
using vll = vector<ll>;
using vvll =... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <limits.h>
#include <numeric>
#include <vector>
#define YesNo(b) ((b) ? "Yes" : "No")
#define YESNO(b) ((b) ? "YES" : "NO")
using namespace std;
using vi = vector<int>;
using vvi = vector<vi>;
using ll = long long;
using vll = vector<ll>;
using vvll =... | replace | 183 | 184 | 183 | 184 | TLE | |
p03253 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n, m) for (int i = n; i < (int)(m); i++)
#define rrep(i, n, m) for (int i = ((int)(n)-1); i >= m; i--)
#define all(x) (x).begin(), (x).end()
typedef long long ll;
const int MOD = 1000000007;
using namespace std;
ll modinv(ll a, ll m) {
ll b = m, u = 1, v = 0;
while (b) {
... | #include <bits/stdc++.h>
#define rep(i, n, m) for (int i = n; i < (int)(m); i++)
#define rrep(i, n, m) for (int i = ((int)(n)-1); i >= m; i--)
#define all(x) (x).begin(), (x).end()
typedef long long ll;
const int MOD = 1000000007;
using namespace std;
ll modinv(ll a, ll m) {
ll b = m, u = 1, v = 0;
while (b) {
... | replace | 23 | 25 | 23 | 25 | 0 | |
p03253 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
vector<long long> kosu; // ありえる素因数のmaxを入れる
void divisor(long long n) {
for (long long i = 2; i * i <= n; i++) {
if (n % i == 0) {
kosu.push_back(0);
}
while (n % i == 0) {
kosu[kosu.size() - 1]++;
n /= i;
}
... | #include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
vector<long long> kosu; // ありえる素因数のmaxを入れる
void divisor(long long n) {
for (long long i = 2; i * i <= n; i++) {
if (n % i == 0) {
kosu.push_back(0);
}
while (n % i == 0) {
kosu[kosu.size() - 1]++;
n /= i;
}
... | replace | 28 | 29 | 28 | 34 | 0 | |
p03253 | C++ | Time Limit Exceeded | #include "bits/stdc++.h"
using namespace std;
long long mod = 1e9 + 7;
long long modpow(long long a, long long p) {
if (p == 0)
return 1;
if (p % 2 == 0) {
long long halfP = p / 2;
long long half = modpow(a, halfP);
return half * half % mod;
} else {
return a * modpow(a, p - 1) % mod;
}
}
... | #include "bits/stdc++.h"
using namespace std;
long long mod = 1e9 + 7;
long long modpow(long long a, long long p) {
if (p == 0)
return 1;
if (p % 2 == 0) {
long long halfP = p / 2;
long long half = modpow(a, halfP);
return half * half % mod;
} else {
return a * modpow(a, p - 1) % mod;
}
}
... | replace | 35 | 36 | 35 | 36 | TLE | |
p03253 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007; // 998244353; // 998244853;
template <typename T> struct modular {
constexpr modular() : val(0) {}
constexpr modular(const modular<T> &_m) : val(_m.val) {}
template <typename U> constexpr modular(const U &_r = U()) {
val = -MOD <= _r... | #include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007; // 998244353; // 998244853;
template <typename T> struct modular {
constexpr modular() : val(0) {}
constexpr modular(const modular<T> &_m) : val(_m.val) {}
template <typename U> constexpr modular(const U &_r = U()) {
val = -MOD <= _r... | insert | 238 | 238 | 238 | 242 | 0 | |
p03253 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
typedef long long int ll;
typedef pair<ll, ll> pi;
typedef pair<pair<ll, ll>, ll> pii;
vector<ll> vec;
vector<vector<ll>> vec2;
ll MOD = 1000000007;
ll INF = 11451419194545;
// 階乗
vector<ll> fact;
// 逆元
vector<ll> inv;
// 逆元階乗
vector<ll> finv;
pii extgcd(ll a, ll b) {
... | #include "bits/stdc++.h"
using namespace std;
typedef long long int ll;
typedef pair<ll, ll> pi;
typedef pair<pair<ll, ll>, ll> pii;
vector<ll> vec;
vector<vector<ll>> vec2;
ll MOD = 1000000007;
ll INF = 11451419194545;
// 階乗
vector<ll> fact;
// 逆元
vector<ll> inv;
// 逆元階乗
vector<ll> finv;
pii extgcd(ll a, ll b) {
... | replace | 131 | 132 | 131 | 132 | 0 | |
p03253 | C++ | Runtime Error | #include <bits/stdc++.h>
#define MAX 100005
#define pb push_back
#define INF 2147483647
#define MOD 1000000007
using namespace std;
typedef long long ll;
vector<int> factorize(int n) {
vector<int> v;
for (int i = 2; i * i <= n; i++) {
while (n % i == 0) {
v.pb(i);
n /= i;
}
}
if (n != 1)
... | #include <bits/stdc++.h>
#define MAX 100005
#define pb push_back
#define INF 2147483647
#define MOD 1000000007
using namespace std;
typedef long long ll;
vector<int> factorize(int n) {
vector<int> v;
for (int i = 2; i * i <= n; i++) {
while (n % i == 0) {
v.pb(i);
n /= i;
}
}
if (n != 1)
... | replace | 56 | 57 | 56 | 57 | 0 | |
p03253 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <numeric>
#include <set>
#include <unordered_set>
#include <utility>
#include <vector>
using namespace std;
using lli = long long int;
// #define DEBUG
#ifdef DEBUG
#define debug(var) cout << (#var) << ": " << (var)... | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <numeric>
#include <set>
#include <unordered_set>
#include <utility>
#include <vector>
using namespace std;
using lli = long long int;
// #define DEBUG
#ifdef DEBUG
#define debug(var) cout << (#var) << ": " << (var)... | replace | 77 | 79 | 77 | 79 | 0 | |
p03253 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep1(i, n) for (int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define Would
#define you
#define please
int main() {
cin.tie(0);
ios::sync_with... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep1(i, n) for (int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define Would
#define you
#define please
int main() {
cin.tie(0);
ios::sync_with... | replace | 27 | 28 | 27 | 28 | -11 | |
p03253 | Python | Runtime Error | from math import sqrt
from scipy.special import comb
n, m = map(int, input().split())
mod = 10**9 + 7
def sieve(x):
primes = []
li = list(range(2, x + 1))
while li[0] <= sqrt(x):
p = li[0]
primes.append(p)
li = [e for e in li if e % p != 0]
primes += li
return primes
d... | from math import sqrt
from scipy.misc import comb
n, m = map(int, input().split())
mod = 10**9 + 7
def sieve(x):
primes = []
li = list(range(2, x + 1))
while li[0] <= sqrt(x):
p = li[0]
primes.append(p)
li = [e for e in li if e % p != 0]
primes += li
return primes
def ... | replace | 1 | 2 | 1 | 2 | ModuleNotFoundError: No module named 'scipy' | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03253/Python/s977357827.py", line 2, in <module>
from scipy.special import comb
ModuleNotFoundError: No module named 'scipy'
|
p03253 | C++ | Time Limit Exceeded | #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--)
#define ALL(x) x.begin(), x.end()
using ll = long long;
using pll = pair<ll, ll>;
using pii = pair<int, int>;
using vl = vector<ll>;
using vi = vector<int>;
const ll INF = 1e18... | #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--)
#define ALL(x) x.begin(), x.end()
using ll = long long;
using pll = pair<ll, ll>;
using pii = pair<int, int>;
using vl = vector<ll>;
using vi = vector<int>;
const ll INF = 1e18... | replace | 65 | 66 | 65 | 66 | TLE | |
p03253 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
using ll ... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
using ll ... | insert | 119 | 119 | 119 | 123 | TLE | |
p03253 | C++ | Memory Limit Exceeded | #include "bits/stdc++.h"
#define rep(i, n) for (ll i = 0; i < n; i++)
typedef long long ll;
using namespace std;
#define llMAX c
#define intMAX numeric_limits<int>::max()
#define d_5 100000
#define d9_7 1000000007
#define vll vector<vector<long long>>
#define vl vector<long long>
#define vi vector<int>
#define vii vect... | #include "bits/stdc++.h"
#define rep(i, n) for (ll i = 0; i < n; i++)
typedef long long ll;
using namespace std;
#define llMAX c
#define intMAX numeric_limits<int>::max()
#define d_5 100000
#define d9_7 1000000007
#define vll vector<vector<long long>>
#define vl vector<long long>
#define vi vector<int>
#define vii vect... | replace | 59 | 60 | 59 | 60 | MLE | |
p03253 | C++ | Runtime Error | /**
* File : D.cpp
* Author : Kazune Takahashi
* Created : 2018-9-23 21:11:13
* Powered by Visual Studio Code
*/
#include <algorithm> // do { } while ( next_permutation(A, A+xxx) ) ;
#include <chrono> // std::chrono::system_clock::time_point start_time, end_time;
#include <complex>
#include <functional>
#incl... | /**
* File : D.cpp
* Author : Kazune Takahashi
* Created : 2018-9-23 21:11:13
* Powered by Visual Studio Code
*/
#include <algorithm> // do { } while ( next_permutation(A, A+xxx) ) ;
#include <chrono> // std::chrono::system_clock::time_point start_time, end_time;
#include <complex>
#include <functional>
#incl... | replace | 114 | 115 | 114 | 117 | 0 | |
p03254 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
#define fo(a, b) for (int a = 0; a < b; a++)
#define Sort(a) sort(a.begin(), a.end())
#define rev(a) reverse(a.begin(), a.end())
#define fi first
#define se second
#define sz size()
#define bgn begin()
#define en end()
#defin... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
#define fo(a, b) for (int a = 0; a < b; a++)
#define Sort(a) sort(a.begin(), a.end())
#define rev(a) reverse(a.begin(), a.end())
#define fi first
#define se second
#define sz size()
#define bgn begin()
#define en end()
#defin... | replace | 369 | 376 | 369 | 379 | TLE | |
p03254 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
#define MAXN
int n, x, a[MAXN + 5], cnt;
int main() {
scanf("%d%d", &n, &x);
for (int i = 1; i <= n; i++)
scanf("%d", &a[i]);
sort(a + 1, a + n + 1);
for (int i = 1; i <= n; i++)
if (x >= a[i])
x -= ... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
#define MAXN 100
int n, x, a[MAXN + 5], cnt;
int main() {
scanf("%d%d", &n, &x);
for (int i = 1; i <= n; i++)
scanf("%d", &a[i]);
sort(a + 1, a + n + 1);
for (int i = 1; i <= n; i++)
if (x >= a[i])
x... | replace | 5 | 6 | 5 | 6 | 0 | |
p03254 | C++ | Runtime Error | /* it was worth becoming a chemist */
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double db;
typedef long double ld;
typedef unsigned int uni;
typedef unsigned long long unll;
typedef pair<int, int> pii;
typedef pair<long long, long long> pll;
typedef pair<long long, int> pli;
typedef p... | /* it was worth becoming a chemist */
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double db;
typedef long double ld;
typedef unsigned int uni;
typedef unsigned long long unll;
typedef pair<int, int> pii;
typedef pair<long long, long long> pll;
typedef pair<long long, int> pli;
typedef p... | delete | 35 | 44 | 35 | 35 | 0 | |
p03254 | C++ | Runtime Error | #include <algorithm>
#include <bits/stdc++.h>
#include <bitset>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <iostream>
#include <list>
#include <math.h>
#include <queue>
#include <stack>
#include <stdio.h>
#include <unordered_map>
#include <vector>
// #include "boost/algorithm... | #include <algorithm>
#include <bits/stdc++.h>
#include <bitset>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <iostream>
#include <list>
#include <math.h>
#include <queue>
#include <stack>
#include <stdio.h>
#include <unordered_map>
#include <vector>
// #include "boost/algorithm... | replace | 96 | 100 | 96 | 100 | 0 | |
p03254 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
using ll = long long;
using p = pair<int, int>;
typedef vector<int> vi;
int main() {
int N, x;
cin >> N >> x;
vi a;
rep(i, N) cin >> a.at(i);
sort(a.begin(), a.end());
int ans = 0;
for (int i = 0; i < N; ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
using ll = long long;
using p = pair<int, int>;
typedef vector<int> vi;
int main() {
int N, x;
cin >> N >> x;
int a[N];
rep(i, N) cin >> a[i];
sort(a, a + N);
int ans = 0;
for (int i = 0; i < N; i++) {
... | replace | 10 | 13 | 10 | 13 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)
|
p03254 | C++ | Runtime Error | // IOI 2021
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define ff first
#define ss second
typedef long long ll;
typedef pair<int, int> pii;
const int MAXN = 100;
int n, a[MAXN], k, ans;
int main() {
ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
cin >> n >> k;
for (int i =... | // IOI 2021
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define ff first
#define ss second
typedef long long ll;
typedef pair<int, int> pii;
const int MAXN = 100 + 17;
int n, a[MAXN], k, ans;
int main() {
ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
cin >> n >> k;
for (in... | replace | 11 | 12 | 11 | 12 | 0 | |
p03254 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
int k;
int a[n];
cin >> n >> k;
for (int i = 0; i < n; i++) {
int nu;
cin >> nu;
a[i] = nu;
}
sort(a, a + n);
int ans = 0;
for (int i = 0; i < n; i++) {
if (k < a[i]) {
break;
}
if (k >= a[i]) {
k -=... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
int k;
int a[n];
cin >> n >> k;
for (int i = 0; i < n; i++) {
cin >> a[i];
}
sort(a, a + n);
int ans = 0;
for (int i = 0; i < n; i++) {
if (k < a[i]) {
break;
}
if (k >= a[i]) {
k -= a[i];
ans++;
}... | replace | 9 | 12 | 9 | 10 | -11 | |
p03254 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long int ll;
typedef long double ld;
typedef vector<ll> vi;
typedef vector<string> vs;
typedef pair<ll, ll> P;
typedef... | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long int ll;
typedef long double ld;
typedef vector<ll> vi;
typedef vector<string> vs;
typedef pair<ll, ll> P;
typedef... | replace | 32 | 33 | 32 | 33 | 0 | |
p03254 | C++ | Runtime Error | /*
author: Apoorv Singh
*/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef vector<int> vi;
typedef vector<long long> vl;
typedef pair<int, int> pii;
typedef pair<long long, long long> pll;
typedef tree<int... | /*
author: Apoorv Singh
*/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef vector<int> vi;
typedef vector<long long> vl;
typedef pair<int, int> pii;
typedef pair<long long, long long> pll;
typedef tree<int... | delete | 43 | 47 | 43 | 43 | 0 | |
p03254 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
int memo[100];
int dp(int now, int sum, int ans);
int n, x, a[100];
int main() {
fill(memo, memo + 100, -1);
scanf("%d %d", &n, &x);
for (int i = 0; i < n; i++) {
scanf("%d", &a[i]);
}
sort(a, a + n);
pri... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
int memo[100];
int dp(int now, int sum, int ans);
int n, x, a[100];
int main() {
fill(memo, memo + 100, -1);
scanf("%d %d", &n, &x);
for (int i = 0; i < n; i++) {
scanf("%d", &a[i]);
}
sort(a, a + n);
pri... | insert | 30 | 30 | 30 | 32 | TLE | |
p03255 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <... | replace | 75 | 76 | 75 | 76 | 0 | |
p03255 | C++ | Runtime Error | #include <bits/stdc++.h>
#define all(vec) vec.begin(), vec.end()
#define mp make_pair
using namespace std;
using ll = unsigned long long;
using P = pair<ll, ll>;
const ll INF = 1LL << 30;
const ll LINF = 1LL << 62;
const double eps = 1e-5;
template <typename T> void chmin(T &a, T b) { a = min(a, b); };
template <typena... | #include <bits/stdc++.h>
#define all(vec) vec.begin(), vec.end()
#define mp make_pair
using namespace std;
using ll = unsigned long long;
using P = pair<ll, ll>;
const ll INF = 1LL << 30;
const ll LINF = 1LL << 62;
const double eps = 1e-5;
template <typename T> void chmin(T &a, T b) { a = min(a, b); };
template <typena... | replace | 27 | 29 | 27 | 32 | 0 | |
p03255 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#define SF scanf
#define PF printf
#define MAXN 100010
using namespace std;
typedef long long ll;
ll a[MAXN], x, pre[MAXN], ans;
int n;
int main() {
SF("%d%lld", &n, &x);
for (int i = 1; i <= n; i++) {
SF("%lld", &a[i]);
pre[i] = pre... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#define SF scanf
#define PF printf
#define MAXN 200010
using namespace std;
typedef long long ll;
ll a[MAXN], x, pre[MAXN], ans;
int n;
int main() {
SF("%d%lld", &n, &x);
for (int i = 1; i <= n; i++) {
SF("%lld", &a[i]);
pre[i] = pre... | replace | 6 | 7 | 6 | 7 | 0 | |
p03255 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int unsigned long long
int sum[200003], N, X;
signed main() {
cin >> N >> X;
int ans = 1e19;
for (int i = 1; i <= N; ++i) {
cin >> sum[i];
sum[i] += sum[i - 1];
}
for (int j = 1; j <= N; ++j) {
int pos = N, all = j * X, cur = 3;
while (po... | #include <bits/stdc++.h>
using namespace std;
#define int unsigned long long
int sum[200003], N, X;
signed main() {
cin >> N >> X;
int ans = 1e19;
for (int i = 1; i <= N; ++i) {
cin >> sum[i];
sum[i] += sum[i - 1];
}
for (int j = 1; j <= N; ++j) {
int pos = N, all = j * X, cur = 3;
while (po... | replace | 16 | 18 | 16 | 18 | 0 | |
p03255 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ll;
const int N = 100100;
ll x[N];
int n;
ll c;
ll calc(int k) {
ll s = (n + k - 1) * c;
for (int i = n - 1; i >= 1; --i) {
int j = n - i + 1;
int t = j / 2;
t = min(t, k);
j += t - 1;
ll k1 = j / t;
ll k2 = k1 + 1... | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ll;
const int N = 200100;
ll x[N];
int n;
ll c;
ll calc(int k) {
ll s = (n + k - 1) * c;
for (int i = n - 1; i >= 1; --i) {
int j = n - i + 1;
int t = j / 2;
t = min(t, k);
j += t - 1;
ll k1 = j / t;
ll k2 = k1 + 1... | replace | 6 | 7 | 6 | 7 | 0 | |
p03255 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define dbg(...) \
do { \
cerr << __LINE__ <<... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define dbg(...) \
do { \
cerr << __LINE__ <<... | replace | 79 | 80 | 79 | 80 | -8 | |
p03255 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <ext/pb_ds/priority_queue.hpp>
#define priority_queue __gnu_pbds::priority_queue
typedef long long LL;
typedef long double LD;
typedef unsigned int ui;
typedef unsigned long long ul;
#define ri register int
#define vi vector<int>
#define pb push_back
#define fi first
#define se second
... | #include <bits/stdc++.h>
#include <ext/pb_ds/priority_queue.hpp>
#define priority_queue __gnu_pbds::priority_queue
typedef long long LL;
typedef long double LD;
typedef unsigned int ui;
typedef unsigned long long ul;
#define ri register int
#define vi vector<int>
#define pb push_back
#define fi first
#define se second
... | replace | 58 | 59 | 58 | 59 | 0 | |
p03255 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef vector<int> vi;
typedef vector<vector<long long>> vvll;
typedef vector<pair<int, int>> vpii;
typedef pair<int, int> pii;
typedef long long ll;
typedef pair<ll, ll> pll;
#define INF 5000000000000000LL
#define MOD 1000000007
#define EPSILON 0.00001
#define f first
#de... | #include <bits/stdc++.h>
using namespace std;
typedef vector<int> vi;
typedef vector<vector<long long>> vvll;
typedef vector<pair<int, int>> vpii;
typedef pair<int, int> pii;
typedef long long ll;
typedef pair<ll, ll> pll;
#define INF 5000000000000000LL
#define MOD 1000000007
#define EPSILON 0.00001
#define f first
#de... | replace | 31 | 33 | 31 | 33 | 0 | |
p03255 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> P;
typedef pair<P, int> T;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
#define pb push_back
#define mp make_pair
#define eps 1e-9
#define INF 2000000000
#define LLINF 1000000000000000000ll
#define sz(x) ((int)(x).size())
#def... | #include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> P;
typedef pair<P, int> T;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
#define pb push_back
#define mp make_pair
#define eps 1e-9
#define INF 2000000000
#define LLINF 1000000000000000000ll
#define sz(x) ((int)(x).size())
#def... | replace | 46 | 48 | 46 | 48 | 0 | |
p03255 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 2018;
const ll oo = 9e18;
ll x[N];
ll X;
int n;
ll mul(ll a, ll b) { return a > oo / b ? oo : a * b; }
ll add(ll a, ll b) { return a > oo - b ? oo : a + b; }
int main() {
scanf("%d %lld", &n, &X);
for (int i = 1; i <= n; i++)
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 200018;
const ll oo = 9e18;
ll x[N];
ll X;
int n;
ll mul(ll a, ll b) { return a > oo / b ? oo : a * b; }
ll add(ll a, ll b) { return a > oo - b ? oo : a + b; }
int main() {
scanf("%d %lld", &n, &X);
for (int i = 1; i <= n; i++)... | replace | 5 | 6 | 5 | 6 | 0 | |
p03255 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef int sign;
typedef long long ll;
#define For(i, a, b) for (register sign i = (sign)(a); i <= (sign)(b); ++i)
#define Fordown(i, a, b) for (register sign i = (sign)(a); i >= (sign)(b); --i)
const int N = 2e5 + 5;
template <typename T> bool cmax(T &a, T b) { return (a ... | #include <bits/stdc++.h>
using namespace std;
typedef int sign;
typedef long long ll;
#define For(i, a, b) for (register sign i = (sign)(a); i <= (sign)(b); ++i)
#define Fordown(i, a, b) for (register sign i = (sign)(a); i >= (sign)(b); --i)
const int N = 2e5 + 5;
template <typename T> bool cmax(T &a, T b) { return (a ... | replace | 77 | 78 | 77 | 78 | TLE | |
p03255 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ull = unsigned long long;
ull sum[200005] = {0};
ull n, x;
ull solve();
int main() {
cin >> n >> x;
for (ull i = 1; i <= n; ++i) {
ull a;
cin >> a;
sum[i] = sum[i - 1] + a;
}
cout << solve() << endl;
return 0;
}
ull solve() {
ull ans = 0;
... | #include <bits/stdc++.h>
using namespace std;
using ull = unsigned long long;
ull sum[200005] = {0};
ull n, x;
ull solve();
int main() {
cin >> n >> x;
for (ull i = 1; i <= n; ++i) {
ull a;
cin >> a;
sum[i] = sum[i - 1] + a;
}
cout << solve() << endl;
return 0;
}
ull solve() {
ull ans = 0;
... | replace | 29 | 30 | 29 | 30 | TLE | |
p03255 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long int
#define pb push_back
#define mp make_pair
#define vi vector<int>
#define pii pair<int, int>
#define pss pair<short, short>
#define piii pair<pii, int>
#define vii vector<pair<int, int>>
#define st first
#define nd second
const int mod = 1000000007;
const int inf = 10000... | #include <bits/stdc++.h>
#define ll long long int
#define pb push_back
#define mp make_pair
#define vi vector<int>
#define pii pair<int, int>
#define pss pair<short, short>
#define piii pair<pii, int>
#define vii vector<pair<int, int>>
#define st first
#define nd second
const int mod = 1000000007;
const int inf = 10000... | replace | 15 | 17 | 15 | 17 | 0 | |
p03255 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
/*
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4")
*/
#define ll long long
#define f first
#define s second
#define pb push_back
#define mp make_pair
#define IOS ios_base::sync_with_stdio(0);
using namespace std;
const i... | #include <bits/stdc++.h>
/*
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4")
*/
#define ll long long
#define f first
#define s second
#define pb push_back
#define mp make_pair
#define IOS ios_base::sync_with_stdio(0);
using namespace std;
const i... | replace | 39 | 41 | 39 | 51 | TLE | |
p03255 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#include <stdio.h>
#define _USE_MATH_DEFINES_
#define ll long long
#define ld long double
#define Accepted 0
#define pb push_back
#define mp make_pair
#define sz(x) (int)(x.size())
#define every(x) x.begin(), x.end()
#define F first
#define S second
#define For(i, x, y) for (ll i = x; i <= y; ... | #include <bits/stdc++.h>
#include <stdio.h>
#define _USE_MATH_DEFINES_
#define ll long long
#define ld long double
#define Accepted 0
#define pb push_back
#define mp make_pair
#define sz(x) (int)(x.size())
#define every(x) x.begin(), x.end()
#define F first
#define S second
#define For(i, x, y) for (ll i = x; i <= y; ... | replace | 74 | 76 | 74 | 85 | TLE | |
p03255 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef long double LD;
typedef pair<int, int> PII;
typedef pair<LL, LL> PLL;
typedef pair<LD, LD> PDD;
#define _upgrade \
ios_base::sync_with_stdio(0); ... | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef long double LD;
typedef pair<int, int> PII;
typedef pair<LL, LL> PLL;
typedef pair<LD, LD> PDD;
#define _upgrade \
ios_base::sync_with_stdio(0); ... | replace | 64 | 66 | 64 | 83 | TLE | |
p03255 | C++ | Runtime Error | #include <bits/stdc++.h>
#define taskname "A"
#define pb push_back
#define mp make_pair
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef pair<ll, ll> ii;
c... | #include <bits/stdc++.h>
#define taskname "A"
#define pb push_back
#define mp make_pair
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef pair<ll, ll> ii;
c... | replace | 50 | 51 | 50 | 51 | 0 | |
p03255 | C++ | Runtime Error | #include <bits/stdc++.h>
#define MOD 1000000007
#define EPS ((long double)1e-12)
#define ll long long
#define ld long double
#define ull unsigned long long
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define F first
#define S second
#define sz(x) ((long long)(x).size())
#define endl '\n'
#define DUM... | #include <bits/stdc++.h>
#define MOD 1000000007
#define EPS ((long double)1e-12)
#define ll long long
#define ld long double
#define ull unsigned long long
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define F first
#define S second
#define sz(x) ((long long)(x).size())
#define endl '\n'
#define DUM... | delete | 30 | 32 | 30 | 30 | TLE | |
p03256 | C++ | Runtime Error | #include <iostream>
#include <queue>
#include <vector>
using namespace std;
string S;
bool ok[200010] = {0};
vector<vector<int>> v(200010);
int N, M, visited[200010] = {0};
bool dfs(int n) {
visited[n] = 1;
bool j = true;
if (!ok[n])
j = false;
for (int i = 0; i < v[n].size(); i++) {
if (visited[v[n][... | #include <iostream>
#include <queue>
#include <vector>
using namespace std;
string S;
bool ok[200010] = {0};
vector<vector<int>> v(200010);
int N, M, visited[200010] = {0};
bool dfs(int n) {
visited[n] = 1;
bool j = true;
if (!ok[n])
j = false;
for (int i = 0; i < v[n].size(); i++) {
if (visited[v[n][... | replace | 25 | 26 | 25 | 26 | 0 | |
p03256 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#define debug(...) fprintf(stderr, __VA_ARGS__)
using namespace std;
const int maxn = 2e5 + 10;
char label[maxn];
struct edge {
int v, next;
edge(int v = 0, int next = 0) : v(v), next(next) {}
} e[maxn * 2];
int hd[maxn... | #include <algorithm>
#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#define debug(...) fprintf(stderr, __VA_ARGS__)
using namespace std;
const int maxn = 2e5 + 10;
char label[maxn];
struct edge {
int v, next;
edge(int v = 0, int next = 0) : v(v), next(next) {}
} e[maxn * 2];
int hd[maxn... | replace | 25 | 26 | 25 | 26 | TLE | |
p03256 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define dbg(...) \
do { \
cerr << __LINE__ <<... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define dbg(...) \
do { \
cerr << __LINE__ <<... | delete | 84 | 85 | 84 | 84 | -6 | 27231888-4c8e-4e93-8705-af538159fcdf.out: /home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03256/C++/s965980599.cpp:33: int main(): Assertion `n >= 10' failed.
|
p03256 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
inline LL rd() {
char ch = getchar();
LL i = 0, f = 1;
while (!isdigit(ch)) {
if (ch == '-')
f = -1;
ch = getchar();
}
while (isdigit(ch)) {
i = (i << 1) + (i << 3) + ch - '0';
ch = getchar();
}
return i * f;
}
cons... | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
inline LL rd() {
char ch = getchar();
LL i = 0, f = 1;
while (!isdigit(ch)) {
if (ch == '-')
f = -1;
ch = getchar();
}
while (isdigit(ch)) {
i = (i << 1) + (i << 3) + ch - '0';
ch = getchar();
}
return i * f;
}
cons... | replace | 18 | 19 | 18 | 19 | 0 | |
p03256 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
string s;
multiset<int> edge[200005];
int memo[200005][2];
int main(int argc, char const *argv[]) {
int n, m;
cin >> n >> m >> s;
int a, b;
for (int i = 0; i < m; ++i) {
cin >> a >> b;
--a;
--b;
edge[a].insert(b);
++memo[a][s[b] - 'A'];
if ... | #include <bits/stdc++.h>
using namespace std;
string s;
multiset<int> edge[200005];
int memo[200005][2];
int main(int argc, char const *argv[]) {
int n, m;
cin >> n >> m >> s;
int a, b;
for (int i = 0; i < m; ++i) {
cin >> a >> b;
--a;
--b;
if (edge[a].count(b) > 0) {
continue;
}
... | insert | 15 | 15 | 15 | 18 | 0 | |
p03256 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define REP(i, m, n) for (int i = (int)m; i < (int)n; ++i)
#define ... | #include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define REP(i, m, n) for (int i = (int)m; i < (int)n; ++i)
#define ... | replace | 31 | 32 | 31 | 34 | TLE | |
p03256 | C++ | Runtime Error | #include <cassert>
#include <iostream>
#include <vector>
using namespace std;
const string s = "AABB";
bool dfs(const vector<vector<int>> &G, const string &S, vector<int> &V,
vector<bool> &visited, int v, int t, int u) {
bool ret = false;
V[v] |= (1 << t);
visited[v] = true;
t = (t + 1) % 4;
for (si... | #include <cassert>
#include <iostream>
#include <vector>
using namespace std;
const string s = "AABB";
bool dfs(const vector<vector<int>> &G, const string &S, vector<int> &V,
vector<bool> &visited, int v, int t, int u) {
bool ret = false;
V[v] |= (1 << t);
visited[v] = true;
t = (t + 1) % 4;
for (si... | replace | 41 | 42 | 41 | 42 | 0 | 0
|
p03256 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <string>
#define ll long long
using namespace std;
#define MAXN 200050
int n, m;
char c;
int label[MAXN];
int x, y;
struct T {
int y;
int next;
} e[MAXN];
int top = 1;
int st[MAXN];
bool hasChe... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <string>
#define ll long long
using namespace std;
#define MAXN 200050
int n, m;
char c;
int label[MAXN];
int x, y;
struct T {
int y;
int next;
} e[MAXN * 5];
int top = 1;
int st[MAXN];
bool ha... | replace | 17 | 18 | 17 | 18 | 0 | |
p03256 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
const int MX = 200005;
int n, m, c[MX][2], a, b, qu[MX], t, k = 1, out[MX];
char s[MX];
vector<int> G[MX];
int main() {
scanf("%d%d\n%s", &n, &m, s);
rep(i, m) {
scanf("%d%d", &a, &b);
G[--a].push_back(--b);
G[... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
const int MX = 200005;
int n, m, c[MX][2], a, b, qu[MX], t, k = 1, out[MX];
char s[MX];
vector<int> G[MX];
int main() {
scanf("%d%d\n%s", &n, &m, s);
rep(i, m) {
scanf("%d%d", &a, &b);
G[--a].push_back(--b);
G[... | insert | 16 | 16 | 16 | 17 | 0 | |
p03256 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define MOD 1000000007
#define INF (1 << 29)
#define EPS (1e-10)
typedef long long Int;
typedef pair<Int, Int> P;
#define ... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define MOD 1000000007
#define INF (1 << 29)
#define EPS (1e-10)
typedef long long Int;
typedef pair<Int, Int> P;
#define ... | replace | 62 | 63 | 62 | 63 | 0 | |
p03256 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, a, b) for (int i = int(a); i < int(b); i++)
#define rer(i, a, b) for (ll i = ll(a) - 1; i >= ll(b); i--)
#define sz(v) (int)(v).size()
#define pb push_back
#define sc second
#define fr first
#define sor(v) sort(v.begin(), v.end())
#define rev(s) reverse(s.begin(), s.end())
#defin... | #include <bits/stdc++.h>
#define rep(i, a, b) for (int i = int(a); i < int(b); i++)
#define rer(i, a, b) for (ll i = ll(a) - 1; i >= ll(b); i--)
#define sz(v) (int)(v).size()
#define pb push_back
#define sc second
#define fr first
#define sor(v) sort(v.begin(), v.end())
#define rev(s) reverse(s.begin(), s.end())
#defin... | replace | 25 | 26 | 25 | 26 | TLE | |
p03256 | C++ | Runtime Error | #include <algorithm>
#include <assert.h>
#include <cstring>
#include <iterator>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <vector>
#pragma warning(disable : 4996)
typedef long long ll;
#define MIN(a, b) ((a) > (b) ... | #include <algorithm>
#include <assert.h>
#include <cstring>
#include <iterator>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <vector>
#pragma warning(disable : 4996)
typedef long long ll;
#define MIN(a, b) ((a) > (b) ... | replace | 23 | 24 | 23 | 24 | 0 | |
p03256 | C++ | Time Limit Exceeded | /*FBI WARNING
Federal law provides severe civil and criminal penalties for
the unauthorzed reproduction, distribution, or exhibition of
copyrighted motion pictures (Title 17 united states code
sections 501 and 508). The federal bureau of investigation
investigates allegations of criminal copyright infringement
(Title 1... | /*FBI WARNING
Federal law provides severe civil and criminal penalties for
the unauthorzed reproduction, distribution, or exhibition of
copyrighted motion pictures (Title 17 united states code
sections 501 and 508). The federal bureau of investigation
investigates allegations of criminal copyright infringement
(Title 1... | delete | 44 | 48 | 44 | 44 | TLE | |
p03256 | C++ | Runtime Error | #include <bits/stdc++.h>
#define fr(i, n) for (int i = 0; i < n; i++)
#define pb push_back
#define frab(i, a, b) for (int i = a; i < b; i++)
using namespace std;
typedef long long ll;
typedef long double ld;
const ll MOD = 1e9 + 7;
const ld EPS = 1e-9;
const int N = 1e5 + 10;
vector<int> g[N];
char s[N];
int cnta[N... | #include <bits/stdc++.h>
#define fr(i, n) for (int i = 0; i < n; i++)
#define pb push_back
#define frab(i, a, b) for (int i = a; i < b; i++)
using namespace std;
typedef long long ll;
typedef long double ld;
const ll MOD = 1e9 + 7;
const ld EPS = 1e-9;
const int N = 3e5 + 10;
vector<int> g[N];
char s[N];
int cnta[N... | replace | 12 | 13 | 12 | 13 | 0 | |
p03256 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
typedef long long LL;
const int N = 100005;
int n, m;
char ss[N];
int X[N], Y[N];
int du[N][2];
vector<int> vec[N];
queue<int> q;
bool in[N];
int main() {
scanf("%d%d", &n, &m);
scan... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
typedef long long LL;
const int N = 200005;
int n, m;
char ss[N];
int X[N], Y[N];
int du[N][2];
vector<int> vec[N];
queue<int> q;
bool in[N];
int main() {
scanf("%d%d", &n, &m);
scan... | replace | 8 | 9 | 8 | 9 | 0 | |
p03256 | C++ | Runtime Error | // includes {{{
#include <algorithm>
#include <cassert>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <tuple>
#include <vector>
// #include<deque>
// #include<multiset>
// #include<bitset>
// #include<cstring>
// #inclu... | // includes {{{
#include <algorithm>
#include <cassert>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <tuple>
#include <vector>
// #include<deque>
// #include<multiset>
// #include<bitset>
// #include<cstring>
// #inclu... | replace | 22 | 23 | 22 | 23 | 0 | |
p03256 | C++ | Runtime Error | // #pragma GCC optimize("Ofast")
// #pragma GCC target("avx2,tune=native")
// #pragma GCC optimize("unroll-loops")
// #pragma GCC optimize("trapv")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define... | // #pragma GCC optimize("Ofast")
// #pragma GCC target("avx2,tune=native")
// #pragma GCC optimize("unroll-loops")
// #pragma GCC optimize("trapv")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define... | replace | 17 | 18 | 17 | 18 | 0 | |
p03256 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define neko 400010
#define f(i, a, b) for (int i = (a); i <= (b); ++i)
using namespace std;
int book[neko], fa[neko], t, head[neko], vis[neko], n, m, ans;
char s[neko];
struct node {
int v, w, nex;
} e[neko << 1];
void add(int x, int y, int z) {
e[++t].v = y, e[t].w = z, e[t].nex = head[x]... | #include <bits/stdc++.h>
#define neko 400010
#define f(i, a, b) for (int i = (a); i <= (b); ++i)
using namespace std;
int book[neko], fa[neko], t, head[neko], vis[neko], n, m, ans;
char s[neko];
struct node {
int v, w, nex;
} e[neko << 1];
void add(int x, int y, int z) {
e[++t].v = y, e[t].w = z, e[t].nex = head[x]... | replace | 18 | 19 | 18 | 19 | TLE | |
p03256 | Python | Time Limit Exceeded | import sys
sys.setrecursionlimit(200000)
def add_link(a, b):
la = links[a]
i, j = [(0, 1), (1, 0)][s[b] == "B"]
if not la[i] and la[j]:
able[a] = True
la[i].add(b)
def close(v, i):
j = int(s[v] == "B")
for u in links[v][i].copy():
if not able[u]:
continue
... | import sys
sys.setrecursionlimit(200000)
def add_link(a, b):
la = links[a]
i, j = [(0, 1), (1, 0)][s[b] == "B"]
if not la[i] and la[j]:
able[a] = True
la[i].add(b)
def close(v, i):
j = int(s[v] == "B")
for u in links[v][i].copy():
if not able[u]:
continue
... | replace | 28 | 30 | 28 | 30 | TLE | |
p03256 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
// const ll mod = 1000000007;
int n, m;
string s;
int field[200100];
vector<int> children[200010];
bool ok[200100];
void search(int from) {
bool checker[2];
checker[0] = false;
checker[... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
// const ll mod = 1000000007;
int n, m;
string s;
int field[200100];
vector<int> children[200010];
bool ok[200100];
void search(int from) {
bool checker[2];
checker[0] = false;
checker[... | replace | 78 | 79 | 78 | 79 | TLE | |
p03256 | C++ | Runtime Error | #include <bits/stdc++.h>
#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))
#define for1(a, b, i) for (int i = a; i <= b; ++i)
#define FOR2(a, b, i) for (int i = a; i >= b; --i)
using namespace std;
typedef long long ll;
inline int read() {
int f = 1, sum = 0;
char x = getchar();
... | #include <bits/stdc++.h>
#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))
#define for1(a, b, i) for (int i = a; i <= b; ++i)
#define FOR2(a, b, i) for (int i = a; i >= b; --i)
using namespace std;
typedef long long ll;
inline int read() {
int f = 1, sum = 0;
char x = getchar();
... | replace | 18 | 19 | 18 | 19 | 0 | |
p03256 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define li long long int
#define rep(i, to) for (li i = 0; i < ((li)(to)); i++)
#define repp(i, start, to) for (li i = (li)(start); i < ((li)(to)); i++)
#define pb push_back
#define sz(v) ((li)(v).size())
#define bgn(v) ((v).begin())
#define eend(v) ((v).end())
#define all... | #include <bits/stdc++.h>
using namespace std;
#define li long long int
#define rep(i, to) for (li i = 0; i < ((li)(to)); i++)
#define repp(i, start, to) for (li i = (li)(start); i < ((li)(to)); i++)
#define pb push_back
#define sz(v) ((li)(v).size())
#define bgn(v) ((v).begin())
#define eend(v) ((v).end())
#define all... | insert | 97 | 97 | 97 | 99 | 0 | |
p03256 | C++ | Runtime Error | /*
发现有解的充要条件是有一个形为AABBAABBAABB的环
此时每一个点至少与两个不同颜色的点相连
对于初始不合法的点直接删掉,判断删掉后与其相连的点是否变为不合法
类似拓扑排序
*/
#include <bits/stdc++.h>
#define gc getchar()
#define pc putchar
inline int read() {
int x = 0, f = 1;
char c = gc;
while (c < '0' || c > '9') {
if (c == '-')
f = -1;
c = gc;
}
while (c <= '9' && c >=... | /*
发现有解的充要条件是有一个形为AABBAABBAABB的环
此时每一个点至少与两个不同颜色的点相连
对于初始不合法的点直接删掉,判断删掉后与其相连的点是否变为不合法
类似拓扑排序
*/
#include <bits/stdc++.h>
#define gc getchar()
#define pc putchar
inline int read() {
int x = 0, f = 1;
char c = gc;
while (c < '0' || c > '9') {
if (c == '-')
f = -1;
c = gc;
}
while (c <= '9' && c >=... | replace | 30 | 31 | 30 | 31 | 0 | |
p03256 | C++ | Time Limit Exceeded |
#if 1
#include <algorithm>
#include <array>
#include <assert.h>
#include <bitset>
#include <cstdint>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#inc... |
#if 1
#include <algorithm>
#include <array>
#include <assert.h>
#include <bitset>
#include <cstdint>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#inc... | replace | 62 | 72 | 62 | 78 | TLE | |
p03256 | C++ | Runtime Error | // https://agc027.contest.atcoder.jp/tasks/agc027_c
#include <bits/stdc++.h>
const int N = 1e5 + 5;
using namespace std;
queue<int> mq;
vector<int> adj[N];
int n, m, cnt[N][2], num;
string s;
bool dead[N];
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
cin >> n >> m;
cin >> s;
s ... | // https://agc027.contest.atcoder.jp/tasks/agc027_c
#include <bits/stdc++.h>
const int N = 2e5 + 5;
using namespace std;
queue<int> mq;
vector<int> adj[N];
int n, m, cnt[N][2], num;
string s;
bool dead[N];
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
cin >> n >> m;
cin >> s;
s ... | replace | 3 | 4 | 3 | 4 | 0 | |
p03256 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
using namespace std;
const int N = 200005, M = N * 2;
int a[N];
int en = 0, to[M], nxt[M], h[N];
void addedge(int u, int v) { to[++en] = v, nxt[en] = h[u], h[u] = en; }
int du[2][N];
int n, m;
int iff[N], cnt... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
using namespace std;
const int N = 200005, M = N * 2;
int a[N];
int en = 0, to[M], nxt[M], h[N];
void addedge(int u, int v) { to[++en] = v, nxt[en] = h[u], h[u] = en; }
int du[2][N];
int n, m;
int iff[N], cnt... | replace | 17 | 18 | 17 | 18 | TLE | |
p03257 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
// const ll mod = 1000000007;
vector<ll> primes;
ll factor[505];
ll field[505][505];
set<ll> used;
int main() {
// cout.precision(10);
int N;
cin >> N;
for (ll i = 2; i <= 20000; i++)... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
// const ll mod = 1000000007;
vector<ll> primes;
ll factor[1005];
ll field[505][505];
set<ll> used;
int main() {
// cout.precision(10);
int N;
cin >> N;
for (ll i = 2; i <= 20000; i++... | replace | 9 | 10 | 9 | 10 | 0 | |
p03257 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <set>
using namespace std;
typedef long long ll;
const int N = 20005;
set<ll> st;
int n, i, j, k, p[N], l, w1[N], w2[N];
bool v[N];
ll a[505][505];
ll gcd(ll a, ll b) {
if (!b)
return a;
return gcd(b, a % b);
}
ll LCM(ll a, ll b... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <set>
using namespace std;
typedef long long ll;
const int N = 20005;
set<ll> st;
int n, i, j, k, p[N], l, w1[N], w2[N];
bool v[N];
ll a[505][505];
ll gcd(ll a, ll b) {
if (!b)
return a;
return gcd(b, a % b);
}
ll LCM(ll a, ll b... | replace | 43 | 44 | 43 | 44 | TLE | |
p03257 | C++ | Runtime Error | #include <bits/stdc++.h>
const int MAXN = 510;
typedef long long LL;
int pri[MAXN], bak, n;
int ispri(int x) {
for (int i = 2; i * i <= x; ++i)
if (x % i == 0)
return false;
return true;
}
LL gcd(LL a, LL b) { return b ? gcd(b, a % b) : a; }
LL lcm(LL a, LL b) { return a / gcd(a, b) * b; }
LL get(int x, ... | #include <bits/stdc++.h>
const int MAXN = 1010;
typedef long long LL;
int pri[MAXN], bak, n;
int ispri(int x) {
for (int i = 2; i * i <= x; ++i)
if (x % i == 0)
return false;
return true;
}
LL gcd(LL a, LL b) { return b ? gcd(b, a % b) : a; }
LL lcm(LL a, LL b) { return a / gcd(a, b) * b; }
LL get(int x,... | replace | 2 | 3 | 2 | 3 | 0 | |
p03257 | C++ | Runtime Error | #include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#define ll long long
using namespace std;
const int N = 510, MX = 1e6;
int p[25010];
int vis[MX];
ll rec[N][N];
int n, m, cnt;
void prework(int n) {
vis[1] = false;
int cnt = 0;
for (int i = 2; cnt < n; ++i) {
if (!vis[i])
p[++cnt] ... | #include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#define ll long long
using namespace std;
const int N = 510, MX = 1e7;
int p[250010];
int vis[MX];
ll rec[N][N];
int n, m, cnt;
void prework(int n) {
vis[1] = false;
int cnt = 0;
for (int i = 2; cnt < n; ++i) {
if (!vis[i])
p[++cnt]... | replace | 6 | 8 | 6 | 8 | 0 | |
p03258 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int N = 3e5;
char st[N];
int F[N], nxt[N];
int su, ans, n;
void ADD(int &t, int d) {
t += d;
if (t >= MOD)
t -= MOD;
}
int main() {
scanf("%s", st + 1);
n = strlen(st + 1);
for (int i = 1, j = 1; i <= n; ++i) {
j = max(j, i)... | #include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int N = 3e5;
char st[N];
int F[N], nxt[N];
int su, ans, n;
void ADD(int &t, int d) {
t += d;
if (t >= MOD)
t -= MOD;
}
int main() {
scanf("%s", st + 1);
n = strlen(st + 1);
for (int i = 1, j = 1; i <= n; ++i) {
j = max(j, i)... | insert | 22 | 22 | 22 | 23 | TLE | |
p03258 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cassert>
#include <chrono>
#include <cstring>
#include <iostream>
#include <map>
#include <random>
#include <set>
#include <string>
using namespace std;
typedef long long ll;
const ll MODULO = 1e9 + 7;
map<vector<int>, ll> ans;
ll Solve(int at, int sum, int want, int len, int was, con... | #include <algorithm>
#include <cassert>
#include <chrono>
#include <cstring>
#include <iostream>
#include <map>
#include <random>
#include <set>
#include <string>
using namespace std;
typedef long long ll;
const ll MODULO = 1e9 + 7;
map<vector<int>, ll> ans;
ll Solve(int at, int sum, int want, int len, int was, con... | delete | 25 | 28 | 25 | 25 | TLE | |
p03259 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <fstream>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <tr1/unordered_map>
#include <vector>
typedef long long LL;
using namespace std;
#define mp make_pair
#define pb... | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <fstream>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <tr1/unordered_map>
#include <vector>
typedef long long LL;
using namespace std;
#define mp make_pair
#define pb... | replace | 219 | 220 | 219 | 220 | -11 | |
p03259 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define Fail puts("NO"), exit(0);
#define eps 1e-10
#define maxn 55
#define maxm 100010
#define inf 1000000007
#define mod 1000000007
#define pi acos(-1)
#define mp(x, y) make_pair(x, y)
#define fi first
#define se second
using namespace std;
typedef long long ll;
typedef unsigned int uint;
typ... | #include <bits/stdc++.h>
#define Fail puts("NO"), exit(0);
#define eps 1e-10
#define maxn 55
#define maxm 100010
#define inf 1000000007
#define mod 1000000007
#define pi acos(-1)
#define mp(x, y) make_pair(x, y)
#define fi first
#define se second
using namespace std;
typedef long long ll;
typedef unsigned int uint;
typ... | replace | 57 | 58 | 57 | 58 | TLE | |
p03260 | C++ | Runtime Error | #include <bits/stdc++.h>
#define int long long
using namespace std;
signed main() {
int n;
string w[100];
cin >> n >> w[100];
for (int i = 0; i < n; i++) {
for (int j = 0; j < i; j++) {
if (w[j] != w[i]) {
} else {
cout << "No" << endl;
return 0;
}
}
if (i > 0) {
... | #include <bits/stdc++.h>
#define int long long
using namespace std;
signed main() {
int a, b;
cin >> a >> b;
if (a % 2 == 1 && b % 2 == 1)
cout << "Yes" << endl;
else
cout << "No" << endl;
return 0;
} | replace | 4 | 24 | 4 | 10 | -6 | *** stack smashing detected ***: terminated
|
p03260 | Python | Runtime Error | a, b = map(int, input().slice())
if a == 2 or b == 2:
print("No")
else:
print("Yes")
| a, b = map(int, input().split())
if a == 2 or b == 2:
print("No")
else:
print("Yes")
| replace | 0 | 1 | 0 | 1 | AttributeError: 'str' object has no attribute 'slice' | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03260/Python/s301271695.py", line 1, in <module>
a, b = map(int, input().slice())
AttributeError: 'str' object has no attribute 'slice'
|
p03260 | C++ | Runtime Error | #include <bits/stdc++.h>
typedef long long ll;
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
#ifndef ONLINE_JUDGE
// for getting input from input.txt
freopen("input.txt", "r", stdin);
// for writing output to output.txt
freopen("output.txt", "w", stdout);
#endif
ll a, ... | #include <bits/stdc++.h>
typedef long long ll;
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
ll a, b;
cin >> a >> b;
if (a % 2 == 0 || b % 2 == 0) {
cout << "No";
} else {
cout << "Yes";
}
return 0;
} | replace | 9 | 15 | 9 | 10 | 0 | |
p03261 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
///////////////////////////////////////////
const long long int INF = 1LL << 60;
const long long int Mod = 1000000007;
using ll = long long int;
using ci = const int;
using vi = vector<int>;
using Vi = vector<long long int>;
using P = pair<int, int>;
using PLL = pair<ll, ll... | #include <bits/stdc++.h>
using namespace std;
///////////////////////////////////////////
const long long int INF = 1LL << 60;
const long long int Mod = 1000000007;
using ll = long long int;
using ci = const int;
using vi = vector<int>;
using Vi = vector<long long int>;
using P = pair<int, int>;
using PLL = pair<ll, ll... | delete | 68 | 69 | 68 | 68 | 0 | |
p03261 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int saisho(string a) {
char c;
c = a.at(0);
return c;
}
int matubi(string a) {
char c;
int s;
s = a.size();
c = a.at(s - 1);
return c;
}
int main() {
int N;
cin >> N;
vector<string> A(N);
for (int i = 0; i < N; i++) {
cin >> A.at(i);
}
boo... | #include <bits/stdc++.h>
using namespace std;
int saisho(string a) {
char c;
c = a.at(0);
return c;
}
int matubi(string a) {
char c;
int s;
s = a.size();
c = a.at(s - 1);
return c;
}
int main() {
int N;
cin >> N;
vector<string> A(N);
for (int i = 0; i < N; i++) {
cin >> A.at(i);
}
boo... | replace | 26 | 27 | 26 | 27 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): vector::_M_range_check: __n (which is 4) >= this->size() (which is 4)
|
p03261 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<string> S(n);
for (int i = 0; i < n; i++) {
cin >> S.at(i);
}
bool flag = true;
// 末尾と次の語の頭文字を比較
for (int i = 0; i < n - 1; i++) {
if (S.at(i).at(S.size() - 1) == S.at(i + 1).at(0)) {
flag = true;
} el... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<string> S(n);
for (int i = 0; i < n; i++) {
cin >> S.at(i);
}
bool flag = true;
// 末尾と次の語の頭文字を比較
for (int i = 0; i < n - 1; i++) {
if (S.at(i).at(S.at(i).size() - 1) == S.at(i + 1).at(0)) {
flag = true;
... | replace | 14 | 15 | 14 | 15 | 0 | |
p03261 | C++ | Runtime Error | #include <algorithm>
#include <cstdlib>
#include <cstdlib>
#include <iostream>
#include <math.h>
#include <string>
#include <vector>
using namespace std;
int main(int argc, char **argv) {
int n;
cin >> n;
string s[n];
for (int i = 0; i < n; i++) {
cin >> s[i];
}
for (int i = 0; i < n; i++) {
if (... | #include <algorithm>
#include <cstdlib>
#include <cstdlib>
#include <iostream>
#include <math.h>
#include <string>
#include <vector>
using namespace std;
int main(int argc, char **argv) {
int n;
cin >> n;
string s[n];
for (int i = 0; i < n; i++) {
cin >> s[i];
}
for (int i = 0; i < n; i++) {
if (... | replace | 32 | 34 | 32 | 33 | 0 | |
p03261 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <map>
#include <vector>
using namespace std;
int main() {
int a;
cin >> a;
string b[a];
for (int i = 0; i < a; i++) {
cin >> b[i];
}
for (int i = 1; i < a; i++) {
if (b[i - 1][b[i - 1].size() - 1] != b[i][0]) {
cout << "No" << endl;
retur... | #include <algorithm>
#include <iostream>
#include <map>
#include <vector>
using namespace std;
int main() {
int a;
cin >> a;
string b[a];
for (int i = 0; i < a; i++) {
cin >> b[i];
}
for (int i = 1; i < a; i++) {
if (b[i - 1][b[i - 1].size() - 1] != b[i][0]) {
cout << "No" << endl;
retur... | replace | 18 | 19 | 18 | 19 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.