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
p02726
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int N, X, Y; cin >> N >> X >> Y; vector<int> ans(N, 0); for (int k = 1; k < N; k++) { for (int i = 1; i < N + 1; i++) { for (int j = 1; j < N + 1; j++) { if (k == min(abs(j - i), abs(X - i) + 1 + abs(j - Y)) && i < j) { ans....
#include <bits/stdc++.h> using namespace std; int main() { int N, X, Y; cin >> N >> X >> Y; vector<int> ans(N, 0); for (int i = 1; i < N + 1; i++) { for (int j = 1; j < N + 1; j++) { if (i < j) { int k = min(abs(j - i), abs(X - i) + 1 + abs(j - Y)); ans.at(k)++; } } } fo...
replace
7
13
7
12
TLE
p02726
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; const int MAX_N = 2000; int n, x, y; void solve() { int d[n][n]; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { if (i <= j) { d[i][j] = min(abs(i - j), abs(i - (x - 1)) + abs(j - (y - 1)) + 1); } else { d[i][j] = d[j][i]; ...
#include <bits/stdc++.h> using namespace std; const int MAX_N = 2000; int n, x, y; void solve() { int d[n][n]; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { if (i <= j) { d[i][j] = min(abs(i - j), abs(i - (x - 1)) + abs(j - (y - 1)) + 1); } else { d[i][j] = d[j][i]; ...
replace
21
27
21
25
TLE
p02726
C++
Time Limit Exceeded
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return 1; } return 0; } #define rep(i, n) for (int i = 0; i...
// #define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return 1; } return 0; } #define rep(i, n) for (int i = 0...
replace
0
1
0
1
TLE
p02726
C++
Runtime Error
#include "bits/stdc++.h" using namespace std; #define fi first #define se second #define pb push_back #define int long long #define all(x) (x).begin(), (x).end() using LL = long long; using LD = long double; using pii = pair<int, int>; using vii = vector<pii>; const int INF = 1e18; const int MOD = 1e9 + 7; const int...
#include "bits/stdc++.h" using namespace std; #define fi first #define se second #define pb push_back #define int long long #define all(x) (x).begin(), (x).end() using LL = long long; using LD = long double; using pii = pair<int, int>; using vii = vector<pii>; const int INF = 1e18; const int MOD = 1e9 + 7; const int...
replace
16
17
16
17
0
p02726
C++
Runtime Error
/* In the name of ALLAH Author : Raashid Anwar */ #include <bits/stdc++.h> using namespace std; #define int int64_t const int M = 1000000007; int ans[1001]; int vis[1001]; vector<int> adj[1001]; void solve(int i) { memset(vis, 0, sizeof(vis)); priority_queue<pair<int, int>, vector<pair<int, int>>, ...
/* In the name of ALLAH Author : Raashid Anwar */ #include <bits/stdc++.h> using namespace std; #define int int64_t const int M = 1000000007; int ans[2001]; int vis[2001]; vector<int> adj[2001]; void solve(int i) { memset(vis, 0, sizeof(vis)); priority_queue<pair<int, int>, vector<pair<int, int>>, ...
replace
11
14
11
14
0
p02726
C++
Time Limit Exceeded
#include <bits/stdc++.h> #include <iostream> using namespace std; typedef long long ll; #define rep(i, n) for (int i = 0; i < n; i++) /* 大文字を小文字に変換 */ char tolower(char c) { return (c + 0x20); } /* 小文字を大文字に変換 */ char toupr(char c) { return (c - 0x20); } // if('A'<=s[i] && s[i]<='Z') s[i] += 'a'-'A'; /* string s = "a...
#include <bits/stdc++.h> #include <iostream> using namespace std; typedef long long ll; #define rep(i, n) for (int i = 0; i < n; i++) /* 大文字を小文字に変換 */ char tolower(char c) { return (c + 0x20); } /* 小文字を大文字に変換 */ char toupr(char c) { return (c - 0x20); } // if('A'<=s[i] && s[i]<='Z') s[i] += 'a'-'A'; /* string s = "a...
replace
32
46
32
35
TLE
p02726
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define mp make_pair #define pb push_back #define first fi #define second se #define MOD 1000000007 #define MAXN 1003 #define endl "\n" #define readln(x) getline(cin, x); typedef long long ll; typedef long double ld; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typ...
#include <bits/stdc++.h> using namespace std; #define mp make_pair #define pb push_back #define first fi #define second se #define MOD 1000000007 #define MAXN 2003 #define endl "\n" #define readln(x) getline(cin, x); typedef long long ll; typedef long double ld; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typ...
replace
7
8
7
8
0
p02726
C++
Runtime Error
#include <bits/stdc++.h> #pragma gcc optimize("ofast") using namespace std; #define ll \ long long // data types used often, but you don't want to type them time by // time #define ull unsigned long long #define ui unsigned int #define m...
#include <bits/stdc++.h> #pragma gcc optimize("ofast") using namespace std; #define ll \ long long // data types used often, but you don't want to type them time by // time #define ull unsigned long long #define ui unsigned int #define m...
replace
80
81
80
81
0
p02726
C++
Runtime Error
// minamoto #include <bits/stdc++.h> #define R register #define fp(i, a, b) for (R int i = (a), I = (b) + 1; i < I; ++i) #define fd(i, a, b) for (R int i = (a), I = (b)-1; i > I; --i) #define go(u) for (int i = head[u], v = e[i].v; i; i = e[i].nx, v = e[i].v) template <class T> inline bool cmax(T &a, const T &b) { re...
// minamoto #include <bits/stdc++.h> #define R register #define fp(i, a, b) for (R int i = (a), I = (b) + 1; i < I; ++i) #define fd(i, a, b) for (R int i = (a), I = (b)-1; i > I; --i) #define go(u) for (int i = head[u], v = e[i].v; i; i = e[i].nx, v = e[i].v) template <class T> inline bool cmax(T &a, const T &b) { re...
replace
25
26
25
28
0
p02726
C++
Runtime Error
#include <algorithm> #include <array> #include <cfenv> #include <cmath> #include <deque> #include <forward_list> #include <fstream> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <iterator> #include <list> #include <map> #include <numeric> #include <ostream> #include...
#include <algorithm> #include <array> #include <cfenv> #include <cmath> #include <deque> #include <forward_list> #include <fstream> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <iterator> #include <list> #include <map> #include <numeric> #include <ostream> #include...
replace
34
35
34
35
0
p02726
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int a[1111]; int main() { int n, x, y; cin >> n >> x >> y; for (int i = 1; i <= n; i++) for (int j = i; j <= n; j++) a[min({abs(i - j), abs(i - x) + 1 + abs(y - j), abs(i - y) + 1 + abs(x - j)})]++; for (int i = 1; i < n; i++) cout << a[i...
#include <bits/stdc++.h> using namespace std; int a[2222]; int main() { int n, x, y; cin >> n >> x >> y; for (int i = 1; i <= n; i++) for (int j = i; j <= n; j++) a[min({abs(i - j), abs(i - x) + 1 + abs(y - j), abs(i - y) + 1 + abs(x - j)})]++; for (int i = 1; i < n; i++) cout << a[i...
replace
3
4
3
4
0
p02726
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long LL; #define fi first #define se second #define pb push_back #define forn(i, n) for (int i = 0; i < (n); i++) #define for1(i, n) for (int i = 1; i <= n; i++) #define forr(i, n) for (int i = n; i >= 0; i--) #define all(x) x.begin(), x.end() const int MAXN = ...
#include <bits/stdc++.h> using namespace std; typedef long long LL; #define fi first #define se second #define pb push_back #define forn(i, n) for (int i = 0; i < (n); i++) #define for1(i, n) for (int i = 1; i <= n; i++) #define forr(i, n) for (int i = n; i >= 0; i--) #define all(x) x.begin(), x.end() const int MAXN = ...
replace
28
29
28
29
-6
munmap_chunk(): invalid pointer
p02726
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define all(x) (x).begin(), (x).end() using ll = long long; int main() { ll n, x, y, ans, i, j; cin >> n >> x >> y; vector<ll> k(n - 1); for (i = 0; i < n - 1; i++) { for (j = 0; j < i; j++) { k[min({i - j, abs(x - i) + abs(y - j), abs(x - j) + abs(y - i)...
#include <bits/stdc++.h> using namespace std; #define all(x) (x).begin(), (x).end() using ll = long long; int main() { ll n, x, y, ans, i, j; cin >> n >> x >> y; vector<ll> k(n - 1, 0); for (i = 2; i <= n; i++) { for (j = 1; j < i; j++) { k[min({i - j, abs(x - i) + abs(y - j) + 1, abs(x - j) + abs(y ...
replace
8
12
8
14
0
p02726
C++
Runtime Error
#include <iostream> #include <vector> using namespace std; int n, x, y; void solve() { vector<int> cnt(n + 1); for (int i = 1; i < n; i++) { for (int j = 2; j <= n; j++) { int dist = min(j - i, min(abs(x - i) + abs(y - j), abs(x - j) + abs(y - i)) + 1); cnt[dist]++; } } for (int...
#include <iostream> #include <vector> using namespace std; int n, x, y; void solve() { vector<int> cnt(n + 1); for (int i = 1; i < n; i++) { for (int j = i + 1; j <= n; j++) { int dist = min(j - i, min(abs(x - i) + abs(y - j), abs(x - j) + abs(y - i)) + 1); cnt[dist]++; } } for ...
replace
10
11
10
11
-6
munmap_chunk(): invalid pointer
p02726
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define F first #define S second #define PB push_back #define MP make_pair #define REP(i, a, b) for (int i = a; i < b; i++) typedef long long ll; #define int ll typedef vector<int> vi; typedef vector<long long> vl; typedef pair<int, int> pi; #define trace(x) cout << #x << "...
#include <bits/stdc++.h> using namespace std; #define F first #define S second #define PB push_back #define MP make_pair #define REP(i, a, b) for (int i = a; i < b; i++) typedef long long ll; #define int ll typedef vector<int> vi; typedef vector<long long> vl; typedef pair<int, int> pi; #define trace(x) cout << #x << "...
replace
58
59
58
59
0
p02726
C++
Runtime Error
#include <algorithm> #include <iostream> using namespace std; const int N = 1e3 + 5; int e[N][N], ans[N]; int main() { int n, x, y; cin >> n >> x >> y; for (int i = 1; i <= n; ++i) { for (int j = i + 1; j <= n; ++j) { e[j][i] = e[i][j] = j - i; } } for (int i = 1; i <= n; ++i) { for (int...
#include <algorithm> #include <iostream> using namespace std; const int N = 2e3 + 5; int e[N][N], ans[N]; int main() { int n, x, y; cin >> n >> x >> y; for (int i = 1; i <= n; ++i) { for (int j = i + 1; j <= n; ++j) { e[j][i] = e[i][j] = j - i; } } for (int i = 1; i <= n; ++i) { for (int...
replace
5
6
5
6
0
p02726
C++
Runtime Error
#include <bits/stdc++.h> #define pii pair<int, int> #define ll long long #define cl(x, y) memset(x, y, sizeof(x)) #define ct cerr << "Time elapsed:" << 1.0 * clock() / CLOCKS_PER_SEC << "s.\n"; const int N = 1e3 + 10; const int mod = 1e9 + 7; const int inf = 0x3f3f3f3f; using namespace std; int a[N]; int main() { ios...
#include <bits/stdc++.h> #define pii pair<int, int> #define ll long long #define cl(x, y) memset(x, y, sizeof(x)) #define ct cerr << "Time elapsed:" << 1.0 * clock() / CLOCKS_PER_SEC << "s.\n"; const int N = 2e3 + 10; const int mod = 1e9 + 7; const int inf = 0x3f3f3f3f; using namespace std; int a[N]; int main() { ios...
replace
5
6
5
6
0
p02726
C++
Time Limit Exceeded
#include "bits/stdc++.h" using namespace std; const int MAX = 700000; const int MOD = 1000000007; long long fac[MAX], finv[MAX], inv[MAX]; // テーブルを作る前処理 void COMinit() { fac[0] = fac[1] = 1; finv[0] = finv[1] = 1; inv[1] = 1; for (int i = 2; i < MAX; i++) { fac[i] = fac[i - 1] * i % MOD; inv[i] = MOD ...
#include "bits/stdc++.h" using namespace std; const int MAX = 700000; const int MOD = 1000000007; long long fac[MAX], finv[MAX], inv[MAX]; // テーブルを作る前処理 void COMinit() { fac[0] = fac[1] = 1; finv[0] = finv[1] = 1; inv[1] = 1; for (int i = 2; i < MAX; i++) { fac[i] = fac[i - 1] * i % MOD; inv[i] = MOD ...
replace
121
126
121
125
TLE
p02726
C++
Runtime Error
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; #define x_ real() #define y_ imag() #define cross(a, b) (conj(a) * (b)).imag() #define dot(a, b) (conj(a) * (b)).real() #define PI acos(-1) #define F first #define S second #define fastIO ios_base...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; #define x_ real() #define y_ imag() #define cross(a, b) (conj(a) * (b)).imag() #define dot(a, b) (conj(a) * (b)).real() #define PI acos(-1) #define F first #define S second #define fastIO ios_base...
replace
29
32
29
32
0
p02726
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) #define ALL(a) (a).begin(), (a).end() #define RALL(a) (a).rbegin(), (a).rend() using ll = long long; const int INF = 1001001001; int main() { int n, x, y; cin >> n >> x >> y; --x, --y; vector<int> ans(n); rep(sv, n...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) #define ALL(a) (a).begin(), (a).end() #define RALL(a) (a).rbegin(), (a).rend() using ll = long long; const int INF = 1001001001; int main() { int n, x, y; cin >> n >> x >> y; --x, --y; vector<int> ans(n); rep(sv, n...
replace
30
31
30
31
-11
p02726
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; long long p[10004]; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); long long n, x, y, k; cin >> n >> x >> y; for (long long i = 1; i < n; ++i) { for (long long j = 2; j <= n; ++j) { k = min(j - i, abs(x - i) + 1 + abs(y - j)); ...
#include <bits/stdc++.h> using namespace std; long long p[10004]; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); long long n, x, y, k; cin >> n >> x >> y; for (long long i = 1; i < n; ++i) { for (long long j = i + 1; j <= n; ++j) { k = min(j - i, abs(x - i) + 1 + abs(y - j...
replace
14
15
14
15
0
p02726
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define ll long long using namespace std; ll arr[2020][2020], n, x, y, cnt[2020]; int main() { memset(arr, 1, sizeof(arr)); cin >> n >> x >> y; for (int i = 1; i <= n; ++i) { for (int j = i; j <= n; ++j) arr[i][j] = arr[j][i] = j - i; } arr[x][y] = 1; for (int k = 1; k <= ...
#include <bits/stdc++.h> #define ll long long using namespace std; ll arr[2020][2020], n, x, y, cnt[2020]; int main() { memset(arr, 1, sizeof(arr)); cin >> n >> x >> y; for (int i = 1; i <= n; ++i) { for (int j = i; j <= n; ++j) arr[i][j] = arr[j][i] = j - i; } arr[x][y] = 1; for (int i = 1; i <= ...
replace
12
17
12
18
TLE
p02726
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const int maxn = 1e3 + 10; typedef long long ll; int x, n, y, cnt[maxn]; int dis(int a, int b) { return min(b - a, abs(a - x) + abs(b - y) + 1); } int main() { scanf("%d%d%d", &n, &x, &y); if (x > y) swap(x, y); for (int i = 1; i <= n; i++) { for (int j = i + ...
#include <bits/stdc++.h> using namespace std; const int maxn = 1e5 + 10; typedef long long ll; int x, n, y, cnt[maxn]; int dis(int a, int b) { return min(b - a, abs(a - x) + abs(b - y) + 1); } int main() { scanf("%d%d%d", &n, &x, &y); if (x > y) swap(x, y); for (int i = 1; i <= n; i++) { for (int j = i + ...
replace
2
3
2
3
0
p02726
C++
Runtime Error
/*** ** A S M Atikur Rahman ** Update: 26-03-2020 ***/ // #include <bits/stdc++.h> #include <algorithm> #include <bitset> #include <cassert> #include <cstring> #include <iomanip> ///setprecision #include <iostream> #include <iterator> #include <limits.h> #include <map> #include <math.h> #include <queue> #includ...
/*** ** A S M Atikur Rahman ** Update: 26-03-2020 ***/ // #include <bits/stdc++.h> #include <algorithm> #include <bitset> #include <cassert> #include <cstring> #include <iomanip> ///setprecision #include <iostream> #include <iterator> #include <limits.h> #include <map> #include <math.h> #include <queue> #includ...
replace
81
82
81
82
0
p02726
C++
Runtime Error
#include <bits/stdc++.h> #define int long long #define endl '\n' #define IOS \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0...
#include <bits/stdc++.h> #define int long long #define endl '\n' #define IOS \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0...
replace
54
55
54
55
0
p02726
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int x, n, y; string s; cin >> n >> x >> y; // map<int, int> cnt; int cnt[1000] = {}; for (int i = 1; i < n; i++) { int dis = 0; for (int j = i + 1; j <= n; j++) { dis = min(j - i, abs(x - i) + 1 + abs(y - j)); cnt[dis]++; ...
#include <bits/stdc++.h> using namespace std; int main() { int x, n, y; string s; cin >> n >> x >> y; // map<int, int> cnt; int cnt[2000] = {}; for (int i = 1; i < n; i++) { int dis = 0; for (int j = i + 1; j <= n; j++) { dis = min(j - i, abs(x - i) + 1 + abs(y - j)); cnt[dis]++; ...
replace
8
9
8
9
0
p02726
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define pb push_back #define mp make_pair #define all(x) (x).begin(), (x).end() #define endl '\n' typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; const int mod = 1e9 + 7; // const int mod=998244353; const double...
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define pb push_back #define mp make_pair #define all(x) (x).begin(), (x).end() #define endl '\n' typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; const int mod = 1e9 + 7; // const int mod=998244353; const double...
replace
15
16
15
16
0
p02727
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int x, y, a, b, c; cin >> x >> y >> a >> b >> c; vector<int> red(a), green(b), white(c); for (int i = 0; i < a; i++) cin >> red[i]; for (int i = 0; i < b; i++) cin >> green[i]; for (int i = 0; i...
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int x, y, a, b, c; cin >> x >> y >> a >> b >> c; vector<int> red(a), green(b), white(c); for (int i = 0; i < a; i++) cin >> red[i]; for (int i = 0; i < b; i++) cin >> green[i]; for (int i = 0; i...
replace
64
71
64
68
TLE
p02727
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define int long long #define rep(i, n) for (int i = 0; i < (n); i++) int X, Y, A, B, C; priority_queue<int, vector<int>, greater<int>> pq; vector<int> a, b, c; int ans; int max_ans = 0; void update(int x) { if (pq.size() != Y) { ans += x; pq.push(x); } else...
#include <bits/stdc++.h> using namespace std; #define int long long #define rep(i, n) for (int i = 0; i < (n); i++) int X, Y, A, B, C; priority_queue<int, vector<int>, greater<int>> pq; vector<int> a, b, c; int ans; int max_ans = 0; void update(int x) { if (pq.size() != Y) { ans += x; pq.push(x); } else...
replace
57
58
57
59
0
p02727
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 lb(v, k) (lower_bound(all(v), k) - v.begin()) #define ub(v, k) (upper_bound...
#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 lb(v, k) (lower_bound(all(v), k) - v.begin()) #define ub(v, k) (upper_bound...
replace
91
92
91
92
0
p02727
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll X, Y, A, B, C; cin >> X >> Y >> A >> B >> C; vector<ll> red(A), green(B), none(C); for (ll i = 0; i < A; ++i) cin >> red[i]; for (ll i = 0; i < B; ++i) cin >> green[i]; for (ll i = 0; i < C; ++i) cin >> none[i];...
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll X, Y, A, B, C; cin >> X >> Y >> A >> B >> C; vector<ll> red(A), green(B), none(C); for (ll i = 0; i < A; ++i) cin >> red[i]; for (ll i = 0; i < B; ++i) cin >> green[i]; for (ll i = 0; i < C; ++i) cin >> none[i];...
replace
17
39
17
29
0
p02727
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define ll long long struct apple { int color; // 0 is X 1 is Y 2 is ALL ll value; }; apple t[222222]; bool cmp(apple a, apple b) { return a.value > b.value; } int main() { int n, b, i, j, k, x, y, z, s0, s1, s2; cin >> x >> y >> s0 >> s1 >> s2; for (i = 0; i ...
#include <bits/stdc++.h> using namespace std; #define ll long long struct apple { int color; // 0 is X 1 is Y 2 is ALL ll value; }; apple t[333333]; bool cmp(apple a, apple b) { return a.value > b.value; } int main() { int n, b, i, j, k, x, y, z, s0, s1, s2; cin >> x >> y >> s0 >> s1 >> s2; for (i = 0; i ...
replace
7
8
7
8
0
p02727
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef unsigned long long ull; typedef long long ll; typedef long double ld; typedef pair<int, int> pii; typedef pair<ll, ll> pll; #define fastio() \ ios_base::sync_with_stdio(0); ...
#include <bits/stdc++.h> using namespace std; typedef unsigned long long ull; typedef long long ll; typedef long double ld; typedef pair<int, int> pii; typedef pair<ll, ll> pll; #define fastio() \ ios_base::sync_with_stdio(0); ...
delete
51
55
51
51
-6
terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc
p02727
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> P; typedef vector<ll> vl; typedef vector<vector<ll>> vvl; typedef vector<vector<vector<ll>>> vvvl; struct edge { ll to, cost; }; const int inf = 1 << 28; const ll INF = 1LL << 53; const int COMBMAX = 500005; const ll MOD = 1e9 + ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> P; typedef vector<ll> vl; typedef vector<vector<ll>> vvl; typedef vector<vector<vector<ll>>> vvvl; struct edge { ll to, cost; }; const int inf = 1 << 28; const ll INF = 1LL << 53; const int COMBMAX = 500005; const ll MOD = 1e9 + ...
replace
102
103
102
103
0
p02727
C++
Runtime Error
#define ll long long #define pub push_back #define pob pop_back #define puf push_front #define pof pop_front #define mp make_pair #define fo(i, n) for (ll i = 0; i < n; i++) // #include<bits/stdc++.h> #include <algorithm> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include ...
#define ll long long #define pub push_back #define pob pop_back #define puf push_front #define pof pop_front #define mp make_pair #define fo(i, n) for (ll i = 0; i < n; i++) // #include<bits/stdc++.h> #include <algorithm> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include ...
replace
112
117
112
117
-11
p02727
C++
Time Limit Exceeded
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pp; const int INF = 1e9; const int MOD = 1000000007; const double pi = 3.141592653589793238; ll gcd(ll a, ll b) { return __gcd(a, b); } // 最大公約数 ll lcm(ll a, ll b) { return a / gcd(a, b) * b; } // 最...
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pp; const int INF = 1e9; const int MOD = 1000000007; const double pi = 3.141592653589793238; ll gcd(ll a, ll b) { return __gcd(a, b); } // 最大公約数 ll lcm(ll a, ll b) { return a / gcd(a, b) * b; } // 最...
replace
38
39
38
39
TLE
p02727
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> #define PB...
#include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> #define PB...
replace
32
33
32
33
0
p02727
C++
Time Limit Exceeded
#include <bits/stdc++.h> int main() { std::size_t X, Y, A, B, C; std::cin >> X >> Y >> A >> B >> C; std::vector<std::uint64_t> ps(A); std::vector<std::uint64_t> qs(B); std::vector<std::uint64_t> rs(C); for (auto &p : ps) { std::cin >> p; } for (auto &q : qs) { std::cin >> q; } for (auto &...
#include <bits/stdc++.h> int main() { std::size_t X, Y, A, B, C; std::cin >> X >> Y >> A >> B >> C; std::vector<std::uint64_t> ps(A); std::vector<std::uint64_t> qs(B); std::vector<std::uint64_t> rs(C); for (auto &p : ps) { std::cin >> p; } for (auto &q : qs) { std::cin >> q; } for (auto &...
delete
33
50
33
33
TLE
p02727
C++
Runtime Error
/* author : Aryan Agarwal, IIT KGP created : 29-June-2020 19:14:58 */ #include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef unsigned long long ull; #define int ll const int INF = (int)2e18; const int MOD = 1000000007; /*more than (10)^9*/ /*7 + 1e9*/ const int PEG = 998244353; /*les...
/* author : Aryan Agarwal, IIT KGP created : 29-June-2020 19:14:58 */ #include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef unsigned long long ull; #define int ll const int INF = (int)2e18; const int MOD = 1000000007; /*more than (10)^9*/ /*7 + 1e9*/ const int PEG = 998244353; /*les...
replace
71
72
71
72
0
p02727
C++
Runtime Error
// Nihal Mittal - nihal_47 // Strike First , Strike Hard , No Mercy !! /**⠀⠀⠀⠀⠀⠀⣀⣤⣤⣄⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⣀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⣰⣿⣿⣿⣿⠿⠿⣿⣿⣿⣿⣿⣿⣿⣧⢀⠀⠀⠀⠀ ⠀⠀⠀⣿⣿⣿⠋⠀⠀⠀⠀⠀⠙⠀⠙⣿⣿⣿⣷⢳⢀⠀⠀⠀ ⠀⠀⣠⣿⣿⣿⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⢀ ⠀⠀⣸⣿⣿⣿⠸⠀⠀⠀⠒⠒⠒⠐⠀⠀⢿⣿⣿⣿⣿⣿⠀⠀ ⠀⣴⣿⣿⣿⡿⠀⠒⣋⣙⡒⢰⠀⠤⣖⠒⢾⣿⣿⣿⣿⣧⠀⠀ ⢺⣿⣿⣿⣿⢀⠀⠀⠉⠉⠉⠸⠀⡇⠉⠉⠀⢿⣿⣿⣿⣄⠀⠀ ⠀⠙⣿⣿⣧⢻⠀⠀⠀⠀⠀⠠⠀⠰⠀⠀⠀⣸⠸⣿⣿⠿⠰⠀ ⠀⠀⠀⠹⣿⣿⣿⣷⠀⡠⠙⣲⣔⣅⢡⣰⣷⣿⣿⣿⣧⠀⠀⠀...
// Nihal Mittal - nihal_47 // Strike First , Strike Hard , No Mercy !! /**⠀⠀⠀⠀⠀⠀⣀⣤⣤⣄⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⣀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⣰⣿⣿⣿⣿⠿⠿⣿⣿⣿⣿⣿⣿⣿⣧⢀⠀⠀⠀⠀ ⠀⠀⠀⣿⣿⣿⠋⠀⠀⠀⠀⠀⠙⠀⠙⣿⣿⣿⣷⢳⢀⠀⠀⠀ ⠀⠀⣠⣿⣿⣿⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⢀ ⠀⠀⣸⣿⣿⣿⠸⠀⠀⠀⠒⠒⠒⠐⠀⠀⢿⣿⣿⣿⣿⣿⠀⠀ ⠀⣴⣿⣿⣿⡿⠀⠒⣋⣙⡒⢰⠀⠤⣖⠒⢾⣿⣿⣿⣿⣧⠀⠀ ⢺⣿⣿⣿⣿⢀⠀⠀⠉⠉⠉⠸⠀⡇⠉⠉⠀⢿⣿⣿⣿⣄⠀⠀ ⠀⠙⣿⣿⣧⢻⠀⠀⠀⠀⠀⠠⠀⠰⠀⠀⠀⣸⠸⣿⣿⠿⠰⠀ ⠀⠀⠀⠹⣿⣿⣿⣷⠀⡠⠙⣲⣔⣅⢡⣰⣷⣿⣿⣿⣧⠀⠀⠀...
replace
47
51
47
48
-6
terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc
p02727
C++
Runtime Error
/* بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ */ // codeforces #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long double ld; #define FASTIO ios::sync_with_stdio(0), cin.tie(0), cout.tie(0); #define mp make_pair #define pb push_back #define sz(v) ((int)v.size()) ...
/* بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ */ // codeforces #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long double ld; #define FASTIO ios::sync_with_stdio(0), cin.tie(0), cout.tie(0); #define mp make_pair #define pb push_back #define sz(v) ((int)v.size()) ...
replace
39
40
39
40
0
p02727
C++
Runtime Error
#include <bits/stdc++.h> #include <unordered_map> #include <unordered_set> #define endl '\n' #define PI acos(-1) typedef long long ll; using namespace std; // Table is the complete reverse of dp int main() { cin.tie(NULL); cout.tie(NULL); ios_base::sync_with_stdio(false); #ifndef ONLINE_JUDGE freopen("in.txt"...
#include <bits/stdc++.h> #include <unordered_map> #include <unordered_set> #define endl '\n' #define PI acos(-1) typedef long long ll; using namespace std; // Table is the complete reverse of dp int main() { cin.tie(NULL); cout.tie(NULL); ios_base::sync_with_stdio(false); #ifndef ONLINE_JUDGE // freopen("in.t...
replace
14
15
14
15
0
p02727
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using pii = pair<int, int>; using ll = long long; #define rep(i, j) for (int i = 0; i < (int)(j); i++) #define repeat(i, j, k) for (int i = (j); i < (int)(k); i++) #define all(v) v.begin(), v.end() #define debug(x) cerr << #x << " : " << x << endl template <class T> bool ...
#include <bits/stdc++.h> using namespace std; using pii = pair<int, int>; using ll = long long; #define rep(i, j) for (int i = 0; i < (int)(j); i++) #define repeat(i, j, k) for (int i = (j); i < (int)(k); i++) #define all(v) v.begin(), v.end() #define debug(x) cerr << #x << " : " << x << endl template <class T> bool ...
replace
53
55
53
55
0
p02727
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define mem(a, b) memset(a, b, sizeof(a)) #define pii pair<int, int> #define int long long const int inf = 0x3f3f3f3f; const int maxn = 201110; const int M = 1e9 + 7; int p[maxn], q[maxn], r[maxn]; int sum[maxn]; int ans[maxn]; signed main() { #ifdef ONLINE_JUDGE #else ...
#include <bits/stdc++.h> using namespace std; #define mem(a, b) memset(a, b, sizeof(a)) #define pii pair<int, int> #define int long long const int inf = 0x3f3f3f3f; const int maxn = 201110; const int M = 1e9 + 7; int p[maxn], q[maxn], r[maxn]; int sum[maxn]; int ans[maxn]; signed main() { int x, y, a, b, c; cin ...
delete
15
19
15
15
TLE
p02727
C++
Runtime Error
#include <bits/stdc++.h> #define mod ((int)1e9 + 7) using namespace std; typedef pair<int, int> pi; typedef long long int ll; const int N = (int)2e3 + 5; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int x, y, a, b, c; cin >> x >> y >> a >> b >> c; vector<ll> p(a + 1), q(b), r(c...
#include <bits/stdc++.h> #define mod ((int)1e9 + 7) using namespace std; typedef pair<int, int> pi; typedef long long int ll; const int N = (int)2e3 + 5; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int x, y, a, b, c; cin >> x >> y >> a >> b >> c; vector<ll> p(a + 1), q(b), r(c...
replace
54
56
54
57
0
p02727
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #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) #define fi first #define se second #define INF 1000000009 #define LLINF 1000000000000000009LL using ll = long long; int main() { int x, y, a, b, c; cin >> x ...
#include <bits/stdc++.h> using namespace std; #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) #define fi first #define se second #define INF 1000000009 #define LLINF 1000000000000000009LL using ll = long long; int main() { int x, y, a, b, c; cin >> x ...
replace
33
34
33
34
0
p02727
C++
Runtime Error
#include <algorithm> #include <cctype> #include <cmath> #include <cstring> #include <fstream> #include <iomanip> #include <iostream> #include <iterator> #include <map> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <stdlib.h> #include <string> #include <time.h> #include <tuple> #include <v...
#include <algorithm> #include <cctype> #include <cmath> #include <cstring> #include <fstream> #include <iomanip> #include <iostream> #include <iterator> #include <map> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <stdlib.h> #include <string> #include <time.h> #include <tuple> #include <v...
replace
189
190
189
190
0
p02727
C++
Runtime Error
#define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <complex> #include <deque> #include <iostream> #include <map> #include <math.h> #include <queue> #include <random> #include <set> #include <string> #include <unordered_map> #include <unordered_set> #inclu...
#define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <complex> #include <deque> #include <iostream> #include <map> #include <math.h> #include <queue> #include <random> #include <set> #include <string> #include <unordered_map> #include <unordered_set> #inclu...
insert
105
105
105
107
0
p02727
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define int long long #define ALL(x) (x).begin(), (x).end() #define MAX(x) *max_element(ALL(x)) #define MIN(x) *min_element(ALL(x)) typedef pair<int, int> PI; typedef pair<int, pair<int, int>> PII; static const int INF = 1010000000000000017LL; static const double eps = 1...
#include <bits/stdc++.h> using namespace std; #define int long long #define ALL(x) (x).begin(), (x).end() #define MAX(x) *max_element(ALL(x)) #define MIN(x) *min_element(ALL(x)) typedef pair<int, int> PI; typedef pair<int, pair<int, int>> PII; static const int INF = 1010000000000000017LL; static const double eps = 1...
replace
63
64
63
64
TLE
p02727
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define int long long #define MOD 1000000007 #define FOR(i, a, b) for (int i = (a); i < (b); i++) #define RFOR(i, a, b) for (int i = (b)-1; i >= (a); i--) #define rep(i, n) for (int i = 0; i < (n); i++) #define rep1(i, n) for (int i = 1; i < (n); i++) #define rrep(i, n) ...
#include <bits/stdc++.h> using namespace std; #define int long long #define MOD 1000000007 #define FOR(i, a, b) for (int i = (a); i < (b); i++) #define RFOR(i, a, b) for (int i = (b)-1; i >= (a); i--) #define rep(i, n) for (int i = 0; i < (n); i++) #define rep1(i, n) for (int i = 1; i < (n); i++) #define rrep(i, n) ...
insert
65
65
65
67
TLE
p02727
C++
Runtime Error
#include <bits/stdc++.h> #define ll long long using namespace std; const ll N = 1e5 + 10; typedef struct node { ll r, type; bool operator<(const node &t) const { return r > t.r; } } node; node a[N]; int main() { ll x, y, A, B, C, tot = 0, m; cin >> x >> y >> A >> B >> C; for (ll i = 0; i < A; i++) scanf("...
#include <bits/stdc++.h> #define ll long long using namespace std; const ll N = 3e5 + 10; typedef struct node { ll r, type; bool operator<(const node &t) const { return r > t.r; } } node; node a[N]; int main() { ll x, y, A, B, C, tot = 0, m; cin >> x >> y >> A >> B >> C; for (ll i = 0; i < A; i++) scanf("...
replace
3
4
3
4
0
p02727
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(0); int x, y, a, b, c; cin >> x >> y >> a >> b >> c; vector<int> va(a); vector<int> vb(b); vector<int> vc(c); for (int i = 0; i < a; i++) { cin >> va[i]; } for (int i = 0; i < b; i++) { ci...
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(0); int x, y, a, b, c; cin >> x >> y >> a >> b >> c; vector<int> va(a); vector<int> vb(b); vector<int> vc(c); for (int i = 0; i < a; i++) { cin >> va[i]; } for (int i = 0; i < b; i++) { ci...
replace
39
40
39
40
-11
p02727
C++
Runtime Error
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; typedef long long ll; typedef long double ld; typedef pair<ll, ll> pp; typedef tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_updat...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; typedef long long ll; typedef long double ld; typedef pair<ll, ll> pp; typedef tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_updat...
replace
23
24
23
24
0
p02727
Python
Runtime Error
x, y, a, b, c = map(int, input().split()) P = sorted(list(map(int, input().split())), reverse=True) Q = sorted(list(map(int, input().split())), reverse=True) R = sorted(list(map(int, input().split()))) A = sorted(P[:x] + Q[:y]) ans = sum(A) for i in range(c): if A[i] < R[-1]: ans = ans + R[-1] - A[i] ...
x, y, a, b, c = map(int, input().split()) P = sorted(list(map(int, input().split())), reverse=True) Q = sorted(list(map(int, input().split())), reverse=True) R = sorted(list(map(int, input().split()))) A = sorted(P[:x] + Q[:y]) ans = sum(A) for i in range(min(c, len(A))): if A[i] < R[-1]: ans = ans + R[-1...
replace
8
9
8
9
0
p02727
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { size_t X, Y, A, B, C; cin >> X >> Y >> A >> B >> C; vector<size_t> p(A); vector<size_t> red(X, 0); for (int i = 0; i < A; ++i) { size_t p; cin >> p; red.at(0) = max(red.at(0), p); sort(red.begin(), red.end()); ...
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { int x, y; cin >> x >> y; int a, b, c; cin >> a >> b >> c; vector<int> p(a), q(b), r(c); for (int i = 0; i < a; ++i) cin >> p.at(i); for (int i = 0; i < b; ++i) cin >> q.at(i); for (int i = 0; i < c; ++i) cin >...
replace
6
43
6
32
TLE
p02727
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; typedef pair<ll, int> P; int main() { int X, Y, a, b, c; cin >> X >> Y >> c >> b >> a; vector<ll> A, B, C; rep(i, a) { ll t; cin >> t; A.push_back(t); } rep(i, b) { ll t; ...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) typedef long long ll; typedef pair<ll, int> P; int main() { int X, Y, a, b, c; cin >> X >> Y >> a >> b >> c; vector<ll> A, B, C; rep(i, a) { ll t; cin >> t; A.push_back(t); } rep(i, b) { ll t; ...
replace
9
10
9
10
0
p02727
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define pan(i, n) for (int i = 0; i < n; i++) #define pans(i, n, a) for (int i = a; i < n; i++) #define ll long long int #define vi vector<int> #define vl vector<ll> #define pb push_back #define INF INT_MAX #define PI 3.141592653 #define inf 1000007 #define pll pair<ll, l...
#include <bits/stdc++.h> using namespace std; #define pan(i, n) for (int i = 0; i < n; i++) #define pans(i, n, a) for (int i = a; i < n; i++) #define ll long long int #define vi vector<int> #define vl vector<ll> #define pb push_back #define INF INT_MAX #define PI 3.141592653 #define inf 1000007 #define pll pair<ll, l...
replace
31
32
31
32
0
p02727
C++
Runtime Error
#include <bits/stdc++.h> #define ll long long #define maxn 2005 using namespace std; const ll inf = 1e9 + 7; ll a[maxn], b[maxn], c[maxn]; vector<ll> v; int main() { // freopen("input.txt","r",stdin); int X, Y, A, B, C; cin >> X >> Y >> A >> B >> C; for (int i = 0; i < A; i++) cin >> a[i]; for (int i = 0;...
#include <bits/stdc++.h> #define ll long long #define maxn 100005 using namespace std; const ll inf = 1e9 + 7; ll a[maxn], b[maxn], c[maxn]; vector<ll> v; int main() { // freopen("input.txt","r",stdin); int X, Y, A, B, C; cin >> X >> Y >> A >> B >> C; for (int i = 0; i < A; i++) cin >> a[i]; for (int i = ...
replace
2
3
2
3
0
p02727
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { ll X, Y, A, B, C; cin >> X >> Y >> A >> B >> C; vector<ll> p(A); vector<ll> q(B); vector<ll> r(C); for (ll i = 0; i < A; ++i) { cin >> p.at(i); } for (ll i = 0; i < B; ++i) { cin >> q.at(i); } for (ll i = 0; i < ...
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { ll X, Y, A, B, C; cin >> X >> Y >> A >> B >> C; vector<ll> p(A); vector<ll> q(B); vector<ll> r(C); for (ll i = 0; i < A; ++i) { cin >> p.at(i); } for (ll i = 0; i < B; ++i) { cin >> q.at(i); } for (ll i = 0; i < ...
replace
33
36
33
38
0
p02727
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define pi 3.14159265359 #define inf 2147483647 #define INF 9223372036854775807 #define mod 1000000007 #define mod2 998244353 #define Graph vector<vector<int>> int main() { ll X, Y, A, B, C; cin >> X >> Y >> A >> B >> C; ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define pi 3.14159265359 #define inf 2147483647 #define INF 9223372036854775807 #define mod 1000000007 #define mod2 998244353 #define Graph vector<vector<int>> int main() { ll X, Y, A, B, C; cin >> X >> Y >> A >> B >> C; ...
replace
36
37
36
37
0
p02727
C++
Runtime Error
/* Sviatoslav Bidzilia 2020 CF: anakib1 */ #include <algorithm> #include <bitset> #include <cassert> #include <chrono> #include <cmath> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map...
/* Sviatoslav Bidzilia 2020 CF: anakib1 */ #include <algorithm> #include <bitset> #include <cassert> #include <chrono> #include <cmath> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map...
replace
110
111
110
111
0
p02727
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int x, y, a, b, c; cin >> x >> y >> a >> b >> c; priority_queue<int> r; priority_queue<int> g; priority_queue<int> C; for (int i = 0; i < a; i++) { int X; cin >> X; r.push(X); } for (int i = 0; i < b; i++) { int X; cin >> X; ...
#include <bits/stdc++.h> using namespace std; int main() { int x, y, a, b, c; cin >> x >> y >> a >> b >> c; priority_queue<int> r; priority_queue<int> g; priority_queue<int> C; for (int i = 0; i < a; i++) { int X; cin >> X; r.push(X); } for (int i = 0; i < b; i++) { int X; cin >> X; ...
insert
37
37
37
39
TLE
p02727
C++
Runtime Error
/* g++ -ggdb -fsanitize=address -std=c++14 E.cpp && ./a.out <<< "1 2 2 2 1 2 4 5 1 3" */ #include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (int i = a; i < (b); i++) #define trav(a, x) for (auto &a : x) #define all(x) begin(x), end(x) #define sz(x) (int)(x).size() typedef long long ll; typedef pai...
/* g++ -ggdb -fsanitize=address -std=c++14 E.cpp && ./a.out <<< "1 2 2 2 1 2 4 5 1 3" */ #include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (int i = a; i < (b); i++) #define trav(a, x) for (auto &a : x) #define all(x) begin(x), end(x) #define sz(x) (int)(x).size() typedef long long ll; typedef pai...
replace
75
76
75
80
0
p02727
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 1e6 + 7; const int inf = INT_MAX; const ll inff = 1e18; const ll mod = 1e9 + 7; #define pii pair<int, int> #define mkp make_pair #define F first #define S second #define pb push_back #define sz(v) ((int)(v).size()) #define all(v) (v)....
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 1e6 + 7; const int inf = INT_MAX; const ll inff = 1e18; const ll mod = 1e9 + 7; #define pii pair<int, int> #define mkp make_pair #define F first #define S second #define pb push_back #define sz(v) ((int)(v).size()) #define all(v) (v)....
replace
68
69
68
69
0
p02727
Python
Runtime Error
X, Y, A, B, C = map(int, input().split()) p = sorted([int(i) for i in input().split()], reverse=True) q = sorted([int(i) for i in input().split()], reverse=True) r = sorted([int(i) for i in input().split()]) p = p[:X] q = q[:Y] plus_r = [] while r != [] and (p != [] and r[-1] > p[-1]) or (q != [] and r[-1] > q[-1]): ...
X, Y, A, B, C = map(int, input().split()) p = sorted([int(i) for i in input().split()], reverse=True) q = sorted([int(i) for i in input().split()], reverse=True) r = sorted([int(i) for i in input().split()]) p = p[:X] q = q[:Y] plus_r = [] while r != [] and ((p != [] and r[-1] > p[-1]) or (q != [] and r[-1] > q[-1]))...
replace
9
10
9
19
IndexError: list index out of range
Traceback (most recent call last): File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02727/Python/s816996261.py", line 10, in <module> while r != [] and (p != [] and r[-1] > p[-1]) or (q != [] and r[-1] > q[-1]): IndexError: list index out of range
p02727
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const int N = 1e5 + 7; typedef long long ll; ll ans, a[N], b[N], c[N], d[N], A[N], B[N], C[N], x, y, q, w, e; bool cmp(int x, int y) { return x > y; } int main() { cin >> x >> y >> q >> w >> e; for (int i = 1; i <= q; i++) cin >> a[i]; sort(a + 1, a + q + 1, cmp);...
#include <bits/stdc++.h> using namespace std; const int N = 1e5 + 7; typedef long long ll; ll ans, a[N], b[N], c[N], d[N * 4], A[N], B[N], C[N], x, y, q, w, e; bool cmp(int x, int y) { return x > y; } int main() { cin >> x >> y >> q >> w >> e; for (int i = 1; i <= q; i++) cin >> a[i]; sort(a + 1, a + q + 1, c...
replace
4
5
4
5
0
p02727
C++
Runtime Error
#include <algorithm> #include <iostream> using namespace std; const int MAXN = 1e5 + 5; typedef long long ll; int nums1[MAXN], nums2[MAXN], nums3[MAXN]; bool cmp(int a, int b) { return a >= b; } int main() { ios::sync_with_stdio(0); cin.tie(0); int x, y, a, b, c; cin >> x >> y >> a >> b >> c; for (int i = 0; ...
#include <algorithm> #include <iostream> using namespace std; const int MAXN = 1e5 + 5; typedef long long ll; int nums1[MAXN], nums2[MAXN], nums3[MAXN]; bool cmp(int a, int b) { return a > b; } int main() { ios::sync_with_stdio(0); cin.tie(0); int x, y, a, b, c; cin >> x >> y >> a >> b >> c; for (int i = 0; i...
replace
6
7
6
7
0
p02727
C++
Runtime Error
#pragma GCC optimize("O3") #pragma GCC target("avx") // #include<bits/stdc++.h> #include <algorithm> #include <cstdio> #include <cstring> using namespace std; typedef long long ll; #define rep(i, n) for (int i = 0; i < (n); i++) #define rep1(i, n) for (int i = 1; i <= (n); i++) #define co(x) cout << (x) << "\n" #define...
#pragma GCC optimize("O3") #pragma GCC target("avx") // #include<bits/stdc++.h> #include <algorithm> #include <cstdio> #include <cstring> using namespace std; typedef long long ll; #define rep(i, n) for (int i = 0; i < (n); i++) #define rep1(i, n) for (int i = 1; i <= (n); i++) #define co(x) cout << (x) << "\n" #define...
delete
57
58
57
57
0
p02727
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll a[100005], b[100005], c[100005]; vector<ll> p; int main() { ll x, y, n, m, k, sum = 0; cin >> x >> y >> n >> m >> k; for (int i = 1; i <= n; i++) { cin >> a[i]; } for (int i = 1; i <= m; i++) { cin >> b[i]; } for (int i = 1; i ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll a[100005], b[100005], c[100005]; vector<ll> p; int main() { ll x, y, n, m, k, sum = 0; cin >> x >> y >> n >> m >> k; for (int i = 1; i <= n; i++) { cin >> a[i]; } for (int i = 1; i <= m; i++) { cin >> b[i]; } for (int i = 1; i ...
replace
33
34
33
34
0
p02727
C++
Runtime Error
#include <bits/stdc++.h> #pragma GCC optimize("O3") #define ll long long #define ull unsigned long long #define dd double #define oo 1001007000 #define ff float #define ooo 1000000100000000000 #define iii pair<ll, ll> #define vii vector<ll> #define viii vector<iii> #define sss pair<str, str> #define str string #define ...
#include <bits/stdc++.h> #pragma GCC optimize("O3") #define ll long long #define ull unsigned long long #define dd double #define oo 1001007000 #define ff float #define ooo 1000000100000000000 #define iii pair<ll, ll> #define vii vector<ll> #define viii vector<iii> #define sss pair<str, str> #define str string #define ...
replace
22
23
22
23
0
p02727
Python
Time Limit Exceeded
def main(): X, Y, A, B, C = tuple(map(int, input().split())) P = tuple(map(int, input().split())) Q = tuple(map(int, input().split())) R = tuple(map(int, input().split())) P = sorted(P, reverse=True) Q = sorted(Q, reverse=True) R = sorted(R, reverse=True) x = P[:X] y = Q[:Y] f...
def main(): X, Y, A, B, C = tuple(map(int, input().split())) P = tuple(map(int, input().split())) Q = tuple(map(int, input().split())) R = tuple(map(int, input().split())) P = sorted(P, reverse=True) Q = sorted(Q, reverse=True) R = sorted(R, reverse=True) x = P[:X] y = Q[:Y] s...
replace
13
27
13
15
TLE
p02727
Python
Runtime Error
x, y, a, b, c = map(int, input().split()) ps = list(map(int, input().split())) qs = list(map(int, input().split())) rs = list(map(int, input().split())) ps.sort() ps = ps[-x:] qs.sort() qs = qs[-y:] pqs = ps + qs pqs.sort() rs.sort(reverse=True) answer = sum(pqs) for i in range(c): diff = rs[i] - pqs[i] if dif...
x, y, a, b, c = map(int, input().split()) ps = list(map(int, input().split())) qs = list(map(int, input().split())) rs = list(map(int, input().split())) ps.sort() ps = ps[-x:] qs.sort() qs = qs[-y:] pqs = ps + qs pqs.sort() rs.sort(reverse=True) answer = sum(pqs) for i in range(min(x + y, c)): diff = rs[i] - pqs[i...
replace
13
14
13
14
0
p02727
Python
Runtime Error
from collections import deque def main(): X, Y, A, B, C = map(int, input().split(" ")) a_list = list(map(int, input().split(" "))) b_list = list(map(int, input().split(" "))) c_list = list(map(int, input().split(" "))) a_deq = deque(sorted(a_list, reverse=True)[:X]) b_deq = deque(sorted(b_list...
from collections import deque def main(): X, Y, A, B, C = map(int, input().split(" ")) a_list = list(map(int, input().split(" "))) b_list = list(map(int, input().split(" "))) c_list = list(map(int, input().split(" "))) a_deq = deque(sorted(a_list, reverse=True)[:X]) b_deq = deque(sorted(b_list...
replace
12
18
12
26
0
p02727
Python
Runtime Error
# -*- coding: utf-8 -*- X, Y, A, B, C = map(int, input().split()) p = list(map(int, input().split())) q = list(map(int, input().split())) r = list(map(int, input().split())) # all_apples = sorted(p + q + r, key=lambda x: -x) p_rest = sorted(p) q_rest = sorted(q) r_rest = sorted(r) ans = 0 p_count = 0 q_count = 0 r_...
# -*- coding: utf-8 -*- X, Y, A, B, C = map(int, input().split()) p = list(map(int, input().split())) q = list(map(int, input().split())) r = list(map(int, input().split())) # all_apples = sorted(p + q + r, key=lambda x: -x) p_rest = sorted(p + [0]) q_rest = sorted(q + [0]) r_rest = sorted(r + [0]) ans = 0 p_count ...
replace
9
12
9
12
0
p02727
Python
Time Limit Exceeded
X, Y, A, B, C = map(int, input().split()) p, pi = sorted(list(map(int, input().split())), reverse=True)[:X] + [-1], 0 q, qi = sorted(list(map(int, input().split())), reverse=True)[:Y] + [-1], 0 r, ri = sorted(list(map(int, input().split())), reverse=True) + [-1], 0 ans, nX, nY = 0, 0, 0 while nX < X or nY < Y: if r...
X, Y, A, B, C = map(int, input().split()) p = sorted(list(map(int, input().split())))[-X:] q = sorted(list(map(int, input().split())))[-Y:] r = list(map(int, input().split())) print(sum(sorted(p + q + r)[-(X + Y) :]))
replace
1
30
1
5
TLE
p02727
Python
Runtime Error
X, Y, A, B, C = map(int, input().split()) P = list(map(int, input().split())) Q = list(map(int, input().split())) R = list(map(int, input().split())) P.sort(reverse=True) Q.sort(reverse=True) R.sort(reverse=True) S = P[:X] + Q[:Y] S.sort(reverse=True) S_wa = [] wa = 0 for s in S[::-1]: wa += s S_wa.append(wa...
X, Y, A, B, C = map(int, input().split()) P = list(map(int, input().split())) Q = list(map(int, input().split())) R = list(map(int, input().split())) P.sort(reverse=True) Q.sort(reverse=True) R.sort(reverse=True) S = P[:X] + Q[:Y] S.sort(reverse=True) S_wa = [] wa = 0 for s in S[::-1]: wa += s S_wa.append(wa...
replace
28
29
28
31
0
p02727
C++
Runtime Error
#include <algorithm> #include <functional> #include <iostream> #include <vector> using namespace std; const int INF = 10010001; int main() { int x, y, a, b, c; cin >> x >> y >> a >> b >> c; pair<long long, int> apple[100009]; for (int i = 0; i < a; ++i) { cin >> apple[i].first; apple[i].second = 1; }...
#include <algorithm> #include <functional> #include <iostream> #include <vector> using namespace std; const int INF = 10010001; int main() { int x, y, a, b, c; cin >> x >> y >> a >> b >> c; pair<long long, int> apple[300009]; for (int i = 0; i < a; ++i) { cin >> apple[i].first; apple[i].second = 1; }...
replace
10
11
10
11
0
p02727
C++
Runtime Error
#include <bits/stdc++.h> #define forr(i, a, b) for (int i = (a); i < (b); i++) #define rep(i, n) for (int i = 0; i < (n); i++) #define rrep(i, n) for (int i = 1; i <= (n); i++) #define ALL(a) (a.begin()), (a.end()) using namespace std; typedef long long ll; typedef pair<int, int> P; typedef pair<ll, ll> LP; const ll LI...
#include <bits/stdc++.h> #define forr(i, a, b) for (int i = (a); i < (b); i++) #define rep(i, n) for (int i = 0; i < (n); i++) #define rrep(i, n) for (int i = 1; i <= (n); i++) #define ALL(a) (a.begin()), (a.end()) using namespace std; typedef long long ll; typedef pair<int, int> P; typedef pair<ll, ll> LP; const ll LI...
replace
31
32
31
33
0
p02727
C++
Runtime Error
#include <bits/stdc++.h> #define mes(a, b) memset(a, b, sizeof a) #define pb push_back typedef unsigned long long int ull; typedef long long int ll; const int maxn = 2e5 + 20; const int maxm = 1e5 + 10; const ll mod = 1e9 + 7; const ll INF = 1e18 + 100; const int inf = 0x3f3f3f3f; const double pi = acos(-1.0); const do...
#include <bits/stdc++.h> #define mes(a, b) memset(a, b, sizeof a) #define pb push_back typedef unsigned long long int ull; typedef long long int ll; const int maxn = 1e6 + 20; const int maxm = 1e5 + 10; const ll mod = 1e9 + 7; const ll INF = 1e18 + 100; const int inf = 0x3f3f3f3f; const double pi = acos(-1.0); const do...
replace
5
6
5
6
0
p02727
Python
Runtime Error
X, Y, A, B, C = map(int, input().split()) P = sorted(map(int, input().split())) Q = sorted(map(int, input().split())) R = sorted(map(int, input().split())) ans = 0 for _ in range(X): if P[-1] > R[-1]: ans += P.pop() else: ans += R.pop() for _ in range(Y): if Q[-1] > R[-1]: ans += Q...
X, Y, A, B, C = map(int, input().split()) P = sorted(map(int, input().split())) Q = sorted(map(int, input().split())) R = sorted(map(int, input().split())) cand = sorted(P[-X:] + Q[-Y:] + R) print(sum(cand[-X - Y :]))
replace
5
19
5
7
0
p02727
C++
Runtime Error
#pragma GCC optimize( \ "Ofast") // Comment optimisations for interactive problems (use endl) #pragma GCC target("avx,avx2,fma") #pragma GCC optimization("unroll-loops") #include <bits/stdc++.h> using namespace std; #define fastio ...
#include <bits/stdc++.h> using namespace std; #define fastio \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); ...
replace
0
4
0
1
0
p02727
C++
Runtime Error
// #pragma GCC diagnostic error "-std=c++11" #include <bits/stdc++.h> #define pb push_back #define rep(i, a, b) for (int i = a; i <= b; ++i) #define per(i, b, a) for (int i = b; i >= a; --i) #define gcd(a, b) __gcd(a, b) #define MEM(a, x) memset(a, x, sizeof(a)) #define VI vector<int> #define ll long long #define INF 0...
// #pragma GCC diagnostic error "-std=c++11" #include <bits/stdc++.h> #define pb push_back #define rep(i, a, b) for (int i = a; i <= b; ++i) #define per(i, b, a) for (int i = b; i >= a; --i) #define gcd(a, b) __gcd(a, b) #define MEM(a, x) memset(a, x, sizeof(a)) #define VI vector<int> #define ll long long #define INF 0...
replace
41
42
41
42
0
p02727
C++
Runtime Error
// _____ ---===-- _____ // . '' `` -. // . ' ` // . // .' _ _ _ ` . // / ' ' ...
// _____ ---===-- _____ // . '' `` -. // . ' ` // . // .' _ _ _ ` . // / ' ' ...
replace
142
143
142
149
0
p02727
C++
Runtime Error
#include <algorithm> #include <functional> #include <iostream> #include <vector> #define ll long long using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); ll x, y, a, b, c, ans = 0; cin >> x >> y >> a >> b >> c; vector<ll> p(a), q(b), r(c); for (int i = 0; i < a; i++) cin >...
#include <algorithm> #include <functional> #include <iostream> #include <vector> #define ll long long using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); ll x, y, a, b, c, ans = 0; cin >> x >> y >> a >> b >> c; vector<ll> p(a), q(b), r(c); for (int i = 0; i < a; i++) cin >...
replace
30
32
30
34
0
p02727
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const long long inf = 1e18; typedef long long ll; typedef vector<ll> vl; #define rp(i, f, t) for (int i = f; i < t; i++) #define pr(i, f, t) for (int i = t - 1; i >= f; i--) #define ca(n, a) \ rp(ca_i, 0, n) co...
#include <bits/stdc++.h> using namespace std; const long long inf = 1e18; typedef long long ll; typedef vector<ll> vl; #define rp(i, f, t) for (int i = f; i < t; i++) #define pr(i, f, t) for (int i = t - 1; i >= f; i--) #define ca(n, a) \ rp(ca_i, 0, n) co...
insert
33
33
33
35
0
p02727
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using large = long long; int main() { int x, y, a, b, c; cin >> x >> y >> a >> b >> c; auto p = vector<int>(a); for (auto &p_i : p) cin >> p_i; auto q = vector<int>(b); for (auto &q_i : q) cin >> q_i; auto r = vector<int>(c); for (auto &r_i : r) ...
#include <bits/stdc++.h> using namespace std; using large = long long; int main() { int x, y, a, b, c; cin >> x >> y >> a >> b >> c; auto p = vector<int>(a); for (auto &p_i : p) cin >> p_i; auto q = vector<int>(b); for (auto &q_i : q) cin >> q_i; auto r = vector<int>(c); for (auto &r_i : r) ...
replace
36
37
36
37
0
p02727
C++
Runtime Error
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; #define x_ real() #define y_ imag() #define cross(a, b) (conj(a) * (b)).imag() #define dot(a, b) (conj(a) * (b)).real() #define PI acos(-1) #define F first #define S second #define fastIO ios_base...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; #define x_ real() #define y_ imag() #define cross(a, b) (conj(a) * (b)).imag() #define dot(a, b) (conj(a) * (b)).real() #define PI acos(-1) #define F first #define S second #define fastIO ios_base...
replace
59
60
59
60
0
p02727
C++
Runtime Error
#include <algorithm> #include <iostream> #include <iterator> #include <numeric> #include <vector> using namespace std; using ll = long long; int main() { int x, y, a, b, c; cin >> x >> y >> a >> b >> c; vector<int> p(a), q(b), r(c); for (auto &i : p) { cin >> i; } for (auto &i : q) { cin >> i; ...
#include <algorithm> #include <iostream> #include <iterator> #include <numeric> #include <vector> using namespace std; using ll = long long; int main() { int x, y, a, b, c; cin >> x >> y >> a >> b >> c; vector<int> p(a), q(b), r(c); for (auto &i : p) { cin >> i; } for (auto &i : q) { cin >> i; ...
replace
33
34
33
35
0
p02727
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define REP(i, n) FOR(i, 0, (n)) #define FOR(i, a, b) for (int i = (a); i < (b); i++) #define LAR(a, b) ((a) = max((a), (b))) #define SML(a, b) ((a) = min((a), (b))) using ll = long long; using ld = long double; using vi = vector<int>; using vl = vector<ll>; using pii = pai...
#include <bits/stdc++.h> using namespace std; #define REP(i, n) FOR(i, 0, (n)) #define FOR(i, a, b) for (int i = (a); i < (b); i++) #define LAR(a, b) ((a) = max((a), (b))) #define SML(a, b) ((a) = min((a), (b))) using ll = long long; using ld = long double; using vi = vector<int>; using vl = vector<ll>; using pii = pai...
replace
24
25
24
25
0
p02727
C++
Runtime Error
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound #include <bitset> // bitset #include <cctype> // isupper, islower, isdigit, toupper, tolower #include <cstdint> // int64_t, int*_t #include <cstdio> // printf #include <deque> // deque #include <iostream> // cout, endl, cin ...
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound #include <bitset> // bitset #include <cctype> // isupper, islower, isdigit, toupper, tolower #include <cstdint> // int64_t, int*_t #include <cstdio> // printf #include <deque> // deque #include <iostream> // cout, endl, cin ...
insert
51
51
51
55
0
p02727
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define all(x) (x).begin(), (x).end() #define endl '\n' typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef pair<double, int> pdi; const int INF = 1e9; const int MAXN = 2e3 + 5; const int MOD = 1e9 + 7; ...
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define all(x) (x).begin(), (x).end() #define endl '\n' typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef pair<double, int> pdi; const int INF = 1e9; const int MAXN = 2e5 + 5; const int MOD = 1e9 + 7; ...
replace
14
15
14
15
0
p02727
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using vl = vector<ll>; template <class T> using vc = vector<T>; template <class T> using vvc = vector<vector<T>>; const ll MOD = 1e9 + 7; // const ll MOD = 998244353; const ll INF = 1e16; const ld EPS = 1e-11; const ld PI = aco...
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using vl = vector<ll>; template <class T> using vc = vector<T>; template <class T> using vvc = vector<vector<T>>; const ll MOD = 1e9 + 7; // const ll MOD = 998244353; const ll INF = 1e16; const ld EPS = 1e-11; const ld PI = aco...
insert
59
59
59
75
0
p02727
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, n) for (int i = 0; i < (int)(n); i++) template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return 1; ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, n) for (int i = 0; i < (int)(n); i++) template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return 1; ...
replace
63
74
63
94
0
p02727
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long LL; const int N = 100000 + 10; int x, y, a, b, c; int p[N], q[N], r[N]; int main() { scanf("%d%d%d%d%d", &x, &y, &a, &b, &c); for (int i = 1; i <= a; i++) scanf("%d", &p[i]); for (int i = 1; i <= b; i++) scanf("%d", &q[i]); for (int i = 1; ...
#include <bits/stdc++.h> using namespace std; typedef long long LL; const int N = 100000 + 10; int x, y, a, b, c; int p[N], q[N], r[N]; int main() { scanf("%d%d%d%d%d", &x, &y, &a, &b, &c); for (int i = 1; i <= a; i++) scanf("%d", &p[i]); for (int i = 1; i <= b; i++) scanf("%d", &q[i]); for (int i = 1; ...
replace
30
33
30
33
TLE
p02727
C++
Runtime Error
#include <algorithm> #include <cmath> #include <fstream> #include <iostream> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <sstream> #include <stack> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <string> #include <vector> using namespace std; #defi...
#include <algorithm> #include <cmath> #include <fstream> #include <iostream> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <sstream> #include <stack> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <string> #include <vector> using namespace std; #defi...
replace
128
129
128
129
0
p02727
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef unsigned long long ull; typedef pair<int, int> pii; #define pb push_back #define ff first #define ss second #define SIZE 2001 #define INF 2e9 + 9 #define BIG_INF 1e18 + 9 #define acmpIN "input.txt" #define acmpOUT "out...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef unsigned long long ull; typedef pair<int, int> pii; #define pb push_back #define ff first #define ss second #define SIZE 200001 #define INF 2e9 + 9 #define BIG_INF 1e18 + 9 #define acmpIN "input.txt" #define acmpOUT "o...
replace
11
12
11
12
0
p02727
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 2e3 + 5; int a1[N], a2[N], a3[N]; priority_queue<int, vector<int>, greater<int>> q; int main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); int x, y, a, b, c; cin >> x >> y >> a >> b >> c; for (int i = 0; i < a; i++...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 1e5 + 5; int a1[N], a2[N], a3[N]; priority_queue<int, vector<int>, greater<int>> q; int main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); int x, y, a, b, c; cin >> x >> y >> a >> b >> c; for (int i = 0; i < a; i++...
replace
3
4
3
4
0
p02727
C++
Runtime Error
#include <bits/stdc++.h> #include <math.h> using namespace std; typedef long long ll; typedef long double ld; #define rep(i, n) for (int i = 0; i < (int)(n); i++) const ll mod = 1000000007; const int INF = 1001001001; const ll LINF = 1001001001001001001; int main() { ll x, y, a, b, c; cin >> x >> y >> a >> b >> c;...
#include <bits/stdc++.h> #include <math.h> using namespace std; typedef long long ll; typedef long double ld; #define rep(i, n) for (int i = 0; i < (int)(n); i++) const ll mod = 1000000007; const int INF = 1001001001; const ll LINF = 1001001001001001001; int main() { ll x, y, a, b, c; cin >> x >> y >> a >> b >> c;...
insert
27
27
27
29
0
p02727
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (ll i = 0; i < (n); i++) #define REP(i, n) for (ll i = 1; i <= (n); i++) typedef long long ll; int main() { ll x, y, a, b, c; cin >> x >> y >> a >> b >> c; vector<ll> p(a), q(b), r(c); rep(i, a) cin >> p[i]; rep(i, b) cin >> q[i]; rep(i, c...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (ll i = 0; i < (n); i++) #define REP(i, n) for (ll i = 1; i <= (n); i++) typedef long long ll; int main() { ll x, y, a, b, c; cin >> x >> y >> a >> b >> c; vector<ll> p(a), q(b), r(c); rep(i, a) cin >> p[i]; rep(i, b) cin >> q[i]; rep(i, c...
insert
21
21
21
46
0
p02727
C++
Runtime Error
#include <algorithm> #include <iostream> #include <stack> using namespace std; int64_t X, Y, A, B, C, ans = 0LL; int main(void) { cin >> X >> Y >> A >> B >> C; int p[A], q[B], r[C]; for (int i = 0; i < A; i++) cin >> p[i]; for (int i = 0; i < B; i++) cin >> q[i]; for (int i = 0; i < C; i++) cin >>...
#include <algorithm> #include <iostream> #include <stack> using namespace std; int64_t X, Y, A, B, C, ans = 0LL; int main(void) { cin >> X >> Y >> A >> B >> C; int p[A], q[B], r[C]; for (int i = 0; i < A; i++) cin >> p[i]; for (int i = 0; i < B; i++) cin >> q[i]; for (int i = 0; i < C; i++) cin >>...
replace
23
25
23
27
0