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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p03115 | C++ | Time Limit Exceeded | %:pragma GCC optimize("Ofast", "inline")
#include <bits/stdc++.h>
#define rep(i, n) for (rint i = 1; i <= (n); i++)
#define re0(i, n) for (rint i = 0; i < (int)n; i++)
#define travel(i, u) for (rint i = head[u]; i; i = e[i].nxt)
#define rint register int
using namespace std;
typedef long long lo;
template <typename t... | %:pragma GCC optimize("Ofast", "inline")
#include <bits/stdc++.h>
#define rep(i, n) for (rint i = 1; i <= (n); i++)
#define re0(i, n) for (rint i = 0; i < (int)n; i++)
#define travel(i, u) for (rint i = head[u]; i; i = e[i].nxt)
#define rint register int
using namespace std;
typedef long long lo;
template <typename t... | replace | 39 | 40 | 39 | 40 | TLE | |
p03115 | C++ | Time Limit Exceeded | #pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <iostream>
using namespace std;
typedef long long ll;
int n;
ll x[100001], y[100001];
ll px[200001], py[200001];
bool pz[200001];
ll tae(ll x, ll y, int id) { // y<2^... | #pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <iostream>
using namespace std;
typedef long long ll;
int n;
ll x[100001], y[100001];
ll px[200001], py[200001];
bool pz[200001];
ll tae(ll x, ll y, int id) { // y<2^... | insert | 15 | 15 | 15 | 17 | TLE | |
p03116 | C++ | Runtime Error | #include <iostream>
#include <vector>
using namespace std;
#define int long long
#define V vector
#define vel V<int>
#define rep(i, n) for (int i = 0; i < n; i++)
#define mkp make_pair
#define pin pair<int, int>
pin solve(V<pin> &ab, int ex) {
if (!ex) {
return mkp(1, 0);
}
V<V<pin>> qab(2);
int sz = ab.siz... | #include <iostream>
#include <vector>
using namespace std;
#define int long long
#define V vector
#define vel V<int>
#define rep(i, n) for (int i = 0; i < n; i++)
#define mkp make_pair
#define pin pair<int, int>
pin solve(V<pin> &ab, int ex) {
if (!ex) {
return mkp(1, 0);
}
V<V<pin>> qab(2);
int sz = ab.siz... | replace | 28 | 29 | 28 | 31 | 0 | |
p03116 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define V vector
#define L long
#define W V<L>
L E = 70;
W S(V<W> p) {
if (!E) {
return {1, 0};
}
V<V<W>> T(2);
for (W x : p) {
T[x[1] & 1].push_back({x[0] / 2, x[1] / 2});
if (x[0] & 1) {
T[(x[1] + 1) & 1].push_back({x[0] / 2, (x[1] + 1) / 2});
... | #include <bits/stdc++.h>
using namespace std;
#define V vector
#define L long
#define W V<L>
L E = 70;
W S(V<W> p) {
if (!E) {
return {1, 0};
}
V<V<W>> T(2);
for (W x : p) {
T[x[1] & 1].push_back({x[0] / 2, x[1] / 2});
if (x[0] & 1) {
T[(x[1] + 1) & 1].push_back({x[0] / 2, (x[1] + 1) / 2});
... | replace | 42 | 43 | 42 | 43 | -11 | |
p03116 | C++ | Runtime Error | #include <iostream>
#include <vector>
using namespace std;
#define int long long
#define V vector
#define vel V<int>
#define rep(i, n) for (int i = 0; i < n; i++)
#define mkp make_pair
#define pin pair<int, int>
pin solve(V<pin> &ab, int ex) {
if (!ex) {
return mkp(1, 0);
}
V<V<pin>> qab(2);
int sz = ab.siz... | #include <iostream>
#include <vector>
using namespace std;
#define int long long
#define V vector
#define vel V<int>
#define rep(i, n) for (int i = 0; i < n; i++)
#define mkp make_pair
#define pin pair<int, int>
pin solve(V<pin> &ab, int ex) {
if (!ex) {
return mkp(1, 0);
}
V<V<pin>> qab(2);
int sz = ab.siz... | replace | 24 | 25 | 24 | 25 | -11 | |
p03118 | C++ | Runtime Error | #pragma GCC optimize("O3")
#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// using namespace __gnu_pbds;
// gp_hash_table<int, int> mapka;
using namespace std;
#define PB push_back
#define MP make_pair
#define LL long long
#define int LL
#define FOR(i, a, b) for (int i = (a); i <= (b); i++)
#defi... | #pragma GCC optimize("O3")
#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// using namespace __gnu_pbds;
// gp_hash_table<int, int> mapka;
using namespace std;
#define PB push_back
#define MP make_pair
#define LL long long
#define int LL
#define FOR(i, a, b) for (int i = (a); i <= (b); i++)
#defi... | insert | 154 | 154 | 154 | 158 | 0 | |
p03125 | C++ | Runtime Error | #include <stdio.h>
int main(void) {
int a, b;
scanf("%d %d", a, b);
if (b % a == 0) {
printf("%d\n", a + b);
} else {
printf("%d\n", b - a);
}
return 0;
}
| #include <stdio.h>
int main(void) {
int a, b;
scanf("%d %d", &a, &b);
if (b % a == 0) {
printf("%d\n", a + b);
} else {
printf("%d\n", b - a);
}
return 0;
} | replace | 3 | 4 | 3 | 4 | -11 | |
p03125 | C++ | Runtime Error | // AUTHOR:BlackBox Inc.//
#include <bits/stdc++.h>
#include <tr1/unordered_map>
#include <unordered_map>
#define ll long long
#define ull unsigned long long
#define vi vector<int>
#define vlli vector<long long int>
#define vvi vector<vector<int>>
#define endl "\n"
#define vpii vector<pair<int, int>>
#define vs vector<s... | // AUTHOR:BlackBox Inc.//
#include <bits/stdc++.h>
#include <tr1/unordered_map>
#include <unordered_map>
#define ll long long
#define ull unsigned long long
#define vi vector<int>
#define vlli vector<long long int>
#define vvi vector<vector<int>>
#define endl "\n"
#define vpii vector<pair<int, int>>
#define vs vector<s... | delete | 44 | 48 | 44 | 44 | 0 | |
p03125 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll unsigned long long
using namespace std;
int main() {
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
#endif
int a, b;
cin >> a >> b;
if (b % a == 0)
cout << b + a;
else
cout << b - a;
return 0;
} | #include <bits/stdc++.h>
#define ll unsigned long long
using namespace std;
int main() {
int a, b;
cin >> a >> b;
if (b % a == 0)
cout << b + a;
else
cout << b - a;
return 0;
} | delete | 5 | 8 | 5 | 5 | 0 | |
p03125 | C++ | Runtime Error | #include <cstdio>
using namespace std;
int A, B, C;
int main() {
if (B % A) {
C = B - A;
} else {
C = B + A;
}
printf("%d\n", C);
} | #include <cstdio>
using namespace std;
int A, B, C;
int main() {
scanf("%d %d", &A, &B);
if (B % A) {
C = B - A;
} else {
C = B + A;
}
printf("%d\n", C);
} | insert | 7 | 7 | 7 | 9 | -8 | |
p03125 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int a, b;
cin >> b >> a;
if (a % b == 0)
cout << a + b << endl;
else
co... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int a, b;
cin >> b >> a;
if (a % b == 0)
cout << a + b << endl;
else
cout << a - b << endl;
return 0;
} | replace | 3 | 7 | 3 | 4 | 0 | |
p03125 | C++ | Runtime Error | /*************************************************************************
> File Name: A.cc
> Author: sqwlly
> Mail: sqw.lucky@gmail.com
> Created Time: 2019年02月16日 星期六 20时04分07秒
************************************************************************/
#include <iostream>
#define DEBUG(x) std::cerr ... | /*************************************************************************
> File Name: A.cc
> Author: sqwlly
> Mail: sqw.lucky@gmail.com
> Created Time: 2019年02月16日 星期六 20时04分07秒
************************************************************************/
#include <iostream>
#define DEBUG(x) std::cerr ... | replace | 14 | 17 | 14 | 15 | 0 | |
p03125 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B;
string op;
cin >> A >> op >> B;
if (A % B == 0) {
if (op == "+") {
cout << A + B << endl;
}
} else {
cout << B - A << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B;
cin >> A >> B;
if (B % A == 0) {
cout << A + B << endl;
} else {
cout << B - A << endl;
}
}
| replace | 5 | 12 | 5 | 8 | 0 | |
p03125 | Python | Runtime Error | a = int(input())
b = int(input())
r = a + b if b % a == 0 else b - a
print(r)
| a, b = list(map(int, input().split()))
r = a + b if b % a == 0 else b - a
print(r)
| replace | 0 | 2 | 0 | 1 | ValueError: invalid literal for int() with base 10: '4 12' | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03125/Python/s844412029.py", line 1, in <module>
a = int(input())
ValueError: invalid literal for int() with base 10: '4 12'
|
p03125 | C++ | Runtime Error | /***
* ___ ___
* /\ \ /\ \ _____
* \:\ \ \:\ \ /::\ \ ___
* ___
* \:\ \ \:\ \ /:/\:\ \ /\__\
* /\__\
* _____\:\ \ ___ ... | /***
* ___ ___
* /\ \ /\ \ _____
* \:\ \ \:\ \ /::\ \ ___
* ___
* \:\ \ \:\ \ /:/\:\ \ /\__\
* /\__\
* _____\:\ \ ___ ... | delete | 33 | 37 | 33 | 33 | 0 | |
p03125 | C++ | Runtime Error | #include <iostream>
using namespace std;
int a, b;
int main() {
if (b % a == 0)
cout << a + b;
else
cout << b - a;
return 0;
} | #include <iostream>
using namespace std;
int a, b;
int main() {
cin >> a >> b;
if (b % a == 0)
cout << a + b;
else
cout << b - a;
return 0;
} | insert | 4 | 4 | 4 | 5 | -8 | |
p03125 | Python | Runtime Error | A, B = list(map(int, input()))
if B % A == 0:
print(A + B)
else:
print(B - A)
| A, B = list(map(int, input().split()))
if B % A == 0:
print(A + B)
else:
print(B - A)
| replace | 0 | 1 | 0 | 1 | ValueError: invalid literal for int() with base 10: ' ' | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03125/Python/s504979530.py", line 1, in <module>
A, B = list(map(int, input()))
ValueError: invalid literal for int() with base 10: ' '
|
p03125 | Python | Runtime Error | def main():
a, b = map(int, input().split())
if b / a % 0:
print(a + b)
else:
print(b - a)
if __name__ == "__main__":
main()
| def main():
a, b = map(int, input().split())
if b % a == 0:
print(a + b)
else:
print(b - a)
if __name__ == "__main__":
main()
| replace | 2 | 3 | 2 | 3 | ZeroDivisionError: float modulo | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03125/Python/s513765690.py", line 11, in <module>
main()
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03125/Python/s513765690.py", line 4, in main
if b / a % 0:
ZeroDivisionError: ... |
p03125 | Python | Runtime Error | a, b = [int(x) for x in input().split()]
print([a + b, b - a][int(b % a)])
| a, b = [int(x) for x in input().split()]
print([a + b, b - a][int(bool(b % a))])
| replace | 1 | 2 | 1 | 2 | 0 | |
p03125 | Python | Runtime Error | a, b = map(int, input())
if b % a == 0:
print(a + b)
else:
print(b - a)
| a, b = map(int, input().split())
if b % a == 0:
print(a + b)
else:
print(b - a)
| replace | 0 | 1 | 0 | 1 | ValueError: invalid literal for int() with base 10: ' ' | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03125/Python/s517301094.py", line 1, in <module>
a, b = map(int, input())
ValueError: invalid literal for int() with base 10: ' '
|
p03125 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int int64_t
int a, b;
int32_t main() {
#ifndef ONLINE_JUDGE
freopen("in.txt", "r", stdin);
freopen("out.txt", "w", stdout);
#endif
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin >> a >> b;
cout << (b % a ? b - a : a + b);
return 0;
} | #include <bits/stdc++.h>
using namespace std;
#define int int64_t
int a, b;
int32_t main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin >> a >> b;
cout << (b % a ? b - a : a + b);
return 0;
} | delete | 6 | 10 | 6 | 6 | -8 | |
p03126 | Python | Runtime Error | n, m = map(int, input().split())
r = [0 for x in range(0, m)]
for _ in range(0, n):
a = [x for x in map(int, input().split())]
for i in a[1:]:
r[i - 1] += 1
print(f"{len([x for x in r if x == n])}")
| n, m = map(int, input().split())
r = [0 for x in range(0, m)]
for _ in range(0, n):
a = [x for x in map(int, input().split())]
for i in a[1:]:
r[i - 1] += 1
print("{}".format(len([x for x in r if x == n])))
| replace | 9 | 10 | 9 | 10 | 0 | |
p03126 | Python | Runtime Error | from collections import defaultdict
n, m = map(int, input().split())
d = defaultdict(int)
for i in range(n):
tmp = list(map(int, input().split()))
for a in tmp[1:]:
d[a] += 1
cnt = 0
for value in range(d.values()):
if value == n:
cnt += 1
print(cnt)
| from collections import defaultdict
n, m = map(int, input().split())
d = defaultdict(int)
for i in range(n):
tmp = list(map(int, input().split()))
for a in tmp[1:]:
d[a] += 1
cnt = 0
for value in d.values():
if value == n:
cnt += 1
print(cnt)
| replace | 10 | 11 | 10 | 11 | TypeError: 'dict_values' object cannot be interpreted as an integer | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03126/Python/s949301200.py", line 11, in <module>
for value in range(d.values()):
TypeError: 'dict_values' object cannot be interpreted as an integer
|
p03126 | C++ | Runtime Error | #include <iostream>
#include <vector>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> cnt(M, 0);
int ans = 0;
for (int i = 0; i < N; i++) {
int K;
cin >> K;
for (int j = 0; j < K; j++) {
int A;
cin >> A;
A--;
cnt[A]++;
}
}
for (int i = 0; i <... | #include <iostream>
#include <vector>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> cnt(M, 0);
int ans = 0;
for (int i = 0; i < N; i++) {
int K;
cin >> K;
for (int j = 0; j < K; j++) {
int A;
cin >> A;
A--;
cnt[A]++;
}
}
for (int i = 0; i <... | replace | 19 | 21 | 19 | 21 | 0 | |
p03126 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
int n, m;
int k[m], a[30][30];
cin >> n >> m;
for (int i = 0; i < n; i++) {
cin >> k[i];
for (int j = 0; j < k[i]; j++) {
cin >> a[i][j];
}
}
int cnt = 0;
bool like;
for (int i = 1; i < m + 1; i++) { // m種類の食べ物
like = true;
... | #include <iostream>
using namespace std;
int main() {
int n, m;
int k[30], a[30][30];
cin >> n >> m;
for (int i = 0; i < n; i++) {
cin >> k[i];
for (int j = 0; j < k[i]; j++) {
cin >> a[i][j];
}
}
int cnt = 0;
bool like;
for (int i = 1; i < m + 1; i++) { // m種類の食べ物
like = true;
... | replace | 5 | 6 | 5 | 6 | 0 | |
p03126 | C++ | Runtime Error |
#include <algorithm>
#include <deque>
#include <fstream>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdlib.h>
#include <string>
#include <sys/timeb.h>
#include <vector>
using namespace std;
#define repr(i, a, b... |
#include <algorithm>
#include <deque>
#include <fstream>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdlib.h>
#include <string>
#include <sys/timeb.h>
#include <vector>
using namespace std;
#define repr(i, a, b... | replace | 85 | 86 | 85 | 86 | 0 | |
p03126 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repe(i, n) rep(i, (n) + 1)
#define per(i, n) for (int i = (int)(n)-1; i >= 0; i--)
#define pere(i, n) rep(i, (n) + 1)
#define all(x) (x).begin(), (x).end()
#define SP << " " <<
#define MOD 1000000007
#define IINF... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repe(i, n) rep(i, (n) + 1)
#define per(i, n) for (int i = (int)(n)-1; i >= 0; i--)
#define pere(i, n) rep(i, (n) + 1)
#define all(x) (x).begin(), (x).end()
#define SP << " " <<
#define MOD 1000000007
#define IINF... | replace | 19 | 20 | 19 | 20 | 0 | |
p03126 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <numeric>
#include <stdio.h>
#include <string.h>
#include <vector>
using namespace std;
typedef long long int lli;
#define urept(soeji, start, n) for (int soeji = start; soeji < n; soeji++)
#define drept(soeji, start, n) for (int soeji = start; soeji > n; soeji--)
int m... | #include <algorithm>
#include <iostream>
#include <numeric>
#include <stdio.h>
#include <string.h>
#include <vector>
using namespace std;
typedef long long int lli;
#define urept(soeji, start, n) for (int soeji = start; soeji < n; soeji++)
#define drept(soeji, start, n) for (int soeji = start; soeji > n; soeji--)
int m... | replace | 16 | 17 | 16 | 17 | 0 | |
p03126 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) \
; \
for (int i = 1; i <= n; ++i)
using ll = long long;
using P = pair<int, int>;
int main() {
int n, m;
cin >... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) \
; \
for (int i = 1; i <= n; ++i)
using ll = long long;
using P = pair<int, int>;
int main() {
int n, m;
cin >... | replace | 13 | 14 | 13 | 14 | 0 | |
p03126 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int b[105];
int main() {
int n, m;
scanf("%d%d", &n, &m);
for (int i = 1; i <= n; i++) {
int k;
scanf("%d", &k);
for (int j = 1; j <= k; j++) {
int x;
scanf("%d", x);
b[x]++;
}
}
int ans = 0;
for (int i = 1; i <= m; i++)
if ... | #include <bits/stdc++.h>
using namespace std;
int b[105];
int main() {
int n, m;
scanf("%d%d", &n, &m);
for (int i = 1; i <= n; i++) {
int k;
scanf("%d", &k);
for (int j = 1; j <= k; j++) {
int x;
scanf("%d", &x);
b[x]++;
}
}
int ans = 0;
for (int i = 1; i <= m; i++)
if... | replace | 11 | 12 | 11 | 12 | -11 | |
p03126 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n, m;
cin >> n >> m;
int cnt[m + 1];
fill(cnt, cnt + n + 1, 0);
for (int i = 0; i < n; i++) {
int k;
cin >> k;
for (int j = 0; j < k; j++) {
int a;
cin >> a;
cnt[a]++;
}
}
int ans = 0;
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n, m;
cin >> n >> m;
int cnt[m + 1];
fill(cnt, cnt + m + 1, 0);
for (int i = 0; i < n; i++) {
int k;
cin >> k;
for (int j = 0; j < k; j++) {
int a;
cin >> a;
cnt[a]++;
}
}
int ans = 0;
... | replace | 7 | 8 | 7 | 8 | 0 | |
p03126 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int n, m;
cin >> n >> m;
int a[n][m];
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
a[i][j] = 0;
}
}
for (int i = 0; i < n; i++) {
int k;
cin >> k;
for (int j = 0; ... | #include <bits/stdc++.h>
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int n, m;
cin >> n >> m;
int a[n][m];
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
a[i][j] = 0;
}
}
for (int i = 0; i < n; i++) {
int k;
cin >> k;
for (int j = 0; ... | replace | 9 | 10 | 9 | 10 | 0 | |
p03126 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int N, M;
cin >> N >> M;
int cnt[M];
int ans = 0;
for (int i = 0; i < M; i++)
cnt[i] = 0;
for (int i = 0; i < N; i++) {
int K;
cin >> K;
for (int j = 0; j < K; j++) {
int A[K];
cin >> A[i];
cnt[A[i] - 1]++;
... | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int N, M;
cin >> N >> M;
int cnt[M];
int ans = 0;
for (int i = 0; i < M; i++)
cnt[i] = 0;
for (int i = 0; i < N; i++) {
int K;
cin >> K;
for (int j = 0; j < K; j++) {
int A;
cin >> A;
cnt[A - 1]++;
}
}
... | replace | 16 | 19 | 16 | 19 | 0 | |
p03126 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<vector<bool>> match(N, vector<bool>(M, 0));
int k, m;
for (int i = 0; i < N; ++i) {
cin >> k;
for (int j = 0; j < k; ++j) {
cin >> m;
match.at(i).at(m) = 1;
}
}
bool like;
int num;
for (... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<vector<bool>> match(N, vector<bool>(M, 0));
int k, m;
for (int i = 0; i < N; ++i) {
cin >> k;
for (int j = 0; j < k; ++j) {
cin >> m;
match.at(i).at(m - 1) = 1;
}
}
bool like;
int num;
f... | replace | 12 | 13 | 12 | 13 | 0 | |
p03126 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<set<int>> A(N);
for (int i = 0; i < N; i++) {
set<int> a;
int K;
cin >> K;
for (int j = 0; j < K; j++) {
int c;
cin >> c;
a.insert(c);
}
A.at(i) = a;
}
int ans = 0;
for (int... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<set<int>> A(N);
for (int i = 0; i < N; i++) {
set<int> a;
int K;
cin >> K;
for (int j = 0; j < K; j++) {
int c;
cin >> c;
a.insert(c);
}
A.at(i) = a;
}
int ans = 0;
for (int... | 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)
|
p03126 | C++ | Runtime Error | #include <iostream>
#include <vector>
using namespace std;
int main() {
int n, m;
int num = 0;
int count = 0;
cin >> n >> m;
vector<vector<int>> item = vector<vector<int>>(n, vector<int>(m, 0));
for (int i = 0; i < n; i++) {
cin >> item[i][0];
for (int j = 0; j < item[i][0]; j++) {
cin >> i... | #include <iostream>
#include <vector>
using namespace std;
int main() {
int n, m;
int num = 0;
int count = 0;
cin >> n >> m;
vector<vector<int>> item = vector<vector<int>>(n, vector<int>(m + 1, 0));
for (int i = 0; i < n; i++) {
cin >> item[i][0];
for (int j = 0; j < item[i][0]; j++) {
cin ... | replace | 10 | 11 | 10 | 11 | 0 | |
p03126 | C++ | Runtime Error | #include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
typedef long long ll;
#define rep(i, n) for (ll i = 0, i##_len = (n); i < i##_len; ++i)
using namespace std;
#define sz(x) ((int)(x).size())
#define ZERO(a) memset(a, 0, sizeof(a))
#define MINUS(a) memset(a, 0xff, sizeof(a))
#define MEMSET(v, h) memset((v),... | #include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
typedef long long ll;
#define rep(i, n) for (ll i = 0, i##_len = (n); i < i##_len; ++i)
using namespace std;
#define sz(x) ((int)(x).size())
#define ZERO(a) memset(a, 0, sizeof(a))
#define MINUS(a) memset(a, 0xff, sizeof(a))
#define MEMSET(v, h) memset((v),... | replace | 42 | 43 | 42 | 43 | 0 | |
p03126 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> suki(m, 0);
string line;
for (int i = 0; i < n; i++) {
int k;
cin >> k;
for (int j = 0; j < k; j++) {
int id;
cin >> id;
suki[id - 1]++;
}
}
int likecount = 0;
for (int l : ... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> suki(m, 0);
string line;
for (int i = 0; i < n; i++) {
int k;
cin >> k;
for (int j = 0; j < k; j++) {
int id;
cin >> id;
suki[id - 1]++;
}
}
int likecount = 0;
for (int i = ... | replace | 18 | 20 | 18 | 20 | TLE | |
p03126 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, i, r = 0;
cin >> n >> m;
set<int> s[i];
for (i = 0; i < n; i++) {
int k;
cin >> k;
for (int j = 0; j < k; j++) {
int a;
cin >> a;
s[i].insert(a);
}
}
for (int j = 1; j <= m; j++) {
bool b = 1;
for... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, i, r = 0;
cin >> n >> m;
set<int> s[n];
for (i = 0; i < n; i++) {
int k;
cin >> k;
for (int j = 0; j < k; j++) {
int a;
cin >> a;
s[i].insert(a);
}
}
for (int j = 1; j <= m; j++) {
bool b = 1;
for... | replace | 6 | 7 | 6 | 7 | 0 | |
p03126 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> K(N);
vector<vector<int>> A(N, vector<int>(K));
for (int i = 0; i < N; ++i) {
cin >> K[i];
for (int j = 0; j < K[i]; ++j) {
cin >> A[i][j];
}
}
vector<int> like(M);
int ans = 0;
for (int... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> K(N);
vector<vector<int>> A(N, vector<int>(M));
for (int i = 0; i < N; ++i) {
cin >> K[i];
for (int j = 0; j < K[i]; ++j) {
cin >> A[i][j];
}
}
vector<int> like(M);
int ans = 0;
for (int... | replace | 7 | 8 | 7 | 8 | 0 | |
p03126 | C++ | Runtime Error | // おまじない
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<long int> v(m);
for (int i = 0; i < n; i++) {
int f = 0;
cin >> f;
for (int j = 0; j < f; j++) {
int a = 0;
cin >> a;
v.at(a) += 1;
}
}
int s = 0;
for (int i = 0; i <... | // おまじない
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<long int> v(m);
for (int i = 0; i < n; i++) {
int f = 0;
cin >> f;
for (int j = 0; j < f; j++) {
int a = 0;
cin >> a;
v.at(a - 1) += 1;
}
}
int s = 0;
for (int i = 0;... | replace | 19 | 20 | 19 | 20 | 0 | |
p03126 | 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 ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
int main() {
int n, m;
cin >> n >> m;
vector<int> food(n, 0);
REP(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 ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
int main() {
int n, m;
cin >> n >> m;
vector<int> food(m, 0);
REP(i... | replace | 10 | 11 | 10 | 11 | 0 | |
p03126 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <functional>
#include <iomanip>
#include <iostream>
#include <numeric>
#include <sstream>
#include <string>
#include <time.h>
#include <tuple>
#include <vector>
// #include "bits/stdc++.h"
using name... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <functional>
#include <iomanip>
#include <iostream>
#include <numeric>
#include <sstream>
#include <string>
#include <time.h>
#include <tuple>
#include <vector>
// #include "bits/stdc++.h"
using name... | replace | 38 | 40 | 38 | 40 | 0 | |
p03126 | C++ | Runtime Error | #include <iostream>
#include <stdio.h>
using namespace std;
int main(void) {
int N, M;
scanf("%d %d", &N, &M);
int menu[30] = {0};
for (int i = 0; i < N; i++) {
int K;
scanf("%d", &K);
for (int i = 0; i < K; i++) {
int A;
scanf("%d", &A);
menu[A]++;
}
}
int ans = 0;
for ... | #include <iostream>
#include <stdio.h>
using namespace std;
int main(void) {
int N, M;
scanf("%d %d", &N, &M);
int menu[30] = {0};
for (int i = 0; i < N; i++) {
int K;
scanf("%d", &K);
for (int i = 0; i < K; i++) {
int A;
scanf("%d", &A);
menu[A - 1]++;
}
}
int ans = 0;
... | replace | 14 | 15 | 14 | 15 | 0 | |
p03126 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <iostream>
#include <limits>
#include <map>
#include <string>
#include <vector>
using namespace std;
#define rep(i, N) for (int i = 0; i < N; i++)
typedef long long ll;
int main(void) {
int N, M;
cin >> N >> M;
vector<int> like(N, 0);
rep(i, N) {
int K;
... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <limits>
#include <map>
#include <string>
#include <vector>
using namespace std;
#define rep(i, N) for (int i = 0; i < N; i++)
typedef long long ll;
int main(void) {
int N, M;
cin >> N >> M;
vector<int> like(M, 0);
rep(i, N) {
int K;
... | replace | 16 | 17 | 16 | 17 | 0 | |
p03126 | C++ | Runtime Error | // Foods Loved by Everyone
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, x, y) for (int i = x; i < y; i++)
#define gcd(a, b) __gcd(a, b)
#define lcm(a, b) (a / __gcd(a, b) * b)
#define range(a) (a).begin(), (a).end()
#define pb push_back
const int inf = 2147483647;
int main() {
... | // Foods Loved by Everyone
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, x, y) for (int i = x; i < y; i++)
#define gcd(a, b) __gcd(a, b)
#define lcm(a, b) (a / __gcd(a, b) * b)
#define range(a) (a).begin(), (a).end()
#define pb push_back
const int inf = 2147483647;
int main() {
... | delete | 19 | 20 | 19 | 19 | -6 | double free or corruption (out)
|
p03126 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> food(M);
for (int i = 0; i < N; i++) {
int K;
cin >> K;
for (int j = 0; j < K; j++) {
int A;
cin >> A;
food.at(A)++;
}
}
int count = 0;
for (int i = 0; i < M; i++) {
if... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> food(M);
for (int i = 0; i < N; i++) {
int K;
cin >> K;
for (int j = 0; j < K; j++) {
int A;
cin >> A;
food.at(A - 1)++;
}
}
int count = 0;
for (int i = 0; i < M; i++) {
... | replace | 15 | 16 | 15 | 16 | 0 | |
p03126 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define SORT(c) sort((c).begin(), (c).end())
#define REVERSE(c) reverse((c).begin(), (c).end());
const long long MOD = 10e9 + 7;
typedef long long ll;
const double rate = 380000.0;
int main() {
int N, M;
cin >> N >> ... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define SORT(c) sort((c).begin(), (c).end())
#define REVERSE(c) reverse((c).begin(), (c).end());
const long long MOD = 10e9 + 7;
typedef long long ll;
const double rate = 380000.0;
int main() {
int N, M;
cin >> N >> ... | replace | 19 | 20 | 19 | 20 | 0 | |
p03126 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, a, n) for (int i = a; i < n; i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
int n, m;
cin >> n >> m;
map<int, int> mp;
rep(i, 0, n) {
int k;
cin >> k;
vector<int> a(k);
rep(j, 0, k) {
cin >> a[i];
mp[a[i... | #include <bits/stdc++.h>
#define rep(i, a, n) for (int i = a; i < n; i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
int n, m;
cin >> n >> m;
map<int, int> mp;
rep(i, 0, n) {
int k;
cin >> k;
vector<int> a(k);
rep(j, 0, k) {
cin >> a[j];
mp[a[j... | replace | 15 | 17 | 15 | 17 | 0 | |
p03126 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
#define ll long long
const double EPS = 1e-10;
int main() {
ll n, m;
ll ans = 0;
cin >> n >> m;
vector<ll> a(m, ... | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
#define ll long long
const double EPS = 1e-10;
int main() {
ll n, m;
ll ans = 0;
cin >> n >> m;
vector<ll> a(m, ... | replace | 24 | 25 | 24 | 25 | 0 | |
p03126 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> k(n);
vector<vector<int>> a(m, vector<int>(m));
vector<vector<int>> result(n);
for (int i = 0; i < n; i++) {
cin >> k[i];
for (int j = 0; j < k[i]; j++) {
cin >> a... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> k(n);
vector<vector<int>> a(n, vector<int>(m));
vector<vector<int>> result(n);
for (int i = 0; i < n; i++) {
cin >> k[i];
for (int j = 0; j < k[i]; j++) {
cin >> a... | replace | 9 | 10 | 9 | 10 | 0 | |
p03126 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using p = pair<int, int>;
#define int long long
#define rep(i, N) for (int i = 0; i < N; i++)
signed main() {
int N, M;
cin >> N >> M;
int A[N];
rep(i, N) A[i] = 0;
int a, k;
rep(i, N) {
cin >> k;
rep(i, k) {
cin >> a;
A[a - 1]++;
}
}
... | #include <bits/stdc++.h>
using namespace std;
using p = pair<int, int>;
#define int long long
#define rep(i, N) for (int i = 0; i < N; i++)
signed main() {
int N, M;
cin >> N >> M;
vector<int> A(M, 0);
int a, k;
rep(i, N) {
cin >> k;
rep(i, k) {
cin >> a;
A[a - 1]++;
}
}
int ans =... | replace | 9 | 11 | 9 | 10 | 0 | |
p03126 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define IOS \
ios::sync_with_stdio(false); \
cin.tie(0);
#define FOR(i, s, n) for (int i = (s); i < (n); i++)
#define REP(i, n) FOR(i, 0, n)
#define RREP(i... | #include <bits/stdc++.h>
using namespace std;
#define IOS \
ios::sync_with_stdio(false); \
cin.tie(0);
#define FOR(i, s, n) for (int i = (s); i < (n); i++)
#define REP(i, n) FOR(i, 0, n)
#define RREP(i... | replace | 21 | 22 | 21 | 22 | -11 | |
p03126 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)n; i++)
int main() {
int n, m;
cin >> n >> m;
vector<int> food(n);
rep(i, n) {
int k;
cin >> k;
rep(j, k) {
int a;
cin >> a;
food[a - 1]++;
}
}
int ans = 0;
rep... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)n; i++)
int main() {
int n, m;
cin >> n >> m;
vector<int> food(m);
rep(i, n) {
int k;
cin >> k;
rep(j, k) {
int a;
cin >> a;
food[a - 1]++;
}
}
int ans = 0;
rep... | replace | 8 | 9 | 8 | 9 | 0 | |
p03126 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M, ans = 0;
cin >> N >> M;
vector<int> B(M);
for (int i = 0; i < N; i++) {
int K;
cin >> K;
for (int j = 0; j < K; j++) {
int A;
cin >> A;
B.at(A - 1)++;
}
}
for (int i = 0; i < N; i++) {
if (B.at(i) ==... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M, ans = 0;
cin >> N >> M;
vector<int> B(M);
for (int i = 0; i < N; i++) {
int K;
cin >> K;
for (int j = 0; j < K; j++) {
int A;
cin >> A;
B.at(A - 1)++;
}
}
for (int i = 0; i < M; i++) {
if (B.at(i) ==... | replace | 17 | 18 | 17 | 18 | 0 | |
p03126 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define INF 1000007
#define MOD 998244353
#define int long long int
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define rep(i, n) FOR(i, 0, n)
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int lcm(int a, int b) { return a / gcd(a, b) * b; }
int mpow(int... | #include <bits/stdc++.h>
using namespace std;
#define INF 1000007
#define MOD 998244353
#define int long long int
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define rep(i, n) FOR(i, 0, n)
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int lcm(int a, int b) { return a / gcd(a, b) * b; }
int mpow(int... | replace | 24 | 25 | 24 | 25 | 0 | |
p03126 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define mk(a, b) make_pair(a, b)
#define pii pair<int, int>
using namespace std;
inline int read() {
int X = 0, w = 1;
char c = getchar();
while (c < '0' || c > '9') {
if (c == '-')
w = -1;
c = getchar();
}
while (c >= '0' && c <= '9')
X = (X << 3) + (X << 1) + c - '... | #include <bits/stdc++.h>
#define mk(a, b) make_pair(a, b)
#define pii pair<int, int>
using namespace std;
inline int read() {
int X = 0, w = 1;
char c = getchar();
while (c < '0' || c > '9') {
if (c == '-')
w = -1;
c = getchar();
}
while (c >= '0' && c <= '9')
X = (X << 3) + (X << 1) + c - '... | replace | 25 | 26 | 25 | 26 | TLE | |
p03126 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main() {
int N, M;
cin >> N;
cin >> M;
int K[N];
int A[M][M];
int min = 30;
int num = 0;
for (int j = 0; j < N; j++) {
cin >> K[j];
if (min > K[j]) {
min = K[j];
num = j;
}
for (int i = 0; i... | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main() {
int N, M;
cin >> N;
cin >> M;
int K[N];
int A[N][M];
int min = 30;
int num = 0;
for (int j = 0; j < N; j++) {
cin >> K[j];
if (min > K[j]) {
min = K[j];
num = j;
}
for (int i = 0; i... | replace | 11 | 12 | 11 | 12 | 0 | |
p03126 | Python | Runtime Error | N, M = map(int, input().split())
inputs = [[i for i in input().split()] for _ in range(N)]
ans = set(inputs[0])
for item in inputs:
ans &= set(inputs[1:])
print(len(ans))
| N, M = map(int, input().split())
inputs = [[i for i in input().split()] for _ in range(N)]
ans = set(inputs[0])
for item in inputs:
ans &= set(item[1:])
print(len(ans))
| replace | 6 | 7 | 6 | 7 | TypeError: unhashable type: 'list' | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03126/Python/s588663845.py", line 7, in <module>
ans &= set(inputs[1:])
TypeError: unhashable type: 'list'
|
p03126 | Python | Runtime Error | N, M = map(int, input().split())
favorites = {*tuple(range(1, M + 1))}
for _ in range(N):
K, *fav = map(int, input().split())
favorites = favorites & set(fav)
print(len(favorites))
| N, M = map(int, input().split())
favorites = set(i for i in range(1, M + 1))
for _ in range(N):
K, *fav = map(int, input().split())
favorites = favorites & set(fav)
print(len(favorites))
| replace | 1 | 2 | 1 | 2 | 0 | |
p03126 | Python | Runtime Error | N, M = map(int, input().split())
loved_by_everyone = [0] * M
for _ in range(N):
like_list = list(map(int, input().split()))
for like in like_list[1:]:
loved_by_everyone[like] += 1
kinds = 0
for food in loved_by_everyone:
kinds += 1 if food == N else 0
print(kinds)
| N, M = map(int, input().split())
loved_by_everyone = [0] * M
for _ in range(N):
like_list = list(map(int, input().split()))
for like in like_list[1:]:
loved_by_everyone[like - 1] += 1
kinds = 0
for food in loved_by_everyone:
kinds += 1 if food == N else 0
print(kinds)
| replace | 5 | 6 | 5 | 6 | 0 | |
p03126 | Python | Runtime Error | n, m = map(int, input().split())
res = [0] * m
for i in range(n):
o = list(map(int, input().split()))
for j, x in enumerate(o):
if j != 0:
res[x] += 1
ans = sum(1 for x in res if x == n)
print(ans)
| n, m = map(int, input().split())
res = [0] * m
for i in range(n):
o = list(map(int, input().split()))
for j, x in enumerate(o):
if j != 0:
res[x - 1] += 1
ans = sum(1 for x in res if x == n)
print(ans)
| replace | 7 | 8 | 7 | 8 | 0 | |
p03126 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rrep(i, n) for (int i = 1; i < (int)(n + 1); i++)
int main() {
int N, M;
cin >> N >> M;
vector<int> A(M);
vector<int> K(N);
rep(i, N) {
cin >> K[i];
... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rrep(i, n) for (int i = 1; i < (int)(n + 1); i++)
int main() {
int N, M;
cin >> N >> M;
vector<int> A(M);
vector<int> K(N);
rep(i, N) {
cin >> K[i];
... | replace | 16 | 18 | 16 | 18 | 0 | |
p03126 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define YES cout << "YES" << endl
#define NO cout << "NO" << endl
#define Yes cout << "Yes" << endl
#define No cout << "No" << endl
#define ANS cout << ans << endl
#define all(a) a.begin(), a.end()
#define SORT(a) sort(al... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define YES cout << "YES" << endl
#define NO cout << "NO" << endl
#define Yes cout << "Yes" << endl
#define No cout << "No" << endl
#define ANS cout << ans << endl
#define all(a) a.begin(), a.end()
#define SORT(a) sort(al... | replace | 63 | 65 | 63 | 65 | 0 | |
p03126 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> A(M);
for (int i = 0; i < N; i++) {
int K;
cin >> K;
for (int j = 0; j < K; j++) {
int As;
cin >> As;
A.at(As - 1)++;
}
}
int ans = 0;
for (int i = 0; i < N; i++) {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> A(M);
for (int i = 0; i < N; i++) {
int K;
cin >> K;
for (int j = 0; j < K; j++) {
int As;
cin >> As;
A.at(As - 1)++;
}
}
int ans = 0;
for (int i = 0; i < M; i++) {
... | replace | 26 | 27 | 26 | 27 | 0 | |
p03126 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M, K, a, count = 0;
cin >> N >> M;
vector<int> menu(M);
for (int i = 0; i < N; i++) {
cin >> K;
for (int j = 0; j < K; j++) {
cin >> a;
menu.at(a - 1)++;
}
}
for (int i = 0; i < N; i++)
if (menu.at(i) == N)
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M, K, a, count = 0;
cin >> N >> M;
vector<int> menu(M);
for (int i = 0; i < N; i++) {
cin >> K;
for (int j = 0; j < K; j++) {
cin >> a;
menu.at(a - 1)++;
}
}
for (int i = 0; i < M; i++)
if (menu.at(i) == N)
... | replace | 14 | 15 | 14 | 15 | 0 | |
p03126 | 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 vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
ty... | #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 vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
ty... | replace | 63 | 64 | 63 | 64 | -11 | |
p03126 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, k, a, c = 0;
cin >> n >> m;
vector<int> v(m, 0);
for (int i = 0; i < n; i++) {
cin >> k;
for (int j = 0; j < k; k++) {
cin >> a;
v[a - 1]++;
}
}
for (int i = 0; i < m; i++)
if (v[i] == n)
c++;
cout << c... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, k, a, c = 0;
cin >> n >> m;
vector<int> v(m, 0);
for (int i = 0; i < n; i++) {
cin >> k;
for (int j = 0; j < k; j++) {
cin >> a;
v[a - 1]++;
}
}
for (int i = 0; i < m; i++)
if (v[i] == n)
c++;
cout << c... | replace | 9 | 10 | 9 | 10 | TLE | |
p03126 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vin = vector<int>;
using vll = vector<long long>;
using vdo = vector<double>;
using vvin = vector<vector<int>>;
using vvll = vector<vector<long long>>;
using vvdo = vector<vector<double>>;
using vstr = vector<string>;
using vvstr = vector<vector<... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vin = vector<int>;
using vll = vector<long long>;
using vdo = vector<double>;
using vvin = vector<vector<int>>;
using vvll = vector<vector<long long>>;
using vvdo = vector<vector<double>>;
using vstr = vector<string>;
using vvstr = vector<vector<... | replace | 28 | 29 | 28 | 29 | 0 | |
p03126 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <map> // pair
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<vector<int>> A(N, vector<int>(M, 0));
vector<int> K(M);
for (int i = 0; i < N; i++) {
cin >> K.at(i);
for (int j = 0; j < K.at(i); j++) {
int temp;
cin >> temp;
A.at(i)... | #include <bits/stdc++.h>
#include <map> // pair
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<vector<int>> A(N, vector<int>(M, 0));
vector<int> K(M);
for (int i = 0; i < N; i++) {
int ind;
cin >> ind;
for (int j = 0; j < ind; j++) {
int temp;
cin >> temp;
A.... | replace | 11 | 13 | 11 | 14 | 0 | |
p03126 | C++ | Runtime Error |
#include <bits/stdc++.h>
#include <iostream>
#include <string>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> kk(n, 0);
for (int i = 0; i < n; i++) {
int k;
cin >> k;
for (int j = 0; j < k; j++) {
int a;
cin >> a;
a--;
++kk[a];
}
}
int ans =... |
#include <bits/stdc++.h>
#include <iostream>
#include <string>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> kk(m, 0);
for (int i = 0; i < n; i++) {
int k;
cin >> k;
for (int j = 0; j < k; j++) {
int a;
cin >> a;
a--;
++kk[a];
}
}
int ans =... | replace | 9 | 10 | 9 | 10 | 0 | |
p03126 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int typeArray[m];
int like[n][m];
for (int i = 0; i < n; i++) {
int typeCount;
cin >> typeCount;
typeArray[i] = typeCount;
for (int j = 0; j < typeCount; j++) {
cin >> like[i][j];
}
}
if (n == 1) {... | #include <iostream>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int typeArray[n];
int like[n][m];
for (int i = 0; i < n; i++) {
int typeCount;
cin >> typeCount;
typeArray[i] = typeCount;
for (int j = 0; j < typeCount; j++) {
cin >> like[i][j];
}
}
if (n == 1) {... | replace | 8 | 9 | 8 | 9 | 0 | |
p03126 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <map>
using namespace std;
int main(void) {
int N, M;
cin >> N >> M;
vector<int> K(N);
vector<vector<int>> A(N, vector<int>(N));
for (int i = 0; i < N; i++) {
cin >> K[i];
int j = 0;
while (j < K[i]) {
cin >> A[i][j];
j++;
}
}
map<int, int> mp;... | #include <bits/stdc++.h>
#include <map>
using namespace std;
int main(void) {
int N, M;
cin >> N >> M;
vector<int> K(N);
vector<vector<int>> A(N, vector<int>(M));
for (int i = 0; i < N; i++) {
cin >> K[i];
int j = 0;
while (j < K[i]) {
cin >> A[i][j];
j++;
}
}
map<int, int> mp;... | replace | 7 | 8 | 7 | 8 | 0 | |
p03126 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> K(N, 0);
for (int i = 0; i < N; i++) {
int a;
cin >> a;
for (int j = 0; j < a; j++) {
int A;
cin >> A;
A--;
K[A]++;
}
}
int count = 0;
for (int i = 0; i < M; i++) {
i... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> K(M, 0);
for (int i = 0; i < N; i++) {
int a;
cin >> a;
for (int j = 0; j < a; j++) {
int A;
cin >> A;
A--;
K[A]++;
}
}
int count = 0;
for (int i = 0; i < M; i++) {
i... | replace | 5 | 6 | 5 | 6 | 0 | |
p03126 | C++ | Runtime Error | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
int N, M;
int ans = 0;
cin >> N >> M;
vector<int> like_foods(M, 0);
rep(i, N) {
int k;
cin >> k;
vector<int> A(k);
rep(j, k) cin >> A[j];
for (int a : A)... | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
int N, M;
int ans = 0;
cin >> N >> M;
vector<int> like_foods(M, 0);
rep(i, N) {
int k;
cin >> k;
vector<int> A(k);
rep(j, k) cin >> A[j];
for (int a : A)... | replace | 17 | 18 | 17 | 18 | 0 | |
p03126 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int K[N], A[N][M];
int ansv = 0;
int ans = 0;
for (int i = 0; i < N; i++) {
cin >> K[i];
for (int j = 0; j < K[i]; j++) {
cin >> A[i][j];
}
}
for (int i = 0; i < K[0]; i++) {
ansv = 0;
for (int j... | #include <iostream>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int K[N], A[N][M];
int ansv = 0;
int ans = 0;
for (int i = 0; i < N; i++) {
cin >> K[i];
for (int j = 0; j < K[i]; j++) {
cin >> A[i][j];
}
}
for (int i = 0; i < K[0]; i++) {
ansv = 0;
for (int j... | replace | 21 | 22 | 21 | 22 | 0 | |
p03126 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
int main() {
int N, M;
cin >> N >> M;
vector<int> cnt(N);
rep(i, N) {
int K;
cin >> K;
rep(j, K)... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
int main() {
int N, M;
cin >> N >> M;
vector<int> cnt(M);
rep(i, N) {
int K;
cin >> K;
rep(j, K)... | replace | 13 | 14 | 13 | 14 | 0 | |
p03126 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll INF = 1e16;
const ll mod = 1000000007;
#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,... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll INF = 1e16;
const ll mod = 1000000007;
#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,... | insert | 65 | 65 | 65 | 66 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): vector::_M_range_check: __n (which is 140047065350734) >= this->size() (which is 4)
|
p03126 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> v(M);
for (int i = 0; i < N; i++) {
int K;
cin >> K;
vector<int> foods(K);
for (int j = 0; j < K; j++)
cin >> foods[j];
for (int f : foo... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> v(M);
for (int i = 0; i < N; i++) {
int K;
cin >> K;
vector<int> foods(K);
for (int j = 0; j < K; j++)
cin >> foods[j];
for (int f : foo... | replace | 18 | 19 | 18 | 19 | 0 | |
p03126 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> f(m);
int a, b, c;
for (int i = 0; i < n; i++) {
f.at(i) = 0;
}
for (int i = 0; i < n; i++) {
cin >> a;
for (int j = 0; j < a; j++) {
cin >> b;
f.at(b - 1) += 1;
}
}
for (in... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> f(m);
int a, b, c;
for (int i = 0; i < m; i++) {
f.at(i) = 0;
}
for (int i = 0; i < n; i++) {
cin >> a;
for (int j = 0; j < a; j++) {
cin >> b;
f.at(b - 1) += 1;
}
}
for (in... | replace | 11 | 12 | 11 | 12 | 0 | |
p03126 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
auto k = vector<int>(n, 0);
auto a = vector<vector<int>>(n, vector<int>(n, 0));
for (int i = 0; i < n; i++) {
cin >> k[i];
for (int j = 0; j < k[i]; j++) {
cin >> a[i][j];
}
}
auto v = vector<int>(m + ... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
auto k = vector<int>(n, 0);
auto a = vector<vector<int>>(n, vector<int>(m, 0));
for (int i = 0; i < n; i++) {
cin >> k[i];
for (int j = 0; j < k[i]; j++) {
cin >> a[i][j];
}
}
auto v = vector<int>(m + ... | replace | 7 | 8 | 7 | 8 | 0 | |
p03126 | C++ | Runtime Error | #include <algorithm>
#include <array>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
... | #include <algorithm>
#include <array>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
... | replace | 20 | 21 | 20 | 21 | 0 | |
p03126 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<vector<bool>> A(M, vector<bool>(M, false));
for (int i = 0; i < N; i++) {
int K;
cin >> K;
for (int j = 0; j < K; j++) {
int a;
cin >> a;
A[i][a - 1] = true;
}
}
int ans = 0;
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<vector<bool>> A(N, vector<bool>(M, false));
for (int i = 0; i < N; i++) {
int K;
cin >> K;
for (int j = 0; j < K; j++) {
int a;
cin >> a;
A[i][a - 1] = true;
}
}
int ans = 0;
... | replace | 8 | 9 | 8 | 9 | 0 | |
p03126 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, ans = 0;
cin >> n >> m;
vector<vector<int>> data(n, vector<int>(m));
vector<int> like(m);
for (int i = 0; i < n; i++) {
cin >> data.at(i).at(0);
for (int j = 0; j < data.at(i).at(0); j++) {
cin >> data.at(i).at(j + 1);
}
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, ans = 0;
cin >> n >> m;
vector<vector<int>> data(n * m, vector<int>(n * m));
vector<int> like(m * n);
for (int i = 0; i < n; i++) {
cin >> data.at(i).at(0);
for (int j = 0; j < data.at(i).at(0); j++) {
cin >> data.at(i).at(j +... | replace | 6 | 8 | 6 | 8 | 0 | |
p03126 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> v(m, 0);
int k, a;
for (int i = 0; i < n; i++) {
cin >> k;
for (int j = 0; j < k; j++) {
cin >> a;
v.at(a - 1)++;
}
}
sort(v.begin(), v.end());
int i = m - 1, ans = 0;
while (v.at... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> v(m, 0);
int k, a;
for (int i = 0; i < n; i++) {
cin >> k;
for (int j = 0; j < k; j++) {
cin >> a;
v.at(a - 1)++;
}
}
sort(v.begin(), v.end());
int ans = 0;
for (int i = m - 1; i ... | replace | 18 | 22 | 18 | 23 | 0 | |
p03126 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
ll a, b;
cin >> a >> b;
vector<ll> vec(b);
for (ll i = 0; i < a; i++) {
ll c;
cin >> c;
for (ll j = 0; i < c; j++) {
ll d;
cin >> d;
vec.at(d - 1) += 1;
}
}
ll e = 0;
for (ll i = 0; i < b; i... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
ll a, b;
cin >> a >> b;
vector<ll> vec(b);
for (ll i = 0; i < a; i++) {
ll c;
cin >> c;
for (ll j = 0; j < c; j++) {
ll d;
cin >> d;
vec.at(d - 1) += 1;
}
}
ll e = 0;
for (ll i = 0; i < b; i... | replace | 11 | 12 | 11 | 12 | TLE | |
p03126 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, d, e;
cin >> a >> b;
vector<int> c(b, 0);
for (int i = 0; i < a; i++) {
cin >> d;
for (int j = 0; j < d; j++) {
cin >> e;
c.at(e - 1)++;
}
}
int count = 0;
for (int i = 0; i < b; b++) {
if (c.at(i) == a)
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, d, e;
cin >> a >> b;
vector<int> c(b, 0);
for (int i = 0; i < a; i++) {
cin >> d;
for (int j = 0; j < d; j++) {
cin >> e;
c.at(e - 1)++;
}
}
int count;
for (int i = 0; i < b; i++) {
if (c.at(i) == a)
co... | replace | 14 | 16 | 14 | 16 | TLE | |
p03127 | C++ | Time Limit Exceeded | #include <algorithm>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef ... | #include <algorithm>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef ... | replace | 30 | 36 | 30 | 34 | TLE | |
p03127 | C++ | Time Limit Exceeded | #include <cmath>
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int a[n];
for (int i = 0; i < n; i++) {
cin >> a[i];
}
int min;
min = a[0];
for (int i = 1; i < n; i++) {
if (min > a[i]) {
min = a[i];
}
}
int co = 1;
for (int i = min; i > 2; i--) {
... | #include <cmath>
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int a[n];
for (int i = 0; i < n; i++) {
cin >> a[i];
}
int min;
min = a[0];
for (int i = 1; i < n; i++) {
if (min > a[i]) {
min = a[i];
}
}
int co = 1;
for (int i = min; i > 2; i -= 2) ... | replace | 25 | 26 | 25 | 26 | TLE | |
p03127 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <stdlib.h>
#include <string>
#include <vector>
int gcd(int x, int y) {
int r;
while ((r = x % y) != 0) {
x = y;
y = r;
}
return y;
}
int main() {
int n, a[10001],... | #include <algorithm>
#include <cmath>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <stdlib.h>
#include <string>
#include <vector>
int gcd(int x, int y) {
int r;
while ((r = x % y) != 0) {
x = y;
y = r;
}
return y;
}
int main() {
int n, a[100001]... | replace | 21 | 22 | 21 | 22 | 0 | |
p03127 | Python | Runtime Error | from math import gcd
n = int(input())
a = list(map(int, input().split()))
ans = a[0]
for i in range(1, n):
ans = gcd(ans, a[i])
print(ans)
| from fractions import gcd
n = int(input())
a = list(map(int, input().split()))
ans = a[0]
for i in range(1, n):
ans = gcd(ans, a[i])
print(ans)
| replace | 0 | 1 | 0 | 1 | 0 | |
p03127 | C++ | Runtime Error | #include <algorithm>
#include <functional>
#include <iostream>
using namespace std;
#define MAX_N 100000
int gcd(int n, int m) {
if (n % m) {
return gcd(m, n % m);
} else {
return m;
}
}
int main() {
int N;
int A[MAX_N] = {0};
int min = 1e9 + 100;
cin >> N;
for (int i = 0; i < N; i++) {
c... | #include <algorithm>
#include <functional>
#include <iostream>
using namespace std;
#define MAX_N 100000
int gcd(int n, int m) {
if (n % m) {
return gcd(m, n % m);
} else {
return m;
}
}
int main() {
int N;
int A[MAX_N] = {0};
int min = 1e9 + 100;
cin >> N;
for (int i = 0; i < N; i++) {
c... | replace | 24 | 44 | 24 | 26 | 0 | |
p03127 | C++ | Runtime Error | #include <bits/stdc++.h>
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define ll long long
#define pii std:... | #include <bits/stdc++.h>
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define ll long long
#define pii std:... | replace | 60 | 61 | 60 | 61 | 0 | |
p03127 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
const int INF = 1 << 30;
const ll INFll = 1ll << 60;
int gcd(int a, int b) {
if (a < b) {
int tmp = a;
a = b;
b = tmp;
}
return a % b == 0 ? b : gcd(b, a % b);
}
int main() {
int n;
cin >> n;
... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
const int INF = 1 << 30;
const ll INFll = 1ll << 60;
int gcd(int a, int b) {
if (a < b) {
int tmp = a;
a = b;
b = tmp;
}
return a % b == 0 ? b : gcd(b, a % b);
}
int main() {
int n;
cin >> n;
... | replace | 25 | 26 | 25 | 26 | TLE | |
p03127 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ll long long
using namespace std;
int main(void) {
ll n;
cin >> n;
ll mini;
bool bf = true;
vector<ll> a(n);
rep(i, n) { cin >> a[i]; }
sort(a.begin(), a.end());
while (bf) {
bf = false;
for (int i = 1; i < ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ll long long
using namespace std;
int main(void) {
ll n;
cin >> n;
ll mini;
bool bf = true;
vector<ll> a(n);
rep(i, n) { cin >> a[i]; }
sort(a.begin(), a.end());
while (bf) {
bf = false;
for (int i = 1; i < ... | replace | 22 | 23 | 22 | 23 | 0 | |
p03127 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
using namespace std;
long long A[10101];
int main() {
int N;
cin >> N;
for (int i = 0; i < N; i++) {
cin >> A[i];
}
sort(A, A + N);
int id;
while (A[N - 2] != 0) {
for (int i = 0; i < N; i++) {
if (A[i] > 0) {
id = i;
break;
... | #include <algorithm>
#include <iostream>
using namespace std;
long long A[101010];
int main() {
int N;
cin >> N;
for (int i = 0; i < N; i++) {
cin >> A[i];
}
sort(A, A + N);
int id;
while (A[N - 2] != 0) {
for (int i = 0; i < N; i++) {
if (A[i] > 0) {
id = i;
break;
... | replace | 5 | 6 | 5 | 6 | 0 | |
p03127 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <vector>
int gcd(int a, int b) {
if (a > b) {
return gcd(b, a);
} else {
if (b % a == 0) {
return a;
} else {
return gcd(b % a, a);
}
}
}
int main() {
int n;
std::cin >> n;
std::vector<int> a(n);
for (int i = 0; i < n; i++)
... | #include <algorithm>
#include <iostream>
#include <vector>
int gcd(int a, int b) {
if (a > b) {
return gcd(b, a);
} else {
if (b % a == 0) {
return a;
} else {
return gcd(b % a, a);
}
}
}
int main() {
int n;
std::cin >> n;
std::vector<int> a(n);
for (int i = 0; i < n; i++)
... | replace | 23 | 37 | 23 | 25 | TLE | |
p03127 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define all(v) v.begin(), v.end()
#define rep(i, n) for (int i = 0; i < n; i++)
template <typename T> T gcd(T a, T b) { return b ? gcd(b, a % b) : a; }
typedef long long ll;
int main() {
ll n;
cin >> n;
vector<ll> a(n);
rep(i, n) cin >> a[i];
sort(all(a));
ll... | #include <bits/stdc++.h>
using namespace std;
#define all(v) v.begin(), v.end()
#define rep(i, n) for (int i = 0; i < n; i++)
template <typename T> T gcd(T a, T b) { return b ? gcd(b, a % b) : a; }
typedef long long ll;
int main() {
ll n;
cin >> n;
vector<ll> a(n);
rep(i, n) cin >> a[i];
sort(all(a));
fo... | replace | 15 | 17 | 15 | 16 | 0 | |
p03127 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int int64_t
const int M = 35;
int n, ans, a[M];
int32_t main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin >> n >> a[1];
ans = a[1];
for (int i = 2; i <= n; i++) {
cin >> a[i];
ans = __gcd(ans, a[i]);
}
cout << ans;
return... | #include <bits/stdc++.h>
using namespace std;
#define int int64_t
const int M = 1e5 + 5;
int n, ans, a[M];
int32_t main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin >> n >> a[1];
ans = a[1];
for (int i = 2; i <= n; i++) {
cin >> a[i];
ans = __gcd(ans, a[i]);
}
cout << ans;
r... | replace | 3 | 4 | 3 | 4 | 0 | |
p03127 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int gcd(int a, int b) {
if (b >= a)
return gcd(b, a);
if (b == 0)
return a;
return gcd(b, a % b);
}
int main() {
int n, ret;
cin >> n >> ret;
for (int i = 1; i < n; i++) {
int a;
cin >> a;
ret = gcd(ret, a);
}
cout << ret;
return 0;
} | #include <iostream>
using namespace std;
int gcd(int a, int b) {
if (b > a)
return gcd(b, a);
if (b == 0)
return a;
return gcd(b, a % b);
}
int main() {
int n, ret;
cin >> n >> ret;
for (int i = 1; i < n; i++) {
int a;
cin >> a;
ret = gcd(ret, a);
}
cout << ret;
return 0;
} | replace | 4 | 5 | 4 | 5 | TLE |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.