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
p02901
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; using LL = long long; using P = pair<int, int>; const int Max_N = 15; int c[Max_N][Max_N]; const int INF = 1e9; int main() { int N, M; cin >> N >> M; vector<int> a(M), b(M); rep(i, M) { cin >> a[i] >> b[i]; ...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; using LL = long long; using P = pair<int, int>; const int Max_N = 15; const int Max_M = 1e3 + 5; int c[Max_M][Max_N]; const int INF = 1e9; int main() { int N, M; cin >> N >> M; vector<int> a(M), b(M); rep(i, M) ...
replace
7
8
7
9
0
p02901
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; int dp[10000]; void chmin(int &a, int b) { a = a > b ? b : a; } int main() { int N, M, ans = 0; long Inf = 1e9; cin >> N >> M; long a[M], b[M], d[M]; long c[M][12]; rep(i, M) d[i] = 0; rep(i, 10000) dp[i] = Inf; ...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; int dp[10000]; void chmin(int &a, int b) { a = a > b ? b : a; } int main() { int N, M, ans = 0; long Inf = 1e9; cin >> N >> M; long a[M], b[M], d[M]; long c[M][12]; rep(i, M) d[i] = 0; rep(i, 10000) dp[i] = Inf; ...
replace
19
20
19
20
0
p02901
C++
Time Limit Exceeded
#include "bits/stdc++.h" #define rep(i, n) for (int i = 0; i < n; i++) typedef long long ll; using namespace std; #define llMAX numeric_limits<long long>::max() #define intMAX numeric_limits<int>::max() #define d_5 100000 #define d9_7 1000000007 #define vll vector<vector<long long>> #define vl vector<long long> #define...
#include "bits/stdc++.h" #define rep(i, n) for (int i = 0; i < n; i++) typedef long long ll; using namespace std; #define llMAX numeric_limits<long long>::max() #define intMAX numeric_limits<int>::max() #define d_5 100000 #define d9_7 1000000007 #define vll vector<vector<long long>> #define vl vector<long long> #define...
insert
32
32
32
34
TLE
p02901
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; const int N = 12, M = 1010; int dp[1 << N]; int mask[M], cost[M]; int n, m; int rec(int mask_) { if (__builtin_popcount(mask_) == n) { return 0; } if (dp[mask_] != -1) return dp[mask_]; int res = int(1e9); for (int i = 0; i < m; ++i...
#include <bits/stdc++.h> using namespace std; using ll = long long; const int N = 13, M = 1010; int dp[1 << N]; int mask[M], cost[M]; int n, m; int rec(int mask_) { if (__builtin_popcount(mask_) == n) { return 0; } if (dp[mask_] != -1) return dp[mask_]; int res = int(1e9); for (int i = 0; i < m; ++i...
replace
4
5
4
5
0
p02901
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int n, m; cin >> n >> m; vector<int> a(pow(2, n), 10000000); for (int i = 0; i < m; i++) { int c, d; cin >> c >> d; int n = 0; for (int j = 0; j < d; j++) { int k; cin >> k; n |= (1 << k - 1); } a.at(n) = min(a...
#include <bits/stdc++.h> using namespace std; int main() { int n, m; cin >> n >> m; vector<int> a(pow(2, n), 10000000); for (int i = 0; i < m; i++) { int c, d; cin >> c >> d; int n = 0; for (int j = 0; j < d; j++) { int k; cin >> k; n |= (1 << k - 1); } a.at(n) = min(a...
replace
18
22
18
26
TLE
p02901
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cassert> #include <chrono> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <fstream> #include <iomanip> #include <iostream> #include <limits> #include <list> #include <map> #include <n...
#include <algorithm> #include <bitset> #include <cassert> #include <chrono> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <fstream> #include <iomanip> #include <iostream> #include <limits> #include <list> #include <map> #include <n...
replace
37
38
37
38
0
p02901
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <deque> #include <iomanip> #include <iostream> #include <limits.h> #include <map> #include <numeric> #include <queue> #include <sstream> #include <string.h> #include <string> #include <tuple> #include <vector> #define REP(i, x) for (int i{0}; i < (int)(x); i++) #define RE...
#include <algorithm> #include <cmath> #include <deque> #include <iomanip> #include <iostream> #include <limits.h> #include <map> #include <numeric> #include <queue> #include <sstream> #include <string.h> #include <string> #include <tuple> #include <vector> #define REP(i, x) for (int i{0}; i < (int)(x); i++) #define RE...
replace
110
116
110
115
TLE
p02901
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cmath> #include <cstring> #include <iostream> #include <map> #include <set> #include <stdlib.h> #include <string> #include <vector> #define ll long long #define repp(i, a, b) for (int i = (int)a; i < (int)b; ++i) using namespace std; template <typename A, size_t N, typ...
#include <algorithm> #include <bitset> #include <cmath> #include <cstring> #include <iostream> #include <map> #include <set> #include <stdlib.h> #include <string> #include <vector> #define ll long long #define repp(i, a, b) for (int i = (int)a; i < (int)b; ++i) using namespace std; template <typename A, size_t N, typ...
replace
37
38
37
38
0
p02901
C++
Runtime Error
#include <algorithm> #include <array> #include <bitset> #include <cassert> #include <cmath> #include <cstdio> #include <cstring> #include <iomanip> #include <iostream> #include <iterator> #include <map> #include <memory> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <st...
#include <algorithm> #include <array> #include <bitset> #include <cassert> #include <cmath> #include <cstdio> #include <cstring> #include <iomanip> #include <iostream> #include <iterator> #include <map> #include <memory> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <st...
replace
27
28
27
28
0
p02901
C++
Runtime Error
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <queue> #include <stack> #include <vector> using namespace std; typedef long long lli; const int INF = 1e9 + 19; const int maxn = 12; const int maxm = 1005; int n, m; int c[maxn], x[maxm]; int dp[(1 << maxn) + 5]; void ReadInput() { ...
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <queue> #include <stack> #include <vector> using namespace std; typedef long long lli; const int INF = 1e9 + 19; const int maxn = 12; const int maxm = 1005; int n, m; int c[maxm], x[maxm]; int dp[(1 << maxn) + 5]; void ReadInput() { ...
replace
13
14
13
14
0
p02901
C++
Runtime Error
#include <algorithm> #include <array> #include <assert.h> #include <bitset> #include <chrono> #include <deque> #include <fstream> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <queue> #include <random> #include <set> #include <stack> #include <unordered_map> #includ...
#include <algorithm> #include <array> #include <assert.h> #include <bitset> #include <chrono> #include <deque> #include <fstream> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <queue> #include <random> #include <set> #include <stack> #include <unordered_map> #includ...
replace
107
108
107
108
-11
p02901
C++
Runtime Error
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <unordered_set> #include <vector> using namespace std; #define FOR(i, N) for (int i = 0; i < (int)N; i++) #define...
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <unordered_set> #include <vector> using namespace std; #define FOR(i, N) for (int i = 0; i < (int)N; i++) #define...
replace
94
95
94
95
0
p02901
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define INF 0x3f3f3f3f int N, M; int cost[1001]; // custo de cada chave int chave[1001]; // baus que cada chave abre int memo[1001][9000]; int total; // bits de baus int dp(int key, int baus) { if (key == M) { if (baus == total) return 0; else r...
#include <bits/stdc++.h> using namespace std; #define INF 0x3f3f3f3f int N, M; int cost[1001]; // custo de cada chave int chave[1001]; // baus que cada chave abre int memo[1001][9000]; int total; // bits de baus int dp(int key, int baus) { if (key == M) { if (baus == total) return 0; else r...
replace
22
23
22
24
TLE
p02901
C++
Runtime Error
#include <algorithm> #include <stdio.h> #include <string.h> int a[100]; int b[100]; int c[100]; int dp[1 << 12]; int main() { int n, m, C; scanf("%d%d", &n, &m); for (int i = 0; i < m; i++) { scanf("%d %d", &a[i], &b[i]); for (int j = 0; j < b[i]; j++) { scanf("%d", &C); C--; c[i] |...
#include <algorithm> #include <stdio.h> #include <string.h> int a[1005]; int b[1005]; int c[1005]; int dp[1 << 12]; int main() { int n, m, C; scanf("%d%d", &n, &m); for (int i = 0; i < m; i++) { scanf("%d %d", &a[i], &b[i]); for (int j = 0; j < b[i]; j++) { scanf("%d", &C); C--; c[i...
replace
4
7
4
7
0
p02901
Python
Runtime Error
def read_key(): a, _ = map(int, input().split()) m = 0 for c in map(int, input().split()): m |= 1 << (c - 1) return (a, m) def main(): INF = float("inf") N, M = map(int, input().split()) keys = [read_key() for _ in range(M)] dp = [[INF] * (1 << N) for _ in range(M + 1)] ...
def read_key(): a, _ = map(int, input().split()) m = 0 for c in map(int, input().split()): m |= 1 << (c - 1) return (a, m) def main(): INF = float("inf") N, M = map(int, input().split()) keys = [read_key() for _ in range(M)] dp = [[INF] * (1 << N) for _ in range(M + 1)] ...
replace
20
21
20
21
TypeError: 'float' object is not subscriptable
Traceback (most recent call last): File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02901/Python/s397338188.py", line 36, in <module> main() File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02901/Python/s397338188.py", line 25, in main if dpi[j] + a < dpi1[j | m]: Typ...
p02901
Python
Time Limit Exceeded
INF = float("inf") N, M = map(int, input().split()) dp = [INF] * (2**N) dp[0] = 0 for _ in range(M): a, b = map(int, input().split()) C = [int(i) for i in input().split()] mask = sum(1 << (c - 1) for c in C) for i in range(len(dp)): dp[i | mask] = min(dp[i | mask], dp[i] + a) ans = dp[-1] pr...
INF = float("inf") N, M = map(int, input().split()) dp = [INF] * (2**N) dp[0] = 0 for _ in range(M): a, b = map(int, input().split()) C = [int(i) for i in input().split()] mask = sum(1 << (c - 1) for c in C) for i in range(len(dp)): if dp[i | mask] > dp[i] + a: dp[i | mask] = dp[i...
replace
12
13
12
14
TLE
p02901
Python
Time Limit Exceeded
def main(): n, m = map(int, input().split()) a = [] c = [] dp = [10**7 for j in range(2**n)] dp[0] = 0 for _ in range(m): a, b = map(int, input().split()) sc = list(map(int, input().split())) c = 0 for j in sc: c += 2 ** (j - 1) for j in range(...
def main(): n, m = map(int, input().split()) a = [] c = [] dp = [10**7 for j in range(2**n)] dp[0] = 0 for _ in range(m): a, b = map(int, input().split()) sc = list(map(int, input().split())) c = 0 for j in sc: c += 2 ** (j - 1) for j in range(...
replace
13
14
13
14
TLE
p02901
C++
Runtime Error
// // sublime text 3, // emre yazicioglu // #include <algorithm> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; typedef long long...
// // sublime text 3, // emre yazicioglu // #include <algorithm> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; typedef long long...
replace
59
61
59
61
-11
p02901
C++
Runtime Error
#pragma GCC optimize("Ofast") #define _USE_MATH_DEFINES #include "bits/stdc++.h" using namespace std; using u8 = uint8_t; using u16 = uint16_t; using u32 = uint32_t; using u64 = uint64_t; using i8 = int8_t; using i16 = int16_t; using i32 = int32_t; using i64 = int64_t; constexpr char newl = '\n'; constexpr double ep...
#pragma GCC optimize("Ofast") #define _USE_MATH_DEFINES #include "bits/stdc++.h" using namespace std; using u8 = uint8_t; using u16 = uint16_t; using u32 = uint32_t; using u64 = uint64_t; using i8 = int8_t; using i16 = int16_t; using i32 = int32_t; using i64 = int64_t; constexpr char newl = '\n'; constexpr double ep...
insert
87
87
87
91
0
p02901
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define fst(t) std::get<0>(t) #define snd(t) std::get<1>(t) #define thd(t) std::get<2>(t) #define unless(p) if (!(p)) #define until(p) while (!(p)) using ll = std::int64_t; using P = std::tuple<int, int>; constexpr int INF = 1'000'000'000; int N, M; int A[1100], B[1100], C[1100]; int dp[1100...
#include <bits/stdc++.h> #define fst(t) std::get<0>(t) #define snd(t) std::get<1>(t) #define thd(t) std::get<2>(t) #define unless(p) if (!(p)) #define until(p) while (!(p)) using ll = std::int64_t; using P = std::tuple<int, int>; constexpr int INF = 1'000'000'000; int N, M; int A[1100], B[1100], C[1100]; int dp[1100...
insert
23
23
23
27
TLE
p02901
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define ll long long int #define rep(i, a, b) for (ll i = a; i < b; i++) #define sep(i, b, a) for (ll i = b - 1; i >= a; i--) #define vi vector<ll> #define hell 1000000007 #define pii pair<ll, ll> #define inf (ll)(1e16) #define pb push_back using namespace std; ll dp[1001][1 << 12]; ll help...
#include <bits/stdc++.h> #define ll long long int #define rep(i, a, b) for (ll i = a; i < b; i++) #define sep(i, b, a) for (ll i = b - 1; i >= a; i--) #define vi vector<ll> #define hell 1000000007 #define pii pair<ll, ll> #define inf (ll)(1e16) #define pb push_back using namespace std; ll dp[1001][1 << 12]; ll help...
insert
20
20
20
22
TLE
p02901
C++
Time Limit Exceeded
#include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <random> #include <se...
#include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <random> #include <se...
replace
68
70
68
72
TLE
p02901
C++
Runtime Error
#include <bits/stdc++.h> #define ll long long int #define INF 10000000000000 #define MK2DV(v, row, col, val) vector<vector<ll>> v(row, vector<ll>(col, val)) using namespace std; ll findmin(ll a, ll b) { if (a < b) return a; return b; } ll fuc(ll i, ll have, ll *give, ll *cost, ll m, ll n, vector<vector<ll>> &dp...
#include <bits/stdc++.h> #define ll long long int #define INF 10000000000000 #define MK2DV(v, row, col, val) vector<vector<ll>> v(row, vector<ll>(col, val)) using namespace std; ll findmin(ll a, ll b) { if (a < b) return a; return b; } ll fuc(ll i, ll have, ll *give, ll *cost, ll m, ll n, vector<vector<ll>> &dp...
replace
33
34
33
34
0
p02901
C++
Runtime Error
#include <algorithm> #include <bits/stdc++.h> #include <cmath> #include <iostream> #include <string> #include <unordered_map> #include <unordered_set> using namespace std; #define ll long long #define rep(i, n) for (ll i = 0; i < (n); i++) #define FOR(i, a, b) for (ll i = (a); i < (b); i++) #define FORR(i, a, b) for (l...
#include <algorithm> #include <bits/stdc++.h> #include <cmath> #include <iostream> #include <string> #include <unordered_map> #include <unordered_set> using namespace std; #define ll long long #define rep(i, n) for (ll i = 0; i < (n); i++) #define FOR(i, a, b) for (ll i = (a); i < (b); i++) #define FORR(i, a, b) for (l...
replace
70
71
70
71
-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)
p02901
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int n, m; cin >> n >> m; int a[m], d[m]; fill(d, d + n, 0); for (int i = 0; i < m; i++) { int b; cin >> a[i] >> b; for (int j = 0; j < b; j++) { int c; cin >> c; d[i] += pow(2, c - 1); } } int max_state = pow(2, ...
#include <bits/stdc++.h> using namespace std; int main() { int n, m; cin >> n >> m; int a[m], d[m]; fill(d, d + m, 0); for (int i = 0; i < m; i++) { int b; cin >> a[i] >> b; for (int j = 0; j < b; j++) { int c; cin >> c; d[i] += pow(2, c - 1); } } int max_state = pow(2, ...
replace
7
8
7
8
-11
p02901
C++
Runtime Error
#include <algorithm> #include <cassert> #include <cmath> #include <cstdint> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <regex> #include <set> #include <sstream> #include <string> #include <tuple> #include <utility> #include <vector> using namespa...
#include <algorithm> #include <cassert> #include <cmath> #include <cstdint> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <regex> #include <set> #include <sstream> #include <string> #include <tuple> #include <utility> #include <vector> using namespa...
replace
52
53
52
53
0
p02901
C++
Runtime Error
#pragma GCC optimize("O3") #include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include <prettyprint.hpp> #define debug(...) cerr << "[" << #__VA_ARGS__ << "]: ", d_err(__VA_ARGS__); #else #define debug(...) 83; #endif void d_err() { cerr << endl; } template <typename H, typename... T> void d_err(H h, T......
#pragma GCC optimize("O3") #include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include <prettyprint.hpp> #define debug(...) cerr << "[" << #__VA_ARGS__ << "]: ", d_err(__VA_ARGS__); #else #define debug(...) 83; #endif void d_err() { cerr << endl; } template <typename H, typename... T> void d_err(H h, T......
replace
88
89
88
89
0
p02901
C++
Runtime Error
#include <algorithm> #include <iostream> using namespace std; typedef long long ll; int main(void) { int n, m, i, j, a[1003], b, c, l[1003] = {}, dp[1003][1003] = {}; const int INF = 1e9; cin >> n >> m; for (i = 0; i < m; i++) { cin >> a[i] >> b; for (j = 0; j < b; j++) { cin >> c; l[i] +=...
#include <algorithm> #include <iostream> using namespace std; typedef long long ll; int main(void) { int n, m, i, j, a[1003], b, c, l[1003] = {}, dp[1003][4100] = {}; const int INF = 1e9; cin >> n >> m; for (i = 0; i < m; i++) { cin >> a[i] >> b; for (j = 0; j < b; j++) { cin >> c; l[i] +=...
replace
6
7
6
7
0
p02901
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; #define ordered_set \ tree<int, null_type, less<int>, rb_tree_tag, \ ...
#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; #define ordered_set \ tree<int, null_type, less<int>, rb_tree_tag, \ ...
delete
184
190
184
184
0
p02901
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; #define ordered_set \ tree<int, null_type, less<int>, rb_tree_tag, \ ...
#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; #define ordered_set \ tree<int, null_type, less<int>, rb_tree_tag, \ ...
delete
217
223
217
217
0
p02901
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> ii; const int N = 13; const int M = 1001; int n, m, a, b, c; ii p[M]; int dp[1 << N]; int main() { freopen("in", "r", stdin); ios_base::sync_with_stdio(false); cin.tie(NULL); cin >> n >> m; for (int i = 0; i < m; ++...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> ii; const int N = 13; const int M = 1001; int n, m, a, b, c; ii p[M]; int dp[1 << N]; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cin >> n >> m; for (int i = 0; i < m; ++i) { cin >> a >> b; i...
delete
14
15
14
14
0
p02901
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define ull unsigned long long #define endl '\n' #define ll long long const int N = 3e2 + 5; ll a[N], dp[1 << 12]; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); if (fopen(".INP", "r")) { freopen(".INP", "r", stdin); freopen(".OUT",...
#include <bits/stdc++.h> using namespace std; #define ull unsigned long long #define endl '\n' #define ll long long const int N = 1e3 + 5; ll a[N], dp[1 << 12]; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); if (fopen(".INP", "r")) { freopen(".INP", "r", stdin); freopen(".OUT",...
replace
6
7
6
7
0
p02901
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define repr(i, a, b) for (int i = a; i < b; i++) #define rep(i, n) for (int i = 0; i < n; i++) #define reprrev(i, a, b) for (int i = b - 1; i >= a; i--) // [a, b) #define reprev(i, n) reprrev(i, 0, n) typedef long long ll; typedef unsigned long long ull; template <class T>...
#include <bits/stdc++.h> using namespace std; #define repr(i, a, b) for (int i = a; i < b; i++) #define rep(i, n) for (int i = 0; i < n; i++) #define reprrev(i, a, b) for (int i = b - 1; i >= a; i--) // [a, b) #define reprev(i, n) reprrev(i, 0, n) typedef long long ll; typedef unsigned long long ull; template <class T>...
replace
92
96
92
95
-6
munmap_chunk(): invalid pointer
p02901
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define repr(i, a, b) for (int i = a; i < b; i++) #define rep(i, n) for (int i = 0; i < n; i++) #define reprrev(i, a, b) for (int i = b - 1; i >= a; i--) #define reprev(i, n) reprrev(i, 0, n) typedef long long ll; typedef unsigned long long ull; template <class T> inline bo...
#include <bits/stdc++.h> using namespace std; #define repr(i, a, b) for (int i = a; i < b; i++) #define rep(i, n) for (int i = 0; i < n; i++) #define reprrev(i, a, b) for (int i = b - 1; i >= a; i--) #define reprev(i, n) reprrev(i, 0, n) typedef long long ll; typedef unsigned long long ull; template <class T> inline bo...
insert
99
99
99
101
TLE
p02901
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cassert> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <exception> #include <fstream> #include <functional> #include <iomanip> #include <ios> #include <iosfwd> #in...
#include <algorithm> #include <bitset> #include <cassert> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <exception> #include <fstream> #include <functional> #include <iomanip> #include <ios> #include <iosfwd> #in...
replace
55
56
55
56
0
p02901
C++
Runtime Error
#include <bits/stdc++.h> #define INF 999999999 using namespace std; typedef long long ll; typedef pair<int, int> P; int main() { int n, m; cin >> n >> m; vector<P> key; for (int i = 0; i < m; i++) { int a, b, c; cin >> a >> b; int d = 0; for (int j = 0; j < b; j++) { cin >> c; c--;...
#include <bits/stdc++.h> #define INF 999999999 using namespace std; typedef long long ll; typedef pair<int, int> P; int main() { int n, m; cin >> n >> m; vector<P> key; for (int i = 0; i < m; i++) { int a, b, c; cin >> a >> b; int d = 0; for (int j = 0; j < b; j++) { cin >> c; c--;...
replace
22
24
22
24
0
p02901
C++
Runtime Error
/* * じょえチャンネル * 高評価・チャンネル登録よろしくおねがいします! * https://www.youtube.com/channel/UCRXsI3FL_kvaVL9zoolBfbQ */ #include <bits/stdc++.h> // #pragma GCC target("avx2") // #pragma GCC optimize("O3") // #pragma GCC optimize("unroll-loops") // here!!! // define int long long !!!!! #define int long long // define int long l...
/* * じょえチャンネル * 高評価・チャンネル登録よろしくおねがいします! * https://www.youtube.com/channel/UCRXsI3FL_kvaVL9zoolBfbQ */ #include <bits/stdc++.h> // #pragma GCC target("avx2") // #pragma GCC optimize("O3") // #pragma GCC optimize("unroll-loops") // here!!! // define int long long !!!!! #define int long long // define int long l...
replace
839
840
839
840
0
p02901
C++
Runtime Error
#include <bits/stdc++.h> #define f(i, n) for (int i = 0; i < (n); i++) #define inf (int)(3e18) #define int long long #define mod (int)(1000000007) #define intt long long using namespace std; // Library // モッドパウ int modpow(int x, int y, int m = mod) { int res = 1; while (y) { if (y % 2) { res *= x; ...
#include <bits/stdc++.h> #define f(i, n) for (int i = 0; i < (n); i++) #define inf (int)(3e18) #define int long long #define mod (int)(1000000007) #define intt long long using namespace std; // Library // モッドパウ int modpow(int x, int y, int m = mod) { int res = 1; while (y) { if (y % 2) { res *= x; ...
replace
289
290
289
290
0
p02901
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; } int N, M; int A[1005], B[1005]; int C[1005][15]; int main() { const int INF = 1e9; cin >> N >> M; for (int i = 0; i < M; i++) { cin >> A[i] >> B...
#include <bits/stdc++.h> using namespace std; template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; } int N, M; int A[1005], B[1005]; int C[1005][15]; int main() { const int INF = 1e9; cin >> N >> M; for (int i = 0; i < M; i++) { cin >> A[i] >> B...
replace
27
29
27
29
0
p02901
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const int INF = 0x3f3f3f3f; const int L = 12; int dp[1 << L]; void solve() { int n, m; cin >> n >> m; const int MSK = 1 << n; memset(dp, INF, sizeof dp); dp[0] = 0; for (int _ = 0; _ < m; _++) { int cost, _n; cin >> cost >> _n; int k = 0; for...
#include <bits/stdc++.h> using namespace std; const int INF = 0x3f3f3f3f; const int L = 12; int dp[1 << L]; void solve() { int n, m; cin >> n >> m; const int MSK = 1 << n; memset(dp, INF, sizeof dp); dp[0] = 0; for (int _ = 0; _ < m; _++) { int cost, _n; cin >> cost >> _n; int k = 0; for...
replace
25
26
25
26
0
p02901
C++
Runtime Error
#include <bits/stdc++.h> typedef long long ll; #define REP(i, n) for (int i = 0; i < n; i++) #define REP2(i, a, b) for (int i = a; i <= b; i++) #define REPR(i, a, b) for (int i = a; i >= b; i--) #define FOR(i, m, n) for (int i = m; i < n; i++) #define INF 2e9 #define MOD 1000000007 #define PI 3.14159265358979323846 #de...
#include <bits/stdc++.h> typedef long long ll; #define REP(i, n) for (int i = 0; i < n; i++) #define REP2(i, a, b) for (int i = a; i <= b; i++) #define REPR(i, a, b) for (int i = a; i >= b; i--) #define FOR(i, m, n) for (int i = m; i < n; i++) #define INF 2e9 #define MOD 1000000007 #define PI 3.14159265358979323846 #de...
replace
60
61
60
61
0
p02901
C++
Runtime Error
#include <bits/stdc++.h> #define ll long long int main() { std::ios::sync_with_stdio(false); using namespace std; const int max_v = 100'000, max_n = 12, max_cost = max_v * max_n; int n, m, a, b, c; cin >> n >> m; vector<int> A(n), B(n, 0), C(1 << n, max_cost + 1); for (int i = 0; i < m; i++) { cin >...
#include <bits/stdc++.h> #define ll long long int main() { std::ios::sync_with_stdio(false); using namespace std; const int max_v = 100'000, max_n = 12, max_cost = max_v * max_n; int n, m, a, b, c; cin >> n >> m; vector<int> A(m), B(m, 0), C(1 << n, max_cost + 1); for (int i = 0; i < m; i++) { cin >...
replace
10
11
10
11
0
p02901
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; // from https://atcoder.jp/contests/abc142/submissions/7731316 typedef long long ll; typedef pair<ll, ll> l_l; typedef pair<int, int> i_i; template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } template <class T...
#include <bits/stdc++.h> using namespace std; // from https://atcoder.jp/contests/abc142/submissions/7731316 typedef long long ll; typedef pair<ll, ll> l_l; typedef pair<int, int> i_i; template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } template <class T...
replace
43
44
43
44
-11
p02901
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int n, m; int dp[1010][1 << 12]; int v[1010]; int val[1010]; int f(int pos, int mask) { if (pos == m) { if (mask == (1 << n) - 1) return 0; return 1e9; } int &ans = dp[pos][mask]; ans = 1e9; ans = min(ans, f(pos + 1, mask | v[pos]) + val[pos]); ...
#include <bits/stdc++.h> using namespace std; int n, m; int dp[1010][1 << 12]; int v[1010]; int val[1010]; int f(int pos, int mask) { if (pos == m) { if (mask == (1 << n) - 1) return 0; return 1e9; } int &ans = dp[pos][mask]; if (ans != -1) return ans; ans = 1e9; ans = min(ans, f(pos + ...
insert
16
16
16
18
TLE
p02901
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cassert> #include <chrono> #include <climits> #include <cmath> #include <complex> #include <cstdint> #include <cstring> #include <deque> #include <functional> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <random> #includ...
#include <algorithm> #include <bitset> #include <cassert> #include <chrono> #include <climits> #include <cmath> #include <complex> #include <cstdint> #include <cstring> #include <deque> #include <functional> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <random> #includ...
replace
33
34
33
34
0
p02901
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef pair<int, int> II; typedef vector<II> VII; typedef vector<int> VI; typedef vector<VI> VVI; typedef long long int LL; typedef unsigned long long int ULL; #define PB push_back #define MP make_pair #define F first #define S second #define SZ(a) (int)(a.size()) #defin...
#include <bits/stdc++.h> using namespace std; typedef pair<int, int> II; typedef vector<II> VII; typedef vector<int> VI; typedef vector<VI> VVI; typedef long long int LL; typedef unsigned long long int ULL; #define PB push_back #define MP make_pair #define F first #define S second #define SZ(a) (int)(a.size()) #defin...
replace
86
90
86
90
0
p02901
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const int maxn = 1000 + 5; int dp[(1 << 12) + 5][maxn], inf = 1e9; struct Key { int cost, status; }; Key key[maxn]; int main() { ios::sync_with_stdio(0); cin.tie(0); int n, m, cnt, box; cin >> n >> m; int bound = (1 << n); for (int i = 0; i <= m; ++i) for ...
#include <bits/stdc++.h> using namespace std; const int maxn = 1000 + 5; int dp[(1 << 13) + 5][maxn], inf = 1e9; struct Key { int cost, status; }; Key key[maxn]; int main() { ios::sync_with_stdio(0); cin.tie(0); int n, m, cnt, box; cin >> n >> m; int bound = (1 << n); for (int i = 0; i <= m; ++i) for ...
replace
3
4
3
4
0
p02901
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using lint = long long; using P = pair<int, int>; using vec = vector<int>; using mat = vector<vector<int>>; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(v) v.begin(), v.end() #define endl "\n" constexpr int MOD = 1000000007; const int INF = 1 << 30; in...
#include <bits/stdc++.h> using namespace std; using lint = long long; using P = pair<int, int>; using vec = vector<int>; using mat = vector<vector<int>>; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(v) v.begin(), v.end() #define endl "\n" constexpr int MOD = 1000000007; const int INF = 1 << 30; in...
replace
17
18
17
18
0
p02901
C++
Runtime Error
#include <bits/stdc++.h> #define int long long #define lint long long #define pii pair<int, int> #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define REP(i, n) FOR(i, 0, n) #define ALL(c) (c).begin(), (c).end() #define ZERO(a) memset(a, 0, sizeof(a)) #define MINUS(a) memset(a, 0xff, sizeof(a)) #define MINF(a) m...
#include <bits/stdc++.h> #define int long long #define lint long long #define pii pair<int, int> #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define REP(i, n) FOR(i, 0, n) #define ALL(c) (c).begin(), (c).end() #define ZERO(a) memset(a, 0, sizeof(a)) #define MINUS(a) memset(a, 0xff, sizeof(a)) #define MINF(a) m...
replace
87
88
87
88
0
p02901
C++
Runtime Error
#include <algorithm> #include <stdio.h> #include <tuple> using namespace std; using ll = long long; using pii = pair<int, int>; constexpr int s = 1 << 12; int n, m, a[20], b[20], c[20], bin[20]; int dp[s]; int main() { scanf("%d %d", &n, &m); for (int i = 0; i < m; i++) { scanf("%d %d", a + i, b + i); for ...
#include <algorithm> #include <stdio.h> #include <tuple> using namespace std; using ll = long long; using pii = pair<int, int>; constexpr int s = 1 << 12; int n, m, a[2010], b[2010], c[20], bin[2010]; int dp[s]; int main() { scanf("%d %d", &n, &m); for (int i = 0; i < m; i++) { scanf("%d %d", a + i, b + i); ...
replace
8
9
8
9
0
p02901
C++
Runtime Error
#include <bits/stdc++.h> using ll = long long; using namespace std; #define rep(i, n) for (int i = 0, i##_len = (int)(n); i < i##_len; i++) #define reps(i, n) for (int i = 1, i##_len = (int)(n); i <= i##_len; i++) #define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--) #define rreps(i, n) for (int i = ((int)(n)); i ...
#include <bits/stdc++.h> using ll = long long; using namespace std; #define rep(i, n) for (int i = 0, i##_len = (int)(n); i < i##_len; i++) #define reps(i, n) for (int i = 1, i##_len = (int)(n); i <= i##_len; i++) #define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--) #define rreps(i, n) for (int i = ((int)(n)); i ...
replace
47
48
47
48
0
p02901
C++
Runtime Error
#include <bits/stdc++.h> #define fi first #define se second using namespace std; using ll = long long; constexpr int N = 12, INF = numeric_limits<int>::max() / 2; int n, m, a[N], b[N], unlock[N], dp[1 << N]; int go(int msk) { // msk shows not yet unlocked locks if (dp[msk] != -1) return dp[msk]; dp[msk] = IN...
#include <bits/stdc++.h> #define fi first #define se second using namespace std; using ll = long long; constexpr int N = 12, M = 1009, INF = numeric_limits<int>::max() / 2; int n, m, a[M], b[M], unlock[M], dp[1 << N]; int go(int msk) { // msk shows not yet unlocked locks if (dp[msk] != -1) return dp[msk]; dp...
replace
6
8
6
8
0
p02901
C++
Runtime Error
#include <algorithm> #include <cstring> #include <deque> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <vector> using namespace std; #define ll long long #define endl '\n' const double INF = 1e9 + 5; pair<int, int> key[13]; // bitmask,value; int d[1001][1 << 13]; int n, ...
#include <algorithm> #include <cstring> #include <deque> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <vector> using namespace std; #define ll long long #define endl '\n' const double INF = 1e9 + 5; pair<int, int> key[1001]; // bitmask,value; int d[1001][1 << 13]; int n...
replace
14
15
14
15
0
p02901
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define INF 1e18 #define int long long #define Rep(i, a, n) for (int i = (a); i < (n); i++) #define rep(i, n) Rep(i, 0, n) #define all(a) (a).begin(), (a).end() using namespace std; typedef pair<int, int> P; typedef pair<int, P> PP; const int mod = 1000000007; int n, m; int a[1010], b[1010], c...
#include <bits/stdc++.h> #define INF 1e18 #define int long long #define Rep(i, a, n) for (int i = (a); i < (n); i++) #define rep(i, n) Rep(i, 0, n) #define all(a) (a).begin(), (a).end() using namespace std; typedef pair<int, int> P; typedef pair<int, P> PP; const int mod = 1000000007; int n, m; int a[1010], b[1010], c...
insert
19
19
19
20
TLE
p02901
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define INF 1LL << 62 #define inf 1000000007 int main() { ll n, m, a[1005], b[1005], p[13]; ll cnt = 1; for (ll i = 0; i < 13; i++) { p[i] = cnt; cnt *= 2; } cin >> n >> m; for (ll i = 0; i < m; i++) { ll x, y; cin >> x >> ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define INF 1LL << 62 #define inf 1000000007 int main() { ll n, m, a[1005], b[1005], p[13]; ll cnt = 1; for (ll i = 0; i < 13; i++) { p[i] = cnt; cnt *= 2; } cin >> n >> m; for (ll i = 0; i < m; i++) { ll x, y; cin >> x >> ...
replace
38
39
38
41
0
p02901
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define INF 1LL << 62 #define inf 1000000007 ll dp[4200]; int main() { for (ll i = 0; i < 4200; i++) { dp[i] = INF; } dp[0] = 0; ll n, m; cin >> n >> m; for (ll i = 0; i < m; i++) { ll x, y; cin >> x >> y; ll op = 0; fo...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define INF 1LL << 62 #define inf 1000000007 ll dp[4200]; int main() { for (ll i = 0; i < 4200; i++) { dp[i] = INF; } dp[0] = 0; ll n, m; cin >> n >> m; for (ll i = 0; i < m; i++) { ll x, y; cin >> x >> y; ll op = 0; fo...
replace
26
27
26
29
0
p02902
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define endl '\n' #define ALL(a) (a).begin(), (a).end() #define ALLR(a) (a).rbegin(), (a).rend() #define spa << " " << #define lfs << fixed << setprecision(10) << #define test cout << "test" << endl; #define fi first #define se second #define MP make_pair #define PB push_b...
#include <bits/stdc++.h> using namespace std; #define endl '\n' #define ALL(a) (a).begin(), (a).end() #define ALLR(a) (a).rbegin(), (a).rend() #define spa << " " << #define lfs << fixed << setprecision(10) << #define test cout << "test" << endl; #define fi first #define se second #define MP make_pair #define PB push_b...
replace
137
139
137
139
0
p02902
C++
Time Limit Exceeded
#include <algorithm> #include <bitset> #include <cmath> #include <fstream> #include <iostream> #include <limits> #include <map> #include <queue> #include <set> #include <string> #include <unordered_set> #include <vector> #define MOD_BIG 1000000007 using std::cerr; using std::cin; using std::cout; using std::endl; usin...
#include <algorithm> #include <bitset> #include <cmath> #include <fstream> #include <iostream> #include <limits> #include <map> #include <queue> #include <set> #include <string> #include <unordered_set> #include <vector> #define MOD_BIG 1000000007 using std::cerr; using std::cin; using std::cout; using std::endl; usin...
replace
268
269
268
269
TLE
p02902
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> l_l; typedef pair<int, int> i_i; 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; re...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> l_l; typedef pair<int, int> i_i; 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; re...
insert
40
40
40
42
TLE
p02902
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define INF 1000000000 #define P pair<int, int> #define pb push_back #define fi first #define se second int n, m, st, d[1010]; vector<int> v[1010], vg[1010], ans; P es[1010]; int mid = INF, mi; queue<int> q; void dfs(int x) { ...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define INF 1000000000 #define P pair<int, int> #define pb push_back #define fi first #define se second int n, m, st, d[1010]; vector<int> v[1010], vg[1010], ans; P es[2010]; int mid = INF, mi; queue<int> q; void dfs(int x) { ...
replace
10
11
10
11
0
p02902
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; #define REP(i, n) for (int i = 0; i < n; ++i) int main() { int n, m; cin >> n >> m; vector<vector<int>> g(n); vector<int> d(n); vector<pair<int, int>> e(m); REP(i, m) { int a, b; cin >> a >> b; a--; b--; d[b]++; g[a...
#include <bits/stdc++.h> using namespace std; using ll = long long; #define REP(i, n) for (int i = 0; i < n; ++i) int main() { int n, m; cin >> n >> m; vector<vector<int>> g(n); vector<int> d(n); vector<pair<int, int>> e(m); REP(i, m) { int a, b; cin >> a >> b; a--; b--; d[b]++; g[a...
insert
66
66
66
67
-6
0f9492a3-53f9-4b80-a2cc-a26678af1926.out: /home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02902/C++/s927197528.cpp:73: int main(): Assertion `s.count({res[i], res[(i + 1) % res.size()]})' failed.
p02902
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; /* result can always be reduced to a cycle lets say we have a cycle, i posit that even if there are extra stuff, we can still reduce it extra forward edge-> we can take one of the two dfs down -> find a cycle (if none then no answer) run through the elements in the cyc...
#include <bits/stdc++.h> using namespace std; /* result can always be reduced to a cycle lets say we have a cycle, i posit that even if there are extra stuff, we can still reduce it extra forward edge-> we can take one of the two dfs down -> find a cycle (if none then no answer) run through the elements in the cyc...
replace
20
21
20
21
0
p02902
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using i64 = long long; #define rep(i, s, e) for (i64(i) = (s); (i) < (e); (i)++) #define all(x) x.begin(), x.end() #define let auto const template <typename... Types> struct dynarr : std::vector<Types...> { using std::vector<Types...>::vector; using size_type = typenam...
#include <bits/stdc++.h> using namespace std; using i64 = long long; #define rep(i, s, e) for (i64(i) = (s); (i) < (e); (i)++) #define all(x) x.begin(), x.end() #define let auto const template <typename... Types> struct dynarr : std::vector<Types...> { using std::vector<Types...>::vector; using size_type = typenam...
insert
45
45
45
46
TLE
p02902
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using i64 = int64_t; struct Edge { int from, to; }; struct Node { int num; vector<int> visited; }; using Graph = vector<vector<Edge>>; int main() { int n, m; cin >> n >> m; Graph graph(n + 1, vector<Edge>()); for (int i = 0; i < m; ++i) { int a, b; ...
#include <bits/stdc++.h> using namespace std; using i64 = int64_t; struct Edge { int from, to; }; struct Node { int num; vector<int> visited; }; using Graph = vector<vector<Edge>>; int main() { int n, m; cin >> n >> m; Graph graph(n + 1, vector<Edge>()); for (int i = 0; i < m; ++i) { int a, b; ...
insert
49
49
49
50
TLE
p02902
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int n, m; struct edge { int v, nxt; } e[2019][2]; int head[2019][2], in[2019], out[2019], tot[2] = {1, 1}, vst[2019]; void ae(int u, int v, int f) { if (!f) { in[v]++; out[u]++; } e[tot[f]][f] = {v, head[u][f]}; head[u][f] = tot[f]++; } queue<int> q; int a...
#include <bits/stdc++.h> using namespace std; int n, m; struct edge { int v, nxt; } e[2019][2]; int head[2019][2], in[2019], out[2019], tot[2] = {1, 1}, vst[2019]; void ae(int u, int v, int f) { if (!f) { in[v]++; out[u]++; } e[tot[f]][f] = {v, head[u][f]}; head[u][f] = tot[f]++; } queue<int> q; int a...
insert
26
26
26
28
TLE
p02902
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> #include <list> #include <map> #include <math.h> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <string> #include <time.h> #include <unistd.h> #include <vector> #ifndef ONLINE_JUDGE #define...
#include <algorithm> #include <iostream> #include <list> #include <map> #include <math.h> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <string> #include <time.h> #include <unistd.h> #include <vector> #ifndef ONLINE_JUDGE #define...
replace
104
105
104
105
TLE
p02902
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; typedef long long ll; const int INF = 1001001001; int n; vector<int> to[1005]; vector<int> bfs(int sv) { vector<int> dist(n, INF), pre(n, -1); queue<int> q; dist[sv] = 0; q.push(sv); while (!q.empty()) { int v ...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; typedef long long ll; const int INF = 1001001001; int n; vector<int> to[1005]; vector<int> bfs(int sv) { vector<int> dist(n, INF), pre(n, -1); queue<int> q; dist[sv] = 0; q.push(sv); while (!q.empty()) { int v ...
replace
59
60
59
60
0
p02902
C++
Runtime Error
#include <algorithm> // minmax, sort, swap #include <bitset> #include <cassert> #include <cmath> #include <cstdio> // printf, scanf #include <deque> // deque #include <functional> // function<void(int)> #include <iomanip> // cout<<setprecision(n) #include <iostream> // cin, cout, cerr #include <map> ...
#include <algorithm> // minmax, sort, swap #include <bitset> #include <cassert> #include <cmath> #include <cstdio> // printf, scanf #include <deque> // deque #include <functional> // function<void(int)> #include <iomanip> // cout<<setprecision(n) #include <iostream> // cin, cout, cerr #include <map> ...
insert
64
64
64
65
0
p02902
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define INF 1e18 #define int long long #define Rep(i, a, n) for (int i = (a); i < (n); i++) #define rep(i, n) Rep(i, 0, n) #define all(a) (a).begin(), (a).end() using namespace std; typedef pair<int, int> P; typedef pair<int, P> PP; const int mod = 1000000007; signed main() { ios::sync_with_...
#include <bits/stdc++.h> #define INF 1e18 #define int long long #define Rep(i, a, n) for (int i = (a); i < (n); i++) #define rep(i, n) Rep(i, 0, n) #define all(a) (a).begin(), (a).end() using namespace std; typedef pair<int, int> P; typedef pair<int, P> PP; const int mod = 1000000007; signed main() { ios::sync_with_...
replace
42
57
42
57
TLE
p02902
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <cstring> //memset(dp,0,sizeof(dp)) #include <functional> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <vector> #define ll long long #define rep(i, n) for (int i = 0; i < ...
#include <algorithm> #include <cmath> #include <cstring> //memset(dp,0,sizeof(dp)) #include <functional> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <vector> #define ll long long #define rep(i, n) for (int i = 0; i < ...
insert
65
65
65
67
TLE
p02902
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef pair<int, int> P; typedef long long ll; typedef long double ld; const int inf = 1e9 + 7; const ll longinf = 1LL << 60; #define REP(i, m, n) for (int i = (int)(m); i < (int)(n); ++i) #define rep(i, n) REP(i, 0, n) #define F first #define S second constexpr char ln = ...
#include <bits/stdc++.h> using namespace std; typedef pair<int, int> P; typedef long long ll; typedef long double ld; const int inf = 1e9 + 7; const ll longinf = 1LL << 60; #define REP(i, m, n) for (int i = (int)(m); i < (int)(n); ++i) #define rep(i, n) REP(i, 0, n) #define F first #define S second constexpr char ln = ...
replace
63
64
63
64
TLE
p02902
C++
Runtime Error
// #undef _DEBUG // #pragma GCC optimize("Ofast") // 不動小数点の計算高速化 // #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace std::chrono; #define int long long...
// #undef _DEBUG // #pragma GCC optimize("Ofast") // 不動小数点の計算高速化 // #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace std::chrono; #define int long long...
insert
7,760
7,760
7,760
7,762
0
p02902
C++
Time Limit Exceeded
#define _USE_MATH_DEFINES #include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std; typedef pair<long l...
#define _USE_MATH_DEFINES #include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std; typedef pair<long l...
insert
132
132
132
136
TLE
p02902
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> #include <queue> #include <stack> #include <vector> using namespace std; using P = pair<int, int>; vector<vector<int>> edge; stack<int> hist; vector<bool> seen; bool dfs(int p, int t) { for (auto nt : edge[t]) { if (nt == p) { return true; } else if (seen[nt])...
#include <algorithm> #include <iostream> #include <queue> #include <stack> #include <vector> using namespace std; using P = pair<int, int>; vector<vector<int>> edge; stack<int> hist; vector<bool> seen; bool dfs(int p, int t) { for (auto nt : edge[t]) { if (nt == p) { return true; } else if (seen[nt])...
insert
68
68
68
72
TLE
p02902
C++
Runtime Error
#include <cstdio> #include <iostream> const int maxn = 1e3 + 10; struct edge { int to, next; } map[maxn]; int n, m, stk[maxn], top, val, ans[maxn], tp, nxt[maxn]; int head[maxn], cnt; bool vis[maxn], flag, tag[maxn]; inline void add(int x, int y) { map[++cnt] = (edge){y, head[x]}; head[x] = cnt; return; } ...
#include <cstdio> #include <iostream> const int maxn = 1e6 + 10; struct edge { int to, next; } map[maxn]; int n, m, stk[maxn], top, val, ans[maxn], tp, nxt[maxn]; int head[maxn], cnt; bool vis[maxn], flag, tag[maxn]; inline void add(int x, int y) { map[++cnt] = (edge){y, head[x]}; head[x] = cnt; return; } ...
replace
3
4
3
4
0
p02902
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using ll = long long; template <class T> using vt = vector<T>; template <class T> using vvt = vector<vt<T>>; template <class T> using ttt = tuple<T, T>; using tii = tuple<int, int>; using tiii = tuple<int, int, int>; using vi = vector<int>; #define rep(i, n) for (int i = 0;...
#include <bits/stdc++.h> using namespace std; using ll = long long; template <class T> using vt = vector<T>; template <class T> using vvt = vector<vt<T>>; template <class T> using ttt = tuple<T, T>; using tii = tuple<int, int>; using tiii = tuple<int, int, int>; using vi = vector<int>; #define rep(i, n) for (int i = 0;...
replace
63
66
63
69
TLE
p02902
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (long long i = 0; i < (long long)(n); i++) #define REP(i, k, n) for (long long i = k; i < (long long)(n); i++) #define all(a) a.begin(), a.end() #define eb emplace_back #define pb push_back #define lb(v, k) (lower_bound(all(v), k) - v.begin()) #define ...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (long long i = 0; i < (long long)(n); i++) #define REP(i, k, n) for (long long i = k; i < (long long)(n); i++) #define all(a) a.begin(), a.end() #define eb emplace_back #define pb push_back #define lb(v, k) (lower_bound(all(v), k) - v.begin()) #define ...
replace
57
58
57
58
TLE
p02902
C++
Time Limit Exceeded
// 嘘解法です!!!!! #include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <vector> using namespace std; using lint = long long; constexpr int MOD = 1000000007, INF = 1010...
// 嘘解法です!!!!! #include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <vector> using namespace std; using lint = long long; constexpr int MOD = 1000000007, INF = 1010...
insert
91
91
91
92
TLE
p02902
C++
Time Limit Exceeded
#include <bits/stdc++.h> // using namespace std; #pragma GCC target("avx") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #define rep(i, j, n) for (ll i = (ll)(j); i < (ll)(n); i++) #define REP(i, j, n) for (ll i = (ll)(j); i...
#include <bits/stdc++.h> // using namespace std; #pragma GCC target("avx") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #define rep(i, j, n) for (ll i = (ll)(j); i < (ll)(n); i++) #define REP(i, j, n) for (ll i = (ll)(j); i...
insert
211
211
211
212
TLE
p02902
C++
Runtime Error
#include <algorithm> #include <cassert> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <utility> #include <vector> using namespace std; typedef long long ll; const int MAXN = 1024; int vis[MAXN], parent[MAXN]; vector<int> adj[MAXN]; in...
#include <algorithm> #include <cassert> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <utility> #include <vector> using namespace std; typedef long long ll; const int MAXN = 1024; int vis[MAXN], parent[MAXN]; vector<int> adj[MAXN]; in...
insert
57
57
57
61
0
p02902
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define ll long long #define fornum(A, B, C) for (A = B; A < C; A++) #define mp make_pair #define pii pair<int, int> #define pll pair<ll, ll> using namespace std; ///////////////////////////////////////////////////// #define INF 1e12 ll N, M; vector<ll> abv[1010]; ll i, j, k; vector<ll> an...
#include <bits/stdc++.h> #define ll long long #define fornum(A, B, C) for (A = B; A < C; A++) #define mp make_pair #define pii pair<int, int> #define pll pair<ll, ll> using namespace std; ///////////////////////////////////////////////////// #define INF 1e12 ll N, M; vector<ll> abv[1010]; ll i, j, k; vector<ll> an...
replace
52
53
52
54
TLE
p02902
C++
Runtime Error
#include "bits/stdc++.h" #define hhh printf("hhh\n") #define see(x) (cerr << (#x) << '=' << (x) << endl) using namespace std; typedef long long ll; typedef pair<int, int> pr; inline int read() { int x = 0; char c = getchar(); while (c < '0' || c > '9') c = getchar(); while (c >= '0' && c <= '9') x = x *...
#include "bits/stdc++.h" #define hhh printf("hhh\n") #define see(x) (cerr << (#x) << '=' << (x) << endl) using namespace std; typedef long long ll; typedef pair<int, int> pr; inline int read() { int x = 0; char c = getchar(); while (c < '0' || c > '9') c = getchar(); while (c >= '0' && c <= '9') x = x *...
replace
23
24
23
24
0
p02902
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define INF 100000000 #define YJ 1145141919 #define INF_INT_MAX 2147483647 #define INF_LL 9223372036854775 #define INF_LL_MAX 9223372036854775807 #define EPS 1e-10 #define MOD 1000000007 #define MOD9 998244353 #define Pi acos(-1) #define LL long long #define ULL unsigned ...
#include <bits/stdc++.h> using namespace std; #define INF 100000000 #define YJ 1145141919 #define INF_INT_MAX 2147483647 #define INF_LL 9223372036854775 #define INF_LL_MAX 9223372036854775807 #define EPS 1e-10 #define MOD 1000000007 #define MOD9 998244353 #define Pi acos(-1) #define LL long long #define ULL unsigned ...
replace
94
95
94
95
TLE
p02902
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define IOS \ ios_base::sync_with_stdio(false); \ cin.tie(0); \ cout.tie(0); ...
#include <bits/stdc++.h> using namespace std; #define IOS \ ios_base::sync_with_stdio(false); \ cin.tie(0); \ cout.tie(0); ...
insert
72
72
72
74
TLE
p02902
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define REP(i, s, e) for (int i = (s); i < (e); i++) #define rep(i, n) REP(i, 0, n) #define rep1(i, n) REP(i, 1, n) #define repe(i, n) for (auto &&i : n) #define all(v) (v).begin(), (v).end() #define decimal fixed << setprecision(20) #define fastcin() ...
#include <bits/stdc++.h> #define REP(i, s, e) for (int i = (s); i < (e); i++) #define rep(i, n) REP(i, 0, n) #define rep1(i, n) REP(i, 1, n) #define repe(i, n) for (auto &&i : n) #define all(v) (v).begin(), (v).end() #define decimal fixed << setprecision(20) #define fastcin() ...
replace
58
59
58
59
TLE
p02902
C++
Runtime Error
#include <bits/stdc++.h> #define mk make_pair #define fs first #define sc second using namespace std; typedef long long ll; typedef long double ld; vector<int> a[1111], b[1111]; bool vis[1111], vis1[1111]; vector<int> v; void dfs(int x) { if (vis[x]) return; vis[x] = 1; for (int i = 0; i < a[x].size(); ++i) {...
#include <bits/stdc++.h> #define mk make_pair #define fs first #define sc second using namespace std; typedef long long ll; typedef long double ld; vector<int> a[1111], b[1111]; bool vis[1111], vis1[1111]; vector<int> v; void dfs(int x) { if (vis[x]) return; vis[x] = 1; for (int i = 0; i < a[x].size(); ++i) {...
insert
96
96
96
97
0
p02902
C++
Runtime Error
/** * 内部により小さなループを持たない、ループを1個探せばよい */ #include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <stack> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std; template <class T> bool contains(unordered_set<T> s, const T &t) { const auto &ite = s.find(t...
/** * 内部により小さなループを持たない、ループを1個探せばよい */ #include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <stack> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std; template <class T> bool contains(unordered_set<T> s, const T &t) { const auto &ite = s.find(t...
replace
102
103
102
104
0
p02902
C++
Runtime Error
#include <bits/stdc++.h> // #include <boost/multiprecision/cpp_int.hpp> // namespace mp = boost::multiprecision; using namespace std; const double PI = 3.14159265358979323846; typedef long long ll; const double EPS = 1e-9; #define rep(i, n) for (int i = 0; i < (n); ++i) // #define rep(i, n) for (ll i = 0; i < (n); ++...
#include <bits/stdc++.h> // #include <boost/multiprecision/cpp_int.hpp> // namespace mp = boost::multiprecision; using namespace std; const double PI = 3.14159265358979323846; typedef long long ll; const double EPS = 1e-9; #define rep(i, n) for (int i = 0; i < (n); ++i) // #define rep(i, n) for (ll i = 0; i < (n); ++...
delete
68
69
68
68
0
p02902
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; struct Edge { int to; }; using Graph = vector<vector<Edge>>; const int INF = 1e8; // 幅優先探索 vector<int> dist; // 始点からの距離を記録 vector<int> pre; void bfs(const Graph &G, int s) { dist.assign((int)G.size(), INF); // 初期化 pre.assign((int)G.size(), -1); queue<int> que; q...
#include <bits/stdc++.h> using namespace std; struct Edge { int to; }; using Graph = vector<vector<Edge>>; const int INF = 1e8; // 幅優先探索 vector<int> dist; // 始点からの距離を記録 vector<int> pre; void bfs(const Graph &G, int s) { dist.assign((int)G.size(), INF); // 初期化 pre.assign((int)G.size(), -1); queue<int> que; q...
insert
67
67
67
71
0
p02902
C++
Time Limit Exceeded
#include <bits/stdc++.h> #pragma GCC optimize("Ofast") using namespace std; #define int long long #define rep(i, n) for (int(i) = 0; (i) < (n); (i)++) #define rrep(i, n) for (int(i) = ((n)-1); (i) >= 0; (i)--) #define itn int #define all(x) (x).begin(), (x).end() #define F first #define S second const long long INF = 1...
#include <bits/stdc++.h> #pragma GCC optimize("Ofast") using namespace std; #define int long long #define rep(i, n) for (int(i) = 0; (i) < (n); (i)++) #define rrep(i, n) for (int(i) = ((n)-1); (i) >= 0; (i)--) #define itn int #define all(x) (x).begin(), (x).end() #define F first #define S second const long long INF = 1...
replace
48
49
48
49
TLE
p02902
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; const int N = 2009; int n, m; vector<int> g[N]; int dfn[N], low[N], num, vis[N], co[N], col; stack<int> S; int siz[N]; void tarjan(int u) { // cout<<u<<endl; dfn[u] = low[u] = ++num; vis[u] = 1; S.push(u); for (auto v : g[u]) { if (!dfn[v]) tarjan(v), lo...
#include <bits/stdc++.h> using namespace std; const int N = 2009; int n, m; vector<int> g[N]; int dfn[N], low[N], num, vis[N], co[N], col; stack<int> S; int siz[N]; void tarjan(int u) { // cout<<u<<endl; dfn[u] = low[u] = ++num; vis[u] = 1; S.push(u); for (auto v : g[u]) { if (!dfn[v]) tarjan(v), lo...
insert
42
42
42
44
TLE
p02903
C++
Runtime Error
#include <bits/extc++.h> #include <bits/stdc++.h> using namespace __gnu_pbds; using namespace std; const long long llINF = 9223372036854775807; const int INF = 2147483647; const int maxn = 3e5 + 7; const int maxm = 1e7 + 7; const int ALP = 26; const long long mod = 1e9 + 7; const double pi = acos(-1.0); const double ep...
#include <bits/extc++.h> #include <bits/stdc++.h> using namespace __gnu_pbds; using namespace std; const long long llINF = 9223372036854775807; const int INF = 2147483647; const int maxn = 3e5 + 7; const int maxm = 1e7 + 7; const int ALP = 26; const long long mod = 1e9 + 7; const double pi = acos(-1.0); const double ep...
replace
16
17
16
17
0
p02903
Python
Runtime Error
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines sys.setrecursionlimit(10**7) h, w, a, b = map(int, readline().split()) x_cnt = [0] * h y_cnt = [0] * w ans = [""] * h if h == 1: print("1" * a + "0" * (w - a)) elif w == 1: for i in range(b): ...
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines sys.setrecursionlimit(10**7) h, w, a, b = map(int, readline().split()) ans_1 = "1" * a + "0" * (w - a) ans_2 = "0" * a + "1" * (w - a) for i in range(b): print(ans_1) for i in range(h - b): prin...
replace
8
39
8
14
0
p02903
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, start, n) for (ll i = (ll)(start); i < (ll)(n); ++i) static const ll INFTY = 1L << 62L; ll solver(ll h, ll w, ll a, ll b) { rep(i, 0, b) { rep(j, 0, a) cout << '0'; rep(j, a, w) cout << '1'; cout << '\n'; } rep(i, b, h)...
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, start, n) for (ll i = (ll)(start); i < (ll)(n); ++i) static const ll INFTY = 1L << 62L; void solver(ll h, ll w, ll a, ll b) { rep(i, 0, b) { rep(j, 0, a) cout << '0'; rep(j, a, w) cout << '1'; cout << '\n'; } rep(i, b, ...
replace
5
6
5
6
TLE
p02903
C++
Runtime Error
#include <iostream> #include <vector> using namespace std; int main() { int H, W, A, B; cin >> H >> W >> A >> B; vector<vector<int>> ans(H, vector<int>(W)); for (int i = 0; i < A; i++) { for (int j = 0; j < B; j++) ans[j][i] = 1; } for (int i = A; i < H; i++) { for (int j = B; j < W; j++) ...
#include <iostream> #include <vector> using namespace std; int main() { int H, W, A, B; cin >> H >> W >> A >> B; vector<vector<int>> ans(H, vector<int>(W)); for (int i = 0; i < A; i++) { for (int j = 0; j < B; j++) ans[j][i] = 1; } for (int i = A; i < W; i++) { for (int j = B; j < H; j++) ...
replace
12
14
12
14
0
p02903
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int a[1000][1000]; int sumb[1000]; int main() { int h, w, A, b; cin >> h >> w >> A >> b; for (int j = 1; j <= A; j++) for (int i = 1; i <= b; i++) a[i][j] = 1; for (int j = A + 1; j <= w; j++) { for (int i = 1; i <= b; i++) a[i][j] = 0; } for...
#include <bits/stdc++.h> using namespace std; int a[1006][1006]; int sumb[1006]; int main() { int h, w, A, b; cin >> h >> w >> A >> b; for (int j = 1; j <= A; j++) for (int i = 1; i <= b; i++) a[i][j] = 1; for (int j = A + 1; j <= w; j++) { for (int i = 1; i <= b; i++) a[i][j] = 0; } for...
replace
2
4
2
4
0
p02903
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> P; typedef pair<int, int> Pi; typedef vector<ll> Vec; typedef vector<int> Vi; typedef vector<string> Vs; typedef vector<P> VP; typedef vector<vector<ll>> VV; typedef vector<vector<int>> VVi; typedef vector<vector<vector<ll>>> VVV...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> P; typedef pair<int, int> Pi; typedef vector<ll> Vec; typedef vector<int> Vi; typedef vector<string> Vs; typedef vector<P> VP; typedef vector<vector<ll>> VV; typedef vector<vector<int>> VVi; typedef vector<vector<vector<ll>>> VVV...
replace
204
209
204
209
0
p02903
C++
Runtime Error
#define MOD 1000000007 #if 1 //------------------------------------------------------------ #define _USE_MATH_DEFINES #include <bits/stdc++.h> using namespace std; template <class T> struct Entry { static void Run() { T().Run(); } }; struct MyMain; #if defined(TEST) #include "test.hpp" #else signed main() { cin....
#define MOD 1000000007 #if 1 //------------------------------------------------------------ #define _USE_MATH_DEFINES #include <bits/stdc++.h> using namespace std; template <class T> struct Entry { static void Run() { T().Run(); } }; struct MyMain; #if defined(TEST) #include "test.hpp" #else signed main() { cin....
replace
1,364
1,398
1,364
1,378
0
p02903
C++
Runtime Error
#include <bits/stdc++.h> #define all(x) (x).begin(), (x).end() #define ll long long #define rep(i, n) for (int i = 0; i < int(n); i++) #define vi vector<int> #define INF (1 << 30) - 1 using namespace std; const int dx[] = {-1, 0, 1, 0}; const int dy[] = {0, 1, 0, -1}; template <class T> inline bool chmax(T &a, const T ...
#include <bits/stdc++.h> #define all(x) (x).begin(), (x).end() #define ll long long #define rep(i, n) for (int i = 0; i < int(n); i++) #define vi vector<int> #define INF (1 << 30) - 1 using namespace std; const int dx[] = {-1, 0, 1, 0}; const int dy[] = {0, 1, 0, -1}; template <class T> inline bool chmax(T &a, const T ...
replace
30
40
30
32
0
p02903
C++
Runtime Error
#include "bits/stdc++.h" // Begin Header {{{ using namespace std; #ifndef DEBUG #define dump(...) #endif #define all(x) x.begin(), x.end() #define rep(i, b, e) for (intmax_t i = (b), i##_limit = (e); i < i##_limit; ++i) #define reps(i, b, e) \ for (intmax_t ...
#include "bits/stdc++.h" // Begin Header {{{ using namespace std; #ifndef DEBUG #define dump(...) #endif #define all(x) x.begin(), x.end() #define rep(i, b, e) for (intmax_t i = (b), i##_limit = (e); i < i##_limit; ++i) #define reps(i, b, e) \ for (intmax_t ...
replace
119
124
119
124
0