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
p02838
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); const ll mod = 1e9 + 7; int n; cin >> n; vector<ll> a(n); for (int i = 0; i < n; i++) cin >> a[i]; // bits[i][j][0or1] := i番目以降の数にj桁目が0or1になる数がいくつあるか vector<vector<v...
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); const ll mod = 1e9 + 7; int n; cin >> n; vector<ll> a(n); for (int i = 0; i < n; i++) cin >> a[i]; // bits[i][j][0or1] := i番目以降の数にj桁目が0or1になる数がいくつあるか vector<vector<v...
replace
35
53
35
49
TLE
p02838
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define int long long #define endl "\n" #define REP(i, a, n) for (int i = a; i < n; ++i) #define REPR(i, a, n) for (int i = a; i > n; --i) #define RUP(a, b) ((a + b - 1) / (b)) #define ALL(v) (v).begin(), (v).end() #define pb push_back #define mp make_pair #define mt make_...
#include <bits/stdc++.h> using namespace std; #define int long long #define endl "\n" #define REP(i, a, n) for (int i = a; i < n; ++i) #define REPR(i, a, n) for (int i = a; i > n; --i) #define RUP(a, b) ((a + b - 1) / (b)) #define ALL(v) (v).begin(), (v).end() #define pb push_back #define mp make_pair #define mt make_...
replace
80
81
80
82
TLE
p02838
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define MOD 1000000007 typedef long long ll; typedef pair<int, int> P; ll dis[100000] = {}; int main() { int n, i, j; ll a, tem, res = 0, count[60][2] = {}; cin >> n; for (i = 0; i < n; i++) { cin >> a; tem = 1; for (j = 0; j < 60; j++) { count[j...
#include <bits/stdc++.h> using namespace std; #define MOD 1000000007 typedef long long ll; typedef pair<int, int> P; ll dis[100000] = {}; int main() { int n, i, j; ll a, tem, res = 0, count[60][2] = {}; cin >> n; for (i = 0; i < n; i++) { cin >> a; tem = 1; for (j = 0; j < 60; j++) { count[j...
replace
21
22
21
22
0
p02838
C++
Runtime Error
/************************************************************ > File Name: d.cpp > Author: TSwiftie > Mail: 2224273204@qq.com > Created Time: Fri 20 Dec 2019 03:02:31 AM CST ************************************************************/ #pragma GCC optimize(2) #include <algorithm> #inclu...
/************************************************************ > File Name: d.cpp > Author: TSwiftie > Mail: 2224273204@qq.com > Created Time: Fri 20 Dec 2019 03:02:31 AM CST ************************************************************/ #pragma GCC optimize(2) #include <algorithm> #inclu...
replace
34
35
34
35
0
p02838
C++
Time Limit Exceeded
#include <iostream> #include <string> #include <vector> using namespace std; typedef long long ll; int main() { int N; cin >> N; ll *a = new ll[N]; for (int i = 0; i < N; i++) cin >> a[i]; ll mod = 1e9 + 7; vector<vector<int>> b(N, vector<int>(60)); for (int i = 0; i < N; i++) { for (int j = ...
#include <iostream> #include <string> #include <vector> using namespace std; typedef long long ll; int main() { int N; cin >> N; ll *a = new ll[N]; for (int i = 0; i < N; i++) cin >> a[i]; ll mod = 1e9 + 7; vector<vector<int>> b(N, vector<int>(60)); for (int i = 0; i < N; i++) { for (int j = ...
replace
53
60
53
55
TLE
p02838
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define int long using pi = pair<int, int>; #define mp make_pair const int mod = 1e9 + 7; signed main() { int n; cin >> n; vector<int> a(n); for (auto &i : a) cin >> i; int suma = 0, land = 0; for (auto i : a) suma = (suma + i) % mod; int res = 0; f...
#include <bits/stdc++.h> using namespace std; #define int long using pi = pair<int, int>; #define mp make_pair const int mod = 1e9 + 7; signed main() { int n; cin >> n; vector<int> a(n); for (auto &i : a) cin >> i; int suma = 0, land = 0; for (auto i : a) suma = (suma + i) % mod; int res = 0; ...
replace
17
22
17
40
TLE
p02838
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; const int MOD = 1e9 + 7, MAX_N = 30006; int N; ll A[MAX_N]; ll bit0[70], bit1[70]; // how many 0's and 1's have we seen at bit i void solve() { ll x = A[N - 1]; for (int i = 0; i < 62; ++i) { if (x >> i & 1) bit1[i]++; else bi...
#include <bits/stdc++.h> using namespace std; using ll = long long; const int MOD = 1e9 + 7, MAX_N = 300006; int N; ll A[MAX_N]; ll bit0[70], bit1[70]; // how many 0's and 1's have we seen at bit i void solve() { ll x = A[N - 1]; for (int i = 0; i < 62; ++i) { if (x >> i & 1) bit1[i]++; else b...
replace
4
5
4
5
0
p02838
C++
Runtime Error
#include <bits/stdc++.h> #define f first #define s second #define MOD 1000000007 #define PMOD 998244353 #define pb(x) push_back(x) using namespace std; typedef long long int ll; typedef pair<int, int> pii; typedef pair<ll, ll> plii; typedef pair<int, pii> piii; const int INF = 1e9 + 10; const ll LINF = 1LL * INF * INF...
#include <bits/stdc++.h> #define f first #define s second #define MOD 1000000007 #define PMOD 998244353 #define pb(x) push_back(x) using namespace std; typedef long long int ll; typedef pair<int, int> pii; typedef pair<ll, ll> plii; typedef pair<int, pii> piii; const int INF = 1e9 + 10; const ll LINF = 1LL * INF * INF...
replace
14
15
14
15
0
p02838
Python
Time Limit Exceeded
N = int(input()) A = list(map(int, input().split())) result = 0 for i in range(60): on = sum([(1 << i) & a for a in A]) >> i result += (on * (N - on)) << i result %= (10**9) + 7 print(result)
N = int(input()) A = list(map(int, input().split())) result = 0 for i in range(60): target = 1 << i on = sum([target & a for a in A]) >> i result += (on * (N - on)) << i result %= (10**9) + 7 print(result)
replace
5
6
5
7
TLE
p02838
Python
Runtime Error
def solve(string): n, *a = map(int, string.split()) a = ("{:060b}".format(_a) for _a in a) m = 10**9 + 7 ans = 0 for s in map(str.count("1"), zip(*a)): ans <<= 1 ans += s * (n - s) ans %= m return str(ans) if __name__ == "__main__": import sys print(solve(sys.s...
def solve(string): n, *a = map(int, string.split()) a = ("{:060b}".format(_a) for _a in a) m = 10**9 + 7 ans = 0 for s in map(lambda x: x.count("1"), zip(*a)): ans <<= 1 ans += s * (n - s) ans %= m return str(ans) if __name__ == "__main__": import sys print(sol...
replace
5
6
5
6
TypeError: count() takes at least 1 argument (0 given)
Traceback (most recent call last): File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02838/Python/s739463429.py", line 15, in <module> print(solve(sys.stdin.read().strip())) File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02838/Python/s739463429.py", line 6, in solve ...
p02838
Python
Time Limit Exceeded
#!/usr/bin/env python3 n, *a = map(int, open(0).read().split()) b = [0] * 60 ans = 0 for i in range(n): for j in range(60): ans += 2**j * (i - b[j] if a[i] >> j & 1 else b[j]) ans %= 10**9 + 7 for j in range(len(bin(a[i])) - 2): b[j] += a[i] >> j & 1 print(ans)
#!/usr/bin/env python3 n, *a = map(int, open(0).read().split()) b = [0] * 60 ans = 0 for i in range(n): for j in range(60): ans += (i - b[j] if a[i] >> j & 1 else b[j]) << j ans %= 10**9 + 7 for j in range(60): b[j] += a[i] >> j & 1 print(ans)
replace
6
9
6
9
TLE
p02838
Python
Runtime Error
import numpy as np N = int(input()) A = np.fromstring(input(), np.int64, " ") result = 0 for bit in range(60): c = int((A & 1).sum()) A >>= 1 result = (result + c * (N - c) * (1 << bit)) % 1000000007 print(result)
import numpy as np N = int(input()) A = np.fromstring(input(), dtype=np.int64, sep=" ") result = 0 for bit in range(60): c = int((A & 1).sum()) A >>= 1 result = (result + c * (N - c) * (1 << bit)) % 1000000007 print(result)
replace
3
4
3
4
TLE
p02838
Python
Time Limit Exceeded
def main(): MOD = 10**9 + 7 N = int(input()) (*a,) = map(int, input().split()) b = [0] * 60 for x in a: for j in range(60): b[j] += (x & 1) > 0 x >>= 1 t = 1 ans = 0 for j in range(60): ans = (ans + b[j] * (N - b[j]) * t) % MOD t <<= 1 ...
def main(): MOD = 10**9 + 7 N = int(input()) (*a,) = map(int, input().split()) b = [0] * 60 for x in a: for j in range(60): b[j] += (x & 1) > 0 x >>= 1 t = 1 ans = 0 for j in range(60): ans = (ans + b[j] * (N - b[j]) * t) % MOD t <<= 1 ...
delete
22
31
22
22
TLE
p02838
Python
Time Limit Exceeded
MOD = 10**9 + 7 N = int(input()) A = list(map(int, input().split())) ans = 0 for i in range(N - 1): for j in range(i + 1, N): ans += A[i] ^ A[j] ans %= MOD print(ans)
MOD = 10**9 + 7 N = int(input()) A = list(map(int, input().split())) ans = 0 m = 1 for i in range(60): bits = sum((a & m for a in A)) bits //= m ans += bits * (N - bits) * m ans %= MOD m <<= 1 print(ans % MOD)
replace
5
10
5
13
TLE
p02838
Python
Time Limit Exceeded
n, *a = map(int, open(0).read().split()) # すべての組み合わせ # あるビットについて、そのビットが立つ回数 mod = 10**9 + 7 ans = 0 for i in range(60): cnt = 0 for j in range(n): cnt += a[j] >> i & 1 ans = (ans + (1 << i) * cnt * (n - cnt) % mod) % mod print(ans)
n, *a = map(int, open(0).read().split()) mod = 10**9 + 7 ans = 0 for i in range(60): cnt = 0 for j in range(n): cnt += a[j] >> i & 1 ans = (ans + (1 << i) * cnt * (n - cnt) % mod) % mod print(ans)
delete
1
3
1
1
TLE
p02838
Python
Time Limit Exceeded
import numpy as np N = int(input()) A = np.array(list(map(int, input().split()))) ans = 0 MOD = 10**9 + 7 for digit in range(60): one = sum((A >> digit) & 1) ans += (one * (N - one) * pow(2, digit, MOD)) % MOD ans %= MOD print(ans)
import numpy as np N = int(input()) A = np.array(list(map(int, input().split()))) ans = 0 MOD = 10**9 + 7 for digit in range(60): one = np.count_nonzero((A >> digit) & 1) ans += (one * (N - one) * pow(2, digit, MOD)) % MOD ans %= MOD print(ans)
replace
8
9
8
9
TLE
p02838
Python
Time Limit Exceeded
from collections import Counter import sys input = sys.stdin.readline def main(): mod = 10**9 + 7 n = int(input()) a = list(map(int, input().split())) ans = 0 a_dict = Counter(a) for i in range(n): a_dict[a[i]] -= 1 for j in a_dict: ans += a_dict[j] * (a[i] ^ j) ...
n = int(input()) a = map(int, input().split()) mod = 10**9 + 7 p = [0] * 60 for a_ in a: for i in range(60): p[i] += (a_ >> i) & 1 ans = 0 for i in range(60): sn = (n - p[i]) * p[i] ans = (ans + (sn << i)) % mod print(ans)
replace
0
21
0
12
TLE
p02838
Python
Time Limit Exceeded
import itertools MOD = 10**9 + 7 N = int(input()) A = [int(i) for i in input().split()] def main(): ans = sum([a ^ b for (a, b) in itertools.combinations(A, 2)]) % MOD print(ans) if __name__ == "__main__": main()
import itertools MOD = 10**9 + 7 N = int(input()) A = [int(i) for i in input().split()] def main(): count_1 = [0] * 61 for i in range(60): tmp = 0 for j, a in enumerate(A): tmp += (a >> i) & 1 count_1[i] += tmp ans = 0 for i, c1 in enumerate(count_1): c0 = ...
replace
8
9
8
19
TLE
p02838
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define endl '\n' template <int mod> struct ModInt { int x; ModInt() : x(0) {} ModInt(long long x_) { if ((x = x_ % mod + mod) >= mod) x -= mod; } ModInt &operator+=(ModInt rhs) { if ((x += rhs.x) >= mod) x -= mod; return *this; } ModIn...
#include <bits/stdc++.h> using namespace std; #define endl '\n' template <int mod> struct ModInt { int x; ModInt() : x(0) {} ModInt(long long x_) { if ((x = x_ % mod + mod) >= mod) x -= mod; } ModInt &operator+=(ModInt rhs) { if ((x += rhs.x) >= mod) x -= mod; return *this; } ModIn...
delete
48
52
48
48
0
p02838
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define endl '\n' #define MAX 1000001 #define pb push_back #define mk make_pair #define ll long long #define pii pair<int, int> ll M = 1000000000 + 7; ll sum[200005][65]; ll pot[63]; int main() { pot[0] = 1LL; for (int i = 1; i < 62; i++) { pot[i] = (pot[i - 1] * 2...
#include <bits/stdc++.h> using namespace std; #define endl '\n' #define MAX 1000001 #define pb push_back #define mk make_pair #define ll long long #define pii pair<int, int> ll M = 1000000000 + 7; ll sum[300005][65]; ll pot[63]; int main() { pot[0] = 1LL; for (int i = 1; i < 62; i++) { pot[i] = (pot[i - 1] * 2...
replace
10
11
10
11
127
/tmp/09f76a7b-374c-43cf-b420-2f757c70abf0.out: error while loading shared libraries: libstdc++.so.6: failed to map segment from shared object
p02838
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; // #include <ext/pb_ds/assoc_container.hpp> // #include <ext/pb_ds/tree_policy.hpp> // // using namespace __gnu_pbds; // template<typename T> using ordered_set = tree<T, null_type, less<T>, // rb_tree_tag, tree_order_statistics_node_update>; // class Timer { // clock...
#include <bits/stdc++.h> using namespace std; // #include <ext/pb_ds/assoc_container.hpp> // #include <ext/pb_ds/tree_policy.hpp> // // using namespace __gnu_pbds; // template<typename T> using ordered_set = tree<T, null_type, less<T>, // rb_tree_tag, tree_order_statistics_node_update>; // class Timer { // clock...
replace
77
78
77
78
0
p02838
C++
Runtime Error
#include "bits/stdc++.h" #pragma GCC optimize "03" using namespace std; #define int long long int #define pb push_back #define pii pair<int, int> #define fi first #define se second #define rep(i, a, b) for (int i = a; i < b; ++i) #define IOS \ ios::s...
#include "bits/stdc++.h" #pragma GCC optimize "03" using namespace std; #define int long long int #define pb push_back #define pii pair<int, int> #define fi first #define se second #define rep(i, a, b) for (int i = a; i < b; ++i) #define IOS \ ios::s...
replace
20
21
20
21
0
p02838
C++
Time Limit Exceeded
#include <iostream> using namespace std; long a[300010], s[64][300010][2]; int main() { int n; cin >> n; for (int i = 0; i < n; ++i) { cin >> a[i]; for (int j = 0; j < 61; ++j) { int k = (a[i] >> j) & 1; if (k == 0) { s[j][i + 1][0] = s[j][i][0] + 1; s[j][i + 1][1] = s[j][i][1...
#include <iostream> using namespace std; long a[300010], s[64][300010][2]; int main() { int n; cin >> n; for (int i = 0; i < n; ++i) { cin >> a[i]; for (int j = 0; j < 61; ++j) { int k = (a[i] >> j) & 1; if (k == 0) { s[j][i + 1][0] = s[j][i][0] + 1; s[j][i + 1][1] = s[j][i][1...
replace
29
31
29
30
TLE
p02838
C++
Runtime Error
// #include <bits/stdc++.h> #include <algorithm> #include <cmath> #include <iomanip> #include <ios> #include <iostream> #include <map> #include <numeric> #include <queue> #include <stack> // #include <windows.h> using namespace std; template <class T> using V = vector<T>; template <class T> using VV = V<V<T>>; template...
// #include <bits/stdc++.h> #include <algorithm> #include <cmath> #include <iomanip> #include <ios> #include <iostream> #include <map> #include <numeric> #include <queue> #include <stack> // #include <windows.h> using namespace std; template <class T> using V = vector<T>; template <class T> using VV = V<V<T>>; template...
replace
189
190
189
194
0
p02838
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define int long long const int mod = 1e9 + 7; int n; int a[100001]; int cnt[201][2]; signed main() { scanf("%lld", &n); long long ans = 0; for (int i = 1; i <= n; i++) { scanf("%lld", &a[i]); for (int j = 0; j <= 60; j++) ans += 1ll * (1ll << j) % mod *...
#include <bits/stdc++.h> using namespace std; #define int long long const int mod = 1e9 + 7; int n; int a[1000001]; int cnt[201][2]; signed main() { scanf("%lld", &n); long long ans = 0; for (int i = 1; i <= n; i++) { scanf("%lld", &a[i]); for (int j = 0; j <= 60; j++) ans += 1ll * (1ll << j) % mod ...
replace
5
6
5
6
0
p02838
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; const long long MOD = 1000000007; void solve(long long N, std::vector<long long> A) { const long long MOD = 1000000007; long long maxA = *max_element(A.begin(), A.end()); long long k = floor(log2(maxA)) + 1; // cout << "k " << k << endl; long long res = 0; f...
#include <bits/stdc++.h> using namespace std; const long long MOD = 1000000007; void solve(long long N, std::vector<long long> A) { const long long MOD = 1000000007; long long maxA = *max_element(A.begin(), A.end()); long long k = floor(log2(maxA)) + 1; // cout << "k " << k << endl; long long res = 0; f...
replace
13
14
13
14
TLE
p02838
C++
Runtime Error
// IOI 2021 #include <bits/stdc++.h> using namespace std; #define endl '\n' #define ends ' ' #define die(x) return cout << x << endl, 0 #define all(v) v.begin(), v.end() #define sz(x) (int)(x.size()) #define debug(x) cerr << #x << ": " << x << endl #define debugP(p) ...
// IOI 2021 #include <bits/stdc++.h> using namespace std; #define endl '\n' #define ends ' ' #define die(x) return cout << x << endl, 0 #define all(v) v.begin(), v.end() #define sz(x) (int)(x.size()) #define debug(x) cerr << #x << ": " << x << endl #define debugP(p) ...
replace
40
43
40
42
0
p02838
C++
Runtime Error
#include <bits/stdc++.h> #define pb push_back #define ff first #define ss second #define all(x) (x).begin(), (x).end() #define sz(a) int((a).size()) #define endl '\n' using namespace std; typedef vector<int> vi; typedef pair<int, int> ii; typedef long long ll; const int maxn = 1e5 + 10; const int mod = 1e9 + 7; ll...
#include <bits/stdc++.h> #define pb push_back #define ff first #define ss second #define all(x) (x).begin(), (x).end() #define sz(a) int((a).size()) #define endl '\n' using namespace std; typedef vector<int> vi; typedef pair<int, int> ii; typedef long long ll; const int maxn = 3e5 + 10; const int mod = 1e9 + 7; ll...
replace
15
16
15
16
0
p02838
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int MAXN = 200100; const ll MOD = 1e9 + 7; int n; ll arr[MAXN], ans; ll dig[100]; int main() { scanf("%d", &n); for (int i = 1; i <= n; i++) scanf("%lld", &arr[i]); for (int i = 1; i <= n; i++) { for (int j = 0; j <= 61; j++) ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int MAXN = 300100; const ll MOD = 1e9 + 7; int n; ll arr[MAXN], ans; ll dig[100]; int main() { scanf("%d", &n); for (int i = 1; i <= n; i++) scanf("%lld", &arr[i]); for (int i = 1; i <= n; i++) { for (int j = 0; j <= 61; j++) ...
replace
3
4
3
4
0
p02838
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, n) for (ll i = 0, i##_len = (n); i < i##_len; i++) #define reps(i, s, n) for (ll i = (s), i##_len = (n); i < i##_len; i++) #define rrep(i, n) for (ll i = (n)-1; i >= 0; i--) #define rreps(i, e, n) for (ll i = (n)-1; i >= (e); i--) #defin...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, n) for (ll i = 0, i##_len = (n); i < i##_len; i++) #define reps(i, s, n) for (ll i = (s), i##_len = (n); i < i##_len; i++) #define rrep(i, n) for (ll i = (n)-1; i >= 0; i--) #define rreps(i, e, n) for (ll i = (n)-1; i >= (e); i--) #defin...
replace
88
92
88
108
TLE
p02838
C++
Runtime Error
#include <algorithm> #include <cassert> #include <climits> #include <cmath> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> using namespace st...
#include <algorithm> #include <cassert> #include <climits> #include <cmath> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> using namespace st...
replace
47
48
47
48
0
p02838
C++
Runtime Error
#include <iostream> using namespace std; long long sum = 0, a[3001], beki[61]; int A[300001][60] = {0}, B[300001][60] = {0}; int main() { int N; cin >> N; for (int i = 1; i <= N; i++) { cin >> a[i]; for (int j = 0; j < 60; j++) { A[i][j] = A[i - 1][j] + ((a[i] >> j) & 1); B[i][j] = B[i - 1][j]...
#include <iostream> using namespace std; long long sum = 0, a[300001], beki[61]; int A[300001][60] = {0}, B[300001][60] = {0}; int main() { int N; cin >> N; for (int i = 1; i <= N; i++) { cin >> a[i]; for (int j = 0; j < 60; j++) { A[i][j] = A[i - 1][j] + ((a[i] >> j) & 1); B[i][j] = B[i - 1][...
replace
2
3
2
3
-11
p02838
C++
Runtime Error
#include <algorithm> #include <assert.h> #include <bitset> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <vector> using namespace std; typed...
#include <algorithm> #include <assert.h> #include <bitset> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <vector> using namespace std; typed...
replace
53
54
53
54
0
p02838
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 ALL(x) (x).begin(), (x).end() using namespace std; typedef long long ll; typedef pair<ll, l...
#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 ALL(x) (x).begin(), (x).end() using namespace std; typedef long long ll; typedef pair<ll, l...
replace
41
42
41
42
0
p02838
C++
Runtime Error
#include "bits/stdc++.h" #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) using namespace std; long long mod = 1000000000 + 7; int main() { int N; cin >> N; vector<long long> A(N); rep(i, N) cin >> A[i]; long long ans = 0; long long twoPow ...
#include "bits/stdc++.h" #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) using namespace std; long long mod = 1000000000 + 7; int main() { int N; cin >> N; vector<long long> A(N); rep(i, N) cin >> A[i]; long long ans = 0; long long twoPow ...
replace
27
28
27
28
-8
p02838
C++
Runtime Error
#include "bits/stdc++.h" using namespace std; #define ll long long int #define rep(i, n) for (int i = 0; i < n; i++) #define rrep(i, n) for (int i = n; i >= 0; i--) #define REP(i, s, t) for (int i = s; i <= t; i++) #define RREP(i, s, t) for (int i = s; i >= t; i--) #define dump(x) cerr << #x << " = " << (x) << endl; #d...
#include "bits/stdc++.h" using namespace std; #define ll long long int #define rep(i, n) for (int i = 0; i < n; i++) #define rrep(i, n) for (int i = n; i >= 0; i--) #define REP(i, s, t) for (int i = s; i <= t; i++) #define RREP(i, s, t) for (int i = s; i >= t; i--) #define dump(x) cerr << #x << " = " << (x) << endl; #d...
replace
62
63
62
63
0
p02838
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <cstdlib> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; typedef long long ll; // #define rep(i, s, e) for (int(i) = (s); (i) < (e); ++(i)) #define rep(i, e) for ...
#include <algorithm> #include <cmath> #include <cstdlib> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; typedef long long ll; // #define rep(i, s, e) for (int(i) = (s); (i) < (e); ++(i)) #define rep(i, e) for ...
delete
29
33
29
29
TLE
p02838
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; using pll = pair<ll, ll>; using vl = vector<ll>; /* short */ #define pb push_back #define mp make_pair #define Fi first #define Se second #define ALL(v) begin(v), end(v) #define RALL(v) rbegin(v), rend(v) /* REPmacro */ #define FOR(i, a, b) for (int ...
#include <bits/stdc++.h> using namespace std; using ll = long long; using pll = pair<ll, ll>; using vl = vector<ll>; /* short */ #define pb push_back #define mp make_pair #define Fi first #define Se second #define ALL(v) begin(v), end(v) #define RALL(v) rbegin(v), rend(v) /* REPmacro */ #define FOR(i, a, b) for (int ...
replace
38
39
38
39
0
p02838
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define MOD 1000000007 template <typename T1, typename T2> inline void chmin(T1 &a, T2 b) { if (a > b) a = b; } template <typename T1, typename T2> inline void chmax(T1 &a, T2 b) { if (a < b) a = b; } int main() { int n; cin >> n; ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define MOD 1000000007 template <typename T1, typename T2> inline void chmin(T1 &a, T2 b) { if (a > b) a = b; } template <typename T1, typename T2> inline void chmax(T1 &a, T2 b) { if (a < b) a = b; } int main() { int n; cin >> n; ...
replace
22
29
22
34
TLE
p02838
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll n; ll a[1 << 18]; ll sum[1 << 18][65]; int main() { cin >> n; for (int i = 0; i < n; i++) { cin >> a[i]; ll tmp = a[i]; for (int j = 0; j < 60; j++) { sum[i][j] = tmp & 1; tmp >>= 1; } } for (int i = n; i >= 0; i...
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll n; ll a[1 << 19]; ll sum[1 << 19][65]; int main() { cin >> n; for (int i = 0; i < n; i++) { cin >> a[i]; ll tmp = a[i]; for (int j = 0; j < 60; j++) { sum[i][j] = tmp & 1; tmp >>= 1; } } for (int i = n; i >= 0; i...
replace
4
6
4
6
-11
p02838
C++
Runtime Error
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <string> #include <unordered_map> #include <vector> using namespace std; typedef long long ll; #define INF ...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <string> #include <unordered_map> #include <vector> using namespace std; typedef long long ll; #define INF ...
replace
41
42
41
42
-11
p02838
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using i64 = long long; using u64 = unsigned long long; #define dbg(x) cerr << "[" #x << " : " << x << "]\n" const int mod = (int)1e9 + 7; int main() { int n; scanf("%d", &n); i64 a[400000]; vector<int> cnt(65, 0); for (int i = 0; i < n; i++) { scanf("%lld"...
#include <bits/stdc++.h> using namespace std; using i64 = long long; using u64 = unsigned long long; #define dbg(x) cerr << "[" #x << " : " << x << "]\n" const int mod = (int)1e9 + 7; int main() { int n; scanf("%d", &n); i64 a[400000]; vector<int> cnt(65, 0); for (int i = 0; i < n; i++) { scanf("%lld"...
replace
34
38
34
40
0
p02838
C++
Time Limit Exceeded
#include <algorithm> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <string.h> #include <string> #include <vector> using namespace std; using ll = long long; using pll = pair<ll, ll>; using vl = vector<ll>; using vll = vector<vl>; using ...
#include <algorithm> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <string.h> #include <string> #include <vector> using namespace std; using ll = long long; using pll = pair<ll, ll>; using vl = vector<ll>; using vll = vector<vl>; using ...
replace
369
372
369
370
TLE
p02838
C++
Runtime Error
/// ببِسْمِ اللَّهِ الرَّحْمَنِ الرَّحِيم #include <bits/stdc++.h> #define off exit(0) #define cn continue #define rt return #define sc scanf #define pr printf #define pb push_back #define pf push_front #define p_f pop_front #define p_b pop_back #define ff first #defi...
/// ببِسْمِ اللَّهِ الرَّحْمَنِ الرَّحِيم #include <bits/stdc++.h> #define off exit(0) #define cn continue #define rt return #define sc scanf #define pr printf #define pb push_back #define pf push_front #define p_f pop_front #define p_b pop_back #define ff first #defi...
replace
18
19
18
19
0
p02839
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; using Edge = pair<int, int>; using Graph = vector<vector<Edge>>; #define REP(i, n) for (int i = 0; i < (n); ++i) #define SORT(v) sort((v).begin(), (v).end()) #define RSORT(v) sort((v).rbegin(), (v).rend()) const ll MOD = 1000000007; const ll nmax = 8; ...
#include <bits/stdc++.h> using namespace std; using ll = long long; using Edge = pair<int, int>; using Graph = vector<vector<Edge>>; #define REP(i, n) for (int i = 0; i < (n); ++i) #define SORT(v) sort((v).begin(), (v).end()) #define RSORT(v) sort((v).rbegin(), (v).rend()) const ll MOD = 1000000007; const ll nmax = 8; ...
replace
87
88
87
88
0
p02839
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define li long long int #define rep(i, to) for (li i = 0; i < ((li)(to)); i++) #define repp(i, start, to) for (li i = (li)(start); i < ((li)(to)); i++) #define MOD 1000000007 li h, w; li a[88][88]; li b[88][88]; bitset<80 * 160 * 2 + 1> dp[88][88]; int main(void) { l...
#include <bits/stdc++.h> using namespace std; #define li long long int #define rep(i, to) for (li i = 0; i < ((li)(to)); i++) #define repp(i, start, to) for (li i = (li)(start); i < ((li)(to)); i++) #define MOD 1000000007 li h, w; li a[88][88]; li b[88][88]; bitset<80 * 160 * 2 + 1> dp[88][88]; int main(void) { l...
replace
44
45
44
45
TLE
p02839
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using vi = vector<int>; using vvi = vector<vi>; using vll = vector<ll>; using vvll = vector<vll>; using vb = vector<bool>; using vs = vector<string>; typedef pair<int, int> P; #define bit(n) (1LL << (n)) // #define int lon...
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using vi = vector<int>; using vvi = vector<vi>; using vll = vector<ll>; using vvll = vector<vll>; using vb = vector<bool>; using vs = vector<string>; typedef pair<int, int> P; #define bit(n) (1LL << (n)) // #define int lon...
replace
55
56
55
56
0
p02839
C++
Memory Limit Exceeded
#include <bits/stdc++.h> #define int long long #define pb push_back #define ff first #define ss second #define all(x) (x).begin(), (x).end() #define sz(a) int((a).size()) #define endl '\n' using namespace std; typedef vector<int> vi; typedef pair<int, int> ii; typedef long long ll; const int maxn = 85; const int IN...
#include <bits/stdc++.h> #define int long long #define pb push_back #define ff first #define ss second #define all(x) (x).begin(), (x).end() #define sz(a) int((a).size()) #define endl '\n' using namespace std; typedef vector<int> vi; typedef pair<int, int> ii; typedef long long ll; const int maxn = 85; const int IN...
replace
20
21
20
21
MLE
p02839
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using ll = long long; using pii = pair<int, int>; using vi = vector<int>; using vl = vector<ll>; #define rep(i, n) for (ll i = 0; i < n; i++) #define all(i) i.begin(), i.end() template <class T, class U> bool cmax(T &a, U b) { if (a < b) { a = b; return true; } ...
#include <bits/stdc++.h> using namespace std; using ll = long long; using pii = pair<int, int>; using vi = vector<int>; using vl = vector<ll>; #define rep(i, n) for (ll i = 0; i < n; i++) #define all(i) i.begin(), i.end() template <class T, class U> bool cmax(T &a, U b) { if (a < b) { a = b; return true; } ...
replace
49
50
49
50
TLE
p02839
C++
Runtime Error
#include <bits/stdc++.h> #define FOR(i, n) for (int i = 0; i < n; i++) using namespace std; typedef long long ll; typedef pair<int, int> pii; const int K = 15000; const int N = 80; int h, w; int a[N][N], b[N][N]; bool dp[N][N][2 * K]; int put(int x) { return x + K; } int get(int x) { return x - K; } int main() {...
#include <bits/stdc++.h> #define FOR(i, n) for (int i = 0; i < n; i++) using namespace std; typedef long long ll; typedef pair<int, int> pii; const int K = 15000; const int N = 80; int h, w; int a[N][N], b[N][N]; bool dp[N][N][2 * K]; int put(int x) { return x + K; } int get(int x) { return x - K; } int main() {...
insert
32
32
32
34
-11
p02839
C++
Memory Limit Exceeded
// include //------------------------------------------ #include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <chrono> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #in...
// include //------------------------------------------ #include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <chrono> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #in...
replace
180
181
180
181
MLE
p02839
C++
Runtime Error
//***Little by little one travels far*** #include <bits/stdc++.h> using namespace std; #define mp make_pair #define mt make_tuple #define fi first #define se second #define pb push_back #define ll long long #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define rep(i, n) for (i = 0; i ...
//***Little by little one travels far*** #include <bits/stdc++.h> using namespace std; #define mp make_pair #define mt make_tuple #define fi first #define se second #define pb push_back #define ll long long #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define rep(i, n) for (i = 0; i ...
replace
49
50
49
50
0
p02839
C++
Runtime Error
// https://atcoder.jp/contests/abc147/tasks/abc147_e #include <bits/stdc++.h> using namespace std; #define REP(i, n) for (int i = 0; i < (int)(n); i++) #define FOR(i, b, e) for (int i = (b); i <= (int)(e); i++) #define DUMP(a, n) REP(_i, n) printf("%d%c", a[_i], _i + 1 == n ? '\n' : ' ') #define DUMP2D(a, n, m) ...
// https://atcoder.jp/contests/abc147/tasks/abc147_e #include <bits/stdc++.h> using namespace std; #define REP(i, n) for (int i = 0; i < (int)(n); i++) #define FOR(i, b, e) for (int i = (b); i <= (int)(e); i++) #define DUMP(a, n) REP(_i, n) printf("%d%c", a[_i], _i + 1 == n ? '\n' : ' ') #define DUMP2D(a, n, m) ...
replace
30
32
30
34
0
p02839
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, N) for (int i = 0; i < N; i++) #define rep2(i, N) for (int i = 1; i <= N; i++) using namespace std; long long INF = 1000000000000000000; long long mod = 1000000007; using namespace std; int a[85][85]; int b[85][85]; int main() { int h, w; cin >> h >> w; rep2(i, h) { ...
#include <bits/stdc++.h> #define rep(i, N) for (int i = 0; i < N; i++) #define rep2(i, N) for (int i = 1; i <= N; i++) using namespace std; long long INF = 1000000000000000000; long long mod = 1000000007; using namespace std; int a[85][85]; int b[85][85]; int main() { int h, w; cin >> h >> w; rep2(i, h) { ...
replace
24
25
24
25
0
p02839
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define modulo 1000000007 #define mod(mod_x) ((((long long)mod_x + modulo)) % modulo) #define Inf 10000000000000000 int main() { int H, W; cin >> H >> W; vector<vector<int>> A(H, vector<int>(W)); vector<vector<int>> B(H, vector<int>(W)); for (int i = 0; i < H;...
#include <bits/stdc++.h> using namespace std; #define modulo 1000000007 #define mod(mod_x) ((((long long)mod_x + modulo)) % modulo) #define Inf 10000000000000000 int main() { int H, W; cin >> H >> W; vector<vector<int>> A(H, vector<int>(W)); vector<vector<int>> B(H, vector<int>(W)); for (int i = 0; i < H;...
replace
32
63
32
41
TLE
p02839
C++
Memory Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, N) for (int i = 0; i < int(N); ++i) #define rep1(i, N) for (int i = 1; i < int(N); ++i) #define all(a) (a).begin(), (a).end() #define bit(k) (1LL << (k)) #define SUM(v) accumulate(all(v), 0LL) typedef pair<int, int> i_i; typedef pair<ll...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, N) for (int i = 0; i < int(N); ++i) #define rep1(i, N) for (int i = 1; i < int(N); ++i) #define all(a) (a).begin(), (a).end() #define bit(k) (1LL << (k)) #define SUM(v) accumulate(all(v), 0LL) typedef pair<int, int> i_i; typedef pair<ll...
replace
117
118
117
118
MLE
p02839
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int n, m; int a[101][101], b[101][101]; bitset<20001> f[81][81]; int main(int argc, char **argv) { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); cin >> n >> m; for (int i = 1; i <= n; i++) for (int j = 1; j <= m; j++) cin >> a[i][j]; for (i...
#include <bits/stdc++.h> using namespace std; int n, m; int a[101][101], b[101][101]; bitset<20001> f[101][101]; int main(int argc, char **argv) { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); cin >> n >> m; for (int i = 1; i <= n; i++) for (int j = 1; j <= m; j++) cin >> a[i][j]; for ...
replace
6
7
6
7
0
p02839
C++
Runtime Error
#pragma GCC optimize("O3") #include "bits/stdc++.h" using namespace std; using ll = long long int; #define debugos cout #define debug(v) \ { \ printf("L%d %s > ", __LINE__, #v...
#pragma GCC optimize("O3") #include "bits/stdc++.h" using namespace std; using ll = long long int; #define debugos cout #define debug(v) \ { \ printf("L%d %s > ", __LINE__, #v...
replace
224
225
224
225
0
p02839
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--) // [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
88
89
88
89
TLE
p02839
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; const int z = 80 * 80 * 80 + 2; bool dp[81][81][z]; int main() { ios_base::sync_with_stdio(0); cin.tie(NULL); int n, m; cin >> n >> m; vector<vector<int>> v(n, vector<int>(m)); for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) { cin >> v[...
#include <bits/stdc++.h> using namespace std; const int z = 80 * 80 * 2; bool dp[81][81][z]; int main() { ios_base::sync_with_stdio(0); cin.tie(NULL); int n, m; cin >> n >> m; vector<vector<int>> v(n, vector<int>(m)); for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) { cin >> v[i][j]...
replace
4
5
4
5
TLE
p02839
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define MOD (long long int)(1e9 + 7) #define ll long long int #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define reps(i, n) for (int i = 1; i <= (int)(n); i++) #define REP(i, n) for (int i = n - 1; i >= 0; i--) #define REPS(i, n) for (int i = n; i > 0; i--) #defin...
#include <bits/stdc++.h> using namespace std; #define MOD (long long int)(1e9 + 7) #define ll long long int #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define reps(i, n) for (int i = 1; i <= (int)(n); i++) #define REP(i, n) for (int i = n - 1; i >= 0; i--) #define REPS(i, n) for (int i = n; i > 0; i--) #defin...
replace
36
37
36
37
0
p02839
C++
Runtime Error
/** * Created by hiramekun at 20:44 on 2019-12-08. */ #include <bits/stdc++.h> using namespace std; using ll = long long; using vl = vector<ll>; using vvl = vector<vl>; using vb = vector<bool>; using P = pair<ll, ll>; template <typename T> using pq = priority_queue<T>; template <typename T> using minpq = priority_q...
/** * Created by hiramekun at 20:44 on 2019-12-08. */ #include <bits/stdc++.h> using namespace std; using ll = long long; using vl = vector<ll>; using vvl = vector<vl>; using vb = vector<bool>; using P = pair<ll, ll>; template <typename T> using pq = priority_queue<T>; template <typename T> using minpq = priority_q...
replace
67
69
67
69
0
p02839
C++
Runtime Error
// problem: "https://atcoder.jp/contests/abc147/tasks/abc147_e" #include <bits/stdc++.h> #define p 6401 using namespace std; int minD(vector<vector<int>> &A, vector<vector<int>> &B, int h, int w) { vector<vector<int>> D(h, vector<int>(w, 0)); int i, j; for (i = 0; i != h; i++) for (j = 0; j != w; j++) ...
// problem: "https://atcoder.jp/contests/abc147/tasks/abc147_e" #include <bits/stdc++.h> #define p 6401 * 2 using namespace std; int minD(vector<vector<int>> &A, vector<vector<int>> &B, int h, int w) { vector<vector<int>> D(h, vector<int>(w, 0)); int i, j; for (i = 0; i != h; i++) for (j = 0; j != w; j++)...
replace
4
5
4
5
0
p02839
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; // Define using ll = long long; using ull = unsigned long long; using ld = long double; template <class T> using pvector = vector<pair<T, T>>; template <class T> using rpriority_queue = priority_queue<T, vector<T>, greater<T>>; constexpr const ll dx[4] = {1, 0, -1, 0}; con...
#include <bits/stdc++.h> using namespace std; // Define using ll = long long; using ull = unsigned long long; using ld = long double; template <class T> using pvector = vector<pair<T, T>>; template <class T> using rpriority_queue = priority_queue<T, vector<T>, greater<T>>; constexpr const ll dx[4] = {1, 0, -1, 0}; con...
replace
130
131
130
131
-11
p02839
C++
Runtime Error
#include <bits/stdc++.h> #define N 85 #define maxSum (2 * N * N) using namespace std; const int del = maxSum + 105; int n, m; int a[N][N]; bool f[2][N][maxSum * 2 + 500]; int main() { cin >> n >> m; for (int i = 1; i <= n; ++i) for (int j = 1; j <= m; ++j) cin >> a[i][j]; for (int i = 1; i <= n; ++...
#include <bits/stdc++.h> #define N 85 #define maxSum (2 * N * N) using namespace std; const int del = maxSum + 105; int n, m; int a[N][N]; bool f[2][N][maxSum * 2 + 500]; int main() { cin >> n >> m; for (int i = 1; i <= n; ++i) for (int j = 1; j <= m; ++j) cin >> a[i][j]; for (int i = 1; i <= n; ++...
replace
34
35
34
35
0
p02839
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { cin.tie(0); ios::sync_with_stdio(false); int H, W; cin >> H >> W; vector<vector<int>> aij(H, vector<int>(W)); vector<vector<int>> bij(H, vector<int>(W)); for (int i = 0; i < H; i++) { for (int j = 0; j < W; j++) { ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { cin.tie(0); ios::sync_with_stdio(false); int H, W; cin >> H >> W; vector<vector<int>> aij(H, vector<int>(W)); vector<vector<int>> bij(H, vector<int>(W)); for (int i = 0; i < H; i++) { for (int j = 0; j < W; j++) { ...
replace
40
41
40
41
0
p02839
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 = 1e9; const int MAXC = 80; int main() { int h, w; cin >> h >> w; vector<vector<int>> a(h, vector<int>(w)); vector<vector<int>> b(h, vector<int>(w)); rep(i, h) { rep(j, w) cin >...
#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 = 1e9; const int MAXC = 80; int main() { int h, w; cin >> h >> w; vector<vector<int>> a(h, vector<int>(w)); vector<vector<int>> b(h, vector<int>(w)); rep(i, h) { rep(j, w) cin >...
replace
20
21
20
21
0
p02839
C++
Runtime Error
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> using namespace std; const int N = 83; const int M = 6405; #define ll long long int n, m, DP[M][N][N], b[2 * N][N], a[N][N]; void in() { scanf("%d%d", &n, &m); for (int i = 1; i <= n * 2; i++) for (int j = 1; j <=...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> using namespace std; const int N = 100; const int M = 8000; #define ll long long int n, m, DP[M][N][N], b[2 * N][N], a[N][N]; void in() { scanf("%d%d", &n, &m); for (int i = 1; i <= n * 2; i++) for (int j = 1; j <...
replace
8
10
8
10
-11
p02839
C++
Memory Limit Exceeded
#include <bits/stdc++.h> #define pt(sth) cout << sth << "\n" #define chmax(a, b) \ { \ if (a < b) \ a = b; ...
#include <bits/stdc++.h> #define pt(sth) cout << sth << "\n" #define chmax(a, b) \ { \ if (a < b) \ a = b; ...
replace
25
26
25
26
MLE
p02839
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const int MX = 13000, N = 80; bitset<2 * MX> pos[N][N]; int a[N][N], b[N][N]; int main() { ios::sync_with_stdio(0); cin.tie(0); int n, m; cin >> n >> m; for (int i = 1; i <= n; i++) for (int j = 1; j <= m; j++) cin >> a[i][j]; for (int i = 1; i <= ...
#include <bits/stdc++.h> using namespace std; const int MX = 13000, N = 85; bitset<2 * MX> pos[N][N]; int a[N][N], b[N][N]; int main() { ios::sync_with_stdio(0); cin.tie(0); int n, m; cin >> n >> m; for (int i = 1; i <= n; i++) for (int j = 1; j <= m; j++) cin >> a[i][j]; for (int i = 1; i <= ...
replace
3
4
3
4
0
p02839
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int h, w; cin >> h >> w; int a[h][w], b[h][w]; int diff[h][w]; for (int x = 0; x < h; x++) { for (int y = 0; y < w; y++) { cin >> a[x][y]; } } for (int x = 0; x < h; x++) { for (int y = 0; y < w; y++) { cin >> b[x][y]; ...
#include <bits/stdc++.h> using namespace std; int main() { int h, w; cin >> h >> w; int a[h][w], b[h][w]; int diff[h][w]; for (int x = 0; x < h; x++) { for (int y = 0; y < w; y++) { cin >> a[x][y]; } } for (int x = 0; x < h; x++) { for (int y = 0; y < w; y++) { cin >> b[x][y]; ...
replace
26
34
26
28
0
p02839
C++
Runtime Error
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> using namespace std; typedef uint64_t u64; typedef int64_t s64; ty...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> using namespace std; typedef uint64_t u64; typedef int64_t s64; ty...
replace
54
62
54
65
0
p02839
C++
Runtime Error
/** * Created by hiramekun at 20:44 on 2019-12-08. */ #include <bits/stdc++.h> #pragma optimize("", off) using namespace std; using ll = long long; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) int main() { ll h, w; cin >> h >> w; vector<bool> v; v[0]; vector<int> v2; v2[0]; int a[h][w], b[h][w]; ...
/** * Created by hiramekun at 20:44 on 2019-12-08. */ #include <bits/stdc++.h> #pragma optimize("", off) using namespace std; using ll = long long; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) int main() { ll h, w; cin >> h >> w; vector<bool> v; v[0]; vector<int> v2; v2[0]; int a[h][w], b[h][w]; ...
replace
32
34
32
33
-6
8e2bdc06-1693-4b1a-92cf-025663b1b3b6.out: /home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02839/C++/s516123002.cpp:34: int main(): Assertion `l + b[i + 1][j] - a[i + 1][j] >= 0' failed.
p02839
C++
Runtime Error
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <iostream> #include <string> #define ll int using namespace std; const ll l = 1000; const ll r = 19000; ll f[9][9][20000], a[90][90]; ll n, m, i, j, k, t, x, y, ans = 1e9; ll read() { ll f = 0, c = ...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <iostream> #include <string> #define ll int using namespace std; const ll l = 1000; const ll r = 19000; ll f[90][90][20000], a[90][90]; ll n, m, i, j, k, t, x, y, ans = 1e9; ll read() { ll f = 0, c ...
replace
12
13
12
13
0
p02839
C++
Memory Limit Exceeded
#include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <complex> #include <cstdint> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <vector> #d...
#include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <complex> #include <cstdint> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <vector> #d...
replace
51
52
51
52
MLE
p02839
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using ll = long long; using namespace std; int h, w; int ma[80][80], mb[80][80], ch[80][80]; bool ans[80][80][16000]; int main() { cin >> h >> w; rep(i, h) rep(j, w) cin >> ma[i][j]; rep(i, h) rep(j, w) cin >> mb[i][j]; rep(i, h) rep(j, ...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using ll = long long; using namespace std; int h, w; int ma[80][80], mb[80][80], ch[80][80]; bool ans[80][80][16000]; int main() { cin >> h >> w; rep(i, h) rep(j, w) cin >> ma[i][j]; rep(i, h) rep(j, w) cin >> mb[i][j]; rep(i, h) rep(j, ...
replace
17
18
17
18
TLE
p02839
C++
Memory Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> v1; typedef vector<v1> v2; typedef vector<vector<ll>> graph; const ll INF = 1ll << 50; const ll mod = 1000000007; ll h, w; ll a[81][81]; ll b[81][81]; ll offset = 81 * 160; ll dp[81][81][81 * 160 * 2]; ll ans = INF; int main() {...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> v1; typedef vector<v1> v2; typedef vector<vector<ll>> graph; const ll INF = 1ll << 50; const ll mod = 1000000007; ll h, w; ll a[81][81]; ll b[81][81]; ll offset = 81 * 160; char dp[81][81][81 * 160 * 2]; ll ans = INF; int main()...
replace
16
17
16
17
MLE
p02839
C++
Memory Limit Exceeded
#include <bits/stdc++.h> #define endl enjoy_codeforces using lint = long long; int main() { std::cin.tie(nullptr); std::ios_base::sync_with_stdio(false); lint h, w; std::cin >> h >> w; std::vector<std::vector<lint>> a(h, std::vector<lint>(w)); for (lint i = 0; i < h; i++) { for (lint j = 0; j < w; j++) ...
#include <bits/stdc++.h> #define endl enjoy_codeforces using lint = long long; int main() { std::cin.tie(nullptr); std::ios_base::sync_with_stdio(false); lint h, w; std::cin >> h >> w; std::vector<std::vector<lint>> a(h, std::vector<lint>(w)); for (lint i = 0; i < h; i++) { for (lint j = 0; j < w; j++) ...
replace
21
22
21
22
MLE
p02839
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int a[85][85], b[85][85]; bool dp[85][85][12800 + 12800 + 1]; int main() { int h, w; scanf("%d%d", &h, &w); int mid = 128000; for (int i = 1; i <= h; i++) for (int j = 1; j <= w; j++) scanf("%d", &a[i][j]); for (int i = 1; i <= h; i++) for (int j = 1...
#include <bits/stdc++.h> using namespace std; int a[85][85], b[85][85]; bool dp[85][85][12800 + 12800 + 1]; int main() { int h, w; scanf("%d%d", &h, &w); int mid = 12800; for (int i = 1; i <= h; i++) for (int j = 1; j <= w; j++) scanf("%d", &a[i][j]); for (int i = 1; i <= h; i++) for (int j = 1;...
replace
7
8
7
8
TLE
p02839
C++
Runtime Error
#include <bits/stdc++.h> const int N = 67; const int M = 6400; int n, m, A[N][N], B[N][N]; std::bitset<M * 2 + 1> dp[N][N]; int main() { scanf("%d%d", &n, &m); for (int i = 1; i <= n; i++) for (int j = 1; j <= m; j++) scanf("%d", A[i] + j); for (int i = 1; i <= n; i++) for (int j = 1; j <= m; j++)...
#include <bits/stdc++.h> const int N = 88; const int M = 6400; int n, m, A[N][N], B[N][N]; std::bitset<M * 2 + 1> dp[N][N]; int main() { scanf("%d%d", &n, &m); for (int i = 1; i <= n; i++) for (int j = 1; j <= m; j++) scanf("%d", A[i] + j); for (int i = 1; i <= n; i++) for (int j = 1; j <= m; j++)...
replace
2
3
2
3
0
p02839
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, j, n) for (int i = j; i < n; i++) #define all(x) (x).begin(), (x).end() #define pii pair<int, int> #define pll pair<ll, ll> #define vc vector #define a first #define b second #define pb pusu_back #define INF (1000000000) #define MOD (100...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, j, n) for (int i = j; i < n; i++) #define all(x) (x).begin(), (x).end() #define pii pair<int, int> #define pll pair<ll, ll> #define vc vector #define a first #define b second #define pb pusu_back #define INF (1000000000) #define MOD (100...
replace
200
201
200
201
TLE
p02839
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using ll = long long; const int ac = 83, mod = 1e9; bool A[ac][ac][ac * ac * 2]; ll B[ac][ac]; int main() { ios_base::sync_with_stdio(0); cin.tie(0); int n, m; cin >> n >> m; for (int i = 1; i <= n; i++) for (int j = 1; j <= m; j++) cin >> B[i][j]; f...
#include <bits/stdc++.h> using namespace std; using ll = long long; const int ac = 83, mod = 1e9; bool A[ac][ac][ac * ac * 2]; ll B[ac][ac]; int main() { ios_base::sync_with_stdio(0); cin.tie(0); int n, m; cin >> n >> m; for (int i = 1; i <= n; i++) for (int j = 1; j <= m; j++) cin >> B[i][j]; f...
delete
27
28
27
27
TLE
p02839
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; using pii = pair<int, int>; #define INF LONG_MAX #define MOD 1000000007 #define rng(a) a.begin(), a.end() #define rrng(a) a.end(), a.begin() int main() { ios::sync_with_stdio(false); cin.tie(0); int H, W; cin...
#include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; using pii = pair<int, int>; #define INF LONG_MAX #define MOD 1000000007 #define rng(a) a.begin(), a.end() #define rrng(a) a.end(), a.begin() int main() { ios::sync_with_stdio(false); cin.tie(0); int H, W; cin...
replace
31
33
31
32
-6
free(): invalid pointer
p02839
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 = 1 << 30; const ll LLINF = 1LL << 62; int mod = 1000000007; int main(void) { ios::sync_with_stdio(false); cin.tie(nullptr); int base = 80 * 80; int H, W; cin >> H >> W; pair<...
#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 = 1 << 30; const ll LLINF = 1LL << 62; int mod = 1000000007; int main(void) { ios::sync_with_stdio(false); cin.tie(nullptr); int base = 80 * 160; int H, W; cin >> H >> W; pair...
replace
15
16
15
16
0
p02839
C++
Runtime Error
// pragma // #pragma GCC optimize("Ofast") // #pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> #define YOU using #define DONT namespace #define SAY std YOU DONT SAY; typedef long long ll; typedef unsigned long long ull; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef pair<ll, int> pli; ty...
// pragma // #pragma GCC optimize("Ofast") // #pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> #define YOU using #define DONT namespace #define SAY std YOU DONT SAY; typedef long long ll; typedef unsigned long long ull; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef pair<ll, int> pli; ty...
replace
73
74
73
74
0
p02839
C++
Memory Limit Exceeded
#include <bits/stdc++.h> #define rep(i, a, b) for (int i = (a); i <= (b); i++) #define rng(a) a.begin(), a.end() #define ina(n, a) \ cin >> n; \ for (int i = 1; i <= n; i++) ...
#include <bits/stdc++.h> #define rep(i, a, b) for (int i = (a); i <= (b); i++) #define rng(a) a.begin(), a.end() #define ina(n, a) \ cin >> n; \ for (int i = 1; i <= n; i++) ...
replace
28
29
28
29
MLE
p02839
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); ++i) typedef long long ll; const long long INF = 1e17; int main() { ll H, W; cin >> H >> W; vector<vector<ll>> a(H, vector<ll>(W)); vector<vector<ll>> b(H, vector<ll>(W)); vector<vector<ll>> c(H, vector<ll>(W)); rep(i,...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); ++i) typedef long long ll; const long long INF = 1e17; int main() { ll H, W; cin >> H >> W; vector<vector<ll>> a(H, vector<ll>(W)); vector<vector<ll>> b(H, vector<ll>(W)); vector<vector<ll>> c(H, vector<ll>(W)); rep(i,...
replace
24
25
24
25
-11
p02839
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define x first #define y second #define fastio ios_base::sync_with_stdio(0), cin.tie(0) using namespace std; typedef pair<int, int> pii; typedef long long ll; typedef pair<ll, ll> pll; int n, m; int a[80][80]; int b[80][80]; bool cache[80][80][12805]; const int dx[] = {1, 0}; const int dy[]...
#include <bits/stdc++.h> #define x first #define y second #define fastio ios_base::sync_with_stdio(0), cin.tie(0) using namespace std; typedef pair<int, int> pii; typedef long long ll; typedef pair<ll, ll> pll; int n, m; int a[80][80]; int b[80][80]; bool cache[80][80][12805]; const int dx[] = {1, 0}; const int dy[]...
replace
18
19
18
21
TLE
p02839
C++
Memory Limit Exceeded
// #undef _DEBUG // #pragma GCC optimize("Ofast") #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 #define ll long long auto start_time = system_clock::now(); #define debugName(VariableName) #V...
// #undef _DEBUG // #pragma GCC optimize("Ofast") #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 #define ll long long auto start_time = system_clock::now(); #define debugName(VariableName) #V...
replace
3,924
3,925
3,924
3,925
MLE
p02839
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define ff first #define ss second #define mp make_pair #define pp pair<ll, ll> #define pq_min priority_queue<ll, vector<ll>, greater<ll>> #define pq_max priority_queue<ll> #define forx(i, a, b) for (ll i = 0; i < a; i++) #define ld...
#include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define ff first #define ss second #define mp make_pair #define pp pair<ll, ll> #define pq_min priority_queue<ll, vector<ll>, greater<ll>> #define pq_max priority_queue<ll> #define forx(i, a, b) for (ll i = 0; i < a; i++) #define ld...
replace
47
48
47
48
0
p02839
Python
Runtime Error
H, W = map(int, input().split()) M = (H + W) * 80 A = [tuple(map(int, input().split())) for _ in range(H)] B = [tuple(map(int, input().split())) for _ in range(H)] dp = [[0] * W for _ in range(H)] dp[0][0] = 1 << (M - abs(A[0][0] - B[0][0])) for h in range(H): for w, (a, b) in enumerate(zip(A[h], B[h])): ...
H, W = map(int, input().split()) M = (H + W) * 80 A = [tuple(map(int, input().split())) for _ in range(H)] B = [tuple(map(int, input().split())) for _ in range(H)] dp = [[0] * W for _ in range(H)] dp[0][0] = 1 << (M - abs(A[0][0] - B[0][0])) for h in range(H): for w, (a, b) in enumerate(zip(A[h], B[h])): ...
delete
12
14
12
12
0
p02839
Python
Time Limit Exceeded
H, W = map(int, input().split()) A = [list(map(int, input().split())) for _ in range(H)] B = [list(map(int, input().split())) for _ in range(H)] Z = sum(sum(a) for a in A) + sum(sum(b) for b in B) + 10 dp = [[0] * (W + 1) for _ in range(H + 1)] dp[0][0] = 1 << Z for h in range(H): for w in range(W): d = ...
H, W = map(int, input().split()) A = [list(map(int, input().split())) for _ in range(H)] B = [list(map(int, input().split())) for _ in range(H)] Z = 1000 dp = [[0] * (W + 1) for _ in range(H + 1)] dp[0][0] = 1 << Z for h in range(H): for w in range(W): d = dp[h][w] k = abs(A[h][w] - B[h][w]) ...
replace
4
5
4
5
TLE
p02839
Python
Time Limit Exceeded
def main(): B_MAX = (80 + 80 - 1) * 80 H, W = list(map(int, input().split(" "))) A = [list(map(int, input().split(" "))) for _ in range(H)] B = [list(map(int, input().split(" "))) for _ in range(H)] dp = [[[0 for _ in range(B_MAX + 1)] for _ in range(W)] for _ in range(H)] dp[0][0][abs(A[0][0] -...
def main(): B_MAX = (80 + 80 - 1) * 80 // 2 H, W = list(map(int, input().split(" "))) A = [list(map(int, input().split(" "))) for _ in range(H)] B = [list(map(int, input().split(" "))) for _ in range(H)] dp = [[[0 for _ in range(B_MAX + 1)] for _ in range(W)] for _ in range(H)] dp[0][0][abs(A[0]...
replace
1
2
1
2
TLE
p02839
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> #include <string> #include <vector> // #include<cmath> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) int abs(int x) { if (x > 0) return x; else return -x; } int dp[80][80][12801]; int main() { int h, w; cin >> h >> w; // h = 80; // w ...
#include <algorithm> #include <iostream> #include <string> #include <vector> // #include<cmath> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) int abs(int x) { if (x > 0) return x; else return -x; } int dp[80][80][12801]; int main() { int h, w; cin >> h >> w; // h = 80; // w ...
replace
28
29
28
29
TLE
p02839
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const int MAX = 1280; int main() { int H, W; cin >> H >> W; vector<vector<int>> A(H, vector<int>(W)); auto B = A; for (int i = 0; i < H; i++) { for (int j = 0; j < W; j++) { cin >> A[i][j]; } } for (int i = 0; i < H; i++) { for (int j = 0; ...
#include <bits/stdc++.h> using namespace std; const int MAX = 12800; int main() { int H, W; cin >> H >> W; vector<vector<int>> A(H, vector<int>(W)); auto B = A; for (int i = 0; i < H; i++) { for (int j = 0; j < W; j++) { cin >> A[i][j]; } } for (int i = 0; i < H; i++) { for (int j = 0;...
replace
3
4
3
4
0
p02839
C++
Runtime Error
// https://atcoder.jp/contests/abc147/tasks/abc147_e #include "algorithm" #include "bitset" #include "cmath" #include "functional" #include "iomanip" #include "iostream" #include "map" #include "numeric" #include "queue" #include "set" #include "string" #include "vector" #define rep(i, to) for (ll i = 0; i < (to); ++i...
// https://atcoder.jp/contests/abc147/tasks/abc147_e #include "algorithm" #include "bitset" #include "cmath" #include "functional" #include "iomanip" #include "iostream" #include "map" #include "numeric" #include "queue" #include "set" #include "string" #include "vector" #define rep(i, to) for (ll i = 0; i < (to); ++i...
replace
101
103
101
102
0
p02839
C++
Runtime Error
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> using namespace std; typedef uint64_t u64; typedef int64_t s64; ty...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> using namespace std; typedef uint64_t u64; typedef int64_t s64; ty...
replace
57
58
57
58
-6
munmap_chunk(): invalid pointer
p02839
C++
Runtime Error
#include "bits/stdc++.h" using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; const int INF = 1e9; const ll LINF = 1e18; inline ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; } inline ll lcm(ll a, ll b) { return a / gcd(a, b) * b; } template <class S, class T> ostream &op...
#include "bits/stdc++.h" using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; const int INF = 1e9; const ll LINF = 1e18; inline ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; } inline ll lcm(ll a, ll b) { return a / gcd(a, b) * b; } template <class S, class T> ostream &op...
replace
76
77
76
77
0
p02839
C++
Runtime Error
#include <algorithm> #include <cmath> #include <deque> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> #define nmax_def 15000 #define nmax_def_2 7500 #define Inf 2000000000 #define rep(i, n) for (int(i) = 0; (i) < (n); (i)++) using namespace s...
#include <algorithm> #include <cmath> #include <deque> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> #define nmax_def 30000 #define nmax_def_2 15000 #define Inf 2000000000 #define rep(i, n) for (int(i) = 0; (i) < (n); (i)++) using namespace ...
replace
10
12
10
12
0
p02839
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)n; i++) #define all(c) (c).begin(), (c).end() #define pb push_back #define dbg(...) \ do { \ cerr << __LINE__ <<...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)n; i++) #define all(c) (c).begin(), (c).end() #define pb push_back #define dbg(...) \ do { \ cerr << __LINE__ <<...
replace
74
75
74
75
0