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
p03088
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using Int = long long; constexpr Int mod = 1e9 + 7; string str{"AGCT"}; #define rep(i, n) for (int i = 0; i < n; ++i) int main() { Int N; cin >> N; Int dp[101][5][5] = {0}; for (int i = 0; i < N; ++i) { for (int j = 0; j < str.size(); ++j) { for (int k = 0...
#include <bits/stdc++.h> using namespace std; using Int = long long; constexpr Int mod = 1e9 + 7; string str{"AGCT"}; #define rep(i, n) for (int i = 0; i < n; ++i) int main() { Int N; cin >> N; Int dp[106][5][5] = {0}; for (int i = 0; i < N; ++i) { for (int j = 0; j < str.size(); ++j) { for (int k = 0...
replace
9
10
9
10
0
p03088
C++
Runtime Error
#define _GLIBCXX_DEBUG #include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <iterator> #include <numeric> #include <string> #include <utility> #include <vector> using namespace std; #define FOR(i, a, b) for (int i = (a); i <= (b); i++) #define rep(i,...
#define _GLIBCXX_DEBUG #include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <iterator> #include <numeric> #include <string> #include <utility> #include <vector> using namespace std; #define FOR(i, a, b) for (int i = (a); i <= (b); i++) #define rep(i,...
replace
59
60
59
60
0
p03088
C++
Time Limit Exceeded
#include <iostream> #include <string.h> using namespace std; #define MAX_LENGTH 100 #define MOD 1000000007 int N; long long memo[110][6][6][6][6]; // A = 0, C = 1, G = 2, T = 3 long long count(int cur, int c3, int c2, int c1, int input) { // ?AGC if (c2 == 0 && c1 == 2 && input == 1) { return 0; // AG?C...
#include <iostream> #include <string.h> using namespace std; #define MAX_LENGTH 100 #define MOD 1000000007 int N; long long memo[110][6][6][6][6]; // A = 0, C = 1, G = 2, T = 3 long long count(int cur, int c3, int c2, int c1, int input) { if (memo[cur][c3][c2][c1][input] != -1) { return memo[cur][c3][c2][c1][...
insert
13
13
13
17
TLE
p03088
C++
Time Limit Exceeded
#include <bits/stdc++.h> #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 fore(i, a) for (auto &i : a) #define all(x) (x).begin(), (x).end() // #pragma GCC optimize ("-O3") using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(fal...
#include <bits/stdc++.h> #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 fore(i, a) for (auto &i : a) #define all(x) (x).begin(), (x).end() // #pragma GCC optimize ("-O3") using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(fal...
insert
134
134
134
137
TLE
p03088
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; // template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return // true; } return false; } template<class T> inline bool chmin(T& a, T b) { if // (a > b) { a = b; return true; } return false; } // long longのシフト演算には気をつけよう int dp[101][4]...
#include <bits/stdc++.h> using namespace std; typedef long long ll; // template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return // true; } return false; } template<class T> inline bool chmin(T& a, T b) { if // (a > b) { a = b; return true; } return false; } // long longのシフト演算には気をつけよう int dp[101][4]...
replace
25
26
25
26
-11
p03088
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll mod = 1000000007; #define rep(i, n) for (ll i = 0; i < n; i++) ll gcd(ll a, ll b) { if (a < b) swap(a, b); while (b > 0) { ll p = a % b; a = b; b = p; } return a; } ll lcm(ll a, ll b) { ll g = gcd(a, b); return (a /...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll mod = 1000000007; #define rep(i, n) for (ll i = 0; i < n; i++) ll gcd(ll a, ll b) { if (a < b) swap(a, b); while (b > 0) { ll p = a % b; a = b; b = p; } return a; } ll lcm(ll a, ll b) { ll g = gcd(a, b); return (a /...
replace
35
36
35
36
0
p03089
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; static std::vector<int> as; static std::vector<int> bs; static int n; bool solve(int z) { if (z <= 0) { return true; } int i = z - 1; int j = n - 1; for (; i >= 0; --i, --j) { while (bs[j] < 0) { --j; } if (bs[j] != i) { continue; ...
#include <bits/stdc++.h> using namespace std; static std::vector<int> as; static std::vector<int> bs; static int n; bool solve(int z) { if (z <= 0) { return true; } int i = z - 1; int j = n - 1; for (; i >= 0; --i, --j) { while (bs[j] < 0) { --j; } if (bs[j] > i) { return false;...
insert
14
14
14
24
TLE
p03089
C++
Runtime Error
#include <iostream> #include <vector> using namespace std; int n, a; vector<int> b, ans; int main(void) { // Your code here! cin >> n; for (int i = 1; i <= n; i++) { cin >> a; b.push_back(a); } while (b.size() != 0) { bool jud = false; for (int i = b.size() - 1; i >= 0; i--) { if (b[i] =...
#include <iostream> #include <vector> using namespace std; int n, a; vector<int> b, ans; int main(void) { // Your code here! cin >> n; for (int i = 1; i <= n; i++) { cin >> a; b.push_back(a); } while (b.size() != 0) { bool jud = false; for (int i = b.size() - 1; i >= 0; i--) { if (b[i] =...
replace
24
25
24
25
0
p03089
C++
Time Limit Exceeded
#include <algorithm> #include <complex> #include <ctype.h> #include <fstream> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> #include <vector> using namespace std; typedef long long ll; #d...
#include <algorithm> #include <complex> #include <ctype.h> #include <fstream> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> #include <vector> using namespace std; typedef long long ll; #d...
insert
61
61
61
63
TLE
p03089
C++
Runtime Error
#include <bits/stdc++.h> typedef long long ll; using namespace std; int search(int N, vector<int> b) { for (int i = N; i >= 1; i--) { if (b[i - 1] > i) return -1; if (b[i - 1] == i) return i; } } int main() { int N; cin >> N; vector<int> b(N); for (int i = 0; i < N; i++) cin >> b[i...
#include <bits/stdc++.h> typedef long long ll; using namespace std; int search(int N, vector<int> b) { for (int i = N; i >= 1; i--) { if (b[i - 1] > i) return -1; if (b[i - 1] == i) return i; } } int main() { int N; cin >> N; vector<int> b(N); for (int i = 0; i < N; i++) cin >> b[i...
replace
26
27
26
27
0
p03089
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define REP(i, n) for (ll(i) = (0); (i) < (n); ++i) #define REV(i, n) for (ll(i) = (n)-1; (i) >= 0; --i) #define PB push_back #define EB emplace_back #define MP make_pair #define FI first #define SE second #define SHOW1d(v, n) ...
#include <bits/stdc++.h> using namespace std; #define REP(i, n) for (ll(i) = (0); (i) < (n); ++i) #define REV(i, n) for (ll(i) = (n)-1; (i) >= 0; --i) #define PB push_back #define EB emplace_back #define MP make_pair #define FI first #define SE second #define SHOW1d(v, n) ...
replace
48
49
48
49
TLE
p03089
C++
Time Limit Exceeded
#include <algorithm> #include <bitset> #include <climits> #include <cmath> #include <functional> #include <iostream> #include <map> #include <numeric> #include <stdio.h> #include <vector> #define FORi(N) for (int i = 0; i < N; ++i) #define FORj(N) for (int j = 0; j < N; ++j) using namespace std; using ll = long long; u...
#include <algorithm> #include <bitset> #include <climits> #include <cmath> #include <functional> #include <iostream> #include <map> #include <numeric> #include <stdio.h> #include <vector> #define FORi(N) for (int i = 0; i < N; ++i) #define FORj(N) for (int j = 0; j < N; ++j) using namespace std; using ll = long long; u...
replace
38
39
38
39
TLE
p03089
C++
Runtime Error
#include <bits/stdc++.h> #define MOD 1e9 + 7 using namespace std; #define pp push_back #define po pop_back #define mp make_pair #define clr(a) memset(a, 0, sizeof(a)) #define neg(a) memset(a, -1, sizeof(a)) #define fas(a) memset(a, false, sizeof(a)) #define debug(x) cout << #x << ": " << x << endl #define debug1(x) cou...
#include <bits/stdc++.h> #define MOD 1e9 + 7 using namespace std; #define pp push_back #define po pop_back #define mp make_pair #define clr(a) memset(a, 0, sizeof(a)) #define neg(a) memset(a, -1, sizeof(a)) #define fas(a) memset(a, false, sizeof(a)) #define debug(x) cout << #x << ": " << x << endl #define debug1(x) cou...
delete
72
75
72
72
-6
terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc
p03089
C++
Time Limit Exceeded
#include <algorithm> #include <bits/stdc++.h> #include <vector> #define RANGE(i, n) for (int i = 0; i < n; i++) typedef long long ll; using namespace std; stack<ll> answer; bool is_valid(const vector<ll> &in) { ll in_size = in.size(); if (in_size == 0) return true; else { vector<ll> possible; RANGE...
#include <algorithm> #include <bits/stdc++.h> #include <vector> #define RANGE(i, n) for (int i = 0; i < n; i++) typedef long long ll; using namespace std; stack<ll> answer; bool is_valid(const vector<ll> &in) { ll in_size = in.size(); if (in_size == 0) return true; else { vector<ll> possible; RANGE...
insert
19
19
19
21
TLE
p03089
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> using namespace std; #define ll long long #define N 110 char getc() { char c = getchar(); while ((c < 'A' || c > 'Z') && (c < 'a' || c > 'z') && (c < '0' || c > '9')) c = getchar(); return c; } in...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> using namespace std; #define ll long long #define N 110 char getc() { char c = getchar(); while ((c < 'A' || c > 'Z') && (c < 'a' || c > 'z') && (c < '0' || c > '9')) c = getchar(); return c; } in...
delete
30
34
30
30
TLE
p03089
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; vector<int> vet; int n; int main() { cin >> n; vet.resize(n); for (int i = 0; i < n; i++) { cin >> vet[i]; vet[i]--; } vector<int> ans; bool f = 1; while (f and vet.size()) { bool f = 0; for (int i = vet.size() - 1; i >= 0; i--) { if (ve...
#include <bits/stdc++.h> using namespace std; vector<int> vet; int n; int main() { cin >> n; vet.resize(n); for (int i = 0; i < n; i++) { cin >> vet[i]; vet[i]--; } vector<int> ans; bool f = 1; while (f and vet.size()) { f = 0; for (int i = vet.size() - 1; i >= 0; i--) { if (vet[i] ...
replace
15
16
15
16
TLE
p03089
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; using Pi = pair<int, int>; using Pl = pair<ll, ll>; using vint = vector<int>; using vll = vector<ll>; template <typename T> using uset = unordered_set<T>; template <typename T1, typename T2> using umap = unordered_map<T1, T2>; constexpr int INF = (1 ...
#include <bits/stdc++.h> using namespace std; using ll = long long; using Pi = pair<int, int>; using Pl = pair<ll, ll>; using vint = vector<int>; using vll = vector<ll>; template <typename T> using uset = unordered_set<T>; template <typename T1, typename T2> using umap = unordered_map<T1, T2>; constexpr int INF = (1 ...
insert
64
64
64
68
0
p03089
C++
Runtime Error
#include "bits/stdc++.h" using namespace std; // typedef //------------------------------------------ typedef long long LL; typedef unsigned long long ULL; typedef vector<LL> VLL; typedef vector<VLL> VVLL; typedef vector<string> VS; typedef pair<LL, LL> PLL; // container util //---------------------------------------...
#include "bits/stdc++.h" using namespace std; // typedef //------------------------------------------ typedef long long LL; typedef unsigned long long ULL; typedef vector<LL> VLL; typedef vector<VLL> VVLL; typedef vector<string> VS; typedef pair<LL, LL> PLL; // container util //---------------------------------------...
replace
45
52
45
54
0
p03089
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define _overload3(_1, _2, _3, name, ...) name #define _rep(i, n) repi(i, 0, n) #define repi(i, a, b) for (ll i = (ll)(a); i < (ll)(b); ++i) #define rep(...) _overload3(__VA_ARGS__, repi, _rep, )(__VA_ARGS__) #define ll long long #define lld long double #ifdef DEBUG #define line() cerr << "[" <...
#include <bits/stdc++.h> #define _overload3(_1, _2, _3, name, ...) name #define _rep(i, n) repi(i, 0, n) #define repi(i, a, b) for (ll i = (ll)(a); i < (ll)(b); ++i) #define rep(...) _overload3(__VA_ARGS__, repi, _rep, )(__VA_ARGS__) #define ll long long #define lld long double #ifdef DEBUG #define line() cerr << "[" <...
insert
50
50
50
56
TLE
p03089
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define INF 1LL << 62 #define inf 1000000007 int main() { ll n; cin >> n; vector<ll> a; for (int i = 0; i < n; i++) { ll x; cin >> x; a.push_back(x); } vector<ll> b; while (a.size() != 0) { for (int i = a.size() - 1; i >=...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define INF 1LL << 62 #define inf 1000000007 int main() { ll n; cin >> n; vector<ll> a; for (int i = 0; i < n; i++) { ll x; cin >> x; a.push_back(x); } vector<ll> b; while (a.size() != 0) { for (int i = a.size() - 1; i >=...
replace
24
25
24
25
TLE
p03089
C++
Time Limit Exceeded
#include <bits/stdc++.h> #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 FORR(i, m, n) for (int i = m; i >= n; i--) #define SORT(v, n) sort(v, v + n); #define VSORT(v) sort(v.begin(), v.end()); #define llong long long...
#include <bits/stdc++.h> #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 FORR(i, m, n) for (int i = m; i >= n; i--) #define SORT(v, n) sort(v, v + n); #define VSORT(v) sort(v.begin(), v.end()); #define llong long long...
insert
26
26
26
32
TLE
p03089
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define IOS \ ios::sync_with_stdio(false); \ cin.tie(0); #define FOR(i, s, n) for (int i = (s); i < (n); i++) #define REP(i, n) FOR(i, 0, n) #define RREP(i...
#include <bits/stdc++.h> using namespace std; #define IOS \ ios::sync_with_stdio(false); \ cin.tie(0); #define FOR(i, s, n) for (int i = (s); i < (n); i++) #define REP(i, n) FOR(i, 0, n) #define RREP(i...
replace
50
51
50
51
-11
p03089
C++
Runtime Error
#include <bits/stdc++.h> #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 FORR(i, m, n) for (int i = m; i >= n; i--) #define SORT(v, n) sort(v, v + n); #define VSORT(v) sort(v.begin(), v.end()); #define llong long lon...
#include <bits/stdc++.h> #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 FORR(i, m, n) for (int i = m; i >= n; i--) #define SORT(v, n) sort(v, v + n); #define VSORT(v) sort(v.begin(), v.end()); #define llong long lon...
replace
54
55
54
56
0
p03089
C++
Runtime Error
#include "bits/stdc++.h" using namespace std; using ll = long long; using vll = vector<ll>; using pl4 = pair<ll, ll>; using str = string; using vpl4 = vector<pair<ll, ll>>; #define sz size() #define be begin() #define en end() #define fi first #define se second #define pb push_back #define mp make_pair #define llin...
#include "bits/stdc++.h" using namespace std; using ll = long long; using vll = vector<ll>; using pl4 = pair<ll, ll>; using str = string; using vpl4 = vector<pair<ll, ll>>; #define sz size() #define be begin() #define en end() #define fi first #define se second #define pb push_back #define mp make_pair #define llin...
replace
68
69
68
70
0
p03089
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int N; bool fin = false; int search(vector<int> xx, vector<int> ans) { // int check = 1; // bool flag = false; if (xx.size() == 1) { for (int i = ans.size() - 1; i >= 0; i--) { cout << ans.at(i) << endl; } fin = true; return 0; } for (int i ...
#include <bits/stdc++.h> using namespace std; int N; bool fin = false; int search(vector<int> xx, vector<int> ans) { // int check = 1; // bool flag = false; for (int i = 1; i < xx.size(); i++) { if (xx.at(i) > i) { cout << -1 << endl; fin = true; return 0; } } if (xx.size() == 1) { ...
insert
8
8
8
15
TLE
p03089
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)n; ++i) #define repf(i, f, l) for (int i = f; i < (int)l; ++i) #define repit(it, t) \ for (__typeof((t).begin()) it = (t).begin(); it != (t).end(); it++) #define endl "\n...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)n; ++i) #define repf(i, f, l) for (int i = f; i < (int)l; ++i) #define repit(it, t) \ for (__typeof((t).begin()) it = (t).begin(); it != (t).end(); it++) #define endl "\n...
insert
54
54
54
58
TLE
p03089
C++
Time Limit Exceeded
// Robs Code /***********HEADER***************/ #include <bits/stdc++.h> /***********MACROS***************/ #define ll long long int #define fri(l, k) for (i = l; i <= k; i++) #define frj(l, k) for (j = l; j >= k; j--) #define fij(a, b, l, k) \ for (i = a; i <= b...
// Robs Code /***********HEADER***************/ #include <bits/stdc++.h> /***********MACROS***************/ #define ll long long int #define fri(l, k) for (i = l; i <= k; i++) #define frj(l, k) for (j = l; j >= k; j--) #define fij(a, b, l, k) \ for (i = a; i <= b...
replace
44
48
44
48
TLE
p03089
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> v(N); for (int i = 0; i < N; i++) cin >> v[i]; vector<int> r(N); for (int i = N - 1; i >= 0; i--) { int p = -1; for (int j = 0; j < N; j++) { if (v[j] == j + 1) p = j; } if (p == -1) { ...
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> v(N); for (int i = 0; i < N; i++) cin >> v[i]; vector<int> r(N); for (int i = N - 1; i >= 0; i--) { int p = -1; for (int j = 0; j < v.size(); j++) { if (v[j] == j + 1) p = j; } if (p ==...
replace
12
13
12
13
0
p03089
C++
Runtime Error
#include <iostream> #include <queue> #include <vector> using namespace std; typedef long long ll; #define repi(i, a, b) for (int i = int(a); i < int(b); ++i) #define rep(i, n) repi(i, 0, n) #define rerepi(i, a, b) for (int i = int(a) - 1; i >= b; --i) #define rerep(i, n) rerepi(i, n, 0) template <class T> inline bool...
#include <iostream> #include <queue> #include <vector> using namespace std; typedef long long ll; #define repi(i, a, b) for (int i = int(a); i < int(b); ++i) #define rep(i, n) repi(i, 0, n) #define rerepi(i, a, b) for (int i = int(a) - 1; i >= b; --i) #define rerep(i, n) rerepi(i, n, 0) template <class T> inline bool...
replace
60
61
60
61
-6
munmap_chunk(): invalid pointer
p03089
C++
Runtime Error
#include <algorithm> #include <cstdio> #include <functional> #include <vector> #define MAX_N 100 using namespace std; int main() { int N; scanf("%d", &N); int b[N], ans[MAX_N] = {0}; vector<int> bvec; for (int i = 0; i < N; i++) { scanf("%d", b + i); bvec.push_back(b[i]); } sort(b, b + N, great...
#include <algorithm> #include <cstdio> #include <functional> #include <vector> #define MAX_N 100 using namespace std; int main() { int N; scanf("%d", &N); int b[N], ans[MAX_N] = {0}; vector<int> bvec; for (int i = 0; i < N; i++) { scanf("%d", b + i); bvec.push_back(b[i]); } sort(b, b + N, great...
replace
21
22
21
22
0
p03089
C++
Runtime Error
#include <bits/stdc++.h> #include <iostream> using namespace std; void Solve(); signed main() { cin.tie(0); ios::sync_with_stdio(false); cout << setprecision(20) << fixed; Solve(); } /****************************************\ | Thank you for viewing my code:) | | Written by RedSpica a.k.a. RanseMirag...
#include <bits/stdc++.h> #include <iostream> using namespace std; void Solve(); signed main() { cin.tie(0); ios::sync_with_stdio(false); cout << setprecision(20) << fixed; Solve(); } /****************************************\ | Thank you for viewing my code:) | | Written by RedSpica a.k.a. RanseMirag...
replace
29
31
29
31
0
p03089
C++
Runtime Error
// In the name of God #include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(0); int n; cin >> n; vector<int> v(n); for (int i = 0; i < n; i++) { cin >> v[i]; } vector<int> ans; for (int i = 0; i < n; i++) { ans.insert(ans.begin() + v[i] - 1, v[...
// In the name of God #include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(0); int n; cin >> n; vector<int> v(n); for (int i = 0; i < n; i++) { cin >> v[i]; } vector<int> ans; for (int i = 0; i < n; i++) { if (ans.size() < v[i] - 1) { co...
insert
17
17
17
21
0
p03089
C++
Runtime Error
#pragma GCC optimize(2) #include <bits/stdc++.h> using namespace std; vector<int> V, ans; inline int read() { int x = 0, f = 1; char ch = getchar(); for (; ch < '0' || ch > '9'; ch = getchar()) if (ch == '-') f = -1; for (; ch >= '0' && ch <= '9'; ch = getchar()) x = (x << 1) + (x << 3) + ch - '0...
#pragma GCC optimize(2) #include <bits/stdc++.h> using namespace std; vector<int> V, ans; inline int read() { int x = 0, f = 1; char ch = getchar(); for (; ch < '0' || ch > '9'; ch = getchar()) if (ch == '-') f = -1; for (; ch >= '0' && ch <= '9'; ch = getchar()) x = (x << 1) + (x << 3) + ch - '0...
replace
22
23
22
23
0
p03089
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <iostream> #include <numeric> #include <string> #include <vector> using namespace std; const int INF = 1e9; vector<int> check(vector<int> b, int n) { if (n == 1) { vector<int> ret; if (b[0] == 1) ret.push_back(1); return ret; } vector<int> ans; ...
#include <algorithm> #include <cmath> #include <iostream> #include <numeric> #include <string> #include <vector> using namespace std; const int INF = 1e9; vector<int> check(vector<int> b, int n) { if (n == 1) { vector<int> ret; if (b[0] == 1) ret.push_back(1); return ret; } vector<int> ans; ...
replace
19
25
19
22
TLE
p03089
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define ll long long int using namespace std; map<vector<int>, vector<int>> memo; vector<int> f(vector<int> &a) { int n = a.size(); // for (int i = 0; i < n; i++) { // cout << a[i] << " "; // } // cout << endl; vector<int> res; if (n == 1) { return res; } if (memo[a]...
#include <bits/stdc++.h> #define ll long long int using namespace std; map<vector<int>, vector<int>> memo; vector<int> f(vector<int> &a) { int n = a.size(); // for (int i = 0; i < n; i++) { // cout << a[i] << " "; // } // cout << endl; vector<int> res; if (n == 1) { return res; } if (memo[a]...
replace
33
34
33
34
TLE
p03089
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using i64 = int64_t; #define rep(i, x, y) \ for (i64 i = i64(x), i##_max_for_repmacro = i64(y); \ i < i##_max_for_repmacro; ++i) #define debug(x) #x << "=" << (x) #ifdef DEBUG #de...
#include <bits/stdc++.h> using namespace std; using i64 = int64_t; #define rep(i, x, y) \ for (i64 i = i64(x), i##_max_for_repmacro = i64(y); \ i < i##_max_for_repmacro; ++i) #define debug(x) #x << "=" << (x) #ifdef DEBUG #de...
replace
84
85
84
85
0
p03089
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; vector<int> v; int n, x, i; int main() { cin >> n; for (i = 0; ++i <= n;) { cin >> x; if (x > i) return puts("-1"); v.insert(v.begin() + x - 1, x); } for (i = -1; ++i < n;) cout << v[i] << endl; }
#include <bits/stdc++.h> using namespace std; vector<int> v; int n, x, i; int main() { cin >> n; for (i = 0; ++i <= n;) { cin >> x; if (x > i) return 0 * puts("-1"); v.insert(v.begin() + x - 1, x); } for (i = -1; ++i < n;) cout << v[i] << endl; }
replace
9
10
9
10
0
p03089
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> #include <vector> using namespace std; void prnt(vector<int> b) { for (int i = 0; i < b.size(); i++) { cout << b[i] << endl; } return; } void ok(vector<int> &b, vector<int> &ans, int *bo) { // prnt(b); // cout<<"size="<<b.size()<<endl; if (b.size() == 1 && b[0] =...
#include <algorithm> #include <iostream> #include <vector> using namespace std; void prnt(vector<int> b) { for (int i = 0; i < b.size(); i++) { cout << b[i] << endl; } return; } void ok(vector<int> &b, vector<int> &ans, int *bo) { // prnt(b); // cout<<"size="<<b.size()<<endl; if (b.size() == 1 && b[0] =...
insert
29
29
29
30
TLE
p03089
C++
Time Limit Exceeded
#include "bits/stdc++.h" using namespace std; #ifdef _DEBUG #include "dump.hpp" #else #define dump(...) #endif #define int long long #define rep(i, a, b) for (int i = (a); i < (b); i++) #define rrep(i, a, b) for (int i = (b)-1; i >= (a); i--) #define all(c) begin(c), end(c) const int INF = sizeof(int) == sizeof(lo...
#include "bits/stdc++.h" using namespace std; #ifdef _DEBUG #include "dump.hpp" #else #define dump(...) #endif #define int long long #define rep(i, a, b) for (int i = (a); i < (b); i++) #define rrep(i, a, b) for (int i = (b)-1; i >= (a); i--) #define all(c) begin(c), end(c) const int INF = sizeof(int) == sizeof(lo...
insert
51
51
51
53
TLE
p03089
C++
Runtime Error
#include <iostream> #include <vector> using namespace std; int main() { int N; cin >> N; vector<int> b(N); vector<int> ans(N); ans[0] = 1; for (int i = 0; i < N; i++) { cin >> b[i]; } int j = N - 1; for (int i = 0; i < N; i++) { if (b[i] > i + 1) { cout << -1; return 0; } }...
#include <iostream> #include <vector> using namespace std; int main() { int N; cin >> N; vector<int> b(N); vector<int> ans(N); ans[0] = 1; for (int i = 0; i < N; i++) { cin >> b[i]; } int j = N - 1; for (int i = 0; i < N; i++) { if (b[i] > i + 1) { cout << -1; return 0; } }...
replace
22
23
22
23
0
p03089
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> b(n), a(n); for (int i = 0; i < n; i++) cin >> b[i]; for (int j = 0; j < n; j++) { for (int i = n - 1; i >= 0; i--) { if (i + 1 == b[i]) { a[j] = b[i]; b.erase(b.begin() + i); break; ...
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> b(n), a(n); for (int i = 0; i < n; i++) cin >> b[i]; for (int j = 0; j < n; j++) { for (int i = b.size() - 1; i >= 0; i--) { if (i + 1 == b[i]) { a[j] = b[i]; b.erase(b.begin() + i); b...
replace
9
10
9
10
0
p03089
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef pair<int, int> pi; #define F first #define S second #define PB push_back #define MP make_pair #define what_is(x) cerr << #x << " is " << x << endl; #define MT make_tuple #define eb emplace_back #define rep(i, begin, en...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef pair<int, int> pi; #define F first #define S second #define PB push_back #define MP make_pair #define what_is(x) cerr << #x << " is " << x << endl; #define MT make_tuple #define eb emplace_back #define rep(i, begin, en...
replace
75
76
75
76
0
p03089
C++
Runtime Error
// todo 文字数を少なくする // #pragma GCC optimize ("-O3") #include <bits/stdc++.h> using namespace std; //@起動時 struct initon { initon() { cin.tie(0); ios::sync_with_stdio(false); cout.setf(ios::fixed); cout.precision(16); srand((unsigned)clock() + (unsigned)time(NULL)); }; } __initon; // 衝突対策 #define w...
// todo 文字数を少なくする // #pragma GCC optimize ("-O3") #include <bits/stdc++.h> using namespace std; //@起動時 struct initon { initon() { cin.tie(0); ios::sync_with_stdio(false); cout.setf(ios::fixed); cout.precision(16); srand((unsigned)clock() + (unsigned)time(NULL)); }; } __initon; // 衝突対策 #define w...
replace
2,598
2,657
2,598
2,616
0
p03089
C++
Time Limit Exceeded
#include <algorithm> #include <array> #include <cassert> #include <cmath> #include <cstdio> #include <cstring> #include <deque> #include <functional> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <utility> #include <vector> using namespace std; using lli = long long int...
#include <algorithm> #include <array> #include <cassert> #include <cmath> #include <cstdio> #include <cstring> #include <deque> #include <functional> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <utility> #include <vector> using namespace std; using lli = long long int...
replace
43
44
43
44
TLE
p03089
Python
Time Limit Exceeded
N = int(input()) b_list = list(map(int, input().split())) generate_seq = [] def is_ok(b): len_b = len(b) if len_b == 1 and b[0] == 1: generate_seq.append(1) return True processing = [] for idx in range(len_b): if b[idx] != idx + 1: processing.append(False) ...
N = int(input()) b_list = list(map(int, input().split())) generate_seq = [] def is_ok(b): len_b = len(b) if len_b == 1 and b[0] == 1: generate_seq.append(1) return True for idx, val in enumerate(b): if idx + 1 < val: return False processing = [] for idx in ra...
insert
11
11
11
15
TLE
p03089
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; int Check(vector<int> &b) { for (int i = 0; i < b.size(); i++) { if (b[i] == i + 1) { int temp = b[i]; if (b.size() == 1) { cout << temp << endl; return 1; } else { b.erase...
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; int Check(vector<int> &b) { for (int i = b.size() - 1; i >= 0; i--) { if (b[i] == i + 1) { int temp = b[i]; if (b.size() == 1) { cout << temp << endl; return 1; } else { b....
replace
8
9
8
9
TLE
p03089
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> #include <stack> #include <vector> using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); int N; cin >> N; vector<int> b(N); for (auto &x : b) cin >> x; for (int i = 0; i < N; i++) { if (b[i] > i + 1) { cout << -1 << endl; ...
#include <algorithm> #include <iostream> #include <stack> #include <vector> using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); int N; cin >> N; vector<int> b(N); for (auto &x : b) cin >> x; for (int i = 0; i < N; i++) { if (b[i] > i + 1) { cout << -1 << endl; ...
replace
35
36
35
36
TLE
p03089
C++
Time Limit Exceeded
// Created by sz #include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 1e2 + 5; int n, b[N], vis[N], a[N]; bool dfs(int pos, int idx) { a[idx] = pos; if (idx == n) return true; int used = 0; for (int i = 1; i <= n; i++) { if (vis[i]) used++; else if (b[i] + used ...
// Created by sz #include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 1e2 + 5; int n, b[N], vis[N], a[N]; bool dfs(int pos, int idx) { a[idx] = pos; if (idx == n) return true; int used = 0; for (int i = 1; i <= n; i++) { if (vis[i]) used++; else if (b[i] + used ...
insert
19
19
19
24
TLE
p03090
C++
Time Limit Exceeded
#include <algorithm> #include <bitset> #include <cassert> #include <chrono> #include <climits> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <iterator> #include <limits> #include <list> #...
#include <algorithm> #include <bitset> #include <cassert> #include <chrono> #include <climits> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <iterator> #include <limits> #include <list> #...
replace
87
89
87
103
TLE
p03090
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cassert> #include <cfloat> #include <cmath> #include <cstdio> #include <cstring> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <limits.h> #include <list> #include <map> #include <math.h> #include <numeric> #incl...
#include <algorithm> #include <bitset> #include <cassert> #include <cfloat> #include <cmath> #include <cstdio> #include <cstring> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <limits.h> #include <list> #include <map> #include <math.h> #include <numeric> #incl...
replace
267
269
267
291
0
p03090
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cctype> #include <cfloat> #include <climits> #include <cmath> #include <cstdio> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_set> #include <vector> using namespace std; typedef l...
#include <algorithm> #include <bitset> #include <cctype> #include <cfloat> #include <climits> #include <cmath> #include <cstdio> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_set> #include <vector> using namespace std; typedef l...
replace
84
85
84
85
0
p03090
C++
Runtime Error
/** * There is a start and there is no end in the space. ---Infinity. * It ruins and goes though there is also a start in stars. ---Finite. * Only the man who has wisdom can read the most foolish one from the history. * Fishes living in the sea doesn't know the life in the land. * It also ruins and goes if they ha...
/** * There is a start and there is no end in the space. ---Infinity. * It ruins and goes though there is also a start in stars. ---Finite. * Only the man who has wisdom can read the most foolish one from the history. * Fishes living in the sea doesn't know the life in the land. * It also ruins and goes if they ha...
replace
35
37
35
49
0
p03090
C++
Runtime Error
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> using namespace std; template <typename T> void read(T &x) { x = 0; char c = getchar(); bool f = 0; while (!isdigit(c) && c != '-') c = getchar(); if (c == '-') f = 1, c = getchar(); while (isdigit(c)) ...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> using namespace std; template <typename T> void read(T &x) { x = 0; char c = getchar(); bool f = 0; while (!isdigit(c) && c != '-') c = getchar(); if (c == '-') f = 1, c = getchar(); while (isdigit(c)) ...
replace
22
23
22
23
0
p03090
C++
Runtime Error
#include <bits/stdc++.h> typedef long long ll; typedef long double ld; using namespace std; using Pii = pair<int, int>; using Pll = pair<ll, ll>; #define REP(i, l, n) for (int i = (l), i##_len = (n); i < i##_len; ++i) #define ALL(x) (x).begin(), (x).end() #define pb push_back ll gcd(ll a, ll b) { return b ? gcd(b, a...
#include <bits/stdc++.h> typedef long long ll; typedef long double ld; using namespace std; using Pii = pair<int, int>; using Pll = pair<ll, ll>; #define REP(i, l, n) for (int i = (l), i##_len = (n); i < i##_len; ++i) #define ALL(x) (x).begin(), (x).end() #define pb push_back ll gcd(ll a, ll b) { return b ? gcd(b, a...
replace
26
27
26
27
0
p03090
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define FastRead \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define ll long ...
#include <bits/stdc++.h> using namespace std; #define FastRead \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define ll long ...
replace
45
46
45
46
0
p03090
C++
Runtime Error
#include <bits/stdc++.h> #define ALL(obj) begin(obj), end(obj) #define debug(x) cerr << #x << ": " << x << '\n' using namespace std; template <class T> vector<T> make_vec(size_t a) { return vector<T>(a); } template <class T, class... Ts> auto make_vec(size_t a, Ts... ts) { return vector<decltype(make_vec<T>(ts...))>(...
#include <bits/stdc++.h> #define ALL(obj) begin(obj), end(obj) #define debug(x) cerr << #x << ": " << x << '\n' using namespace std; template <class T> vector<T> make_vec(size_t a) { return vector<T>(a); } template <class T, class... Ts> auto make_vec(size_t a, Ts... ts) { return vector<decltype(make_vec<T>(ts...))>(...
replace
69
70
69
70
0
p03090
C++
Runtime Error
// #define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; #define int long long #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define rep(i, n) for (int i = 0; i < n; ++i) #define REP(i, n) for (int i = 0; i < n; ++i) #define range(i, a, b) ((a) <= (i) && (i) < (b)) #defin...
// #define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; #define int long long #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define rep(i, n) for (int i = 0; i < n; ++i) #define REP(i, n) for (int i = 0; i < n; ++i) #define range(i, a, b) ((a) <= (i) && (i) < (b)) #defin...
replace
76
77
76
110
0
p03091
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using i64 = int64_t; #define rep(i, x, y) \ for (i64 i = i64(x), i##_max_for_repmacro = i64(y); \ i < i##_max_for_repmacro; ++i) #define debug(x) #x << "=" << (x) #ifdef DEBUG #de...
#include <bits/stdc++.h> using namespace std; using i64 = int64_t; #define rep(i, x, y) \ for (i64 i = i64(x), i##_max_for_repmacro = i64(y); \ i < i##_max_for_repmacro; ++i) #define debug(x) #x << "=" << (x) #ifdef DEBUG #de...
insert
164
164
164
165
0
p03091
C++
Runtime Error
/* Rathin Bhargava IIIT Bangalore */ #include <bits/stdc++.h> #define mt make_tuple #define mp make_pair #define pu push_back #define INF 1000000001 #define MOD 1000000007 #define EPS 1e-6 #define ll long long int #define ld long double #define fi first #define se second #define all(v) v.begin(), v.end() #define pr(v)...
/* Rathin Bhargava IIIT Bangalore */ #include <bits/stdc++.h> #define mt make_tuple #define mp make_pair #define pu push_back #define INF 1000000001 #define MOD 1000000007 #define EPS 1e-6 #define ll long long int #define ld long double #define fi first #define se second #define all(v) v.begin(), v.end() #define pr(v)...
replace
86
88
86
88
0
p03091
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const int MX = 200002; template <typename T> void cmax(T &x, const T &y) { if (y > x) x = y; } template <typename T> void read(T &x) { x = 0; char c = getchar(); bool f = 0; while (!isdigit(c) && c != '-') c = getchar(); if (c == '-') f = 1, c = ...
#include <bits/stdc++.h> using namespace std; const int MX = 200002; template <typename T> void cmax(T &x, const T &y) { if (y > x) x = y; } template <typename T> void read(T &x) { x = 0; char c = getchar(); bool f = 0; while (!isdigit(c) && c != '-') c = getchar(); if (c == '-') f = 1, c = ...
replace
71
72
71
72
0
p03091
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, a, b) for (int i = (a); i <= int(b); i++) #define per(i, a, b) for (int i = (a); i >= int(b); i--) #define fir first #define sec second #define tct template <class type> using namespace std; typedef long long ll; typedef pair<int, int> P; const int maxn = 1e5, mod = 1e9 + 7; int...
#include <bits/stdc++.h> #define rep(i, a, b) for (int i = (a); i <= int(b); i++) #define per(i, a, b) for (int i = (a); i >= int(b); i--) #define fir first #define sec second #define tct template <class type> using namespace std; typedef long long ll; typedef pair<int, int> P; const int maxn = 1e5, mod = 1e9 + 7; int...
replace
37
38
37
38
0
p03091
C++
Runtime Error
#include <bits/stdc++.h> const int MAXN = 100010; void bye() { std::cout << "No\n"; exit(0); } int deg[MAXN], xs[MAXN], ys[MAXN]; int n, m, vis[MAXN], tc; int head[MAXN], nxt[MAXN << 1], to[MAXN << 1]; void addedge(int b, int e, int tot) { nxt[++tot] = head[b]; to[head[b] = tot] = e; nxt[++tot] = head[e]; ...
#include <bits/stdc++.h> const int MAXN = 100010; void bye() { std::cout << "No\n"; exit(0); } int deg[MAXN], xs[MAXN], ys[MAXN]; int n, m, vis[MAXN], tc; int head[MAXN], nxt[MAXN << 1], to[MAXN << 1]; void addedge(int b, int e, int tot) { nxt[++tot] = head[b]; to[head[b] = tot] = e; nxt[++tot] = head[e]; ...
replace
28
29
28
29
0
p03091
C++
Runtime Error
#include "bits/stdc++.h" using namespace std; #pragma warning(disable : 4996) int dfs(const vector<vector<int>> &edges, int now, int from, vector<int> ss) { if (now == ss[0]) return 0; else if (now == ss[1]) return 1; for (auto e : edges[now]) { if (e != from) return dfs(edges, e, now, ss); ...
#include "bits/stdc++.h" using namespace std; #pragma warning(disable : 4996) int dfs(const vector<vector<int>> &edges, int now, int from, vector<int> ss) { if (now == ss[0]) return 0; else if (now == ss[1]) return 1; for (auto e : edges[now]) { if (e != from) return dfs(edges, e, now, ss); ...
replace
70
71
70
71
0
p03091
C++
Runtime Error
#include <algorithm> #include <cstdio> #include <cstring> using namespace std; struct edge { int v, nxt; } e[500005]; int n, m, h[100005], t, deg[100005], vis[100005]; void add(int u, int v) { e[++t].v = v; e[t].nxt = h[u]; h[u] = t; } void dfs(int u) { for (int i = h[u]; i; i = e[i].nxt) { int v = e[i].v...
#include <algorithm> #include <cstdio> #include <cstring> using namespace std; struct edge { int v, nxt; } e[500005]; int n, m, h[100005], t, deg[100005], vis[100005]; void add(int u, int v) { e[++t].v = v; e[t].nxt = h[u]; h[u] = t; } void dfs(int u) { vis[u] = 1; for (int i = h[u]; i; i = e[i].nxt) { ...
insert
14
14
14
15
0
p03091
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef unsigned long long ull; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef pair<double, double> pdd; const ull mod = 1e9 + 7; #define REP(i, n) for (int i = 0; i < (int)n; ++i) // debug #define dump(x) cerr << #x << " = " << (x) <<...
#include <bits/stdc++.h> using namespace std; typedef unsigned long long ull; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef pair<double, double> pdd; const ull mod = 1e9 + 7; #define REP(i, n) for (int i = 0; i < (int)n; ++i) // debug #define dump(x) cerr << #x << " = " << (x) <<...
replace
81
82
81
82
0
p03091
C++
Runtime Error
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <string> #include <vector> using namespace std; typedef long long ll; #define NO return puts("No"), 0 #define YES return puts("Yes"), 0 const int N = 1e5 + 5; int n, m, cnt, tmp[2], vis[N]; vector<int> G[N]; template <typename _Tp>...
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <string> #include <vector> using namespace std; typedef long long ll; #define NO return puts("No"), 0 #define YES return puts("Yes"), 0 const int N = 1e5 + 5; int n, m, cnt, tmp[2], vis[N]; vector<int> G[N]; template <typename _Tp>...
replace
36
37
36
37
0
p03091
C++
Runtime Error
#include <bits/stdc++.h> #define Tp template <typename Ty> #define Ts template <typename Ty, typename... Ar> #define Reg register #define RI Reg int #define Con const #define CI Con int & #define I inline #define W while #define N 100000 #define add(x, y) (e[++ee].nxt = lnk[x], ++d[e[lnk[x] = ee].to = y]) using namespa...
#include <bits/stdc++.h> #define Tp template <typename Ty> #define Ts template <typename Ty, typename... Ar> #define Reg register #define RI Reg int #define Con const #define CI Con int & #define I inline #define W while #define N 100000 #define add(x, y) (e[++ee].nxt = lnk[x], ++d[e[lnk[x] = ee].to = y]) using namespa...
replace
29
30
29
30
0
p03091
C++
Time Limit Exceeded
/** * code generated by JHelper * More info: https://github.com/AlexeyDmitriev/JHelper * @author */ #include <fstream> #include <iostream> #ifndef _TB #define _TB #include <bits/stdc++.h> using namespace std; #define FOR(i, a, b) for (int i = a; i < b; ++i) #define RFOR(i, b, a) for (int i = b - 1; i >= a; --i...
/** * code generated by JHelper * More info: https://github.com/AlexeyDmitriev/JHelper * @author */ #include <fstream> #include <iostream> #ifndef _TB #define _TB #include <bits/stdc++.h> using namespace std; #define FOR(i, a, b) for (int i = a; i < b; ++i) #define RFOR(i, b, a) for (int i = b - 1; i >= a; --i...
replace
191
192
191
192
TLE
p03091
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; vector<vector<int>> grh; int s, t; void dfs(int crr, int prt) { if (crr != prt && crr == s) { cout << "Yes" << '\n'; exit(0); } for (int nxt : grh[crr]) { if (nxt != prt && nxt != t) { dfs(nxt, crr); } } } int main() { int n, m; cin >> n >>...
#include <bits/stdc++.h> using namespace std; vector<vector<int>> grh; int s, t; void dfs(int crr, int prt) { if (crr != prt && crr == s) { cout << "Yes" << '\n'; exit(0); } for (int nxt : grh[crr]) { if (nxt != prt && nxt != t) { dfs(nxt, crr); } } } int main() { int n, m; cin >> n >>...
replace
33
35
33
37
-6
34d97a0f-600b-41dd-ba03-2e66ea7332aa.out: /home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03091/C++/s933329043.cpp:35: int main(): Assertion `false' failed.
p03091
C++
Runtime Error
// 18:10~ #include <bits/stdc++.h> using namespace std; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int n, m; static int deg[100000]; static vector<int> edges[100000]; cin >> n >> m; for (int i = 0; i < m; ++i) { int a, b; cin >> a >> b; --a; --b; ++deg[a]; ++deg...
// 18:10~ #include <bits/stdc++.h> using namespace std; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int n, m; static int deg[100000]; static vector<int> edges[100000]; cin >> n >> m; for (int i = 0; i < m; ++i) { int a, b; cin >> a >> b; --a; --b; ++deg[a]; ++deg...
insert
20
20
20
22
0
p03091
C++
Runtime Error
#include <bits/stdc++.h> #define X first #define Y second #define pb emplace_back #define FOR(i, a, b) for (int(i) = (a); i < (b); ++(i)) #define EFOR(i, a, b) for (int(i) = (a); i <= (b); ++(i)) #define rep(X, Y) for (int(X) = 0; (X) < (Y); ++(X)) #define REP rep #define rrep(X, Y) for (int(X) = (Y)-1; (X) >= 0; --(X)...
#include <bits/stdc++.h> #define X first #define Y second #define pb emplace_back #define FOR(i, a, b) for (int(i) = (a); i < (b); ++(i)) #define EFOR(i, a, b) for (int(i) = (a); i <= (b); ++(i)) #define rep(X, Y) for (int(X) = 0; (X) < (Y); ++(X)) #define REP rep #define rrep(X, Y) for (int(X) = (Y)-1; (X) >= 0; --(X)...
replace
87
96
87
102
0
p03091
C++
Runtime Error
#include <cstdio> using namespace std; #define N 100500 struct edge { int t, next; } ed[N]; int head[N], cnt = 1, in[N], n, m, ct, mx, fg, a, b, vis[N]; void adde(int f, int t) { ed[++cnt] = (edge){t, head[f]}; head[f] = cnt; ed[++cnt] = (edge){f, head[t]}; head[t] = cnt; in[f]++; in[t]++; } void dfs(int ...
#include <cstdio> using namespace std; #define N 100500 struct edge { int t, next; } ed[N * 2]; int head[N], cnt = 1, in[N], n, m, ct, mx, fg, a, b, vis[N]; void adde(int f, int t) { ed[++cnt] = (edge){t, head[f]}; head[f] = cnt; ed[++cnt] = (edge){f, head[t]}; head[t] = cnt; in[f]++; in[t]++; } void dfs(...
replace
5
6
5
6
0
p03091
C++
Runtime Error
// IO library #include <cstdio> #include <iomanip> #include <ios> #include <iostream> // algorithm library #include <algorithm> #include <cmath> #include <limits> #include <numeric> #include <random> // contancer library #include <bitset> #include <deque> #include <functional> #include <map> #include <queue> #include...
// IO library #include <cstdio> #include <iomanip> #include <ios> #include <iostream> // algorithm library #include <algorithm> #include <cmath> #include <limits> #include <numeric> #include <random> // contancer library #include <bitset> #include <deque> #include <functional> #include <map> #include <queue> #include...
replace
254
255
254
264
0
p03091
C++
Time Limit Exceeded
// #define _GLIBCXX_DEBUG // for STL debug (optional) #include <algorithm> #include <bitset> #include <cassert> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #inc...
// #define _GLIBCXX_DEBUG // for STL debug (optional) #include <algorithm> #include <bitset> #include <cassert> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #inc...
insert
103
103
103
104
TLE
p03091
C++
Runtime Error
// Author:xht37 #include <bits/stdc++.h> #define ui unsigned int #define ll long long #define ul unsigned ll #define ld long double #define pi pair<int, int> #define fi first #define se second #define mp make_pair #define ls (p << 1) #define rs (ls | 1) #define md ((t[p].l + t[p].r) >> 1) #define vi vector<int> #de...
// Author:xht37 #include <bits/stdc++.h> #define ui unsigned int #define ll long long #define ul unsigned ll #define ld long double #define pi pair<int, int> #define fi first #define se second #define mp make_pair #define ls (p << 1) #define rs (ls | 1) #define md ((t[p].l + t[p].r) >> 1) #define vi vector<int> #de...
insert
125
125
125
127
0
p03091
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int n, m, i, d[1000005], u, v, ans, head[1000005], Next[2000005], adj[2000005], k, s; bool flag = true; void Push(int u, int v) { Next[++k] = head[u]; head[u] = k; adj[k] = v; } void dfs(int i, int fa) { if ((i == u && fa != 0) || i == v) { if (i == v) ...
#include <bits/stdc++.h> using namespace std; int n, m, i, d[1000005], u, v, ans, head[1000005], Next[2000005], adj[2000005], k, s; bool flag = true; void Push(int u, int v) { Next[++k] = head[u]; head[u] = k; adj[k] = v; } void dfs(int i, int fa) { if ((i == u && fa != 0) || i == v) { if (i == v) ...
insert
35
35
35
36
-11
p03091
C++
Runtime Error
#include <algorithm> #include <cassert> #include <cctype> #include <chrono> #define _USE_MATH_DEFINES #include <cmath> #include <cstdio> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <sstream> #inc...
#include <algorithm> #include <cassert> #include <cctype> #include <chrono> #define _USE_MATH_DEFINES #include <cmath> #include <cstdio> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <sstream> #inc...
insert
63
63
63
67
0
p03091
C++
Runtime Error
#include <bits/stdc++.h> #define fr(i, n) for (int i = 0; i < (n); ++i) #define foor(i, a, b) for (int i = (a); i <= (b); ++i) #define rf(i, n) for (int i = (n); i--;) #define roof(i, b, a) for (int i = (b); i >= (a); --i) #define elsif else if #define all(x) x.begin(), x.end() #define Sort(x) sort(all(x)) #define Reve...
#include <bits/stdc++.h> #define fr(i, n) for (int i = 0; i < (n); ++i) #define foor(i, a, b) for (int i = (a); i <= (b); ++i) #define rf(i, n) for (int i = (n); i--;) #define roof(i, b, a) for (int i = (b); i >= (a); --i) #define elsif else if #define all(x) x.begin(), x.end() #define Sort(x) sort(all(x)) #define Reve...
replace
607
609
607
627
0
p03091
C++
Runtime Error
#include <bits/stdc++.h> #define inf 0x3f3f3f3f #define m_k make_pair using namespace std; const int N = 1e5 + 100; int n, m, dg[N], vi[N], fb; int tot, first[N], nxt[N * 2], point[N * 2]; bool ok; vector<int> f; inline void add_edge(int x, int y) { tot++; nxt[tot] = first[x]; first[x] = tot; point[tot] = y; } ...
#include <bits/stdc++.h> #define inf 0x3f3f3f3f #define m_k make_pair using namespace std; const int N = 1e5 + 100; int n, m, dg[N], vi[N], fb; int tot, first[N], nxt[N * 2], point[N * 2]; bool ok; vector<int> f; inline void add_edge(int x, int y) { tot++; nxt[tot] = first[x]; first[x] = tot; point[tot] = y; } ...
insert
18
18
18
20
0
p03091
C++
Runtime Error
#include <bits/stdc++.h> #define ll long long #define ull unsigned ll #define uint unsigned #define pii pair<int, int> #define pll pair<ll, ll> #define PB push_back #define fi first #define se second #define For(i, j, k) for (int i = (int)(j); i <= (int)(k); i++) #define Rep(i, j, k) for (int i = (int)(j); i >= (int)(k...
#include <bits/stdc++.h> #define ll long long #define ull unsigned ll #define uint unsigned #define pii pair<int, int> #define pll pair<ll, ll> #define PB push_back #define fi first #define se second #define For(i, j, k) for (int i = (int)(j); i <= (int)(k); i++) #define Rep(i, j, k) for (int i = (int)(j); i >= (int)(k...
replace
47
48
47
48
0
p03091
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; vector<int> edge[100005]; int dfn[100005], dfnn, X, Y; int dfs(int x, int p, int c) { int ret = 0; dfn[x] = ++dfnn; if (x == Y) c = 1; for (auto i : edge[x]) { if (i == p) continue; if (dfn[i]) { if (i == X && c) ret++; contin...
#include <bits/stdc++.h> using namespace std; vector<int> edge[100005]; int dfn[100005], dfnn, X, Y; int dfs(int x, int p, int c) { int ret = 0; dfn[x] = ++dfnn; if (x == Y) c = 1; for (auto i : edge[x]) { if (i == p) continue; if (dfn[i]) { if (i == X && c) ret++; contin...
replace
47
49
47
51
0
p03091
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> #define MOD (1000000007l) #define rep(i, n) for (long i = 0; i < n; i++) using namespace std; int main(void) { long N, M; ...
#include <algorithm> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> #define MOD (1000000007l) #define rep(i, n) for (long i = 0; i < n; i++) using namespace std; int main(void) { long N, M; ...
replace
61
73
61
73
TLE
p03091
C++
Time Limit Exceeded
#include "bits/stdc++.h" using namespace std; #define int long long #define rep(i, n) for (int i = 0; i < n; i++) vector<int> G[100006]; int life[100006]; void dfs(int now, int par, int home) { int e; rep(i, G[now].size()) { int f = G[now][i]; if (f == par) continue; if (life[f] == 0) conti...
#include "bits/stdc++.h" using namespace std; #define int long long #define rep(i, n) for (int i = 0; i < n; i++) vector<int> G[100006]; int life[100006]; void dfs(int now, int par, int home) { int e; rep(i, G[now].size()) { int f = G[now][i]; if (f == par) continue; if (life[f] == 0) conti...
insert
16
16
16
17
TLE
p03091
C++
Runtime Error
#include <algorithm> #include <assert.h> #include <bitset> #include <functional> #include <iostream> #include <limits.h> #include <map> #include <math.h> #include <memory.h> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <string> #include <time.h> #i...
#include <algorithm> #include <assert.h> #include <bitset> #include <functional> #include <iostream> #include <limits.h> #include <map> #include <math.h> #include <memory.h> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <string> #include <time.h> #i...
replace
80
81
80
81
0
p03091
C++
Runtime Error
#include <algorithm> #include <cstring> #include <iostream> #include <queue> #include <vector> using namespace std; typedef long long int ll; struct Edge { int to, rev; ll cap; Edge(int to, ll cap, int rev) : to(to), cap(cap), rev(rev) {} }; // ここの値に注意!! const int N = 20500; const ll INF = 1e9; vector<Edge> g[N]...
#include <algorithm> #include <cstring> #include <iostream> #include <queue> #include <vector> using namespace std; typedef long long int ll; struct Edge { int to, rev; ll cap; Edge(int to, ll cap, int rev) : to(to), cap(cap), rev(rev) {} }; // ここの値に注意!! const int N = 205000; const ll INF = 1e9; vector<Edge> g[N...
replace
14
15
14
15
0
p03091
C++
Runtime Error
/* This Submission is to determine how many 120/240 min const. delivery point there are. //info 120 req. steps <= 5 */ #define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <complex> #include <cstdlib> #include <cstring> #include <fstream> #include <funct...
/* This Submission is to determine how many 120/240 min const. delivery point there are. //info 120 req. steps <= 5 */ #define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <complex> #include <cstdlib> #include <cstring> #include <fstream> #include <funct...
replace
132
134
132
134
0
p03091
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> p_ll; template <class T> void debug(T itr1, T itr2) { auto now = itr1; while (now < itr2) { cout << *now << " "; now++; } cout << endl; } #define repr(i, from, to) for (int i = (int)from; i < (int)to; i++) #define...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> p_ll; template <class T> void debug(T itr1, T itr2) { auto now = itr1; while (now < itr2) { cout << *now << " "; now++; } cout << endl; } #define repr(i, from, to) for (int i = (int)from; i < (int)to; i++) #define...
replace
30
31
30
31
0
p03091
C++
Runtime Error
#include <bits/stdc++.h> #define pb push_back #define mp make_pair #define fi first #define se second #define SZ(x) ((int)x.size()) #define FOR(i, a, b) for (int i = a; i <= b; ++i) #define FORD(i, a, b) for (int i = a; i >= b; --i) using namespace std; typedef long long LL; typedef pair<int, int> pa; typedef vector<in...
#include <bits/stdc++.h> #define pb push_back #define mp make_pair #define fi first #define se second #define SZ(x) ((int)x.size()) #define FOR(i, a, b) for (int i = a; i <= b; ++i) #define FORD(i, a, b) for (int i = a; i >= b; --i) using namespace std; typedef long long LL; typedef pair<int, int> pa; typedef vector<in...
replace
35
36
35
36
0
p03091
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <stack> #include <string> #include <tuple> #include <vector> #define mkp make_pair #define mkt make_tuple #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace...
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <stack> #include <string> #include <tuple> #include <vector> #define mkp make_pair #define mkt make_tuple #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace...
replace
107
108
107
108
TLE
p03091
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; #ifdef tabr #include "library/debug.cpp" #else #define debug(...) #endif int main() { ios::sync_with_stdio(false); cin.tie(0); int n, m; cin >> n >> m; vector<vector<int>> g(n); int odd = 0; for (int i = 0; i < m; i++) { int a, b; ...
#include <bits/stdc++.h> using namespace std; using ll = long long; #ifdef tabr #include "library/debug.cpp" #else #define debug(...) #endif int main() { ios::sync_with_stdio(false); cin.tie(0); int n, m; cin >> n >> m; vector<vector<int>> g(n); int odd = 0; for (int i = 0; i < m; i++) { int a, b; ...
insert
60
60
60
63
0
p03091
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using LL = long long; const LL LINF = 1e18; const LL MOD = 998244353; class UnionFind { public: vector<int> data; UnionFind(int size) : data(size, -1) {} bool connect(int x, int y) { x = root(x); y = root(y); if (x != y) { if (data[y] < data[x]) ...
#include <bits/stdc++.h> using namespace std; using LL = long long; const LL LINF = 1e18; const LL MOD = 998244353; class UnionFind { public: vector<int> data; UnionFind(int size) : data(size, -1) {} bool connect(int x, int y) { x = root(x); y = root(y); if (x != y) { if (data[y] < data[x]) ...
delete
74
75
74
74
0
p03091
C++
Runtime Error
#include <bits/stdc++.h> const int N = 100005; int n, m, deg[N], head[N], tot; struct edge { int to, nxt; } e[N << 1]; void link(int x, int y) { e[++tot] = {y, head[x]}, head[x] = tot; e[++tot] = {x, head[y]}, head[y] = tot; } int dfs(int x, int start, int target, int f = 0) { if (x == target) return 1; ...
#include <bits/stdc++.h> const int N = 100005; int n, m, deg[N], head[N], tot; struct edge { int to, nxt; } e[N << 1]; void link(int x, int y) { e[++tot] = {y, head[x]}, head[x] = tot; e[++tot] = {x, head[y]}, head[y] = tot; } int dfs(int x, int start, int target, int f = 0) { if (x == target) return 1; ...
replace
19
20
19
20
0
p03092
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cmath> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <stack> #include <string> #include <vector> typedef long long ll; using namespace std; const ll MOD = 1000000007LL; ll dp[1005][100...
#include <algorithm> #include <bitset> #include <cmath> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <stack> #include <string> #include <vector> typedef long long ll; using namespace std; const ll MOD = 1000000007LL; ll dp[5005][500...
replace
17
18
17
18
0
p03092
C++
Runtime Error
// khodaya khodet komak kon #include <bits/stdc++.h> #define pb push_back #define ers erase #define ins insert #define F first #define S second #define all(x) x.begin(), x.end() #define debug(x) cerr << #x << " = " << x << endl #define kill(x) return cout << x, 0; #define IOS ...
// khodaya khodet komak kon #include <bits/stdc++.h> #define pb push_back #define ers erase #define ins insert #define F first #define S second #define all(x) x.begin(), x.end() #define debug(x) cerr << #x << " = " << x << endl #define kill(x) return cout << x, 0; #define IOS ...
replace
26
27
26
27
-11
p03092
C++
Runtime Error
#include <algorithm> #include <cmath> #include <cstdlib> #include <cstring> #include <iostream> #include <queue> #include <stdio.h> #include <vector> using namespace std; typedef long long ll; const ll INF = 1e9, MOD = 1e9 + 7; ll n, d[5000][5000], A, B; int main() { cin >> n >> A >> B; for (ll i = 1; i <= n;...
#include <algorithm> #include <cmath> #include <cstdlib> #include <cstring> #include <iostream> #include <queue> #include <stdio.h> #include <vector> using namespace std; typedef long long ll; const ll INF = 1e9, MOD = 1e9 + 7; ll n, d[5001][5001], A, B; int main() { cin >> n >> A >> B; for (ll i = 1; i <= n;...
replace
15
16
15
16
-11
p03092
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 2e3 + 10; int n, A, B, p[N]; ll dp[N]; int main() { scanf("%d %d %d", &n, &A, &B); for (int i = 1; i <= n; i++) { scanf("%d", &p[i]); } p[++n] = n; for (int i = 1; i <= n; i++) { dp[i] = (ll)1e18; ll tmp = 0; ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 5e3 + 10; int n, A, B, p[N]; ll dp[N]; int main() { scanf("%d %d %d", &n, &A, &B); for (int i = 1; i <= n; i++) { scanf("%d", &p[i]); } p[++n] = n; for (int i = 1; i <= n; i++) { dp[i] = (ll)1e18; ll tmp = 0; ...
replace
6
7
6
7
0
p03092
C++
Runtime Error
#include <cstdio> #include <iostream> #define MN 5010 typedef long long ll; ll Min[MN], lazy[MN]; void add(int x, ll v) { lazy[x] += v; Min[x] += v; } void pushdown(int x) { if (lazy[x]) { add(x << 1, lazy[x]); add(x << 1 | 1, lazy[x]); lazy[x] = 0; } } void modify(int x, int l, int r, int L, in...
#include <cstdio> #include <iostream> #define MN 20010 typedef long long ll; ll Min[MN], lazy[MN]; void add(int x, ll v) { lazy[x] += v; Min[x] += v; } void pushdown(int x) { if (lazy[x]) { add(x << 1, lazy[x]); add(x << 1 | 1, lazy[x]); lazy[x] = 0; } } void modify(int x, int l, int r, int L, i...
replace
2
3
2
3
0
p03092
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll A, B; int n; const int N = 2010; int a[N], pos[N]; ll f[N][N]; int main() { scanf("%d%lld%lld", &n, &A, &B); for (int i = 1; i <= n; i++) { scanf("%d", &a[i]); pos[a[i]] = i; } for (int i = 0; i <= n; i++) f[0][i] = B * i; for...
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll A, B; int n; const int N = 5010; int a[N], pos[N]; ll f[N][N]; int main() { scanf("%d%lld%lld", &n, &A, &B); for (int i = 1; i <= n; i++) { scanf("%d", &a[i]); pos[a[i]] = i; } for (int i = 0; i <= n; i++) f[0][i] = B * i; for...
replace
5
6
5
6
0
p03092
Python
Time Limit Exceeded
from bisect import bisect n, a, b = map(int, input().split()) ppp = map(int, input().split()) qqq = [0] * n for i, p in enumerate(ppp, start=1): qqq[p - 1] = i dp = [(0, 0)] for i in qqq: s = bisect(dp, (i,)) ndp = [(j, cost + b) for j, cost in dp[:s]] stay_cost = dp[s - 1][1] ndp.append((i, stay_...
from bisect import bisect n, a, b = map(int, input().split()) ppp = map(int, input().split()) qqq = [0] * n for i, p in enumerate(ppp, start=1): qqq[p - 1] = i dp = [(0, 0)] for i in qqq: s = bisect(dp, (i,)) ndp = [(j, cost + b) for j, cost in dp[:s]] stay_cost = dp[s - 1][1] ndp.append((i, stay_...
replace
14
15
14
20
TLE
p03092
C++
Runtime Error
#include <bits/stdc++.h> #include <random> using namespace std; typedef unsigned long long ull; typedef long long ll; typedef long double ld; // #define int ll // #define int __int128 // #define ll __int128 // typedef __int128 long long; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef vector<int> vi; ty...
#include <bits/stdc++.h> #include <random> using namespace std; typedef unsigned long long ull; typedef long long ll; typedef long double ld; // #define int ll // #define int __int128 // #define ll __int128 // typedef __int128 long long; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef vector<int> vi; ty...
delete
91
94
91
91
0