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
p02903
C++
Time Limit Exceeded
#include <algorithm> #include <bits/stdc++.h> #include <cmath> #include <cstdio> #include <cstdlib> #include <deque> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <utility> #include <vector> #define pi 3.141592653589...
#include <algorithm> #include <bits/stdc++.h> #include <cmath> #include <cstdio> #include <cstdlib> #include <deque> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <utility> #include <vector> #define pi 3.141592653589...
replace
59
60
59
60
TLE
p02903
C++
Runtime Error
#include "bits/stdc++.h" using namespace std; typedef long long int ll; int main() { ll H, W, A, B; cin >> H >> W >> A >> B; ll n_rows = H; ll n_cols = W; ll value = 0; vector<vector<ll>> vec(W, vector<ll>(H, 0)); ; for (ll i = 0; i < H; i++) { for (ll j = 0; j < W; j++) { if (i < B && j ...
#include "bits/stdc++.h" using namespace std; typedef long long int ll; int main() { ll H, W, A, B; cin >> H >> W >> A >> B; ll n_rows = H; ll n_cols = W; ll value = 0; vector<vector<ll>> vec(H, vector<ll>(W, 0)); ; for (ll i = 0; i < H; i++) { for (ll j = 0; j < W; j++) { if (i < B && j ...
replace
13
14
13
14
0
p02903
C++
Runtime Error
#include <iostream> #include <math.h> #include <stdlib.h> #include <string.h> using namespace std; int main() { int H, W, A, B, i, j; cin >> H >> W >> A >> B; int h = H - 1; int w = W - 1; int matrix[h][w]; for (i = 0; i <= B - 1; i++) { for (j = 0; j <= A - 1; j++) { matrix[i][j] = 0; } ...
#include <iostream> #include <math.h> #include <stdlib.h> #include <string.h> using namespace std; int main() { int H, W, A, B, i, j; cin >> H >> W >> A >> B; int h = H - 1; int w = W - 1; int matrix[H][W]; for (i = 0; i <= B - 1; i++) { for (j = 0; j <= A - 1; j++) { matrix[i][j] = 0; } ...
replace
11
12
11
12
0
p02903
C++
Runtime Error
#include <bits/stdc++.h> #define ll long long #define MODV 1000000007 #define INFLL LLONG_MAX // 9223372036854775807 #define EPS 1e-9 #define rep(i, n) for (ll i = 0, i##_len = (ll)(n); i < i##_len; i++) #define repf(i, n) for (ll i = 1, i##_len = (ll)(n + 1); i < i##_len; i++) #define all(v) v.begin(), v.end() #define...
#include <bits/stdc++.h> #define ll long long #define MODV 1000000007 #define INFLL LLONG_MAX // 9223372036854775807 #define EPS 1e-9 #define rep(i, n) for (ll i = 0, i##_len = (ll)(n); i < i##_len; i++) #define repf(i, n) for (ll i = 1, i##_len = (ll)(n + 1); i < i##_len; i++) #define all(v) v.begin(), v.end() #define...
replace
39
42
39
42
0
p02903
C++
Runtime Error
#include <algorithm> #include <array> #include <cmath> #include <cstdio> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdio.h> #include <string> #include <vector>...
#include <algorithm> #include <array> #include <cmath> #include <cstdio> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdio.h> #include <string> #include <vector>...
delete
57
59
57
57
0
p02903
C++
Runtime Error
#include "bits/stdc++.h" using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; const int INF = 1e9; const ll LINF = 1e18; inline ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; } inline ll lcm(ll a, ll b) { return a / gcd(a, b) * b; } template <class S, class T> ostream &op...
#include "bits/stdc++.h" using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; const int INF = 1e9; const ll LINF = 1e18; inline ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; } inline ll lcm(ll a, ll b) { return a / gcd(a, b) * b; } template <class S, class T> ostream &op...
replace
68
70
68
70
0
p02903
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using ull = unsigned long long; using uint = unsigned int; using pcc = pair<char, char>; using pii = pair<int, int>; using pll = pair<ll, ll>; using pdd = pair<double, double>; using tuplis = pair<ll, pll>; using tuplis2 = pair<...
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using ull = unsigned long long; using uint = unsigned int; using pcc = pair<char, char>; using pii = pair<int, int>; using pll = pair<ll, ll>; using pdd = pair<double, double>; using tuplis = pair<ll, pll>; using tuplis2 = pair<...
replace
277
311
277
282
-11
p02903
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v; } template <class T> inline string toString(T x) { ostringstream sout; sout << x; return sout.str(); } typedef vector<int> VI; typedef vector<VI> VVI; typedef vector<string> VS; ty...
#include <bits/stdc++.h> using namespace std; inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v; } template <class T> inline string toString(T x) { ostringstream sout; sout << x; return sout.str(); } typedef vector<int> VI; typedef vector<VI> VVI; typedef vector<string> VS; ty...
replace
64
66
64
67
0
p02903
C++
Runtime Error
#define _CRT_SECURE_NO_WARNINGS #include "bits/stdc++.h" #define rep(i, n) for (int i = 0; i < (n); ++i) #define FOR(i, m, n) for (int i = (m); i < (n); ++i) #define rrep(i, m, n) for (int i = (m); i >= (n); --i) #define sz(x) ((int)(x).size()) #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).ren...
#define _CRT_SECURE_NO_WARNINGS #include "bits/stdc++.h" #define rep(i, n) for (int i = 0; i < (n); ++i) #define FOR(i, m, n) for (int i = (m); i < (n); ++i) #define rrep(i, m, n) for (int i = (m); i >= (n); --i) #define sz(x) ((int)(x).size()) #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).ren...
replace
286
287
286
287
0
p02903
C++
Runtime Error
#include <algorithm> #include <array> #include <bitset> #include <cassert> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <deque> #include <functional> #include <iostream> #include <map> #include <memory> #include <numeric> #include <queue> #include <set> #include <stack> #include <st...
#include <algorithm> #include <array> #include <bitset> #include <cassert> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <deque> #include <functional> #include <iostream> #include <map> #include <memory> #include <numeric> #include <queue> #include <set> #include <stack> #include <st...
replace
37
39
37
39
0
p02903
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cctype> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <random> #include <set> #include <string> #include <vector> using namespace std; using ll = __int64_t; using lll = __int128_t; typedef pair<ll, ll> ...
#include <algorithm> #include <bitset> #include <cctype> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <random> #include <set> #include <string> #include <vector> using namespace std; using ll = __int64_t; using lll = __int128_t; typedef pair<ll, ll> ...
replace
28
47
28
37
0
p02903
C++
Runtime Error
#define _USE_MATH_DEFINES #include <bits/stdc++.h> using namespace std; // template #define rep(i, a, b) for (int i = (a); i < (b); i++) #define rrep(i, a, b) for (int i = (a); i > (b); i--) #define ALL(v) (v).begin(), (v).end() typedef long long int ll; typedef pair<ll, ll> P; template <class T> inline bool chmax(T &...
#define _USE_MATH_DEFINES #include <bits/stdc++.h> using namespace std; // template #define rep(i, a, b) for (int i = (a); i < (b); i++) #define rrep(i, a, b) for (int i = (a); i > (b); i--) #define ALL(v) (v).begin(), (v).end() typedef long long int ll; typedef pair<ll, ll> P; template <class T> inline bool chmax(T &...
replace
35
36
35
36
0
p02903
C++
Runtime Error
#include <bits/stdc++.h> #define ll long long #define double long double #define rep(i, n) for (int i = 0; i < (n); i++) #define REP(i, n) for (int i = 1; i <= (n); i++) #define mod (ll)(1e9 + 7) #define inf (ll)(3e18 + 7) #define P pair<int, int> #define PiP pair<int, pair<int, int>> #define all(x) x.begin(), x.end() ...
#include <bits/stdc++.h> #define ll long long #define double long double #define rep(i, n) for (int i = 0; i < (n); i++) #define REP(i, n) for (int i = 1; i <= (n); i++) #define mod (ll)(1e9 + 7) #define inf (ll)(3e18 + 7) #define P pair<int, int> #define PiP pair<int, pair<int, int>> #define all(x) x.begin(), x.end() ...
replace
27
28
27
28
0
p02903
C++
Time Limit Exceeded
// A. #include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <iostream> #include <sstream> using namespace std; typedef long long LL; int main(int argc, char *argv[]) { while (true) { LL h, w, a, b; cin >> h >> w >> a >> b; if (h <= 0 || w <= 0) break; for (int i...
// A. #include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <iostream> #include <sstream> using namespace std; typedef long long LL; int main(int argc, char *argv[]) { while (true) { LL h = -1, w = -1, a, b; cin >> h >> w >> a >> b; if (h <= 0 || w <= 0) break; ...
replace
15
16
15
16
TLE
p02903
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; bool judge(vector<string> &ans, int A, int B) { int H = ans.size(); int W = ans[0].size(); for (int i = 0; i < H; i++) { int cnt = 0; for (int j = 0; j < W; j++) { cnt += ans[i][j] - '0'; } cnt = min(cnt, W - cnt); if...
#include <bits/stdc++.h> using namespace std; using ll = long long; bool judge(vector<string> &ans, int A, int B) { int H = ans.size(); int W = ans[0].size(); for (int i = 0; i < H; i++) { int cnt = 0; for (int j = 0; j < W; j++) { cnt += ans[i][j] - '0'; } cnt = min(cnt, W - cnt); if...
replace
64
65
64
65
0
p02904
C++
Runtime Error
#include <algorithm> #include <cmath> #include <cstdlib> #include <ctype.h> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string.h> #include <string> #include <vector> using namespace std; #define pie 3.141592653589793238462643383279 ...
#include <algorithm> #include <cmath> #include <cstdlib> #include <ctype.h> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string.h> #include <string> #include <vector> using namespace std; #define pie 3.141592653589793238462643383279 ...
replace
63
64
63
64
0
p02904
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef bool boolean; const int N = 2e5 + 5; int n, K; int a[N], Q[N]; boolean ismx[N], ismi[N]; int main() { scanf("%d%d", &n, &K); for (int i = 1; i <= n; i++) { scanf("%d", a + i); } int st = 1, ed = 0; for (int i = n; i; i--) { while (st <= ed && Q[...
#include <bits/stdc++.h> using namespace std; typedef bool boolean; const int N = 2e5 + 5; int n, K; int a[N], Q[N]; boolean ismx[N], ismi[N]; int main() { scanf("%d%d", &n, &K); for (int i = 1; i <= n; i++) { scanf("%d", a + i); } int st = 1, ed = 0; for (int i = n; i; i--) { while (st <= ed && Q[...
replace
34
35
34
35
0
p02904
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using lint = long long int; struct UnionFind { vector<int> data; UnionFind(int n) { data.assign(n, -1); } bool unite(int x, int y) { x = root(x), y = root(y); if (x == y) return true; if (data[x] > data[y]) swap(x, y); data[x] += data[y];...
#include <bits/stdc++.h> using namespace std; using lint = long long int; struct UnionFind { vector<int> data; UnionFind(int n) { data.assign(n, -1); } bool unite(int x, int y) { x = root(x), y = root(y); if (x == y) return true; if (data[x] > data[y]) swap(x, y); data[x] += data[y];...
replace
78
79
78
79
-6
Fatal glibc error: malloc assertion failure in sysmalloc: (old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)
p02904
C++
Runtime Error
#include <bits/stdc++.h> #define fi first #define se second const int N = 200200; const long long m1 = 999998727899999ll; const long long m2 = 777737777777777ll; const long long p1 = 1e9 + 7; const long long p2 = 1e9 + 9; using namespace std; struct fenwick { long long mod; long long t[N]; void upd(int x, lo...
#include <bits/stdc++.h> #define fi first #define se second const int N = 200200; const long long m1 = 999998727899999ll; const long long m2 = 777737777777777ll; const long long p1 = 1e9 + 7; const long long p2 = 1e9 + 9; using namespace std; struct fenwick { long long mod; long long t[N]; void upd(int x, lo...
replace
81
83
81
83
TLE
p02904
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const int MOD = 1000000007; const int MOD2 = 1000000009; const int MAXN = 100000; int n, k; int p[MAXN]; int pw[MAXN]; int pw2[MAXN]; int p1[MAXN]; int p2[MAXN]; pair<int, int> tree[4 * MAXN]; int len[4 * MAXN]; void upd(int i, int l, int r, int x, bool add) { if (l > x...
#include <bits/stdc++.h> using namespace std; const int MOD = 1000000007; const int MOD2 = 1000000009; const int MAXN = 200005; int n, k; int p[MAXN]; int pw[MAXN]; int pw2[MAXN]; int p1[MAXN]; int p2[MAXN]; pair<int, int> tree[4 * MAXN]; int len[4 * MAXN]; void upd(int i, int l, int r, int x, bool add) { if (l > x...
replace
5
6
5
6
0
p02904
C++
Runtime Error
/* Aa^~ kokoro ga pyonpyon suru n jaa^~ // ZZZXXkXkkkZ!``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ```?Wfpppbpbbpbbpbbbkbkk // ppbbbpbbpVr`` `` ` ` ` ` ```` `` ` ` `` ` ` ` ` ` ` ` ` ` dppbbkkkkkkkkkkqkqkk // HkqqqqqkkWr`` ` ` ``` ``` `?G, ` ` ``.JC!```` ` ` `` `` ````(Wpbkkkkkkkkqkkkkkqk // mmmmmqqqqpr` `` `` ```````...
/* Aa^~ kokoro ga pyonpyon suru n jaa^~ // ZZZXXkXkkkZ!``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ```?Wfpppbpbbpbbpbbbkbkk // ppbbbpbbpVr`` `` ` ` ` ` ```` `` ` ` `` ` ` ` ` ` ` ` ` ` dppbbkkkkkkkkkkqkqkk // HkqqqqqkkWr`` ` ` ``` ``` `?G, ` ` ``.JC!```` ` ` `` `` ````(Wpbkkkkkkkkqkkkkkqk // mmmmmqqqqpr` `` `` ```````...
replace
164
165
164
165
0
p02904
C++
Runtime Error
/** * Created by hiramekun at 20:53 on 2019-09-21. */ #include <bits/stdc++.h> using namespace std; using ll = long long; using vl = vector<ll>; using vvl = vector<vl>; using vb = vector<bool>; using P = pair<ll, ll>; template <typename T> using pq = priority_queue<T>; template <typename T> using minpq = priority_q...
/** * Created by hiramekun at 20:53 on 2019-09-21. */ #include <bits/stdc++.h> using namespace std; using ll = long long; using vl = vector<ll>; using vvl = vector<vl>; using vb = vector<bool>; using P = pair<ll, ll>; template <typename T> using pq = priority_queue<T>; template <typename T> using minpq = priority_q...
replace
77
78
77
79
0
p02904
C++
Runtime Error
#include <bits/stdc++.h> #define f first #define s second #define MOD 1000000007 #define PMOD 998244353 #define pb(x) push_back(x) using namespace std; typedef long long int ll; typedef pair<int, int> pii; typedef pair<ll, ll> plii; typedef pair<int, pii> piii; const int INF = 1e9 + 10; const ll LINF = 1LL * INF * INF...
#include <bits/stdc++.h> #define f first #define s second #define MOD 1000000007 #define PMOD 998244353 #define pb(x) push_back(x) using namespace std; typedef long long int ll; typedef pair<int, int> pii; typedef pair<ll, ll> plii; typedef pair<int, pii> piii; const int INF = 1e9 + 10; const ll LINF = 1LL * INF * INF...
replace
24
26
24
25
0
p02904
C++
Runtime Error
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; using ll = long long; #define pp pair<int, int> #define rep(i, n) for (int(i) = 0; (i) < (n); (i)++) #define ld long double #define al(a) (a).begin(), (a).end() #define mk make_pair #define check cout << "?" << endl; ll MOD = 1000000007; ll mod = 998...
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; using ll = long long; #define pp pair<int, int> #define rep(i, n) for (int(i) = 0; (i) < (n); (i)++) #define ld long double #define al(a) (a).begin(), (a).end() #define mk make_pair #define check cout << "?" << endl; ll MOD = 1000000007; ll mod = 998...
replace
29
30
29
30
0
p02904
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; const int N = 1e5; deque<pii> qac, qde; int p[N]; int main() { int n, k; cin >> n >> k; for (int i = 0; i < n; i++) { scanf("%d", &p[i]); } int len = 1; int cnt2 = 0; for (int i = 1; i < n; i++) { if...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; const int N = 2e5 + 10; deque<pii> qac, qde; int p[N]; int main() { int n, k; cin >> n >> k; for (int i = 0; i < n; i++) { scanf("%d", &p[i]); } int len = 1; int cnt2 = 0; for (int i = 1; i < n; i++) { ...
replace
4
5
4
5
0
p02904
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const int N = 1e5 + 5; typedef long long i64; int n, k, p[N], t[N], ans, cnt; i64 s; void add(int x, int d) { for (; x <= n; x += x & -x) t[x] += d; } int ask(int x) { int y = 0; for (; x; x ^= x & -x) y += t[x]; return y; } int main() { scanf("%d%d", &n, ...
#include <bits/stdc++.h> using namespace std; const int N = 2e5 + 5; typedef long long i64; int n, k, p[N], t[N], ans, cnt; i64 s; void add(int x, int d) { for (; x <= n; x += x & -x) t[x] += d; } int ask(int x) { int y = 0; for (; x; x ^= x & -x) y += t[x]; return y; } int main() { scanf("%d%d", &n, ...
replace
2
3
2
3
0
p02904
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int n, k; const int maxn = 200005; int a[maxn]; int ans; set<int> st; int b[maxn]; int main() { scanf("%d%d", &n, &k); for (int i = 1; i <= n; i++) scanf("%d", &a[i]); int now = 1; int cnt = 0; for (int i = 2; i <= n; i++) { if (a[i] < a[i - 1]) now ...
#include <bits/stdc++.h> using namespace std; int n, k; const int maxn = 200005; int a[maxn]; int ans; set<int> st; int b[maxn]; int main() { scanf("%d%d", &n, &k); for (int i = 1; i <= n; i++) scanf("%d", &a[i]); int now = 1; int cnt = 0; for (int i = 2; i <= n; i++) { if (a[i] < a[i - 1]) now ...
replace
22
26
22
25
TLE
p02904
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define REP(i, m, n) for (int i = (m); i < (int)(n); i++) #define REPS(i, m, n) for (int i = (m); i <= (int)(n); i++) #define rep(i, n) REP(i, 0, n) #define reps(i, n) for (int i = 0; i <= (int)(n); i++) #define rrep(i, x) for (int i = ((int)(x)-1); i >= 0; i--) #define rr...
#include <bits/stdc++.h> using namespace std; #define REP(i, m, n) for (int i = (m); i < (int)(n); i++) #define REPS(i, m, n) for (int i = (m); i <= (int)(n); i++) #define rep(i, n) REP(i, 0, n) #define reps(i, n) for (int i = 0; i <= (int)(n); i++) #define rrep(i, x) for (int i = ((int)(x)-1); i >= 0; i--) #define rr...
replace
142
143
142
143
0
p02904
C++
Time Limit Exceeded
#include <cstdio> #include <iostream> #include <set> using namespace std; int n, k, c, cnt, ans = 1, a[200005]; set<int> st; int main() { int i; cin >> n >> k; for (i = 0; i < n; i++) scanf("%d", &a[i]); for (i = 0; i < n - 1; i++) { if (a[i] < a[i + 1]) c++; else c = 0; if (c == k...
#include <cstdio> #include <iostream> #include <set> using namespace std; int n, k, c, cnt, ans = 1, a[200005]; set<int> st; int main() { int i; cin >> n >> k; for (i = 0; i < n; i++) scanf("%d", &a[i]); for (i = 0; i < n - 1; i++) { if (a[i] < a[i + 1]) c++; else c = 0; if (c == k...
insert
28
28
28
29
TLE
p02904
C++
Runtime Error
#include <algorithm> #include <climits> #include <cmath> #include <cstdio> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <unordered_map> #include <vector> #define ll l...
#include <algorithm> #include <climits> #include <cmath> #include <cstdio> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <unordered_map> #include <vector> #define ll l...
replace
72
73
72
73
0
p02904
C++
Runtime Error
// https://atcoder.jp/contests/agc038/tasks/agc038_b #pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") #pragma GCC optimize("tree-loop-im") #pragma GCC optimize("tree-loop-ivcanon") #pragma GCC target("sse,sse2,sse3,sse4,abm,avx,avx2,fma,mmx,popcnt,tune=native") #include <bits/stdc++.h> #include <ext/p...
// https://atcoder.jp/contests/agc038/tasks/agc038_b #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/priority_queue.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace std::placeholders; using namespace __gnu_pbds; #define pb push_back #define eb emplace_...
delete
1
6
1
1
0
p02904
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std::literals::string_literals; using i64 = std::int_fast64_t; using std::cin; using std::cout; using std::endl; template <typename T> std::vector<T> make_v(size_t a) { return std::vector<T>(a); } template <typename T, typename... Ts> auto make_v(size_t a, Ts... ts) { retu...
#include <bits/stdc++.h> using namespace std::literals::string_literals; using i64 = std::int_fast64_t; using std::cin; using std::cout; using std::endl; template <typename T> std::vector<T> make_v(size_t a) { return std::vector<T>(a); } template <typename T, typename... Ts> auto make_v(size_t a, Ts... ts) { retu...
delete
136
141
136
136
TLE
p02904
C++
Time Limit Exceeded
#include <bits/stdc++.h> #include <unistd.h> using namespace std; #define DEBUG(x) cerr << #x << ": " << x << endl; #define DEBUG_VEC(v) \ cerr << #v << ":"; \ for (int i = 0; i < v.size(); i++) ...
#include <bits/stdc++.h> #include <unistd.h> using namespace std; #define DEBUG(x) cerr << #x << ": " << x << endl; #define DEBUG_VEC(v) \ cerr << #v << ":"; \ for (int i = 0; i < v.size(); i++) ...
delete
193
197
193
193
TLE
p02904
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < int(n); i++) #define rrep(i, n) for (int i = int(n) - 1; i >= 0; i--) #define reps(i, n) for (int i = 1; i <= int(n); i++) #define rreps(i, n) for (int i = int(n); i >= 1; i--) #define repc(i, n) for (int i = 0; i <= int(n); i++) #define rrepc(i, n) for (i...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < int(n); i++) #define rrep(i, n) for (int i = int(n) - 1; i >= 0; i--) #define reps(i, n) for (int i = 1; i <= int(n); i++) #define rreps(i, n) for (int i = int(n); i >= 1; i--) #define repc(i, n) for (int i = 0; i <= int(n); i++) #define rrepc(i, n) for (i...
replace
110
111
110
111
0
p02904
C++
Runtime Error
#include <bits/stdc++.h> #include <iterator> #include <set> using namespace std; // using namespace __gnu_pbds; #define f first #define s second #define pb push_back #define all(x) x.begin(), x.end() #define ll long long int #define vi vector<int> #define vii vector<pair<int, int>> #define pii pair<int, int> #define...
#include <bits/stdc++.h> #include <iterator> #include <set> using namespace std; // using namespace __gnu_pbds; #define f first #define s second #define pb push_back #define all(x) x.begin(), x.end() #define ll long long int #define vi vector<int> #define vii vector<pair<int, int>> #define pii pair<int, int> #define...
delete
114
119
114
114
-11
p02904
C++
Runtime Error
#include <bits/stdc++.h> #ifdef __LOCAL #define DBG(X) cout << #X << " = " << (X) << endl; #define SAY(X) cout << (X) << endl; #else #define DBG(X) #define SAY(X) #endif #ifdef __LOCAL #include <filesystem> namespace fs = std::filesystem; #endif using namespace std; using ll = long long int; using ull = unsigned lo...
#include <bits/stdc++.h> #ifdef __LOCAL #define DBG(X) cout << #X << " = " << (X) << endl; #define SAY(X) cout << (X) << endl; #else #define DBG(X) #define SAY(X) #endif #ifdef __LOCAL #include <filesystem> namespace fs = std::filesystem; #endif using namespace std; using ll = long long int; using ull = unsigned lo...
replace
358
364
358
366
-11
p02904
C++
Runtime Error
#include <algorithm> #include <cassert> #include <cfloat> #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; us...
#include <algorithm> #include <cassert> #include <cfloat> #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; us...
replace
71
72
71
75
0
p02904
C++
Runtime Error
#include <bits/stdc++.h> #define pb push_back #define int long long #define mp make_pair #define inf 998244353 #define ll long long using namespace std; ll leng[114514], used[114514], mi[114514], ma[114514]; signed main() { int n, k; cin >> n >> k; int ans = n - k + 1; vector<int> a; for (int i = 0; i < n; i+...
#include <bits/stdc++.h> #define pb push_back #define int long long #define mp make_pair #define inf 998244353 #define ll long long using namespace std; ll leng[214514], used[214514], mi[214514], ma[214514]; signed main() { int n, k; cin >> n >> k; int ans = n - k + 1; vector<int> a; for (int i = 0; i < n; i+...
replace
7
8
7
8
0
p02904
C++
Runtime Error
#include <algorithm> #include <iostream> #include <set> #include <stdio.h> #include <string.h> #define maxn 100005 using namespace std; int n, k; int p[maxn]; set<int> s1, s2; int main() { scanf("%d%d", &n, &k); for (int i = 1; i <= n; i++) scanf("%d", &p[i]); p[0] = -1; int cnt = 0, flag = 1; for (int i ...
#include <algorithm> #include <iostream> #include <set> #include <stdio.h> #include <string.h> #define maxn 200005 using namespace std; int n, k; int p[maxn]; set<int> s1, s2; int main() { scanf("%d%d", &n, &k); for (int i = 1; i <= n; i++) scanf("%d", &p[i]); p[0] = -1; int cnt = 0, flag = 1; for (int i ...
replace
5
6
5
6
0
p02904
C++
Runtime Error
#include <algorithm> #include <functional> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> pii; #de...
#include <algorithm> #include <functional> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> pii; #de...
replace
72
73
72
73
0
p02904
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const int maxn = 1e5 + 10; int p[maxn]; set<int> st; int main() { int n, k; cin >> n >> k; for (int i = 0; i < n; i++) cin >> p[i]; int inc = 1; int tmp = 0; for (int i = 0; i < k; i++) { st.insert(p[i]); if (i > 0) inc = p[i] > p[i - 1] ? i...
#include <bits/stdc++.h> using namespace std; const int maxn = 2e5 + 10; int p[maxn]; set<int> st; int main() { int n, k; cin >> n >> k; for (int i = 0; i < n; i++) cin >> p[i]; int inc = 1; int tmp = 0; for (int i = 0; i < k; i++) { st.insert(p[i]); if (i > 0) inc = p[i] > p[i - 1] ? i...
replace
3
4
3
4
0
p02904
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; // #include <boost/multiprecision/cpp_int.hpp> // typedef boost::multiprecision::cpp_int ll; typedef long double dd; #define i_7 (ll)(1E9 + 7) // #define i_7 998244353 #define i_5 i_7 - 2 ll mod(ll a) { ll c = a % i_7; if (c >= 0) return c; r...
#include <bits/stdc++.h> using namespace std; typedef long long ll; // #include <boost/multiprecision/cpp_int.hpp> // typedef boost::multiprecision::cpp_int ll; typedef long double dd; #define i_7 (ll)(1E9 + 7) // #define i_7 998244353 #define i_5 i_7 - 2 ll mod(ll a) { ll c = a % i_7; if (c >= 0) return c; r...
replace
150
151
150
151
0
p02904
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int solve(const vector<int> &a, int k) { const int n = a.size(); int count = 1; set<int> seg; vector<int> s(n); s[0] = 1; for (int i = 1; i < n; ++i) { if (a[i] > a[i - 1]) s[i] = s[i - 1] + 1; else s[i] = 1; } if (*max_element(s.begin(...
#include <bits/stdc++.h> using namespace std; int solve(const vector<int> &a, int k) { const int n = a.size(); int count = 1; set<int> seg; vector<int> s(n); s[0] = 1; for (int i = 1; i < n; ++i) { if (a[i] > a[i - 1]) s[i] = s[i - 1] + 1; else s[i] = 1; } if (*max_element(s.begin(...
replace
65
66
65
66
TLE
p02904
C++
Runtime Error
#include <algorithm> #include <cmath> #include <cstdio> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <utility> #include <vector> #define rep(i, n) for (int i = 0; i < (n); i++) using...
#include <algorithm> #include <cmath> #include <cstdio> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <utility> #include <vector> #define rep(i, n) for (int i = 0; i < (n); i++) using...
replace
43
45
43
45
0
p02904
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using i64 = long long; const i64 MOD = 1e9 + 7; const i64 INF = i64(1e18) + 7; template <typename T> bool chmin(T &x, T y) { if (x > y) { x = y; return true; } return false; } template <typename T> bool chmax(T &x, T y) { if (x < y) { x = y; ret...
#include <bits/stdc++.h> using namespace std; using i64 = long long; const i64 MOD = 1e9 + 7; const i64 INF = i64(1e18) + 7; template <typename T> bool chmin(T &x, T y) { if (x > y) { x = y; return true; } return false; } template <typename T> bool chmax(T &x, T y) { if (x < y) { x = y; ret...
delete
92
94
92
92
TLE
p02905
C++
Time Limit Exceeded
#include <iostream> #include <vector> using namespace std; using ll = long long int; const ll MOD = 998244353; vector<vector<int>> divs(1010101, vector<int>{}); vector<vector<int>> A_div(1010101, vector<int>{}); ll sum_AiAj[1010101]; vector<int> a(202020); ll mod_pow(ll x, ll n) { ll ret = 1; while (n != 0) { ...
#include <iostream> #include <vector> using namespace std; using ll = long long int; const ll MOD = 998244353; vector<vector<int>> divs(1010101, vector<int>{}); vector<vector<int>> A_div(1010101, vector<int>{}); ll sum_AiAj[1010101]; vector<int> a(202020); ll mod_pow(ll x, ll n) { ll ret = 1; while (n != 0) { ...
insert
64
64
64
67
TLE
p02905
C++
Runtime Error
#include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <iostream> #include <map> #include <queue> #include <set> #include <vector> #define m_p make_pair #define sz(x) (int)x.size() #define out(x) cerr << #x << " = " << x << " " #define ...
#include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <iostream> #include <map> #include <queue> #include <set> #include <vector> #define m_p make_pair #define sz(x) (int)x.size() #define out(x) cerr << #x << " = " << x << " " #define ...
replace
69
70
69
70
0
p02905
C++
Time Limit Exceeded
#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 tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set; #define scan(x) ...
#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 tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set; #define scan(x) ...
insert
86
86
86
88
TLE
p02905
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const int N = 1e3 + 2, mod = 998244353; int n, x, a[N], inv[N], w[N]; int main() { inv[1] = 1; for (int i = 2; i < N; i++) inv[i] = (-1ll * inv[mod % i] * (mod / i) % mod + mod) % mod; scanf("%d", &n); int ans = 0; for (int i = 1; i <= n; i++) { scanf("%d"...
#include <bits/stdc++.h> using namespace std; const int N = 1e6 + 2, mod = 998244353; int n, x, a[N], inv[N], w[N]; int main() { inv[1] = 1; for (int i = 2; i < N; i++) inv[i] = (-1ll * inv[mod % i] * (mod / i) % mod + mod) % mod; scanf("%d", &n); int ans = 0; for (int i = 1; i <= n; i++) { scanf("%d"...
replace
2
3
2
3
0
p02905
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define fo(i, l, r) for (int i = l; i <= r; i++) #define of(i, l, r) for (int i = l; i >= r; i--) #define fe(i, u) for (int i = head[u]; i; i = e[i].next) #define el putchar('\n') #define ta putchar(' ') using namespace std; typedef long long ll; typedef pair<int, int> pii; inline void open(con...
#include <bits/stdc++.h> #define fo(i, l, r) for (int i = l; i <= r; i++) #define of(i, l, r) for (int i = l; i >= r; i--) #define fe(i, u) for (int i = head[u]; i; i = e[i].next) #define el putchar('\n') #define ta putchar(' ') using namespace std; typedef long long ll; typedef pair<int, int> pii; inline void open(con...
delete
70
71
70
70
TLE
p02905
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <tuple> #include <vector> #define INF 1000000009 #define LINF 1000000000000000009 #define double long double #define all(a) a.begin(), a.end() usin...
#include <algorithm> #include <cmath> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <tuple> #include <vector> #define INF 1000000009 #define LINF 1000000000000000009 #define double long double #define all(a) a.begin(), a.end() usin...
replace
122
125
122
125
TLE
p02905
C++
Runtime Error
// পূর্ণিমা সন্ধ্যায় তোমার রজনী গন্ধায় // রূপসাগরের পাড়ের পানে উদাসী মন ধায় #include <bits/stdc++.h> using namespace std; #define pb push_back #define pii pair<int, int> #define vi vector<int> typedef long long ll; const long long M = 1e5 + 20, MX = 1e6 + 20, mod = 998244353; ll ara[M], inv[MX]; vi dvs[MX]; void invrs(...
// পূর্ণিমা সন্ধ্যায় তোমার রজনী গন্ধায় // রূপসাগরের পাড়ের পানে উদাসী মন ধায় #include <bits/stdc++.h> using namespace std; #define pb push_back #define pii pair<int, int> #define vi vector<int> typedef long long ll; const long long M = 1e5 + 20, MX = 1e6 + 20, mod = 998244353; ll ara[2 * M], inv[MX]; vi dvs[MX]; void in...
replace
9
10
9
10
0
p02905
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const int mod = 998244353; const int M = 1000000; int N; int A[100000]; long C[M + 1]; void sub() { for (int i = 1; i <= M; ++i) { long sum = 0; for (int k = i; k <= M; k += i) { sum += C[k]; } C[i] = sum % mod; } for (int i = 1; i <= M; ++i) ...
#include <bits/stdc++.h> using namespace std; const int mod = 998244353; const int M = 1000000; int N; int A[200000]; long C[M + 1]; void sub() { for (int i = 1; i <= M; ++i) { long sum = 0; for (int k = i; k <= M; k += i) { sum += C[k]; } C[i] = sum % mod; } for (int i = 1; i <= M; ++i) ...
replace
7
8
7
8
0
p02905
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define pf printf #define PF(a) printf("%d\n", (a)) #define PF2(a, b) printf("%d %d\n", (a), (b)) #define PF3(a, b, c) printf("%d %d %d\n", (a), (b), (c)) #define PFL(a) printf("%lld\n", (a)) #define PFL2(a, b) printf("%lld %lld\n", (a), (b)) #define PFL3(a, b, c) printf(...
#include <bits/stdc++.h> using namespace std; #define pf printf #define PF(a) printf("%d\n", (a)) #define PF2(a, b) printf("%d %d\n", (a), (b)) #define PF3(a, b, c) printf("%d %d %d\n", (a), (b), (c)) #define PFL(a) printf("%lld\n", (a)) #define PFL2(a, b) printf("%lld %lld\n", (a), (b)) #define PFL3(a, b, c) printf(...
insert
148
148
148
150
TLE
p02905
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; using uint = unsigned int; using pii = pair<int, int>; using pll = pair<ll, ll>; using ull = unsigned long long; using ld = long double; template <typename T> void _(const char *s, T h) { cerr << s << " = " << h << "\n"; } template <typename T, typen...
#include <bits/stdc++.h> using namespace std; using ll = long long; using uint = unsigned int; using pii = pair<int, int>; using pll = pair<ll, ll>; using ull = unsigned long long; using ld = long double; template <typename T> void _(const char *s, T h) { cerr << s << " = " << h << "\n"; } template <typename T, typen...
replace
52
53
52
53
0
p02905
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define ll long long const int N = 1000 + 1, MOD = 998244353; int cnt[N], S[N], _S[N]; vector<int> Div[N]; int sum(int a, int b) { return a + b - (a + b >= MOD ? MOD : 0); } int mul(ll a, ll b) { return a * b % MOD; } int main() { for (int i = N - 1; i >= 1; i--) f...
#include <bits/stdc++.h> using namespace std; #define ll long long const int N = 1e6 + 1, MOD = 998244353; int cnt[N], S[N], _S[N]; vector<int> Div[N]; int sum(int a, int b) { return a + b - (a + b >= MOD ? MOD : 0); } int mul(ll a, ll b) { return a * b % MOD; } int main() { for (int i = N - 1; i >= 1; i--) fo...
replace
4
5
4
5
0
p02905
C++
Time Limit Exceeded
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #includ...
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #includ...
replace
53
54
53
54
TLE
p02905
C++
Runtime Error
// +-- -- --++-- +-In the name of ALLAH-+ --++-- -- --+ \\ #include <bits/stdc++.h> #define F first #define S second #define _sz(x) (int)x.size() #define pb push_back #define error(x) cout << #x << " = " << x << endl using namespace std; using ll = long long; using ld = long double; using ...
// +-- -- --++-- +-In the name of ALLAH-+ --++-- -- --+ \\ #include <bits/stdc++.h> #define F first #define S second #define _sz(x) (int)x.size() #define pb push_back #define error(x) cout << #x << " = " << x << endl using namespace std; using ll = long long; using ld = long double; using ...
replace
50
51
50
51
TLE
p02905
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> using namespace std; using ll = long long; int const nmax = 1000000; int const modulo = 998244353; int v[1 + nmax]; ll sum[1 + nmax], sol[1 + nmax]; void gcd(int a, int b, int &x, int &y) { if (b == 0) { x = 1; y = 0; } else { gcd(b, a % b, x, y); int aux...
#include <algorithm> #include <iostream> using namespace std; using ll = long long; int const nmax = 1000000; int const modulo = 998244353; int v[1 + nmax]; ll sum[1 + nmax], sol[1 + nmax]; void gcd(int a, int b, int &x, int &y) { if (b == 0) { x = 1; y = 0; } else { gcd(b, a % b, x, y); int aux...
replace
49
57
49
50
TLE
p02905
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (int i = (a); i <= (b); ++i) #define rrep(i, a, b) for (int i = (a); i >= (b); --i) #define PB push_back #define ar2 array<int, 2> typedef long long LL; const int P = 998244353; const int N = 2e5, M = 1e6; const double pi = acos(-1); mt19937 rng(chr...
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (int i = (a); i <= (b); ++i) #define rrep(i, a, b) for (int i = (a); i >= (b); --i) #define PB push_back #define ar2 array<int, 2> typedef long long LL; const int P = 998244353; const int N = 2e5, M = 1e6; const double pi = acos(-1); mt19937 rng(chr...
delete
35
36
35
35
-6
terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc
p02905
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define rep(i, s, e) for (i64(i) = (s); (i) < (e); (i)++) #define rev(i, s, e) for (i64(i) = (s); (i)-- > (e);) #define all(x) x.begin(), x.end() template <class T> static inline std::vector<T> ndvec(size_t &&n, T val) noexcept { return std::vector<T>(n, std::forward<T>(...
#include <bits/stdc++.h> using namespace std; #define rep(i, s, e) for (i64(i) = (s); (i) < (e); (i)++) #define rev(i, s, e) for (i64(i) = (s); (i)-- > (e);) #define all(x) x.begin(), x.end() template <class T> static inline std::vector<T> ndvec(size_t &&n, T val) noexcept { return std::vector<T>(n, std::forward<T>(...
replace
25
26
25
26
TLE
p02905
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define rep(i, s, e) for (i64(i) = (s); (i) < (e); (i)++) #define rev(i, s, e) for (i64(i) = (s); (i)-- > (e);) #define all(x) x.begin(), x.end() template <class T> static inline std::vector<T> ndvec(size_t &&n, T val) noexcept { return std::vector<T>(n, std::forward<T>(...
#include <bits/stdc++.h> using namespace std; #define rep(i, s, e) for (i64(i) = (s); (i) < (e); (i)++) #define rev(i, s, e) for (i64(i) = (s); (i)-- > (e);) #define all(x) x.begin(), x.end() template <class T> static inline std::vector<T> ndvec(size_t &&n, T val) noexcept { return std::vector<T>(n, std::forward<T>(...
replace
167
168
167
168
0
p02905
C++
Time Limit Exceeded
/** * author: otera **/ #include <algorithm> #include <bitset> #include <cassert> #include <ciso646> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <random> #include <se...
/** * author: otera **/ #include <algorithm> #include <bitset> #include <cassert> #include <ciso646> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <random> #include <se...
replace
175
176
175
176
TLE
p02905
C++
Time Limit Exceeded
#include "bits/stdc++.h" using namespace std; using ll = long long; using vll = std::vector<ll>; using vvll = std::vector<vll>; using vvvll = std::vector<vvll>; using dd = double; using vdd = std::vector<dd>; using vvdd = std::vector<vdd>; using vvvdd = std::vector<vvdd>; constexpr ll INF = 1LL << 60; constexpr dd EPS...
#include "bits/stdc++.h" using namespace std; using ll = long long; using vll = std::vector<ll>; using vvll = std::vector<vll>; using vvvll = std::vector<vvll>; using dd = double; using vdd = std::vector<dd>; using vvdd = std::vector<vdd>; using vvvdd = std::vector<vvdd>; constexpr ll INF = 1LL << 60; constexpr dd EPS...
replace
264
266
264
268
TLE
p02905
Python
Runtime Error
import sys def prepare(n, MOD): f = 1 factorials = [1] for m in range(1, n + 1): f *= m f %= MOD factorials.append(f) inv = pow(f, MOD - 2, MOD) invs = [1] * (n + 1) invs[n] = inv for m in range(n, 1, -1): inv *= m inv %= MOD invs[m - 1] = in...
import sys def prepare(n, MOD): f = 1 factorials = [1] for m in range(1, n + 1): f *= m f %= MOD factorials.append(f) inv = pow(f, MOD - 2, MOD) invs = [1] * (n + 1) invs[n] = inv for m in range(n, 1, -1): inv *= m inv %= MOD invs[m - 1] = in...
replace
26
27
26
27
0
p02906
C++
Runtime Error
#include <cassert> #include <cmath> #include <iostream> #include <vector> using ll = long long; #define MIN(a, b) (((a) < (b)) ? (a) : (b)) #define MAX(a, b) (((a) < (b)) ? (b) : (a)) class Dsu { public: std::vector<int> mult; std::vector<int> sz; Dsu(int n) { mult.resize(1 + n); sz.resize(1 + n); f...
#include <cassert> #include <cmath> #include <iostream> #include <vector> using ll = long long; #define MIN(a, b) (((a) < (b)) ? (a) : (b)) #define MAX(a, b) (((a) < (b)) ? (b) : (a)) class Dsu { public: std::vector<int> mult; std::vector<int> sz; Dsu(int n) { mult.resize(1 + n); sz.resize(1 + n); f...
replace
46
47
46
47
0
p02906
C++
Runtime Error
#include "bits/stdc++.h" using namespace std; #define int long long #define rep(i, n) for (short i = 0; i < n; ++i) typedef pair<int, int> P; int par[100006], siz[100006]; void init(int n) { rep(i, n) { par[i] = i; siz[i] = 1; } } int find(int x) { if (par[x] == x) return x; return par[x] = find(par...
#include "bits/stdc++.h" using namespace std; #define int long long #define rep(i, n) for (int i = 0; i < n; ++i) typedef pair<int, int> P; int par[100006], siz[100006]; void init(int n) { rep(i, n) { par[i] = i; siz[i] = 1; } } int find(int x) { if (par[x] == x) return x; return par[x] = find(par[x...
replace
3
4
3
4
0
p02906
C++
Runtime Error
#include <bits/stdc++.h> #define int long long #define pii pair<int, int> #define x1 x1228 #define y1 y1228 #define left left228 #define right right228 #define pb push_back #define eb emplace_back #define mp make_pair #define ff first #define ss second #define matr vector<vector<int>> #define all(x) x.begin(),...
#include <bits/stdc++.h> #define int long long #define pii pair<int, int> #define x1 x1228 #define y1 y1228 #define left left228 #define right right228 #define pb push_back #define eb emplace_back #define mp make_pair #define ff first #define ss second #define matr vector<vector<int>> #define all(x) x.begin(),...
delete
100
105
100
100
1
p02906
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using int64 = long long; const int mod = 998244353; const int64 infll = (1LL << 62) - 1; const int inf = (1 << 30) - 1; struct IoSetup { IoSetup() { cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(10); cerr << fixed << setp...
#include <bits/stdc++.h> using namespace std; using int64 = long long; const int mod = 998244353; const int64 infll = (1LL << 62) - 1; const int inf = (1 << 30) - 1; struct IoSetup { IoSetup() { cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(10); cerr << fixed << setp...
replace
112
113
112
113
0
p02906
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; /*#include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; template<typename T> using gpp_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; template<typename T, typename L> using gpp_map = tre...
#include <bits/stdc++.h> using namespace std; /*#include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; template<typename T> using gpp_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; template<typename T, typename L> using gpp_map = tre...
replace
161
163
161
170
-6
252fe9e3-ba2e-48a4-ab7d-7e8046f30eaf.out: /home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02906/C++/s591088407.cpp:128: int main(): Assertion `false' failed.
p02906
C++
Runtime Error
#include <algorithm> #include <assert.h> #include <bitset> #include <complex> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #defin...
#include <algorithm> #include <assert.h> #include <bitset> #include <complex> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #defin...
delete
59
61
59
59
0
p02906
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using UL = unsigned int; using ULL = unsigned long long; using LL = long long; #define rep(i, n) for (UL i = 0; i < (n); i++) struct UF { UL N; vector<UL> V; UL Z; void init(UL n) { N = n; V.resize(N); Z = N; rep(i, N) V[i] = i; } UL root(UL a) ...
#include <bits/stdc++.h> using namespace std; using UL = unsigned int; using ULL = unsigned long long; using LL = long long; #define rep(i, n) for (UL i = 0; i < (n); i++) struct UF { UL N; vector<UL> V; UL Z; void init(UL n) { N = n; V.resize(N); Z = N; rep(i, N) V[i] = i; } UL root(UL a) ...
replace
20
21
20
21
TLE
p02906
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define popCnt(x) (__builtin_popcountll(x)) typedef long long Long; const int N = 1e5 + 5; vector<int> adj[2][N]; int comp[N]; void dfs(int node, int id) { if (comp[node] == id) return; comp[node] = id; for (int x : adj[0][node]) { dfs(x, id); } } int m...
#include <bits/stdc++.h> using namespace std; #define popCnt(x) (__builtin_popcountll(x)) typedef long long Long; const int N = 1e5 + 5; vector<int> adj[2][N]; int comp[N]; void dfs(int node, int id) { if (comp[node] == id) return; comp[node] = id; for (int x : adj[0][node]) { dfs(x, id); } } int m...
replace
28
29
28
30
0
p02906
C++
Runtime Error
#include <cstdio> typedef long long LL; const int MN = 100005, MQ = 100005; int N, Q; LL M; int pa[MN]; int fp(int x) { return pa[x] ? pa[x] = fp(pa[x]) : x; } int qu[MQ], qv[MQ], K; int E; int main() { scanf("%d%lld%d", &N, &M, &Q); for (int i = 1; i <= Q; ++i) { int x, y, z; scanf("%d%d%d", &x, &y, &z)...
#include <cstdio> typedef long long LL; const int MN = 100005, MQ = 100005; int N, Q; LL M; int pa[MN]; int fp(int x) { return pa[x] ? pa[x] = fp(pa[x]) : x; } int qu[MQ], qv[MQ], K; int E; int main() { scanf("%d%lld%d", &N, &M, &Q); for (int i = 1; i <= Q; ++i) { int x, y, z; scanf("%d%d%d", &x, &y, &z)...
replace
24
28
24
26
0
p02906
C++
Runtime Error
#include <bits/stdc++.h> #define clr(x) memset(x, 0, sizeof x) #define For(i, a, b) for (int i = (a); i <= (b); i++) #define Fod(i, b, a) for (int i = (b); i >= (a); i--) #define pb(x) push_back(x) #define mp(x, y) make_pair(x, y) #define fi first #define se second #define next Next #define y1 _y1 #define outval(x) cer...
#include <bits/stdc++.h> #define clr(x) memset(x, 0, sizeof x) #define For(i, a, b) for (int i = (a); i <= (b); i++) #define Fod(i, b, a) for (int i = (b); i >= (a); i--) #define pb(x) push_back(x) #define mp(x, y) make_pair(x, y) #define fi first #define se second #define next Next #define y1 _y1 #define outval(x) cer...
replace
66
70
66
69
0
p02906
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; const int N = 1e5 + 7; int p[N], sz[N]; int get(int a) { return (a == p[a] ? a : p[a] = get(p[a])); } int cmp; void join(int a, int b) { a = get(a); b = get(b); if (a != b) { --cmp; p[a] = b; sz[b] += sz...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; const int N = 1e5 + 7; int p[N], sz[N]; int get(int a) { return (a == p[a] ? a : p[a] = get(p[a])); } int cmp; void join(int a, int b) { a = get(a); b = get(b); if (a != b) { --cmp; p[a] = b; sz[b] += sz...
replace
34
35
34
36
0
p02907
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define fo(i, l, r) for (int i = l; i <= r; i++) #define of(i, l, r) for (int i = l; i >= r; i--) #define fe(i, u) for (int i = head[u]; i; i = e[i].next) using namespace std; typedef long long ll; typedef pair<int, int> pii; inline void open(const char *s) { #ifndef ONLINE_JUDGE char str[20]...
#include <bits/stdc++.h> #define fo(i, l, r) for (int i = l; i <= r; i++) #define of(i, l, r) for (int i = l; i >= r; i--) #define fe(i, u) for (int i = head[u]; i; i = e[i].next) using namespace std; typedef long long ll; typedef pair<int, int> pii; inline void open(const char *s) { #ifndef ONLINE_JUDGE char str[20]...
delete
46
47
46
46
TLE
p02907
C++
Time Limit Exceeded
#include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #define MOD2 1000000007 #define MOD 998244353 #define INF ((1 << 30) - 1) #define LINF (1LL << 60) #defi...
#include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #define MOD2 1000000007 #define MOD 998244353 #define INF ((1 << 30) - 1) #define LINF (1LL << 60) #defi...
replace
91
92
91
93
TLE
p02907
C++
Runtime Error
#include <algorithm> #include <cstring> #include <iostream> #include <numeric> #include <vector> constexpr int P = 998'244'353, N = 400; int n; int a[N], b[N], factorial[N], invFactorial[N], pw[N]; int dp[2][N][N]; int power(int a, int b) { int res = 1; while (b > 0) { if (b & 1) res = 1LL * res * a % P; ...
#include <algorithm> #include <cstring> #include <iostream> #include <numeric> #include <vector> constexpr int P = 998'244'353, N = 400; int n; int a[N], b[N], factorial[N], invFactorial[N], pw[N]; int dp[2][N][N + 1]; int power(int a, int b) { int res = 1; while (b > 0) { if (b & 1) res = 1LL * res * a %...
replace
8
9
8
9
0
p02908
C++
Runtime Error
#include <bits/stdc++.h> #define For(i, x, y) for (register int i = (x); i <= (y); i++) #define FOR(i, x, y) for (register int i = (x); i < (y); i++) #define Dow(i, x, y) for (register int i = (x); i >= (y); i--) #define Debug(v) \ for (auto i : v) ...
#include <bits/stdc++.h> #define For(i, x, y) for (register int i = (x); i <= (y); i++) #define FOR(i, x, y) for (register int i = (x); i < (y); i++) #define Dow(i, x, y) for (register int i = (x); i >= (y); i--) #define Debug(v) \ for (auto i : v) ...
replace
87
88
87
91
0
p02908
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; namespace mine { typedef long long ll; #define pr pair<int, int> #define FR first #define SE second #define MP make_pair #define PB push_back #define vc vector #define all(x) (x).begin(), (x).end() #define sz(x) ((int)(x).size()) #define bin(x) (1ll << (x)) #define GG(x) ...
#include <bits/stdc++.h> using namespace std; namespace mine { typedef long long ll; #define pr pair<int, int> #define FR first #define SE second #define MP make_pair #define PB push_back #define vc vector #define all(x) (x).begin(), (x).end() #define sz(x) ((int)(x).size()) #define bin(x) (1ll << (x)) #define GG(x) ...
replace
114
115
114
115
TLE
p02908
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define rep(i, n) for (rint i = 1; i <= (n); i++) #define re0(i, n) for (rint i = 0; i < (int)n; i++) #define travel(i, u) for (rint i = head[u]; i; i = e[i].nxt) #define rint register int using namespace std; typedef long long lo; template <typename tp> inline void read(tp &x) { x = 0; c...
#include <bits/stdc++.h> #define rep(i, n) for (rint i = 1; i <= (n); i++) #define re0(i, n) for (rint i = 0; i < (int)n; i++) #define travel(i, u) for (rint i = head[u]; i; i = e[i].nxt) #define rint register int using namespace std; typedef long long lo; template <typename tp> inline void read(tp &x) { x = 0; c...
replace
65
66
65
66
TLE
p02908
C++
Time Limit Exceeded
#include <cstdio> #include <iostream> #include <queue> #define FOR(i, a, b) for (int i = a; i <= b; i++) #define REP1(u) for (int i = hd[u], v, c; v = e[i].v, c = e[i].c, i; i = e[i].n) #define REP2(u) \ for (int &i = cr[u], v, c; v = e[i].v, c = e[i].c, ...
#include <cstdio> #include <iostream> #include <queue> #define FOR(i, a, b) for (int i = a; i <= b; i++) #define REP1(u) for (int i = hd[u], v, c; v = e[i].v, c = e[i].c, i; i = e[i].n) #define REP2(u) \ for (int &i = cr[u], v, c; v = e[i].v, c = e[i].c, ...
replace
54
56
54
56
TLE
p02908
C++
Time Limit Exceeded
#include <bits/stdc++.h> const int N = 100005, inf = 0x3f3f3f3f; int n, s, t, p[N], q[N], L[N], R[N], head[N], dis[N], cur[N]; int left[N], right[N], tot = 1, idx; bool vis[N]; struct edge { int to, nxt, rem; } e[N * 10]; void link(int x, int y, int z, int w = 0) { e[++tot] = (edge){y, head[x], z}, head[x] = to...
#include <bits/stdc++.h> const int N = 100005, inf = 0x3f3f3f3f; int n, s, t, p[N], q[N], L[N], R[N], head[N], dis[N], cur[N]; int left[N], right[N], tot = 1, idx; bool vis[N]; struct edge { int to, nxt, rem; } e[N * 10]; void link(int x, int y, int z, int w = 0) { e[++tot] = (edge){y, head[x], z}, head[x] = to...
replace
34
35
34
35
TLE
p02908
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define clr(x) memset(x, 0, sizeof x) #define For(i, a, b) for (int i = (a); i <= (b); i++) #define Fod(i, b, a) for (int i = (b); i >= (a); i--) #define pb(x) push_back(x) #define mp(x, y) make_pair(x, y) #define fi first #define se second #define outval(x) cerr << #x " = " << x << endl #defin...
#include <bits/stdc++.h> #define clr(x) memset(x, 0, sizeof x) #define For(i, a, b) for (int i = (a); i <= (b); i++) #define Fod(i, b, a) for (int i = (b); i >= (a); i--) #define pb(x) push_back(x) #define mp(x, y) make_pair(x, y) #define fi first #define se second #define outval(x) cerr << #x " = " << x << endl #defin...
insert
74
74
74
76
TLE
p02908
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define fo(i, l, r) for (int i = l; i <= r; i++) #define of(i, l, r) for (int i = l; i >= r; i--) #define fe(i, u) for (int i = head[u]; i; i = e[i].next) #define el putchar('\n') #define ta putchar(' ') using namespace std; typedef long long ll; typedef pair<int, int> pii; inline void open(con...
#include <bits/stdc++.h> #define fo(i, l, r) for (int i = l; i <= r; i++) #define of(i, l, r) for (int i = l; i >= r; i--) #define fe(i, u) for (int i = head[u]; i; i = e[i].next) #define el putchar('\n') #define ta putchar(' ') using namespace std; typedef long long ll; typedef pair<int, int> pii; inline void open(con...
replace
74
75
74
75
TLE
p02908
C++
Time Limit Exceeded
#include <iostream> #include <queue> #include <vector> #define llint long long #define inf 1e18 using namespace std; struct edge { llint to, cap, rev; edge(llint a, llint b, llint c) { to = a, cap = b, rev = c; } }; int n; llint p[100005], q[100005]; llint a[100005], b[100005]; vector<edge> G[100005]; int S, T;...
#include <iostream> #include <queue> #include <vector> #define llint long long #define inf 1e18 using namespace std; struct edge { llint to, cap, rev; edge(llint a, llint b, llint c) { to = a, cap = b, rev = c; } }; int n; llint p[100005], q[100005]; llint a[100005], b[100005]; vector<edge> G[100005]; int S, T;...
replace
46
47
46
47
TLE
p02909
C++
Runtime Error
/* -> Written by <- ----------- |K_A_Z_A_M_A| |___________| | ___ | | (^_^) | | /( | )\ | |____|_|____| H O A N G */ // i hope i get better // Task name: #define Task "" using namespace std; // Include #include <algorithm> #include <bits/stdc++.h> #include <cstdio> #include <cstring> #...
/* -> Written by <- ----------- |K_A_Z_A_M_A| |___________| | ___ | | (^_^) | | /( | )\ | |____|_|____| H O A N G */ // i hope i get better // Task name: #define Task "" using namespace std; // Include #include <algorithm> #include <bits/stdc++.h> #include <cstdio> #include <cstring> #...
replace
105
107
105
107
0
--------------------- Time elapsed: 0.043947 s.
p02909
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; vector<string> w = {"Sunny", "Cloudy", "Rainy", "Sunny"}; for (int i = 0; i < 4; i++) { if (w[i] == s) { cout << w[i + 1] << endl; } } }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; vector<string> w = {"Sunny", "Cloudy", "Rainy", "Sunny"}; for (int i = 0; i < 4; i++) { if (w[i] == s) { cout << w[i + 1] << endl; break; } } }
insert
11
11
11
12
-11
p02909
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; vector<string> wea; wea = {"Sunny", "Cloudy", "Rainy"}; for (int i = 0; i < 3; i++) { if (S == wea[i]) cout << wea[i + 1] << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; vector<string> wea; wea = {"Sunny", "Cloudy", "Rainy"}; for (int i = 0; i < 3; i++) { if (S == wea[i]) cout << wea[(i + 1) % 3] << endl; } }
replace
10
11
10
11
0
p02909
C++
Runtime Error
/* ID: varunra2 LANG: C++ TASK: codechef */ #include <algorithm> #include <assert.h> #include <bitset> #include <deque> #include <functional> #include <iostream> #include <iterator> #include <limits.h> #include <limits> #include <list> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> ...
/* ID: varunra2 LANG: C++ TASK: codechef */ #include <algorithm> #include <assert.h> #include <bitset> #include <deque> #include <functional> #include <iostream> #include <iterator> #include <limits.h> #include <limits> #include <list> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> ...
replace
74
76
74
76
0
p02909
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; vector<string> weather = {"Sunny", "Cloudy", "Rainy"}; for (int i = 0; i < 3; i++) { if (s == weather.at(i)) { cout << weather.at(i + 1) << endl; } } }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; if (s == "Sunny") { cout << "Cloudy" << endl; } if (s == "Cloudy") { cout << "Rainy" << endl; } if (s == "Rainy") { cout << "Sunny" << endl; } }
replace
5
10
5
13
0
p02909
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <stack> #include <string> #include <vector> #define fi first #define se second #define PI acos(-1.0) #define pb push_back #define mp make_pair #define ll long long #...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <stack> #include <string> #include <vector> #define fi first #define se second #define PI acos(-1.0) #define pb push_back #define mp make_pair #define ll long long #...
replace
32
41
32
40
TLE
p02909
C++
Runtime Error
/** Author: Dwai * Omae wa mou shindeiru! **/ #include <bits/stdc++.h> using namespace std; #define mp make_pair #define pb push_back #define eb emplace_back #define ff first #define ss second #define all(a) (a).begin(), (a).end() #define fr(i, a, b) for (i = a; i <= b; i++) #define frr(i, a, b) for (i = a; i >= b...
/** Author: Dwai * Omae wa mou shindeiru! **/ #include <bits/stdc++.h> using namespace std; #define mp make_pair #define pb push_back #define eb emplace_back #define ff first #define ss second #define all(a) (a).begin(), (a).end() #define fr(i, a, b) for (i = a; i <= b; i++) #define frr(i, a, b) for (i = a; i >= b...
replace
83
84
83
84
0
p02909
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { string s; string weather[4]; weather[0] = "Sunny"; weather[1] = "Cloudy"; weather[2] = "Rainy"; weather[3] = weather[0]; cin >> s; for (int i = 0; i < 4; i++) { if (s == weather[i]) { cout << weather[i + 1] << endl; continue; ...
#include <bits/stdc++.h> using namespace std; int main() { string s; string weather[4]; weather[0] = "Sunny"; weather[1] = "Cloudy"; weather[2] = "Rainy"; weather[3] = weather[0]; cin >> s; for (int i = 0; i < 3; i++) { if (s == weather[i]) { cout << weather[i + 1] << endl; continue; ...
replace
10
11
10
11
0
p02909
C++
Runtime Error
#include <stdio.h> #define ll long long int #include <iostream> #include <queue> #include <vector> using namespace std; int main() { string *k; getline(cin, k[0]); k[0] = "Sunny"; k[1] = "Cloudy"; k[2] = "Rainy"; string j; cin >> j; if (j == k[0]) { cout << k[1]; } else if (j == k[1]) { cout ...
#include <stdio.h> #define ll long long int #include <iostream> #include <queue> #include <vector> using namespace std; int main() { string k[4] = {"Sunny", "Cloudy", "Rainy"}; string j; cin >> j; if (j == k[0]) { cout << k[1]; } else if (j == k[1]) { cout << k[2]; } else if (j == k[2]) { cout ...
replace
8
13
8
9
-11
p02909
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, n) for (ll i = 0; i < n; ++i) #define all(v) v.begin(), v.end() using namespace std; using ll = long long; typedef pair<int, int> P; const int INF = 1001001001; const long double PI = (acos(-1)); const int mod = 1e9 + 7; const int vx[4] = {0, 1, 0, -1}; const int vy[4] = {1, 0,...
#include <bits/stdc++.h> #define rep(i, n) for (ll i = 0; i < n; ++i) #define all(v) v.begin(), v.end() using namespace std; using ll = long long; typedef pair<int, int> P; const int INF = 1001001001; const long double PI = (acos(-1)); const int mod = 1e9 + 7; const int vx[4] = {0, 1, 0, -1}; const int vy[4] = {1, 0,...
insert
24
24
24
28
0
p02909
C++
Runtime Error
#define __USE_MINGW_ANSI_STDIO #define _CRT_SECURE_NO_WARNINGS #include <bits/stdc++.h> #include <unordered_map> #include <unordered_set> using namespace std; typedef long long ll; typedef long long ull; typedef pair<ll, ll> ii; #define all(v) ((v).begin()), ((v).end()) #define sz(v) ((int)((v).size())) #define endl...
#define __USE_MINGW_ANSI_STDIO #define _CRT_SECURE_NO_WARNINGS #include <bits/stdc++.h> #include <unordered_map> #include <unordered_set> using namespace std; typedef long long ll; typedef long long ull; typedef pair<ll, ll> ii; #define all(v) ((v).begin()), ((v).end()) #define sz(v) ((int)((v).size())) #define endl...
replace
22
30
22
30
0
p02909
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif ios_base::sync_with_stdio(0); cin.tie(0); string w; cin >> w; if (w == "Sunny") cout << "Cloudy"; else if (w == "Cloudy") cout << "Rainy"; ...
#include <bits/stdc++.h> using namespace std; int main() { // #ifndef ONLINE_JUDGE // freopen("input.txt","r",stdin); // freopen("output.txt","w",stdout); // #endif // ios_base::sync_with_stdio(0); // cin.tie(0); string w; cin >> w; if (w == "Sunny") cout << "Cloudy"; else if (w == "Cloudy") ...
replace
3
9
3
9
0
p02909
C++
Runtime Error
/// AtCoder Beginner Contest 141 #include <bits/stdc++.h> using namespace std; #define ll long long int main() { ios::sync_with_stdio(false); cin.tie(0); string value[3] = {"Sunny", "Cloudy", "Rainy"}; string str; cin >> str; for (int i = 0; i < str.size(); i++) { if (str == value[i]) { cout <...
/// AtCoder Beginner Contest 141 #include <bits/stdc++.h> using namespace std; #define ll long long int main() { ios::sync_with_stdio(false); cin.tie(0); string value[3] = {"Sunny", "Cloudy", "Rainy"}; string str; cin >> str; for (int i = 0; i < 3; i++) { if (str == value[i]) { cout << value[(...
replace
14
15
14
15
0