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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p02703 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define int long long
struct E {
int to, co, ti;
};
struct P {
int tim, idx, res;
};
bool operator<(const P &a, const P &b) { return a.tim < b.tim; }
bool operator>(const P &a, const P &b) {
if (a.tim != b.tim)
return a.tim > b.tim;
return a.res < b.res;
}
int a... | #include <bits/stdc++.h>
using namespace std;
#define int long long
struct E {
int to, co, ti;
};
struct P {
int tim, idx, res;
};
bool operator<(const P &a, const P &b) { return a.tim < b.tim; }
bool operator>(const P &a, const P &b) {
if (a.tim != b.tim)
return a.tim > b.tim;
return a.res < b.res;
}
int a... | replace | 54 | 63 | 54 | 61 | TLE | |
p02703 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef pair<int, int> PII;
const LL inf = 0x3f3f3f3f3f3f3f3f;
const int N = 55, M = 110;
struct Edge {
int to, next;
LL a, b;
} e[M];
int head[N], idx;
LL c[N], d[N];
LL dis[N][2510];
int n, m, s;
void add(int u, int v, LL a, LL b) {
e[++idx].... | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef pair<int, int> PII;
const LL inf = 0x3f3f3f3f3f3f3f3f;
const int N = 55, M = 110;
struct Edge {
int to, next;
LL a, b;
} e[M * 2];
int head[N], idx;
LL c[N], d[N];
LL dis[N][2510];
int n, m, s;
void add(int u, int v, LL a, LL b) {
e[++i... | replace | 10 | 11 | 10 | 11 | 0 | |
p02703 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define pint pair<int, int>
#define vec vector<int>
#define vvec vector<vec>
#define pvec vector<vector<pint>>
#define tint tuple<int, int, int>
#define mt make_tuple
int n, m, s;
vvec to;
pvec cost;
const int inf = 1LL << 60;
int dp[60][3000];
// そ... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define pint pair<int, int>
#define vec vector<int>
#define vvec vector<vec>
#define pvec vector<vector<pint>>
#define tint tuple<int, int, int>
#define mt make_tuple
int n, m, s;
vvec to;
pvec cost;
const int inf = 1LL << 60;
int dp[60][3000];
// そ... | insert | 30 | 30 | 30 | 32 | 0 | |
p02703 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <vector>
using namespace std;
using ll = long long;
ll BASE_NUM = 1000000007;
const int NONE = -1;
template <t... | #include <algorithm>
#include <cmath>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <vector>
using namespace std;
using ll = long long;
ll BASE_NUM = 1000000007;
const int NONE = -1;
template <t... | replace | 84 | 88 | 84 | 88 | TLE | |
p02703 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define mod 1000000007
/* ちゃんと考えてわかって実装 */
const int MAX_V = 50;
const int MAX_S = 50 * MAX_V + 5;
const ll INF = 1e18;
struct Edge {
int to, a, b;
// これを書いたらerrorが取れた。どうして必要なのォぉ
Edge(int to, int a, int b) : to(to), a(a), b(b) {}
};
struct Sta... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define mod 1000000007
/* ちゃんと考えてわかって実装 */
const int MAX_V = 50;
const int MAX_S = 50 * MAX_V + 5;
const ll INF = 1e18;
struct Edge {
int to, a, b;
// これを書いたらerrorが取れた。どうして必要なのォぉ
Edge(int to, int a, int b) : to(to), a(a), b(b) {}
};
struct Sta... | replace | 24 | 25 | 24 | 26 | TLE | |
p02703 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define mod 1000000007
/* ちゃんと考えてわかって実装 */
const int MAX_V = 50;
const int MAX_S = 50 * MAX_V + 5;
const ll INF = 1e18;
struct Edge {
int to, a, b;
// これを書いたらerrorが取れた。どうして必要なのォぉ
Edge(int to, int a, int b) : to(to), a(a), b(b) {}
};
struct Sta... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define mod 1000000007
/* ちゃんと考えてわかって実装 */
const int MAX_V = 50;
const int MAX_S = 50 * MAX_V + 5;
const ll INF = 1e18;
struct Edge {
int to, a, b;
// これを書いたらerrorが取れた。どうして必要なのォぉ
Edge(int to, int a, int b) : to(to), a(a), b(b) {}
};
struct Sta... | replace | 24 | 25 | 24 | 25 | TLE | |
p02703 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; ++i)
#define rrep(i, n) for (int i = n - 1; i >= 0; i--)
#define rep2(i, s, n) for (int i = s; i < n; ++i)
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define tmax(a, b, c) max(a, max(b, c))
#define tmin(a, b, c) min(a, min(b, ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; ++i)
#define rrep(i, n) for (int i = n - 1; i >= 0; i--)
#define rep2(i, s, n) for (int i = s; i < n; ++i)
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define tmax(a, b, c) max(a, max(b, c))
#define tmin(a, b, c) min(a, min(b, ... | replace | 107 | 108 | 107 | 108 | 0 | |
p02703 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using vec = vector<pair<int, int64_t>>;
using graph = vector<vec>;
constexpr int64_t inf = 1e18;
int main() {
int n, m, s;
cin >> n >> m >> s;
vector<int> u(m), v(m), a(m), b(m), c(n), d(n);
for (int i = 0; i < m; i++) {
cin >> u.at(i) >> v.at(i) >> a.at(i) >>... | #include <bits/stdc++.h>
using namespace std;
using vec = vector<pair<int, int64_t>>;
using graph = vector<vec>;
constexpr int64_t inf = 1e18;
int main() {
int n, m, s;
cin >> n >> m >> s;
vector<int> u(m), v(m), a(m), b(m), c(n), d(n);
for (int i = 0; i < m; i++) {
cin >> u.at(i) >> v.at(i) >> a.at(i) >>... | replace | 40 | 41 | 40 | 43 | TLE | |
p02703 | C++ | Runtime Error | #include <bits/stdc++.h> // clang-format off
using Int = long long;
#define REP_(i, a_, b_, a, b, ...) for (Int i = (a), lim##i = (b); i < lim##i; i++)
#define REP(i, ...) REP_(i, __VA_ARGS__, __VA_ARGS__, 0, __VA_ARGS__)
struct SetupIO { SetupIO() { std::cin.tie(nullptr), std::ios::sync_with_stdio(false), std::cout <<... | #include <bits/stdc++.h> // clang-format off
using Int = long long;
#define REP_(i, a_, b_, a, b, ...) for (Int i = (a), lim##i = (b); i < lim##i; i++)
#define REP(i, ...) REP_(i, __VA_ARGS__, __VA_ARGS__, 0, __VA_ARGS__)
struct SetupIO { SetupIO() { std::cin.tie(nullptr), std::ios::sync_with_stdio(false), std::cout <<... | replace | 91 | 92 | 91 | 92 | 0 | |
p02703 | C++ | Runtime Error | #include <bits/stdc++.h>
#define M_PI 3.14159265358979323846 // pi
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<ll> VI;
typedef pair<ll, ll> P;
typedef tuple<ll, ll, ll> t3;
typedef tuple<ll, ll, ll, ll> t4;
#define rep(a, n) for (ll a = 0; a < n; a++)
#define repi(a, b, ... | #include <bits/stdc++.h>
#define M_PI 3.14159265358979323846 // pi
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<ll> VI;
typedef pair<ll, ll> P;
typedef tuple<ll, ll, ll> t3;
typedef tuple<ll, ll, ll, ll> t4;
#define rep(a, n) for (ll a = 0; a < n; a++)
#define repi(a, b, ... | insert | 35 | 35 | 35 | 36 | 0 | |
p02703 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define MAX_INF 0x7f
#define MAX_INF_VAL 0x7f7f7f7f
#define pi 3.141592653589
#define eps 1e-10
// #define p 2173412051LL
#define sz 2
using namespace std;
struct p {
int u, m;
ll t;
};
struct cmp {
bool operator()(const p &a, const p ... | #include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define MAX_INF 0x7f
#define MAX_INF_VAL 0x7f7f7f7f
#define pi 3.141592653589
#define eps 1e-10
// #define p 2173412051LL
#define sz 2
using namespace std;
struct p {
int u, m;
ll t;
};
struct cmp {
bool operator()(const p &a, const p ... | replace | 84 | 85 | 84 | 86 | TLE | |
p02703 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef pair<int, int> pii;
const int N = 55;
const int Mod = 2019;
#define pi acos(-1)
#define INF 1e18
#define INM INT_MIN
#define pb(a) push_back(a)
#define mk(a, b) make_pair(a, b)
#define dbg(x) cout << "now this num is " << x << endl;
#define met... | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef pair<int, int> pii;
const int N = 55;
const int Mod = 2019;
#define pi acos(-1)
#define INF 1e18
#define INM INT_MIN
#define pb(a) push_back(a)
#define mk(a, b) make_pair(a, b)
#define dbg(x) cout << "now this num is " << x << endl;
#define met... | replace | 39 | 40 | 39 | 41 | 0 | |
p02703 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
long long N, M, S;
// to (ginka, cost)
vector<pair<long long, pair<long long, long long>>> tree[100];
long long c[200];
long long d[200];
map<long long, long long> ans;
int main() {
cin >> N >> M >> S;
for (long long i = 0; i < M; i++) {
long long u;
long lo... | #include <bits/stdc++.h>
using namespace std;
long long N, M, S;
// to (ginka, cost)
vector<pair<long long, pair<long long, long long>>> tree[100];
long long c[200];
long long d[200];
map<long long, long long> ans;
int main() {
cin >> N >> M >> S;
for (long long i = 0; i < M; i++) {
long long u;
long lo... | replace | 75 | 76 | 75 | 78 | TLE | |
p02703 | C++ | Time Limit Exceeded | // <head>
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int INF = 1002003004;
const ll LINF = 1002003004005006007ll;
struct preprocess {
preprocess() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
cout << fixed << setprecision(20);
}
} ____;
// </head>
// <library>
// </l... | // <head>
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int INF = 1002003004;
const ll LINF = 1002003004005006007ll;
struct preprocess {
preprocess() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
cout << fixed << setprecision(20);
}
} ____;
// </head>
// <library>
// </l... | replace | 69 | 71 | 69 | 73 | TLE | |
p02703 | C++ | Runtime Error | #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;
#define ll long long
#define X first
#define Y second
#define all(x) x.begin(), x.end()
#define ordered_set ... | #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;
#define ll long long
#define X first
#define Y second
#define all(x) x.begin(), x.end()
#define ordered_set ... | replace | 92 | 93 | 92 | 93 | 0 | |
p02703 | C++ | Runtime Error | #include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// #define ordered_set tree<int, null_type, less<int>, rb_tree_tag,
// tree_order_statistics_node_update>
#define ll long long
#define int long long
#define FOR(i, x, y) for (int i = x; i <= y; ++i)
#define pb ... | #include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// #define ordered_set tree<int, null_type, less<int>, rb_tree_tag,
// tree_order_statistics_node_update>
#define ll long long
#define int long long
#define FOR(i, x, y) for (int i = x; i <= y; ++i)
#define pb ... | replace | 100 | 101 | 100 | 101 | 0 | |
p02703 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = (0); i < (n); i++)
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pll;
typedef pair<ll, pll> pl3;
const ll max_n = 52;
const ll max_s = 2500;
vector<ll> c, d;
vector<pl3> g[max_n];
ll n, m;
ll s;
const ll INF = 1e15;
ll dp[max_n + 1][max_s + ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = (0); i < (n); i++)
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pll;
typedef pair<ll, pll> pl3;
const ll max_n = 52;
const ll max_s = 2500;
vector<ll> c, d;
vector<pl3> g[max_n];
ll n, m;
ll s;
const ll INF = 1e15;
ll dp[max_n + 1][max_s + ... | replace | 39 | 40 | 39 | 41 | TLE | |
p02703 | C++ | Runtime Error | // #include<bits\stdc++.h>
#include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include... | // #include<bits\stdc++.h>
#include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include... | replace | 85 | 86 | 85 | 86 | 0 | |
p02703 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cassert>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <map>
#include <queue>
#include <set>
#include <string.h>
#include <vector>
using namespace std;
typedef long long ll;
const int MAX_N = 52;
struct Edge {
int to;
ll cost;
ll time;
Ed... | #include <algorithm>
#include <cassert>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <map>
#include <queue>
#include <set>
#include <string.h>
#include <vector>
using namespace std;
typedef long long ll;
const int MAX_N = 52;
struct Edge {
int to;
ll cost;
ll time;
Ed... | replace | 69 | 70 | 69 | 70 | TLE | |
p02703 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define ar array
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
template <typename T>
using oset =
tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_no... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define ar array
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
template <typename T>
using oset =
tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_no... | insert | 182 | 182 | 182 | 183 | 0 | |
p02703 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vec;
typedef vector<vec> mat;
typedef pair<ll, ll> pll;
const ll mod = 1e9 + 7;
// const ll mod=998244353;
const ll inf = 1LL << 61;
typedef pair<ll, pll> ppll;
int main() {
ll n, m, s;
cin >> n >> m >> s;
vector<map<ll, pll>... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vec;
typedef vector<vec> mat;
typedef pair<ll, ll> pll;
const ll mod = 1e9 + 7;
// const ll mod=998244353;
const ll inf = 1LL << 61;
typedef pair<ll, pll> ppll;
int main() {
ll n, m, s;
cin >> n >> m >> s;
vector<map<ll, pll>... | replace | 53 | 61 | 53 | 57 | TLE | |
p02703 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<ll, ll> pii;
#define fi first
#define se second
#define mod 1000000007
#define maxn 2500ll
#define ios \
ios_base::sync_with_stdio(false); ... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<ll, ll> pii;
#define fi first
#define se second
#define mod 1000000007
#define maxn 2500ll
#define ios \
ios_base::sync_with_stdio(false); ... | replace | 19 | 20 | 19 | 20 | 0 | |
p02703 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
const int maxn = 55;
const ll INF = 1e15;
ll all = 0;
struct Node {
ll id, dis, level;
bool operator<(const Node &a) const { return dis > a.dis; }
};
ll u[maxn * 2], v[maxn * 2], w[maxn * 2], cost[maxn * 2], nextt[maxn * 2],
first[maxn], sign;
i... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
const int maxn = 55;
const ll INF = 1e15;
ll all = 0;
struct Node {
ll id, dis, level;
bool operator<(const Node &a) const { return dis > a.dis; }
};
ll u[maxn * 4], v[maxn * 4], w[maxn * 4], cost[maxn * 4], nextt[maxn * 4],
first[maxn], sign;
i... | replace | 10 | 11 | 10 | 11 | 0 | |
p02703 | C++ | Time Limit Exceeded | #define _USE_MATH_DEFINES
#include <algorithm>
#include <array>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string.h>
#in... | #define _USE_MATH_DEFINES
#include <algorithm>
#include <array>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string.h>
#in... | replace | 74 | 75 | 74 | 75 | TLE | |
p02703 | Python | Time Limit Exceeded | import heapq
N, M, init_silver = map(int, input().split())
MAX_COST = 2500
init_silver = min(init_silver, MAX_COST)
G = [[] for _ in range(N)]
for i in range(M):
u, v, silver_cost, time_cost = map(int, input().split())
u, v = u - 1, v - 1
G[u].append([v, silver_cost, time_cost])
G[v].append([u, silver... | import heapq
N, M, init_silver = map(int, input().split())
MAX_COST = 2500
init_silver = min(init_silver, MAX_COST)
G = [[] for _ in range(N)]
for i in range(M):
u, v, silver_cost, time_cost = map(int, input().split())
u, v = u - 1, v - 1
G[u].append([v, silver_cost, time_cost])
G[v].append([u, silver... | replace | 41 | 42 | 41 | 42 | TLE | |
p02703 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef tuple<ll, ll, ll> T;
const ll inf = 1e18;
const ll MAX = 2500;
ll N, S;
vector<pair<ll, pair<ll, ll>>> g[100];
ll c[100], d[100];
void solve(int x) {
vector<vector<ll>> dp(N + 1, vector<ll>(MAX + 1, inf));
priority_queue<pair<ll, pair<ll... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef tuple<ll, ll, ll> T;
const ll inf = 1e18;
const ll MAX = 2500;
ll N, S;
vector<pair<ll, pair<ll, ll>>> g[100];
ll c[100], d[100];
void solve(int x) {
if (S >= MAX)
S = MAX;
vector<vector<ll>> dp(N + 1, vector<ll>(MAX + 1, inf));
pr... | insert | 13 | 13 | 13 | 15 | 0 | |
p02703 | C++ | Time Limit Exceeded | #pragma GCC optimize("Ofast")
#include <algorithm>
#include <queue>
#include <stdio.h>
#include <vector>
using namespace std;
struct Edge {
long long to, cost,
dis; // used in state is cur_v,cur_money,distance with node 1
};
vector<Edge> g[55];
long long c[55], d[55], dp[55][2550], maxv = 2500;
struct cmp {
b... | #pragma GCC optimize("Ofast")
#include <algorithm>
#include <queue>
#include <stdio.h>
#include <vector>
using namespace std;
struct Edge {
long long to, cost,
dis; // used in state is cur_v,cur_money,distance with node 1
};
vector<Edge> g[55];
long long c[55], d[55], dp[55][2550], maxv = 2500;
struct cmp {
b... | insert | 35 | 35 | 35 | 37 | TLE | |
p02703 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
#define COUT(x) cout << #x << " = " << (x) << " (L" << __... | #include <bits/stdc++.h>
using namespace std;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
#define COUT(x) cout << #x << " = " << (x) << " (L" << __... | replace | 79 | 80 | 79 | 80 | -6 | corrupted size vs. prev_size
|
p02703 | C++ | Time Limit Exceeded | #include "bits/stdc++.h"
using namespace std;
#define int long long
#define REP(i, n) for (int i = 0; i < (int)n; ++i)
#define RREP(i, n) for (int i = (int)n - 1; i >= 0; --i)
#define FOR(i, s, n) for (int i = s; i < (int)n; ++i)
#define RFOR(i, s, n) for (int i = (int)n - 1; i >= s; --i)
#define ALL(a) a.begin(), a.en... | #include "bits/stdc++.h"
using namespace std;
#define int long long
#define REP(i, n) for (int i = 0; i < (int)n; ++i)
#define RREP(i, n) for (int i = (int)n - 1; i >= 0; --i)
#define FOR(i, s, n) for (int i = s; i < (int)n; ++i)
#define RFOR(i, s, n) for (int i = (int)n - 1; i >= s; --i)
#define ALL(a) a.begin(), a.en... | replace | 78 | 88 | 78 | 84 | TLE | |
p02704 | C++ | Runtime Error | #pragma region template
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vvvll = vector<vvll>;
using vull = vector<... | #pragma region template
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vvvll = vector<vvll>;
using vull = vector<... | replace | 139 | 142 | 139 | 428 | 11 | |
p02704 | 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;
using ull = unsigned long long;
using P = pair<int, int>;
vector<int> s[2];
vector<ull> u[2];
const int N = 500;
int n;
int val[2][N];
int d[N][N];
void flip() {
rep(i, n) rep(j, i) { swap(d[i][j], d... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using ull = unsigned long long;
using P = pair<int, int>;
vector<int> s[2];
vector<ull> u[2];
const int N = 500;
int n;
int val[2][N];
int d[N][N];
void flip() {
rep(i, n) rep(j, i) { swap(d[i][j], d... | replace | 81 | 82 | 81 | 82 | -6 | terminate called after throwing an instance of 'int'
|
p02704 | C++ | Runtime Error | #include <bits/stdc++.h> // clang-format off
using Int = long long;
#define REP_(i, a_, b_, a, b, ...) for (Int i = (a), lim##i = (b); i < lim##i; i++)
#define REP(i, ...) REP_(i, __VA_ARGS__, __VA_ARGS__, 0, __VA_ARGS__)
struct SetupIO { SetupIO() { std::cin.tie(nullptr), std::ios::sync_with_stdio(false), std::cout <<... | #include <bits/stdc++.h> // clang-format off
using Int = long long;
#define REP_(i, a_, b_, a, b, ...) for (Int i = (a), lim##i = (b); i < lim##i; i++)
#define REP(i, ...) REP_(i, __VA_ARGS__, __VA_ARGS__, 0, __VA_ARGS__)
struct SetupIO { SetupIO() { std::cin.tie(nullptr), std::ios::sync_with_stdio(false), std::cout <<... | replace | 75 | 77 | 75 | 77 | 0 | |
p02704 | 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;
#ifdef ENABLE_DEBUG
#define dump(a) cerr << #a << "=" << a << endl
#define dumparr(a, n) cerr << #a << "[" << n << "]=" << a[n] << endl
#else
#define dump(a)
#define du... | #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;
#ifdef ENABLE_DEBUG
#define dump(a) cerr << #a << "=" << a << endl
#define dumparr(a, n) cerr << #a << "[" << n << "]=" << a[n] << endl
#else
#define dump(a)
#define du... | replace | 145 | 146 | 145 | 147 | 0 | |
p02704 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
/*
Coded by 秦惜梦
The most attractive girl in the world
.........
`;!!!!!!!!!;;;;;;;;::::::'''''''``''''''''````````````````````....`:;;;;;:'.....`:|$$$$$$$|;;;:`.
..........`''``...`''``. ........ ... ... .... ... ... '
........
'!!!!!!!!!;;;;;;;:::::::::''''':::'... | #include <bits/stdc++.h>
using namespace std;
/*
Coded by 秦惜梦
The most attractive girl in the world
.........
`;!!!!!!!!!;;;;;;;;::::::'''''''``''''''''````````````````````....`:;;;;;:'.....`:|$$$$$$$|;;;:`.
..........`''``...`''``. ........ ... ... .... ... ... '
........
'!!!!!!!!!;;;;;;;:::::::::''''':::'... | replace | 283 | 284 | 283 | 284 | 0 | |
p02704 | C++ | Runtime Error | #pragma region Macros
#pragma GCC optimize("O3")
#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define rep2(i, a, b) for (ll i = a; i <= b; ++i)
#define rep(i, n) for (ll i = 0; i < n; i++)
#define rep3(i, a, b) for (ll i = a; i >= b; i--)
#define pii pair<int, int>
#define pll pair<ll, ll>
#defi... | #pragma region Macros
#pragma GCC optimize("O3")
#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define rep2(i, a, b) for (ll i = a; i <= b; ++i)
#define rep(i, n) for (ll i = 0; i < n; i++)
#define rep3(i, a, b) for (ll i = a; i >= b; i--)
#define pii pair<int, int>
#define pll pair<ll, ll>
#defi... | delete | 339 | 340 | 339 | 339 | 0 | |
p02704 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#incl... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#incl... | replace | 37 | 38 | 37 | 38 | 0 | |
p02704 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define RREP(i, n) for (int i = (int)(n)-1; i >= 0; --i)
#define FOR(i, a, n) for (int i = (a); i < (n); ++i)
#define RFOR(i, a, n) for (int i = (int)(n)-1; i >= (a); --i)
#define SZ(x) ((int)(x).size())
#define all(x) (x).... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define RREP(i, n) for (int i = (int)(n)-1; i >= 0; --i)
#define FOR(i, a, n) for (int i = (a); i < (n); ++i)
#define RFOR(i, a, n) for (int i = (int)(n)-1; i >= (a); --i)
#define SZ(x) ((int)(x).size())
#define all(x) (x).... | replace | 200 | 201 | 200 | 201 | 0 | |
p02704 | C++ | Runtime Error | #pragma region kyopro_template
#include <bits/stdc++.h>
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define each(x, v) for (auto &x : v)
#define all(v) (v).begin(), (v).end()
#define sz(v) ((int)(v).size())
#define mem(a, val) memset(a, val, sizeof(a))
#define ini(...) ... | #pragma region kyopro_template
#include <bits/stdc++.h>
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define each(x, v) for (auto &x : v)
#define all(v) (v).begin(), (v).end()
#define sz(v) ((int)(v).size())
#define mem(a, val) memset(a, val, sizeof(a))
#define ini(...) ... | replace | 258 | 259 | 258 | 265 | 0 | |
p02705 | Python | Runtime Error | n, m = map(int, input().split())
a = list(map(int, input().split()))
if n - sum(a) >= 0:
print(n - sum(a))
else:
print(-1)
| import math
r = int(input())
print(2 * r * math.pi)
| replace | 0 | 6 | 0 | 4 | ValueError: not enough values to unpack (expected 2, got 1) | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02705/Python/s499723334.py", line 1, in <module>
n, m = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)
|
p02705 | Python | Runtime Error | import math
print(int(input()) * 2 * math.pi())
| import math
print(int(input()) * 2 * math.pi)
| replace | 2 | 3 | 2 | 3 | TypeError: 'float' object is not callable | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02705/Python/s976752979.py", line 3, in <module>
print(int(input()) * 2 * math.pi())
TypeError: 'float' object is not callable
|
p02705 | Python | Runtime Error | # coding: utf-8
def main():
R = input(int())
return R * 2 * 3.1415
print(main())
| # coding: utf-8
def main():
R = int(input())
return R * 2 * 3.1415
print(main())
| replace | 4 | 5 | 4 | 6 | TypeError: can't multiply sequence by non-int of type 'float' | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02705/Python/s656493829.py", line 9, in <module>
print(main())
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02705/Python/s656493829.py", line 6, in main
return R * 2 * 3.1415
TypeE... |
p02705 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <stdio.h>
#include <vector>
using namespace std;
#define int long long
#define double long double
#define rep(s, i, n) for (int i = s; i < n; i++)
#define c(n) cout << n << endl;
#define ic(n) ... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <stdio.h>
#include <vector>
using namespace std;
#define int long long
#define double long double
#define rep(s, i, n) for (int i = s; i < n; i++)
#define c(n) cout << n << endl;
#define ic(n) ... | replace | 273 | 280 | 273 | 277 | -11 | |
p02705 | C++ | Runtime Error | #include <cstdio>
#include <math.h>
#define PI acos(-1)
using namespace std;
int main() {
int n;
scanf("%lld", &n);
printf("%lf", 2 * n * PI);
} | #include <cstdio>
#include <math.h>
#define PI acos(-1)
using namespace std;
int main() {
int n;
scanf("%d", &n);
printf("%lf", 2 * n * PI);
} | replace | 8 | 9 | 8 | 9 | -6 | *** stack smashing detected ***: terminated
|
p02705 | Python | Runtime Error | import math
r = input()
print(2 * math.pi * r)
quit()
| import math
r = int(input())
print(2 * math.pi * r)
quit()
| replace | 2 | 3 | 2 | 3 | TypeError: can't multiply sequence by non-int of type 'float' | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02705/Python/s962052579.py", line 3, in <module>
print(2 * math.pi * r)
TypeError: can't multiply sequence by non-int of type 'float'
|
p02705 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<vi> vvi;
typedef vector<vl> vvl;
typedef vector<string> vst;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<pii> vii;
typedef vector<pll> vll;
#define fastio ... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<vi> vvi;
typedef vector<vl> vvl;
typedef vector<string> vst;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<pii> vii;
typedef vector<pll> vll;
#define fastio ... | replace | 42 | 53 | 42 | 46 | -6 | terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
|
p02705 | C++ | Runtime Error | /* TAHMID RAHMAN
DAMIAN FOREVER
MATH LOVER
NEVER GIVE UP
*/
#include <bits/stdc++.h>
using namespace std;
#define pi acos(-1.0)
#define fastio \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);... | /* TAHMID RAHMAN
DAMIAN FOREVER
MATH LOVER
NEVER GIVE UP
*/
#include <bits/stdc++.h>
using namespace std;
#define pi acos(-1.0)
#define fastio \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);... | replace | 21 | 35 | 21 | 25 | -6 | terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
|
p02705 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, b) for (i = 0; i < b; ++i)
#define repp(i, a, b) for (i = a; i < b; ++i)
#define endl "\n"
// #define LLONG_MAX 99999999999999
typedef long long int lli;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
lli t, n, i, j, b, a, q, m;
cin >> ... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, b) for (i = 0; i < b; ++i)
#define repp(i, a, b) for (i = a; i < b; ++i)
#define endl "\n"
// #define LLONG_MAX 99999999999999
typedef long long int lli;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
lli t, n, i, j, b, a, q, m;
double ... | replace | 11 | 21 | 11 | 14 | -6 | terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
|
p02705 | C++ | Runtime Error | // https://codeforces.com/contest/1287/problem/A
// Author: BrownieTK
// #pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
//========================Debug==============================... | // https://codeforces.com/contest/1287/problem/A
// Author: BrownieTK
// #pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
//========================Debug==============================... | replace | 175 | 184 | 175 | 180 | -6 | terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
|
p02705 | C++ | Runtime Error | #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;
#define int long long
#define endl '\n'
#define pb push_back
#define fi first
#define se second
#define all(c) (c).begin(), (c).end()
typedef long long ll;
typedef long... | #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;
#define int long long
#define endl '\n'
#define pb push_back
#define fi first
#define se second
#define all(c) (c).begin(), (c).end()
typedef long long ll;
typedef long... | replace | 43 | 55 | 43 | 46 | -11 | |
p02705 | C++ | Runtime Error | ///******* In the name of Allah *******///
#include <bits/stdc++.h>
using namespace std;
void Ok() {
int a;
double aa, bb;
scanf("%ld", &a);
aa = a;
bb = 2 * 3.1416 * aa;
printf("%0.2lf", bb);
}
int main() {
Ok();
return 0;
}
| ///******* In the name of Allah *******///
#include <bits/stdc++.h>
using namespace std;
void Ok() {
int a;
double aa, bb;
scanf("%d", &a);
aa = a;
bb = 2 * 3.1416 * aa;
printf("%0.2lf", bb);
}
int main() {
Ok();
return 0;
}
| replace | 8 | 9 | 8 | 9 | 0 | |
p02705 | C++ | Time Limit Exceeded | // =====================================================================================
//
// Filename: at.cpp
//
// Description:
//
// Version: 1.0
// Created: 19/04/20 05:21:38 PM IST
// Revision: none
// Compiler: g++
//
// Author: Kiran Bhanushali (), kiranbhanushal... | // =====================================================================================
//
// Filename: at.cpp
//
// Description:
//
// Version: 1.0
// Created: 19/04/20 05:21:38 PM IST
// Revision: none
// Compiler: g++
//
// Author: Kiran Bhanushali (), kiranbhanushal... | replace | 27 | 39 | 27 | 32 | TLE | |
p02705 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#define boost \
ios_base::sync_with_stdio(false); ... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#define boost \
ios_base::sync_with_stdio(false); ... | replace | 26 | 35 | 26 | 30 | TLE | |
p02705 | C++ | Runtime Error | // #pragma GCC optimize("O3")
// #pragma GCC target("avx2")
// 293206GT
#include <algorithm>
#include <algorithm>
#include <bitset>
#include <chrono>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#includ... | // #pragma GCC optimize("O3")
// #pragma GCC target("avx2")
// 293206GT
#include <algorithm>
#include <algorithm>
#include <bitset>
#include <chrono>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#includ... | replace | 72 | 73 | 72 | 73 | 0 | |
p02705 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define ld long double
#define ll long long
#define rem 1000000007
typedef vector<ll> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef pair<ll, ll> pii;
#define v(x) vector<x>
#define pb(x) push_back(x)
#define ppb() pop_back()
#define mp(x, y) make_pair(x, y... | #include <bits/stdc++.h>
using namespace std;
#define ld long double
#define ll long long
#define rem 1000000007
typedef vector<ll> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef pair<ll, ll> pii;
#define v(x) vector<x>
#define pb(x) push_back(x)
#define ppb() pop_back()
#define mp(x, y) make_pair(x, y... | replace | 88 | 98 | 88 | 93 | TLE | |
p02705 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int INF = 0x3f3f3f3f;
const int maxn = 110000;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout << setiosflags(ios::fixed) << setprecision(12);
ll n, m;
cin >> n >> m;
vector<int> a(n + 1);
ll sum = 0;
for (int i = 1; i... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int INF = 0x3f3f3f3f;
const int maxn = 110000;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout << setiosflags(ios::fixed) << setprecision(12);
double pi = acos(-1);
int n;
cin >> n;
double ans = 2 * pi * n;
cout << ans... | replace | 10 | 23 | 10 | 15 | TLE | |
p02706 | C++ | Runtime Error | #include <iostream>
#include <stdlib.h>
#include <string>
using namespace std;
int main() {
int n, m, A[1000], ans;
cin >> n >> m;
ans = n;
for (int i = 0; i < m; i++) {
cin >> A[i];
ans = ans - A[i];
}
if (ans < 0)
ans = -1;
cout << ans;
return 0;
} | #include <iostream>
#include <stdlib.h>
#include <string>
using namespace std;
int main() {
int n, m, A[10000], ans;
cin >> n >> m;
ans = n;
for (int i = 0; i < m; i++) {
cin >> A[i];
ans = ans - A[i];
}
if (ans < 0)
ans = -1;
cout << ans;
return 0;
} | replace | 6 | 8 | 6 | 7 | 0 | |
p02706 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int ara[1000];
for (int i = 1; i <= m; i++) {
cin >> ara[i];
}
int sum = 0;
for (int i = 1; i <= m; i++) {
sum = sum + ara[i];
}
if (n >= sum)
cout << n - sum << endl;
else
cout << "-1" << endl;
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int ara[10000];
for (int i = 1; i <= m; i++) {
cin >> ara[i];
}
int sum = 0;
for (int i = 1; i <= m; i++) {
sum = sum + ara[i];
}
if (n >= sum)
cout << n - sum << endl;
else
cout << "-1" << endl;
... | replace | 7 | 8 | 7 | 8 | 0 | |
p02706 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
int day, hw, req[1000] = {};
cin >> day >> hw;
for (int i = 0; i < hw; ++i) {
cin >> req[i];
day -= req[i];
}
if (day >= 0) {
cout << day;
} else {
cout << "-1";
}
cout << endl;
return 0;
} | #include <iostream>
using namespace std;
int main() {
int day, hw, req[10000] = {};
cin >> day >> hw;
for (int i = 0; i < hw; ++i) {
cin >> req[i];
day -= req[i];
}
if (day >= 0) {
cout << day;
} else {
cout << "-1";
}
cout << endl;
return 0;
} | replace | 4 | 5 | 4 | 5 | 0 | |
p02706 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(0);
int n, m;
cin >> n >> m;
vector<int> a(1000100, 0);
for (int i = 1; i <= n; i++) {
cin >> a[i];
}
int s = accumulate(a.begin() + 1, a.end() + n + 1, 0);
if (n - s >= 0)
cout << n - s << "\n";
else
cout <... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(0);
int n, m;
cin >> n >> m;
vector<int> a(1000100, 0);
for (int i = 1; i <= n; i++) {
cin >> a[i];
}
long long s = accumulate(a.begin() + 1, a.begin() + n + 1, 0);
if (n - s >= 0)
cout << n - s << "\n";
else
... | replace | 13 | 14 | 13 | 14 | 0 | |
p02706 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main(void) {
int N, M;
int A[1000];
cin >> N >> M;
int sum = 0;
for (int i = 0; i < M; i++) {
cin >> A[i];
sum += A[i];
}
if (N >= sum) {
cout << N - sum << endl;
} else {
cout << "-1" << endl;
}
return 0;
} | #include <iostream>
using namespace std;
int main(void) {
int N, M;
int A[10000];
cin >> N >> M;
int sum = 0;
for (int i = 0; i < M; i++) {
cin >> A[i];
sum += A[i];
}
if (N >= sum) {
cout << N - sum << endl;
} else {
cout << "-1" << endl;
}
return 0;
} | replace | 5 | 6 | 5 | 6 | 0 | |
p02706 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <sstream>
#define ll long long int
#include <stdlib.h>
#include <vector>
#define pi acos(-1)
#define maxm 100005
#define pb push_back
#define MOD 1e9 + 7
#define highest(x) numeric_limits<x>::max()
#define lowest(x) numeric_limits<x>::min()
/// s1.substr(1,3);///STARTING FROM INDEX 1, ... | #include <bits/stdc++.h>
#include <sstream>
#define ll long long int
#include <stdlib.h>
#include <vector>
#define pi acos(-1)
#define maxm 100005
#define pb push_back
#define MOD 1e9 + 7
#define highest(x) numeric_limits<x>::max()
#define lowest(x) numeric_limits<x>::min()
/// s1.substr(1,3);///STARTING FROM INDEX 1, ... | replace | 173 | 174 | 173 | 174 | 0 | |
p02706 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; ++i)
#define rep1(i, n) for (int i = 1; i <= n; ++i)
using namespace std;
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, co... | #include <algorithm>
#include <iostream>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; ++i)
#define rep1(i, n) for (int i = 1; i <= n; ++i)
using namespace std;
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, co... | replace | 27 | 28 | 27 | 28 | 0 | |
p02706 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> A;
for (int i = 0; i < M; i++) {
cin >> A.at(i);
}
int sum = 0;
for (int i = 0; i < M; i++) {
sum += A.at(i);
}
cout << max(N - sum, -1) << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> A(M);
for (int i = 0; i < M; i++) {
cin >> A.at(i);
}
int sum = 0;
for (int i = 0; i < M; i++) {
sum += A.at(i);
}
cout << max(N - sum, -1) << endl;
} | replace | 6 | 7 | 6 | 7 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)
|
p02706 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
int N, M;
cin >> N;
cin >> M;
int A[M];
int T = 0;
for (int i = 0; i < N; i++) {
cin >> A[i];
T += A[i];
}
if (N >= T) {
cout << N - T << endl;
} else {
cout << -1 << endl;
}
}
| #include <iostream>
using namespace std;
int main() {
int N, M;
cin >> N;
cin >> M;
int A[M];
int T = 0;
for (int i = 0; i < M; i++) {
cin >> A[i];
T += A[i];
}
if (N >= T) {
cout << N - T << endl;
} else {
cout << -1 << endl;
}
}
| replace | 12 | 13 | 12 | 13 | 0 | |
p02706 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
int n, m, a[1500] = {0};
cin >> n >> m;
for (int i = 0; i < m; i++) {
cin >> a[i];
}
int sum = 0, ans;
for (int i = 0; i < m; i++) {
sum = sum + a[i];
}
ans = n - sum;
if (ans >= 0) {
cout << ans << "\n";
} else {
cout << -1 << ... | #include <iostream>
using namespace std;
int main() {
int n, m, a[10000] = {0};
cin >> n >> m;
for (int i = 0; i < m; i++) {
cin >> a[i];
}
int sum = 0, ans;
for (int i = 0; i < m; i++) {
sum = sum + a[i];
}
ans = n - sum;
if (ans >= 0) {
cout << ans << "\n";
} else {
cout << -1 <<... | replace | 4 | 5 | 4 | 5 | 0 | |
p02706 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int sum;
vector<int> syukudai_nissuu;
for (int i = 0; i < M; i++) {
cin >> syukudai_nissuu.at(i);
}
sum = accumulate(syukudai_nissuu.begin(), syukudai_nissuu.end(), 0);
if (N - sum >= 0) {
cout << N - sum << e... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int sum;
vector<int> syukudai_nissuu(M);
for (int i = 0; i < M; i++) {
cin >> syukudai_nissuu.at(i);
}
sum = accumulate(syukudai_nissuu.begin(), syukudai_nissuu.end(), 0);
if (N - sum >= 0) {
cout << N - sum <... | replace | 8 | 9 | 8 | 9 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)
|
p02706 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int sum = 0, m, n, a[1001], i;
cin >> n >> m;
for (i = 0; i < m; i++) {
cin >> a[i];
sum += a[i];
}
if (sum <= n)
cout << n - sum;
else
cout << "-1";
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int sum = 0, m, n, a[10001], i;
cin >> n >> m;
for (i = 0; i < m; i++) {
cin >> a[i];
sum += a[i];
}
if (sum <= n)
cout << n - sum;
else
cout << "-1";
return 0;
}
| replace | 3 | 4 | 3 | 4 | 0 | |
p02706 | C++ | Runtime Error | #include <bits/stdc++.h>
#define REP(i, n) for (int(i) = 0; (i) < (n); ++(i))
#define REPV(iter, v) \
for (auto(iter) = (v).begin(); (iter) != (v).end(); ++(iter))
#define ALL(v) (v).begin(), (v).end()
#define MOD 1000000007
using namespace std;
typedef lon... | #include <bits/stdc++.h>
#define REP(i, n) for (int(i) = 0; (i) < (n); ++(i))
#define REPV(iter, v) \
for (auto(iter) = (v).begin(); (iter) != (v).end(); ++(iter))
#define ALL(v) (v).begin(), (v).end()
#define MOD 1000000007
using namespace std;
typedef lon... | replace | 19 | 20 | 19 | 20 | 0 | |
p02706 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
using namespace std;
using p = pair<int, int>;
int main() {
int n, m, sum = 0;
vector<int> a(1000);
cin >> n >> m;
rep(i, m) {
cin >> a.at(i);
sum += a.at(i);
}
if (... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
using namespace std;
using p = pair<int, int>;
int main() {
int n, m, sum = 0;
vector<int> a(10000);
cin >> n >> m;
rep(i, m) {
cin >> a.at(i);
sum += a.at(i);
}
if ... | replace | 8 | 9 | 8 | 9 | 0 | |
p02706 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> vec(100, 0);
for (int i = 0; i < M; i++) {
cin >> vec.at(i);
}
int a = 0;
for (int i = 0; i < M; i++) {
a += vec.at(i);
}
if (N < a) {
cout << "-1" << endl;
} else {
cout << N - a << endl;... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> vec(M);
for (int i = 0; i < M; i++) {
cin >> vec.at(i);
}
int a = 0;
for (int i = 0; i < M; i++) {
a += vec.at(i);
}
if (N < a) {
cout << "-1" << endl;
} else {
cout << N - a << endl;
}
... | replace | 5 | 6 | 5 | 6 | 0 | |
p02706 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int sum = 0;
vector<int> a(M);
for (int i = 0; i < N; i++) {
cin >> a.at(i);
sum += a.at(i);
}
if (sum <= N) {
cout << N - sum << endl;
} else {
cout << -1 << endl;
}
// ここにプログラムを追記
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int sum = 0;
vector<int> a(M);
for (int i = 0; i < M; i++) {
cin >> a.at(i);
sum += a.at(i);
}
if (sum <= N) {
cout << N - sum << endl;
} else {
cout << -1 << endl;
}
// ここにプログラムを追記
}
| replace | 8 | 9 | 8 | 9 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): vector::_M_range_check: __n (which is 2) >= this->size() (which is 2)
|
p02706 | C++ | Runtime Error | // int a = stoi(c); 文字列をintへ
// 小文字から大文字
// transform(a.begin(), a.end(), a.begin(), ::toupper);
// 途中の出力をそのまま残さない
// 数値計算 個数以外はdouble
// map<キー,値> p は辞書。p[キー] = 値
// map 全探索
// auto begin = p.begin(), end = p.end();
// for (auto it = begin; it != end; it++) {}
// mapのキー:it->first mapのバリュー:it->second
// 絶対値 abs()
// 入力... | // int a = stoi(c); 文字列をintへ
// 小文字から大文字
// transform(a.begin(), a.end(), a.begin(), ::toupper);
// 途中の出力をそのまま残さない
// 数値計算 個数以外はdouble
// map<キー,値> p は辞書。p[キー] = 値
// map 全探索
// auto begin = p.begin(), end = p.end();
// for (auto it = begin; it != end; it++) {}
// mapのキー:it->first mapのバリュー:it->second
// 絶対値 abs()
// 入力... | replace | 144 | 145 | 144 | 145 | 0 | |
p02706 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
const int N = 200005;
const long double EPS = 1e-9;
const long double PI = acos(-1.);
int main() {
// #ifdef LOCAL
// freopen("input.txt", "r", stdin);
// freopen("output.txt", "w", stdout);
// #end... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
const int N = 200005;
const long double EPS = 1e-9;
const long double PI = acos(-1.);
int main() {
// #ifdef LOCAL
// freopen("input.txt", "r", stdin);
// freopen("output.txt", "w", stdout);
// #end... | replace | 22 | 23 | 22 | 23 | 0 | |
p02706 | C++ | Runtime Error | #include <array>
#include <iostream>
using namespace std;
int main() {
int n, m, sum = 0;
array<int, 1000> working_day;
cin >> n >> m;
for (int i = 1; i <= m; i++) {
cin >> working_day[i];
sum += working_day[i];
}
if (n >= sum) {
cout << n - sum;
} else {
cout << -1;
}
return 0;
} | #include <array>
#include <iostream>
using namespace std;
int main() {
int n, m, sum = 0;
array<int, 10000> working_day;
cin >> n >> m;
for (int i = 1; i <= m; i++) {
cin >> working_day[i];
sum += working_day[i];
}
if (n >= sum) {
cout << n - sum;
} else {
cout << -1;
}
return 0;
} | replace | 6 | 7 | 6 | 7 | 0 | |
p02706 | C++ | Runtime Error | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
int main() {
int n, m, ans = 0, sum = 0;
cin >> n >> m;
vector<int> a(1000000000);
for (int i = 0; i < m; i++) {
cin >> a[i];
sum += a[i];
}
if (n < sum) {
ans = -1;
} else {
... | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
int main() {
int n, m, ans = 0, sum = 0;
cin >> n >> m;
vector<int> a(10000000);
for (int i = 0; i < m; i++) {
cin >> a[i];
sum += a[i];
}
if (n < sum) {
ans = -1;
} else {
... | replace | 10 | 11 | 10 | 11 | -6 | terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
|
p02706 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll n, m, sum;
ll a[1000];
cin >> n >> m;
sum = 0;
for (int i = 1; i <= m; i++) {
cin >> a[i];
sum += a[i];
}
if (n > sum) {
cout << n - sum << endl;
} else if (n == sum) {
cout << "0" << endl;
} else if (s... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll n, m, sum;
ll a[10000];
cin >> n >> m;
sum = 0;
for (int i = 1; i <= m; i++) {
cin >> a[i];
sum += a[i];
}
if (n > sum) {
cout << n - sum << endl;
} else if (n == sum) {
cout << "0" << endl;
} else if (... | replace | 5 | 6 | 5 | 6 | 0 | |
p02706 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> v;
for (int i = 0; i < m; i++) {
cin >> v.at(i);
}
int k;
k = 0;
for (int i = 0; i < m; i++) {
k += v.at(i);
}
if (n < k) {
cout << -1 << endl;
} else {
cout << n - k << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> v(m);
for (int i = 0; i < m; i++) {
cin >> v.at(i);
}
int k;
k = 0;
for (int i = 0; i < m; i++) {
k += v.at(i);
}
if (n < k) {
cout << -1 << endl;
} else {
cout << n - k << endl;
}
} | replace | 7 | 8 | 7 | 8 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)
|
p02706 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
int M;
cin >> N >> M;
int sum = 0;
vector<int> a(M, 0);
for (int i = 0; i < M; i++) {
cin >> a[i];
sum = sum + a[i];
}
if (N - sum < 0) {
cout << -1 << endl;
return 9;
}
cout << N - sum << endl;
// cout<<N<<" "<<sum<... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
int M;
cin >> N >> M;
int sum = 0;
vector<int> a(M, 0);
for (int i = 0; i < M; i++) {
cin >> a[i];
sum = sum + a[i];
}
if (N - sum < 0) {
cout << -1 << endl;
return 0;
}
cout << N - sum << endl;
// cout<<N<<" "<<sum<... | replace | 14 | 15 | 14 | 15 | 0 | |
p02706 | C++ | Runtime Error | // Bismillahir Rahmanir Rahim
#include <bits/stdc++.h>
using namespace std;
int main() {
// freopen("a.txt","r",stdin);
int n, ar[1001], x = 0, i, j, m, sum;
cin >> n >> m;
for (i = 0; i < m; i++) {
cin >> ar[i];
x += ar[i];
}
sum = n - x;
if (sum >= 0)
cout << sum << endl;
else
cout <<... | // Bismillahir Rahmanir Rahim
#include <bits/stdc++.h>
using namespace std;
int main() {
// freopen("a.txt","r",stdin);
int n, ar[10001], x = 0, i, j, m, sum;
cin >> n >> m;
for (i = 0; i < m; i++) {
cin >> ar[i];
x += ar[i];
}
sum = n - x;
if (sum >= 0)
cout << sum << endl;
else
cout <... | replace | 6 | 7 | 6 | 7 | 0 | |
p02706 | C++ | Runtime Error | #include <algorithm>
#include <cstdlib>
#include <iostream>
#include <string>
#include <vector>
#define _USE_MATH_DEFINES
#include <math.h>
using namespace std;
int main() {
int N, M;
int A[1000];
cin >> N >> M;
for (int i = 0; i < M; i++) {
cin >> A[i];
}
int sum = 0;
for (int i = 0; i < M; i++) {
... | #include <algorithm>
#include <cstdlib>
#include <iostream>
#include <string>
#include <vector>
#define _USE_MATH_DEFINES
#include <math.h>
using namespace std;
int main() {
int N, M;
int A[10000];
cin >> N >> M;
for (int i = 0; i < M; i++) {
cin >> A[i];
}
int sum = 0;
for (int i = 0; i < M; i++) {... | replace | 11 | 12 | 11 | 12 | 0 | |
p02706 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
int i, n, m, sum = 0, a[100];
cin >> n >> m;
for (i = 0; i < m; i++) {
cin >> a[i];
sum += a[i];
}
if (sum > n)
cout << -1;
else
cout << n - sum;
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int i, n, m, sum = 0, a[100000];
cin >> n >> m;
for (i = 0; i < m; i++) {
cin >> a[i];
sum += a[i];
}
if (sum > n)
cout << -1;
else
cout << n - sum;
return 0;
}
| replace | 4 | 5 | 4 | 5 | 0 | |
p02706 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M, sum = 0;
cin >> N >> M;
vector<int> A(M);
for (int i = 0; i < N; i++) {
cin >> A.at(i);
sum += A.at(i);
}
if (sum > N) {
cout << -1 << endl;
} else {
cout << N - sum << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M, sum = 0;
cin >> N >> M;
vector<int> A(M);
for (int i = 0; i < M; i++) {
cin >> A.at(i);
sum += A.at(i);
}
if (sum > N) {
cout << -1 << endl;
} else {
cout << N - sum << endl;
}
} | replace | 7 | 8 | 7 | 8 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): vector::_M_range_check: __n (which is 2) >= this->size() (which is 2)
|
p02706 | C++ | Runtime Error | /*input
*/
// assic value of ('0'-'9') is(48 - 57) and (a-z) is (97-122) and (A-Z)
// is(65-90) and 32 for space #pragma GCC target ("avx2") #pragma GCC
// optimization ("O3") #pragma GCC optimization ("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define pb push_back
#define ... | /*input
*/
// assic value of ('0'-'9') is(48 - 57) and (a-z) is (97-122) and (A-Z)
// is(65-90) and 32 for space #pragma GCC target ("avx2") #pragma GCC
// optimization ("O3") #pragma GCC optimization ("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define pb push_back
#define ... | insert | 67 | 67 | 67 | 68 | 0 | |
p02706 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
// define #Asukaminato is cute
#define ll long long
#define rep(i, m) for (int i = 0; i < (int)(m); i++)
const int inf = 1000000000; // 10^9 Ten to the power of nine.
int main() {
int N, M;
cin >> N >> M;
int sum = 0;
int A[100];
for (int i = 0; i < M; i++) {
... | #include <bits/stdc++.h>
using namespace std;
// define #Asukaminato is cute
#define ll long long
#define rep(i, m) for (int i = 0; i < (int)(m); i++)
const int inf = 1000000000; // 10^9 Ten to the power of nine.
int main() {
int N, M;
cin >> N >> M;
int sum = 0;
int A[10000];
for (int i = 0; i < M; i++) {
... | replace | 11 | 12 | 11 | 12 | 0 | |
p02706 | C++ | Runtime Error | #include <cstdio>
#include <iostream>
using namespace std;
int n, m, a[1008], i = 0;
int tot = 0;
int main() {
cin >> n;
cin >> m;
for (i = 1; i <= m; i++) {
cin >> a[i];
}
for (i = 1; i <= m; i++) {
tot += a[i];
}
if (tot <= n) {
cout << n - tot;
} else {
cout << -1;
}
return 0;
}
| #include <cstdio>
#include <iostream>
using namespace std;
int n, m, a[10008], i = 0;
int tot = 0;
int main() {
cin >> n;
cin >> m;
for (i = 1; i <= m; i++) {
cin >> a[i];
}
for (i = 1; i <= m; i++) {
tot += a[i];
}
if (tot <= n) {
cout << n - tot;
} else {
cout << -1;
}
return 0;
}
| replace | 3 | 4 | 3 | 4 | 0 | |
p02706 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
int N;
int M;
int A;
int b;
cin >> N >> M;
while (M > 0) {
cin >> A;
b = b + A;
}
if (N - b >= 0)
cout << N - b;
else
cout << "-1";
} | #include <iostream>
using namespace std;
int main() {
int N;
int M;
int A;
int b;
cin >> N >> M;
while (M > 0) {
cin >> A;
b = b + A;
M--;
}
if (N - b >= 0)
cout << N - b;
else
cout << "-1";
} | insert | 13 | 13 | 13 | 14 | TLE | |
p02706 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double ld;
typedef unsigned long long int ull;
typedef pair<ll, ll> pll;
typedef pair<int, int> pii;
#define N 100010
#define M 200010
#define A 110
#define endl "\n"
#define mod 1000000007
int main() {
ios_base::sync_with_stdio... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double ld;
typedef unsigned long long int ull;
typedef pair<ll, ll> pll;
typedef pair<int, int> pii;
#define N 100010
#define M 200010
#define A 110
#define endl "\n"
#define mod 1000000007
int main() {
ios_base::sync_with_stdio... | replace | 23 | 24 | 23 | 24 | 0 | |
p02706 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, a[n];
cin >> n >> m;
for (int i = 0; i < m; i++)
cin >> a[i];
int s = 0;
for (int i = 0; i < m; i++)
s += a[i];
if (s > n) {
cout << "-1" << endl;
} else {
cout << n - s << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, a[10000];
cin >> n >> m;
for (int i = 0; i < m; i++)
cin >> a[i];
int s = 0;
for (int i = 0; i < m; i++)
s += a[i];
if (s > n) {
cout << "-1" << endl;
} else {
cout << n - s << endl;
}
}
| replace | 3 | 4 | 3 | 4 | 0 | |
p02706 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
void solving() {
int n, m;
cin >> n >> m;
int a[m];
int sum = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
sum += a[i];
}
n = n - sum;
if (n < 0)
cout << "-1";
else
cout << n << "\n";
}
int main() {
ios::sync_with_stdio(0);
cin.tie(0);... | #include <bits/stdc++.h>
using namespace std;
void solving() {
int n, m;
cin >> n >> m;
int a[m];
int sum = 0;
for (int i = 0; i < m; i++) {
cin >> a[i];
sum += a[i];
}
n = n - sum;
if (n < 0)
cout << "-1";
else
cout << n << "\n";
}
int main() {
ios::sync_with_stdio(0);
cin.tie(0);... | replace | 7 | 8 | 7 | 8 | 0 | |
p02706 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int A[10005];
int main() {
// freopen("input.txt", "r", stdin);
// freopen("output.txt", "w", stdout);
long long n, m;
cin >> n >> m;
long long total = 0;
for (int i = 0; i < n; ++i) {
cin >> A[i];
total += A[i];
}
total = n - total;
if (total... | #include <bits/stdc++.h>
using namespace std;
int A[10005];
int main() {
// freopen("input.txt", "r", stdin);
// freopen("output.txt", "w", stdout);
long long n, m;
cin >> n >> m;
long long total = 0;
for (int i = 0; i < m; ++i) {
cin >> A[i];
total += A[i];
}
total = n - total;
if (total... | replace | 14 | 15 | 14 | 15 | 0 | |
p02706 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <ciso646>
#include <cmath>
#include <complex>
#include <cstdio>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#incl... | #include <algorithm>
#include <bitset>
#include <ciso646>
#include <cmath>
#include <complex>
#include <cstdio>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#incl... | replace | 43 | 44 | 43 | 44 | 0 | |
p02706 | C++ | Runtime Error | #include <iostream>
using namespace std;
#define M_PI 3.14159265358979323846
int main() {
int N, M, sum = 0;
int A[100];
cin >> N >> M;
for (int i = 0; i < M; i++) {
cin >> A[i];
sum += A[i];
}
if ((N - sum) >= 0)
cout << N - sum;
else
cout << "-1";
return 0;
} | #include <iostream>
using namespace std;
#define M_PI 3.14159265358979323846
int main() {
int N, M, sum = 0;
int A[10000];
cin >> N >> M;
for (int i = 0; i < M; i++) {
cin >> A[i];
sum += A[i];
}
if ((N - sum) >= 0)
cout << N - sum;
else
cout << "-1";
return 0;
} | replace | 6 | 7 | 6 | 7 | 0 | |
p02706 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int a[1010];
int main() {
int n, m, sum = 0;
cin >> n >> m;
for (int i = 0; i < m; i++) {
cin >> a[i];
sum += a[i];
}
if (sum <= n)
printf("%d\n", n - sum);
else
printf("-1\n");
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int a[10010];
int main() {
int n, m, sum = 0;
cin >> n >> m;
for (int i = 0; i < m; i++) {
cin >> a[i];
sum += a[i];
}
if (sum <= n)
printf("%d\n", n - sum);
else
printf("-1\n");
return 0;
} | replace | 3 | 4 | 3 | 4 | 0 | |
p02706 | Python | Runtime Error | n, m = map(int, input().split)
a = list(map(int, input().split()))
ct = 0
for i in range(m):
ct += a[i]
if n - ct >= 0:
print(n - ct)
else:
print(-1)
| n, m = map(int, input().split())
a = list(map(int, input().split()))
ct = 0
for i in range(m):
ct += a[i]
if n - ct >= 0:
print(n - ct)
else:
print(-1)
| replace | 0 | 1 | 0 | 1 | TypeError: 'builtin_function_or_method' object is not iterable | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02706/Python/s941071070.py", line 1, in <module>
n, m = map(int, input().split)
TypeError: 'builtin_function_or_method' object is not iterable
|
p02706 | Python | Runtime Error | summer_vacation, amount_of_homework = map(int, input().split())
a = map(int, input().split())
homework_list = list[a]
total_days = 0
for i in homework_list:
total_days += i
if summer_vacation >= total_days:
print(summer_vacation - total_days)
else:
print(-1)
| summer_vacation, amount_of_homework = map(int, input().split())
a = map(int, input().split())
homework_list = list(a)
total_days = 0
for i in homework_list:
total_days += i
if summer_vacation >= total_days:
print(summer_vacation - total_days)
else:
print(-1)
| replace | 2 | 3 | 2 | 3 | TypeError: 'types.GenericAlias' object is not iterable | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02706/Python/s080879362.py", line 7, in <module>
for i in homework_list:
TypeError: 'types.GenericAlias' object is not iterable
|
p02706 | Python | Runtime Error | n, m = map(int, input().split())
print(max(n - sum(list(map(int, input().split())))), -1)
| n, m = map(int, input().split())
A = list(map(int, input().split()))
if n >= sum(A):
print(n - sum(A))
else:
print("-1")
| replace | 1 | 2 | 1 | 7 | TypeError: 'int' object is not iterable | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02706/Python/s791039988.py", line 2, in <module>
print(max(n - sum(list(map(int, input().split())))), -1)
TypeError: 'int' object is not iterable
|
p02706 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int M, N, l, i = 0, a[1000], j = 0;
cin >> M >> N;
while (cin >> l) {
a[i] = l;
i++;
}
while (j < N) {
M = M - a[j];
j++;
}
if (M >= 0) {
cout << M;
} else {
cout << -1;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int M, N, l, i = 0, a[10000], j = 0;
cin >> M >> N;
while (cin >> l) {
a[i] = l;
i++;
}
while (j < N) {
M = M - a[j];
j++;
}
if (M >= 0) {
cout << M;
} else {
cout << -1;
}
} | replace | 4 | 5 | 4 | 5 | 0 | |
p02706 | C++ | Runtime Error | #include <iostream>
using namespace std;
int a[1000];
int main() {
int n, m;
cin >> n >> m;
int ans = 0;
for (int i = 0; i < m; i++) {
cin >> a[i];
ans += a[i];
}
if (ans > n) {
cout << -1;
} else {
cout << n - ans;
}
return 0;
}
| #include <iostream>
using namespace std;
int a[100000];
int main() {
int n, m;
cin >> n >> m;
int ans = 0;
for (int i = 0; i < m; i++) {
cin >> a[i];
ans += a[i];
}
if (ans > n) {
cout << -1;
} else {
cout << n - ans;
}
return 0;
}
| replace | 2 | 3 | 2 | 3 | 0 | |
p02706 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define rep(i, a, b) for (int i = (a); i < (b); i++)
#define per(i, a, b) for (int i = (b)-1; i >= (a); i--)
#define pb push_back
#define mp make_pair
#define ... | #include <algorithm>
#include <cmath>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define rep(i, a, b) for (int i = (a); i < (b); i++)
#define per(i, a, b) for (int i = (b)-1; i >= (a); i--)
#define pb push_back
#define mp make_pair
#define ... | replace | 32 | 33 | 32 | 33 | 0 | |
p02706 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
int N, M;
int A = 0;
int day[1000];
cin >> N >> M;
for (int i = 0; i < M; i++) {
cin >> day[i];
A += day[i];
};
if ((N - A) >= 0) {
cout << N - A << endl;
} else {
cout << -1 << endl;
}
return 0;
} | #include <iostream>
using namespace std;
int main() {
int N, M;
int A = 0;
int day[10000];
cin >> N >> M;
for (int i = 0; i < M; i++) {
cin >> day[i];
A += day[i];
};
if ((N - A) >= 0) {
cout << N - A << endl;
} else {
cout << -1 << endl;
}
return 0;
} | replace | 5 | 6 | 5 | 6 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.