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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p03078 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
// Define
using ll = int64_t;
using ul = uint64_t;
using ld = long double;
const ll MOD = 1e9 + 7;
const ll INF = LONG_MAX;
const ul MAX = ULONG_MAX;
const char nl = '\n';
#define elif else if
#define def inline auto
#define run __attribute__((constructor)) def _
// Debu... | #include <bits/stdc++.h>
using namespace std;
// Define
using ll = int64_t;
using ul = uint64_t;
using ld = long double;
const ll MOD = 1e9 + 7;
const ll INF = LONG_MAX;
const ul MAX = ULONG_MAX;
const char nl = '\n';
#define elif else if
#define def inline auto
#define run __attribute__((constructor)) def _
// Debu... | replace | 59 | 60 | 59 | 60 | 0 | |
p03078 | C++ | Runtime Error | #pragma region _head
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <regex>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#pragma region _define
#define int LL
#define f(i, a, b) for (LL... | #pragma region _head
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <regex>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#pragma region _define
#define int LL
#define f(i, a, b) for (LL... | replace | 137 | 138 | 137 | 142 | 0 | |
p03078 | Python | Time Limit Exceeded | import sys
input = sys.stdin.readline
X, Y, Z, K = map(int, input().split())
a = [int(x) for x in input().split()]
b = [int(x) for x in input().split()]
c = [int(x) for x in input().split()]
ablst = [m + n for n in b for m in a]
ablst.sort(reverse=True)
c.sort(reverse=True)
abclst = [m + n for n in c[:K] for m in... | import sys
input = sys.stdin.readline
X, Y, Z, K = map(int, input().split())
a = [int(x) for x in input().split()]
b = [int(x) for x in input().split()]
c = [int(x) for x in input().split()]
a.sort(reverse=True)
b.sort(reverse=True)
ablst = [m + n for n in b for m in a]
ablst.sort(reverse=True)
c.sort(reverse=Tru... | insert | 8 | 8 | 8 | 11 | TLE | |
p03078 | Python | Time Limit Exceeded | import itertools
X, Y, Z, K = list(map(int, input().split()))
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
AB = [a + b for (a, b) in list(itertools.product(A, B))]
AB = sorted(AB)[::-1]
ans = [ab + c for (ab, c) in list(itertools.product(AB[:3000], C))]
... | import itertools
X, Y, Z, K = list(map(int, input().split()))
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
AB = [a + b for (a, b) in list(itertools.product(A, B))]
AB.sort(reverse=True)
ans = [ab + c for (ab, c) in list(itertools.product(AB[: min(3000, X... | replace | 9 | 12 | 9 | 12 | TLE | |
p03078 | Python | Time Limit Exceeded | from itertools import product, chain
x, y, z, k = list(map(int, input().split(" ")))
a = sorted(list(map(int, input().split(" "))))
b = sorted(list(map(int, input().split(" "))))
c = sorted(list(map(int, input().split(" "))))
apb_sorted = sorted([a + b for a, b in product(a, b)])
ans_list = sorted(
list(chain.fro... | from itertools import product, chain
x, y, z, k = list(map(int, input().split(" ")))
a = sorted(list(map(int, input().split(" "))))
b = sorted(list(map(int, input().split(" "))))
c = sorted(list(map(int, input().split(" "))))
apb_sorted = sorted([a + b for a, b in product(a, b)])[-k:]
ans_list = sorted(
list(chai... | replace | 7 | 8 | 7 | 8 | TLE | |
p03078 | Python | Time Limit Exceeded | from itertools import product
x, y, z, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))
p = [i + k for i, k in product(a, b)]
p.sort(reverse=True)
q = [i + k for i, k in product(p[:k], c)]
q.sort(reverse=True)
print("\n".join(ma... | from itertools import product
x, y, z, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))
p = [i + k for i, k in product(a, b)]
p.sort(reverse=True)
q = [i + k for i, k in product(p[:k], c)]
q.sort(reverse=True)
print("\n".join(map... | delete | 11 | 12 | 11 | 11 | TLE | |
p03078 | Python | Runtime Error | x, y, z, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))
d = []
for i in range(x):
for j in range(y):
d.append(a[i] + b[j])
d.sort(reverse=True)
e = []
for i in range(k):
for j in range(z):
e.append(d[i] ... | x, y, z, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))
d = []
for i in range(x):
for j in range(y):
d.append(a[i] + b[j])
d.sort(reverse=True)
e = []
for i in range(min(len(d), k)):
for j in range(z):
e... | replace | 12 | 13 | 12 | 13 | IndexError: list index out of range | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03078/Python/s896173078.py", line 15, in <module>
e.append(d[i] + c[j])
IndexError: list index out of range
|
p03078 | Python | Time Limit Exceeded | x, y, z, k = map(int, input().split())
a = map(int, input().split())
b = list(map(int, input().split()))
c = map(int, input().split())
d = sorted((ai + bi for ai in a for bi in b), reverse=True)[:k]
e = sorted((ci + di for ci in c for di in d), reverse=True)
i = 0
while i != k:
print(e[i])
i += 1
| x, y, z, k = map(int, input().split())
a = map(int, input().split())
b = list(map(int, input().split()))
c = map(int, input().split())
d = sorted((ai + bi for ai in a for bi in b), reverse=True)[:k]
e = sorted((ci + di for ci in c for di in d), reverse=True)[:k]
print(*e)
| replace | 5 | 10 | 5 | 7 | TLE | |
p03078 | Python | Time Limit Exceeded | def main():
import sys
input = sys.stdin.readline
x, y, z, k = map(int, input().split())
A = sorted(map(int, input().split()), reverse=True)
B = sorted(map(int, input().split()), reverse=True)
C = sorted(map(int, input().split()), reverse=True)
ret = sorted(
(
a + b + ... | def main():
import sys
input = sys.stdin.readline
x, y, z, k = map(int, input().split())
A = sorted(map(int, input().split()), reverse=True)
B = sorted(map(int, input().split()), reverse=True)
C = sorted(map(int, input().split()), reverse=True)
ret = []
for p, a in enumerate(A):
... | replace | 10 | 22 | 10 | 21 | TLE | |
p03078 | Python | Time Limit Exceeded | X, Y, Z, K = [int(i) for i in input().split()]
ABCList = [sorted([int(i) for i in input().split()], reverse=True) for _ in range(3)]
ABSum = sorted([i + j for i in ABCList[0] for j in ABCList[1]], reverse=True)[:K]
for ans in sorted([i + j for i in ABSum for j in ABCList[2]], reverse=True)[:K]:
print(ans)
| X, Y, Z, K = [int(i) for i in input().split()]
ABCList = [sorted([int(i) for i in input().split()], reverse=True) for _ in range(3)]
ansList = []
for i, A in enumerate(ABCList[0]):
for j, B in enumerate(ABCList[1]):
for k, C in enumerate(ABCList[2]):
if (i + 1) * (j + 1) * (k + 1) <= K:
... | replace | 3 | 5 | 3 | 13 | TLE | |
p03078 | C++ | Time Limit Exceeded | #include <algorithm>
#include <functional>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int X, Y, Z, K;
vector<long long> A(1001, 0);
vector<long long> B(1001, 0);
vector<long long> C(1001, 0);
vector<long long> ret;
vector<long long> ret2;
cin >> X >> Y >> Z >> K;
for (in... | #include <algorithm>
#include <functional>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int X, Y, Z, K;
vector<long long> A(1001, 0);
vector<long long> B(1001, 0);
vector<long long> C(1001, 0);
vector<long long> ret;
vector<long long> ret2;
cin >> X >> Y >> Z >> K;
for (in... | replace | 35 | 36 | 35 | 36 | TLE | |
p03078 | Python | Time Limit Exceeded | X, Y, Z, K = map(int, input().split())
(*A,) = sorted(map(int, input().split()), reverse=True)
(*B,) = sorted(map(int, input().split()), reverse=True)
(*C,) = sorted(map(int, input().split()), reverse=True)
AB = [A[x] + B[y] for y in range(Y) for x in range(X)]
AB.sort(reverse=True)
AB = AB[:K]
XY = len(AB)
ABC = [AB[x... | X, Y, Z, K = map(int, input().split())
(*A,) = sorted(map(int, input().split()), reverse=True)
(*B,) = sorted(map(int, input().split()), reverse=True)
(*C,) = sorted(map(int, input().split()), reverse=True)
AB = [A[x] + B[y] for y in range(Y) for x in range(X)]
AB.sort(reverse=True)
AB = AB[:K]
XY = len(AB)
ABC = [AB[x... | replace | 8 | 9 | 8 | 9 | TLE | |
p03078 | Python | Time Limit Exceeded | x, y, z, k = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
goukei = []
for i in range(x):
for j in range(y):
goukei.append(A[i] + B[j])
goukei.sort()
goukei2 = goukei[-k:]
goukei3 = []
for c in C:
for ab in goukei2:
... | x, y, z, k = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
goukei = []
for a in A:
for b in B:
goukei.append(a + b)
goukei.sort()
goukei2 = goukei[-k:]
goukei3 = []
for c in C:
for ab in goukei2:
goukei3.appe... | replace | 5 | 8 | 5 | 8 | TLE | |
p03078 | Python | Runtime Error | x, y, z, k = map(int, input().split())
A = sorted(list(map(int, input().split())), reverse=True)
B = sorted(list(map(int, input().split())), reverse=True)
C = sorted(list(map(int, input().split())), reverse=True)
AB = []
for a in A:
for b in B:
AB.append(a + b)
AB.sort(reverse=True)
ABC = []
for i in ran... | x, y, z, k = map(int, input().split())
A = sorted(list(map(int, input().split())), reverse=True)
B = sorted(list(map(int, input().split())), reverse=True)
C = sorted(list(map(int, input().split())), reverse=True)
AB = []
for a in A:
for b in B:
AB.append(a + b)
AB.sort(reverse=True)
ABC = []
for i in ran... | replace | 13 | 14 | 13 | 14 | 0 | |
p03078 | Python | Time Limit Exceeded | x, y, z, k = map(int, input().split())
a_array = sorted([int(x) for x in input().split()], reverse=True)
b_array = sorted([int(x) for x in input().split()], reverse=True)
c_array = sorted([int(x) for x in input().split()], reverse=True)
def solver1():
ab_array = [x + y for x in a_array for y in b_array]
abc_a... | x, y, z, k = map(int, input().split())
a_array = sorted([int(x) for x in input().split()], reverse=True)
b_array = sorted([int(x) for x in input().split()], reverse=True)
c_array = sorted([int(x) for x in input().split()], reverse=True)
def solver1():
ab_array = sorted([x + y for x in a_array for y in b_array], r... | replace | 7 | 8 | 7 | 8 | TLE | |
p03078 | 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 1000000000000000000
#define MOD 10007
#define rng(a) a.begin(), a.end()
#define rrng(a) a.rbegin(), a.rend()
int main() {
int X, Y, Z, K;
cin >> X >> Y >> Z >> K;
vector<l... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;
#define INF 1000000000000000000
#define MOD 10007
#define rng(a) a.begin(), a.end()
#define rrng(a) a.rbegin(), a.rend()
int main() {
int X, Y, Z, K;
cin >> X >> Y >> Z >> K;
vector<l... | replace | 35 | 36 | 35 | 36 | -11 | |
p03078 | C++ | Time Limit Exceeded | #include <algorithm>
#include <array>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <string>
#include <thread... | #include <algorithm>
#include <array>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <string>
#include <thread... | insert | 97 | 97 | 97 | 101 | TLE | |
p03078 | Python | Time Limit Exceeded | import heapq
def heappush_max(heap, item):
heap.append(item)
heapq._siftdown_max(heap, 0, len(heap) - 1)
def heappop_max(heap):
lastelt = heap.pop()
if heap:
return_item = heap[0]
heap[0] = lastelt
heapq._siftup_max(heap, 0)
return return_item
return lastelt
X, ... | import heapq
def heappush_max(heap, item):
heap.append(item)
heapq._siftdown_max(heap, 0, len(heap) - 1)
def heappop_max(heap):
lastelt = heap.pop()
if heap:
return_item = heap[0]
heap[0] = lastelt
heapq._siftup_max(heap, 0)
return return_item
return lastelt
X, ... | replace | 23 | 30 | 23 | 42 | TLE | |
p03078 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define DUMP(x) std::cerr << (#x) << " = " << (x) << "\n"
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define REP(i, k, n) for (int i = (k); i < (int)(n); ++i)
#define ALL(r) r.begin(), r.end()
#define YES cout << "YES" << endl
#define Yes cout << "Yes" << endl
#... | #include <bits/stdc++.h>
using namespace std;
#define DUMP(x) std::cerr << (#x) << " = " << (x) << "\n"
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define REP(i, k, n) for (int i = (k); i < (int)(n); ++i)
#define ALL(r) r.begin(), r.end()
#define YES cout << "YES" << endl
#define Yes cout << "Yes" << endl
#... | replace | 86 | 87 | 86 | 87 | TLE | |
p03078 | C++ | Time Limit Exceeded | #include "bits/stdc++.h"
using namespace std;
#define ASC(vec) vec.begin(), vec.end() // 昇順ソート 例:sort(ASC(vec));
#define DESC(vec) vec.rbegin(), vec.rend() // 降順ソート 例:sort(DESC(vec));
#define rep(i, n) for (int i = 0; i < n; i++)
#define Rep(i, n) for (int i = 1; i < n; i++)
#define In(vec) rep(i, n) cin >> vec[i];
#d... | #include "bits/stdc++.h"
using namespace std;
#define ASC(vec) vec.begin(), vec.end() // 昇順ソート 例:sort(ASC(vec));
#define DESC(vec) vec.rbegin(), vec.rend() // 降順ソート 例:sort(DESC(vec));
#define rep(i, n) for (int i = 0; i < n; i++)
#define Rep(i, n) for (int i = 1; i < n; i++)
#define In(vec) rep(i, n) cin >> vec[i];
#d... | replace | 68 | 69 | 68 | 74 | TLE | |
p03078 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define cs \
ios_base::sync_with_stdio(0); \
cin.tie(0); \... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define cs \
ios_base::sync_with_stdio(0); \
cin.tie(0); \... | replace | 22 | 23 | 22 | 23 | 0 | |
p03078 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
// #include <mylib.h>
using namespace std;
// cin.sync_with_stdio(false);
#define FOR(i, a, b) for (ll i = (a); i < (b); ++i)
#define FOR_EQ(i, a, b) for (ll i = (a); i <= (b); ++i)
#define FOR_RE(i, a, b) \
for ( ... | #include <bits/stdc++.h>
// #include <mylib.h>
using namespace std;
// cin.sync_with_stdio(false);
#define FOR(i, a, b) for (ll i = (a); i < (b); ++i)
#define FOR_EQ(i, a, b) for (ll i = (a); i <= (b); ++i)
#define FOR_RE(i, a, b) \
for ( ... | replace | 131 | 132 | 131 | 132 | TLE | |
p03078 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
void ts() {
cout << "***我只想过个水题抽奖****" << endl;
cout << "***I JUST WANT PASS A WATER-PROBLEM FOR LUCK DRAW***" << endl;
}
#define ll long long
int x, y, z, m;
ll a[1005], b[1005], c[1005];
vector<ll> v;
void solve1() {
scanf("%d%d%d%d", &x, &y, &z, &m);
for (int i =... | #include <bits/stdc++.h>
using namespace std;
void ts() {
cout << "***我只想过个水题抽奖****" << endl;
cout << "***I JUST WANT PASS A WATER-PROBLEM FOR LUCK DRAW***" << endl;
}
#define ll long long
int x, y, z, m;
ll a[1005], b[1005], c[1005];
vector<ll> v;
void solve1() {
scanf("%d%d%d%d", &x, &y, &z, &m);
for (int i =... | replace | 76 | 77 | 76 | 77 | TLE | |
p03078 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
long long x, y, z, K, a[1005], b[1005], c[1005];
vector<long long> vec;
int main() {
cin >> x >> y >> z >> K;
for (int i = 0; i < x; ++i)
cin >> a[i];
sort(a, a + x, greater<long long>());
for (int i = 0; i < y; ++i)
cin >> b[i];
sort(b, b + y, greate... | #include <bits/stdc++.h>
using namespace std;
long long x, y, z, K, a[1005], b[1005], c[1005];
vector<long long> vec;
int main() {
cin >> x >> y >> z >> K;
for (int i = 0; i < x; ++i)
cin >> a[i];
sort(a, a + x, greater<long long>());
for (int i = 0; i < y; ++i)
cin >> b[i];
sort(b, b + y, greate... | replace | 24 | 25 | 24 | 25 | 0 | |
p03078 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <queue>
#include <stack>
#include <vector>
#define rep(i, s, n) for (int i = s; i < n; i++)
#define repe(i, s, n) for (int i = s; i <= n; i++)
using namespace std;
typedef long long ll;
ll a[1000] = {};
ll b[1000] = {};
ll c[1000] = {};
ll D[1000000] = {};
ll E[1000000... | #include <algorithm>
#include <iostream>
#include <queue>
#include <stack>
#include <vector>
#define rep(i, s, n) for (int i = s; i < n; i++)
#define repe(i, s, n) for (int i = s; i <= n; i++)
using namespace std;
typedef long long ll;
ll a[1000] = {};
ll b[1000] = {};
ll c[1000] = {};
ll D[1000000] = {};
ll E[3000000... | replace | 14 | 15 | 14 | 15 | 0 | |
p03078 | C++ | Runtime Error | // ~/Remember,remember the 6th of March
#include <algorithm>
#include <assert.h>
#include <bitset>
#include <cmath>
#include <complex>
#include <ctype.h>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <map>
#include <math.h>
#include <numeric>
#include <queu... | // ~/Remember,remember the 6th of March
#include <algorithm>
#include <assert.h>
#include <bitset>
#include <cmath>
#include <complex>
#include <ctype.h>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <map>
#include <math.h>
#include <numeric>
#include <queu... | replace | 57 | 59 | 57 | 62 | 0 | |
p03078 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
using lli = long long int;
int main() {
int x, y, z, k;
cin >> x >> y >> z >> k;
vector<lli> a(x);
vector<lli> b(y);
vector<lli> c(z);
REP(i, x) cin >> a.at(i);
REP(j, y) cin >> b.at(j);
REP(k, z) cin ... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
using lli = long long int;
int main() {
int x, y, z, k;
cin >> x >> y >> z >> k;
vector<lli> a(x);
vector<lli> b(y);
vector<lli> c(z);
REP(i, x) cin >> a.at(i);
REP(j, y) cin >> b.at(j);
REP(k, z) cin ... | replace | 31 | 32 | 31 | 32 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): vector::_M_range_check: __n (which is 4) >= this->size() (which is 4)
|
p03078 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep2(x, fr, to) for (int(x) = (fr); (x) < (to); (x)++)
#define rep(x, to) for (int(x) = 0; (x) < (to); (x)++)
#define repr(x, fr, to) for (int(x) = (fr); (x) >= (to); (x)--)
#define all(c) (c).begin(), (c).end()
#define sz(v) (int)(v).size()
typedef int64_t ll;
t... | #include <bits/stdc++.h>
using namespace std;
#define rep2(x, fr, to) for (int(x) = (fr); (x) < (to); (x)++)
#define rep(x, to) for (int(x) = 0; (x) < (to); (x)++)
#define repr(x, fr, to) for (int(x) = (fr); (x) >= (to); (x)--)
#define all(c) (c).begin(), (c).end()
#define sz(v) (int)(v).size()
typedef int64_t ll;
t... | replace | 37 | 38 | 37 | 38 | 0 | |
p03078 | C++ | Runtime Error | #include <algorithm>
#include <array>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
#define Rep(i, a, b) for (int i = a; i < b; i++)
#define rep(i,... | #include <algorithm>
#include <array>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
#define Rep(i, a, b) for (int i = a; i < b; i++)
#define rep(i,... | replace | 63 | 64 | 63 | 64 | 0 | |
p03078 | C++ | Runtime Error | // D.cpp
#include <bits/stdc++.h>
#define ll long long
#define pr pair<ll, ll>
using namespace std;
const int MAX_N = 1010;
ll seqA[MAX_N], seqB[MAX_N], seqC[MAX_N], x, y, z, k, current_seq[MAX_N << 2],
tmp[MAX_N << 2];
struct node {
ll val, ptr1, ptr2;
bool operator<(const node &nd) const { return val < nd.val... | // D.cpp
#include <bits/stdc++.h>
#define ll long long
#define pr pair<ll, ll>
using namespace std;
const int MAX_N = 10100;
ll seqA[MAX_N], seqB[MAX_N], seqC[MAX_N], x, y, z, k, current_seq[MAX_N << 2],
tmp[MAX_N << 2];
struct node {
ll val, ptr1, ptr2;
bool operator<(const node &nd) const { return val < nd.va... | replace | 5 | 6 | 5 | 6 | 0 | |
p03078 | C++ | Runtime Error | #include <algorithm>
#include <complex>
#include <cstring>
#include <deque>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#ifdef LDEBUG
#define debug(x) cout << ... | #include <algorithm>
#include <complex>
#include <cstring>
#include <deque>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#ifdef LDEBUG
#define debug(x) cout << ... | replace | 36 | 37 | 36 | 37 | 0 | |
p03078 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int X, Y, Z, K;
cin >> X >> Y >> Z >> K;
long long A[X], B[Y], C[Z];
for (int i = 0; i < X; ++i)
cin >> A[i];
for (int i = 0; i < Y; ++i)
cin >> B[i];
for (int i = 0; i < Z; ++i)
cin >> C[i... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int X, Y, Z, K;
cin >> X >> Y >> Z >> K;
long long A[X], B[Y], C[Z];
for (int i = 0; i < X; ++i)
cin >> A[i];
for (int i = 0; i < Y; ++i)
cin >> B[i];
for (int i = 0; i < Z; ++i)
cin >> C[i... | replace | 26 | 28 | 26 | 28 | 0 | |
p03078 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#include <cmath>
#include <string>
using namespace std;
#define ll long long int
#define ld long double
#define loop(i, n) for (int i = 0; i < n; i++)
#define loops(i, s, n) for (int i = s; i < n; i++)
#define pb push_back
#define mp make_pair
#define all(v) v.begin(), v.end()
#define sz(x) (... | #include <bits/stdc++.h>
#include <cmath>
#include <string>
using namespace std;
#define ll long long int
#define ld long double
#define loop(i, n) for (int i = 0; i < n; i++)
#define loops(i, s, n) for (int i = s; i < n; i++)
#define pb push_back
#define mp make_pair
#define all(v) v.begin(), v.end()
#define sz(x) (... | replace | 39 | 44 | 39 | 48 | TLE | |
p03078 | C++ | Time Limit Exceeded | #define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <assert.h>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <time.h>
#include <vector... | #define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <assert.h>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <time.h>
#include <vector... | replace | 637 | 638 | 637 | 638 | TLE | |
p03078 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
bool cmp(long long int a, long long int b) { return a > b; }
int main() {
long long int x, y, z, k, t;
cin >> x >> y >> z >> k;
vector<long long int> a, b, c, d, e;
for (long long int i = 0; i < x; i++) {
cin >> t;
a.push_ba... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
bool cmp(long long int a, long long int b) { return a > b; }
int main() {
long long int x, y, z, k, t;
cin >> x >> y >> z >> k;
vector<long long int> a, b, c, d, e;
for (long long int i = 0; i < x; i++) {
cin >> t;
a.push_ba... | replace | 30 | 31 | 30 | 32 | TLE | |
p03078 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
typedef long long unsigned int ll;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
ll X, Y, Z, K;
ll A[1010... | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
typedef long long unsigned int ll;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
ll X, Y, Z, K;
ll A[1010... | replace | 22 | 23 | 22 | 23 | 0 | |
p03078 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main(int argc, char const *argv[]) {
int X, Y, Z, K;
std::cin >> X >> Y >> Z >> K;
std::vector<long long> A(X);
std::vector<long long> B(Y);
std::vector<long long> C(Z);
std::vector<long long> AB;
std::ve... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main(int argc, char const *argv[]) {
int X, Y, Z, K;
std::cin >> X >> Y >> Z >> K;
std::vector<long long> A(X);
std::vector<long long> B(Y);
std::vector<long long> C(Z);
std::vector<long long> AB;
std::ve... | replace | 31 | 33 | 31 | 34 | 0 | |
p03078 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> Pii;
typedef vector<ll> Vi;
typedef vector<Vi> VVi;
const double EPS = (1e-7);
const ll INF = (1e13);
const double PI = (acos(-1));
const ll MOD = ll(1e9) + 7;
#define REP(i, n) for (ll i = 0; i < (ll)(n); i++)
#define REPR(i, n... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> Pii;
typedef vector<ll> Vi;
typedef vector<Vi> VVi;
const double EPS = (1e-7);
const ll INF = (1e13);
const double PI = (acos(-1));
const ll MOD = ll(1e9) + 7;
#define REP(i, n) for (ll i = 0; i < (ll)(n); i++)
#define REPR(i, n... | replace | 96 | 97 | 96 | 99 | -6 | Fatal glibc error: malloc assertion failure in sysmalloc: (old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)
|
p03078 | 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;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
ll x, y, z, k;
cin >> x >> y >> z >> k;
vector<ll> A(x), B(y), C(z);
rep(i, x) { cin >> A[i]; }
rep(i, y) { cin >> B[i]; }
rep(i, k)... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
typedef long long ll;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
ll x, y, z, k;
cin >> x >> y >> z >> k;
vector<ll> A(x), B(y), C(z);
rep(i, x) { cin >> A[i]; }
rep(i, y) { cin >> B[i]; }
rep(i, k)... | replace | 20 | 21 | 20 | 21 | 0 | |
p03078 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
int main() {
int X, Y, Z, K;
cin >> X >> Y >> X >> K;
vll A(X), B(Y), C(Z);
for (int i = 0; i < X; ++i) {
ll a;
cin >> a;
A[i] = a;
}
for (int i = 0; i < Y; ++i) {
ll b;
cin >> b;
B[i] = b;
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
int main() {
int X, Y, Z, K;
cin >> X >> Y >> Z >> K;
vll A(X), B(Y), C(Z);
for (int i = 0; i < X; ++i) {
ll a;
cin >> a;
A[i] = a;
}
for (int i = 0; i < Y; ++i) {
ll b;
cin >> b;
B[i] = b;
... | replace | 7 | 8 | 7 | 8 | -6 | terminate called after throwing an instance of 'std::length_error'
what(): cannot create std::vector larger than max_size()
|
p03078 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
int main() {
int X, Y, Z, K;
cin >> X >> Y >> Z >> K;
vll A, B, C;
for (int i = 0; i < X; ++i) {
ll a;
cin >> a;
A.push_back(a);
}
for (int i = 0; i < Y; ++i) {
ll b;
cin >> b;
B.push_back(b)... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
int main() {
int X, Y, Z, K;
cin >> X >> Y >> Z >> K;
vll A, B, C;
for (int i = 0; i < X; ++i) {
ll a;
cin >> a;
A.push_back(a);
}
for (int i = 0; i < Y; ++i) {
ll b;
cin >> b;
B.push_back(b)... | replace | 43 | 44 | 43 | 44 | -11 | |
p03078 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
long long X, Y, Z, K, A[1009], B[1009], C[1009];
vector<long long> vec;
int main() {
cin >> X >> Y >> Z >> K;
for (int i = 0; i < X; i++)
cin >> A[i];
sort(A, A + X, greater<long long>());
for (int i = 0; i < Y; i++)
cin >> B[i];
sort(B, B + Y, greater<l... | #include <bits/stdc++.h>
using namespace std;
long long X, Y, Z, K, A[1009], B[1009], C[1009];
vector<long long> vec;
int main() {
cin >> X >> Y >> Z >> K;
for (int i = 0; i < X; i++)
cin >> A[i];
sort(A, A + X, greater<long long>());
for (int i = 0; i < Y; i++)
cin >> B[i];
sort(B, B + Y, greater<l... | replace | 18 | 21 | 18 | 21 | 0 | |
p03078 | C++ | Runtime Error | #include <algorithm>
#include <climits>
#include <deque>
#include <iostream>
#include <map>
#include <math.h>
#include <set>
#include <string.h>
#include <utility>
#include <vector>
using namespace std;
#define dlog(str) cout << "====" << str << endl;
#define INF 999999999
#define REP(i, n) for (int i = 0, i##_l = (n)... | #include <algorithm>
#include <climits>
#include <deque>
#include <iostream>
#include <map>
#include <math.h>
#include <set>
#include <string.h>
#include <utility>
#include <vector>
using namespace std;
#define dlog(str) cout << "====" << str << endl;
#define INF 999999999
#define REP(i, n) for (int i = 0, i##_l = (n)... | replace | 42 | 43 | 42 | 43 | 0 | |
p03078 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <cstdint>
#include <iostream>
#include <map>
#include <vector>
using namespace std;
typedef int64_t SI;
typedef uint64_t UI;
void read(SI &N, vector<SI> &V) {
cin >> N;
V.resize(N);
for (size_t i = 0; i < N; i++) {
SI x;
cin >> x;
V[i] = x;
}
}
int... | #include <algorithm>
#include <cassert>
#include <cstdint>
#include <iostream>
#include <map>
#include <vector>
using namespace std;
typedef int64_t SI;
typedef uint64_t UI;
void read(SI &N, vector<SI> &V) {
cin >> N;
V.resize(N);
for (size_t i = 0; i < N; i++) {
SI x;
cin >> x;
V[i] = x;
}
}
int... | replace | 62 | 63 | 62 | 63 | 0 | |
p03078 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int main() {
int x, y, z, k;
cin >> x >> y >> z >> k;
vector<long long> A(x);
vector<long long> B(y);
vector<long long> C(z);
f... | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int main() {
int x, y, z, k;
cin >> x >> y >> z >> k;
vector<long long> A(x);
vector<long long> B(y);
vector<long long> C(z);
f... | replace | 38 | 39 | 38 | 39 | 0 | |
p03078 | C++ | Runtime Error | #include <algorithm>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
int main() {
int X, Y, Z, K;
cin >> X >> Y >> Z >> K;
vector<ll> A(X), B(Y), C(Z);
for (int i = 0; i < X; i++) {
cin >> A[i];
}
for (int i = 0; i < Y; i++) {
... | #include <algorithm>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
int main() {
int X, Y, Z, K;
cin >> X >> Y >> Z >> K;
vector<ll> A(X), B(Y), C(Z);
for (int i = 0; i < X; i++) {
cin >> A[i];
}
for (int i = 0; i < Y; i++) {
... | replace | 27 | 28 | 27 | 28 | 0 | |
p03078 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
int main() {
int x, y, z, q;
cin >> x >> y >> z >> q;
vector<long long> a(x), b(y), c(z);
rep(i, x) cin >> a.at(i);
rep(i, y) cin >> b.at(i);
rep(i, z) cin >> c.at(i);
sort(a.begin(), a.end());
reverse(a.... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
int main() {
int x, y, z, q;
cin >> x >> y >> z >> q;
vector<long long> a(x), b(y), c(z);
rep(i, x) cin >> a.at(i);
rep(i, y) cin >> b.at(i);
rep(i, z) cin >> c.at(i);
sort(a.begin(), a.end());
reverse(a.... | replace | 21 | 22 | 21 | 22 | 0 | |
p03078 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int X, Y, Z, K;
cin >> X >> Y >> Z >> K;
long A[X], B[Y], C[Z];
vector<long> A_and_B, result;
for (int i = 0; i < K; i++) {
A_and_B[i] = 0;
result[i] = 0;
}
for (int i = 0; i < X; i++)
cin >> A[i];
... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int X, Y, Z, K;
cin >> X >> Y >> Z >> K;
long A[X], B[Y], C[Z];
vector<long> A_and_B, result;
for (int i = 0; i < X; i++)
cin >> A[i];
for (int i = 0; i < Y; i++)
cin >> B[i];
for (int i = 0; i < Z; i++)
... | delete | 10 | 14 | 10 | 10 | -11 | |
p03078 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define cout16 cout << setprecision(16)
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep2(i, f, n) for (int i = f; i < n; i++)
#define MAX(A) *max_element(A.begin(), A.end())
#define MIN(A) *min_element(A.begin(), A.end())
#define SORT(A) sort(A.begin(), A.end())
#define REV(A) reverse... | #include <bits/stdc++.h>
#define cout16 cout << setprecision(16)
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep2(i, f, n) for (int i = f; i < n; i++)
#define MAX(A) *max_element(A.begin(), A.end())
#define MIN(A) *min_element(A.begin(), A.end())
#define SORT(A) sort(A.begin(), A.end())
#define REV(A) reverse... | replace | 33 | 34 | 33 | 34 | TLE | |
p03078 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
using namespace std;
int x, y, z, kk;
long long a[1005], b[1005], c[1005];
long long ans[10005];
int cur = 0;
bool cmp(long long a1, long long a2) { return a1 > a2; }
int main()
{
ios::sync_with_stdio(false);
cin >> x >> y >> z >> kk;
for (int i = 1; i <= x; i++)
ci... | #include <algorithm>
#include <iostream>
using namespace std;
int x, y, z, kk;
long long a[1005], b[1005], c[1005];
long long ans[1000005];
int cur = 0;
bool cmp(long long a1, long long a2) { return a1 > a2; }
int main()
{
ios::sync_with_stdio(false);
cin >> x >> y >> z >> kk;
for (int i = 1; i <= x; i++)
... | replace | 5 | 6 | 5 | 6 | 0 | |
p03078 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
typedef long long ll;
int main() {
ll ans[2010] = {0};
int x, y, z, n, fir, i, j, k;
ll a[1010], b[1010], c[1010];
scanf("%d%d%d%d", &x, &y, &z, &n);
for (i = 0; i < x; i++)
scanf("%lld", &a[i]);
for (i = 0; i < y; i++)
scanf("%lld",... | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
typedef long long ll;
int main() {
ll ans[6010] = {0};
int x, y, z, n, fir, i, j, k;
ll a[1010], b[1010], c[1010];
scanf("%d%d%d%d", &x, &y, &z, &n);
for (i = 0; i < x; i++)
scanf("%lld", &a[i]);
for (i = 0; i < y; i++)
scanf("%lld",... | replace | 5 | 6 | 5 | 6 | 0 | |
p03078 | C++ | Runtime Error | #include <bits/stdc++.h>
#define int long long
const int N = 3e6 + 9;
long long ar[N], br[N], cr[N], dr[N], er[N], x, y, z, k, pos = 0, val = 0;
using namespace std;
signed main()
{
cin >> x >> y >> z >> k;
for (int i = 0; i < x; i++)
cin >> ar[i];
for (int i = 0; i < y; i++)
cin >> br[i];
for (in... | #include <bits/stdc++.h>
#define int long long
const int N = 3e6 + 9;
long long ar[N], br[N], cr[N], dr[N], er[N], x, y, z, k, pos = 0, val = 0;
using namespace std;
signed main()
{
cin >> x >> y >> z >> k;
for (int i = 0; i < x; i++)
cin >> ar[i];
for (int i = 0; i < y; i++)
cin >> br[i];
for (in... | replace | 29 | 32 | 29 | 32 | -11 | |
p03078 | C++ | Time Limit Exceeded |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
vector<ll> AB;
vector<ll> ABC;
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
ll X, Y, Z, K;
cin >> X >> Y >> Z >> K;
ll A[X], B[Y], C[Z];
for (int i = 0; i < X; ++i) {
cin >> A[i];
}
for (int i = 0; i < Y; ++i) {... |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
vector<ll> AB;
vector<ll> ABC;
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
ll X, Y, Z, K;
cin >> X >> Y >> Z >> K;
ll A[X], B[Y], C[Z];
for (int i = 0; i < X; ++i) {
cin >> A[i];
}
for (int i = 0; i < Y; ++i) {... | replace | 33 | 34 | 33 | 35 | TLE | |
p03078 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const long long INF = 1000000000;
typedef long long ll;
#define writeln(n) cout << n << "\n"
#define rep(i, n) for (int i = 0; i < (n); ++i)
typedef pair<int, int> P;
typedef pair<string, int> Psi;
vector<ll> A(1010), B(1010), C(1010);
int main() {
cin.tie(0);
ios... | #include <bits/stdc++.h>
using namespace std;
const long long INF = 1000000000;
typedef long long ll;
#define writeln(n) cout << n << "\n"
#define rep(i, n) for (int i = 0; i < (n); ++i)
typedef pair<int, int> P;
typedef pair<string, int> Psi;
vector<ll> A(1010), B(1010), C(1010);
int main() {
cin.tie(0);
ios... | replace | 35 | 36 | 35 | 36 | 0 | |
p03078 | C++ | Runtime Error | /*
* Author: windystreet
* Date : 2019-04-13 11:07:49
* Motto : Think twice, code once.
*/
#include <bits/stdc++.h>
using namespace std;
#define X first
#define Y second
#define eps 1e-5
#define gcd __gcd
#define pb push_back
#define PI acos(-1.0)
#define lowbit(x) (x) & (-x)
#define bug printf("!!!!!\n");
#d... | /*
* Author: windystreet
* Date : 2019-04-13 11:07:49
* Motto : Think twice, code once.
*/
#include <bits/stdc++.h>
using namespace std;
#define X first
#define Y second
#define eps 1e-5
#define gcd __gcd
#define pb push_back
#define PI acos(-1.0)
#define lowbit(x) (x) & (-x)
#define bug printf("!!!!!\n");
#d... | insert | 50 | 50 | 50 | 52 | 0 | |
p03078 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <stack>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
#define MOD 1000000007
#define int long long
using namespa... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <stack>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
#define MOD 1000000007
#define int long long
using namespa... | delete | 22 | 24 | 22 | 22 | -6 | terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
|
p03078 | C++ | Time Limit Exceeded | // g++ -std=c++11 a.cpp
#include <algorithm>
#include <assert.h>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <typeinfo>
#incl... | // g++ -std=c++11 a.cpp
#include <algorithm>
#include <assert.h>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <typeinfo>
#incl... | replace | 95 | 96 | 95 | 96 | TLE | |
p03078 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
#define p(var) std::cout << var << std::endl
#define pp(var) std::cout << #var " = " << var << std::endl
#define PI (acos(-1))
#define rep(i, n) for (int i = 0; i < (n); i++)
#define repeq(i, n) for (int i = 1; i <= (n); i++)
#define all(a) (a).... | #include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
#define p(var) std::cout << var << std::endl
#define pp(var) std::cout << #var " = " << var << std::endl
#define PI (acos(-1))
#define rep(i, n) for (int i = 0; i < (n); i++)
#define repeq(i, n) for (int i = 1; i <= (n); i++)
#define all(a) (a).... | replace | 25 | 27 | 25 | 26 | TLE | |
p03078 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <complex>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define int long long
#define reps(i, s, n) for (int(i) = (s);... | #include <algorithm>
#include <bitset>
#include <complex>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define int long long
#define reps(i, s, n) for (int(i) = (s);... | replace | 92 | 93 | 92 | 93 | TLE | |
p03078 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
// #include <boost/multiprecision/cpp_int.hpp>
// using namespace boost::multiprecision;
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// ll ncr(ll n,ll r){ll ans=1;r=min(r,n-r);for (int
// i=1;i<=r;i++){ans*=(n-r+i);ans/=i;}return ans;}
using namespace std... | #include <bits/stdc++.h>
// #include <boost/multiprecision/cpp_int.hpp>
// using namespace boost::multiprecision;
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// ll ncr(ll n,ll r){ll ans=1;r=min(r,n-r);for (int
// i=1;i<=r;i++){ans*=(n-r+i);ans/=i;}return ans;}
using namespace std... | replace | 60 | 63 | 60 | 68 | TLE | |
p03078 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int X, Y, Z, K; // X種Y種Z種から一つずつ買う,K:選び方
cin >> X >> Y >> Z >> K;
vector<long> A, B, C; // 価格
long a, b, c;
for (int i = 0; i < X; i++) {
cin >> a;
A.push_back(a);
}
for (int j = 0; j < Y; j++) {
cin >> b;
B.push_back(b);
}
fo... | #include <bits/stdc++.h>
using namespace std;
int main() {
int X, Y, Z, K; // X種Y種Z種から一つずつ買う,K:選び方
cin >> X >> Y >> Z >> K;
vector<long> A, B, C; // 価格
long a, b, c;
for (int i = 0; i < X; i++) {
cin >> a;
A.push_back(a);
}
for (int j = 0; j < Y; j++) {
cin >> b;
B.push_back(b);
}
fo... | insert | 35 | 35 | 35 | 49 | 0 | |
p03078 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
struct Fast {
Fast() {
std::cin.tie(0);
ios::sync_with_stdio(false);
}
} fast;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using pii = pair<int, int>;
using vll = vector<long long>;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#... | #include <bits/stdc++.h>
using namespace std;
struct Fast {
Fast() {
std::cin.tie(0);
ios::sync_with_stdio(false);
}
} fast;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using pii = pair<int, int>;
using vll = vector<long long>;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#... | replace | 31 | 34 | 31 | 35 | TLE | |
p03078 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
int main() {
int x, y, z, k;
cin >> x >> y >> z >> k;
vector<ll> a(x), b(y), c(z);
rep(i, x) cin >> a[i];
rep(i, y) cin >> b[i];
rep(i, z) cin >> c[i];
vector<ll> result;
rep(i, x... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
int main() {
int x, y, z, k;
cin >> x >> y >> z >> k;
vector<ll> a(x), b(y), c(z);
rep(i, x) cin >> a[i];
rep(i, y) cin >> b[i];
rep(i, z) cin >> c[i];
vector<ll> e;
rep(i, x) rep... | replace | 15 | 19 | 15 | 24 | TLE | |
p03078 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using P = pair<int, int>;
using ll = long long;
#define chmin(i, j) i = min(i, j);
#define chmax(i, j) i = max(i, j);
#define rep(i, n) for (int i = 0; i < n; i++)
ll X, Y, Z, K;
vector<ll> a, b, c;
vector<ll> ans;
bool solve(ll T, bool sp) {
int cnt = 0;
rep(i, X) {
... | #include <bits/stdc++.h>
using namespace std;
using P = pair<int, int>;
using ll = long long;
#define chmin(i, j) i = min(i, j);
#define chmax(i, j) i = max(i, j);
#define rep(i, n) for (int i = 0; i < n; i++)
ll X, Y, Z, K;
vector<ll> a, b, c;
vector<ll> ans;
bool solve(ll T, bool sp) {
int cnt = 0;
rep(i, X) {
... | replace | 42 | 43 | 42 | 43 | 0 | |
p03079 | Python | Runtime Error | A = int(input())
B = int(input())
C = int(input())
if A == B and B == C:
print("Yes")
else:
print("No")
| A, B, C = map(int, input().split())
if A == B and B == C:
print("Yes")
else:
print("No")
| replace | 0 | 3 | 0 | 1 | ValueError: invalid literal for int() with base 10: '2 2 2' | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03079/Python/s749501224.py", line 1, in <module>
A = int(input())
ValueError: invalid literal for int() with base 10: '2 2 2'
|
p03079 | C++ | Runtime Error | /*author: hyperion_1724
date:
*/
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
#ifndef ONLINE_JUDGE
freopen("INPUT.txt", "r", stdin);
// freopen ("OUTPUT.txt" , "w" , stdout);
#endif
int A, B, C;
cin >> A >> B >> C;
if (A == B && B ==... | /*author: hyperion_1724
date:
*/
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int A, B, C;
cin >> A >> B >> C;
if (A == B && B == C && A == C) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
return 0;
} | delete | 9 | 13 | 9 | 9 | 0 | |
p03079 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
int a, b, c;
cin >> a >> b >> c;
if (a != b || a != c) {
cout << "No";
} else {
cout <... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
// #ifndef ONLINE_JUDGE
// freopen("input.txt", "r", stdin);
// freopen("output.txt", "w", stdout);
// #endif
int a, b, c;
cin >> a >> b >> c;
if (a != b || a != c) {
cout << "No";
} e... | replace | 8 | 12 | 8 | 12 | 0 | |
p03079 | Python | Runtime Error | abc = list(map(int, input.split()))
if len(set(abc)) == 1:
print("Yes")
else:
print("No")
| abc = list(map(int, input().split()))
if len(set(abc)) == 1:
print("Yes")
else:
print("No")
| replace | 0 | 1 | 0 | 1 | AttributeError: 'builtin_function_or_method' object has no attribute 'split' | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03079/Python/s011676715.py", line 1, in <module>
abc = list(map(int, input.split()))
AttributeError: 'builtin_function_or_method' object has no attribute 'split'
|
p03079 | Python | Runtime Error | a, b, c = input()
if a == b == c:
print("Yes")
else:
print("No")
| a, b, c = input().split()
if a == b == c:
print("Yes")
else:
print("No")
| replace | 0 | 1 | 0 | 1 | ValueError: too many values to unpack (expected 3) | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03079/Python/s108336051.py", line 1, in <module>
a, b, c = input()
ValueError: too many values to unpack (expected 3)
|
p03080 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, r = 0, b = 0;
cin >> n;
char s[4];
for (int i = 0; i < n; i++) {
cin >> s[i];
}
for (int i = 0; i < n; i++) {
if (s[i] == 'B')
b += 1;
else
r += 1;
}
if (r > b)
cout << "Yes" << endl;
else
cout << "No" <... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, r = 0, b = 0;
cin >> n;
char s[n];
for (int i = 0; i < n; i++) {
cin >> s[i];
}
for (int i = 0; i < n; i++) {
if (s[i] == 'B')
b += 1;
else
r += 1;
}
if (r > b)
cout << "Yes" << endl;
else
cout << "No" <... | replace | 6 | 7 | 6 | 7 | 0 | |
p03080 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, count = 0;
cin >> N;
string S;
for (int i = 0; i < N; i++) {
cin >> S[i];
if (S[i] == 'R')
count++;
if (S[i] == 'B')
count--;
}
if (count <= 0)
cout << "No" << endl;
else
cout << "Yes" << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, count = 0;
cin >> N;
string S;
for (int i = 0; i < N; i++) {
cin >> S;
if (S[i] == 'R')
count++;
if (S[i] == 'B')
count--;
}
if (count <= 0)
cout << "No" << endl;
else
cout << "Yes" << endl;
} | replace | 8 | 9 | 8 | 9 | 0 | |
p03080 | C++ | Time Limit Exceeded | #include <iostream>
#include <string>
using namespace std;
int main() {
int people, count = 0;
string hat;
cin >> people;
cin >> hat;
for (int i = 0; i < people; i++) {
if (hat[i] == 'R') {
count++;
}
}
hat = (count > people / 2) ? "Yes" : "No";
cout << hat;
while (true) {
}
... | #include <iostream>
#include <string>
using namespace std;
int main() {
int people, count = 0;
string hat;
cin >> people;
cin >> hat;
for (int i = 0; i < people; i++) {
if (hat[i] == 'R') {
count++;
}
}
hat = (count > people / 2) ? "Yes" : "No";
cout << hat;
return 0;
} | delete | 24 | 26 | 24 | 24 | TLE | |
p03081 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int n, q;
char a[100005], b[100005];
string s;
int sol(int x, int u) {
x--;
for (int i = 1; i <= q; i++)
if (a[i] == s[x]) {
if (b[i] == 'L') {
x--;
if (x < 0 && !u)
return 1;
} else {
x++;
if (x == n && u)
... | #include <bits/stdc++.h>
using namespace std;
int n, q;
char a[200005], b[200005];
string s;
int sol(int x, int u) {
x--;
for (int i = 1; i <= q; i++)
if (a[i] == s[x]) {
if (b[i] == 'L') {
x--;
if (x < 0 && !u)
return 1;
} else {
x++;
if (x == n && u)
... | replace | 3 | 4 | 3 | 4 | 0 | |
p03081 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
template <class T> inline void init(T &x) {
x = 0;
char ch = getchar();
bool t = 0;
for (; ch > '9' || ch < '0'; ch = getchar())
if (ch == '-')
t = 1;
for (; ch >= '0' && ch <= '9'; ch = getchar())
x = (x << 1) + (x << 3) + (ch - 48);
if (t)
x ... | #include <bits/stdc++.h>
using namespace std;
template <class T> inline void init(T &x) {
x = 0;
char ch = getchar();
bool t = 0;
for (; ch > '9' || ch < '0'; ch = getchar())
if (ch == '-')
t = 1;
for (; ch >= '0' && ch <= '9'; ch = getchar())
x = (x << 1) + (x << 3) + (ch - 48);
if (t)
x ... | replace | 16 | 17 | 16 | 17 | 0 | |
p03081 | C++ | Time Limit Exceeded | #include <algorithm>
#include <array>
#include <climits>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
using lli = long long int;
using namespace std;
int inf = 1000000007;
int N, Q;
string s;
char t, d;
boo... | #include <algorithm>
#include <array>
#include <climits>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
using lli = long long int;
using namespace std;
int inf = 1000000007;
int N, Q;
string s;
char t, d;
boo... | replace | 57 | 58 | 57 | 58 | TLE | |
p03081 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <vector>
#define MOD 1000000007
typedef long long ll;
using namespace std;
int N, Q;
string s;
char t[100010], d[100010];
bool judge(int mid, int x) {
int now = mid - 1;
for (int... | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <vector>
#define MOD 1000000007
typedef long long ll;
using namespace std;
int N, Q;
string s;
char t[200020], d[200020];
bool judge(int mid, int x) {
int now = mid - 1;
for (int... | replace | 14 | 15 | 14 | 15 | 0 | |
p03081 | C++ | Time Limit Exceeded | /*
memo for solution
*/
#include <algorithm>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <memory>
#include <numeric>
#include <queu... | /*
memo for solution
*/
#include <algorithm>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <memory>
#include <numeric>
#include <queu... | replace | 121 | 123 | 121 | 123 | TLE | |
p03081 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;
typedef pair<ll, P> P3;
typedef pair<P, P> PP;
const ll MOD = ll(1e9 + 7);
const int IINF = INT_MAX;
const ll LLINF = LLONG_MAX;
const int MAX_N = int(2e4 + 5);
const double EPS = 1e-6;
const int ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;
typedef pair<ll, P> P3;
typedef pair<P, P> PP;
const ll MOD = ll(1e9 + 7);
const int IINF = INT_MAX;
const ll LLINF = LLONG_MAX;
const int MAX_N = int(2e5 + 5);
const double EPS = 1e-6;
const int ... | replace | 10 | 11 | 10 | 11 | 0 | |
p03081 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define fi first
#define se second
#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 repo(i, o, n) for (int i = o; i < (int)(n); ++i)
#define repm(i, n) for (int i = (int)(n)-1; i >= 0;... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define fi first
#define se second
#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 repo(i, o, n) for (int i = o; i < (int)(n); ++i)
#define repm(i, n) for (int i = (int)(n)-1; i >= 0;... | replace | 43 | 44 | 43 | 44 | 0 | |
p03081 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 7;
int n, q;
char c[N];
char a[N], b[N];
int dl, dr;
int die(int x) {
for (int i = 1; i <= q; i++) {
if (a[i] != c[x])
continue;
if (b[i] == 'R')
x++;
else
x--;
if (x == 0)
return -1;
if (x == n + 1)
... | #include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 7;
int n, q;
char c[N];
char a[N], b[N];
int dl, dr;
int die(int x) {
for (int i = 1; i <= q; i++) {
if (a[i] != c[x])
continue;
if (b[i] == 'R')
x++;
else
x--;
if (x == 0)
return -1;
if (x == n + 1)
... | replace | 3 | 4 | 3 | 4 | 0 | |
p03081 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ft first
#define sc second
#define lb lower_bound
#define ub upper_bound
#define pb push_back
#define pt(sth) cout << sth << "\n"
#define chmax(a, b) \
{ ... | #include <bits/stdc++.h>
#define ft first
#define sc second
#define lb lower_bound
#define ub upper_bound
#define pb push_back
#define pt(sth) cout << sth << "\n"
#define chmax(a, b) \
{ ... | replace | 30 | 31 | 30 | 31 | 0 | |
p03081 | C++ | Runtime Error | #include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define srep(i, s, t) for (int i = s; i < t; ++i)
#define rng(a) a.begin(), a.end()
#define maxs(x, y) (x = ma... | #include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define srep(i, s, t) for (int i = s; i < t; ++i)
#define rng(a) a.begin(), a.end()
#define maxs(x, y) (x = ma... | replace | 125 | 126 | 125 | 126 | 0 | |
p03081 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int N, Q;
string s;
char t[123456], d[123456];
bool left(int p) {
for (int i = 0; i < Q; i++) {
... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int N, Q;
string s;
char t[223456], d[223456];
bool left(int p) {
for (int i = 0; i < Q; i++) {
... | replace | 16 | 17 | 16 | 17 | 0 | |
p03081 | C++ | Runtime Error | #include <bits/stdc++.h>
#define fi first
#define se second
#define pii pair<int, int>
#define mp make_pair
#define pb push_back
#define space putchar(' ')
#define enter putchar('\n')
#define eps 1e-10
#define MAXN 20005
// #define ivorysi
using namespace std;
typedef long long int64;
typedef unsigned int u32;
typedef ... | #include <bits/stdc++.h>
#define fi first
#define se second
#define pii pair<int, int>
#define mp make_pair
#define pb push_back
#define space putchar(' ')
#define enter putchar('\n')
#define eps 1e-10
#define MAXN 200005
// #define ivorysi
using namespace std;
typedef long long int64;
typedef unsigned int u32;
typedef... | replace | 9 | 10 | 9 | 10 | 0 | |
p03081 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
#define ld long double
#define pb push_back
#define f first
#define se second
#define pll pair<ll, ll>
#define pii pair<int, int>
using namespace std;
const int N = 2e5 + 123;
const ll mod = 1e9 + 7;
const ll inf = 1e18;
const int M = 210;
ll n, q;
char a[N], s[N], d[N];... | #include <bits/stdc++.h>
#define ll long long
#define ld long double
#define pb push_back
#define f first
#define se second
#define pll pair<ll, ll>
#define pii pair<int, int>
using namespace std;
const int N = 2e5 + 123;
const ll mod = 1e9 + 7;
const ll inf = 1e18;
const int M = 210;
ll n, q;
char a[N], s[N], d[N];... | replace | 53 | 54 | 53 | 54 | 0 | |
p03081 | C++ | Runtime Error | #include "bits/stdc++.h"
#define REP(i, n) for (ll i = 0; i < ll(n); ++i)
#define RREP(i, n) for (ll i = ll(n) - 1; i >= 0; --i)
#define FOR(i, m, n) for (ll i = m; i < ll(n); ++i)
#define RFOR(i, m, n) for (ll i = ll(n) - 1; i >= ll(m); --i)
#define ALL(v) (v).begin(), (v).end()
#define UNIQUE(v) v.erase(unique(ALL(v... | #include "bits/stdc++.h"
#define REP(i, n) for (ll i = 0; i < ll(n); ++i)
#define RREP(i, n) for (ll i = ll(n) - 1; i >= 0; --i)
#define FOR(i, m, n) for (ll i = m; i < ll(n); ++i)
#define RFOR(i, m, n) for (ll i = ll(n) - 1; i >= ll(m); --i)
#define ALL(v) (v).begin(), (v).end()
#define UNIQUE(v) v.erase(unique(ALL(v... | replace | 114 | 115 | 114 | 118 | 0 | |
p03081 | C++ | Runtime Error | #include <algorithm>
#include <cctype>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
#define REP(i, n) for (ll(i) = (0); (i) < (n); ++i)
#define PB push_back
#define MP make_pair
#define FI first
#define ... | #include <algorithm>
#include <cctype>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
#define REP(i, n) for (ll(i) = (0); (i) < (n); ++i)
#define PB push_back
#define MP make_pair
#define FI first
#define ... | replace | 37 | 38 | 37 | 38 | 0 | |
p03081 | C++ | Runtime Error | /// supercalifragilisticexpialidocious.
#include <bits/stdc++.h>
using namespace std;
#define f first
#define s second
#define PB pop_back
#define pb push_back
#define mp make_pair
#define int long long
#define sz(s) (int)s.size()
#define seper(n) setprecision(n)
#define all(sum) sum.begin(), sum.end()
#define mem(a, b... | /// supercalifragilisticexpialidocious.
#include <bits/stdc++.h>
using namespace std;
#define f first
#define s second
#define PB pop_back
#define pb push_back
#define mp make_pair
#define int long long
#define sz(s) (int)s.size()
#define seper(n) setprecision(n)
#define all(sum) sum.begin(), sum.end()
#define mem(a, b... | replace | 19 | 20 | 19 | 20 | 0 | |
p03081 | Python | Runtime Error | N, Q = map(int, input().split())
s = input()
Query = [input().split() for i in range(Q)]
left, right = 0, N - 1
for t, d in reversed(Query):
if d == "L":
if t == s[left]:
left += 1
if right < N - 1 and t == s[right + 1]:
right = min(right + 1, N - 1)
else:
if l... | # N, Q = map(int, input().split())
import sys
input = sys.stdin.readline
N, Q = tuple(map(int, input().split()))
s = input()
Query = [input().split() for i in range(Q)]
left, right = 0, N - 1
for t, d in reversed(Query):
if d == "L":
if t == s[left]:
left += 1
if right < N - 1 and t... | replace | 0 | 1 | 0 | 6 | 0 | |
p03081 | C++ | Runtime Error | #include <bits/stdc++.h>
#define pii pair<int, int>
#define pb push_back
#define mp make_pair
#define NMAX 7003
using namespace std;
int N, Q;
string s;
pair<char, char> Que[100003];
int fall(int x) {
if (x < 0)
return -1;
if (x >= N)
return 1;
for (int i = 0; i < Q; ++i) {
if (s[x] == Que[i].first) {... | #include <bits/stdc++.h>
#define pii pair<int, int>
#define pb push_back
#define mp make_pair
#define NMAX 7003
using namespace std;
int N, Q;
string s;
pair<char, char> Que[200007];
int fall(int x) {
if (x < 0)
return -1;
if (x >= N)
return 1;
for (int i = 0; i < Q; ++i) {
if (s[x] == Que[i].first) {... | replace | 8 | 9 | 8 | 9 | 0 | |
p03081 | C++ | Runtime Error | #include <iostream>
using namespace std;
typedef long long ll;
char A[100000], B[100000];
ll n, k, s, g, m, ans;
string t;
bool f(ll p, ll q) {
for (int i = 0; i < k; i++) {
if (A[i] == t[p]) {
if (B[i] == 'L')
p--;
else
p++;
}
}
if (p == q)
return true;
return false;
}
i... | #include <iostream>
using namespace std;
typedef long long ll;
char A[200000], B[200000];
ll n, k, s, g, m, ans;
string t;
bool f(ll p, ll q) {
for (int i = 0; i < k; i++) {
if (A[i] == t[p]) {
if (B[i] == 'L')
p--;
else
p++;
}
}
if (p == q)
return true;
return false;
}
i... | replace | 3 | 4 | 3 | 4 | 0 | |
p03081 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, Q;
cin >> N >> Q;
string s;
cin >> s;
vector<char> j(N);
vector<char> LR(Q);
vector<bool> ans1(N, false);
vector<bool> ans2(N, false);
for (int i = 0; i < Q; i++) {
cin >> j[i] >> LR[i];
}
char mL = s[0], mR = s[N - 1];
int l... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, Q;
cin >> N >> Q;
string s;
cin >> s;
vector<char> j(Q);
vector<char> LR(Q);
vector<bool> ans1(N, false);
vector<bool> ans2(N, false);
for (int i = 0; i < Q; i++) {
cin >> j[i] >> LR[i];
}
char mL = s[0], mR = s[N - 1];
int l... | replace | 8 | 9 | 8 | 9 | 0 | |
p03081 | C++ | Runtime Error | // binary search
#include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#inclu... | // binary search
#include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#inclu... | replace | 25 | 26 | 25 | 26 | 0 | |
p03081 | C++ | Runtime Error | typedef long long ll;
typedef long double ld;
#include <bits/stdc++.h>
using namespace std;
int main() {
ll n, q;
std::cin >> n >> q;
string s;
std::cin >> s;
vector<char> t(n), d(n);
for (int i = 0; i < q; i++) {
std::cin >> t[i] >> d[i];
}
ll l = -1;
ll r = n;
while (r - l > 1) {
ll mid ... | typedef long long ll;
typedef long double ld;
#include <bits/stdc++.h>
using namespace std;
int main() {
ll n, q;
std::cin >> n >> q;
string s;
std::cin >> s;
vector<char> t(q), d(q);
for (int i = 0; i < q; i++) {
std::cin >> t[i] >> d[i];
}
ll l = -1;
ll r = n;
while (r - l > 1) {
ll mid ... | replace | 10 | 11 | 10 | 11 | 0 | |
p03081 | C++ | Runtime Error | #include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define mt make_tuple
typedef long long int ll;
using namespace std;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef long long int ll;
int n, q;
string s;
char t[114514], d[114514];
int sim(int pos) {
for (int i = 0; i < q; i++) {
if (... | #include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define mt make_tuple
typedef long long int ll;
using namespace std;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef long long int ll;
int n, q;
string s;
char t[214514], d[214514];
int sim(int pos) {
for (int i = 0; i < q; i++) {
if (... | replace | 14 | 15 | 14 | 15 | 0 | |
p03081 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
// #define int long long
#define rep(i, n) for (int i = (int)(0); i < (int)(n); ++i)
#define reps(i, n) for (int i = (int)(1); i <= (int)(n); ++i)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--)
#define rreps(i, n) for (int i = ((int)(n)); i > 0; i--)
#define ir... | #include <bits/stdc++.h>
using namespace std;
// #define int long long
#define rep(i, n) for (int i = (int)(0); i < (int)(n); ++i)
#define reps(i, n) for (int i = (int)(1); i <= (int)(n); ++i)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--)
#define rreps(i, n) for (int i = ((int)(n)); i > 0; i--)
#define ir... | replace | 94 | 95 | 94 | 95 | 0 | |
p03081 | C++ | Time Limit Exceeded | #include <algorithm>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int N, Q;
string s;
vector<int> c(200000, 0);
vector<vector<int>> td(200000, vector<int>(2, 0));
... | #include <algorithm>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int N, Q;
string s;
vector<int> c(200000, 0);
vector<vector<int>> td(200000, vector<int>(2, 0));
... | replace | 43 | 44 | 43 | 44 | TLE | |
p03081 | C++ | Runtime Error | #include <bits/stdc++.h>
#define FOR(i, k, n) for (int i = (k); i < (n); ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(x) begin(x), end(x)
using namespace std;
using vecint = vector<int>;
using ll = int64_t;
int pos(const string &s, const string &t, const vector<bool> &dir, int i) {
int q = t.size();
REP(j, q) ... | #include <bits/stdc++.h>
#define FOR(i, k, n) for (int i = (k); i < (n); ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(x) begin(x), end(x)
using namespace std;
using vecint = vector<int>;
using ll = int64_t;
int pos(const string &s, const string &t, const vector<bool> &dir, int i) {
int q = t.size();
REP(j, q) ... | replace | 29 | 30 | 29 | 30 | 0 | |
p03081 | C++ | Time Limit Exceeded | #include <iostream>
#include <string>
using namespace std;
int func(int start, string s, char *t, char *d, int Q, int N);
int main(void) {
int N;
cin >> N;
int Q;
cin >> Q;
string s;
cin >> s;
int min;
int max;
char t[Q];
char d[Q];
for (int i = 0; i < Q; i++) {
cin >> t[i];
cin >> d[i];... | #include <iostream>
#include <string>
using namespace std;
int func(int start, string s, char *t, char *d, int Q, int N);
int main(void) {
int N;
cin >> N;
int Q;
cin >> Q;
string s;
cin >> s;
int min;
int max;
char t[Q];
char d[Q];
for (int i = 0; i < Q; i++) {
cin >> t[i];
cin >> d[i];... | replace | 56 | 57 | 56 | 57 | TLE | |
p03081 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, l, r) for (long long i = (l); i < (r); ++i)
#define REP(i, n) FOR(i, 0, n)
#define REPS(i, n) FOR(i, 1, n + 1)
#define RFOR(i, l, r) for (long long i = (l); i >= (r); --i)
#define RREP(i, n) RFOR(i, n - 1, 0)
#define RREPS(i, n) RFOR(i, n, 1)
#define int long... | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, l, r) for (long long i = (l); i < (r); ++i)
#define REP(i, n) FOR(i, 0, n)
#define REPS(i, n) FOR(i, 1, n + 1)
#define RFOR(i, l, r) for (long long i = (l); i >= (r); --i)
#define RREP(i, n) RFOR(i, n - 1, 0)
#define RREPS(i, n) RFOR(i, n, 1)
#define int long... | replace | 36 | 37 | 36 | 37 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.