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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p03129 | C++ | Runtime Error | #include <bits/stdc++.h>
#define int long long
#define pii pair<int, int>
#define pb push_back
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); ... | #include <bits/stdc++.h>
#define int long long
#define pii pair<int, int>
#define pb push_back
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); ... | replace | 12 | 18 | 12 | 13 | TLE | |
p03129 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
int main() {
int cnt[5] = {0};
for (int i = 0; i < 3; i++) {
int a, b;
cin >> a >> b;
cnt[a]++, cnt[b]++;
}
bool ok = 1;
for (int i = 1; i <= 4; i++)
if (cnt[i] == 3)
ok = 0;
cout << ... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
int main() {
ll n, k;
cin >> n >> k;
cout << (k * 2 <= n + 1 ? "YES" : "NO") << endl;
return 0;
}
| replace | 7 | 18 | 7 | 10 | 0 | |
p03129 | C++ | Runtime Error | #include "bits/stdc++.h"
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i, n) for (int i = 1; i <= (int)(n); i++)
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
using namespace std;
using ll = long long;
using pi = pair<int, int>;
const ll INF = 1LL << 60;
int main() {
int ... | #include "bits/stdc++.h"
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i, n) for (int i = 1; i <= (int)(n); i++)
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
using namespace std;
using ll = long long;
using pi = pair<int, int>;
const ll INF = 1LL << 60;
int main() {
int ... | replace | 14 | 16 | 14 | 16 | 0 | |
p03129 | C++ | Runtime Error | /////////////////////////////////////////////////////////
//
// c/temp.cpp file
// Last Updated: 2018-10-23 ...Maybe
//
// I hope you adding this code to the setting file
// alias g++='g++ -std=c++1y -DDEBUG_LOCAL'
//
/////////////////////////////////////////////////////////
#include <bits/stdc++.h>
using nam... | /////////////////////////////////////////////////////////
//
// c/temp.cpp file
// Last Updated: 2018-10-23 ...Maybe
//
// I hope you adding this code to the setting file
// alias g++='g++ -std=c++1y -DDEBUG_LOCAL'
//
/////////////////////////////////////////////////////////
#include <bits/stdc++.h>
using nam... | insert | 169 | 169 | 169 | 175 | 0 | |
p03129 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define int long long
#define ends ' '
#define endl '\n'
#define pb push_back
#define x first
#define y second
int32_t main() {
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w"... | #include <bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define int long long
#define ends ' '
#define endl '\n'
#define pb push_back
#define x first
#define y second
int32_t main() {
#ifndef ONLINE_JUDGE
// freopen("input.txt", "r", stdin);
// freopen("output.txt... | replace | 12 | 14 | 12 | 14 | 0 | |
p03129 | C++ | Runtime Error | /** source code by coolreshab **/
#include <bits/stdc++.h>
using namespace std;
#define MAX 100000
#define MAX1 100000
#define inf 1000000000
#define mod 1000000007
#define ll long long
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
#ifndef ONLINE_JUDGE
freopen("in.txt", "r", stdin);
#endif
//... | /** source code by coolreshab **/
#include <bits/stdc++.h>
using namespace std;
#define MAX 100000
#define MAX1 100000
#define inf 1000000000
#define mod 1000000007
#define ll long long
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
// begin
int n, k, x;
cin >> n >> k;
if (n & 1) {
x ... | delete | 14 | 18 | 14 | 14 | 0 | |
p03129 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
#define inf 1000000000
#define infll 1000000000000000000ll
#define vi vector<int>
#define vll vector<ll>
#define pb push_back
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pdd pair<double, double>
#define mpr make_pair
#define fi first
#define se second
#defin... | #include <bits/stdc++.h>
#define ll long long
#define inf 1000000000
#define infll 1000000000000000000ll
#define vi vector<int>
#define vll vector<ll>
#define pb push_back
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pdd pair<double, double>
#define mpr make_pair
#define fi first
#define se second
#defin... | replace | 52 | 53 | 52 | 53 | -11 | |
p03130 | Python | Runtime Error | def solution(path1, path2, path3):
counts = [0, 0, 0, 0]
paths = [path1, path2, path3]
for path in paths:
counts[path[0] - 1] += 1
counts[path[1] - 1] += 1
countsOfCounts = [0, 0]
for count in counts:
if count == 1:
if countsOfCounts[0] == 2:
retu... | def solution(path1, path2, path3):
counts = [0, 0, 0, 0]
paths = [path1, path2, path3]
for path in paths:
counts[path[0] - 1] += 1
counts[path[1] - 1] += 1
countsOfCounts = [0, 0]
for count in counts:
if count == 1:
if countsOfCounts[0] == 2:
retu... | replace | 22 | 26 | 22 | 25 | ValueError: not enough values to unpack (expected 3, got 1) | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03130/Python/s731098655.py", line 23, in <module>
s1, s2, s3 = input().split('\n')
ValueError: not enough values to unpack (expected 3, got 1)
|
p03130 | C++ | Runtime Error | #include <iostream>
#include <vector>
int main() {
std::vector<std::pair<int, int>> list;
for (int i = 0; i < 3; ++i) {
int n, k;
std::cin >> n;
std::cin >> k;
list.emplace_back(n, k);
}
int a[4] = {0};
bool flg = false;
for (auto c : list) {
a[c.first]++;
a[c.second]++;
}
int... | #include <iostream>
#include <vector>
int main() {
std::vector<std::pair<int, int>> list;
for (int i = 0; i < 3; ++i) {
int n, k;
std::cin >> n;
std::cin >> k;
list.emplace_back(n, k);
}
int a[4] = {0};
bool flg = false;
for (auto c : list) {
a[c.first - 1]++;
a[c.second - 1]++;
... | replace | 16 | 18 | 16 | 18 | 0 | |
p03130 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; ++i)
int main() {
int i;
vector<int> v(5);
rep(i, 6) {
cin >> i;
v.at(i)++;
}
if (v.at(1) <= 2 && v.at(2) <= 2 && v.at(3) <= 2 && v.at(4) <= 2) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; ++i)
int main() {
int i;
vector<int> v(5);
rep(j, 6) {
cin >> i;
v.at(i)++;
}
if (v.at(1) <= 2 && v.at(2) <= 2 && v.at(3) <= 2 && v.at(4) <= 2) {
cout << "YES" << endl;
} else {
cout << "NO" << 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 5) >= this->size() (which is 5)
|
p03130 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int mat[4][4] = {0};
int check(int i, int j);
int main(void) {
int p, n;
for (int i = 0; i < 3; i++) {
cin >> p >> n;
mat[p - 1][n - 1] = 1;
mat[n - 1][p - 1] = 1;
}
/*
for(int i = 0; i < 4; i++){
for(int j = 0; j < 4; j++){
cout << mat... | #include <iostream>
using namespace std;
int mat[4][4] = {0};
int check(int i, int j);
int main(void) {
int p, n;
for (int i = 0; i < 3; i++) {
cin >> p >> n;
mat[p - 1][n - 1] = 1;
mat[n - 1][p - 1] = 1;
}
/*
for(int i = 0; i < 4; i++){
for(int j = 0; j < 4; j++){
cout << mat... | replace | 39 | 42 | 39 | 46 | TLE | |
p03131 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define FOR(i, a, b) for (int i = a; i <= b; i++)
#define FORD(i, a, b) for (int i = a; i >= b; i--)
#define FORL(i, x) for (int i = head[x]; i; i = nxt[i])
#define ALL(a) (a).begin(), (a).end()
#define SZ(a) int((a).size())
#define EACH(i, c) ... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define FOR(i, a, b) for (int i = a; i <= b; i++)
#define FORD(i, a, b) for (int i = a; i >= b; i--)
#define FORL(i, x) for (int i = head[x]; i; i = nxt[i])
#define ALL(a) (a).begin(), (a).end()
#define SZ(a) int((a).size())
#define EACH(i, c) ... | replace | 33 | 34 | 33 | 34 | 0 | |
p03131 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <vector>
using namespace std;
#define maxn 100000 + 5
typedef long long int ll;
const double INF = 1e20;
const double pi = acos(-1.0);
int vis[5];
int main() {
ll k, ... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <vector>
using namespace std;
#define maxn 100000 + 5
typedef long long int ll;
const double INF = 1e20;
const double pi = acos(-1.0);
int vis[5];
int main() {
ll k, ... | replace | 31 | 33 | 31 | 32 | TLE | |
p03131 | C++ | Runtime Error | #include <bits/stdc++.h>
#define pt(sth) cout << sth << "\n"
#define chmax(a, b) \
{ \
if (a < b) \
a = b; ... | #include <bits/stdc++.h>
#define pt(sth) cout << sth << "\n"
#define chmax(a, b) \
{ \
if (a < b) \
a = b; ... | replace | 24 | 25 | 24 | 26 | 0 | |
p03131 | C++ | Runtime Error | // submitted by Himj
#include <bits/stdc++.h>
#define ll long long
#define mod 1000000007
#define pb push_back
#define fi first
#define se second
#define fr(i, s, e) for (i = s; i < e; i++)
#define ms(arr, val) memset(arr, val, sizeof(arr))
using namespace std;
const int mxn = 2e5 + 1;
int main() {
ios_base::sync_w... | // submitted by Himj
#include <bits/stdc++.h>
#define ll long long
#define mod 1000000007
#define pb push_back
#define fi first
#define se second
#define fr(i, s, e) for (i = s; i < e; i++)
#define ms(arr, val) memset(arr, val, sizeof(arr))
using namespace std;
const int mxn = 2e5 + 1;
int main() {
ios_base::sync_w... | replace | 17 | 21 | 17 | 18 | 0 | |
p03132 | C++ | Runtime Error | // vvvvvvvvvvvv TEMPLATE vvvvvvvvvvvv
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
const ll linf = 1e18;
const double eps = 1e-12, pi = acos(-1);
#define FOR(i, a, b) for (ll i = (a), __last_##i = (b); i < __last_##i; i++)
#define RFOR(i, a, b) for (ll i = (b)-1, __last_##... | // vvvvvvvvvvvv TEMPLATE vvvvvvvvvvvv
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
const ll linf = 1e18;
const double eps = 1e-12, pi = acos(-1);
#define FOR(i, a, b) for (ll i = (a), __last_##i = (b); i < __last_##i; i++)
#define RFOR(i, a, b) for (ll i = (b)-1, __last_##... | replace | 90 | 91 | 90 | 93 | -6 | free(): invalid pointer
|
p03132 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define lint long long
#define P pair<int, int>
#define LLP pair<long long, long long>
#define REP(i, x, n) for (int i = (x), i##_len = (int)(n); i < i##_len; ++i)
#define rep(i, n) for (int i = 0, i##_len = (int)(n); i < i##_len; ++i)
#define repr(i, n) for (int i = (int)... | #include <bits/stdc++.h>
using namespace std;
#define lint long long
#define P pair<int, int>
#define LLP pair<long long, long long>
#define REP(i, x, n) for (int i = (x), i##_len = (int)(n); i < i##_len; ++i)
#define rep(i, n) for (int i = 0, i##_len = (int)(n); i < i##_len; ++i)
#define repr(i, n) for (int i = (int)... | replace | 52 | 53 | 52 | 53 | 0 | |
p03132 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
template <typename T> void read(T &t) {
t = 0;
char ch = getchar();
int f = 1;
while ('0' > ch || ch > '9') {
if (ch == '-')
f = -1;
ch = getchar();
}
do {
(t *= 10) += ch - '0';
ch = getchar();
} while ('0' <= ch && ch <= '9');
t *= f;... | #include <bits/stdc++.h>
using namespace std;
template <typename T> void read(T &t) {
t = 0;
char ch = getchar();
int f = 1;
while ('0' > ch || ch > '9') {
if (ch == '-')
f = -1;
ch = getchar();
}
do {
(t *= 10) += ch - '0';
ch = getchar();
} while ('0' <= ch && ch <= '9');
t *= f;... | replace | 19 | 20 | 19 | 20 | 0 | |
p03132 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using uint = unsigned int;
using P = pair<int, int>;
using node = pair<string, ll>;
const ll inf = numeric_limits<ll>::max() / 3;
const ll mod = 1e9 + 7;
ll a[100100];
ll acc[100100];
ll to_left[100100];
ll to_right[100100];
ll dp[100100];
int main(v... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using uint = unsigned int;
using P = pair<int, int>;
using node = pair<string, ll>;
const ll inf = numeric_limits<ll>::max() / 3;
const ll mod = 1e9 + 7;
ll a[200200];
ll acc[200200];
ll to_left[200200];
ll to_right[200200];
ll dp[200200];
int main(v... | replace | 9 | 14 | 9 | 14 | 0 | |
p03132 | C++ | Runtime Error | #include <bits/stdc++.h>
#define INF 1e9
#define llINF 1e18
#define MOD 1000000007
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define ll long long
#define vi vector<ll>
#define vvi vector<vi>
#define BITLE(n) (1LL << (n))
#define BITCNT(n) (__builtin_popcountll(n))
#define SUBS(s, f, t) ... | #include <bits/stdc++.h>
#define INF 1e9
#define llINF 1e18
#define MOD 1000000007
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define ll long long
#define vi vector<ll>
#define vvi vector<vi>
#define BITLE(n) (1LL << (n))
#define BITCNT(n) (__builtin_popcountll(n))
#define SUBS(s, f, t) ... | replace | 67 | 68 | 67 | 68 | 0 | |
p03132 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
inline int toInt(string s) {
int v;
istringstream sin(s);
sin >> v;
return v;
}
template <class T> inline string toString(T x) {
ostringstream sout;
sout << x;
return sout.str();
}
typedef long long ll;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef... | #include <bits/stdc++.h>
using namespace std;
inline int toInt(string s) {
int v;
istringstream sin(s);
sin >> v;
return v;
}
template <class T> inline string toString(T x) {
ostringstream sout;
sout << x;
return sout.str();
}
typedef long long ll;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef... | replace | 100 | 102 | 100 | 101 | 0 | |
p03132 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
using namespace std;
#define ll long long
#define N 200010
char getc() {
char c = getchar();
while ((c < 'A' || c > 'Z') && (c < 'a' || c > 'z') && (c < '0' || c > '9'))
c = getchar();
return c;
}... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
using namespace std;
#define ll long long
#define N 200010
char getc() {
char c = getchar();
while ((c < 'A' || c > 'Z') && (c < 'a' || c > 'z') && (c < '0' || c > '9'))
c = getchar();
return c;
}... | delete | 32 | 34 | 32 | 32 | TLE | |
p03132 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, l, r) for (register int i = l; i <= r; i++)
#define repd(i, r, l) for (register int i = r; i >= l; i--)
#define rvc(i, S) for (register int i = 0; i < (int)S.size(); i++)
#define rvcd(i, S) for (register int i = ((int)S.size()) - 1; i >= 0; i--)
#define fore... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, l, r) for (register int i = l; i <= r; i++)
#define repd(i, r, l) for (register int i = r; i >= l; i--)
#define rvc(i, S) for (register int i = 0; i < (int)S.size(); i++)
#define rvcd(i, S) for (register int i = ((int)S.size()) - 1; i >= 0; i--)
#define fore... | replace | 25 | 26 | 25 | 26 | 0 | |
p03132 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cassert>
#include <cfloat>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
... | #include <algorithm>
#include <cassert>
#include <cfloat>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
... | replace | 92 | 93 | 92 | 93 | TLE | |
p03132 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define vvi vector<vector<int>>
#define vec vector
#define pq priority_queue
#define all(v) (v).begin(), (v).end()
#define uniqueV(x) \
sort(x.begin(), x.end()); ... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define vvi vector<vector<int>>
#define vec vector
#define pq priority_queue
#define all(v) (v).begin(), (v).end()
#define uniqueV(x) \
sort(x.begin(), x.end()); ... | replace | 88 | 90 | 88 | 90 | 0 | |
p03132 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int inf = 1e15 + 10, N = 1e5 + 10;
int a[N], n;
long long dp[N][6], ans = inf;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
cin >> n;
for (int i = 0; i < n; i++)
cin >> a[i];
for (int i = 0; i < n; i++)
for (int j = 0; j <... | #include <bits/stdc++.h>
using namespace std;
const int inf = 1e15 + 10, N = 3e5 + 10;
int a[N], n;
long long dp[N][6], ans = inf;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
cin >> n;
for (int i = 0; i < n; i++)
cin >> a[i];
for (int i = 0; i < n; i++)
for (int j = 0; j <... | replace | 3 | 4 | 3 | 4 | 0 | |
p03132 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cstdio>
#include <cstring>
#define ll long long
using namespace std;
ll a[200010];
ll sum[200010];
ll dp[200010][2][3];
ll n;
ll func(ll here, ll ch, ll ch1) {
if (ch1 >= 3)
return sum[here];
if (here == n + 1)
return 0;
ll &ret = dp[here][ch][ch1];
ret = 9999999999999999;... | #include <algorithm>
#include <cstdio>
#include <cstring>
#define ll long long
using namespace std;
ll a[200010];
ll sum[200010];
ll dp[200010][2][3];
ll n;
ll func(ll here, ll ch, ll ch1) {
if (ch1 >= 3)
return sum[here];
if (here == n + 1)
return 0;
ll &ret = dp[here][ch][ch1];
if (ret != -1)
retu... | insert | 15 | 15 | 15 | 17 | TLE | |
p03132 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
typedef long long ll;
typedef unsigned int uint;
using namespace std;
int L;
ll A[100005], dp[100005][5];
int main() {
c... | #include <algorithm>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
typedef long long ll;
typedef unsigned int uint;
using namespace std;
int L;
ll A[200005], dp[200005][5];
int main() {
c... | replace | 16 | 17 | 16 | 17 | 0 | |
p03132 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define INF_LL (int64)1e18
#define INF (int32)1e9
#define REP(i, n) for (int64 i = 0; i < (n); i++)
#define FOR(i, a, b) for (int64 i = (a); i < (b); i++)
#define all(x) x.begin(), x.end()
#define fs first
#define sc second
using int32 = int_fast32_t;
using uint32 = uint_... | #include <bits/stdc++.h>
using namespace std;
#define INF_LL (int64)1e18
#define INF (int32)1e9
#define REP(i, n) for (int64 i = 0; i < (n); i++)
#define FOR(i, a, b) for (int64 i = (a); i < (b); i++)
#define all(x) x.begin(), x.end()
#define fs first
#define sc second
using int32 = int_fast32_t;
using uint32 = uint_... | replace | 167 | 168 | 167 | 169 | -6 | free(): invalid pointer
|
p03132 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ALL(c) (c).begin(), (c).end()
#define EACH(i, c) for (auto i = (c).begin(); i != (c).end(); ++i)
using namespace std;
#define int long long
vector<int> calc1(int L, vector<int> &A) {
vector<int> dp(L + 1);
int sum = 0;
for (int i = 1; i <= L; ++i) {
sum += A[i];
if (A[i] ... | #include <bits/stdc++.h>
#define ALL(c) (c).begin(), (c).end()
#define EACH(i, c) for (auto i = (c).begin(); i != (c).end(); ++i)
using namespace std;
#define int long long
vector<int> calc1(int L, vector<int> &A) {
vector<int> dp(L + 1);
int sum = 0;
for (int i = 1; i <= L; ++i) {
sum += A[i];
if (A[i] ... | replace | 23 | 24 | 23 | 24 | -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)
|
p03132 | C++ | Runtime Error |
#include <bits/stdc++.h>
#define null ""
#define endl '\n'
#define all(dat) dat.begin(), dat.end()
#define loop(i, to) for (int i = 0; i < to; ++i)
#define cont(i, to) for (int i = 1; i <= to; ++i)
#define circ(i, fr, to) for (int i = fr; i <= to; ++i)
#define foreach(i, dat) ... |
#include <bits/stdc++.h>
#define null ""
#define endl '\n'
#define all(dat) dat.begin(), dat.end()
#define loop(i, to) for (int i = 0; i < to; ++i)
#define cont(i, to) for (int i = 1; i <= to; ++i)
#define circ(i, fr, to) for (int i = fr; i <= to; ++i)
#define foreach(i, dat) ... | replace | 19 | 20 | 19 | 20 | 0 | |
p03132 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#define llong long long
using namespace std;
const int N = 1e5;
llong a[N + 3];
int b[N + 3];
llong dp[N + 3][5];
int n;
int eval(int x, int y, int id) {
if (x == 0 || x == 4) {
return a[id];
} else if (x == 1 || x == 3) {
return... | #include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#define llong long long
using namespace std;
const int N = 2e5;
llong a[N + 3];
int b[N + 3];
llong dp[N + 3][5];
int n;
int eval(int x, int y, int id) {
if (x == 0 || x == 4) {
return a[id];
} else if (x == 1 || x == 3) {
return... | replace | 7 | 8 | 7 | 8 | 0 | |
p03133 | C++ | Runtime Error | #include <cstdio>
#include <cstdlib>
#include <iostream>
using namespace std;
const int mod = 998244353;
int n, m, a[310][310];
int od[310], ev[310], bit[310], xxj[310];
int main() {
cin >> n >> m;
for (int i = 1; i <= n; i++)
for (int j = 1; j <= m; j++)
cin >> a[i][j], a[i][j] &= 1;
/* if(n<m)
... | #include <cstdio>
#include <cstdlib>
#include <iostream>
using namespace std;
const int mod = 998244353;
int n, m, a[310][310];
int od[310], ev[310], bit[310], xxj[310];
int main() {
cin >> n >> m;
for (int i = 1; i <= n; i++)
for (int j = 1; j <= m; j++)
cin >> a[i][j], a[i][j] &= 1;
/* if(n<m)
... | replace | 51 | 52 | 51 | 52 | 0 | |
p03133 | C++ | Runtime Error | #include <cstdio>
#include <cstdlib>
#include <iostream>
using namespace std;
const int mod = 998244353;
const int N = 700;
int n, m, a[N][N];
int od[N], ev[N], bit[N], xxj[N];
int main() {
cin >> n >> m;
for (int i = 1; i <= n; i++)
for (int j = 1; j <= m; j++)
cin >> a[i][j], a[i][j] &= 1;
if (n < m) ... | #include <cstdio>
#include <cstdlib>
#include <iostream>
using namespace std;
const int mod = 998244353;
const int N = 700;
int n, m, a[N][N];
int od[N], ev[N], bit[N], xxj[N];
int main() {
cin >> n >> m;
for (int i = 1; i <= n; i++)
for (int j = 1; j <= m; j++)
cin >> a[i][j], a[i][j] &= 1;
if (n < m) ... | replace | 36 | 38 | 36 | 41 | 0 | |
p03133 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll const mod = 998244353;
#define p_ary(ary, a, b, i) \
do { \
cout << "["; ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll const mod = 998244353;
#define p_ary(ary, a, b, i) \
do { \
cout << "["; ... | insert | 26 | 26 | 26 | 28 | 0 | |
p03133 | C++ | Runtime Error | #include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <random>
#incl... | #include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <random>
#incl... | replace | 86 | 87 | 86 | 87 | 0 | |
p03133 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
using namespace std;
const int MOD = 998244353;
bool p[302][302];
int _pow(int x) {
int v = 1, w = 2;
while (x > 0) {
if (x & 1)
v = 1LL * v * w % MOD;
w = 1LL * w * w % MOD;
x >>= 1;
}
return v;
}
int main() {
int N, M;
scanf("%d%d", &N, &M);
... | #include <algorithm>
#include <cstdio>
using namespace std;
const int MOD = 998244353;
bool p[302][302];
int _pow(int x) {
int v = 1, w = 2;
while (x > 0) {
if (x & 1)
v = 1LL * v * w % MOD;
w = 1LL * w * w % MOD;
x >>= 1;
}
return v;
}
int main() {
int N, M;
scanf("%d%d", &N, &M);
... | replace | 57 | 58 | 57 | 58 | 0 | |
p03133 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <climits>
#include <complex>
#include <deque>
#include <iomanip>
#include <iostream>
#include <istream>
#include <iterator>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
typedef l... | #include <algorithm>
#include <bitset>
#include <climits>
#include <complex>
#include <deque>
#include <iomanip>
#include <iostream>
#include <istream>
#include <iterator>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
typedef l... | replace | 136 | 137 | 136 | 137 | 0 | |
p03133 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#incl... | #include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#incl... | replace | 66 | 67 | 66 | 67 | 0 | |
p03133 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using lint = long long;
const lint inf = 1LL << 60;
const lint mod = 998244353;
template <int mod> struct modint {
lint v;
modint() : v(0) {}
modint(signed v) : v(v) {}
modint(lint t) {
v = t % mod;
if (v < 0)
v += mod;
}
modint pow(lint k) {
... | #include <bits/stdc++.h>
using namespace std;
using lint = long long;
const lint inf = 1LL << 60;
const lint mod = 998244353;
template <int mod> struct modint {
lint v;
modint() : v(0) {}
modint(signed v) : v(v) {}
modint(lint t) {
v = t % mod;
if (v < 0)
v += mod;
}
modint pow(lint k) {
... | replace | 88 | 89 | 88 | 89 | 0 | |
p03133 | C++ | Runtime Error | #include <bits/stdc++.h>
#define MOD 998244353
using namespace std;
int pow(int x, int pow) {
int res = 1, t = x;
while (pow) {
if (pow & 1) {
res = 1LL * res * t % MOD;
}
t = 1LL * t * t % MOD;
pow >>= 1;
}
return res;
}
int main() {
int n, m;
cin >> n >> m;
int **mat = new int ... | #include <bits/stdc++.h>
#define MOD 998244353
using namespace std;
int pow(int x, int pow) {
int res = 1, t = x;
while (pow) {
if (pow & 1) {
res = 1LL * res * t % MOD;
}
t = 1LL * t * t % MOD;
pow >>= 1;
}
return res;
}
int main() {
int n, m;
cin >> n >> m;
int **mat = new int ... | replace | 29 | 30 | 29 | 30 | 0 | |
p03134 | C++ | Runtime Error | #define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <float.h>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <tim... | #define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <float.h>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <tim... | replace | 162 | 163 | 162 | 163 | -11 | |
p03134 | C++ | Runtime Error | #include <cstring>
#include <iostream>
const int MOD = 998244353;
const int ms = 2020;
int memo[ms][ms + ms];
std::string str;
int dp(int round, int red, int blue) {
if (round < (int)str.size()) {
if (str[round] == '0')
red += 2;
else if (str[round] == '1') {
red++;
blue++;
} else
... | #include <cstring>
#include <iostream>
const int MOD = 998244353;
const int ms = 2020;
int memo[ms + ms][ms + ms];
std::string str;
int dp(int round, int red, int blue) {
if (round < (int)str.size()) {
if (str[round] == '0')
red += 2;
else if (str[round] == '1') {
red++;
blue++;
} el... | replace | 7 | 8 | 7 | 8 | 0 | |
p03134 | C++ | Runtime Error | #include <bits/stdc++.h>
#define cmin(a, b) (a > (b) ? a = (b), 1 : 0)
#define cmax(a, b) (a < (b) ? a = (b), 1 : 0)
#define dmin(a, b) ((a) < (b) ? (a) : (b))
#define dmax(a, b) ((a) > (b) ? (a) : (b))
namespace io {
int F() {
int F = 1, n = 0;
char ch;
while ((ch = getchar()) != '-' && (ch < '0' || ch > '9'))
... | #include <bits/stdc++.h>
#define cmin(a, b) (a > (b) ? a = (b), 1 : 0)
#define cmax(a, b) (a < (b) ? a = (b), 1 : 0)
#define dmin(a, b) ((a) < (b) ? (a) : (b))
#define dmax(a, b) ((a) > (b) ? (a) : (b))
namespace io {
int F() {
int F = 1, n = 0;
char ch;
while ((ch = getchar()) != '-' && (ch < '0' || ch > '9'))
... | replace | 30 | 31 | 30 | 31 | 0 | |
p03134 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int readint() {
int x = 0, f = 1;
char ch = getchar();
while (ch < '0' || ch > '9') {
if (ch == '-')
f = -1;
ch = getchar();
}
while (ch >= '0' && ch <= '9') {
x = x * 10 + ch - '0';
ch = getchar();
}
return x * f... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int readint() {
int x = 0, f = 1;
char ch = getchar();
while (ch < '0' || ch > '9') {
if (ch == '-')
f = -1;
ch = getchar();
}
while (ch >= '0' && ch <= '9') {
x = x * 10 + ch - '0';
ch = getchar();
}
return x * f... | replace | 24 | 25 | 24 | 25 | 0 | |
p03134 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = int64_t;
const ll MOD = 998244353;
ll dp[2010][2010];
ll cntr[4010];
ll cntb[4010];
int main() {
string S;
cin >> S;
dp[0][0] = 1;
for (ll i = 0; i < S.size(); i++) {
char c = S[i];
cntr[i + 1] = cntr[i] + 2 * (c == '0') + (c == '1');
cntb[i ... | #include <bits/stdc++.h>
using namespace std;
using ll = int64_t;
const ll MOD = 998244353;
ll dp[4010][4010];
ll cntr[4010];
ll cntb[4010];
int main() {
string S;
cin >> S;
dp[0][0] = 1;
for (ll i = 0; i < S.size(); i++) {
char c = S[i];
cntr[i + 1] = cntr[i] + 2 * (c == '0') + (c == '1');
cntb[i ... | replace | 4 | 5 | 4 | 5 | 0 | |
p03134 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctype.h>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>
#include <unordered_map>
#include <vector>
using... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctype.h>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>
#include <unordered_map>
#include <vector>
using... | replace | 57 | 58 | 57 | 58 | 0 | |
p03134 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
using namespace std;
const int MAXN = 2010;
const int mod = 998244353;
int sum1, sum2;
char s[MAXN];
int f[MAXN][2], dp[MAXN][MAXN];
int main() {
scanf("%s", s + 1);
int n = strlen(s + 1);
for (int i = 1; i <= n; i++)
sum1 += (s[i] - '0');
sum2 = 2 * n - sum1;
... | #include <bits/stdc++.h>
#define ll long long
using namespace std;
const int MAXN = 4010;
const int mod = 998244353;
int sum1, sum2;
char s[MAXN];
int f[MAXN][2], dp[MAXN][MAXN];
int main() {
scanf("%s", s + 1);
int n = strlen(s + 1);
for (int i = 1; i <= n; i++)
sum1 += (s[i] - '0');
sum2 = 2 * n - sum1;
... | replace | 3 | 4 | 3 | 4 | 0 | |
p03134 | C++ | Runtime Error | #include <bits/stdc++.h>
#define il inline
#define pb push_back
#define mp make_pair
#define fir first
#define sec second
#define mid ((l + r) >> 1)
#define MAXN 2005
#define MAXM
#define mod 998244353
#define inf (1 << 30)
#define eps (1e-6)
#define alpha 0.75
#define rep(i, x, y) for (register int i = x; i <= (y); ++... | #include <bits/stdc++.h>
#define il inline
#define pb push_back
#define mp make_pair
#define fir first
#define sec second
#define mid ((l + r) >> 1)
#define MAXN 4005
#define MAXM
#define mod 998244353
#define inf (1 << 30)
#define eps (1e-6)
#define alpha 0.75
#define rep(i, x, y) for (register int i = x; i <= (y); ++... | replace | 7 | 8 | 7 | 8 | 0 | |
p03134 | C++ | Runtime Error | #include <bits/stdc++.h>
#define fec(i, x, y) (int i = head[x], y = g[i].to; i; i = g[i].ne, y = g[i].to)
#define dbg(...) fprintf(stderr, __VA_ARGS__)
#define File(x) freopen(#x ".in", "r", stdin), freopen(#x ".out", "w", stdout)
#define fi first
#define se second
#define pb push_back
template <typename A, typename ... | #include <bits/stdc++.h>
#define fec(i, x, y) (int i = head[x], y = g[i].to; i; i = g[i].ne, y = g[i].to)
#define dbg(...) fprintf(stderr, __VA_ARGS__)
#define File(x) freopen(#x ".in", "r", stdin), freopen(#x ".out", "w", stdout)
#define fi first
#define se second
#define pb push_back
template <typename A, typename ... | replace | 30 | 31 | 30 | 31 | 0 | |
p03134 | C++ | Runtime Error | #include <bits/stdc++.h>
#define int long long
using namespace std;
int dp[2005][2005];
int tot[2005][2];
const int mod = 998244353;
signed main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(0);
#ifndef ONLINE_JUDGE
if (fopen("INPUT.txt", "r")) {
freopen("INPUT.txt", "r", stdin);
fre... | #include <bits/stdc++.h>
#define int long long
using namespace std;
int dp[4005][4005];
int tot[2005][2];
const int mod = 998244353;
signed main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(0);
#ifndef ONLINE_JUDGE
if (fopen("INPUT.txt", "r")) {
freopen("INPUT.txt", "r", stdin);
fre... | replace | 4 | 5 | 4 | 5 | 0 | |
p03134 | C++ | Runtime Error | /**********************************************************************/
/******** ********/
/******** Writer:孙~~ ********/
/******** Lang:C++ ********/
/******** ... | /**********************************************************************/
/******** ********/
/******** Writer:孙~~ ********/
/******** Lang:C++ ********/
/******** ... | replace | 28 | 30 | 28 | 30 | 0 | |
p03134 | C++ | Runtime Error | #define _USE_MATH_DEFINES
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#in... | #define _USE_MATH_DEFINES
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#in... | replace | 40 | 41 | 40 | 41 | 0 | |
p03134 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
#define MAXN 2000
#define MOD 998244353
char s[MAXN + 5];
int n, num1[MAXN + 5], num2[MAXN + 5];
int dp[MAXN + 5][MAXN + 5];
int main() {
scanf("%s", s + 1);
n = strlen(s + 1);
for (int i = 1; i <= n; i++) {
num... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
#define MAXN 4000
#define MOD 998244353
char s[MAXN + 5];
int n, num1[MAXN + 5], num2[MAXN + 5];
int dp[MAXN + 5][MAXN + 5];
int main() {
scanf("%s", s + 1);
n = strlen(s + 1);
for (int i = 1; i <= n; i++) {
num... | replace | 5 | 6 | 5 | 6 | 0 | |
p03134 | C++ | Runtime Error | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <complex>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#defin... | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <complex>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#defin... | replace | 26 | 27 | 26 | 27 | 0 | |
p03134 | C++ | Runtime Error | #include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <random>
#incl... | #include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <random>
#incl... | replace | 28 | 29 | 28 | 29 | 0 | |
p03134 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
#define INF 1000000005
#define MOD 998244353
#define EPS 1e-10
#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 srep(i, s, t) for (int i = (int)(s); i < (int)(t); ++i)
#define each(a, b) for (auto &(a) : (... | #include <bits/stdc++.h>
#define ll long long
#define INF 1000000005
#define MOD 998244353
#define EPS 1e-10
#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 srep(i, s, t) for (int i = (int)(s); i < (int)(t); ++i)
#define each(a, b) for (auto &(a) : (... | replace | 54 | 55 | 54 | 55 | 0 | |
p03134 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <stdio.h>
#include <vector>
using ll = long long int;
const int INF = (1 << 30);
const ll INFLL = (1ll << 60);
const ll MOD = 998244353ll;
#define l_ength size
void mul_mod(ll &a, ll b) {
a *= b;
a %= MOD;
}
void add_mod(ll &a, ll... | #include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <stdio.h>
#include <vector>
using ll = long long int;
const int INF = (1 << 30);
const ll INFLL = (1ll << 60);
const ll MOD = 998244353ll;
#define l_ength size
void mul_mod(ll &a, ll b) {
a *= b;
a %= MOD;
}
void add_mod(ll &a, ll... | replace | 26 | 28 | 26 | 28 | 0 | |
p03134 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long intl;
int MOD = 998244353;
using namespace std;
int main() {
vector<vector<int>> dp(2001, vector<int>(2001, 0));
vector<vector<int>> visited(2001, vector<int>(2001, 0));
string s;
cin >> s;
int n = s.size();
vector<pair<int, int>> v;
v.push_b... | #include <bits/stdc++.h>
using namespace std;
typedef long long intl;
int MOD = 998244353;
using namespace std;
int main() {
vector<vector<int>> dp(4001, vector<int>(4001, 0));
vector<vector<int>> visited(4001, vector<int>(4001, 0));
string s;
cin >> s;
int n = s.size();
vector<pair<int, int>> v;
v.push_b... | replace | 6 | 8 | 6 | 8 | 0 | |
p03134 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <complex>
#include <cstdint>
#include <deque>
#include <iomanip>
#include <iostream>
#include <istream>
#include <iterator>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
typedef lo... | #include <algorithm>
#include <bitset>
#include <complex>
#include <cstdint>
#include <deque>
#include <iomanip>
#include <iostream>
#include <istream>
#include <iterator>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
typedef lo... | replace | 214 | 215 | 214 | 215 | -6 | terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
|
p03134 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#define rep(i, l, r) for (int i = (l); i <= (r); i++)
typedef long long ll;
using namespace std;
const int N = 2010, mod = 998244353;
char s[N];
int n, ans, a[N], b[N], f[N][N];
void inc(int &x, int y) {
x += y;
x -= (x >= mod) ? mod : 0... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#define rep(i, l, r) for (int i = (l); i <= (r); i++)
typedef long long ll;
using namespace std;
const int N = 4010, mod = 998244353;
char s[N];
int n, ans, a[N], b[N], f[N][N];
void inc(int &x, int y) {
x += y;
x -= (x >= mod) ? mod : 0... | replace | 8 | 9 | 8 | 9 | 0 | |
p03134 | C++ | Runtime Error | #include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
const int mo = 998244353;
int f[2001][2001], s1[2001], s2[2001];
char s[2001];
int main() {
scanf("%s", s);
int n = strlen(s);
for (int i = 0; i < n; i++) {
s1[i + 1] = s1[i] + s[i] - '0';
s2[i + 1] = 2 * (i + 1) - s1[i + 1]... | #include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
const int mo = 998244353;
int f[4001][4001], s1[2001], s2[2001];
char s[2001];
int main() {
scanf("%s", s);
int n = strlen(s);
for (int i = 0; i < n; i++) {
s1[i + 1] = s1[i] + s[i] - '0';
s2[i + 1] = 2 * (i + 1) - s1[i + 1]... | replace | 8 | 9 | 8 | 9 | 0 | |
p03134 | C++ | Runtime Error | #include <algorithm>
#include <stdio.h>
#include <string.h>
using namespace std;
const int maxn = 2100;
const int mod = 998244353;
char z[maxn];
int n;
int prer[maxn];
int dp[maxn * 2][maxn * 2];
void work() {
int i, j;
scanf("%s", z + 1);
n = strlen(z + 1);
for (i = 1; i <= n; i++)
prer[i] = prer[i - 1] ... | #include <algorithm>
#include <stdio.h>
#include <string.h>
using namespace std;
const int maxn = 2100;
const int mod = 998244353;
char z[maxn];
int n;
int prer[maxn * 2];
int dp[maxn * 2][maxn * 2];
void work() {
int i, j;
scanf("%s", z + 1);
n = strlen(z + 1);
for (i = 1; i <= n; i++)
prer[i] = prer[i -... | replace | 10 | 11 | 10 | 11 | 0 | |
p03134 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using i64 = int64_t;
#define rep(i, x, y) \
for (i64 i = i64(x), i##_max_for_repmacro = i64(y); \
i < i##_max_for_repmacro; ++i)
#define debug(x) #x << "=" << (x)
#ifdef DEBUG
#de... | #include <bits/stdc++.h>
using namespace std;
using i64 = int64_t;
#define rep(i, x, y) \
for (i64 i = i64(x), i##_max_for_repmacro = i64(y); \
i < i##_max_for_repmacro; ++i)
#define debug(x) #x << "=" << (x)
#ifdef DEBUG
#de... | replace | 272 | 274 | 272 | 274 | -11 | |
p03134 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <stdio.h>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
typedef long long LL;
typedef vector<int> VI;
#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define EACH(i, c) ... | #include <algorithm>
#include <iostream>
#include <stdio.h>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
typedef long long LL;
typedef vector<int> VI;
#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define EACH(i, c) ... | replace | 131 | 132 | 131 | 132 | 0 | |
p03134 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <chrono>
#include <complex>
#include <cstdio>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define REP(i, x, y) for (ll i = x; i <= y; i++)
#def... | #include <algorithm>
#include <bitset>
#include <chrono>
#include <complex>
#include <cstdio>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define REP(i, x, y) for (ll i = x; i <= y; i++)
#def... | replace | 68 | 69 | 68 | 69 | 0 | |
p03134 | C++ | Runtime Error | // #pragma GCC optimize ("-O3","unroll-loops")
#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < n; ++i)
#define REPR(i, n) for (int i = n - 1; i >= 0; --i)
#define FOR(i, m, n) for (int i = m; i < n; ++i)
#define FORR(i, m, n) for (int i = m - 1; i >= n; --i)
#define SORT(v, n) sort... | // #pragma GCC optimize ("-O3","unroll-loops")
#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < n; ++i)
#define REPR(i, n) for (int i = n - 1; i >= 0; --i)
#define FOR(i, m, n) for (int i = m; i < n; ++i)
#define FORR(i, m, n) for (int i = m - 1; i >= n; --i)
#define SORT(v, n) sort... | replace | 109 | 110 | 109 | 110 | 0 | |
p03134 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll dp[2010][2010], n;
ll nthblueat[2010], nthredat[2010], numblue, numred;
char inp[2010];
int main() {
scanf(" %s", inp);
n = strlen(inp);
for (int i = 0; i < n; i++) {
if (inp[i] == '0') {
nthredat[numred++] = i;
nthredat[numred... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll dp[4010][4010], n;
ll nthblueat[4010], nthredat[4010], numblue, numred;
char inp[4010];
int main() {
scanf(" %s", inp);
n = strlen(inp);
for (int i = 0; i < n; i++) {
if (inp[i] == '0') {
nthredat[numred++] = i;
nthredat[numred... | replace | 3 | 6 | 3 | 6 | 0 | |
p03134 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<double, double> pdd;
// const ull mod = 1e9 + 7;
const ll mod = 998244353;
#define REP(i, n) for (int i = 0; i < (int)n; ++i)
// debug
#define dump(x) ... | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<double, double> pdd;
// const ull mod = 1e9 + 7;
const ll mod = 998244353;
#define REP(i, n) for (int i = 0; i < (int)n; ++i)
// debug
#define dump(x) ... | replace | 63 | 64 | 63 | 64 | 0 | |
p03134 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <... | replace | 61 | 62 | 61 | 62 | 0 | |
p03134 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <utility>
#include <vector>
typedef long long LL;
typede... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <utility>
#include <vector>
typedef long long LL;
typede... | replace | 99 | 100 | 99 | 100 | 0 | |
p03134 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#define ll long long
using namespace std;
template <class T> inline void read(T &x) {
x = 0;
char c = getchar();
int f = 1;
while (!isdigit(c)) {
if (c == '-')
f = -1;
c = getchar();
}
while (isdigit(c))
x = x * ... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#define ll long long
using namespace std;
template <class T> inline void read(T &x) {
x = 0;
char c = getchar();
int f = 1;
while (!isdigit(c)) {
if (c == '-')
f = -1;
c = getchar();
}
while (isdigit(c))
x = x * ... | replace | 58 | 60 | 58 | 62 | 0 | |
p03134 | C++ | Runtime Error | #include <bits/stdc++.h>
#define N 2010
using namespace std;
string st;
int n, a[N], b[N], dp[N][N], mo = 998244353;
int main() {
cin >> st;
n = st.length();
for (int i = 1; i <= n; i++)
a[i] = st[i - 1] - '0' + a[i - 1], b[i] = b[i - 1] + '2' - st[i - 1];
dp[0][0] = 1;
for (int i = 0; i <= a[n]; i++)
... | #include <bits/stdc++.h>
#define N 4010
using namespace std;
string st;
int n, a[N], b[N], dp[N][N], mo = 998244353;
int main() {
cin >> st;
n = st.length();
for (int i = 1; i <= n; i++)
a[i] = st[i - 1] - '0' + a[i - 1], b[i] = b[i - 1] + '2' - st[i - 1];
dp[0][0] = 1;
for (int i = 0; i <= a[n]; i++)
... | replace | 1 | 2 | 1 | 2 | 0 | |
p03134 | C++ | Time Limit Exceeded | #define DEBUG 1
/**
* File : F2.cpp
* Author : Kazune Takahashi
* Created : 2/10/2019, 12:26:47 AM
* Powered by Visual Studio Code
*/
#include <algorithm> // do { } while ( next_permutation(A, A+xxx) ) ;
#include <chrono> // std::chrono::system_clock::time_point start_time, end_time;
#include <complex>
#incl... | #define DEBUG 0
/**
* File : F2.cpp
* Author : Kazune Takahashi
* Created : 2/10/2019, 12:26:47 AM
* Powered by Visual Studio Code
*/
#include <algorithm> // do { } while ( next_permutation(A, A+xxx) ) ;
#include <chrono> // std::chrono::system_clock::time_point start_time, end_time;
#include <complex>
#incl... | replace | 0 | 1 | 0 | 1 | TLE | |
p03134 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<double, double> pdd;
const ull mod = 998244353;
#define REP(i, n) for (int i = 0; i < (int)n; ++i)
// debug
#define dump(x) cerr << #x << " = " << (x) ... | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<double, double> pdd;
const ull mod = 998244353;
#define REP(i, n) for (int i = 0; i < (int)n; ++i)
// debug
#define dump(x) cerr << #x << " = " << (x) ... | replace | 39 | 40 | 39 | 40 | 0 | |
p03134 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <tuple... | #include <algorithm>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <tuple... | delete | 164 | 165 | 164 | 164 | TLE | |
p03134 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
#define rep(i, n) for (int i = 0; i < (n); i++)
#define reps(i, n) for (int i = 1; i <= (n); i++)
#define all(x) (x).begin(), (x).end()
#define uniq(x) (x).erase(unique(all(x)), (x).end())
#define bit(n) (1LL << (n))
#define... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
#define rep(i, n) for (int i = 0; i < (n); i++)
#define reps(i, n) for (int i = 1; i <= (n); i++)
#define all(x) (x).begin(), (x).end()
#define uniq(x) (x).erase(unique(all(x)), (x).end())
#define bit(n) (1LL << (n))
#define... | replace | 162 | 163 | 162 | 163 | 0 | |
p03135 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
int main() {
int T, X;
cin >> T, X;
cout << T / X << endl;
} | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
int main() {
double T = 0, X = 0;
cin >> T >> X;
cout << T / X << endl;
} | replace | 5 | 7 | 5 | 7 | 0 | |
p03135 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
int a, b;
float c;
cin >> a, b;
c = float(a / b);
cout << c << endl;
} | #include <iostream>
using namespace std;
int main() {
int a, b;
float c;
cin >> a >> b;
c = float(a) / b;
cout << c << endl;
} | replace | 6 | 8 | 6 | 8 | 0 | |
p03135 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
typedef long double ld;
int main() {
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL)... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
typedef long double ld;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
ld t, x;
cin >> t >> x;
cout << setprecision(30) << (t / x) << endl;
} | delete | 9 | 14 | 9 | 9 | 0 | |
p03135 | Python | Runtime Error | num = int(input().split())
ans = num[0] / num[1]
print(ans)
| num = list(map(int, input().split()))
ans = num[0] / num[1]
print(ans)
| replace | 0 | 1 | 0 | 1 | TypeError: int() argument must be a string, a bytes-like object or a real number, not 'list' | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03135/Python/s676135149.py", line 1, in <module>
num = int(input().split())
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'list'
|
p03135 | C++ | Runtime Error | #include <iostream>
#include <stdio.h>
int main() {
int T, X;
scanf("%d %d", T, X);
std::cout << T / X << std::endl;
}
| #include <iostream>
#include <stdio.h>
int main() {
float T, X;
scanf("%f %f", &T, &X);
std::cout << T / X << std::endl;
}
| replace | 4 | 6 | 4 | 6 | -11 | |
p03135 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, sum = 0;
cin >> N;
vector<int> L(N);
for (int i = 1; i <= N; i++) {
cin >> L.at(i);
sum += L.at(i);
}
sort(L.begin(), L.end());
if (2 * L.at(N) - sum < 0)
cout << "Yes" << endl;
else
cout << "No" << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
double t, x;
cin >> t >> x;
cout << t / x << endl;
}
| replace | 4 | 20 | 4 | 7 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): vector::_M_range_check: __n (which is 8) >= this->size() (which is 8)
|
p03135 | C++ | Runtime Error | /* Don't try to hack it :|
_/﹋\_
(҂`_´)
<,︻╦╤─҉- - - - - - - - - - - - - - -
_/﹋\_
*/
//@ROMENE7
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define F first
#define S second
#define all(c) c.begin(), c.end()
#define ulli unsig... | /* Don't try to hack it :|
_/﹋\_
(҂`_´)
<,︻╦╤─҉- - - - - - - - - - - - - - -
_/﹋\_
*/
//@ROMENE7
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define F first
#define S second
#define all(c) c.begin(), c.end()
#define ulli unsig... | replace | 35 | 39 | 35 | 39 | 0 | Time : 32.579ms
|
p03135 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
using namespace std;
using namespace __gnu_pbds;
typedef tree<pair<int, int>, // change type
null_type, less<pair<int, int>>... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
using namespace std;
using namespace __gnu_pbds;
typedef tree<pair<int, int>, // change type
null_type, less<pair<int, int>>... | replace | 28 | 29 | 28 | 29 | 0 | |
p03135 | C++ | Time Limit Exceeded | #include <cstdio>
typedef long long ll;
#define min(a, b) (((a) < (b)) ? (a) : (b))
#define max(a, b) (((a) > (b)) ? (a) : (b))
inline ll read() {
char c = getchar();
ll ret = 0;
while (c < '0' || c > '9')
c = getchar();
while (c >= '0' && c <= '9')
ret = ret * 10 + c - '0', c = getchar();
return re... | #include <cstdio>
typedef long long ll;
#define min(a, b) (((a) < (b)) ? (a) : (b))
#define max(a, b) (((a) > (b)) ? (a) : (b))
inline ll read() {
char c = getchar();
ll ret = 0;
while (c < '0' || c > '9')
c = getchar();
while (c >= '0' && c <= '9')
ret = ret * 10 + c - '0', c = getchar();
return re... | delete | 17 | 21 | 17 | 17 | TLE | |
p03135 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
long long N, M;
cin >> N >> M;
long long X[M];
for (int i = 0; i < M; i++) {
cin >> X[i];
}
if (M == 1) {
cout << 0 << endl;
return 0;
}
sort(X, X + M);
pair<long long, long long> kan[M];
kan[0].first = 0;
kan[0].second = 0;
... | #include <bits/stdc++.h>
using namespace std;
int main() {
double a, b;
cin >> a >> b;
cout << a / b << setprecision(6) << endl;
}
| replace | 4 | 52 | 4 | 7 | -11 | |
p03135 | C++ | Runtime Error | #include <bits/stdc++.h>
// #include <ext/numeric>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
#define oo 0x3f3f3f3f
#define OO 0x3f3f3f3f3f3f3f3f
#define popcount(n) __builtin_popcount(n)
#define popcountll(n) __builtin_pop... | #include <bits/stdc++.h>
// #include <ext/numeric>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
#define oo 0x3f3f3f3f
#define OO 0x3f3f3f3f3f3f3f3f
#define popcount(n) __builtin_popcount(n)
#define popcountll(n) __builtin_pop... | replace | 25 | 26 | 25 | 26 | 0 | |
p03135 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstring>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <set>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
#define endl "\n"
#define pb push_back
int main() {
ios::sync_with_stdio(... | #include <algorithm>
#include <cmath>
#include <cstring>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <set>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
#define endl "\n"
#define pb push_back
int main() {
ios::sync_with_stdio(... | replace | 23 | 24 | 23 | 24 | 0 | |
p03135 | C++ | Runtime Error | #pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse2")
#include <algorithm>
#include <bits/stdc++.h>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <i... | #pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse2")
#include <algorithm>
#include <bits/stdc++.h>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <i... | delete | 82 | 87 | 82 | 82 | 0 | |
p03135 | 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 main() {
int t, x;
cin >> t, x;
double ans = t / x;
cout << ans << endl;
return 0;
} | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
int main() {
int t, x;
cin >> t >> x;
double ans = double(t) / x;
cout << fixed << setprecision(10) << ans << endl;
return 0;
}
| replace | 7 | 10 | 7 | 10 | 0 | |
p03135 | C++ | Runtime Error | /**
* Name: Ajay Subhash Jadhav
* Institute: International Institute of Technology Hyderabad
*/
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string.h>
#... | /**
* Name: Ajay Subhash Jadhav
* Institute: International Institute of Technology Hyderabad
*/
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string.h>
#... | delete | 44 | 45 | 44 | 44 | 0 | |
p03135 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int T, X;
cin >> T, X;
cout << T / X << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
double T, X;
cin >> T >> X;
cout << T / X << endl;
} | replace | 4 | 6 | 4 | 6 | 0 | |
p03135 | C++ | Runtime Error | #define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
#include <unordered_map>
#define endl "\n"
#define all(v) v.begin(), v.end()
#define allr(s) s.rbegin(), s.rend()
#define RT(s) return cout << s, 0
#define watch(x) cout << (#x) << " = " << x << endl
#define sz(s) (int)(s.size())
#define PI acos(-1)
#define EPS 1... | #define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
#include <unordered_map>
#define endl "\n"
#define all(v) v.begin(), v.end()
#define allr(s) s.rbegin(), s.rend()
#define RT(s) return cout << s, 0
#define watch(x) cout << (#x) << " = " << x << endl
#define sz(s) (int)(s.size())
#define PI acos(-1)
#define EPS 1... | replace | 37 | 38 | 37 | 38 | 0 | |
p03136 | C++ | Runtime Error | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
using namespace std;
int main() {
int N;
cin >> N;
;
int L[N];
REP(i, N) { cin >> L[N]; }
sort(L, L + sizeof(L));
int alpha = 0;
REP(i, N - 1) { alpha += L[i]; }
if (L[N - 1] > alpha) {
cout << "Yes" << endl;
} else {
... | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
using namespace std;
int main() {
int N;
cin >> N;
int L[N + 10];
REP(i, N) { cin >> L[i]; }
sort(L, L + N);
int tmp = 0;
REP(i, N - 1) { tmp += L[i]; }
if (L[N - 1] < tmp) {
cout << "Yes" << endl;
} else {
cout << "No" ... | replace | 9 | 18 | 9 | 15 | -11 | |
p03136 | Python | Runtime Error | def read():
N = int(input().strip())
L = map(int, input().strip().split())
return N, L
def solve(N, L):
L = sorted(L)
return "Yes" if L[-1] < sum(L[:-1]) else "No"
if __name__ == "__main__":
inputs = read()
print("%f" % solve(*inputs))
| def read():
N = int(input().strip())
L = map(int, input().strip().split())
return N, L
def solve(N, L):
L = sorted(L)
return "Yes" if L[-1] < sum(L[:-1]) else "No"
if __name__ == "__main__":
inputs = read()
print("%s" % solve(*inputs))
| replace | 13 | 14 | 13 | 14 | TypeError: must be real number, not str | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03136/Python/s311210486.py", line 14, in <module>
print("%f" % solve(*inputs))
TypeError: must be real number, not str
|
p03136 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define endl "\n"
#define pb push_back
#define f(i, n) for (i = 0; i < n; i++)
#define F(i, a, b) for (i = a; a <= b; i++)
#define arr(a, n) \
for (i = 0; i < n; i++) ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define endl "\n"
#define pb push_back
#define f(i, n) for (i = 0; i < n; i++)
#define F(i, a, b) for (i = a; a <= b; i++)
#define arr(a, n) \
for (i = 0; i < n; i++) ... | replace | 51 | 57 | 51 | 57 | -11 | |
p03136 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <cmath>
#include <stdio.h>
using namespace std;
int main() {
int N;
vector<int> L(N);
for (int i = 0; i < N; i++) {
cin >> L.at(i);
}
sort(L.begin(), L.end());
long ans = 0;
for (int i = 0; i < N - 1; i++) {
ans += L.at(i);
}
if (L.at(N - 1) < ans)
cout ... | #include <bits/stdc++.h>
#include <cmath>
#include <stdio.h>
using namespace std;
int main() {
int N;
cin >> N;
vector<int> L(N);
for (int i = 0; i < N; i++) {
cin >> L.at(i);
}
sort(L.begin(), L.end());
long ans = 0;
for (int i = 0; i < N - 1; i++) {
ans += L.at(i);
}
if (L.at(N - 1) < an... | insert | 8 | 8 | 8 | 9 | 0 | |
p03136 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; ++i)
int main() {
int N;
vector<int> L(N);
rep(i, N) cin >> L.at(i);
sort(L.begin(), L.end());
int sum = 0;
rep(i, N - 1) sum += L.at(i);
if (sum > L.at(N - 1))
cout << "Yes" << endl;
else
cout << "No" << end... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; ++i)
int main() {
int N;
cin >> N;
vector<int> L(N);
rep(i, N) cin >> L.at(i);
sort(L.begin(), L.end());
int sum = 0;
rep(i, N - 1) sum += L.at(i);
if (sum > L.at(N - 1))
cout << "Yes" << endl;
else
cout <<... | insert | 6 | 6 | 6 | 7 | 0 | |
p03136 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <cmath>
#include <cstdlib>
using namespace std;
int main() {
int N;
vector<int> S;
for (int i = 0; i < N; i++) {
cin >> S.at(i);
}
sort(S.begin(), S.end());
int A = 0;
for (int i = 0; i < N - 1; i++) {
A += S.at(i);
}
if (A > S.at(N - 1))
cout << "Yes" << ... | #include <bits/stdc++.h>
#include <cmath>
#include <cstdlib>
using namespace std;
int main() {
int N;
cin >> N;
vector<int> S(N);
for (int i = 0; i < N; i++) {
cin >> S.at(i);
}
sort(S.begin(), S.end());
int A = 0;
for (int i = 0; i < N - 1; i++) {
A += S.at(i);
}
if (A > S.at(N - 1))
co... | replace | 6 | 7 | 6 | 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)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.