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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p02686 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ss second
#define ff first
#define all(x) x.begin(), x.end()
#define DEBUG
using namespace std;
using ll = long long;
using pii = pair<ll, ll>;
const int oo = 1e9 + 7;
const ll mod = 998244353, maxn = 200200;
const double PI = acos(-1);
bool comp(pii a, pii b) { return a.ss > b.ss; }... | #include <bits/stdc++.h>
#define ss second
#define ff first
#define all(x) x.begin(), x.end()
#define DEBUG
using namespace std;
using ll = long long;
using pii = pair<ll, ll>;
const int oo = 1e9 + 7;
const ll mod = 998244353, maxn = 200200;
const double PI = acos(-1);
bool comp(pii a, pii b) { return a.ss > b.ss; }... | replace | 29 | 30 | 29 | 30 | 0 | |
p02686 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define FAST \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
#define time_taken_start int begtime = clock();
#define time_taken_end ... | #include <bits/stdc++.h>
using namespace std;
#define FAST \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
#define time_taken_start int begtime = clock();
#define time_taken_end ... | replace | 37 | 38 | 37 | 38 | 0 |
Time elapsed: 0 ms
|
p02686 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 10;
struct X {
int y, z;
int id, tp;
} s[maxn];
int n;
char t[maxn];
bool cmp(const X &a, const X &b) {
if (a.tp != b.tp)
return a.tp < b.tp;
if (a.tp == 2) {
if (a.y != b.y)
return a.y < b.y;
return a.z > b.z;
} else if... | #include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 10;
struct X {
int y, z;
int id, tp;
} s[maxn];
int n;
char t[maxn];
bool cmp(const X &a, const X &b) {
if (a.tp != b.tp)
return a.tp < b.tp;
if (a.tp == 2) {
if (a.y != b.y)
return a.y < b.y;
return a.z > b.z;
} else if... | replace | 3 | 4 | 3 | 4 | 0 | |
p02686 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
#define sz(x) int(x.size())
using namespace std;
const int maxn = 1100;
string a[maxn];
int arr[maxn], n;
vector<pair<int, int>> v;
int main() {
cin >> n;
int minind = -1, maxind = -1;
int minbal = INT_MAX, maxbal = INT_MIN... | #include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
#define sz(x) int(x.size())
using namespace std;
const int maxn = 1000100;
string a[maxn];
int arr[maxn], n;
vector<pair<int, int>> v;
int main() {
cin >> n;
int minind = -1, maxind = -1;
int minbal = INT_MAX, maxbal = INT_... | replace | 6 | 7 | 6 | 7 | 0 | |
p02686 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
struct num {
int a;
int b;
bool operator<(const num &right) const {
if (b - a >= 0) {
if (right.b - right.a <= 0)
return true;
if (a == right.a)
return b > right.b;
return a <... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
struct num {
int a;
int b;
bool operator<(const num &right) const {
if (b - a >= 0) {
if (right.b - right.a < 0)
return true;
if (a == right.a)
return b > right.b;
return a < ... | replace | 10 | 11 | 10 | 11 | 0 | |
p02686 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
const int N = 1e6 + 10;
#define fi first
#define se second
#define pb push_back
#define mp make_pair
int n;
char a[N];
int l[N], r[N], cnt, vis[N], f[N];
char q[N];
int main() {
ios::sync_with_stdio(false);
cin >> n;
for (int i = 1; i <= n; i++) ... | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
const int N = 1e6 + 10;
#define fi first
#define se second
#define pb push_back
#define mp make_pair
int n;
char a[N];
int l[N], r[N], cnt, vis[N], f[N];
char q[N];
int main() {
ios::sync_with_stdio(false);
cin >> n;
for (int i = 1; i <= n; i++) ... | replace | 46 | 47 | 46 | 47 | 0 | |
p02686 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <n... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <n... | replace | 67 | 68 | 67 | 68 | 0 | |
p02686 | C++ | Runtime Error | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
string S[100000];
bool balanced(string s) {
... | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
string S[1000000];
bool balanced(string s) {
... | replace | 15 | 16 | 15 | 16 | 0 | |
p02686 | C++ | Runtime Error | #include <iostream>
#include <set>
#include <string>
#include <utility>
using namespace std;
string s[200010];
int a[200010], b[200100];
multiset<pair<int, int>> s1, s2, s3;
int main() {
int i, j, n;
cin >> n;
for (i = 0; i < n; i++) {
cin >> s[i];
int cnt = 0;
b[i] = 0;
for (j = 0; j < s[i].size(... | #include <iostream>
#include <set>
#include <string>
#include <utility>
using namespace std;
string s[1000010];
int a[1000010], b[1000100];
multiset<pair<int, int>> s1, s2, s3;
int main() {
int i, j, n;
cin >> n;
for (i = 0; i < n; i++) {
cin >> s[i];
int cnt = 0;
b[i] = 0;
for (j = 0; j < s[i].si... | replace | 5 | 7 | 5 | 7 | 0 | |
p02686 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#define maxn 1000010
using namespace std;
char s[maxn];
struct node {
int l, r;
} a[maxn];
int tot;
int cmp(node a, node b) { a.l - a.r > b.l - b.r; }
int main() {
int n, i, j, l, r, ln, rn;
ln = rn = 0;
scanf("%d", &n);
for (i = 1; i <= n; i++) {
l = r = 0;
scan... | #include <algorithm>
#include <cstdio>
#define maxn 1000010
using namespace std;
char s[maxn];
struct node {
int l, r;
} a[maxn];
int tot;
int cmp(node a, node b) { return a.l - a.r > b.l - b.r; }
int main() {
int n, i, j, l, r, ln, rn;
ln = rn = 0;
scanf("%d", &n);
for (i = 1; i <= n; i++) {
l = r = 0;
... | replace | 9 | 10 | 9 | 10 | 0 | |
p02686 | C++ | Runtime Error | #include "bits/stdc++.h"
#define hhh cerr << "hhh" << endl
#define see(x) cerr << (#x) << '=' << (x) << endl
using namespace std;
typedef long long ll;
typedef pair<int, int> pr;
inline int read() {
int x = 0, f = 1;
char c = getchar();
while (c != '-' && (c < '0' || c > '9'))
c = getchar();
if (c == '-')
... | #include "bits/stdc++.h"
#define hhh cerr << "hhh" << endl
#define see(x) cerr << (#x) << '=' << (x) << endl
using namespace std;
typedef long long ll;
typedef pair<int, int> pr;
inline int read() {
int x = 0, f = 1;
char c = getchar();
while (c != '-' && (c < '0' || c > '9'))
c = getchar();
if (c == '-')
... | replace | 30 | 31 | 30 | 31 | 0 | |
p02686 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <ctime>
#include <deque>
#include <float.h>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include... | #include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <ctime>
#include <deque>
#include <float.h>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include... | replace | 186 | 187 | 186 | 187 | 0 | |
p02686 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
struct node {
int l, r, i;
bool operator<(const node &x) const {
if ((l >= r) == (x.l >= x.r)) {
if ((l >= r))
return r < x.r;
return l > x.l;
}
return l - r > x.l - x.r;
}
} arr[200007], brr[200007];
int main() {
int n;
cin >> n;
... | #include <bits/stdc++.h>
using namespace std;
struct node {
int l, r, i;
bool operator<(const node &x) const {
if ((l >= r) == (x.l >= x.r)) {
if ((l >= r))
return r < x.r;
return l > x.l;
}
return l - r > x.l - x.r;
}
} arr[2000007], brr[2000007];
int main() {
int n;
cin >> n;... | replace | 12 | 13 | 12 | 13 | 0 | |
p02686 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <climits>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include ... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <climits>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include ... | replace | 58 | 59 | 58 | 59 | 0 | |
p02686 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define REP(i, m, n) for (int i = (m); i < (int)(n); i++)
#define RREP(i, m, n) for (int i = (int)(n - 1); i >= m; i--)
#define rep(i, n) REP(i, 0, n)
#define rrep(i, n) RREP(i, 0, n)
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define fi... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, m, n) for (int i = (m); i < (int)(n); i++)
#define RREP(i, m, n) for (int i = (int)(n - 1); i >= m; i--)
#define rep(i, n) REP(i, 0, n)
#define rrep(i, n) RREP(i, 0, n)
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define fi... | replace | 95 | 104 | 95 | 98 | 0 | |
p02686 | C++ | Runtime Error | #include <bits/stdc++.h>
#define pii pair<int, int>
using namespace std;
const int MAXN = 1e6 + 7;
const int INF = 1e9;
vector<pii> vec;
char s[MAXN];
stack<char> stk;
int N, a[MAXN], v[MAXN];
#define lson (rt << 1)
#define rson (rt << 1 | 1)
struct node {
int val, pos;
} T[MAXN << 2];
node merge(node &x, node &y) {... | #include <bits/stdc++.h>
#define pii pair<int, int>
using namespace std;
const int MAXN = 1e6 + 7;
const int INF = 1e9;
vector<pii> vec;
char s[MAXN];
stack<char> stk;
int N, a[MAXN], v[MAXN];
#define lson (rt << 1)
#define rson (rt << 1 | 1)
struct node {
int val, pos;
} T[MAXN << 2];
node merge(node &x, node &y) {... | insert | 98 | 98 | 98 | 102 | 0 | |
p02686 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
string shorten(const string &s) {
string res;
for (const char i : s) {
if (res.back() == '(' && i == ')')
res.pop_back();
else
res.push_back(i);
}
return res;
}
struct brace {
int left;
int right;
brace... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
string shorten(const string &s) {
string res;
for (const char i : s) {
if (res.back() == '(' && i == ')')
res.pop_back();
else
res.push_back(i);
}
return res;
}
struct brace {
int left;
int right;
brace... | insert | 62 | 62 | 62 | 64 | TLE | |
p02686 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ln '\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, fm, to) for (int i = fm; i <= to; ++i)
#define foreach(i, dat) \
f... | #include <bits/stdc++.h>
#define ln '\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, fm, to) for (int i = fm; i <= to; ++i)
#define foreach(i, dat) \
f... | replace | 14 | 15 | 14 | 15 | 0 | |
p02687 | C++ | Runtime Error | #include <cstring>
#include <iostream>
using namespace std;
int main() {
char a[3];
cin >> a[1] >> a[2] >> a[3];
if (a[2] == 'B')
cout << "ARC";
else
cout << "ABC";
return 0;
}
| #include <cstring>
#include <iostream>
using namespace std;
int main() {
char a[3];
cin >> a[0] >> a[1] >> a[2];
if (a[1] == 'B')
cout << "ARC";
else
cout << "ABC";
return 0;
}
| replace | 6 | 8 | 6 | 8 | -6 | *** stack smashing detected ***: terminated
|
p02687 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define reps(i, n) for (int i = 1; i < (int)(n); i++)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--)
#define rreps(i, n) for (int i = ((int)(n)-1); i > 0; i--)
#define ALL(x) (x).begin(), (x).end()
#define SZ(x) ((int)(x).size())
... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define reps(i, n) for (int i = 1; i < (int)(n); i++)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--)
#define rreps(i, n) for (int i = ((int)(n)-1); i > 0; i--)
#define ALL(x) (x).begin(), (x).end()
#define SZ(x) ((int)(x).size())
... | replace | 27 | 28 | 27 | 28 | -11 | |
p02687 | C++ | Runtime Error | #include <stdio.h>
int main() {
char contest;
scanf("%s", &contest);
if (contest = 'B') {
printf("ARC");
} else if (contest = 'R') {
printf("ABC");
}
return 0;
} | #include <stdio.h>
int main() {
char S[6];
scanf("%s", &S);
if (S[1] == 'B')
printf("ARC\n");
else
printf("ABC\n");
return 0;
} | replace | 3 | 11 | 3 | 9 | -6 | *** stack smashing detected ***: terminated
|
p02687 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, k;
cin >> k;
cin >> a >> b;
int max = b / k;
bool flag = false;
for (int i = 1; i <= max + 2; i++) {
if (i * k <= b && i * k >= a)
flag = true;
}
if (flag)
cout << "OK" << endl;
else
cout << "NG" << endl;
return 0... | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
if (s == "ABC")
cout << "ARC" << endl;
else if (s == "ARC")
cout << "ABC" << endl;
}
| replace | 3 | 17 | 3 | 9 | -8 | |
p02687 | C++ | Runtime Error | #include <cstdio>
#include <cstdlib>
#include <iostream>
#include <string>
int main(int argc, char **argv) {
std::string S = argv[1];
if (S == "ARC")
std::cout << "ABC" << std::endl;
else
std::cout << "ARC" << std::endl;
return 0;
} | #include <cstdio>
#include <cstdlib>
#include <iostream>
#include <string>
int main(int argc, char **argv) {
std::string S;
std::cin >> S;
if (S == "ARC")
std::cout << "ABC" << std::endl;
else
std::cout << "ARC" << std::endl;
return 0;
}
| replace | 5 | 6 | 5 | 7 | -6 | terminate called after throwing an instance of 'std::logic_error'
what(): basic_string: construction from null is not valid
|
p02687 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define fast() \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define ll long... | #include <bits/stdc++.h>
using namespace std;
#define fast() \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define ll long... | replace | 46 | 57 | 46 | 52 | 0 | |
p02687 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <cmath>
#include <math.h>
using namespace std;
#define ll long long
string replaceOtherStr(std::string &replacedStr, std::string from,
std::string to) {
const unsigned int pos = replacedStr.find(from);
const int len = from.length();
if (pos == std::strin... | #include <bits/stdc++.h>
#include <cmath>
#include <math.h>
using namespace std;
#define ll long long
string replaceOtherStr(std::string &replacedStr, std::string from,
std::string to) {
const unsigned int pos = replacedStr.find(from);
const int len = from.length();
if (pos == std::strin... | replace | 23 | 24 | 23 | 27 | 0 | |
p02687 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
char a[5];
cin >> a[5];
if (a[1] == 'B')
cout << "ARC";
else
cout << "ABC";
return 0;
}
| #include <iostream>
using namespace std;
int main() {
char a[10];
cin >> a;
if (a[0] == 'A' && a[1] == 'B' && a[2] == 'C')
cout << "ARC" << endl;
else if (a[0] == 'A' && a[1] == 'R' && a[2] == 'C')
cout << "ABC" << endl;
return 0;
}
| replace | 3 | 9 | 3 | 9 | -6 | *** stack smashing detected ***: terminated
|
p02687 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
#define rep(i, begin, end) \
for (__typeof(end) i = (begin) - ((begin) > (end)); \
i != (end) - ((begin) > (end)); \
i += 1 - 2 * ((begin) > ... | #include <bits/stdc++.h>
#define ll long long
#define rep(i, begin, end) \
for (__typeof(end) i = (begin) - ((begin) > (end)); \
i != (end) - ((begin) > (end)); \
i += 1 - 2 * ((begin) > ... | replace | 12 | 21 | 12 | 15 | 0 | |
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define INT(...) \
int __VA_ARGS__; \
in(__VA_ARGS__)
#define LL(...) ... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define INT(...) \
int __VA_ARGS__; \
in(__VA_ARGS__)
#define LL(...) ... | replace | 115 | 116 | 115 | 116 | 0 | |
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
int d;
int e;
int c;
cin >> N >> K;
vector<int> a(N);
for (int j = 0; j < K; j++) {
a.at(j) = 0;
}
for (int l = 0; l < K; l++) {
cin >> d;
for (int i = 0; i < d; i++) {
cin >> e;
a.at(e - 1) = 1;
}
}
f... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
int d;
int e;
int c;
cin >> N >> K;
vector<int> a(N);
for (int j = 0; j < N; j++) {
a.at(j) = 0;
}
for (int l = 0; l < K; l++) {
cin >> d;
for (int i = 0; i < d; i++) {
cin >> e;
a.at(e - 1) = 1;
}
}
f... | replace | 9 | 10 | 9 | 10 | 0 | |
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
vector<int> vec(n);
int d;
for (int i = 0; i < k; ++i) {
cin >> d;
if (d != 0) {
vector<int> a(d);
for (int j = 0; j < d; ++j) {
cin >> a[i];
vec[a[i] - 1]++;
}
}
}
int count... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
vector<int> vec(n);
int d;
for (int i = 0; i < k; ++i) {
cin >> d;
vector<int> a(d);
for (int j = 0; j < d; ++j) {
cin >> a[j];
vec[a[j] - 1]++;
}
}
int count = 0;
for (int i = 0; i < n; ++i... | replace | 11 | 17 | 11 | 15 | 0 | |
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
// 型名省略
typedef long long ll;
typedef vector<long long> vl;
typedef vector<vector<long long>> vvl;
typedef vector<char> vc;
typedef vector<vector<char>> vvc;
typedef vector<string> vs;
// マクロ
#define rep(i, n) for (ll i = 0; i < (ll)n; i++)
#define rep2(i, x, n) for (ll i =... | #include <bits/stdc++.h>
using namespace std;
// 型名省略
typedef long long ll;
typedef vector<long long> vl;
typedef vector<vector<long long>> vvl;
typedef vector<char> vc;
typedef vector<vector<char>> vvc;
typedef vector<string> vs;
// マクロ
#define rep(i, n) for (ll i = 0; i < (ll)n; i++)
#define rep2(i, x, n) for (ll i =... | replace | 22 | 23 | 22 | 23 | 0 | |
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
int d;
int a;
vector<bool> S(N, true);
for (int i = 0; i < K; i++) {
cin >> d;
for (int i = 0; i < d; i++) {
cin >> a;
S.at(a) = false;
}
}
int count = 0;
for (int i = 0; i < N; i++) {
if (... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
int d;
int a;
vector<bool> S(N, true);
for (int i = 0; i < K; i++) {
cin >> d;
for (int i = 0; i < d; i++) {
cin >> a;
S.at(a - 1) = false;
}
}
int count = 0;
for (int i = 0; i < N; i++) {
... | replace | 13 | 14 | 13 | 14 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): vector<bool>::_M_range_check: __n (which is 3) >= this->size() (which is 3)
|
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
int d[K];
int A[N][N];
int have_bool[N];
for (int i = 0; i < N; i++) {
have_bool[i] = false;
}
for (int i = 0; i < K; ++i) {
cin >> d[i];
for (int j = 0; j < d[i]; ++j) {
cin >> A[i][j];
have_b... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
int d[K];
int A[K][N];
int have_bool[N];
for (int i = 0; i < N; i++) {
have_bool[i] = false;
}
for (int i = 0; i < K; ++i) {
cin >> d[i];
for (int j = 0; j < d[i]; ++j) {
cin >> A[i][j];
have_b... | replace | 7 | 8 | 7 | 8 | 0 | |
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
vector<int> sunuke(N);
for (int j = 0; j < K; j++) {
int d;
cin >> d;
for (int i = 0; i < d; i++) {
int A;
cin >> A;
sunuke.at(A) = 1;
}
}
int sum = 0;
for (int i = 0; i < N; i++) {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
vector<int> sunuke(N);
for (int j = 0; j < K; j++) {
int d;
cin >> d;
for (int i = 0; i < d; i++) {
int A;
cin >> A;
sunuke.at(A - 1) = 1;
}
}
int sum = 0;
for (int i = 0; i < N; i++... | replace | 17 | 18 | 17 | 18 | -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)
|
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define FOR(i, a, b) for (int i = (a); i <= (b); i++)
#define rep(i, n) for (int i = 0; i < (n); i++)
#define chmin(a, b) \
if ((a) > (b)) ... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define FOR(i, a, b) for (int i = (a); i <= (b); i++)
#define rep(i, n) for (int i = 0; i < (n); i++)
#define chmin(a, b) \
if ((a) > (b)) ... | replace | 42 | 43 | 42 | 43 | 0 | |
p02688 | C++ | Runtime Error | // in the name of ALLAH
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n, k;
cin >> n >> k;
set<int> s;
int d[n];
for (int i = 0; i < k; i++) {
cin >> d[i];
int a[d[i] + 1];
for (int j = 0; j < d[i]; j++) {
cin >> a[j];
s.insert(a[j]);
}
}
... | // in the name of ALLAH
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n, k;
cin >> n >> k;
set<int> s;
int d[k + 1];
for (int i = 0; i < k; i++) {
cin >> d[i];
int a[d[i] + 1];
for (int j = 0; j < d[i]; j++) {
cin >> a[j];
s.insert(a[j]);
}
... | replace | 8 | 9 | 8 | 9 | 0 | |
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
vector<int> A(N); // N人の子供を宣言
// どの子供がどれだけお菓子をもらったかを入力
for (int i = 0; i < K; i++) {
int di; // i番目のお菓子をもってる人数
cin >> di;
int Ai; // i番目のお菓子を持ってる人の番号
for (int j = 0; j < di; j++) {
cin >> Ai; // お菓子を持... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
vector<int> A(N); // N人の子供を宣言
// どの子供がどれだけお菓子をもらったかを入力
for (int i = 0; i < K; i++) {
int di; // i番目のお菓子をもってる人数
cin >> di;
int Ai; // i番目のお菓子を持ってる人の番号
for (int j = 0; j < di; j++) {
cin >> Ai; // お... | replace | 12 | 14 | 12 | 14 | -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)
|
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int N, K;
int d, x;
int count = 0;
cin >> N >> K;
vector<int> sunuke(N);
for (int i = 0; i < K; i++) {
cin >> d;
for (int j = 0; j < d; j++) {
cin >> x;
sunuke.at(x - 1) = 1;
}
}
for (int i = 0; i < K; i++) {
if... | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int N, K;
int d, x;
int count = 0;
cin >> N >> K;
vector<int> sunuke(N);
for (int i = 0; i < K; i++) {
cin >> d;
for (int j = 0; j < d; j++) {
cin >> x;
sunuke.at(x - 1) = 1;
}
}
for (int i = 0; i < N; i++) {
if... | replace | 17 | 18 | 17 | 18 | 0 | |
p02688 | C++ | Runtime Error | #include <iostream>
#include <string>
using namespace std;
int main(void) {
int n, k, p, a, ni = 0;
string s;
cin >> n >> k;
for (int i = 0; i < n; i++) {
s[i] = 0;
}
for (int j = 0; j < k; j++) {
cin >> p;
for (int z = 0; z < p; z++) {
cin >> a;
s[a - 1] = 1;
}
}
for (... | #include <iostream>
#include <string>
using namespace std;
int main(void) {
int n, k, p, a, ni = 0;
int s[100];
cin >> n >> k;
for (int i = 0; i < n; i++) {
s[i] = 0;
}
for (int j = 0; j < k; j++) {
cin >> p;
for (int z = 0; z < p; z++) {
cin >> a;
s[a - 1] = 1;
}
}
for... | replace | 6 | 7 | 6 | 7 | 0 | |
p02688 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <iostream>
#include <iostream>
#include <map>
#include <stdio.h>
#include <stdlib.h>
#include <vector>
#define INF 100000000000000
using namespace std;
typedef long long llong;
// int isalpha(char ch): ch がアルファベットなら true を返す
// int isdigit(char ch): ch が数字なら true を返す
// i... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <iostream>
#include <map>
#include <stdio.h>
#include <stdlib.h>
#include <vector>
#define INF 100000000000000
using namespace std;
typedef long long llong;
// int isalpha(char ch): ch がアルファベットなら true を返す
// int isdigit(char ch): ch が数字なら true を返す
// i... | replace | 58 | 59 | 58 | 59 | 0 | |
p02688 | 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, k;
cin >> n >> k;
int d, a;
int sum = 0;
vector<int> flag(n, 0);
rep(i, k) {
cin >> d;
rep(i, d) {
cin >> a;
flag.at(a - 1) = 1;
}
}
rep(i, k) {
// cou... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
int n, k;
cin >> n >> k;
int d, a;
int sum = 0;
vector<int> flag(n, 0);
rep(i, k) {
cin >> d;
rep(i, d) {
cin >> a;
flag.at(a - 1) = 1;
}
}
rep(i, n) {
// cou... | replace | 22 | 23 | 22 | 23 | 0 | |
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K, x = 0;
cin >> N >> K;
vector<vector<int>> sunuke(N, vector<int>(0));
for (int i = 0; i < K; i++) {
int d;
cin >> d;
for (int j = 0; j < d; j++) {
int A;
cin >> A;
sunuke.at(A).push_back(i);
}
}
for (int i... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K, x = 0;
cin >> N >> K;
vector<vector<int>> sunuke(N, vector<int>(0));
for (int i = 0; i < K; i++) {
int d;
cin >> d;
for (int j = 0; j < d; j++) {
int A;
cin >> A;
sunuke.at(A - 1).push_back(i);
}
}
for (i... | replace | 13 | 14 | 13 | 14 | -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)
|
p02688 | C++ | Runtime Error | #include <algorithm>
#include <bits/stdc++.h>
using namespace std;
int main() {
int c = 0, i = 0, k, d, n = 0, x, s[1000];
cin >> x >> k;
while (k--) {
cin >> d;
n += d;
while (d--) {
cin >> s[i++];
}
}
sort(s, s + n);
c = 0;
for (i = 0; i < n; i++) {
if (s[i] != s[i + 1])
... | #include <algorithm>
#include <bits/stdc++.h>
using namespace std;
int main() {
int c = 0, i = 0, k, d, n = 0, x, s[10010];
cin >> x >> k;
while (k--) {
cin >> d;
n += d;
while (d--) {
cin >> s[i++];
}
}
sort(s, s + n);
c = 0;
for (i = 0; i < n; i++) {
if (s[i] != s[i + 1])
... | replace | 4 | 5 | 4 | 5 | 0 | |
p02688 | C++ | Time Limit Exceeded |
// .----------------. .----------------. .----------------.
// .----------------. .----------------. .----------------.
// .----------------. .----------------. .----------------.
// | .--------------. || .--------------. || .--------------. ||
// .--------------. || .--------------. || .--------------. ... |
// .----------------. .----------------. .----------------.
// .----------------. .----------------. .----------------.
// .----------------. .----------------. .----------------.
// | .--------------. || .--------------. || .--------------. ||
// .--------------. || .--------------. || .--------------. ... | replace | 75 | 76 | 75 | 76 | TLE | |
p02688 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int m, n, i, j, x, y, g;
bool f[101];
int main() {
cin >> m >> n;
for (i = 1; i <= n; i++) {
cin >> x;
for (i = j = 1; j <= x; j++) {
cin >> y;
f[y] = 1;
}
}
for (i = 1; i <= m; i++)
if (f[i] == 0)
g++;
cout << g;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int m, n, i, j, x, y, g;
bool f[101];
int main() {
cin >> m >> n;
for (i = 1; i <= n; i++) {
cin >> x;
for (j = 1; j <= x; j++) {
cin >> y;
f[y] = 1;
}
}
for (i = 1; i <= m; i++)
if (f[i] == 0)
g++;
cout << g;
return 0;
}
| replace | 8 | 9 | 8 | 9 | TLE | |
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
vector<int> a(n);
vector<int> d(k);
for (int i = 0; i < n + 1; i++)
a[i] = 0;
for (int i = 0; i < k; i++) {
cin >> d[i];
for (int j = 0; j < d[i]; j++) {
int x;
cin >> x;
a[x]++;
}
}
in... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
vector<int> a(n + 1);
vector<int> d(k);
for (int i = 0; i < n + 1; i++)
a[i] = 0;
for (int i = 0; i < k; i++) {
cin >> d[i];
for (int j = 0; j < d[i]; j++) {
int x;
cin >> x;
a[x]++;
}
}
... | replace | 6 | 7 | 6 | 7 | 0 | |
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
int n, k;
cin >> n >> k;
vector<int> have(n);
vector<int> d(k);
rep(i, k) {
int a;
cin >> a;
rep(j, a) {
int b;
cin >> b;
ha... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
int n, k;
cin >> n >> k;
vector<int> have(n);
vector<int> d(k);
rep(i, k) {
int a;
cin >> a;
rep(j, a) {
int b;
cin >> b;
ha... | replace | 17 | 18 | 17 | 18 | -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)
|
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
bitset<100> A;
for (int i = 0; i < K; i++) {
int d;
cin >> d;
for (int j = 0; j < d; j++) {
int k;
cin >> k;
A.set(k);
}
}
cout << N - A.count() << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
bitset<100> A;
for (int i = 0; i < K; i++) {
int d;
cin >> d;
for (int j = 0; j < d; j++) {
int k;
cin >> k;
A.set(k - 1);
}
}
cout << N - A.count() << endl;
} | replace | 13 | 14 | 13 | 14 | 0 | |
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define repe(i, n) for (int i = 1; i <= (int)(n); ++i)
#define rep_bit(n) for (int bit = 0; bit < (1 << n); ++bit)
#define ll long long
using namespace std;
typedef vector<vector<int>> Graph;
int main() {
int N, K;
cin >> N >> K;
vect... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define repe(i, n) for (int i = 1; i <= (int)(n); ++i)
#define rep_bit(n) for (int bit = 0; bit < (1 << n); ++bit)
#define ll long long
using namespace std;
typedef vector<vector<int>> Graph;
int main() {
int N, K;
cin >> N >> K;
vect... | replace | 19 | 20 | 19 | 20 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): vector<bool>::_M_range_check: __n (which is 3) >= this->size() (which is 3)
|
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep0(i, n) for (i = 0; i < n; i++)
#define rep1(i, n) for (i = 1; i <= n; i++)
#define test(a) cout << "*" << a << endl
#define ll long long
int main() {
int n, k;
int d[100];
int A[100][100];
int i, j;
bool human[101] = {false};
int humanNo = 0;
cin ... | #include <bits/stdc++.h>
using namespace std;
#define rep0(i, n) for (i = 0; i < n; i++)
#define rep1(i, n) for (i = 1; i <= n; i++)
#define test(a) cout << "*" << a << endl
#define ll long long
int main() {
int n, k;
int d[101];
int A[101][101];
int i, j;
bool human[101] = {false};
int humanNo = 0;
cin ... | replace | 8 | 10 | 8 | 10 | 0 | |
p02688 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
int index = 0;
int p = k * (k + 1) / 2;
int arr[p];
while (k--) {
int s;
cin >> s;
for (int i = 0; i < s; i++) {
cin >> arr[index];
index++;
}
}
sort(arr, arr + index);
int... | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
int index = 0;
int arr[10000];
while (k--) {
int s;
cin >> s;
for (int i = 0; i < s; i++) {
cin >> arr[index];
index++;
}
}
sort(arr, arr + index);
int count = 1;
for (int... | replace | 7 | 9 | 7 | 9 | 0 | |
p02688 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
vector<vector<int>> vec(K, vector<int>(N, 0));
// おかしを持っているかどうかに印を付ける//
for (int i = 0; i < K; i++) {
int T; // Tは持ってる人間の数、i番目のおかしの数//
cin >> T;
for (int j = 0; j < T; j++) {
int f; // fが持ってる人間の番号//
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
vector<vector<int>> vec(K, vector<int>(N, 0));
// おかしを持っているかどうかに印を付ける//
for (int i = 0; i < K; i++) {
int T; // Tは持ってる人間の数、i番目のおかしの数//
cin >> T;
for (int j = 0; j < T; j++) {
int f; // fが持ってる人間の番号//
... | replace | 25 | 26 | 25 | 26 | TLE | |
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define FAST \
ios_base ::sync_with_stdio(false); \
cin.tie(NULL);
int main() {
FAST;
int N, K, d, A;
cin >> N >> K;
vector<int> X(N, 1);
for (int i = ... | #include <bits/stdc++.h>
using namespace std;
#define FAST \
ios_base ::sync_with_stdio(false); \
cin.tie(NULL);
int main() {
FAST;
int N, K, d, A;
cin >> N >> K;
vector<int> X(N, 1);
for (int i = ... | replace | 19 | 20 | 19 | 20 | 0 | |
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<ll, ll> p_ll;
typedef vector<pair<ll, ll>>
vec_p; // vector<pair<ll, ll>> pairs(n) ,pairs.at(i) = make_pair(i*i, i)
#define ture ture
#define flase false
#define falg flag
#define REP(i, x) for (ll i = 0; i < (ll)(x); i++)
#defi... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<ll, ll> p_ll;
typedef vector<pair<ll, ll>>
vec_p; // vector<pair<ll, ll>> pairs(n) ,pairs.at(i) = make_pair(i*i, i)
#define ture ture
#define flase false
#define falg flag
#define REP(i, x) for (ll i = 0; i < (ll)(x); i++)
#defi... | replace | 33 | 34 | 33 | 34 | 0 | |
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
int arr[n];
for (int i = 0; i < k; i++) {
arr[i] = 0;
}
for (int i = 0; i < k; i++) {
int n1;
cin >> n1;
for (int j = 0; j < n1; j++) {
int x;
cin >> x;
arr[x - 1]++;
}
}
int a... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
int arr[n];
for (int i = 0; i < n; i++) {
arr[i] = 0;
}
for (int i = 0; i < k; i++) {
int n1;
cin >> n1;
for (int j = 0; j < n1; j++) {
int x;
cin >> x;
arr[x - 1]++;
}
}
int a... | replace | 9 | 10 | 9 | 10 | 0 | |
p02688 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
int d[N];
int A[K][N];
for (int k = 0; k < K; k++)
for (int i = 0; i < N; i++)
A[k][i] = 0;
for (int k = 0; k < K; k++) {
cin >> d[k];
for (int i = 0; i < d[k]; i++) {
cin >> A[k][i];
}
}
bool... | #include <iostream>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
int d[K];
int A[K][N];
for (int k = 0; k < K; k++)
for (int i = 0; i < N; i++)
A[k][i] = 0;
for (int k = 0; k < K; k++) {
cin >> d[k];
for (int i = 0; i < d[k]; i++) {
cin >> A[k][i];
}
}
bool... | replace | 7 | 8 | 7 | 8 | 0 | |
p02688 | Python | Runtime Error | N, K = map(int, input().split())
have_snack = [0 for i in range(N)]
for k in range(K):
hito_len = int(input())
have_hito = map(int, input().split())
for hh in range(have_hito):
have_snack[hh - 1] = 1
print(have_snack.count(0))
| N, K = map(int, input().split())
have_snack = [0 for i in range(N)]
for k in range(K):
hito_len = int(input())
have_hito = list(map(int, input().split()))
for hh in have_hito:
have_snack[hh - 1] = 1
print(have_snack.count(0))
| replace | 6 | 8 | 6 | 8 | TypeError: 'map' object cannot be interpreted as an integer | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02688/Python/s059895942.py", line 8, in <module>
for hh in range(have_hito):
TypeError: 'map' object cannot be interpreted as an integer
|
p02688 | Python | Runtime Error | def main(n, a):
indexes = {i + 1 for i in range(n)}
reduced = set()
for s in a:
reduced |= s
return len(indexes - reduced)
if __name__ == "__main__":
S = input().rstrip()
N, K = map(int, input().split())
A = []
for _ in range(K):
input()
A.append(set(tuple(map(i... | def main(n, a):
indexes = {i + 1 for i in range(n)}
reduced = set()
for s in a:
reduced |= s
return len(indexes - reduced)
if __name__ == "__main__":
N, K = map(int, input().split())
A = []
for _ in range(K):
input()
A.append(set(tuple(map(int, input().split(" "))))... | delete | 9 | 10 | 9 | 9 | ValueError: not enough values to unpack (expected 2, got 1) | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02688/Python/s616845508.py", line 11, in <module>
N, K = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)
|
p02688 | Python | Runtime Error | N, K = map(int, input().split())
check = [0] * N
for i in range(K):
d_i = int(input())
A_i = map(int, input().split())
for j in A_i:
check[j] = 1
print(sum(1 for x in check if x == 0))
| N, K = map(int, input().split())
check = [0] * N
for i in range(K):
d_i = int(input())
A_i = map(int, input().split())
for j in A_i:
check[j - 1] = 1
print(sum(1 for x in check if x == 0))
| replace | 8 | 9 | 8 | 9 | IndexError: list assignment index out of range | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02688/Python/s661360641.py", line 9, in <module>
check[j] = 1
IndexError: list assignment index out of range
|
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
vector<int> vec(N, 0);
for (int i = 0; i < K; i++) {
int d;
cin >> d;
for (int j = 0; j < d; j++) {
int a;
cin >> a;
vec.at(a - 1)++;
}
}
int ans = 0;
for (int i = 0; i < K; i++) {
i... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
vector<int> vec(N, 0);
for (int i = 0; i < K; i++) {
int d;
cin >> d;
for (int j = 0; j < d; j++) {
int a;
cin >> a;
vec.at(a - 1)++;
}
}
int ans = 0;
for (int i = 0; i < N; i++) {
i... | replace | 18 | 19 | 18 | 19 | 0 | |
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
vector<int> vec(N);
for (int i = 0; i < K; i++) {
int d;
cin >> d;
vector<int> vec2(d);
for (int j = 0; j < d; j++) {
cin >> vec2.at(j);
vec.at(vec.at(j) - 1)++;
}
}
int ans = 0;
for (i... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
vector<int> vec(N);
for (int i = 0; i < K; i++) {
int d;
cin >> d;
vector<int> vec2(d);
for (int j = 0; j < d; j++) {
cin >> vec2.at(j);
vec.at(vec2.at(j) - 1)++;
}
}
int ans = 0;
for (... | replace | 16 | 17 | 16 | 17 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): vector::_M_range_check: __n (which is 18446744073709551615) >= this->size() (which is 3)
|
p02688 | C++ | Runtime Error | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#define ll long long int
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
static const ll MAX = 1000000000000000;
static const int NIL = -1;
using namespace std;
const long double EPS = 0.0000000001;
const long double PI = (acos(-1));
const int MOD = 1000000007;
int ... | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#define ll long long int
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
static const ll MAX = 1000000000000000;
static const int NIL = -1;
using namespace std;
const long double EPS = 0.0000000001;
const long double PI = (acos(-1));
const int MOD = 1000000007;
int ... | replace | 22 | 23 | 22 | 23 | 0 | |
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
typedef long long ll;
#define _GLIBCXX_DEBUG
typedef vector<int> vec;
typedef vector<ll> lvec;
typedef vector<char> cvec;
typedef pair<ll, ll> LP;
typ... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
typedef long long ll;
#define _GLIBCXX_DEBUG
typedef vector<int> vec;
typedef vector<ll> lvec;
typedef vector<char> cvec;
typedef pair<ll, ll> LP;
typ... | replace | 18 | 19 | 18 | 19 | 0 | |
p02688 | 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 | 66 | 67 | 66 | 67 | 0 | |
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
vector<int> a(n, 0);
for (int i = 0; i < k; i++) {
int d;
cin >> d;
vector<int> b(d);
for (int j = 0; j < d; j++) {
cin >> b[j];
a[b[j]] = 1;
}
}
int ans = 0;
for (int i = 0; i < n; i++) ... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
vector<int> a(n, 0);
for (int i = 0; i < k; i++) {
int d;
cin >> d;
vector<int> b(d);
for (int j = 0; j < d; j++) {
cin >> b[j];
a[b[j] - 1] = 1;
}
}
int ans = 0;
for (int i = 0; i < n; i... | replace | 14 | 15 | 14 | 15 | 0 | |
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <math.h>
using namespace std;
using ll = long long;
int main() {
ll N, K;
cin >> N >> K;
vector<ll> vec(N, 0);
for (ll i = 0; i < K; i++) {
ll a;
cin >> a;
for (ll j = 0; j < a; j++) {
ll b;
cin >> b;
vec.at(b - 1) = 1;
}
}
ll c = 0;
for ... | #include <bits/stdc++.h>
#include <math.h>
using namespace std;
using ll = long long;
int main() {
ll N, K;
cin >> N >> K;
vector<ll> vec(N, 0);
for (ll i = 0; i < K; i++) {
ll a;
cin >> a;
for (ll j = 0; j < a; j++) {
ll b;
cin >> b;
vec.at(b - 1) = 1;
}
}
ll c = 0;
for ... | replace | 18 | 19 | 18 | 19 | 0 | |
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
vector<bool> chk(N, false);
for (int i = 0; i < K; i++) {
int d;
cin >> d;
for (int j = 0; j < d; j++) {
int A;
cin >> A;
chk.at(A - 1) = true;
}
}
int ans = 0;
for (int i = 0; i < K; i... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
vector<bool> chk(N, false);
for (int i = 0; i < K; i++) {
int d;
cin >> d;
for (int j = 0; j < d; j++) {
int A;
cin >> A;
chk.at(A - 1) = true;
}
}
int ans = 0;
for (int i = 0; i < N; i... | replace | 19 | 20 | 19 | 20 | 0 | |
p02688 | C++ | Runtime Error | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
int d[n];
int a[n][n];
for (int i = 0; i < k; i++) {
cin >> d[i];
for (int j = 0; j < d[i]; j++) {
cin >> a[i][j];
a[i][j]--;
}
}
bool judge[n];
for (int i = 0; i ... | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
int d[100];
int a[100][100];
for (int i = 0; i < k; i++) {
cin >> d[i];
for (int j = 0; j < d[i]; j++) {
cin >> a[i][j];
a[i][j]--;
}
}
bool judge[n];
for (int i =... | replace | 8 | 10 | 8 | 10 | 0 | |
p02688 | C++ | Runtime Error | #include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include <cmath>
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <cstring>
#include <deque> // deque
#include ... | #include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include <cmath>
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <cstring>
#include <deque> // deque
#include ... | replace | 27 | 28 | 27 | 28 | 0 | |
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
int n, m, q;
vector<int> a, b, c, d;
int ans;
template <typename T> void printVec(vector<T> &vec) {
cout << "";
for (auto it = vec.begin(); it != vec.end(); ++it) {
cout << *it << " ";
}
cout << endl;
}
int main... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
int n, m, q;
vector<int> a, b, c, d;
int ans;
template <typename T> void printVec(vector<T> &vec) {
cout << "";
for (auto it = vec.begin(); it != vec.end(); ++it) {
cout << *it << " ";
}
cout << endl;
}
int main... | replace | 28 | 30 | 28 | 30 | 0 | |
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
int d[100];
cin >> n >> k;
vector<int> A(n, 0);
int nu[100][100];
for (int i = 0; i < k; i++) {
cin >> d[i];
for (int j = 0; j < d[i]; j++) {
cin >> nu[i][j];
}
}
for (int i = 0; i < k; i++) {
for (int j = 0;... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
int d[100];
cin >> n >> k;
vector<int> A(n, 0);
int nu[100][100];
for (int i = 0; i < k; i++) {
cin >> d[i];
for (int j = 0; j < d[i]; j++) {
cin >> nu[i][j];
}
}
for (int i = 0; i < k; i++) {
for (int j = 0;... | replace | 21 | 22 | 21 | 22 | -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)
|
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
vector<int> sunu(n, 0);
int d;
int a;
for (int i = 0; i < k; i++) {
cin >> d;
for (int j = 0; j < d; j++) {
cin >> a;
sunu.at(a) = 1;
}
}
int sum = 0;
for (int i = 0; i < n; i++) {
if (sunu.... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
vector<int> sunu(n, 0);
int d;
int a;
for (int i = 0; i < k; i++) {
cin >> d;
for (int j = 0; j < d; j++) {
cin >> a;
sunu.at(a - 1) = 1;
}
}
int sum = 0;
for (int i = 0; i < n; i++) {
if (s... | replace | 12 | 13 | 12 | 13 | -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)
|
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k, d, a[1000], i, f[1000] = {0}, k1 = 0, p[1000] = {0};
map<int, int> m;
cin >> n >> k;
int j = 0;
while (k--) {
cin >> d;
for (i = 0; i < d; i++) {
cin >> a[i];
p[j] = a[i];
j++;
}
}
for (i = 0; i < j; i++) ... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k, d, a[10000], i, f[100000] = {0}, k1 = 0, p[100000] = {0};
map<int, int> m;
cin >> n >> k;
int j = 0;
while (k--) {
cin >> d;
for (i = 0; i < d; i++) {
cin >> a[i];
p[j] = a[i];
j++;
}
}
for (i = 0; i < j; ... | replace | 5 | 6 | 5 | 6 | 0 | |
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
vector<bool> vec(n);
for (int i = 0; i < n; i++) {
vec.at(i) = false;
}
for (int i = 0; i < k; i++) {
int d;
cin >> d;
for (int j = 0; j < d; j++) {
int a;
cin >> a;
vec.at(a) = true;
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
vector<bool> vec(n);
for (int i = 0; i < n; i++) {
vec.at(i) = false;
}
for (int i = 0; i < k; i++) {
int d;
cin >> d;
for (int j = 0; j < d; j++) {
int a;
cin >> a;
vec.at(a - 1) = true;
... | replace | 17 | 18 | 17 | 18 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): vector<bool>::_M_range_check: __n (which is 3) >= this->size() (which is 3)
|
p02688 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#include <iostream>
#include <set>
#include <string>
#define ll long long
using namespace std;
int main() {
int n, k;
cin >> n >> k;
set<int> s;
for (ll i = 1; i <= k; i++) {
int d;
cin >> d;
while (d) {
ll t;
cin >> t;
s.insert(t);
}
}
cout << n - ... | #include <bits/stdc++.h>
#include <iostream>
#include <set>
#include <string>
#define ll long long
using namespace std;
int main() {
int n, k;
cin >> n >> k;
set<int> s;
for (ll i = 1; i <= k; i++) {
int d;
cin >> d;
while (d) {
ll t;
cin >> t;
s.insert(t);
d--;
}
}
c... | insert | 17 | 17 | 17 | 18 | TLE | |
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
vector<int> vec(N);
for (int i = 0; i < N; i++) {
vec.at(i) = 0;
}
for (int i = 0; i < K; i++) {
int j;
cin >> j;
for (int k = 0; k < j; k++) {
int l;
cin >> l;
vec.at(l)++;
}
}
int ... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
vector<int> vec(N);
for (int i = 0; i < N; i++) {
vec.at(i) = 0;
}
for (int i = 0; i < K; i++) {
int j;
cin >> j;
for (int k = 0; k < j; k++) {
int l;
cin >> l;
vec.at(l - 1) = vec.at(l - 1)... | replace | 15 | 16 | 15 | 16 | -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)
|
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
vector<bool> s(n, false);
for (int i = 0; i < k; i++) {
int d;
cin >> d;
vector<int> a(d);
for (int j = 0; j < d; j++)
cin >> a.at(j);
for (int j = 0; j < d; j++) {
s.at(a.at(j)) = true;
}... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
vector<bool> s(n, false);
for (int i = 0; i < k; i++) {
int d;
cin >> d;
vector<int> a(d);
for (int j = 0; j < d; j++)
cin >> a.at(j);
for (int j = 0; j < d; j++) {
s.at(a.at(j) - 1) = true;
... | replace | 17 | 18 | 17 | 18 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): vector<bool>::_M_range_check: __n (which is 3) >= this->size() (which is 3)
|
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
const unsigned int M = 1000000007;
int main() {
int n, k;
cin >> n >> k;
vector<int> d(k);
rep(i, k) {
int m;
cin >> m;
rep(j, m) {
int a;
cin >> a;
d[a - 1] = 1;
}
}
int ans = 0;
... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
const unsigned int M = 1000000007;
int main() {
int n, k;
cin >> n >> k;
vector<int> d(n);
rep(i, k) {
int m;
cin >> m;
rep(j, m) {
int a;
cin >> a;
d[a - 1] = 1;
}
}
int ans = 0;
... | replace | 7 | 8 | 7 | 8 | 0 | |
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
vector<int> vec(n, 1);
for (int i = 0; i < k; i++) {
int d;
cin >> d;
for (int j = 0; j < d; j++) {
int a;
cin >> a;
vec.at(a) = 0;
}
}
int ans = 0;
for (int i = 0; i < n; i++) {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
vector<int> vec(n, 1);
for (int i = 0; i < k; i++) {
int d;
cin >> d;
for (int j = 0; j < d; j++) {
int a;
cin >> a;
vec.at(a - 1) = 0;
}
}
int ans = 0;
for (int i = 0; i < n; i++) {
... | replace | 15 | 16 | 15 | 16 | -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)
|
p02688 | C++ | Runtime Error | #include "bits/stdc++.h"
#include <cstring>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
typedef long long ll;
int main() {
int n, k;
int ans = 0;
cin >> n >> k;
vector<int> flag_n(n);
rep(i, k) { flag_n[i] = 0; }
rep(i, k) {
int tcnt;
cin >> tcnt;
rep(j, tcnt) {
int... | #include "bits/stdc++.h"
#include <cstring>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
typedef long long ll;
int main() {
int n, k;
int ans = 0;
cin >> n >> k;
vector<int> flag_n(n);
rep(i, n) { flag_n[i] = 0; }
rep(i, k) {
int tcnt;
cin >> tcnt;
rep(j, tcnt) {
int... | replace | 11 | 12 | 11 | 12 | 0 | |
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
int main() {
/* Input */
int N, K;
cin >> N >> K;
vector<bool> snukes(N);
rep(i, N) snukes.at(i) = false;
rep(i, K) {
int d;
cin >> d;
rep(j, d) {
int a;
cin >> a;
snukes.at(a ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
int main() {
/* Input */
int N, K;
cin >> N >> K;
vector<bool> snukes(N);
rep(i, N) snukes.at(i) = false;
rep(i, K) {
int d;
cin >> d;
rep(j, d) {
int a;
cin >> a;
snukes.at(a ... | replace | 22 | 23 | 22 | 23 | 0 | |
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define INF 2e9
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
void Main() {
int n, k;
cin >> n >> k;
int d[k];
i... | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define INF 2e9
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
void Main() {
int n, k;
cin >> n >> k;
int d[k];
i... | replace | 13 | 14 | 13 | 14 | 0 | |
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define ALL(v) v.begin(), v.end()
#define PRINT(V) \
for (auto v : (V)) \
cout << v << " "
const long long INF = 1LL << 60;... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define ALL(v) v.begin(), v.end()
#define PRINT(V) \
for (auto v : (V)) \
cout << v << " "
const long long INF = 1LL << 60;... | replace | 31 | 32 | 31 | 32 | 0 | |
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
vector<int> vec1(N, 0);
for (int i = 0; i < K; i++) {
int d;
cin >> d;
vector<int> vec2(d);
for (int j = 0; j < d; j++) {
cin >> vec2.at(j);
}
for (int j = 0; j < d; j++) {
vec1.at(vec2.... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
vector<int> vec1(N, 0);
for (int i = 0; i < K; i++) {
int d;
cin >> d;
vector<int> vec2(d);
for (int j = 0; j < d; j++) {
cin >> vec2.at(j);
}
for (int j = 0; j < d; j++) {
vec1.at(vec2.... | replace | 26 | 27 | 26 | 27 | 0 | |
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b;
vector<int> m(a + 1, 0);
m[0] = 1;
for (int i = 0; i < b; i++) {
cin >> c;
vector<int> n(c);
for (int j = 0; j < c; j++) {
cin >> n[i];
m[n[i]]++;
}
}
int p = 0;
for (int k = 0; k < a + 1; ... | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b;
vector<int> m(a + 1, 0);
m[0] = 1;
for (int i = 0; i < b; i++) {
cin >> c;
vector<int> n(c);
for (int j = 0; j < c; j++) {
cin >> n[j];
m[n[j]]++;
}
}
int p = 0;
for (int k = 0; k < a + 1; ... | replace | 11 | 13 | 11 | 13 | 0 | |
p02688 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
#define MOD 1000000007
// #define MOD 998244353
const double EPS = 1e-9;
#define INF (1LL << 60)
#define D double
#define fs first
#define sc second
#define int long long
#define FOR(i, a, b) for (int i = (int)(a); i < (int)(b); ++i)
#define RFOR(i, a, b) for (int i = (int)... | #include "bits/stdc++.h"
using namespace std;
#define MOD 1000000007
// #define MOD 998244353
const double EPS = 1e-9;
#define INF (1LL << 60)
#define D double
#define fs first
#define sc second
#define int long long
#define FOR(i, a, b) for (int i = (int)(a); i < (int)(b); ++i)
#define RFOR(i, a, b) for (int i = (int)... | replace | 33 | 35 | 33 | 35 | 0 | |
p02688 | C++ | Runtime Error | #include <cstdlib>
#include <iostream>
#include <vector>
int main() {
int N, K;
std::cin >> N >> K;
std::vector<int> okashi(N - 1, 0);
for (int i = 0; i < K; i++) {
int d;
std::cin >> d;
for (int j = 0; j < d; j++) {
int A;
std::cin >> A;
okashi[A - 1]++;
}
}
int ninzuu ... | #include <cstdlib>
#include <iostream>
#include <vector>
int main() {
int N, K;
std::cin >> N >> K;
std::vector<int> okashi(N, 0);
for (int i = 0; i < K; i++) {
int d;
std::cin >> d;
for (int j = 0; j < d; j++) {
int A;
std::cin >> A;
okashi[A - 1]++;
}
}
int ninzuu = 0;... | replace | 7 | 8 | 7 | 8 | 0 | |
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using lint = long long int;
using pint = pair<int, int>;
using plint = pair<lint, lint>;
struct fast_ios {
fast_ios() {
cin.tie(0);
ios::sync_with_stdio(false);
cout << fixed << setprecision(20);
};
} fast_ios_;
#define ALL(x) (x).begin(), (x).end()
#define... | #include <bits/stdc++.h>
using namespace std;
using lint = long long int;
using pint = pair<int, int>;
using plint = pair<lint, lint>;
struct fast_ios {
fast_ios() {
cin.tie(0);
ios::sync_with_stdio(false);
cout << fixed << setprecision(20);
};
} fast_ios_;
#define ALL(x) (x).begin(), (x).end()
#define... | replace | 23 | 24 | 23 | 24 | 0 | |
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int N, K;
cin >> N >> K;
int d, a;
int count = 0;
vector<int> sunuke(N, 0);
for (int i = 0; i < K; i++) {
cin >> d;
for (int j = 0; j < d; j++) {
cin >> a;
sunuke.at(a - 1)++;
}
}
for (int i = 0; i < K; i++) {
if ... | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int N, K;
cin >> N >> K;
int d, a;
int count = 0;
vector<int> sunuke(N, 0);
for (int i = 0; i < K; i++) {
cin >> d;
for (int j = 0; j < d; j++) {
cin >> a;
sunuke.at(a - 1)++;
}
}
for (int i = 0; i < N; i++) {
if ... | replace | 15 | 16 | 15 | 16 | 0 | |
p02688 | 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;
using P = pair<int, int>;
// int choose2(ll x){
// return x*(x-1)/2;}
const int INF = 1001001001;
int main() {
int N, K;
int ans = 0;
cin >> N >> K;
vector<int> d(N);
vector<int> A(N);
vecto... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
using ll = long long;
using P = pair<int, int>;
// int choose2(ll x){
// return x*(x-1)/2;}
const int INF = 1001001001;
int main() {
int N, K;
int ans = 0;
cin >> N >> K;
vector<int> d(K);
vector<int> A(N);
vecto... | replace | 14 | 15 | 14 | 15 | 0 | |
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int ans = 0, N, K, d, a;
cin >> N >> K;
vector<bool> people(N, 1);
for (int i = 0; i < K; i++) {
cin >> d;
for (int j = 0; j < d; j++) {
cin >> a;
if (people.at(a - 1))
people.at(a - 1) = 0;
}
}
for (int i = 0; i < ... | #include <bits/stdc++.h>
using namespace std;
int main() {
int ans = 0, N, K, d, a;
cin >> N >> K;
vector<bool> people(N, 1);
for (int i = 0; i < K; i++) {
cin >> d;
for (int j = 0; j < d; j++) {
cin >> a;
if (people.at(a - 1))
people.at(a - 1) = 0;
}
}
for (int i = 0; i < ... | replace | 16 | 17 | 16 | 17 | 0 | |
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
vector<int> children;
for (int i = 0; i < N; i++)
children.at(i) = i + 1;
for (int i = 0; i < K; i++) {
int d;
cin >> d;
for (int j = 0; j < d; j++) {
int num;
cin >> num;
for (int k = 0;... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
vector<int> children(N);
for (int i = 0; i < N; i++)
children.at(i) = i + 1;
for (int i = 0; i < K; i++) {
int d;
cin >> d;
for (int j = 0; j < d; j++) {
int num;
cin >> num;
for (int k =... | replace | 7 | 8 | 7 | 8 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)
|
p02688 | C++ | Runtime Error | #include <iostream>
#include <map>
#include <math.h>
#include <stdio.h>
using namespace std;
int N, K;
int main() {
cin >> N >> K;
int d[K], A[K][N];
int su[N + 1];
int sum = 0;
for (int i = 1; i <= N; i++) {
su[i] = 1;
}
for (int i = 1; i <= K; i++) {
cin >> d[i];
for (int j = 1; j <= d[i... | #include <iostream>
#include <map>
#include <math.h>
#include <stdio.h>
using namespace std;
int N, K;
int main() {
cin >> N >> K;
int d[K + 1], A[K + 1][N + 1];
int su[N + 1];
int sum = 0;
for (int i = 1; i <= N; i++) {
su[i] = 1;
}
for (int i = 1; i <= K; i++) {
cin >> d[i];
for (int j =... | replace | 11 | 12 | 11 | 12 | 0 | |
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
vector<int> d(k);
vector<int> ansv(n, 1);
for (int i = 0; i < k; i++) {
cin >> d.at(i);
vector<int> a(d.at(i));
for (int j = 0; j < d.at(i); j++) {
cin >> a.at(j);
}
for (int j = 0; j < d.at(i); j+... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
vector<int> d(k);
vector<int> ansv(n, 1);
for (int i = 0; i < k; i++) {
cin >> d.at(i);
vector<int> a(d.at(i));
for (int j = 0; j < d.at(i); j++) {
cin >> a.at(j);
}
for (int j = 0; j < d.at(i); j+... | replace | 22 | 23 | 22 | 23 | 0 | |
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
vector<bool> cnt(N);
int d;
int count = 0;
for (int i = 0; i < K; i++) {
cin >> d;
vector<int> A(d);
for (int j = 0; j < d; j++) {
cin >> A.at(j);
cnt.at(A.at(j) - 1) = true;
}
}
for (int i = ... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
vector<bool> cnt(N);
int d;
int count = 0;
for (int i = 0; i < K; i++) {
cin >> d;
vector<int> A(d);
for (int j = 0; j < d; j++) {
cin >> A.at(j);
cnt.at(A.at(j) - 1) = true;
}
}
for (int i = ... | replace | 16 | 17 | 16 | 17 | 0 | |
p02688 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep1(i, n) for (int i = 1; i < n; i++)
#define ll long long
using namespace std;
int main() {
... | #include <algorithm>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep1(i, n) for (int i = 1; i < n; i++)
#define ll long long
using namespace std;
int main() {
... | replace | 20 | 21 | 20 | 21 | -11 | |
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define pb push_back
#define mp make_pair
#define ios \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define pb push_back
#define mp make_pair
#define ios \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); ... | replace | 13 | 14 | 13 | 14 | 0 | |
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define put(i) cout << fixed << i << endl
using namespace std;
using ll = long long;
int main() {
int n, k;
cin >> n >> k;
vector<int> d(k);
map<int, int> mp;
rep(i, k) {
cin >> d[i];
int a[k][d[k]];
rep(j, d[i]) {
... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define put(i) cout << fixed << i << endl
using namespace std;
using ll = long long;
int main() {
int n, k;
cin >> n >> k;
vector<int> d(k);
map<int, int> mp;
rep(i, k) {
cin >> d[i];
int a[k][d[i]];
rep(j, d[i]) {
... | replace | 14 | 15 | 14 | 15 | 0 | |
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll int64_t
#define ALL(a) (a).begin(), (a).end()
const ll mod = 1000000007;
const ll LINF = 1e13;
const ll LLINF = 1e18;
const ll ALPHABET = 26;
template <class T> void Swap(T &r, T &l) {
T tmp = r;
r = l;
l = tmp;
}
template <typename T> istream &operator>... | #include <bits/stdc++.h>
using namespace std;
#define ll int64_t
#define ALL(a) (a).begin(), (a).end()
const ll mod = 1000000007;
const ll LINF = 1e13;
const ll LLINF = 1e18;
const ll ALPHABET = 26;
template <class T> void Swap(T &r, T &l) {
T tmp = r;
r = l;
l = tmp;
}
template <typename T> istream &operator>... | replace | 33 | 34 | 33 | 34 | 0 | |
p02688 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K, ans = 0;
cin >> N >> K;
vector<int> vec(K + 1, 0);
for (int i = 0; i < K; i++) {
int d;
cin >> d;
for (int j = 0; j < d; j++) {
int a;
cin >> a;
vec[a - 1] = 1;
}
}
for (int i = 0; i < N; i++) {
if (v... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K, ans = 0;
cin >> N >> K;
vector<int> vec(N, 0);
for (int i = 0; i < K; i++) {
int d;
cin >> d;
for (int j = 0; j < d; j++) {
int a;
cin >> a;
vec[a - 1] = 1;
}
}
for (int i = 0; i < N; i++) {
if (vec[i... | replace | 6 | 7 | 6 | 7 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.