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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p02698 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(obj) (obj).begin(), (obj).end()
typedef pair<int, int> P;
const int mod = 1e9 + 7;
vector<int> dp, ans, a, g[200005];
void dfs(int v, int p = -1) {
int i = lower_bound(all(dp), a[v]) - ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(obj) (obj).begin(), (obj).end()
typedef pair<int, int> P;
const int mod = 1e9 + 7;
vector<int> dp, ans, a, g[200005];
void dfs(int v, int p = -1) {
int i = lower_bound(all(dp), a[v]) - ... | replace | 29 | 30 | 29 | 30 | 0 | |
p02698 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define mp make_pair
#define sqr(x) (x) * (x)
using namespace std;
typedef pair<int, int> pii;
typedef long long ll;
const int maxn = 200007;
const ll inf = 0x3f3f3f3f;
const int mod = 998244353;
#define rep(i, x, y) for (auto i = (x); i <= (y); ++i)
#define dep(i, x, y) for (auto i = (x); i >=... | #include <bits/stdc++.h>
#define mp make_pair
#define sqr(x) (x) * (x)
using namespace std;
typedef pair<int, int> pii;
typedef long long ll;
const int maxn = 200007;
const ll inf = 0x3f3f3f3f;
const int mod = 998244353;
#define rep(i, x, y) for (auto i = (x); i <= (y); ++i)
#define dep(i, x, y) for (auto i = (x); i >=... | replace | 41 | 42 | 41 | 42 | TLE | |
p02698 | C++ | Runtime Error | #include <bits/stdc++.h>
#define F first
#define S second
using namespace std;
typedef long long LL;
typedef pair<int, int> pii;
const int MAXN = 2e5 + 5;
int ans[MAXN];
vector<int> G[MAXN];
vector<pii> tag___[MAXN];
vector<int> pool;
int VV[MAXN];
int bit[MAXN];
int Q(int x) {
int ret = 0;
while (x) {
ret = m... | #include <bits/stdc++.h>
#define F first
#define S second
using namespace std;
typedef long long LL;
typedef pair<int, int> pii;
const int MAXN = 2e5 + 5;
int ans[MAXN];
vector<int> G[MAXN];
vector<pii> tag___[MAXN];
vector<int> pool;
int VV[MAXN];
int bit[MAXN];
int Q(int x) {
int ret = 0;
while (x) {
ret = m... | replace | 22 | 23 | 22 | 23 | 0 | |
p02698 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < (ll)(n); ++i)
#define rep2(i, s, n) for (ll i = s; i < (ll)(n); i++)
#define repr(i, n) for (ll i = n; i >= 0; i--)
#define pb push_back
#define COUT(x) cout << (x) << "\n"
#define COUTF(x) cout << setprecision(15) << (x) << "\n"
#define ENDL cout << "\n"
#d... | #include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < (ll)(n); ++i)
#define rep2(i, s, n) for (ll i = s; i < (ll)(n); i++)
#define repr(i, n) for (ll i = n; i >= 0; i--)
#define pb push_back
#define COUT(x) cout << (x) << "\n"
#define COUTF(x) cout << setprecision(15) << (x) << "\n"
#define ENDL cout << "\n"
#d... | replace | 130 | 131 | 130 | 131 | 0 | |
p02698 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define mx 20005
vector<int> adj[mx];
vector<int> val(mx);
vector<int> lis(mx, -1);
vector<int> currseq;
void dfs(int a) {
auto it = lower_bound(currseq.begin(), currseq.end(), val[a]);
int prevval = -1;
int index = -1;
if (it == currseq.end()) {
currseq.push_ba... | #include <bits/stdc++.h>
using namespace std;
#define mx 200005
vector<int> adj[mx];
vector<int> val(mx);
vector<int> lis(mx, -1);
vector<int> currseq;
void dfs(int a) {
auto it = lower_bound(currseq.begin(), currseq.end(), val[a]);
int prevval = -1;
int index = -1;
if (it == currseq.end()) {
currseq.push_b... | replace | 2 | 3 | 2 | 3 | 0 | |
p02698 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
const ll INF = 1e18;
#define rep(i, n) for (ll i = 0; i < (int)(n); i++)
vector<ll> a(200005);
vector<ll> to[200005];
vector<ll> dp(200005, INF);
vector<ll> ans(200005, 0);
int dfs(int t, int p) {
ll id = lower_bound(dp.beg... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
const ll INF = 1e18;
#define rep(i, n) for (ll i = 0; i < (int)(n); i++)
vector<ll> a(200005);
vector<ll> to[200005];
vector<ll> dp(200005, INF);
vector<ll> ans(200005, 0);
int dfs(int t, int p) {
ll id = lower_bound(dp.beg... | insert | 28 | 28 | 28 | 29 | 0 | |
p02698 | C++ | Time Limit Exceeded | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define repd(i, a, b) for (int i = (a); i < (b); i++)
#define rep(i, n) repd(i, 0, n)
using ll = long long;
using ld = long double;
#define int ll
#define double ld
#define VARNAME(v) #v
using P = pair<int, int>;
constexpr int MOD = 1000000007;
// con... | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define repd(i, a, b) for (int i = (a); i < (b); i++)
#define rep(i, n) repd(i, 0, n)
using ll = long long;
using ld = long double;
#define int ll
#define double ld
#define VARNAME(v) #v
using P = pair<int, int>;
constexpr int MOD = 1000000007;
// con... | replace | 224 | 225 | 224 | 227 | TLE | |
p02698 | C++ | Time Limit Exceeded | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define repd(i, a, b) for (int i = (a); i < (b); i++)
#define rep(i, n) repd(i, 0, n)
using ll = long long;
using ld = long double;
#define int ll
#define double ld
#define VARNAME(v) #v
using P = pair<int, int>;
constexpr int MOD = 1000000007;
// con... | #include <bits/stdc++.h>
using namespace std;
#define repd(i, a, b) for (int i = (a); i < (b); i++)
#define rep(i, n) repd(i, 0, n)
using ll = long long;
using ld = long double;
#define int ll
#define double ld
#define VARNAME(v) #v
using P = pair<int, int>;
constexpr int MOD = 1000000007;
// constexpr int MOD = 99824... | delete | 0 | 1 | 0 | 0 | TLE | |
p02698 | C++ | Runtime Error | #include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <complex>
#include <cstddef>
#include <deque>
#include <functional>
#include <initializer_list>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <que... | #include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <complex>
#include <cstddef>
#include <deque>
#include <functional>
#include <initializer_list>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <que... | replace | 186 | 187 | 186 | 188 | 0 | |
p02698 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
// #define int long long
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define rep(i, n) for (int i = 0; i < n; ++i)
#define rep1(i, n) for (int i = 1; i < n; ++i)
#define exrep(i, a, b) for (ll i = a; i < b; i++)
#define out(x) cout << x <... | #include <bits/stdc++.h>
using namespace std;
// #define int long long
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define rep(i, n) for (int i = 0; i < n; ++i)
#define rep1(i, n) for (int i = 1; i < n; ++i)
#define exrep(i, a, b) for (ll i = a; i < b; i++)
#define out(x) cout << x <... | replace | 61 | 64 | 61 | 64 | 0 | |
p02698 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
using ll = long long;
const int INF = 1001001001;
const int MAX_N = 20005;
vector<int> a, ans;
vector<int> to[MAX_N];
int dp[MAX_N];
void dfs(int v, int p = -1) {
int i = lower_bound(dp, dp + MAX_N, a[v]) - dp;
int old = ... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
using ll = long long;
const int INF = 1001001001;
const int MAX_N = 200005;
vector<int> a, ans;
vector<int> to[MAX_N];
int dp[MAX_N];
void dfs(int v, int p = -1) {
int i = lower_bound(dp, dp + MAX_N, a[v]) - dp;
int old =... | replace | 5 | 6 | 5 | 6 | 0 | |
p02698 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define INF 1000000000
#define pb push_back
vector<ll> ans(1000001, 0);
vector<int> dp(1000001, INF);
vector<int> val(1000001);
vector<ll> adj[100001];
void dfs(ll u, ll p) {
// cout<<"U::"<<u<<"P::"<<p<<endl;
ll k = lower_bound(dp.begin(), dp.end(... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define INF 1000000000
#define pb push_back
vector<ll> ans(2000001, 0);
vector<int> dp(2000001, INF);
vector<int> val(2000001);
vector<ll> adj[200001];
void dfs(ll u, ll p) {
// cout<<"U::"<<u<<"P::"<<p<<endl;
ll k = lower_bound(dp.begin(), dp.end(... | replace | 5 | 9 | 5 | 9 | 0 | |
p02698 | C++ | Runtime Error | // https://www.codechef.com/viewsolution/30791639
#include <bits/stdc++.h>
#define FAST \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
... | // https://www.codechef.com/viewsolution/30791639
#include <bits/stdc++.h>
#define FAST \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
... | replace | 29 | 30 | 29 | 30 | 0 | |
p02698 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bits/stdc++.h>
#include <cassert>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <string>
#includ... | #include <algorithm>
#include <bits/stdc++.h>
#include <cassert>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <string>
#includ... | replace | 1,648 | 1,649 | 1,648 | 1,649 | TLE | |
p02698 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define rep(i, m, n) for (int(i) = (int)(m); i < (int)(n); i++)
#define rep2(i, m, n) for (int(i) = (int)(n)-1; i >= (int)(m); i--)
#define REP(i, n) rep(i, 0, n)
#define REP2(i, n) rep2(i, 0, n)
#define FOR(i, c) ... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, m, n) for (int(i) = (int)(m); i < (int)(n); i++)
#define rep2(i, m, n) for (int(i) = (int)(n)-1; i >= (int)(m); i--)
#define REP(i, n) rep(i, 0, n)
#define REP2(i, n) rep2(i, 0, n)
#define FOR(i, c) ... | delete | 73 | 74 | 73 | 73 | TLE | |
p02698 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stdio.h>
#include <string.h>
#include <vector>
#define REP(i, n) for (int i = 0; (i) < (n); ++(i))
#define FOR(i, n) for (int i = 1; (i) <= (n); ++(i))
#define dump(x) cout << #x << " =... | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stdio.h>
#include <string.h>
#include <vector>
#define REP(i, n) for (int i = 0; (i) < (n); ++(i))
#define FOR(i, n) for (int i = 1; (i) <= (n); ++(i))
#define dump(x) cout << #x << " =... | replace | 89 | 93 | 89 | 93 | 0 | |
p02698 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll inf = 1e18;
int N;
vector<int> g[100100];
ll a[200100];
ll dp[200100];
ll ans[200100];
void solve(int u, int pa = -1) {
int ind = lower_bound(dp, dp + N, a[u]) - dp;
ll prev = dp[ind];
dp[ind] = a[u];
/*
for(int i=0;i<N;i++){
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll inf = 1e18;
int N;
vector<int> g[200100];
ll a[200100];
ll dp[200100];
ll ans[200100];
void solve(int u, int pa = -1) {
int ind = lower_bound(dp, dp + N, a[u]) - dp;
ll prev = dp[ind];
dp[ind] = a[u];
/*
for(int i=0;i<N;i++){
... | replace | 6 | 7 | 6 | 7 | 0 | |
p02698 | C++ | Runtime Error | #include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// #include <ext/pb_ds/detail/standard_policies.hpp>
// using namespace __gnu_pbds;
using namespace std;
// template <typename T>
// using ordered_set = tree<T, null_type, less<T>, rb_tree_tag,
// tree_order... | #include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// #include <ext/pb_ds/detail/standard_policies.hpp>
// using namespace __gnu_pbds;
using namespace std;
// template <typename T>
// using ordered_set = tree<T, null_type, less<T>, rb_tree_tag,
// tree_order... | replace | 11 | 12 | 11 | 12 | -11 | |
p02698 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define fine cout << "fine" << endl;
#define ll long long int
#define pb push_back
#define FASTIO \
ios::sync_with_stdio(0); \
cin.tie(0); ... | #include <bits/stdc++.h>
using namespace std;
#define fine cout << "fine" << endl;
#define ll long long int
#define pb push_back
#define FASTIO \
ios::sync_with_stdio(0); \
cin.tie(0); ... | insert | 48 | 48 | 48 | 49 | 0 | |
p02698 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int N = 200005;
int n;
int a[N];
vector<int> edges[N];
struct SegTree {
int maxi[N];
void update(int node, int l, int r, int x, int val) {
if (l > x || r < x)
return;
if (l == x && r == x) {
maxi[node] = val;
return;
}
int m... | #include <bits/stdc++.h>
using namespace std;
const int N = 200005;
int n;
int a[N];
vector<int> edges[N];
struct SegTree {
int maxi[N << 2];
void update(int node, int l, int r, int x, int val) {
if (l > x || r < x)
return;
if (l == x && r == x) {
maxi[node] = val;
return;
}
... | replace | 11 | 12 | 11 | 12 | 0 | |
p02698 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <queue>
#include <stack>
#include <vector>
using namespace std;
using ll = long long;
const int INF = 1e9;
typedef pair<int, int> P;
const int mx = 200000;
vector<int> v[mx];
int an[mx], a[mx];
int n;
int pp[mx];
int dfs(int from, int now, int pc) {
// cout<<from<<... | #include <algorithm>
#include <iostream>
#include <queue>
#include <stack>
#include <vector>
using namespace std;
using ll = long long;
const int INF = 1e9;
typedef pair<int, int> P;
const int mx = 200000;
vector<int> v[mx];
int an[mx], a[mx];
int n;
int pp[mx];
void dfs(int from, int now, int pc) {
// cout<<from<... | replace | 17 | 18 | 17 | 18 | 0 | |
p02698 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
// x^y≡x^(y%(p-1))mod p
// but there is a condition that x needs to be coprime to p
/// assic value of ('0'-'9') is(48 - 57) and (a-z) is (97-122) and (A-Z)
/// is(65-90) and 32 for space
typedef long long int ll;
typedef pair<ll, ll> pii;
typedef vector<pii> vii;
#define p... | #include <bits/stdc++.h>
using namespace std;
// x^y≡x^(y%(p-1))mod p
// but there is a condition that x needs to be coprime to p
/// assic value of ('0'-'9') is(48 - 57) and (a-z) is (97-122) and (A-Z)
/// is(65-90) and 32 for space
typedef long long int ll;
typedef pair<ll, ll> pii;
typedef vector<pii> vii;
#define p... | replace | 52 | 53 | 52 | 53 | -6 | terminate called after throwing an instance of 'std::length_error'
what(): vector::_M_default_append
|
p02698 | C++ | Runtime Error | #include <iostream>
#include <vector>
using namespace std;
int a[2 * 100000];
int lis[2 * 100000];
void dfs(const vector<vector<int>> &edges, int node, vector<int> *state) {
vector<int>::iterator it = lower_bound(state->begin(), state->end(), a[node]);
bool extend = it == state->end();
int original;
if (exte... | #include <iostream>
#include <vector>
using namespace std;
int a[2 * 100000];
int lis[2 * 100000];
void dfs(const vector<vector<int>> &edges, int node, vector<int> *state) {
vector<int>::iterator it = lower_bound(state->begin(), state->end(), a[node]);
bool extend = it == state->end();
int original;
if (exte... | insert | 52 | 52 | 52 | 53 | 0 | |
p02698 | C++ | Time Limit Exceeded | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define INF 1000000001
struct node {
int a;
vector<int> to;
int ans;
};
stack<pair<int, int>> s;
void dfs(int v, int p, vector<node> &nodes, vector<int> &dp) {
int changed =
distance(dp.begin(), lower_bound(dp.begin(), dp.end(), nodes[v... | #include <bits/stdc++.h>
using namespace std;
#define INF 1000000001
struct node {
int a;
vector<int> to;
int ans;
};
stack<pair<int, int>> s;
void dfs(int v, int p, vector<node> &nodes, vector<int> &dp) {
int changed =
distance(dp.begin(), lower_bound(dp.begin(), dp.end(), nodes[v].a));
s.push(make_pa... | delete | 0 | 1 | 0 | 0 | TLE | |
p02698 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
#define fi first
#define se second
constexpr int MAXN = 1 << 18;
vector<int> grafo[MAXN];
int A[MAXN];
int res[MAXN];
vector<int> lis;
void dfs(int v, int u) {
auto it = lower_bound(lis.begin(), lis.end(), A[v]);
int prev = -1;
if (it == lis.e... | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
#define fi first
#define se second
constexpr int MAXN = 1 << 18;
vector<int> grafo[MAXN];
int A[MAXN];
int res[MAXN];
vector<int> lis;
void dfs(int v, int u) {
auto it = lower_bound(lis.begin(), lis.end(), A[v]);
int prev = -1;
if (it == lis.e... | insert | 50 | 50 | 50 | 51 | 0 | |
p02698 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); ++i)
#define chmax(a, b) a = max(a, b)
#define chmin(a, b) a = min(a, b)
#define fi first
#define se second
#define INF 1000000009
#define LLINF 1000000000000000009LL
... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); ++i)
#define chmax(a, b) a = max(a, b)
#define chmin(a, b) a = min(a, b)
#define fi first
#define se second
#define INF 1000000009
#define LLINF 1000000000000000009LL
... | replace | 10 | 11 | 10 | 11 | 0 | |
p02698 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define all(v) v.begin(), v.end()
typedef long long ll;
typedef pair<ll, ll> P;
typedef vector<ll> vec;
typedef vector<vec> mat;
int r[200001] = {0};
ll inf = 1e18;
vec G[200001], A(200001), dp(200001, inf), ans(200001);
int dfs(... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define all(v) v.begin(), v.end()
typedef long long ll;
typedef pair<ll, ll> P;
typedef vector<ll> vec;
typedef vector<vec> mat;
int r[200001] = {0};
ll inf = 1e18;
vec G[200001], A(200001), dp(200001, inf), ans(200001);
int dfs(... | insert | 22 | 22 | 22 | 23 | 0 | |
p02698 | C++ | Runtime Error | /* Simplicity and Goodness */
#include <bits/stdc++.h>
using namespace std;
#define scn(n) scanf("%d", &n)
#define lscn(n) scanf("%lld", &n)
#define lpri(n) printf("%lld ", n)
#define pri(n) printf("%d ", (int)n)
#define prin(n) printf("%d\n", (int)n)
#define lprin(n) printf("%lld\n", n)
#define deb(x) cout << #x << '... | /* Simplicity and Goodness */
#include <bits/stdc++.h>
using namespace std;
#define scn(n) scanf("%d", &n)
#define lscn(n) scanf("%lld", &n)
#define lpri(n) printf("%lld ", n)
#define pri(n) printf("%d ", (int)n)
#define prin(n) printf("%d\n", (int)n)
#define lprin(n) printf("%lld\n", n)
#define deb(x) cout << #x << '... | replace | 25 | 26 | 25 | 26 | 0 | |
p02698 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;
/*---------------------DEBUGGING--------------------------------------------*/
void __print(int x) {... | #include <bits/stdc++.h>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;
/*---------------------DEBUGGING--------------------------------------------*/
void __print(int x) {... | replace | 74 | 75 | 74 | 75 | 0 | |
p02698 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/rope>
using namespace std;
using namespace __gnu_pbds;
using namespace __gnu_cxx;
#define ll long long
#define ii pair<ll, ll>
#define iii pair<ii, ll>
#define fi first
#define se second
#define endl '\n... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/rope>
using namespace std;
using namespace __gnu_pbds;
using namespace __gnu_cxx;
#define ll long long
#define ii pair<ll, ll>
#define iii pair<ii, ll>
#define fi first
#define se second
#define endl '\n... | replace | 35 | 36 | 35 | 36 | 0 | |
p02698 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int sz = 1e5 + 5;
typedef pair<int, int> pii;
#define x first
#define y second
pii a[sz];
vector<int> g[sz];
int tree[sz * 4], ans[sz];
void update(int node, int b, int e, int x, int v) {
if (x < b || e < x)
return;
if (b == e) {
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int sz = 2e5 + 5;
typedef pair<int, int> pii;
#define x first
#define y second
pii a[sz];
vector<int> g[sz];
int tree[sz * 4], ans[sz];
void update(int node, int b, int e, int x, int v) {
if (x < b || e < x)
return;
if (b == e) {
... | replace | 3 | 4 | 3 | 4 | 0 | |
p02698 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
long long N;
long long A[200005];
vector<long long> tree[200005];
long long dp[100005];
long long ans[100005];
// dp[i]:= 長さが i+1
// であるような増加部分列における最終要素の最小値(存在しない場合は INF)
void dfs(long long pa, long long cur) {
// cout << "pa " << pa << " cur " << cur << endl;
long ... | #include <bits/stdc++.h>
using namespace std;
long long N;
long long A[200005];
vector<long long> tree[200005];
long long dp[200005];
long long ans[200005];
// dp[i]:= 長さが i+1
// であるような増加部分列における最終要素の最小値(存在しない場合は INF)
void dfs(long long pa, long long cur) {
// cout << "pa " << pa << " cur " << cur << endl;
long ... | replace | 6 | 8 | 6 | 8 | 0 | |
p02698 | C++ | Time Limit Exceeded | #include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <random>
#include ... | #include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <random>
#include ... | replace | 34 | 35 | 34 | 35 | TLE | |
p02698 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep2(i, x, n) for (int i = x; i <= n; i++)
#define rep3(i, x, n) for (int i = x; i >= n; i--)
#define elif else if
#define sp(x) fixed << setprecision(x)
#define pb(x) push_back(x)
#define all(x) x.begin(), x.end()
using... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep2(i, x, n) for (int i = x; i <= n; i++)
#define rep3(i, x, n) for (int i = x; i >= n; i--)
#define elif else if
#define sp(x) fixed << setprecision(x)
#define pb(x) push_back(x)
#define all(x) x.begin(), x.end()
using... | replace | 21 | 22 | 21 | 22 | 0 | |
p02698 | C++ | Runtime Error | #include "bits/stdc++.h"
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/rope>
using namespace __gnu_pbds;
using namespace __gnu_cxx;
using namespace std;
using ll = long long;
#define eb emplace_back
#define pb push_back
#define mp make_pair
#define ff first
#define ss sec... | #include "bits/stdc++.h"
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/rope>
using namespace __gnu_pbds;
using namespace __gnu_cxx;
using namespace std;
using ll = long long;
#define eb emplace_back
#define pb push_back
#define mp make_pair
#define ff first
#define ss sec... | replace | 144 | 145 | 144 | 145 | -11 | |
p02698 | C++ | Time Limit Exceeded | #include "bits/stdc++.h"
using namespace std;
using ll = long long;
#define rep(i, begin, n) for (int i = begin; i < n; i++)
#define repe(i, begin, n) for (int i = begin; i <= n; i++)
#define repr(i, begin, n) for (int i = begin; i > begin - n; i--)
#define repre(i, begin, end) for (int i = begin; i >= end; i--)
templ... | #include "bits/stdc++.h"
using namespace std;
using ll = long long;
#define rep(i, begin, n) for (int i = begin; i < n; i++)
#define repe(i, begin, n) for (int i = begin; i <= n; i++)
#define repr(i, begin, n) for (int i = begin; i > begin - n; i--)
#define repre(i, begin, end) for (int i = begin; i >= end; i--)
templ... | replace | 48 | 55 | 48 | 51 | TLE | |
p02698 | C++ | Runtime Error | #include <bits/stdc++.h>
// ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
// clock_t start=clock();clock_t
// end=clock();cout<<(double)(end-start)/CLOCKS_PER_SEC<<endl;
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef unsigned int ui;
typedef pair<int, int> pii;
typedef pair<pii... | #include <bits/stdc++.h>
// ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
// clock_t start=clock();clock_t
// end=clock();cout<<(double)(end-start)/CLOCKS_PER_SEC<<endl;
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef unsigned int ui;
typedef pair<int, int> pii;
typedef pair<pii... | replace | 133 | 134 | 133 | 134 | 0 | |
p02698 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 2e5 + 5;
const int mod = 1e9 + 7;
ll qpow(ll a, ll b) {
ll res = 1;
for (; b; b >>= 1) {
if (b & 1)
res = res * a % mod;
a = a * a % mod;
}
return res;
}
struct graph {
int head[maxn], nxt[maxn << 1], to[maxn <<... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 2e5 + 5;
const int mod = 1e9 + 7;
ll qpow(ll a, ll b) {
ll res = 1;
for (; b; b >>= 1) {
if (b & 1)
res = res * a % mod;
a = a * a % mod;
}
return res;
}
struct graph {
int head[maxn], nxt[maxn << 1], to[maxn <<... | delete | 62 | 64 | 62 | 62 | -11 | |
p02698 | C++ | Runtime Error | #include <bits/stdc++.h>
#define int long long
#define x first
#define y second
#define getbit(x, i) (((x) >> (i)) & 1)
using namespace std;
typedef pair<int, int> pii;
#define hashset unordered_set
#define hashmap unordered_map
#define newline fast_writechar('\n')
#define unify(arr) arr.resize(unique(arr.begin(), arr.... | #include <bits/stdc++.h>
#define int long long
#define x first
#define y second
#define getbit(x, i) (((x) >> (i)) & 1)
using namespace std;
typedef pair<int, int> pii;
#define hashset unordered_set
#define hashmap unordered_map
#define newline fast_writechar('\n')
#define unify(arr) arr.resize(unique(arr.begin(), arr.... | replace | 57 | 58 | 57 | 58 | 0 | |
p02698 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define FOR(i, a, b) for (auto i = a; i <= b; ++i)
#define REP(i, a, b) for (auto i = a; i < b; ++i)
#define FORI(i, a, b) \
for (auto i = a; i != b + 1 - 2 * (a > b); i += 1 - 2 * (a > b))
#define REPI(i, a, b) ... | #include <bits/stdc++.h>
#define FOR(i, a, b) for (auto i = a; i <= b; ++i)
#define REP(i, a, b) for (auto i = a; i < b; ++i)
#define FORI(i, a, b) \
for (auto i = a; i != b + 1 - 2 * (a > b); i += 1 - 2 * (a > b))
#define REPI(i, a, b) ... | replace | 167 | 171 | 167 | 173 | TLE | |
p02698 | C++ | Time Limit Exceeded | #include "bits/stdc++.h"
using namespace std;
///////////////////////////////////////////
const long long int INF = 1LL << 60;
const long long int Mod = 1000000007;
using ll = long long int;
using ci = const int;
using vi = vector<int>;
using Vi = vector<long long int>;
using P = pair<int, int>;
using PLL = pair<ll, ll... | #include "bits/stdc++.h"
using namespace std;
///////////////////////////////////////////
const long long int INF = 1LL << 60;
const long long int Mod = 1000000007;
using ll = long long int;
using ci = const int;
using vi = vector<int>;
using Vi = vector<long long int>;
using P = pair<int, int>;
using PLL = pair<ll, ll... | replace | 68 | 69 | 68 | 69 | TLE | |
p02698 | C++ | Runtime Error | // #pragma GCC optimize ("O3")
// #pragma GCC target ("avx")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep1(i, n) for (int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x... | // #pragma GCC optimize ("O3")
// #pragma GCC target ("avx")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep1(i, n) for (int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x... | replace | 47 | 48 | 47 | 48 | 0 | |
p02698 | C++ | Runtime Error | #include <algorithm>
#include <assert.h>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
#define F first
#define S second
#define pb push_back
usi... | #include <algorithm>
#include <assert.h>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
#define F first
#define S second
#define pb push_back
usi... | replace | 21 | 22 | 21 | 22 | 0 | |
p02698 | C++ | Runtime Error | #include <cstdio>
#include <iostream>
#include <stack>
#include <vector>
#define PR pair<int, int>
#define F first
#define S second
#define N 100005
using namespace std;
int n, sz, a[N], v[N], d[N];
vector<int> gr[N];
stack<PR> st;
void f(int p) {
if (v[p])
return;
int k = lower_bound(d, d + sz, a[p]) - d;
... | #include <cstdio>
#include <iostream>
#include <stack>
#include <vector>
#define PR pair<int, int>
#define F first
#define S second
#define N 200005
using namespace std;
int n, sz, a[N], v[N], d[N];
vector<int> gr[N];
stack<PR> st;
void f(int p) {
if (v[p])
return;
int k = lower_bound(d, d + sz, a[p]) - d;
... | replace | 7 | 8 | 7 | 8 | 0 | |
p02698 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
typedef long long ll;
#define pb push_back
#define mp make_pair
#define all(a) (a).begin(), (a).end()
#define clr(a, h) memset(a, (h), sizeof(a))
#define mem(a, h) memset(a, (h), sizeof(a))
#define fi first
#define se... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
typedef long long ll;
#define pb push_back
#define mp make_pair
#define all(a) (a).begin(), (a).end()
#define clr(a, h) memset(a, (h), sizeof(a))
#define mem(a, h) memset(a, (h), sizeof(a))
#define fi first
#define se... | replace | 29 | 30 | 29 | 30 | 0 | |
p02698 | 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.h>
#include <limits>
#include <list>
#include <locale>
... | #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.h>
#include <limits>
#include <list>
#include <locale>
... | replace | 34 | 35 | 34 | 35 | -6 | terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
|
p02698 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
#define sz(x) (int)(x).size()
using namespace std;
using ll = long long;
using P = pair<int, int>;
using vi = vector<int>;
using vc = vector<char>;
using vb = vec... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
#define sz(x) (int)(x).size()
using namespace std;
using ll = long long;
using P = pair<int, int>;
using vi = vector<int>;
using vc = vector<char>;
using vb = vec... | replace | 39 | 40 | 39 | 40 | TLE | |
p02698 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define INF 2000000000000000000
#define ll long long
using namespace std;
ll N;
vector<ll> lcs;
vector<multiset<ll>> st;
vector<ll> ans;
vector<vector<ll>> connection;
vector<ll> A;
void dfs(ll now, ll before) {
ll a = A.at(now);
ll index = lower_bound(lcs.begin(), lcs.end(), a) - lcs.be... | #include <bits/stdc++.h>
#define INF 2000000000000000000
#define ll long long
using namespace std;
ll N;
vector<ll> lcs;
vector<multiset<ll>> st;
vector<ll> ans;
vector<vector<ll>> connection;
vector<ll> A;
void dfs(ll now, ll before) {
ll a = A.at(now);
ll index = lower_bound(lcs.begin(), lcs.end(), a) - lcs.be... | replace | 26 | 27 | 26 | 27 | TLE | |
p02698 | C++ | Runtime Error | // g++ -std=c++11 a.cpp
#include <algorithm>
#include <assert.h>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <typeinfo>
#incl... | // g++ -std=c++11 a.cpp
#include <algorithm>
#include <assert.h>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <typeinfo>
#incl... | delete | 136 | 137 | 136 | 136 | -11 | |
p02698 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define lli long long int
#define REP(i, s, n) for (int i = s; i < n; i++)
#define NUM 2520
#define INF (1LL << 50)
#define DEBUG 0
#define mp(a, b) make_pair(a, b)
#define SORT(V) sort(V.begin(), V.end())
#define PI (3.141592653589794)
#define TO_STRING(VariableName) #Var... | #include <bits/stdc++.h>
using namespace std;
#define lli long long int
#define REP(i, s, n) for (int i = s; i < n; i++)
#define NUM 2520
#define INF (1LL << 50)
#define DEBUG 0
#define mp(a, b) make_pair(a, b)
#define SORT(V) sort(V.begin(), V.end())
#define PI (3.141592653589794)
#define TO_STRING(VariableName) #Var... | replace | 44 | 45 | 44 | 45 | 0 | |
p02698 | C++ | Runtime Error | /*
读题不规范,爆零两行泪。
数据不清空,爆零两行泪。
多测不读完,爆零两行泪。
边界不特判,爆零两行泪。
贪心不证明,爆零两行泪。
D P 顺序错,爆零两行泪。
大小少等号,爆零两行泪。
变量不统一,爆零两行泪。
越界不判断,爆零两行泪。
调试不注释,爆零两行泪。
溢出不 l l,爆零两行泪。
*/
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
const int N = 200000;
int n;
int a[N + 1];
vector<int> nums;
void discrete() {
sort(nums.begin(), ... | /*
读题不规范,爆零两行泪。
数据不清空,爆零两行泪。
多测不读完,爆零两行泪。
边界不特判,爆零两行泪。
贪心不证明,爆零两行泪。
D P 顺序错,爆零两行泪。
大小少等号,爆零两行泪。
变量不统一,爆零两行泪。
越界不判断,爆零两行泪。
调试不注释,爆零两行泪。
溢出不 l l,爆零两行泪。
*/
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
const int N = 200000;
int n;
int a[N + 1];
vector<int> nums;
void discrete() {
sort(nums.begin(), ... | insert | 86 | 86 | 86 | 87 | 0 | |
p02698 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double ld;
#define lp(var, start, end) for (ll var = start; var < end; ++var)
#define rlp(var, start, end) for (ll var = start; var >= end; var--)
#define pb push_back
#define mp make_pair
#define pf push_front
#define ff first
#defin... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double ld;
#define lp(var, start, end) for (ll var = start; var < end; ++var)
#define rlp(var, start, end) for (ll var = start; var >= end; var--)
#define pb push_back
#define mp make_pair
#define pf push_front
#define ff first
#defin... | replace | 42 | 43 | 42 | 43 | -11 | |
p02698 | C++ | Time Limit Exceeded | #include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <... | #include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <... | replace | 93 | 100 | 93 | 95 | TLE | |
p02699 | C++ | Runtime Error | #include <cstdio>
#include <stdlib.h>
int main(int argc, char *argv[]) {
int S;
int W;
S = atoi(argv[1]);
W = atoi(argv[2]);
if (W >= S) {
printf("unsafe");
} else {
printf("safe");
}
// printf("羊の数は%d、オオカミの数は%d",S,W);
}
| #include <cstdio>
#include <stdlib.h>
int main() {
int S, W;
scanf("%d%d", &S, &W);
if (W >= S) {
printf("unsafe");
} else {
printf("safe");
}
// printf("羊の数は%d、オオカミの数は%d",S,W);
}
| replace | 3 | 8 | 3 | 6 | -11 | |
p02699 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
using Map = map<string, ll>;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
ll INF = 1LL << 60;
ll MOD = 1000000007;
int main() {
ll S;
cin >> S;
ll W;
cin >> W;
for (ll i = 0; i < 10000000000; i++) {
swap... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
using Map = map<string, ll>;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
ll INF = 1LL << 60;
ll MOD = 1000000007;
int main() {
ll S;
cin >> S;
ll W;
cin >> W;
for (ll i = 0; i < 1000000000; i++) {
swap(... | replace | 15 | 16 | 15 | 16 | TLE | |
p02699 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
vector<string> S(11);
cin >> N;
for (int i = 0; i < 11; i++) {
S.at(i);
}
int count = N;
sort(S.begin(), S.end());
for (int i = 0; i < N - 1; i++) {
if (S.at(i) == S.at(i + 1))
count--;
}
cout << count << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int S, W;
cin >> S >> W;
if (S <= W) {
cout << "unsafe" << endl;
} else
cout << "safe" << endl;
} | replace | 4 | 19 | 4 | 10 | 0 | |
p02699 | Python | Runtime Error | A, B = map(int.input().split())
if A > B:
print("safe")
else:
print("unsafe")
| A, B = map(int, input().split())
if A > B:
print("safe")
else:
print("unsafe")
| replace | 0 | 1 | 0 | 1 | AttributeError: type object 'int' has no attribute 'input' | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02699/Python/s743314648.py", line 1, in <module>
A, B = map(int.input().split())
AttributeError: type object 'int' has no attribute 'input'
|
p02699 | Python | Runtime Error | s, w = map(int, input().split(""))
res = "safe"
if w >= s:
res = "unsafe"
print(res)
| s, w = map(int, input().split(" "))
res = "safe"
if w >= s:
res = "unsafe"
print(res)
| replace | 0 | 1 | 0 | 1 | ValueError: empty separator | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02699/Python/s552737943.py", line 1, in <module>
s, w = map(int, input().split(""))
ValueError: empty separator
|
p02699 | Python | Runtime Error | def main():
s, w = map(int, input())
if w >= s:
print("unsafe")
else:
print("safe")
if __name__ == "__main__":
main()
| def main():
s, w = map(int, input().split())
if w >= s:
print("unsafe")
else:
print("safe")
if __name__ == "__main__":
main()
| replace | 1 | 2 | 1 | 2 | ValueError: invalid literal for int() with base 10: ' ' | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02699/Python/s696020761.py", line 11, in <module>
main()
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02699/Python/s696020761.py", line 3, in main
s, w = map(int, input())
ValueErr... |
p02700 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define all(x) x.begin(), x.end()
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
... | #include <bits/stdc++.h>
using namespace std;
#define all(x) x.begin(), x.end()
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
... | replace | 26 | 27 | 26 | 27 | TLE | |
p02700 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c, d;
int x = (a + d - 1) / d;
int y = (c + b - 1) / b;
x >= y ? (cout << "YES\n") : (cout << "NO\n");
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c, d;
cin >> a >> b >> c >> d;
int i = 0;
while (a > 0 && c > 0) {
if (i)
a -= d, i--;
else
c -= b, i++;
}
if (a > 0)
cout << "Yes\n";
else
cout << "No\n";
}
| replace | 4 | 7 | 4 | 16 | 0 | |
p02700 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C, D;
cin >> A >> B >> C >> D;
while (true) {
C -= B;
if (C == 0) {
cout << "Yes";
return 1;
}
A -= D;
if (A == 0) {
cout << "No";
return 1;
}
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C, D;
cin >> A >> B >> C >> D;
int X = (A + D - 1) / D;
int Y = (C + B - 1) / B;
cout << (X >= Y ? "Yes" : "No") << "\n";
} | replace | 6 | 19 | 6 | 9 | 1 | |
p02700 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C, D;
cin >> A >> B >> C >> D;
if (A / (A - B) < C / (C - D)) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C, D;
cin >> A >> B >> C >> D;
if (C - B <= 0) {
cout << "Yes" << endl;
} else if (A - D <= 0) {
cout << "No" << endl;
} else if (C % B == 0 && A % D != 0) {
if (C / B <= A / D + 1) {
cout << "Yes" << endl;
} else {
... | replace | 6 | 7 | 6 | 23 | -8 | |
p02700 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c, d;
cin >> a >> b >> c >> d;
for (int i = 0; i < (a + c - 1) / c; i++) {
c -= b;
if (c <= 0) {
cout << "Yes" << endl;
}
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c, d;
cin >> a >> b >> c >> d;
int count = 0;
count = (a + d - 1) / d;
if (b * count >= c) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
}
| replace | 6 | 11 | 6 | 12 | 0 | |
p02700 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <climits>
using namespace std;
#define endl '\n'
// #define IOS ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define c0(x) cout << (x) << " "
#define c1(x) cout << (x) << endl
#define rep for (ll i = 0; i < n; i++)
#define f(i, s, n) for (ll i = s; i < n; i++)
#define f... | #include <bits/stdc++.h>
#include <climits>
using namespace std;
#define endl '\n'
// #define IOS ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define c0(x) cout << (x) << " "
#define c1(x) cout << (x) << endl
#define rep for (ll i = 0; i < n; i++)
#define f(i, s, n) for (ll i = s; i < n; i++)
#define f... | replace | 216 | 217 | 216 | 217 | TLE | |
p02700 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#ifdef LOCAL_DEBUG
#define DEBUG 1
#define CERR \
if (DEBUG) \
cerr
#define MACRO(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, NAME, ...) NAME
#define pr(...) ... | #include <bits/stdc++.h>
#ifdef LOCAL_DEBUG
#define DEBUG 1
#define CERR \
if (DEBUG) \
cerr
#define MACRO(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, NAME, ...) NAME
#define pr(...) ... | replace | 80 | 81 | 80 | 81 | TLE | |
p02700 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr ll MOD = 1000000007;
int main(int argc, char **argv) {
ll a, b, c, d;
cin >> a >> b >> c >> d;
bool t{true};
while (1) {
if (t)
c -= b;
else
a -= d;
if (a == 0 || c == 0)
break;
t ^= true;
}
s... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr ll MOD = 1000000007;
int main(int argc, char **argv) {
ll a, b, c, d;
cin >> a >> b >> c >> d;
bool t{true};
while (1) {
if (t)
c -= b;
else
a -= d;
if (a <= 0 || c <= 0)
break;
t ^= true;
}
s... | replace | 17 | 18 | 17 | 18 | TLE | |
p02700 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c, d;
cin >> a >> b >> c >> d;
int res = 0;
while (a > 0 || c > 0) {
if ((c - b) <= 0) {
res = 1;
break;
} else if ((a - d) <= 0) {
res = -1;
break;
}
}
if (res == 1)
cout << "Yes";
else
co... | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c, d;
cin >> a >> b >> c >> d;
int res = 0;
while (a > 0 || c > 0) {
if ((c - b) <= 0) {
res = 1;
break;
} else if ((a - d) <= 0) {
res = -1;
break;
}
c = c - b;
a = a - d;
}
if (res == 1)
... | insert | 17 | 17 | 17 | 19 | TLE | |
p02700 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
long long int A, B, C, D;
cin >> A >> B >> C >> D;
while (A != 0 || B != 0) {
A = A - C;
D = D - B;
}
if (A == 0) {
cout << "No" << endl;
} else {
cout << "Yes" << endl;
}
retu... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
long long int A, B, C, D;
cin >> A >> B >> C >> D;
while (A != 0 || C != 0) {
C = C - B;
if (C <= 0) {
cout << "Yes";
break;
}
A = A - D;
if (A <= 0) {
cout << "No"... | replace | 7 | 15 | 7 | 18 | TLE | |
p02700 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll a, b, c, d;
cin >> a >> b >> c >> d;
int turn = 1;
while (c != 0 && a != 0) {
if (turn == 1) {
turn ^= 1;
c = c - b;
} else {
turn ^= 1;
a = a - d;
}
}
if (turn == 0)
cout << "Yes";
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll a, b, c, d;
cin >> a >> b >> c >> d;
int turn = 1;
while (c > 0 && a > 0) {
if (turn == 1) {
turn ^= 1;
c = c - b;
} else {
turn ^= 1;
a = a - d;
}
}
if (turn == 0)
cout << "Yes";
el... | replace | 7 | 8 | 7 | 8 | TLE | |
p02700 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C, D;
cin >> A >> B >> C >> D;
while (true) {
bool chokudai = false;
for (int i = 0; i < 101; i++) {
A -= B;
C -= D;
if (A < 0) {
chokudai = true;
}
if (C < 0) {
chokudai = true;
}
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C, D;
cin >> A >> B >> C >> D;
if ((A + D - 1) / D >= (C + B - 1) / B) {
cout << "Yes" << endl;
}
else {
cout << "No" << endl;
}
}
| replace | 6 | 23 | 6 | 12 | TLE | |
p02700 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
int main() {
ll a, b, c, d, count = 1;
cin >> a >> b >> c >> d;
while (a != 0 && c != 0) {
if (count % 2 != 0)
c = c - b;
else
a = a - d;
count++;
}
if (a <= 0)
cout << "No" << endl;
else
cout << "Yes" <<... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
int main() {
ll a, b, c, d, count = 1;
cin >> a >> b >> c >> d;
while (a > 0 && c > 0) {
if (count % 2 != 0)
c = c - b;
else
a = a - d;
count++;
}
if (a <= 0)
cout << "No" << endl;
else
cout << "Yes" << e... | replace | 6 | 7 | 6 | 7 | TLE | |
p02700 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
// #ifndef ONLINE_JUDGE
// # define LOG(x) (cerr << #x << " = " << (x) << endl)
// #else
// # define LOG(x) 0
// #endif
#define pb push_back
#define mod 1000000007
#define endl '\n'
typedef int integer;
#define int long long
using namespace std;
int powmod(int a, int b) {
int res = 1;
a ... | #include <bits/stdc++.h>
// #ifndef ONLINE_JUDGE
// # define LOG(x) (cerr << #x << " = " << (x) << endl)
// #else
// # define LOG(x) 0
// #endif
#define pb push_back
#define mod 1000000007
#define endl '\n'
typedef int integer;
#define int long long
using namespace std;
int powmod(int a, int b) {
int res = 1;
a ... | replace | 38 | 39 | 38 | 39 | TLE | |
p02700 | Python | Time Limit Exceeded | ht, st, ha, sa = list(map(int, input().split(" ")))
bool_player = True # Takashi
while ht > 0 or st > 0:
if bool_player:
ha -= st
bool_player = False
else:
ht -= sa
bool_player = True
if ht <= 0:
print("No")
else:
print("Yes")
| ht, st, ha, sa = list(map(int, input().split(" ")))
bool_player = True # Takashi
while ht > 0 and ha > 0:
if bool_player:
ha -= st
bool_player = False
else:
ht -= sa
bool_player = True
if ht <= 0:
print("No")
else:
print("Yes")
| replace | 2 | 3 | 2 | 3 | TLE | |
p02700 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define ll long long
#define ull unsigned long long
#define si set<ll>
#define vi vector<ll>
#define popcount(x) __builtin_popcountll(x)
#define mii map<ll, ll>
#define vpi vector<pair<ll, ll>>
#define sz(c) (int)c.size()
#define fr first
#define ll l... | #include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define ll long long
#define ull unsigned long long
#define si set<ll>
#define vi vector<ll>
#define popcount(x) __builtin_popcountll(x)
#define mii map<ll, ll>
#define vpi vector<pair<ll, ll>>
#define sz(c) (int)c.size()
#define fr first
#define ll l... | replace | 49 | 50 | 49 | 50 | TLE | |
p02700 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
long long a, b, c, d;
int main() {
cin >> a >> b >> c >> d;
while (a && c) {
c -= b;
if (c == 0)
break;
a -= d;
if (a == 0)
break;
}
if (a)
cout << "Yes" << endl;
else
cout << "No" << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
long long a, b, c, d;
int main() {
cin >> a >> b >> c >> d;
if ((c + b - 1) / b <= (a + d - 1) / d)
cout << "Yes" << endl;
else
cout << "No" << endl;
return 0;
} | replace | 7 | 16 | 7 | 8 | TLE | |
p02700 | Python | Time Limit Exceeded | A, B, C, D = list(map(int, input().split()))
while A and C:
A -= D
C -= B
if C <= 0:
print("Yes")
elif A <= 0:
print("No")
| A, B, C, D = list(map(int, input().split()))
t1 = (A + D - 1) // D
t2 = (C + B - 1) // B
print("Yes" if t2 <= t1 else "No")
| replace | 1 | 8 | 1 | 4 | TLE | |
p02701 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
int n;
cin >> n;
vector<string> s;
rep(i, n) cin >> s[i];
set<string> a;
rep(i, n) a.insert(s[i]);
int ans = a.size();
cout << ans << endl;
} | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
int n;
cin >> n;
vector<string> s(n);
rep(i, n) cin >> s[i];
set<string> a;
rep(i, n) a.insert(s[i]);
int ans = a.size();
cout << ans << endl;
}
| replace | 7 | 8 | 7 | 8 | -11 | |
p02701 | C++ | Runtime Error | #include <algorithm>
#include <cstring>
#include <iostream>
#include <set>
#include <vector>
#define MAX_N 100000
using namespace std;
long long N;
string S[MAX_N];
set<string> gift;
int main() {
cin >> N;
for (int i = 0; i < N; i++) {
cin >> S[i];
gift.insert(S[i]);
}
cout << gift.size();
return 0... | #include <algorithm>
#include <cstring>
#include <iostream>
#include <set>
#include <vector>
#define MAX_N 200000
using namespace std;
long long N;
string S[MAX_N];
set<string> gift;
int main() {
cin >> N;
for (int i = 0; i < N; i++) {
cin >> S[i];
gift.insert(S[i]);
}
cout << gift.size();
return 0... | replace | 5 | 6 | 5 | 6 | 0 | |
p02701 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <map>
#include <memory.h>
#include <string>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
map<string, int> t;
for (int i = 0; i < n; i++) {
string s;
cin >> s;
t[s];
};
cout << t.size() << endl;
return 1;
} | #include <algorithm>
#include <iostream>
#include <map>
#include <memory.h>
#include <string>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
map<string, int> t;
for (int i = 0; i < n; i++) {
string s;
cin >> s;
t[s];
};
cout << t.size() << endl;
return 0;
}
| replace | 23 | 24 | 23 | 24 | 1 | |
p02701 | C++ | Time Limit Exceeded | #include <algorithm>
#include <functional>
#include <iostream>
#include <iterator>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
int main(void) {
int n;
cin >> n;
vector<size_t> v(20000);
int sum = 0;
unordered_map<size_t, int> um;
for (int i = 0; i < n; i++) {
str... | #include <algorithm>
#include <functional>
#include <iostream>
#include <iterator>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
int main(void) {
int n;
cin >> n;
vector<size_t> v(20000);
int sum = 0;
unordered_map<size_t, int> um;
for (int i = 0; i < n; i++) {
str... | replace | 27 | 29 | 27 | 28 | TLE | |
p02701 | C++ | Runtime Error | #include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
typedef long long ll;
#define inf 0x3f3f3f3f
const int maxn = 2e5 + 100;
int tree[maxn][30];
bool flag[maxn];
int tot;
void insertt(string s) {
int len = s.size();
int root = ... | #include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
typedef long long ll;
#define inf 0x3f3f3f3f
const int maxn = 5e6 + 100;
int tree[maxn][30];
bool flag[maxn];
int tot;
void insertt(string s) {
int len = s.size();
int root = ... | replace | 9 | 10 | 9 | 10 | 0 | |
p02701 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <math.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int N, ans;
ans = 1;
cin >> N;
vector<string> vec(N);
for (int i = 0; i < N; i++) {
cin >> vec.at(i);
}
so... | #include <algorithm>
#include <iostream>
#include <math.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int N, ans;
ans = 1;
cin >> N;
vector<string> vec(N);
for (int i = 0; i < N; i++) {
cin >> vec.at(i);
}
so... | replace | 22 | 23 | 22 | 23 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): vector::_M_range_check: __n (which is 3) >= this->size() (which is 3)
|
p02701 | Python | Runtime Error | import collections
n = int(input())
a = [list(input() for i in range(n))]
b = collections.Counter(a)
print(len(b))
| import collections
n = int(input())
a = [input() for i in range(n)]
b = collections.Counter(a)
print(len(b))
| replace | 3 | 4 | 3 | 4 | TypeError: unhashable type: 'list' | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02701/Python/s293744193.py", line 5, in <module>
b = collections.Counter(a)
File "/usr/lib/python3.10/collections/__init__.py", line 577, in __init__
self.update(iterable, **kwds)
File "/usr/lib/python3... |
p02701 | Python | Runtime Error | n = int(input)
lis = [input() for i in range(n)]
print(len(set(lis)))
| n = int(input())
lis = [input() for i in range(n)]
print(len(set(lis)))
| replace | 0 | 1 | 0 | 1 | TypeError: int() argument must be a string, a bytes-like object or a real number, not 'builtin_function_or_method' | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02701/Python/s310001383.py", line 1, in <module>
n = int(input)
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'builtin_function_or_method'
|
p02701 | Python | Runtime Error | N = input()
List = list(input() for i in range(N))
print(len(set(List)))
| N = int(input())
List = list(input() for i in range(N))
print(len(set(List)))
| replace | 0 | 1 | 0 | 1 | TypeError: 'str' object cannot be interpreted as an integer | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02701/Python/s903293880.py", line 2, in <module>
List = list(input() for i in range(N))
TypeError: 'str' object cannot be interpreted as an integer
|
p02701 | Python | Runtime Error | n = int(input())
s = (input() for _ in range(n))
print(len(s))
| n = int(input())
s = {input() for _ in range(n)}
print(len(s))
| replace | 1 | 2 | 1 | 2 | TypeError: object of type 'generator' has no len() | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02701/Python/s709317664.py", line 3, in <module>
print(len(s))
TypeError: object of type 'generator' has no len()
|
p02701 | Python | Time Limit Exceeded | n = int(input())
ans = 0
u_l = []
for _ in range(n):
s = input()
if s not in u_l:
u_l.append(s)
ans += 1
print(ans)
| n = int(input())
l = [input() for _ in range(n)]
print(len(set(l)))
| replace | 2 | 10 | 2 | 4 | TLE | |
p02701 | Python | Time Limit Exceeded | import sys
def main():
readline = sys.stdin.readline
N = int(readline())
li = []
for _ in range(N):
S = readline()
if S not in li:
li.append(S)
print(len(li))
if __name__ == "__main__":
main()
| import sys
def main():
readline = sys.stdin.readline
N = int(readline())
se = set([readline() for _ in range(N)])
print(len(se))
if __name__ == "__main__":
main()
| replace | 6 | 12 | 6 | 8 | TLE | |
p02701 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define fi first
#define se second
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define rep1(i, n) for (int i = 1; i <= (int)(n); ++i)
#define rep11(i, n) for (int i = 1; i < (int)(n); ++i)
#define rep0(i, n) for (int i = 1; i <= (int)(n); ++i)... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define fi first
#define se second
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define rep1(i, n) for (int i = 1; i <= (int)(n); ++i)
#define rep11(i, n) for (int i = 1; i < (int)(n); ++i)
#define rep0(i, n) for (int i = 1; i <= (int)(n); ++i)... | replace | 28 | 29 | 28 | 31 | TLE | |
p02701 | Python | Runtime Error | n = int(input())
s = [int(input()) for _ in range(n)]
ans = set()
for i in s:
ans.add(i)
print(len(ans))
| n = int(input())
s = [input() for _ in range(n)]
ans = set()
for i in s:
ans.add(i)
print(len(ans))
| replace | 1 | 2 | 1 | 2 | ValueError: invalid literal for int() with base 10: 'apple' | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02701/Python/s962277082.py", line 2, in <module>
s = [int(input()) for _ in range(n)]
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02701/Python/s962277082.py", line 2, in <listcomp>
... |
p02701 | Python | Runtime Error | a = map(int, input().split())
s = list(map(int, input().split()))
print(len(set(s)))
| a = int(input())
s = [input() for i in range(a)]
print(len(set(s)))
| replace | 0 | 2 | 0 | 2 | ValueError: invalid literal for int() with base 10: 'apple' | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02701/Python/s227226698.py", line 2, in <module>
s = list(map(int, input().split()))
ValueError: invalid literal for int() with base 10: 'apple'
|
p02701 | Python | Runtime Error | import collections
N = int(input())
S = []
for i in range(N):
S.append(input())
c = collections.counter(S)
print(len(c))
| import collections
N = int(input())
S = []
for i in range(N):
S.append(input())
c = collections.Counter(S)
print(len(c))
| replace | 8 | 9 | 8 | 9 | AttributeError: module 'collections' has no attribute 'counter'. Did you mean: 'Counter'? | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02701/Python/s677938637.py", line 9, in <module>
c = collections.counter(S)
AttributeError: module 'collections' has no attribute 'counter'. Did you mean: 'Counter'?
|
p02701 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define all(v) v.begin(), v.end()
using in = int64_t;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define Yes cout << "Yes" << endl
#define No cout << "No" << endl
#define yes cout << "yes" << endl
#def... | #include <bits/stdc++.h>
using namespace std;
#define all(v) v.begin(), v.end()
using in = int64_t;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define Yes cout << "Yes" << endl
#define No cout << "No" << endl
#define yes cout << "yes" << endl
#def... | replace | 26 | 31 | 26 | 28 | -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)
|
p02701 | C++ | Runtime Error | #include <bits/stdc++.h>
#define LL long long
#define FOR(i, a, b) for (int i = a; i <= b; ++i)
using namespace std;
const int mn = 1e5 + 7;
string s[mn], t;
int main() {
int n, ans = 0;
scanf("%d", &n);
FOR(i, 1, n) cin >> s[i];
sort(s + 1, s + n + 1);
FOR(i, 1, n) if (s[i] != t) t = s[i], ans++;
cout <<... | #include <bits/stdc++.h>
#define LL long long
#define FOR(i, a, b) for (int i = a; i <= b; ++i)
using namespace std;
const int mn = 2e5 + 7;
string s[mn], t;
int main() {
int n, ans = 0;
scanf("%d", &n);
FOR(i, 1, n) cin >> s[i];
sort(s + 1, s + n + 1);
FOR(i, 1, n) if (s[i] != t) t = s[i], ans++;
cout <<... | replace | 5 | 6 | 5 | 6 | 0 | |
p02701 | C++ | Runtime Error | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <cfloat>
#include <complex>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include... | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <cfloat>
#include <complex>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include... | replace | 40 | 41 | 40 | 41 | 0 | |
p02701 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
typedef long long LL;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
template <typename Container>
bool include(const Container &c, const typename Container::value_type &v) {
return (c.end() != std::find(c.begin(), c.end(), v));
}
using namespace std;
int main() {
int N;
cin >> ... | #include <bits/stdc++.h>
typedef long long LL;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
template <typename Container>
bool include(const Container &c, const typename Container::value_type &v) {
return (c.end() != std::find(c.begin(), c.end(), v));
}
using namespace std;
int main() {
int N;
cin >> ... | replace | 17 | 26 | 17 | 23 | TLE | |
p02701 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
vector<string> s(n);
int count = 1;
for (int i = 0; i < n; i++) {
cin >> s[n];
}
sort(s.begin(), s.end());
for (int i = 0; i < n - 1; i++) {
if (s[i] != s[i + 1]) {
count++;
... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
vector<string> s(n);
int count = 1;
for (int i = 0; i < n; i++) {
cin >> s[i];
}
sort(s.begin(), s.end());
for (int i = 0; i < n - 1; i++) {
if (s[i] != s[i + 1]) {
count++;
... | replace | 13 | 14 | 13 | 14 | -11 | |
p02701 | C++ | Runtime Error | #include <iostream>
#include <string>
#include <unordered_map>
using namespace std;
int main() {
unordered_map<string, int> m;
int n;
string s;
std::cin >> n;
while (n > 0) {
std::cin >> s;
if (m.count(s)) {
m[s] += 1;
} else {
m.insert(pair<string, int>(s, 1));
}
n--;
}
re... | #include <iostream>
#include <string>
#include <unordered_map>
using namespace std;
int main() {
unordered_map<string, int> m;
int n;
string s;
std::cin >> n;
while (n > 0) {
std::cin >> s;
if (m.count(s)) {
m[s] += 1;
} else {
m.insert(pair<string, int>(s, 1));
}
n--;
}
co... | replace | 18 | 19 | 18 | 20 | 2 | |
p02701 | Python | Runtime Error | N = int(input())
S = []
while True:
Si = input()
if Si:
S.append(Si)
else:
break
g = S[:N]
print(g)
| n = int(input())
s = set(input() for _ in range(n))
print(len(s))
| replace | 0 | 10 | 0 | 3 | EOFError: EOF when reading a line | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02701/Python/s240465038.py", line 4, in <module>
Si = input()
EOFError: EOF when reading a line
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.