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
p02775
C++
Runtime Error
#include <iostream> using namespace std; const int mxN = 1e5 + 5; long long dp[mxN][2]; int main() { string s; cin >> s; int n = s.size(); dp[0][1] = 1; for (int i = 0; i < n; ++i) { int cur = s[i] - '0'; dp[i + 1][0] = min(dp[i][0] + cur, dp[i][1] + 10 - cur); dp[i + 1][1] = min(dp[i][0] + cur ...
#include <iostream> using namespace std; const int mxN = 1e6 + 5; long long dp[mxN][2]; int main() { string s; cin >> s; int n = s.size(); dp[0][1] = 1; for (int i = 0; i < n; ++i) { int cur = s[i] - '0'; dp[i + 1][0] = min(dp[i][0] + cur, dp[i][1] + 10 - cur); dp[i + 1][1] = min(dp[i][0] + cur ...
replace
3
4
3
4
0
p02775
C++
Runtime Error
#include <algorithm> #include <bits/stdc++.h> #include <cmath> #include <iostream> #include <string> #include <unordered_map> #include <unordered_set> using namespace std; #define ll long long #define rep(i, n) for (ll i = 0; i < (n); i++) #define FOR(i, a, b) for (ll i = (a); i < (b); i++) #define FORR(i, a, b) for (l...
#include <algorithm> #include <bits/stdc++.h> #include <cmath> #include <iostream> #include <string> #include <unordered_map> #include <unordered_set> using namespace std; #define ll long long #define rep(i, n) for (ll i = 0; i < (n); i++) #define FOR(i, a, b) for (ll i = (a); i < (b); i++) #define FORR(i, a, b) for (l...
replace
61
62
61
62
-11
p02775
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; char c[200009]; int n, m, i, j, k, l, t, x, y, cost[200009], cost1[200009]; int main() { scanf("%s", &c); n = strlen(c); m = 0; cost[n - 1] = c[n - 1] - '0'; cost1[n - 1] = 10 - cost[n - 1] + 1; for (i = n - 2; i >= 0; i--) { l = c[i] - '0'; x = 10 - l +...
#include <bits/stdc++.h> using namespace std; char c[2000009]; int n, m, i, j, k, l, t, x, y, cost[2000009], cost1[2000009]; int main() { scanf("%s", &c); n = strlen(c); m = 0; cost[n - 1] = c[n - 1] - '0'; cost1[n - 1] = 10 - cost[n - 1] + 1; for (i = n - 2; i >= 0; i--) { l = c[i] - '0'; x = 10 - ...
replace
2
4
2
4
0
p02775
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; string s; const long long SZ = 1000000; long long dp[SZ + 1][2]; int main() { cin >> s; long long ans = 0, N = s.size(); dp[0][1] = 0x3fffffff; for (long long i = 1; i <= N; i++) { long long n = s[N - i] - '0'; if (n < 9) { dp[i][0] = min(dp[i - 1][0...
#include <bits/stdc++.h> using namespace std; string s; const long long SZ = 1000009; long long dp[SZ + 1][2]; int main() { cin >> s; long long ans = 0, N = s.size(); dp[0][1] = 0x3fffffff; for (long long i = 1; i <= N; i++) { long long n = s[N - i] - '0'; if (n < 9) { dp[i][0] = min(dp[i - 1][0...
replace
4
5
4
5
0
p02775
C++
Runtime Error
#include <algorithm> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <string> #include <vector> const int MOD = 1e9 + 7; using namespace std; int ctoi(char c) { return c - '0'; } int main() { string s; long long dp[100000][2]; cin >> s; reverse(s.begin(), s.end()); dp[0][0]...
#include <algorithm> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <string> #include <vector> const int MOD = 1e9 + 7; using namespace std; int ctoi(char c) { return c - '0'; } int main() { string s; long long dp[1000000][2]; cin >> s; reverse(s.begin(), s.end()); dp[0][0...
replace
14
15
14
15
0
p02775
C++
Runtime Error
#include <algorithm> #include <cstdio> #include <iostream> using namespace std; const int maxn = 2e5 + 5; int dp[maxn][2]; int main() { // freopen("in","r",stdin); string s; cin >> s; reverse(s.begin(), s.end()); dp[0][0] = s[0] - '0'; dp[0][1] = 10 - (s[0] - '0'); for (int i = 1; i < s.size(); i++) {...
#include <algorithm> #include <cstdio> #include <iostream> using namespace std; const int maxn = 1e6 + 7; int dp[maxn][2]; int main() { // freopen("in","r",stdin); string s; cin >> s; reverse(s.begin(), s.end()); dp[0][0] = s[0] - '0'; dp[0][1] = 10 - (s[0] - '0'); for (int i = 1; i < s.size(); i++) {...
replace
6
7
6
7
0
p02775
C++
Runtime Error
#include <algorithm> #include <iostream> using namespace std; typedef long long ll; int main() { string N; cin >> N; ll dp[1000001][2]; dp[0][1] = 1; dp[0][0] = 0; for (int i = 0; i < (int)N.size(); i++) { int n = N[i] - '0'; dp[i + 1][0] = min(dp[i][0] + n, dp[i][1] + 10 - n); dp[i + 1][1] = ...
#include <algorithm> #include <iostream> using namespace std; typedef long long ll; int main() { string N; cin >> N; ll dp[1000002][2]; dp[0][1] = 1; dp[0][0] = 0; for (int i = 0; i < (int)N.size(); i++) { int n = N[i] - '0'; dp[i + 1][0] = min(dp[i][0] + n, dp[i][1] + 10 - n); dp[i + 1][1] = ...
replace
8
9
8
9
-11
p02775
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) #define rrep(i, n) for (int i = (n)-1; i >= 0; i--) #define rep1(i, n) for (int i = 1; i <= (n); i++) #define rrep1(i, n) for (int i = (n); i > 0; i--) #define ll long long #define pi pair<int, int> #define pll pair<ll, ll> #define MOD 10000000...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) #define rrep(i, n) for (int i = (n)-1; i >= 0; i--) #define rep1(i, n) for (int i = 1; i <= (n); i++) #define rrep1(i, n) for (int i = (n); i > 0; i--) #define ll long long #define pi pair<int, int> #define pll pair<ll, ll> #define MOD 10000000...
replace
23
25
23
25
0
p02775
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; constexpr ll MOD = 1e9 + 7; int mx[] = {-1, 1, 0, 0}, my[] = {0, 0, -1, 1}; string s; int dp[1000001][2]; bool visited[1000001][2]; int dfs(int n, bool m) { if (n == (int)s.length()) return 0; if (visited[n][m]) return dp[n][m]; visit...
#include <bits/stdc++.h> using namespace std; using ll = long long; constexpr ll MOD = 1e9 + 7; int mx[] = {-1, 1, 0, 0}, my[] = {0, 0, -1, 1}; string s; int dp[2000001][2]; bool visited[2000000][2]; int dfs(int n, bool m) { if (n == (int)s.length()) return 0; if (visited[n][m]) return dp[n][m]; visit...
replace
9
11
9
11
0
p02775
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define int long long using namespace std; #define rep(i, n) for (int i = 0; i < (n); ++i) typedef pair<int, int> pii; const int INF = 1l << 60; int dp[2][1001000]; int f(string n, int k) { return n[n.length() - 1 - k] - '0'; } signed main() { string N; cin >> N; dp[0][0] = f(N, 0); ...
#include <bits/stdc++.h> #define int long long using namespace std; #define rep(i, n) for (int i = 0; i < (n); ++i) typedef pair<int, int> pii; const int INF = 1l << 60; int dp[2][1001000]; int f(string &n, int k) { return n[n.length() - 1 - k] - '0'; } signed main() { string N; cin >> N; dp[0][0] = f(N, 0); ...
replace
10
11
10
11
TLE
p02775
C++
Runtime Error
#include <algorithm> #include <bitset> #include <climits> #include <complex> #include <cstring> #include <deque> #include <exception> #include <fstream> #include <functional> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <iterator> #include <limits> #include <list> ...
#include <algorithm> #include <bitset> #include <climits> #include <complex> #include <cstring> #include <deque> #include <exception> #include <fstream> #include <functional> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <iterator> #include <limits> #include <list> ...
replace
89
90
89
90
0
p02775
C++
Runtime Error
#define first f #define second s #define ll long long #define mp make_pair #define pb push_back #define pf push_front #define lb lower_bound #define ub upper_bound #include <bits/stdc++.h> #define pii pair<int, int> #define mem(a, b) memset(a, b, sizeof(a)) using namespace std; const int maxn = 2e5 + 5; const double PI...
#define first f #define second s #define ll long long #define mp make_pair #define pb push_back #define pf push_front #define lb lower_bound #define ub upper_bound #include <bits/stdc++.h> #define pii pair<int, int> #define mem(a, b) memset(a, b, sizeof(a)) using namespace std; const int maxn = 1e6 + 5; const double PI...
replace
12
13
12
13
0
p02776
C++
Runtime Error
#include <algorithm> #include <cstdio> #include <cstring> #include <map> #include <queue> #include <set> using namespace std; typedef long long LL; const int SIZEN = 100010; int a[SIZEN], b[SIZEN], c[SIZEN]; int s[SIZEN]; int N, M; struct Link { int to, next, id; } link[SIZEN << 2]; int head[SIZEN] = {0}, tot = 0; vo...
#include <algorithm> #include <cstdio> #include <cstring> #include <map> #include <queue> #include <set> using namespace std; typedef long long LL; const int SIZEN = 200010; int a[SIZEN], b[SIZEN], c[SIZEN]; int s[SIZEN]; int N, M; struct Link { int to, next, id; } link[SIZEN << 2]; int head[SIZEN] = {0}, tot = 0; vo...
replace
8
9
8
9
0
p02776
C++
Runtime Error
#include <algorithm> #include <iostream> #include <map> #include <utility> #include <vector> using namespace std; bool vis[100010]; int par[100010]; vector<pair<int, int>> G[100010]; vector<int> a, b, c, ans; int dfs(int s, int p) { vis[s] = true; int cnt = 0; for (auto x : G[s]) { if (vis[x.first]) con...
#include <algorithm> #include <iostream> #include <map> #include <utility> #include <vector> using namespace std; bool vis[100010]; int par[100010]; vector<pair<int, int>> G[100010]; vector<int> a, b, c, ans; int dfs(int s, int p) { vis[s] = true; int cnt = 0; for (auto x : G[s]) { if (vis[x.first]) con...
insert
69
69
69
73
0
p02776
C++
Runtime Error
#include <bits/stdc++.h> #define pi pair<int, int> #define l first #define r second #define pb push_back #define all(x) x.begin(), x.end() // #define DEBUG using namespace std; const int maxn = 2e5 + 1; bool b[maxn], t[maxn], usd[maxn], hon[maxn]; int rm[maxn], n, m, val[maxn], pal[maxn]; vector<pi> g[maxn], f[maxn]...
#include <bits/stdc++.h> #define pi pair<int, int> #define l first #define r second #define pb push_back #define all(x) x.begin(), x.end() // #define DEBUG using namespace std; const int maxn = 2e5 + 1; bool b[maxn], t[maxn], usd[maxn], hon[maxn]; int rm[maxn], n, m, val[maxn], pal[maxn]; vector<pi> g[maxn], f[maxn]...
insert
84
84
84
86
-11
p02776
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define int long long #define rep(i, n) for (int i = 0; i < (n); i++) #define reps(i, n) for (int i = 1; i <= (n); i++) #define all(x) begin(x), end(x) #define uniq(x) (x).erase(unique(all(x)), end(x)) #define bit(n) (1LL << (n)) #define cdiv(a, b) (((a)-1) / (b) + 1) #def...
#include <bits/stdc++.h> using namespace std; #define int long long #define rep(i, n) for (int i = 0; i < (n); i++) #define reps(i, n) for (int i = 1; i <= (n); i++) #define all(x) begin(x), end(x) #define uniq(x) (x).erase(unique(all(x)), end(x)) #define bit(n) (1LL << (n)) #define cdiv(a, b) (((a)-1) / (b) + 1) #def...
replace
71
72
71
72
0
p02776
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return true; } return false; } template <class T> bool chmin(T &a, const T &b) { if (b < a) { a = b; return true; } return false; } #define all(x) (x).beg...
#include <bits/stdc++.h> using namespace std; typedef long long ll; template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return true; } return false; } template <class T> bool chmin(T &a, const T &b) { if (b < a) { a = b; return true; } return false; } #define all(x) (x).beg...
replace
21
22
21
22
0
p02776
C++
Runtime Error
// Words are flowing out like endless rain into a paper cup // They slither while they pass they slip away across the universe // Pools of sorrow, waves of joy are drifting through my open mind // Possessing and caressing me #include <bits/stdc++.h> using namespace std; #define all(x) x.begin(), x.end() using LL = lo...
// Words are flowing out like endless rain into a paper cup // They slither while they pass they slip away across the universe // Pools of sorrow, waves of joy are drifting through my open mind // Possessing and caressing me #include <bits/stdc++.h> using namespace std; #define all(x) x.begin(), x.end() using LL = lo...
replace
73
74
73
75
-6
33d3461d-dfa0-49f0-a075-5efb5fdc4ae3.out: /home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02776/C++/s807146348.cpp:35: LL read(): Assertion `~c' failed.
p02776
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define rep(i, n, m) for (int(i) = (n); (i) < (m); (i)++) #define rrep(i, n, m) for (int(i) = (n); (i) > (m); (i)--) using ll = long long; const ll MOD = 1e9 + 7; int dfs(int p, vector<vector<vector<int>>> &lis, vector<int> &visited, vector<int> &each, vector<int>...
#include <bits/stdc++.h> using namespace std; #define rep(i, n, m) for (int(i) = (n); (i) < (m); (i)++) #define rrep(i, n, m) for (int(i) = (n); (i) > (m); (i)--) using ll = long long; const ll MOD = 1e9 + 7; int dfs(int p, vector<vector<vector<int>>> &lis, vector<int> &visited, vector<int> &each, vector<int>...
replace
44
46
44
46
0
p02777
C++
Runtime Error
#include "bits/stdc++.h" #define allr(x) x.rbegin(), x.rend() #define all(x) x.begin(), x.end() #define sp " " #define double long double #define pb push_back #define ff first #define int long long #define ss second #define vi vector<int> #define mem(ara, a) memset(ara, a, sizeof(ara)) long long inf = 2e18; long long ...
#include "bits/stdc++.h" #define allr(x) x.rbegin(), x.rend() #define all(x) x.begin(), x.end() #define sp " " #define double long double #define pb push_back #define ff first #define int long long #define ss second #define vi vector<int> #define mem(ara, a) memset(ara, a, sizeof(ara)) long long inf = 2e18; long long ...
replace
18
19
18
19
0
p02777
Python
Runtime Error
S, T = list(input().split()) A, B = list(map(int, input().split())) U = input() dict = {} dict[S] = A dict[T] = B dict[U] -= 1 print(f"{dict[S]} {dict[T]}")
S, T = list(input().split()) A, B = list(map(int, input().split())) U = input() dict = {} dict[S] = A dict[T] = B dict[U] -= 1 print(dict[S], dict[T])
replace
7
8
7
8
0
p02777
Python
Runtime Error
def solve(): S, T, A, B, U = map(int, open(0).read().split()) if S == U: print(A - 1, B) else: print(A, B - 1) if __name__ == "__main__": solve()
def solve(): S, T = map(str, input().split()) A, B = map(int, input().split()) U = input() if S == U: print(A - 1, B) else: print(A, B - 1) if __name__ == "__main__": solve()
replace
1
2
1
4
ValueError: invalid literal for int() with base 10: 'red'
Traceback (most recent call last): File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02777/Python/s660708293.py", line 10, in <module> solve() File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02777/Python/s660708293.py", line 2, in solve S, T, A, B, U = map(int, open(0...
p02777
Python
Runtime Error
S, T = [i for i in input().split()] A, B = map(int, input().split()) U = input() if U == S: A -= 1 elif U == T: B -= 1 print(f"{A} {B}")
S, T = [i for i in input().split()] A, B = map(int, input().split()) U = input() if U == S: A -= 1 elif U == T: B -= 1 print(str(A) + " " + str(B))
replace
7
8
7
8
0
p02777
Python
Runtime Error
keys = input.split() values = tuple(map(int, input().split())) ball = dict(zip(keys, values)) u = input() ball[u] -= 1 print(ball[keys[0]], ball[keys[1]])
keys = input().split() values = tuple(map(int, input().split())) ball = dict(zip(keys, values)) u = input() ball[u] -= 1 print(ball[keys[0]], ball[keys[1]])
replace
0
1
0
1
AttributeError: 'builtin_function_or_method' object has no attribute 'split'
Traceback (most recent call last): File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02777/Python/s850348662.py", line 1, in <module> keys = input.split() AttributeError: 'builtin_function_or_method' object has no attribute 'split'
p02777
Python
Runtime Error
S, T = input().split() A, B = map(int, input().split()) U = input() if U == S: A -= 1 else: B -= 1 print(f"{A} {B}")
S, T = input().split() A, B = map(int, input().split()) U = input() if U == S: A -= 1 else: B -= 1 print(A, B)
replace
9
10
9
10
0
p02777
Python
Runtime Error
#! env/bin/local python3 s, t = input().split() a, b = map(int, input().split()) u = input() balls = {s: a, t: b} balls[u] -= 1 print(f"{balls[s]} {balls[t]}")
#! env/bin/local python3 s, t = input().split() a, b = map(int, input().split()) u = input() balls = {s: a, t: b} balls[u] -= 1 print("{} {}".format(balls[s], balls[t]))
replace
10
11
10
11
0
p02777
Python
Runtime Error
inputted = input().split() S = inputted[0] T = inputted[1] inputted = list(map(int, input().split())) A = inputted[0] B = inputted[1] U = input() A2 = A - 1 if U == S else A B2 = B - 1 if U == T else B output = A2 + " " + B2 print(output)
inputted = input().split() S = inputted[0] T = inputted[1] inputted = list(map(int, input().split())) A = inputted[0] B = inputted[1] U = input() A2 = A - 1 if U == S else A B2 = B - 1 if U == T else B output = "{} {}".format(A2, B2) print(output)
replace
11
12
11
12
TypeError: unsupported operand type(s) for +: 'int' and 'str'
Traceback (most recent call last): File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02777/Python/s842548748.py", line 12, in <module> output = A2 + ' ' + B2 TypeError: unsupported operand type(s) for +: 'int' and 'str'
p02777
C++
Runtime Error
#include <bits/stdc++.h> #define int long long int #define pb push_back #define MAX INT_MAX #define MIN INT_MIN #define MOD 1000000007 #define FO \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); ...
#include <bits/stdc++.h> #define int long long int #define pb push_back #define MAX INT_MAX #define MIN INT_MIN #define MOD 1000000007 #define FO \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); ...
replace
29
61
29
37
-11
p02777
C++
Runtime Error
#define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <bitset> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <q...
#define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <bitset> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <q...
replace
32
33
32
33
0
p02777
C++
Time Limit Exceeded
#include <cstring> #include <iostream> using namespace std; string s, t, x; int a, b; int main() { cin >> s >> t >> a >> b >> x; cout << (a - (x == s)) << ' ' << (b - (x == t)); while (1) ; return 0; }
#include <cstring> #include <iostream> using namespace std; string s, t, x; int a, b; int main() { cin >> s >> t >> a >> b >> x; cout << (a - (x == s)) << ' ' << (b - (x == t)) << endl; return 0; }
replace
7
10
7
8
TLE
p02777
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define MAX 200010 using namespace std; char str[3][MAX]; int streq() { int i = 0; while (str[0][i] || str[2][i]) { if (str[0][i] != str[2][i]) return 0; } return 1; } int main(void) { int N, M; cin >> str[0] >> str[1] >> N >> M >> str[2]; if (streq()) cout << N -...
#include <bits/stdc++.h> #define MAX 200010 using namespace std; char str[3][MAX]; int streq() { int i = 0; while (str[0][i] || str[2][i]) { if (str[0][i] != str[2][i]) return 0; i++; } return 1; } int main(void) { int N, M; cin >> str[0] >> str[1] >> N >> M >> str[2]; if (streq()) co...
insert
11
11
11
12
TLE
p02777
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; void ioThings() { ios::sync_with_stdio(0); cin.tie(0); #ifndef ONLINE_JUDGE freopen("in.txt", "r", stdin); freopen("out.txt", "w", stdout); freopen("err.txt", "w", stderr); #endif } using ll = long long; #define debug(x) cerr << #x << ": <" << x << ">\n" #define...
#include <bits/stdc++.h> using namespace std; void ioThings() { ios::sync_with_stdio(0); cin.tie(0); #ifdef LOCAL freopen("in.txt", "r", stdin); freopen("out.txt", "w", stdout); freopen("err.txt", "w", stderr); #endif } using ll = long long; #define debug(x) cerr << #x << ": <" << x << ">\n" #define dotc() ...
replace
6
7
6
7
0
p02777
C++
Runtime Error
// Created by code_sm // #include <bits/stdc++.h> using namespace std; // #include <ext/pb_ds/assoc_container.hpp> // using namespace __gnu_pbds; // typedef tree<int,null_type,less<int>,rb_tree_tag, // tree_order_statistics_node_update> pseudo_set; #define ll long long #define vi vector<int> #define si set<int> #define...
// Created by code_sm // #include <bits/stdc++.h> using namespace std; // #include <ext/pb_ds/assoc_container.hpp> // using namespace __gnu_pbds; // typedef tree<int,null_type,less<int>,rb_tree_tag, // tree_order_statistics_node_update> pseudo_set; #define ll long long #define vi vector<int> #define si set<int> #define...
replace
54
58
54
55
0
p02777
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define IOS \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define endl "\n...
#include <bits/stdc++.h> using namespace std; #define IOS \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define endl "\n...
replace
29
30
29
30
0
p02777
C++
Runtime Error
/*coderanant*/ #include <bits/stdc++.h> using namespace std; #define int long long #define ll long long #define f1(i, a, b) for (int i = a; i < b; i++) #define f2(i, a, b) for (int i = a; i >= b; i--) #define endl '\n' #define pb push_back #define gp " " #define ff first #define ss second #define mp make_pair const i...
/*coderanant*/ #include <bits/stdc++.h> using namespace std; #define int long long #define ll long long #define f1(i, a, b) for (int i = a; i < b; i++) #define f2(i, a, b) for (int i = a; i >= b; i--) #define endl '\n' #define pb push_back #define gp " " #define ff first #define ss second #define mp make_pair const i...
replace
22
27
22
26
0
p02777
Python
Runtime Error
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines sys.setrecursionlimit(500000) s, t = read().decode().split() a, b = map(int, read().split()) u = read().decode() if u == s: a -= 1 else: b -= 1 print(a, b)
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines sys.setrecursionlimit(500000) s, t = readline().decode("utf-8").split() a, b = map(int, readline().split()) u = read().decode("utf-8").rstrip() if u == s: a -= 1 else: b -= 1 print(a, b)
replace
7
10
7
10
ValueError: too many values to unpack (expected 2)
Traceback (most recent call last): File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02777/Python/s104568103.py", line 7, in <module> s, t = read().decode().split() ValueError: too many values to unpack (expected 2)
p02777
Python
Runtime Error
S, T = input().split() A, B = input().split() U = input() print(f"{int(A) - 1 if S == U else 0} {int(B) - 1 if T == U else 0}")
S, T = input().split() A, B = input().split() U = input() print("{} {}".format(int(A) - (1 if S == U else 0), int(B) - (1 if T == U else 0)))
replace
4
5
4
5
0
p02778
C++
Time Limit Exceeded
#include <iostream> #include <string> using namespace std; int main() { string S; cin >> S; int i = 0; while (1) { if (i == S.length()) { break; } S[i] = 'x'; } cout << S << endl; return 0; }
#include <iostream> #include <string> using namespace std; int main() { string S; cin >> S; int i = 0; while (1) { if (i == S.length()) { break; } S[i] = 'x'; i++; } cout << S << endl; return 0; }
insert
13
13
13
14
TLE
p02778
C++
Time Limit Exceeded
#include <iomanip> #include <iostream> #include <string> using namespace std; void Main() { // input string S; cin >> S; // process // output for (int i = 0; S.length(); i++) { cout << "x"; } cout << endl; } int main() { std::cout << std::fixed << std::setprecision(15); Main(); return 0; ...
#include <iomanip> #include <iostream> #include <string> using namespace std; void Main() { // input string S; cin >> S; // process // output for (int i = 0; i < S.length(); i++) { cout << "x"; } cout << endl; } int main() { std::cout << std::fixed << std::setprecision(15); Main(); return...
replace
14
15
14
15
TLE
p02778
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef pair<int, int> pi; #define ff first #define ss second #define pb push_back #define mp make_pair #define rep(i, a, b) for (int i = a; i <= b; i++) int main() { ios::sync_with_stdio(0); cin.tie(0); #ifndef ONLINE_JU...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef pair<int, int> pi; #define ff first #define ss second #define pb push_back #define mp make_pair #define rep(i, a, b) for (int i = a; i <= b; i++) int main() { ios::sync_with_stdio(0); cin.tie(0); string s; cin...
delete
16
21
16
16
0
p02778
C++
Runtime Error
#include <iostream> using namespace std; int main() { string s; cin >> s; for (int i = 0; i < 19; i++) s[i] = 'x'; cout << s << endl; return 0; }
#include <iostream> using namespace std; int main() { string s; cin >> s; for (int i = 0; i < s.length(); i++) { cout << "x"; } return 0; }
replace
5
9
5
8
0
p02778
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; for (int i = 0; S.at(i) != '\0'; i++) { cout << 'x'; } cout << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; for (int i = 0; S.size() > i; i++) { cout << 'x'; } cout << endl; return 0; }
replace
7
8
7
8
-6
terminate called after throwing an instance of 'std::out_of_range' what(): basic_string::at: __n (which is 7) >= this->size() (which is 7)
p02778
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { char s1[10]; cin >> s1; for (int i = 0; i < strlen(s1); i++) { s1[i] = 'x'; cout << s1[i]; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { char s1[101]; cin >> s1; for (int i = 0; i < strlen(s1); i++) { s1[i] = 'x'; cout << s1[i]; } return 0; }
replace
3
4
3
4
0
p02778
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; string s; int main() { cin >> s; for (int i = 0; (int)s.size(); i++) cout << "x"; return 0; }
#include <bits/stdc++.h> using namespace std; string s; int main() { cin >> s; for (int i = 0; i < (int)s.size(); i++) cout << "x"; return 0; }
replace
5
6
5
6
TLE
p02778
C++
Runtime Error
#include <iostream> #include <stdio.h> #include <string.h> using namespace std; char a[105]; int main() { cin >> a; int i; for (i = 0; i <= strlen(a); i++) { a[i] = 'x'; } for (i = 0; i <= strlen(a); i++) { printf("%c", a[i]); } return 0; }
#include <iostream> #include <stdio.h> #include <string.h> using namespace std; char a[105]; int main() { cin >> a; int i; for (i = 0; i <= strlen(a) - 1; i++) { printf("x"); } return 0; }
replace
8
13
8
10
-11
p02778
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { string str; cin >> str; for (char x : str) { str.at(x) = x; } cout << str << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string str; cin >> str; for (int i = 0; i < str.size(); i++) { str.at(i) = 'x'; } cout << str << endl; }
replace
7
9
7
9
-6
terminate called after throwing an instance of 'std::out_of_range' what(): basic_string::at: __n (which is 115) >= this->size() (which is 7)
p02778
C++
Runtime Error
#include <bits/stdc++.h> #define fastcin() \ cin.tie(0); \ ios::sync_with_stdio(false) #define rep(i, n) for (int i = 0; i < int(n); i++) #define rep1(i, n) for (int i = 1; i <= int(n); i++)...
#include <bits/stdc++.h> #define fastcin() \ cin.tie(0); \ ios::sync_with_stdio(false) #define rep(i, n) for (int i = 0; i < int(n); i++) #define rep1(i, n) for (int i = 1; i <= int(n); i++)...
replace
60
62
60
62
0
p02778
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { string s, n; cin >> s; for (int i = 0; i < s.size(); i++) n.at(i) = 'x'; cout << n << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string s, n; cin >> s; for (int i = 0; i < s.size(); i++) n += 'x'; cout << n << endl; }
replace
7
8
7
8
-6
terminate called after throwing an instance of 'std::out_of_range' what(): basic_string::at: __n (which is 0) >= this->size() (which is 0)
p02778
C++
Runtime Error
#include <stdio.h> #include <string.h> int main(void) { // Your code here! char s[20], t[20], u[20]; int a, b; scanf("%s", s); int x = strlen(s); while (x-- > 0) printf("x"); printf("\n"); }
#include <stdio.h> #include <string.h> int main(void) { // Your code here! char s[100]; scanf("%s", s); int x = strlen(s); while (x-- > 0) printf("x"); printf("\n"); }
replace
4
6
4
5
0
p02778
C++
Runtime Error
#include <stdio.h> #include <string.h> int main() { char s[100]; char t[100]; scanf("%s", &s); int j = strlen(s); sprintf(t, "x"); for (int i = 1; i != j; i++) { sprintf(t, "%sx", t); } printf("%s", t); return 0; }
#include <stdio.h> #include <string.h> int main() { char s[101]; char t[101]; scanf("%s", &s); int j = strlen(s); sprintf(t, "x"); for (int i = 1; i != j; i++) { sprintf(t, "%sx", t); } printf("%s", t); return 0; }
replace
4
6
4
6
0
p02778
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; for (int i = 0; i < sizeof(S) - 1; i++) { S.at(i) = 'x'; } cout << S << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; for (int i = 0; i < S.size(); i++) { S.at(i) = 'x'; } cout << S << endl; }
replace
6
7
6
7
-6
terminate called after throwing an instance of 'std::out_of_range' what(): basic_string::at: __n (which is 7) >= this->size() (which is 7)
p02778
C++
Runtime Error
#include <climits> #include <cstdio> #include <cstring> #include <iostream> using namespace std; int main() { char s[10]; cin >> s; int n = strlen(s); for (int i = 0; i < n; i++) cout << 'x'; }
#include <climits> #include <cstdio> #include <cstring> #include <iostream> using namespace std; int main() { char s[101]; cin >> s; int n = strlen(s); for (int i = 0; i < n; i++) cout << 'x'; }
replace
7
8
7
8
0
p02778
C++
Runtime Error
/*coderanant*/ #include <bits/stdc++.h> using namespace std; #define int long long #define ll long long #define f1(i, a, b) for (int i = a; i < b; i++) #define f2(i, a, b) for (int i = a; i >= b; i--) #define endl '\n' #define pb push_back #define gp " " #define ff first #define ss second #define mp make_pair const i...
/*coderanant*/ #include <bits/stdc++.h> using namespace std; #define int long long #define ll long long #define f1(i, a, b) for (int i = a; i < b; i++) #define f2(i, a, b) for (int i = a; i >= b; i--) #define endl '\n' #define pb push_back #define gp " " #define ff first #define ss second #define mp make_pair const i...
replace
22
27
22
26
0
p02778
C++
Runtime Error
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define pb push_back #define all(v) (v).begin(), (v).end() #define popcnt(x) __builtin_popcount(x) #define inf 0x3f3f3f3f #define watch(x) cout << (#x) << " is " << (x) << endl #define rand() (rand() << 15 | rand()) u...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define pb push_back #define all(v) (v).begin(), (v).end() #define popcnt(x) __builtin_popcount(x) #define inf 0x3f3f3f3f #define watch(x) cout << (#x) << " is " << (x) << endl #define rand() (rand() << 15 | rand()) u...
delete
21
24
21
21
0
p02778
C++
Runtime Error
#include <stdio.h> #include <string.h> using namespace std; int main() { char s[10]; scanf("%s", s); int num = strlen(s); for (int i = 0; i < num; i++) { printf("x"); } printf("\n"); return 0; }
#include <stdio.h> #include <string.h> using namespace std; int main() { char s[100]; scanf("%s", s); int num = strlen(s); for (int i = 0; i < num; i++) { printf("x"); } printf("\n"); return 0; }
replace
6
7
6
7
0
p02779
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; long long arr[3000000], cnt[3000000]; int main() { long long n, i, j, k; cin >> n; for (i = 0; i < n; i++) { cin >> arr[i]; cnt[arr[i]]++; } sort(arr, arr + n); for (i = 0; i < n - 1; i++) { if (arr[i + 1] == arr[i]) { cout << "NO" << endl; ...
#include <bits/stdc++.h> using namespace std; long long arr[3000000], cnt[3000000]; int main() { long long n, i, j, k; cin >> n; for (i = 0; i < n; i++) { cin >> arr[i]; // cnt[arr[i]]++; } sort(arr, arr + n); for (i = 0; i < n - 1; i++) { if (arr[i + 1] == arr[i]) { cout << "NO" << endl; ...
replace
8
9
8
9
0
p02779
C++
Time Limit Exceeded
#include <bits/stdc++.h> typedef double D; typedef long long int LL; typedef long double LD; #define ll long long int #define OR || #define AND && #define nl '\n' #define S string #define inf INT_MAX #define SQR(a) (a) * (a) #define pb push_back #define GCD(a, b) __gcd(a, b) #define MOD 1000000007 #define PI 2.0 * acos...
#include <bits/stdc++.h> typedef double D; typedef long long int LL; typedef long double LD; #define ll long long int #define OR || #define AND && #define nl '\n' #define S string #define inf INT_MAX #define SQR(a) (a) * (a) #define pb push_back #define GCD(a, b) __gcd(a, b) #define MOD 1000000007 #define PI 2.0 * acos...
replace
168
174
168
174
TLE
p02779
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; long long n, x; bool cek[30000000], ceks; int main() { cin >> n; for (int i = 1; i <= n; i++) { cin >> x; if (cek[x]) ceks = true; cek[x] = true; } if (ceks) cout << "NO" << endl; else cout << "YES" << endl; }
#include <bits/stdc++.h> using namespace std; long long n, x; bool cek[1000000005], ceks; int main() { cin >> n; for (int i = 1; i <= n; i++) { cin >> x; if (cek[x]) ceks = true; cek[x] = true; } if (ceks) cout << "NO" << endl; else cout << "YES" << endl; }
replace
3
4
3
4
0
p02779
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> vec(N); string ans = "NO"; int count = 0; for (int i = 0; i < N; i++) { cin >> vec.at(i); } for (int i = 0; i < N; i++) { for (int j = 0; j < N; j++) { if (i != j && vec.at(i) == vec.at(j)) { co...
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> vec(N); string ans = "NO"; int count = 0; for (int i = 0; i < N; i++) { cin >> vec.at(i); } sort(vec.begin(), vec.end()); for (int i = 0; i < N - 1; i++) { if (vec.at(i) == vec.at(i + 1)) { count++; ...
replace
11
16
11
15
TLE
p02779
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define rep(i, N) for (int i = 0; i < N; i++) typedef long long ll; #define dump(x) cerr << #x << "=" << x << endl int main() { int n; cin >> n; vector<ll> a(n); rep(i, n) cin >> a.at(i); vector<bool> used(100000001, false); rep(i, n) { if (!used.at(a.at(i...
#include <bits/stdc++.h> using namespace std; #define rep(i, N) for (int i = 0; i < N; i++) typedef long long ll; #define dump(x) cerr << #x << "=" << x << endl int main() { int n; cin >> n; vector<ll> a(n); rep(i, n) cin >> a.at(i); vector<bool> used(1000000010, false); rep(i, n) { if (!used.at(a.at(...
replace
12
13
12
13
0
p02779
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> A(N); for (int i = 0; i < N; i++) { cin >> A.at(i); } sort(A.begin(), A.end()); for (int i = 1; i <= N - 1; i++) { if (A.at(i) == A.at(i - 1) or A.at(i) == A.at(i + 1)) { cout << "NO" << endl; r...
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> A(N); for (int i = 0; i < N; i++) { cin >> A.at(i); } sort(A.begin(), A.end()); for (int i = 1; i <= N - 1; i++) { if (A.at(i) == A.at(i - 1)) { cout << "NO" << endl; return 0; } } cout...
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 5) >= this->size() (which is 5)
p02779
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { long long int a[100000], n, i, s1 = 0; cin >> n; for (i = 0; i < n; i++) cin >> a[i]; sort(a, a + n); for (i = 0; i < (n - 1); i++) { if (a[i] == a[i + 1]) { s1 = 1; break; } } if (s1 == 1) cout << "NO" << endl; else...
#include <bits/stdc++.h> using namespace std; int main() { long long int a[200000], n, i, s1 = 0; cin >> n; for (i = 0; i < n; i++) cin >> a[i]; sort(a, a + n); for (i = 0; i < (n - 1); i++) { if (a[i] == a[i + 1]) { s1 = 1; break; } } if (s1 == 1) cout << "NO" << endl; else...
replace
4
5
4
5
0
p02779
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(); } template <class T> inline T sqr(T x) { return x * x; } typedef long long ll; 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(); } template <class T> inline T sqr(T x) { return x * x; } typedef long long ll; ty...
replace
48
55
48
53
-6
terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc
p02779
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int size; cin >> size; vector<int> nums(size); for (int i = 0; i < size; i++) cin >> nums.at(i); // sort int tmp; for (int j = 0; j < size; j++) { for (int i = 1; i < size; i++) { if (nums.at(j) < nums.at(i)) { tmp = nums.a...
#include <bits/stdc++.h> using namespace std; int main() { int size; cin >> size; vector<int> nums(size); for (int i = 0; i < size; i++) cin >> nums.at(i); // sort sort(nums.begin(), nums.end()); // check if same int flg; flg = 0; for (int i = 0; i < size - 1; i++) { if (nums.at(i) == num...
replace
11
21
11
12
TLE
p02779
C++
Runtime Error
///******* In the name of Allah *******/// #include <bits/stdc++.h> using namespace std; long int gcd(long int a, long int b) { if (b == 0) return a; return gcd(b, a % b); } void Ok() { long long int a[30013], b[10013], c, d, e, f, g, h, t, s, i, j, k, l1, l2, m, n, r, sum = 0, ans_1, ans_2, ans_3, c...
///******* In the name of Allah *******/// #include <bits/stdc++.h> using namespace std; long int gcd(long int a, long int b) { if (b == 0) return a; return gcd(b, a % b); } void Ok() { long long int a[300013], b[10013], c, d, e, f, g, h, t, s, i, j, k, l1, l2, m, n, r, sum = 0, ans_1, ans_2, ans_3, ...
replace
12
13
12
13
0
p02779
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; const int MOD = 1e9 + 7; #define rep(i, b) for (i = 0; i < b; ++i) #define repp(i, a, b) for (i = a; i < b; ++i) int main() { ll num; bool flag = false; cin >> num; std::vector<bool> v(10010001, false); for (in...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; const int MOD = 1e9 + 7; #define rep(i, b) for (i = 0; i < b; ++i) #define repp(i, a, b) for (i = a; i < b; ++i) int main() { ll num; bool flag = false; cin >> num; std::vector<bool> v(1001001001, false); for (...
replace
15
16
15
16
0
p02779
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> vec(N); for (int i = 0; i < N; i++) { cin >> vec.at(i); } sort(vec.begin(), vec.end()); bool a = true; for (int i = 0; i < N; i++) { if (vec.at(i) == vec.at(i + 1)) { a = false; break; } ...
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> vec(N); for (int i = 0; i < N; i++) { cin >> vec.at(i); } sort(vec.begin(), vec.end()); bool a = true; for (int i = 0; i < N - 1; i++) { if (vec.at(i) == vec.at(i + 1)) { a = false; break; ...
replace
14
15
14
15
-6
terminate called after throwing an instance of 'std::out_of_range' what(): vector::_M_range_check: __n (which is 5) >= this->size() (which is 5)
p02779
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> A(N); for (int i = 0; i < N; i++) { cin >> A[i]; for (int j = 0; j < i; j++) { if (A[i] == A[j]) { cout << "NO" << endl; return 0; } } } cout << "YES" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> A(N); for (int i = 0; i < N; i++) { cin >> A[i]; } sort(A.begin(), A.end()); for (int i = 0; i < N - 1; i++) { if (A[i] == A[i + 1]) { cout << "NO" << endl; return 0; } } cout << "YES" << e...
replace
9
14
9
15
TLE
p02779
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int i, j, N; int judge = 1; cin >> N; vector<int> vec(N); for (i = 0; i < N; i++) { cin >> vec.at(i); } for (j = 0; j < N; j++) { for (i = j + 1; i < N; i++) { if (vec.at(i) == vec.at(j)) { judge--; break; } ...
#include <bits/stdc++.h> using namespace std; int main() { int i, j, N; int judge = 1; cin >> N; vector<int> vec(N); for (i = 0; i < N; i++) { cin >> vec.at(i); } sort(vec.begin(), vec.end()); for (j = 0; j < N - 1; j++) { if (vec.at(j) == vec.at(j + 1)) { judge--; break; } } ...
replace
11
17
11
16
TLE
p02779
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> #include <string> #include <utility> #include <vector> using namespace std; int main() { long long N; cin >> N; vector<long long> S(N); for (long long i = 0; i < N; i++) { cin >> S[i]; } for (long long i = 0; i < N; i++) { for (long long j = 0; j < N; j++)...
#include <algorithm> #include <iostream> #include <string> #include <utility> #include <vector> using namespace std; int main() { long long N; cin >> N; vector<long long> S(N); for (long long i = 0; i < N; i++) { cin >> S[i]; } sort(S.begin(), S.end()); for (long long i = 1; i < N; i++) { if (...
replace
16
22
16
22
TLE
p02779
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> #include <math.h> #include <stdio.h> #define rep(i, n) for (int i = 0; i < n; i++) #define ll long long #include <bits/stdc++.h> using namespace std; #define mo 1000000007 #define ull unsigned long long int main() { ll n; cin >> n; string s = "YES"; vector<ll> p(n); r...
#include <algorithm> #include <iostream> #include <math.h> #include <stdio.h> #define rep(i, n) for (int i = 0; i < n; i++) #define ll long long #include <bits/stdc++.h> using namespace std; #define mo 1000000007 #define ull unsigned long long int main() { ll n; cin >> n; string s = "YES"; vector<ll> p(n); r...
replace
17
23
17
21
TLE
p02779
C++
Time Limit Exceeded
#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; cin >> n; vector<ll> a(n); rep(i, n) cin >> a[i]; for (int i = 0; i < n - 1; ++i) { for (int j = i + 1; j < n; ++j) { if (a[i] == a[j]) {...
#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; cin >> n; vector<ll> a(n); rep(i, n) cin >> a[i]; sort(a.begin(), a.end()); rep(i, n - 1) { if (a[i] == a[i + 1]) { cout << "NO" ...
replace
11
18
11
17
TLE
p02779
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> #include <math.h> #include <vector> using namespace std; int main() { int N; cin >> N; vector<long long> A(N); for (int i = 0; i < N; i++) cin >> A[i]; for (int i = 0; i < N; i++) { for (int j = i + 1; j < N; j++) { if (A[i] == A[j]) { cout << "...
#include <algorithm> #include <iostream> #include <math.h> #include <vector> using namespace std; int main() { int N; cin >> N; vector<long long> A(N); for (int i = 0; i < N; i++) cin >> A[i]; sort(A.begin(), A.end()); A.erase(unique(A.begin(), A.end()), A.end()); if (A.size() == N) cout << "YE...
replace
13
22
13
20
TLE
p02779
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; // Define using ll = long long; using ull = unsigned long long; using ld = long double; template <class T> using pvector = vector<pair<T, T>>; template <class T> using rpriority_queue = priority_queue<T, vector<T>, greater<T>>; constexpr const ll dx[4] = {1, 0, -1, 0}; con...
#include <bits/stdc++.h> using namespace std; // Define using ll = long long; using ull = unsigned long long; using ld = long double; template <class T> using pvector = vector<pair<T, T>>; template <class T> using rpriority_queue = priority_queue<T, vector<T>, greater<T>>; constexpr const ll dx[4] = {1, 0, -1, 0}; con...
replace
131
133
131
133
4
p02779
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <cstring> #include <iostream> #include <string> using namespace std; #define ll long long string s1, s2, s3; ll n1, n2; ll a[200005], f; int main() { cin >> n1; for (int i = 1; i <= n1; i++) cin >> a[i]; sort(a + 1, a + 1 + n1); for (int i = 1; i <= n1; i++) { ...
#include <algorithm> #include <cmath> #include <cstring> #include <iostream> #include <string> using namespace std; #define ll long long string s1, s2, s3; ll n1, n2; ll a[200005], f; int main() { cin >> n1; for (int i = 1; i <= n1; i++) cin >> a[i]; sort(a + 1, a + 1 + n1); for (int i = 1; i < n1; i++) { ...
replace
15
21
15
19
TLE
p02779
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int n; bool flg = true; cin >> n; vector<long long> vec(n); for (int i = 0; i < n; i++) { cin >> vec.at(i); } sort(vec.begin(), vec.end()); for (int i = 0; i < n; i++) { if (vec.at(i) == vec.at(i + 1)) { cout << "NO" << endl; ...
#include <bits/stdc++.h> using namespace std; int main() { int n; bool flg = true; cin >> n; vector<long long> vec(n); for (int i = 0; i < n; i++) { cin >> vec.at(i); } sort(vec.begin(), vec.end()); for (int i = 0; i < n - 1; i++) { if (vec.at(i) == vec.at(i + 1)) { cout << "NO" << endl...
replace
14
15
14
15
-6
terminate called after throwing an instance of 'std::out_of_range' what(): vector::_M_range_check: __n (which is 5) >= this->size() (which is 5)
p02779
C++
Runtime Error
#include <algorithm> #include <array> #include <bitset> #include <complex> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <valarray> #include ...
#include <algorithm> #include <array> #include <bitset> #include <complex> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <valarray> #include ...
insert
71
71
71
73
-6
free(): invalid pointer
p02779
C++
Runtime Error
#include <algorithm> #include <bits/stdc++.h> #include <cmath> #include <iomanip> #include <iostream> #include <numeric> #include <queue> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) #define dup(x, y) (((x) + (y)-1) / (y)) // dup * y >= x なる最小のdup. using namespace std; typedef long...
#include <algorithm> #include <bits/stdc++.h> #include <cmath> #include <iomanip> #include <iostream> #include <numeric> #include <queue> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) #define dup(x, y) (((x) + (y)-1) / (y)) // dup * y >= x なる最小のdup. using namespace std; typedef long...
replace
21
22
21
22
-6
terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc
p02779
C++
Runtime Error
#include <bits/stdc++.h> #define fo(i, a, b) for (int i = (a); i <= (b); ++i) #define rv(i, a, b) for (int i = (a); i >= (b); --i) using namespace std; const int M = 120000; typedef long long ll; int n, m, k; int a[M]; int main() { cin >> n; fo(i, 1, n) cin >> a[i]; sort(a + 1, a + 1 + n); bool fg = 1; fo(i, ...
#include <bits/stdc++.h> #define fo(i, a, b) for (int i = (a); i <= (b); ++i) #define rv(i, a, b) for (int i = (a); i >= (b); --i) using namespace std; const int M = 220000; typedef long long ll; int n, m, k; int a[M]; int main() { cin >> n; fo(i, 1, n) cin >> a[i]; sort(a + 1, a + 1 + n); bool fg = 1; fo(i, ...
replace
4
5
4
5
0
p02779
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <iostream> #include <stdio.h> #include <vector> #define rep(i, cc, n) for (int i = cc; i <= n; ++i) #define drep(i, cc, n) for (int i = cc; i >= n; --i) typedef long long ll; using namespace std; int main() { int n; cin >> n; int a[n]; rep(i, 0, n - 1) cin >> a[i];...
#include <algorithm> #include <cmath> #include <iostream> #include <stdio.h> #include <vector> #define rep(i, cc, n) for (int i = cc; i <= n; ++i) #define drep(i, cc, n) for (int i = cc; i >= n; --i) typedef long long ll; using namespace std; int main() { int n; cin >> n; int a[n]; rep(i, 0, n - 1) cin >> a[i];...
replace
15
24
15
19
TLE
p02779
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> A(N); for (int i = 0; i < N; i++) { cin >> A[i]; } for (int i = 0; i < N; i++) { for (int j = i + 1; j < N; j++) { if (A[i] == A[j]) { cout << "NO" << endl; return 0; } } } ...
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> A(N); for (int i = 0; i < N; i++) { cin >> A[i]; } sort(A.begin(), A.end()); for (int i = 0; i < N - 1; i++) { if (A[i] == A[i + 1]) { cout << "NO" << endl; return 0; } } cout << "YES" ...
replace
12
18
12
18
TLE
p02779
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define rep(k, nu) for (int i = k; i < nu; i++) #define rep2(k, n) for (int j = k; j < n; j++) #define INF 1000000000000 // 1e+12 #define MOD 10000007 // 1e9+7 #define ll long long #define pb pop_back template <typename T> inline void chMin(T *a, T *b) { if (*a > *b)...
#include <bits/stdc++.h> using namespace std; #define rep(k, nu) for (int i = k; i < nu; i++) #define rep2(k, n) for (int j = k; j < n; j++) #define INF 1000000000000 // 1e+12 #define MOD 10000007 // 1e9+7 #define ll long long #define pb pop_back template <typename T> inline void chMin(T *a, T *b) { if (*a > *b)...
replace
25
31
25
30
TLE
p02779
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define SPEED ios_base ::sync_with_stdio(false), cin.tie(NULL), cout.tie(0) int main() { SPEED; int n, count = 0; cin >> n; int a[n]; for (int i = 0; i < n; i++) cin >> a[i]; for (int j = 0; j < n; j++) for (int k = j + 1; k < n; k++) if (a[j] == a...
#include <bits/stdc++.h> using namespace std; #define SPEED ios_base ::sync_with_stdio(false), cin.tie(NULL), cout.tie(0) int main() { SPEED; int n, count = 0; cin >> n; int a[n]; for (int i = 0; i < n; i++) cin >> a[i]; sort(a, a + n); for (int j = 0; j < n - 1; j++) if (a[j] == a[j + 1]) { ...
replace
10
16
10
16
TLE
p02779
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { ll n; cin >> n; vector<ll> a(n); int judge = 0; for (ll i = 0; i < n; i++) { cin >> a[i]; } for (ll i = 0; i < n - 1; i++) { for (ll j = i + 1; j < n; j++) { ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { ll n; cin >> n; vector<ll> a(n); int judge = 0; for (ll i = 0; i < n; i++) { cin >> a[i]; } sort(a.begin(), a.end()); for (int i = 0; i < n - 1; i++) { if (a[i] ...
replace
13
19
13
18
TLE
p02779
C++
Runtime Error
#include <algorithm> #include <iostream> #include <vector> using namespace std; const char *solve() { int n; cin >> n; vector<int> a(n); for (auto &i : a) cin >> i; sort(a.begin(), a.end()); for (int i = 1; i < a.size(); i++) if (a[i] == a[i - 1]) return "NO"; } int main() { cout << solve() <<...
#include <algorithm> #include <iostream> #include <vector> using namespace std; const char *solve() { int n; cin >> n; vector<int> a(n); for (auto &i : a) cin >> i; sort(a.begin(), a.end()); for (int i = 1; i < a.size(); i++) if (a[i] == a[i - 1]) return "NO"; return "YES"; } int main() { co...
insert
14
14
14
15
0
p02779
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<bool> vec(100000001); bool ans = true; for (int i = 0; i < n; ++i) { int x; cin >> x; if (vec.at(x) == false) vec.at(x) = true; else ans = false; } if (ans == true) cout << "YES" << endl; ...
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<bool> vec(1000000001); bool ans = true; for (int i = 0; i < n; ++i) { int x; cin >> x; if (vec.at(x) == false) vec.at(x) = true; else ans = false; } if (ans == true) cout << "YES" << endl; ...
replace
6
7
6
7
0
p02779
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { unsigned int n; vector<unsigned long long> a; cin >> n; a.resize(n); for (int i = 0; i < n; i++) { cin >> a[i]; } for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { if (a[i] == a[j] && ...
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { unsigned int n; vector<unsigned long long> a; cin >> n; a.resize(n); for (int i = 0; i < n; i++) { cin >> a[i]; } sort(a.begin(), a.end()); for (int i = 0; i < n - 1; i++) { if (a[i] == a[i + 1]) {...
replace
17
23
17
23
TLE
p02779
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) #define rep2(i, x, n) for (int i = x; i < (n); i++) #define ALL(n) begin(n), end(n) using namespace std; using ll = long long; int main() { int n; string ans = "YES"; cin >> n; vector<int> a(n); rep(i, n) cin >> a[i]; rep(i, n - 1) { ...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) #define rep2(i, x, n) for (int i = x; i < (n); i++) #define ALL(n) begin(n), end(n) using namespace std; using ll = long long; int main() { int n; string ans = "YES"; cin >> n; vector<int> a(n); rep(i, n) cin >> a[i]; sort(a.begin(), ...
replace
13
19
13
15
TLE
p02779
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { long long n; cin >> n; long long a[n]; for (long long i = 0; i < n; i++) { cin >> a[i]; } long long ans = 0; for (long long i = 0; i < n; i++) { for (long long j = i + 1; j < n; j++) { if (a[i] == a[j]) { ans = 1; bre...
#include <bits/stdc++.h> using namespace std; int main() { long long n; cin >> n; long long a[n]; for (long long i = 0; i < n; i++) { cin >> a[i]; } long long ans = 0; sort(a, a + n); for (long long i = 0; i < n - 1; i++) { if (a[i] == a[i + 1]) { ans = 1; break; } } if (ans ...
replace
10
16
10
15
TLE
p02779
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main(void) { // Your code here! long long N; cin >> N; vector<int> A(N); for (int i = 0; i < N; i++) { cin >> A[i]; } sort(A.begin(), A.end()); for (int i = 0; i < N - 1; i++) { for (int j = i + 1; j < N; j++) { if (A[i] == A[j]) { ...
#include <bits/stdc++.h> using namespace std; int main(void) { // Your code here! long long N; cin >> N; vector<int> A(N); for (int i = 0; i < N; i++) { cin >> A[i]; } sort(A.begin(), A.end()); for (int i = 0; i < N - 1; i++) { if (A[i] == A[i + 1]) { cout << "NO" << endl; return 0;...
replace
13
18
13
16
TLE
p02779
C++
Runtime Error
// #include <bits/stdc++.h> #include <algorithm> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <string> #include <vector> using namespace std; typedef long long int lo; #define pb push_back #define mp make_pair #define st first #define nd second #define inf (lo)1e9 #defin...
// #include <bits/stdc++.h> #include <algorithm> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <string> #include <vector> using namespace std; typedef long long int lo; #define pb push_back #define mp make_pair #define st first #define nd second #define inf (lo)1e9 #defin...
replace
25
26
25
26
0
p02779
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define mod 1e9 + 7; #define INF 1e9 + 9; #define ps(x, y) fixed << setprecision(y) << x #define PI 3.14159265358979323846264338327950 L typedef long long ll; typedef unsigned long long ull; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); #ifndef ...
#include <bits/stdc++.h> using namespace std; #define mod 1e9 + 7; #define INF 1e9 + 9; #define ps(x, y) fixed << setprecision(y) << x #define PI 3.14159265358979323846264338327950 L typedef long long ll; typedef unsigned long long ull; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); #ifndef ...
replace
14
16
14
16
0
p02779
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> A(N); for (int i = 0; i < N; i++) { cin >> A.at(i); } bool ans = true; for (int i = 0; i < N; i++) { for (int j = 0; j < N; j++) { if (A.at(i) == A.at(j) && i != j) { ans = false; break; ...
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> A(N); for (int i = 0; i < N; i++) { cin >> A.at(i); } bool ans = true; sort(A.begin(), A.end()); for (int i = 0; i < N - 1; i++) { if (A.at(i) == A.at(i + 1)) { ans = false; break; } } if...
replace
11
17
11
16
TLE
p02779
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int n, a[1000]; cin >> n; for (int i = 0; i < n; i++) { cin >> a[i]; } sort(a, a + n); for (int i = 0; i < n; i++) { if (a[i] == a[i + 1]) { cout << "NO" << endl; return 0; } } cout << "YES" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int n, a[210000]; cin >> n; for (int i = 0; i < n; i++) { cin >> a[i]; } sort(a, a + n); for (int i = 0; i < n; i++) { if (a[i] == a[i + 1]) { cout << "NO" << endl; return 0; } } cout << "YES" << endl; }
replace
3
4
3
4
0
p02779
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define rrep(i, n) for (int i = 1; i <= (n); ++i) #define drep(i, n) for (int i = (n)-1; i >= 0; --i) #define all(x) (x).begin(), (x).end() #define pb push_back #define eb emplace_back using namespace std; typedef long long ll; typedef pair<int, i...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define rrep(i, n) for (int i = 1; i <= (n); ++i) #define drep(i, n) for (int i = (n)-1; i >= 0; --i) #define all(x) (x).begin(), (x).end() #define pb push_back #define eb emplace_back using namespace std; typedef long long ll; typedef pair<int, i...
replace
43
49
43
51
TLE
p02779
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) using P = pair<string, int>; using ll = long long; int main() { ll n; cin >> n; vector<int> v(n); rep(i, n) { cin >> v.at(i); } sort(v.begin(), v.end()); bool ok = true; for (int i = 0; i < n; i++) { if (v.at(...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) using P = pair<string, int>; using ll = long long; int main() { ll n; cin >> n; vector<int> v(n); rep(i, n) { cin >> v.at(i); } sort(v.begin(), v.end()); bool ok = true; for (int i = 0; i < n - 1; i++) { if (v...
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 5) >= this->size() (which is 5)
p02779
C++
Runtime Error
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <stack> #include <string> using namespace std; const int N = 1e4 + 5; int n; int a[N]; bool flag = false; int main() { int j = 1; cin >> n; for (int i = 1; i <= n; i++) cin >> a[i]; sort(a + 1, a + n + 1); for (int i = ...
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <stack> #include <string> using namespace std; const int N = 1e8 + 5; int n; int a[N]; bool flag = false; int main() { int j = 1; cin >> n; for (int i = 1; i <= n; i++) cin >> a[i]; sort(a + 1, a + n + 1); for (int i = ...
replace
7
8
7
8
0
p02779
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair<ll, ll> l_l; typedef pair<int, int> i_i; typedef vector<ll> vl; typedef vector<int> vi; typedef vector<char> vec; typedef vector<bool> veb; typedef vector<string> ves; typedef vector<vector<ll>> vvl; typedef vector<...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair<ll, ll> l_l; typedef pair<int, int> i_i; typedef vector<ll> vl; typedef vector<int> vi; typedef vector<char> vec; typedef vector<bool> veb; typedef vector<string> ves; typedef vector<vector<ll>> vvl; typedef vector<...
replace
85
91
85
90
TLE
p02779
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int x[n]; for (int i = 0; i < n; i++) { cin >> x[i]; } for (int i = 0; i < n; i++) { for (int j = i + 1; j < n; j++) { if (x[i] == x[j]) { cout << "NO" << endl; return 0; } } } cout << "...
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int x[n]; for (int i = 0; i < n; i++) { cin >> x[i]; } sort(x, x + n); for (int i = 0; i < n - 1; i++) { if (x[i + 1] == x[i]) { cout << "NO" << endl; return 0; } } cout << "YES" << endl; }
replace
11
17
11
16
TLE
p02779
C++
Runtime Error
#include <bits/stdc++.h> // #include<boost/multiprecision/cpp_int.hpp> #define fl(i, a, n) for (int i = a; i <= n; i++) #define pb push_back #define pob pop_back #define int long long int #define ff first #define ss second #define pi 3.1415926535898 #define vi vector<int> #define mi map<int, int> #define umi unordered_...
#include <bits/stdc++.h> // #include<boost/multiprecision/cpp_int.hpp> #define fl(i, a, n) for (int i = a; i <= n; i++) #define pb push_back #define pob pop_back #define int long long int #define ff first #define ss second #define pi 3.1415926535898 #define vi vector<int> #define mi map<int, int> #define umi unordered_...
replace
52
53
52
54
-6
terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc