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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p02787 | 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;
#define int long long int
#define mod 1000000007
#define string_mod 2549536629329_base_255
#define pb push_back
#define F first
#define S second
#define ff first
#defin... | #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;
#define int long long int
#define mod 1000000007
#define string_mod 2549536629329_base_255
#define pb push_back
#define F first
#define S second
#define ff first
#defin... | replace | 51 | 52 | 51 | 52 | -11 | |
p02787 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
// #define int long long
int dp[2000];
void upd(int &x, int y) {
if (x > y)
x = y;
}
int a[2000], b[2000];
signed main() {
memset(dp, 0x3f, sizeof dp);
dp[0] = 0;
int n, h;
cin >> h >> n;
int ans = 2e9;
for (int i = 1; i <= n; i++)
cin >> a[i] >> b[... | #include <bits/stdc++.h>
using namespace std;
// #define int long long
int dp[25000];
void upd(int &x, int y) {
if (x > y)
x = y;
}
int a[2000], b[2000];
signed main() {
memset(dp, 0x3f, sizeof dp);
dp[0] = 0;
int n, h;
cin >> h >> n;
int ans = 2e9;
for (int i = 1; i <= n; i++)
cin >> a[i] >> b... | replace | 4 | 5 | 4 | 5 | -11 | |
p02787 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define FOR(i, a, b) for (ll i = a; i <= b; i++)
#define FORD(i, a, b) for (ll i = a; i >= b; i--)
#define ALL(a) (a).begin(), (a).end()
#define SZ(a) int((a).size())
#define SORT(c) sort((c).begin(), (c).end())
#define PB push_back
#define MP make_pai... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define FOR(i, a, b) for (ll i = a; i <= b; i++)
#define FORD(i, a, b) for (ll i = a; i >= b; i--)
#define ALL(a) (a).begin(), (a).end()
#define SZ(a) int((a).size())
#define SORT(c) sort((c).begin(), (c).end())
#define PB push_back
#define MP make_pai... | replace | 40 | 47 | 40 | 41 | TLE | |
p02787 | C++ | Runtime Error | #include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <numeric>
#include <queue>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
#define dup(x, y) (((x) + (y)-1) / (y)) // dup * y >= x なる最小のdup.
using namespace std;
typedef long... | #include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <numeric>
#include <queue>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
#define dup(x, y) (((x) + (y)-1) / (y)) // dup * y >= x なる最小のdup.
using namespace std;
typedef long... | replace | 27 | 28 | 27 | 28 | -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)
|
p02787 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int INF = 100100100;
int main() {
int h, n;
cin >> h >> n;
int m = 2 * h + 100;
vector<int> hs(m, INF);
vector<P> ab(n);
rep(i, n) {
int a, b;
c... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int INF = 100100100;
int main() {
int h, n;
cin >> h >> n;
int m = 1e8 + 10;
vector<int> hs(m, INF);
vector<P> ab(n);
rep(i, n) {
int a, b;
cin ... | replace | 12 | 13 | 12 | 13 | 0 | |
p02787 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define FILL0(x) memset(x, 0, sizeof(x))
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> boo... | #include <bits/stdc++.h>
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define FILL0(x) memset(x, 0, sizeof(x))
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> boo... | replace | 45 | 46 | 45 | 46 | 0 | |
p02787 | C++ | Runtime Error | #include <iostream>
using namespace std;
const int INF = 1 << 29;
int dp[10005]; // dp[j]:=体力jを消費するまでの魔力の最小値.
int main() {
int H, N;
int a[1000], b[1000];
cin >> H >> N;
for (int i = 0; i < N; i++)
cin >> a[i] >> b[i];
for (int i = 0; i <= H; i++)
dp[i] = INF;
dp[0] = 0;
for (int i = 0; i < N... | #include <iostream>
using namespace std;
const int INF = 1 << 29;
int dp[10005]; // dp[j]:=体力jを消費するまでの魔力の最小値.
int main() {
int H, N;
int a[1000], b[1000];
cin >> H >> N;
for (int i = 0; i < N; i++)
cin >> a[i] >> b[i];
for (int i = 0; i <= H; i++)
dp[i] = INF;
dp[0] = 0;
for (int i = 0; i < N... | replace | 19 | 21 | 19 | 24 | 0 | |
p02787 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define int long long
typedef pair<int, int> P;
#define mod 1000000007
#define INF (1LL << 60)
#define rep(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define repi(itr, ds) for (auto itr = ds.begin(); itr != ds.end(); itr++)
#define YES puts("YES")
#define Yes ... | #include <bits/stdc++.h>
using namespace std;
#define int long long
typedef pair<int, int> P;
#define mod 1000000007
#define INF (1LL << 60)
#define rep(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define repi(itr, ds) for (auto itr = ds.begin(); itr != ds.end(); itr++)
#define YES puts("YES")
#define Yes ... | replace | 111 | 116 | 111 | 114 | TLE | |
p02787 | Python | Time Limit Exceeded | h, n = map(int, input().split())
x = [list(map(int, input().split())) for _ in range(n)]
a, b = x[0]
dp = [-(-i // a) * b for i in range(h + 1)]
for j in range(1, n):
a, b = x[j]
for i in range(h + 1):
if i >= a:
dp[i] = min(dp[i], dp[i - a] + b)
else:
dp[i] = min(dp[i], ... | h, n = map(int, input().split())
x = [list(map(int, input().split())) for _ in range(n)]
a, b = x[0]
dp = [-(-i // a) * b for i in range(h + 1)]
for j in range(1, n):
a, b = x[j]
for i in range(min(h + 1, a)):
dp[i] = min(dp[i], b)
for i in range(a, h + 1):
dp[i] = min(dp[i], dp[i - a] + b)
... | replace | 6 | 11 | 6 | 10 | TLE | |
p02787 | Python | Time Limit Exceeded | H, N = map(int, input().split())
M = [tuple(map(int, input().split())) for i in range(N)]
dp = [(i + M[0][0] - 1) // M[0][0] * M[0][1] for i in range(H + 1)]
for i in range(N):
Ai, Bi = M[i]
ndp = [0] * (H + 1)
if Ai >= H:
ndp[0 : H + 1] = [min(dp[j], Bi) for j in range(H + 1)]
else:
nd... | H, N = map(int, input().split())
M = [tuple(map(int, input().split())) for i in range(N)]
dp = [(j + M[0][0] - 1) // M[0][0] * M[0][1] for j in range(H + 1)]
for i in range(1, N):
Ai, Bi = M[i]
ndp = [0] * (H + 1)
if Ai >= H:
ndp[0 : H + 1] = [min(dp[j], Bi) for j in range(H + 1)]
else:
... | replace | 3 | 5 | 3 | 5 | TLE | |
p02787 | Python | Time Limit Exceeded | import sys
H, N = map(int, input().split())
A = [0] * N
B = [0] * N
for i in range(N):
a, b = map(int, sys.stdin.readline().rstrip().split())
A[i] = a
B[i] = b
max_A = max(A)
INF = 10**18
dp = [INF] * (H + max_A)
dp[0] = 0
for i in range(0, H):
for j in range(N):
dp[i + A[j]] = min(dp[i] + B... | import sys
H, N = map(int, input().split())
A = [0] * N
B = [0] * N
for i in range(N):
a, b = map(int, sys.stdin.readline().rstrip().split())
A[i] = a
B[i] = b
max_A = max(A)
INF = 10**18
dp = [INF] * (H + max_A)
dp[0] = 0
for i in range(H):
for j in range(N):
dp[i + A[j]] = min(dp[i] + B[j]... | replace | 16 | 17 | 16 | 17 | TLE | |
p02787 | C++ | Runtime Error | // #include<bits/stdc++.h>
#include <algorithm>
#include <cmath>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <fstream>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define mod 1000000007
#define ll long long
#... | // #include<bits/stdc++.h>
#include <algorithm>
#include <cmath>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <fstream>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define mod 1000000007
#define ll long long
#... | replace | 42 | 44 | 42 | 44 | 0 | |
p02787 | C++ | Runtime Error | // 5/6
// 個数制限なしナップサック問題
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
using Graph = vector<vector<int>>;
ll dp[110][10010];
// const int INF = 1000000000;
int main() {
int H, N;
cin >> H >> N;
vector<ll> A(N), B(N... | // 5/6
// 個数制限なしナップサック問題
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
using Graph = vector<vector<int>>;
ll dp[1010][10010];
// const int INF = 1000000000;
int main() {
int H, N;
cin >> H >> N;
vector<ll> A(N), B(... | replace | 10 | 11 | 10 | 11 | 0 | |
p02787 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define reps(i, n) for (int i = 1; i <= (int)(n); ++i)
#define repd(i, n) for (int i = (int)(n - 1); i >= 0; --i)
#define repds(i, n) for (int i = (int)(n); i > 0; --i)
#define loop(i, x, n) for (int i = (int)(x); i < (n... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define reps(i, n) for (int i = 1; i <= (int)(n); ++i)
#define repd(i, n) for (int i = (int)(n - 1); i >= 0; --i)
#define repds(i, n) for (int i = (int)(n); i > 0; --i)
#define loop(i, x, n) for (int i = (int)(x); i < (n... | replace | 44 | 45 | 44 | 45 | 0 | |
p02787 | C++ | Runtime Error | // #pragma GCC optimize("Og,no-stack-protector,unroll-loops,fast-math")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
// #include <boost/multiprecision/cpp_int.hpp>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace s... | // #pragma GCC optimize("Og,no-stack-protector,unroll-loops,fast-math")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
// #include <boost/multiprecision/cpp_int.hpp>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace s... | replace | 251 | 252 | 251 | 252 | 0 | Time Taken : 0.104536
|
p02787 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
long long H, N, ans = 10000000000;
cin >> H >> N;
vector<long long> A(N), B(N), cost(30000, 10000000000);
for (size_t i = 0; i < N; i++) {
cin >> A.at(i) >> B.at(i);
}
cost.at(0) = 0;
for (size_t i = 0; i < N; i++) {
cost.at(A.at(i)) = ... | #include <bits/stdc++.h>
using namespace std;
int main() {
long long H, N, ans = 10000000000;
cin >> H >> N;
vector<long long> A(N), B(N), cost(30000, 10000000000);
for (size_t i = 0; i < N; i++) {
cin >> A.at(i) >> B.at(i);
}
cost.at(0) = 0;
for (size_t i = 0; i < N; i++) {
cost.at(A.at(i)) = ... | replace | 18 | 19 | 18 | 19 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): vector::_M_range_check: __n (which is 18446744073709551608) >= this->size() (which is 30000)
|
p02787 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
template <typename T>
using ordered_set =
tree<T, null_type, less<T>, rb_tree_tag,
tree_order_statistics_node_update>; // greater<T> for sorting
... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
template <typename T>
using ordered_set =
tree<T, null_type, less<T>, rb_tree_tag,
tree_order_statistics_node_update>; // greater<T> for sorting
... | replace | 25 | 26 | 25 | 26 | TLE | |
p02787 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, a, b) for (int i = a; i < b; i++)
#define repd(i, a, b) for (int i = a; i >= b; i--)
#define fore(i, a) for (auto &i : a)
#define all(x) (x).begin(), (x).end()
using namespace std;
void _main();
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
_main();
}
typedef long ... | #include <bits/stdc++.h>
#define rep(i, a, b) for (int i = a; i < b; i++)
#define repd(i, a, b) for (int i = a; i >= b; i--)
#define fore(i, a) for (auto &i : a)
#define all(x) (x).begin(), (x).end()
using namespace std;
void _main();
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
_main();
}
typedef long ... | replace | 36 | 37 | 36 | 37 | -6 | terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
|
p02787 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
int main() {
int h, n;
cin >> h >> n;
vector<int> a, b;
for (int i = 0; i < n; i++) {
int ai, bi;
cin >> ai >> bi;
a.push_back(ai);
b.push_back(bi);
}
vector<vector<int>> dp(1001, vector<int>(10001, INF));
dp[0][0] = 0;
f... | #include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
int main() {
int h, n;
cin >> h >> n;
vector<int> a, b;
for (int i = 0; i < n; i++) {
int ai, bi;
cin >> ai >> bi;
a.push_back(ai);
b.push_back(bi);
}
vector<vector<int>> dp(2000, vector<int>(20000, INF));
dp[0][0] = 0;
f... | replace | 13 | 14 | 13 | 14 | 0 | |
p02787 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int h, n;
cin >> h >> n;
vector<int> dp(h + 1, 1000000000);
for (int i = 0; i < n; ++i) {
int a, b;
cin >> a >> b;
for (int j = 1; j <= a; ++j) {
dp[j] = min(dp[j], b);
}
for (int j = a + 1;... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int h, n;
cin >> h >> n;
vector<int> dp(h + 1, 1000000000);
for (int i = 0; i < n; ++i) {
int a, b;
cin >> a >> b;
for (int j = 1; j <= a; ++j) {
if (h < j) {
break;
}
dp[j] = mi... | insert | 15 | 15 | 15 | 18 | 0 | |
p02787 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define trace1(x... | #include <bits/stdc++.h>
using namespace std;
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define trace1(x... | insert | 34 | 34 | 34 | 36 | TLE | |
p02788 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
// #include <bits/stdtr1c++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;
/// Typedef
typedef long long ll;
typedef unsigned long ul;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vec... | #include <bits/stdc++.h>
using namespace std;
// #include <bits/stdtr1c++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;
/// Typedef
typedef long long ll;
typedef unsigned long ul;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vec... | replace | 134 | 135 | 134 | 135 | 0 | |
p02788 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define REP(i, a, n) for (int i = (a); i < (int)(n); i++)
#define rep(i, n) REP(i, 0, n)
#define FOR(it, c) \
for (__typeof((c).begin()) it = (c).begin(); it != (c).end(); ++it)
#define ALLOF(c) (c).begin(), (c).... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, a, n) for (int i = (a); i < (int)(n); i++)
#define rep(i, n) REP(i, 0, n)
#define FOR(it, c) \
for (__typeof((c).begin()) it = (c).begin(); it != (c).end(); ++it)
#define ALLOF(c) (c).begin(), (c).... | delete | 121 | 122 | 121 | 121 | TLE | |
p02788 | C++ | Runtime Error | #include <bits/stdc++.h>
#define LL long long
using namespace std;
const int INF = 0x3f3f3f3f;
const int N = 1e5 + 10, M = N * 400, mod = 1e9 + 7;
int n;
struct node {
LL x, h;
bool operator<(const node t) const { return x < t.x; }
} s[N];
LL a, d;
LL p[N]; // 前缀
int main() {
cin >> n >> d >> a;
for (int i = 1;... | #include <bits/stdc++.h>
#define LL long long
using namespace std;
const int INF = 0x3f3f3f3f;
const int N = 2e5 + 10, M = N * 400, mod = 1e9 + 7;
int n;
struct node {
LL x, h;
bool operator<(const node t) const { return x < t.x; }
} s[N];
LL a, d;
LL p[N]; // 前缀
int main() {
cin >> n >> d >> a;
for (int i = 1;... | replace | 4 | 5 | 4 | 5 | 0 | |
p02788 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define _overload3(_1, _2, _3, name, ...) name
#define _rep(i, n) repi(i, 0, n)
#define repi(i, a, b) for (ll i = ll(a); i < ll(b); ++i)
#define rep(...) _overload3(__VA_ARGS__, repi, _rep, )(__VA_ARGS__)
#define inf (ll)1e9
#define mod (ll)(1e9 + 7)
#... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define _overload3(_1, _2, _3, name, ...) name
#define _rep(i, n) repi(i, 0, n)
#define repi(i, a, b) for (ll i = ll(a); i < ll(b); ++i)
#define rep(...) _overload3(__VA_ARGS__, repi, _rep, )(__VA_ARGS__)
#define inf (ll)1e9
#define mod (ll)(1e9 + 7)
#... | insert | 61 | 61 | 61 | 63 | TLE | |
p02788 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define fs first
#define sc second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define ALL(A) A.begin(), A.end()
#define RALL(A) A.rbegin(), A.rend()
typedef long long ll;
typedef pair<ll, ll> P;
const ll mod = 1000000007;
const ll LINF = 1LL << 60;
co... | #include <bits/stdc++.h>
using namespace std;
#define fs first
#define sc second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define ALL(A) A.begin(), A.end()
#define RALL(A) A.rbegin(), A.rend()
typedef long long ll;
typedef pair<ll, ll> P;
const ll mod = 1000000007;
const ll LINF = 1LL << 60;
co... | replace | 18 | 19 | 18 | 19 | 0 | |
p02788 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define dbg(...) \
do { \
cerr << __LINE__ <<... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define dbg(...) \
do { \
cerr << __LINE__ <<... | replace | 96 | 97 | 96 | 97 | 0 | |
p02788 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define endl '\n'
#define fcin \
ios::sync_with_stdio(false); \
cin.tie(nul... | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define endl '\n'
#define fcin \
ios::sync_with_stdio(false); \
cin.tie(nul... | replace | 119 | 120 | 119 | 120 | 0 | |
p02788 | C++ | Time Limit Exceeded | // https://atcoder.jp/contests/abc153/tasks/abc153_f
#include <bits/stdc++.h>
#if LOCAL
#include "dump.hpp"
#else
#define dump(...)
#endif
using namespace std;
using ll = long long;
#define FOR(i, a, b) for (ll i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
template <class T> bool chmax(T &a, const T &b) {
if ... | // https://atcoder.jp/contests/abc153/tasks/abc153_f
#include <bits/stdc++.h>
#if LOCAL
#include "dump.hpp"
#else
#define dump(...)
#endif
using namespace std;
using ll = long long;
#define FOR(i, a, b) for (ll i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
template <class T> bool chmax(T &a, const T &b) {
if ... | insert | 26 | 26 | 26 | 76 | TLE | |
p02788 | C++ | Runtime Error | #include <bits/stdc++.h>
using ll = long long;
using namespace std;
#define rep(i, n) for (int i = 0, i##_len = (int)(n); i < i##_len; i++)
#define reps(i, n) for (int i = 1, i##_len = (int)(n); i <= i##_len; i++)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--)
#define rreps(i, n) for (int i = ((int)(n)); i ... | #include <bits/stdc++.h>
using ll = long long;
using namespace std;
#define rep(i, n) for (int i = 0, i##_len = (int)(n); i < i##_len; i++)
#define reps(i, n) for (int i = 1, i##_len = (int)(n); i <= i##_len; i++)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--)
#define rreps(i, n) for (int i = ((int)(n)); i ... | replace | 65 | 66 | 65 | 68 | 0 | |
p02788 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define LL long long
typedef pair<int, int> pii;
template <typename T> inline void read(T &x) {
static char _c;
static bool _f;
x = 0;
_f = 0;
_c = getchar();
while (_c < '0' || '9' < _c) {
if (_c == '-')
_f = true;
_c = getchar();
}
while ... | #include <bits/stdc++.h>
using namespace std;
#define LL long long
typedef pair<int, int> pii;
template <typename T> inline void read(T &x) {
static char _c;
static bool _f;
x = 0;
_f = 0;
_c = getchar();
while (_c < '0' || '9' < _c) {
if (_c == '-')
_f = true;
_c = getchar();
}
while ... | replace | 50 | 51 | 50 | 51 | 0 | |
p02788 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
#define int long long
#define mod 1000000007
#define for0(i, n) for (int i = 0; i < (n); i++)
#define for1(i, n) for (int i = 1; i <= (n); i++)
#define mp make_pair
using namespace std;
int get() {
int r;
... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
#define int long long
#define mod 1000000007
#define for0(i, n) for (int i = 0; i < (n); i++)
#define for1(i, n) for (int i = 1; i <= (n); i++)
#define mp make_pair
using namespace std;
int get() {
int r;
... | replace | 18 | 20 | 18 | 20 | 0 | |
p02788 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstring> //memset(dp,0,sizeof(dp))
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
#define ll long long
#define rep(i, n) for (int i = 0; i < (n); i++)
#define repp... | #include <algorithm>
#include <cmath>
#include <cstring> //memset(dp,0,sizeof(dp))
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
#define ll long long
#define rep(i, n) for (int i = 0; i < (n); i++)
#define repp... | replace | 60 | 71 | 60 | 61 | 0 | |
p02788 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
// types
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<ld, ld> pdd;
typedef vector<ll> vll;
typedef vector<ld> vld;
typedef vector<pll> vpll;
// macros
#define ALL(a) a.begin(), a.end()
#define SZ(a) ((int... | #include <bits/stdc++.h>
using namespace std;
// types
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<ld, ld> pdd;
typedef vector<ll> vll;
typedef vector<ld> vld;
typedef vector<pll> vpll;
// macros
#define ALL(a) a.begin(), a.end()
#define SZ(a) ((int... | replace | 62 | 63 | 62 | 63 | 0 | |
p02788 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
int main() {
int N, D, A;
cin >> N >> D >> A;
vector<pair<int, int>> v(N +... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
int main() {
int N, D, A;
cin >> N >> D >> A;
vector<pair<int, int>> v(N +... | replace | 27 | 28 | 27 | 28 | 0 | |
p02788 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
long N, D, A;
cin >> N >> D >> A;
vector<pair<long, long>> monster;
vector<long> damage(N + 1, 0);
for (int i = 0; i < N; i++) {
long x, h;
cin >> x >> h;
monster.push_back(make_pair(x, h));
}
long count = 0;
sort(monster.begin(), m... | #include <bits/stdc++.h>
using namespace std;
int main() {
long N, D, A;
cin >> N >> D >> A;
vector<pair<long, long>> monster;
vector<long> damage(N + 1, 0);
for (int i = 0; i < N; i++) {
long x, h;
cin >> x >> h;
monster.push_back(make_pair(x, h));
}
long count = 0;
sort(monster.begin(), m... | replace | 17 | 26 | 17 | 21 | TLE | |
p02788 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define rep(i, N) for (int i = 0; i < int(N); ++i)
#define rep1(i, N) for (int i = 1; i < int(N); ++i)
#define all(a) (a).begin(), (a).end()
#define print(v) \
{ ... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, N) for (int i = 0; i < int(N); ++i)
#define rep1(i, N) for (int i = 1; i < int(N); ++i)
#define all(a) (a).begin(), (a).end()
#define print(v) \
{ ... | replace | 93 | 94 | 93 | 94 | TLE | |
p02788 | C++ | Runtime Error | #include <bits/stdc++.h>
typedef long long ll;
using namespace std;
long long int n, m, j, k, l, t, arr[100009], brr[100009], tree[600009], i, ans,
d;
vector<pair<ll, ll>> v;
vector<ll> v1, v2;
void update(ll node, ll start, ll end, ll idx, ll val) {
if (start == end) {
// Leaf node
tree[node] += val;
}... | #include <bits/stdc++.h>
typedef long long ll;
using namespace std;
long long int n, m, j, k, l, t, arr[200009], brr[200009], tree[600009], i, ans,
d;
vector<pair<ll, ll>> v;
vector<ll> v1, v2;
void update(ll node, ll start, ll end, ll idx, ll val) {
if (start == end) {
// Leaf node
tree[node] += val;
}... | replace | 3 | 4 | 3 | 4 | 0 | |
p02788 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vll = vector<ll>;
#define all(x) (x).begin(), (x).end()
#define fsp(x) cout << fixed << setprecision(x)
const ll inf = LLONG_MAX;
const long double pi = acos(-1);
void Yes() { cout << "Yes" << endl; }
void No() { cout << "No" << endl; }
void YES(... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vll = vector<ll>;
#define all(x) (x).begin(), (x).end()
#define fsp(x) cout << fixed << setprecision(x)
const ll inf = LLONG_MAX;
const long double pi = acos(-1);
void Yes() { cout << "Yes" << endl; }
void No() { cout << "No" << endl; }
void YES(... | replace | 16 | 17 | 16 | 18 | TLE | |
p02788 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> bool chmin(T &a, const T &b) {
if (b < a) {
a = b;
return 1;
}
return 0;
}
int main() {
int N;
ll D, A;
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> bool chmin(T &a, const T &b) {
if (b < a) {
a = b;
return 1;
}
return 0;
}
int main() {
int N;
ll D, A;
... | replace | 22 | 23 | 22 | 23 | -6 | munmap_chunk(): invalid pointer
|
p02788 | C++ | Runtime Error | #include <bits/stdc++.h>
typedef long long lint;
using namespace std;
lint n, d, a;
vector<pair<lint, lint>> xh;
int main() {
cin >> n >> d >> a;
xh.resize(n);
for (int i = 0; i < n; i++) {
cin >> xh[i].first >> xh[i].second;
}
sort(xh.begin(), xh.end());
vector<lint> x(n), h(n);
for (int i = 0; i <... | #include <bits/stdc++.h>
typedef long long lint;
using namespace std;
lint n, d, a;
vector<pair<lint, lint>> xh;
int main() {
cin >> n >> d >> a;
xh.resize(n);
for (int i = 0; i < n; i++) {
cin >> xh[i].first >> xh[i].second;
}
sort(xh.begin(), xh.end());
vector<lint> x(n), h(n);
for (int i = 0; i <... | replace | 34 | 35 | 34 | 37 | 0 | |
p02788 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <unordered_map>
#include <unordered_set>
#define pb push_back
#define mpr make_pair
#define pii pair<int, int>
#define pll pair<ll, ll>
#define ll long long
#define ld long double
#define all(arr) arr.begin(), arr.end()
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define fo(i,... | #include <bits/stdc++.h>
#include <unordered_map>
#include <unordered_set>
#define pb push_back
#define mpr make_pair
#define pii pair<int, int>
#define pll pair<ll, ll>
#define ll long long
#define ld long double
#define all(arr) arr.begin(), arr.end()
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define fo(i,... | replace | 16 | 17 | 16 | 17 | 0 | |
p02788 | C++ | Runtime Error | #pragma comment(linker, "/STACK:526000000")
#define _CRT_SECURE_NO_WARNINGS
#include "bits/stdc++.h"
using namespace std;
typedef string::const_iterator State;
#define eps 1e-11L
#define MAX_MOD 1000000007LL
#define GYAKU 500000004LL
#define MOD 998244353LL
#define seg_size 262144
#define pb push_back
#define mp make... | #pragma comment(linker, "/STACK:526000000")
#define _CRT_SECURE_NO_WARNINGS
#include "bits/stdc++.h"
using namespace std;
typedef string::const_iterator State;
#define eps 1e-11L
#define MAX_MOD 1000000007LL
#define GYAKU 500000004LL
#define MOD 998244353LL
#define seg_size 262144
#define pb push_back
#define mp make... | replace | 43 | 44 | 43 | 44 | 0 | |
p02788 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <climits>
#include <cmath>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
#pragma warning(disable... | #include <algorithm>
#include <cassert>
#include <climits>
#include <cmath>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
#pragma warning(disable... | replace | 19 | 20 | 19 | 20 | 0 | |
p02788 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define fastio \
ios_base::sync_with_stdio(false); \
cin.tie(0)
#define loop(i, a, b) for (lli i = a; i < b; i++)
#define loopb(... | #include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define fastio \
ios_base::sync_with_stdio(false); \
cin.tie(0)
#define loop(i, a, b) for (lli i = a; i < b; i++)
#define loopb(... | replace | 74 | 75 | 74 | 75 | 0 | |
p02788 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
using namespace std;
using ll = long long int;
const long long int INF = 1001001001001001LL;
const int inf = 1000000007;
long long int MOD = 1000000007LL;
double PI = 3.1415926535897932;
int main() {
cin.tie(0);
ios::sync_with_stdio(fals... | #include <bits/stdc++.h>
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
using namespace std;
using ll = long long int;
const long long int INF = 1001001001001001LL;
const int inf = 1000000007;
long long int MOD = 1000000007LL;
double PI = 3.1415926535897932;
int main() {
cin.tie(0);
ios::sync_with_stdio(fals... | replace | 19 | 20 | 19 | 20 | 0 | |
p02788 | C++ | Time Limit Exceeded | #define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
/*#pragma GCC optimize("Ofast","unroll-loops","omit-frame-pointer","inline")
//Optimization flags #pragma GCC
option("arch=native","tune=native","no-zero-upper... | #define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
/*#pragma GCC optimize("Ofast","unroll-loops","omit-frame-pointer","inline")
//Optimization flags #pragma GCC
option("arch=native","tune=native","no-zero-upper... | replace | 337 | 338 | 337 | 338 | TLE | |
p02788 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define PI acos(-1)
#define pcnt __builtin_popcountll
#define rng(a) a.begin(), a.end()
#define sz(x) (int)(x).size()
#define v(T) vector<T>
#define vv(T) v(v(T))
#define fi first
#define se second
using namespace std;
typedef long long ll;
typed... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define PI acos(-1)
#define pcnt __builtin_popcountll
#define rng(a) a.begin(), a.end()
#define sz(x) (int)(x).size()
#define v(T) vector<T>
#define vv(T) v(v(T))
#define fi first
#define se second
using namespace std;
typedef long long ll;
typed... | replace | 56 | 57 | 56 | 57 | 0 | |
p02788 | C++ | Time Limit Exceeded | // #pragma GCC optimize(2)
// #pragma G++ optimize(2)
// #pragma comment(linker,"/STACK:102400000,102400000")
// #include <bits/stdc++.h>
#include <algorithm>
#include <array>
#include <atomic>
#include <bitset>
#include <cassert>
#include <ccomplex>
#include <cctype>
#include <cerrno>
#include <cfenv>
#include <cfloa... | // #pragma GCC optimize(2)
// #pragma G++ optimize(2)
// #pragma comment(linker,"/STACK:102400000,102400000")
// #include <bits/stdc++.h>
#include <algorithm>
#include <array>
#include <atomic>
#include <bitset>
#include <cassert>
#include <ccomplex>
#include <cctype>
#include <cerrno>
#include <cfenv>
#include <cfloa... | delete | 243 | 246 | 243 | 243 | TLE | |
p02788 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <complex>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repr(i, s, n) for (int i = (s); i < (int)(n); i++)
using ll = long long;
using P = pair<int, ... | #include <algorithm>
#include <cmath>
#include <complex>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repr(i, s, n) for (int i = (s); i < (int)(n); i++)
using ll = long long;
using P = pair<int, ... | replace | 39 | 40 | 39 | 40 | 0 | |
p02788 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <numeric>
#include <string>
#include <vector>
#define REP(i, a, b) for (int i = int(a); i < int(b); i++)
using namespace std;
typedef long long int ll;
// clang-format off
#ifdef _DEBUG_
#define dump(...) do{ cerr << __LINE__ << ":\t" << #__VA_ARGS__ << " = "; PPPPP(_... | #include <algorithm>
#include <iostream>
#include <numeric>
#include <string>
#include <vector>
#define REP(i, a, b) for (int i = int(a); i < int(b); i++)
using namespace std;
typedef long long int ll;
// clang-format off
#ifdef _DEBUG_
#define dump(...) do{ cerr << __LINE__ << ":\t" << #__VA_ARGS__ << " = "; PPPPP(_... | replace | 91 | 92 | 91 | 92 | 0 | |
p02788 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
double getTime() { return clock() / (double)CLOCKS_PER_SEC; }
void read(){};
template <typename T, typename... Args> void read(T &a, Args &...args) {
cin >> a;
read(args...);
}
void print(){};
template <typename T, typename... Args> void pri... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
double getTime() { return clock() / (double)CLOCKS_PER_SEC; }
void read(){};
template <typename T, typename... Args> void read(T &a, Args &...args) {
cin >> a;
read(args...);
}
void print(){};
template <typename T, typename... Args> void pri... | replace | 27 | 28 | 27 | 29 | -11 | |
p02788 | C++ | Runtime Error | #include <bits/stdc++.h>
// #define DEBUG
using namespace std;
const int N = 1e2 + 7;
const int MOD = 1e9 + 7;
const double eps = 1e-11;
typedef pair<int, int> pii;
struct Node {
int x, h;
friend bool operator<(const Node &n1, const Node &n2) { return n1.x < n2.x; }
friend istream &operator>>(istream &is, Nod... | #include <bits/stdc++.h>
// #define DEBUG
using namespace std;
const int N = 2e5 + 7;
const int MOD = 1e9 + 7;
const double eps = 1e-11;
typedef pair<int, int> pii;
struct Node {
int x, h;
friend bool operator<(const Node &n1, const Node &n2) { return n1.x < n2.x; }
friend istream &operator>>(istream &is, Nod... | replace | 6 | 7 | 6 | 7 | 0 | |
p02788 | C++ | Runtime Error | #include <algorithm>
#include <array>
#include <bitset>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <valarray>
#include ... | #include <algorithm>
#include <array>
#include <bitset>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <valarray>
#include ... | replace | 159 | 160 | 159 | 160 | 0 | |
p02788 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
struct node {
int x, h;
} t[100001];
bool cmp(node a, node b) { return a.x < b.x; }
signed main() {
int n, d, a;
scanf("%lld%lld%lld", &n, &d, &a);
for (int i = 1; i <= n; i++)
scanf("%lld%lld", &t[i].x, &t[i].h);
sort(t + 1, t + n + 1, c... | #include <bits/stdc++.h>
using namespace std;
#define int long long
struct node {
int x, h;
} t[1000001];
bool cmp(node a, node b) { return a.x < b.x; }
signed main() {
int n, d, a;
scanf("%lld%lld%lld", &n, &d, &a);
for (int i = 1; i <= n; i++)
scanf("%lld%lld", &t[i].x, &t[i].h);
sort(t + 1, t + n + 1, ... | replace | 5 | 6 | 5 | 6 | 0 | |
p02788 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i, n) for (long long(i) = 0; (i) < (n); ++(i))
#define ref(i, a, b) for (long long(i) = (a); (i) <= (b); ++(i))
#define endl '\n'
#define st first
#define nd second
#define pb push_back
#define mp make_pair
const int mx = 1e6 + 5;
long long ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i, n) for (long long(i) = 0; (i) < (n); ++(i))
#define ref(i, a, b) for (long long(i) = (a); (i) <= (b); ++(i))
#define endl '\n'
#define st first
#define nd second
#define pb push_back
#define mp make_pair
const int mx = 1e6 + 5;
long long ... | replace | 30 | 31 | 30 | 31 | TLE | |
p02788 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define loop(i, a, b) for (int i = (a); i < (b); i++)
#define loopb(i, a, b) for (int i = (a); i > (b); --i)
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<ll> vl;
const int mod = 1e9 +... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define loop(i, a, b) for (int i = (a); i < (b); i++)
#define loopb(i, a, b) for (int i = (a); i > (b); --i)
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<ll> vl;
const int mod = 1e9 +... | replace | 23 | 27 | 23 | 24 | 0 | |
p02788 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n;
ll d, a;
cin >> n >> d >> a;
vector<pair<ll, ll>> v(n);
vector<ll> pos(n), bomb(n);
for (int i = 0; i < n; ++i) {
ll x, h;
cin >> x >> h;
v[i] = {x, h};
pos[i] = x;
}
sort(v.begin(), v.end());
sort(... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n;
ll d, a;
cin >> n >> d >> a;
vector<pair<ll, ll>> v(n);
vector<ll> pos(n), bomb(n + 1, 0);
for (int i = 0; i < n; ++i) {
ll x, h;
cin >> x >> h;
v[i] = {x, h};
pos[i] = x;
}
sort(v.begin(), v.end());
... | replace | 8 | 9 | 8 | 9 | 0 | |
p02788 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdlib>
#include <ctype.h>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
#define pie 3.141592653589793238462643383279
#define mod 10000000... | #include <algorithm>
#include <cmath>
#include <cstdlib>
#include <ctype.h>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
#define pie 3.141592653589793238462643383279
#define mod 10000000... | replace | 75 | 84 | 75 | 82 | 0 | |
p02788 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define time_assert(x) \
if (!(x)) \
while (true)
int main() {
ios_base::sync_with_stdio(0);
cin.tie(NULL);
int n, d, a;
cin >> n >> d ... | #include <bits/stdc++.h>
using namespace std;
#define time_assert(x) \
if (!(x)) \
while (true)
int main() {
ios_base::sync_with_stdio(0);
cin.tie(NULL);
int n, d, a;
cin >> n >> d ... | replace | 67 | 68 | 67 | 68 | TLE | |
p02788 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, d, a;
cin >> n >> d >> a;
vector<pair<int, int>> monsters;
for (int i = 0; i < n; ++i) {
int x, h;
cin >> x >> h;
h = (h + a - 1) / a; // number of bombs to drop on monster i to kill it
monsters.emplace_back(x, h);
}
sort(mon... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, d, a;
cin >> n >> d >> a;
vector<pair<int, int>> monsters;
for (int i = 0; i < n; ++i) {
int x, h;
cin >> x >> h;
h = (h + a - 1) / a; // number of bombs to drop on monster i to kill it
monsters.emplace_back(x, h);
}
sort(mon... | replace | 60 | 61 | 60 | 61 | 0 | |
p02788 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <string>
#include <utility>
#include <vector>
using ll = long long;
using namespace std;
template <class Abel> struct BIT {
vector<Abel> dat[2];
Abel UNITY_SUM = 0; // to be set
/* [1, n] */
BIT(int n) { init(n); }
void init(int n) {
for (int iter = 0; i... | #include <algorithm>
#include <iostream>
#include <string>
#include <utility>
#include <vector>
using ll = long long;
using namespace std;
template <class Abel> struct BIT {
vector<Abel> dat[2];
Abel UNITY_SUM = 0; // to be set
/* [1, n] */
BIT(int n) { init(n); }
void init(int n) {
for (int iter = 0; i... | replace | 78 | 79 | 78 | 79 | 0 | |
p02788 | C++ | Runtime Error | #define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <algorithm>
#include <array>
#include <bitset>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#... | #define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <algorithm>
#include <array>
#include <bitset>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#... | replace | 45 | 46 | 45 | 46 | 0 | |
p02788 | Python | Runtime Error | from bisect import bisect_right
n, d, a = map(int, input().split())
xh = sorted(list(map(int, input().split())) for _ in range(n))
x = [0] * (n + 1)
h = [0] * (n + 1)
s = [0] * (n + 1)
for i, (f, g) in enumerate(xh):
x[i], h[i] = f, g
x[n] = 10**9 + 1
ans = 0
for i in range(n):
if i > 0:
s[i] += s[i -... | from bisect import bisect_right
n, d, a = map(int, input().split())
xh = sorted(list(map(int, input().split())) for _ in range(n))
x = [0] * (n + 1)
h = [0] * (n + 1)
s = [0] * (n + 1)
for i, (f, g) in enumerate(xh):
x[i], h[i] = f, g
x[n] = 10**10 + 1
ans = 0
for i in range(n):
if i > 0:
s[i] += s[i ... | replace | 10 | 11 | 10 | 11 | 0 | |
p02788 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
long long int sum[200005];
int main() {
long long int n, d, a;
cin >> n >> d >> a;
pair<int, long long int> p[n];
for (int i = 0; i < n; i++) {
cin >> p[i].first >> p[i].second;
p[i].second = (p[i].second + a - 1) / a;
}
sort(p, p + n);
int r[n];
int... | #include <bits/stdc++.h>
using namespace std;
long long int sum[200005];
int main() {
long long int n, d, a;
cin >> n >> d >> a;
pair<int, long long int> p[n];
for (int i = 0; i < n; i++) {
cin >> p[i].first >> p[i].second;
p[i].second = (p[i].second + a - 1) / a;
}
sort(p, p + n);
int r[n];
int... | replace | 14 | 15 | 14 | 15 | -11 | |
p02788 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
using namespace std;
struct point {
long long x, h;
} p[1000000001];
bool cmp(point const &p1, point const &p2) { return p1.x < p2.x; }
int main() {
// 读入数据
long long N, D, A;
scanf("%lld%lld%lld", &N, &D, &A);
D <<= 1; // 先将半个宽度乘2使之成为左右区间宽度
for (int i = 1; i <= N; i++... | #include <algorithm>
#include <cstdio>
using namespace std;
struct point {
long long x, h;
} p[200001];
bool cmp(point const &p1, point const &p2) { return p1.x < p2.x; }
int main() {
// 读入数据
long long N, D, A;
scanf("%lld%lld%lld", &N, &D, &A);
D <<= 1; // 先将半个宽度乘2使之成为左右区间宽度
for (int i = 1; i <= N; i++) {
... | replace | 5 | 6 | 5 | 6 | -11 | |
p02788 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <forward_list>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <utility>
#include <vector>
#define rep(i, s, g) for ((i) = (s); (i) < (g); ++(i))
using namespace std;
using ll = long long;
using P = pair<ll, ... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <forward_list>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <utility>
#include <vector>
#define rep(i, s, g) for ((i) = (s); (i) < (g); ++(i))
using namespace std;
using ll = long long;
using P = pair<ll, ... | replace | 27 | 28 | 27 | 28 | 0 | |
p02788 | C++ | Time Limit Exceeded | // --------------
// Tejas Pandey |
// 26 - 01 - 20 |
// ATCODER #153 |
// --------------
#include <bits/stdc++.h>
using namespace std;
#define mod 1000000007
#define lim 100000000000000000
#define vi vector<int>
typedef long long int ll;
int main(void) {
// freopen("in.txt","r",stdin);
// freopen("out.txt","... | // --------------
// Tejas Pandey |
// 26 - 01 - 20 |
// ATCODER #153 |
// --------------
#include <bits/stdc++.h>
using namespace std;
#define mod 1000000007
#define lim 100000000000000000
#define vi vector<int>
typedef long long int ll;
int main(void) {
// freopen("in.txt","r",stdin);
// freopen("out.txt","... | replace | 35 | 37 | 35 | 38 | TLE | |
p02788 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <math.h>
#include <vector>
using namespace std;
#define ll long long
#define loop(__x, __start, __end) for (int __x = __start; __x < __end; __x++)
struct Monster {
ll x, h;
bool operator<(const Monster &other) const { return x < other.x; }
};
#define MAX_X 100000... | #include <algorithm>
#include <iostream>
#include <math.h>
#include <vector>
using namespace std;
#define ll long long
#define loop(__x, __start, __end) for (int __x = __start; __x < __end; __x++)
struct Monster {
ll x, h;
bool operator<(const Monster &other) const { return x < other.x; }
};
#define MAX_X 100000... | replace | 126 | 129 | 126 | 128 | TLE | |
p02789 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
string S, T, U;
int A, B;
cin >> A >> B;
if (A % B == 0)
S = "Yes";
else
S = "No";
cout << S << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string S, T, U;
int A, B;
cin >> A >> B;
if (A - B == 0)
S = "Yes";
else
S = "No";
cout << S << endl;
}
| replace | 6 | 7 | 6 | 7 | 0 | |
p02789 | Python | Runtime Error | n, m = map(int, input().split())
if n / m == 1:
print("Yes")
else:
print("No")
| n, m = map(int, input().split())
if n == m:
print("Yes")
else:
print("No")
| replace | 2 | 3 | 2 | 3 | 0 | |
p02789 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
ll mod = 1000000007;
template <class Type> Type modpow(Type a, Type n, Type m... | #include <algorithm>
#include <bitset>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
ll mod = 1000000007;
template <class Type> Type modpow(Type a, Type n, Type m... | replace | 92 | 94 | 92 | 98 | TLE | |
p02789 | C++ | Runtime Error | #pragma GCC optimize( \
"Ofast") // Comment optimisations for an interative problem/use endl
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll... | #pragma GCC optimize( \
"Ofast") // Comment optimisations for an interative problem/use endl
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll... | delete | 57 | 63 | 57 | 57 | 0 | |
p02789 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using ll = long long;
using namespace std;
using P = pair<int, int>;
int main() {
int h, a;
cin >> h >> a;
if (h % a != 0)
cout << h / a + 1 << endl;
else if (h % a == 0)
cout << h / a << endl;
} | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using ll = long long;
using namespace std;
using P = pair<int, int>;
int main() {
int n, m;
cin >> n >> m;
if (n == m)
cout << "Yes" << endl;
else
cout << "No" << endl;
} | replace | 7 | 13 | 7 | 13 | 0 | |
p02789 | C++ | Runtime Error | #include <algorithm>
#include <climits>
#include <cmath>
#include <deque>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <vector>
// author:Swastik Banerjee
using namespace std;
typedef long long ll;
#define MOD 1000000007
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
... | #include <algorithm>
#include <climits>
#include <cmath>
#include <deque>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <vector>
// author:Swastik Banerjee
using namespace std;
typedef long long ll;
#define MOD 1000000007
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
... | delete | 21 | 26 | 21 | 21 | 0 | |
p02789 | C++ | Runtime Error | #include <bits/stdc++.h>
typedef long long ll;
typedef unsigned long long int ull;
#define pb push_back
#define For(ii, aa, bb) for (ll ii = aa; ii < bb; ii++)
#define Rof(ii, aa, bb) for (ll ii = aa; ii >= bb; ii--)
#define st first
#define nd second
#define MP make_pair
#define MAX 1000000009
#define MOD 1000000007
#... | #include <bits/stdc++.h>
typedef long long ll;
typedef unsigned long long int ull;
#define pb push_back
#define For(ii, aa, bb) for (ll ii = aa; ii < bb; ii++)
#define Rof(ii, aa, bb) for (ll ii = aa; ii >= bb; ii--)
#define st first
#define nd second
#define MP make_pair
#define MAX 1000000009
#define MOD 1000000007
#... | replace | 20 | 22 | 20 | 22 | 0 | |
p02789 | C++ | Runtime Error | #pragma GCC optimize("Ofast,unroll-loops,no-stack-protector,fast-math")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <algorithm>
#include <bits/stdc++.h>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
using namespace std;
const int MAX_N = int(1e6... | #pragma GCC optimize("Ofast,unroll-loops,no-stack-protector,fast-math")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <algorithm>
#include <bits/stdc++.h>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
using namespace std;
const int MAX_N = int(1e6... | delete | 431 | 435 | 431 | 431 | 0 | |
p02789 | C++ | Runtime Error | #include <stdio.h>
int main() {
int n, m;
scanf("%d%d", n, m);
if (n == m) {
printf("Yes");
} else {
printf("No");
}
} | #include <stdio.h>
int main() {
int n, m;
scanf("%d%d", &n, &m);
if (n == m) {
printf("Yes");
} else {
printf("No");
}
} | replace | 4 | 5 | 4 | 5 | -11 | |
p02789 | C++ | Runtime Error | /*
Auther: Ganesh Bhandarkar
# RUN #
<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>
*/
#include <bits/stdc++.h>
using namespace std;
/* KEYWORDS */
#define FASTIO \
ios... | /*
Auther: Ganesh Bhandarkar
# RUN #
<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>
*/
#include <bits/stdc++.h>
using namespace std;
/* KEYWORDS */
#define FASTIO \
ios... | delete | 46 | 51 | 46 | 46 | 0 | |
p02789 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main(void) {
//*
int a, b;
cin >> a >> b;
//*/
/*
vector<int> vec(3);
cin >> vec.at(0) >> vec.at(1) >> vec.at(2) ;
sort(vec.begin(), vec.end());
//*/
//*
if (a == b) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
//*/
... | #include <bits/stdc++.h>
using namespace std;
int main(void) {
//*
int a, b;
cin >> a >> b;
//*/
/*
vector<int> vec(3);
cin >> vec.at(0) >> vec.at(1) >> vec.at(2) ;
sort(vec.begin(), vec.end());
//*/
//*
if (a == b) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
//*/
... | replace | 24 | 25 | 24 | 25 | 0 | |
p02789 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define itn int
#define vi vector<int>
#define pb push_back
#define srt sort(v.begin(), v.end())
// int infiint = std::numeric_limits<int>::max();
// float infiflt = std::numeric_limits<float>::infinity();
void solve() {
int n, m;
cin >> n >> m;
if (n <= m) {
c... | #include <bits/stdc++.h>
using namespace std;
#define itn int
#define vi vector<int>
#define pb push_back
#define srt sort(v.begin(), v.end())
// int infiint = std::numeric_limits<int>::max();
// float infiflt = std::numeric_limits<float>::infinity();
void solve() {
int n, m;
cin >> n >> m;
if (n <= m) {
c... | replace | 23 | 24 | 23 | 24 | 0 | |
p02789 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
void IO() {
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
std::ios_base::sync_with_stdio(false);
cin.tie(NULL);
}
void solve() {
int n, m;
cin >> n >> m;
if (m >= n) {
cout << "Yes\n... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
void IO() {
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
std::ios_base::sync_with_stdio(false);
cin.tie(NULL);
}
void solve() {
int n, m;
cin >> n >> m;
if (m >= n) {
cout << "Yes\n... | replace | 23 | 24 | 23 | 24 | 0 | |
p02789 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
#define mod 1000000007
using namespace std;
const ll INF = 1e18;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
ll int n, m;
cin >... | #include <bits/stdc++.h>
#define ll long long
#define mod 1000000007
using namespace std;
const ll INF = 1e18;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
ll int n, m;
cin >> n >> m;
if (n == m)
cout << "Yes" << endl;
else
cout << "No" << endl;
} | replace | 10 | 14 | 10 | 11 | 0 | |
p02789 | C++ | Runtime Error |
// HYSO SERIOUS? WHY SO SERIOUS RIOUS? WHY
//SO SERIOUS? WHYSO SERIO ERIOUS? WHY SO SERIOUS ? WHY WHY SO SERIOUS? WHY
//SOSERIOUSWHYS OSERIOUS? WHY SO SERIOU SERIOUS ERIOUS? WHY SO
//SERIOUS? WHYS WHY SO SERIOUS? WHY SOSERIOUS? WHYSOSERIOUS? WHY SO SER... |
// HYSO SERIOUS? WHY SO SERIOUS RIOUS? WHY
//SO SERIOUS? WHYSO SERIO ERIOUS? WHY SO SERIOUS ? WHY WHY SO SERIOUS? WHY
//SOSERIOUSWHYS OSERIOUS? WHY SO SERIOU SERIOUS ERIOUS? WHY SO
//SERIOUS? WHYS WHY SO SERIOUS? WHY SOSERIOUS? WHYSOSERIOUS? WHY SO SER... | replace | 51 | 55 | 51 | 55 | 0 | |
p02789 | C++ | Runtime Error | // Author :mdragneell
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
#define ull unsigned long long
#define ll long long
#define ld long double
#define pb push_back
#define pi pair<int, int>
#define pl pair<ll, ll>
#define f first
#define s second
ll... | // Author :mdragneell
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
#define ull unsigned long long
#define ll long long
#define ld long double
#define pb push_back
#define pi pair<int, int>
#define pl pair<ll, ll>
#define f first
#define s second
ll... | replace | 89 | 93 | 89 | 93 | 0 | |
p02789 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define all(v) (v).begin(), (v).end()
#define endl "\n"
#define deb(x) cout << #x << " : " << x << endl;
template <class A> ostream &operator<<(ostream &out, const vector<A> &a) {
for (const A &it : a)
out << it << " ";
return out;
}
template <... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define all(v) (v).begin(), (v).end()
#define endl "\n"
#define deb(x) cout << #x << " : " << x << endl;
template <class A> ostream &operator<<(ostream &out, const vector<A> &a) {
for (const A &it : a)
out << it << " ";
return out;
}
template <... | delete | 21 | 25 | 21 | 21 | 0 | |
p02789 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main(void) {
// Your code here!
string a, b;
cin >> a >> b;
int a1 = stoi(a);
int b2 = stoi(b);
int result = a1 / b2;
if (result == 1) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
}
| #include <iostream>
using namespace std;
int main(void) {
// Your code here!
string n, m;
cin >> n >> m;
int n1 = stoi(n);
int m1 = stoi(m);
if (n1 == 0) {
cout << "No" << endl;
}
int result = m1 / n1;
if (result == 1) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
}
| replace | 4 | 9 | 4 | 12 | 0 | |
p02790 | C++ | Runtime Error | #include <iostream>
#include <string>
using namespace std;
string replicate(string s, int n) {
string ret = "";
for (int i = 0; i < n; i++) {
ret += s;
}
}
int main() {
int a, b;
cin >> a >> b;
string s = replicate(to_string(a), b);
string t = replicate(to_string(b), a);
cout << (s < t ? s : t) <... | #include <iostream>
#include <string>
using namespace std;
string replicate(string s, int n) {
string ret = "";
for (int i = 0; i < n; i++) {
ret += s;
}
return ret;
}
int main() {
int a, b;
cin >> a >> b;
string s = replicate(to_string(a), b);
string t = replicate(to_string(b), a);
cout << (s ... | insert | 10 | 10 | 10 | 11 | -11 | |
p02790 | Python | Runtime Error | a, b = [input() for i in range(2)]
a_array = []
for i in range(int(b)):
a_array.append(a)
a_str = "".join(a_array)
b_array = []
for i in range(int(a)):
b_array.append(b)
b_str = "".join(b_array)
if a_str < b_str:
print(a_str)
elif b_str < a_str:
print(b_str)
else:
print(a_str)
| a, b = input().split()
a_array = []
for i in range(int(b)):
a_array.append(a)
a_str = "".join(a_array)
b_array = []
for i in range(int(a)):
b_array.append(b)
b_str = "".join(b_array)
if a_str < b_str:
print(a_str)
elif b_str < a_str:
print(b_str)
else:
print(a_str)
| replace | 0 | 1 | 0 | 2 | EOFError: EOF when reading a line | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02790/Python/s069499411.py", line 1, in <module>
a, b = [input() for i in range(2)]
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02790/Python/s069499411.py", line 1, in <listcomp>
... |
p02790 | Python | Runtime Error | data = input().split()
a = data[0]
b = data[1]
ans = min(a, b) * max(a, b)
print(ans)
| data = input().split()
a = data[0]
b = data[1]
ans = min(a, b) * int(max(a, b))
print(ans)
| replace | 5 | 6 | 5 | 6 | TypeError: can't multiply sequence by non-int of type 'str' | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02790/Python/s088084103.py", line 6, in <module>
ans = min(a, b) * max(a, b)
TypeError: can't multiply sequence by non-int of type 'str'
|
p02790 | Python | Runtime Error | # -*- coding: utf-8 -*-
# 入力を整数に変換して受け取る
def input_int():
return int(input())
# マイナス1した値を返却
def int1(x):
return int(x) - 1
# 半角スペース区切り入力をIntに変換してMapで受け取る
def input_to_int_map():
return map(int, input().split())
# 半角スペース区切り入力をIntに変換して受け取る
def input_to_int_tuple():
return tuple(map(int, input().sp... | # -*- coding: utf-8 -*-
# 入力を整数に変換して受け取る
def input_int():
return int(input())
# マイナス1した値を返却
def int1(x):
return int(x) - 1
# 半角スペース区切り入力をIntに変換してMapで受け取る
def input_to_int_map():
return map(int, input().split())
# 半角スペース区切り入力をIntに変換して受け取る
def input_to_int_tuple():
return tuple(map(int, input().sp... | replace | 32 | 34 | 32 | 34 | TypeError: '<' not supported between instances of 'itertools.repeat' and 'itertools.repeat' | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02790/Python/s395813013.py", line 42, in <module>
print(main())
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02790/Python/s395813013.py", line 35, in main
if _a < _b:
TypeError: '<... |
p02790 | C++ | Runtime Error | #pragma GCC optimize("Ofast,unroll-loops,no-stack-protector,fast-math")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <algorithm>
#include <bits/stdc++.h>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
using namespace std;
const int MAX_N = int(1e6... | #pragma GCC optimize("Ofast,unroll-loops,no-stack-protector,fast-math")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <algorithm>
#include <bits/stdc++.h>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
using namespace std;
const int MAX_N = int(1e6... | delete | 431 | 435 | 431 | 431 | -6 | terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
|
p02790 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
char a, b;
int main() {
cin >> a >> b;
int ia = atoi((const char *)a);
int ib = atoi((const char *)b);
if (a < b) {
for (int i = 0; i < ib; ++i) {
cout << a;
}
cout << endl;
} else {
for (int i = 0; i < ia; ++i) {
cout << b;
}
... | #include <bits/stdc++.h>
using namespace std;
char a, b;
int main() {
cin >> a >> b;
int ia = a - '0';
int ib = b - '0';
if (a < b) {
for (int i = 0; i < ib; ++i) {
cout << a;
}
cout << endl;
} else {
for (int i = 0; i < ia; ++i) {
cout << b;
}
cout << endl;
}
} | replace | 7 | 9 | 7 | 9 | -11 | |
p02790 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int p, q;
cin >> p >> q;
int cnt;
if (p > q) {
cnt = 1;
} else if (q > p) {
cnt = 0;
}
int r = q, s = p;
for (int i = 0; i <= p; i = i * 10) {
r = r * (10 ^ i);
}
for (int i = 0; i <= q; i++) {
s = s * (10 ^ i);
}
if ... | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int p, q;
cin >> p >> q;
if (p == q || p > q) {
int x = 0;
for (int i = 0; i < p; i++) {
x = (x * 10) + q;
}
cout << x << endl;
} else {
int x = 0;
for (int i = 0; i < q; i++) {
x = (x * 10) + p;
}
cout <<... | replace | 5 | 22 | 5 | 17 | TLE | |
p02790 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
#define mod 1000000007
using namespace std;
const ll INF = 1e18;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
ll int a, b;
cin >... | #include <bits/stdc++.h>
#define ll long long
#define mod 1000000007
using namespace std;
const ll INF = 1e18;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
ll int a, b;
cin >> a >> b;
ll int r = min(a, b), s = max(a, b);
while (s != 0) {
cout << r;
s--;
}
} | replace | 10 | 14 | 10 | 11 | TLE | |
p02790 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
string A, B;
int i = 0, temp;
string result;
do {
temp = (int)(A[i] - '0') - (int)(B[i] - '0');
if (temp < 0)
result = A;
else if (temp > 0)
result = B;
i++;
} while (temp == 0);
cout << result << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
string result = "";
cin >> a >> b;
if (a >= b)
cout << result.append(a, (char)(b + '0')) << endl;
else
cout << result.append(b, (char)(a + '0')) << endl;
return 0;
} | replace | 4 | 17 | 4 | 11 | 0 | |
p02790 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef long long int ll;
typedef unsigned long long int ull;
typedef tree<int, null_type, less<int>, rb_tree_tag,
... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef long long int ll;
typedef unsigned long long int ull;
typedef tree<int, null_type, less<int>, rb_tree_tag,
... | delete | 58 | 63 | 58 | 58 | -6 | |
p02790 | C++ | Runtime Error | // Author :mdragneell
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
#define ull unsigned long long
#define ll long long
#define ld long double
#define pb push_back
#define pi pair<int, int>
#define pl pair<ll, ll>
#define f first
#define s second
ll... | // Author :mdragneell
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
#define ull unsigned long long
#define ll long long
#define ld long double
#define pb push_back
#define pi pair<int, int>
#define pl pair<ll, ll>
#define f first
#define s second
ll... | replace | 89 | 93 | 89 | 93 | TLE | |
p02790 | C++ | Runtime Error | #include <bits/stdc++.h>
//*************** Constraints are always Imaginary,I'm real **************
using namespace std;
#define int long long
#define MP make_pair
#define PB push_back
#define PI 3.1415926535897932384626433832795
#define MOD 1000000007
#define fi first
#define se second
typedef pair<int, int> PII;
type... | #include <bits/stdc++.h>
//*************** Constraints are always Imaginary,I'm real **************
using namespace std;
#define int long long
#define MP make_pair
#define PB push_back
#define PI 3.1415926535897932384626433832795
#define MOD 1000000007
#define fi first
#define se second
typedef pair<int, int> PII;
type... | replace | 20 | 24 | 20 | 24 | -6 | terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
|
p02790 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define N 100005
#define mod 998244353
#define boost \
ios_base::sync_with_stdio(false); \
cin.tie(0)
#define... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define N 100005
#define mod 998244353
#define boost \
ios_base::sync_with_stdio(false); \
cin.tie(0)
#define... | delete | 46 | 50 | 46 | 46 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.