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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p03244 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long int
#define MOD 1000000007
#define P pair<ll, ll>
#define INF 1000000000000000000
using namespace std;
int main(void) {
ll n;
cin >> n;
vector<ll> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
}
map<ll, ll> b, c;
for (int i = 0; i < n; i++) {
if ... | #include <bits/stdc++.h>
#define ll long long int
#define MOD 1000000007
#define P pair<ll, ll>
#define INF 1000000000000000000
using namespace std;
int main(void) {
ll n;
cin >> n;
vector<ll> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
}
map<ll, ll> b, c;
for (int i = 0; i < n; i++) {
if ... | replace | 34 | 35 | 34 | 35 | 0 | |
p03244 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define N (1000000000 + 7)
#define INF 1e16
typedef pair<int, int> P;
typedef long long ll;
bool cmp(const pair<int, int> &a, const pair<... | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define N (1000000000 + 7)
#define INF 1e16
typedef pair<int, int> P;
typedef long long ll;
bool cmp(const pair<int, int> &a, const pair<... | replace | 16 | 17 | 16 | 17 | 0 | |
p03244 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define rep2(x, fr, to) for (int(x) = (fr); (x) < (to); (x)++)
#define rep(x, to) for (int(x) = 0; (x) < (to); (x)++)
#define repr(x, fr, to) for (int(x) = (fr); (x) >= (to); (x)--)
#define all(c) (c).begin(), (c).end()
#define sz(v) (int)(v).size()
typedef int64_t ll;
t... | #include <bits/stdc++.h>
using namespace std;
#define rep2(x, fr, to) for (int(x) = (fr); (x) < (to); (x)++)
#define rep(x, to) for (int(x) = 0; (x) < (to); (x)++)
#define repr(x, fr, to) for (int(x) = (fr); (x) >= (to); (x)--)
#define all(c) (c).begin(), (c).end()
#define sz(v) (int)(v).size()
typedef int64_t ll;
t... | replace | 49 | 57 | 49 | 51 | TLE | |
p03244 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)n; i++)
using namespace std;
int main() {
int n;
cin >> n;
vector<int> a(n / 2), b(n / 2);
int init_a = 0;
int init_b = 0;
int mx_a, mx_b;
rep(i, n) {
if (i % 2 == 0) {
int x;
cin >> x;
a[x]++;
if (a[x] > init... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)n; i++)
using namespace std;
int main() {
int n;
cin >> n;
vector<int> a(100005), b(100005);
int init_a = 0;
int init_b = 0;
int mx_a, mx_b;
rep(i, n) {
if (i % 2 == 0) {
int x;
cin >> x;
a[x]++;
if (a[x] > in... | replace | 7 | 8 | 7 | 8 | 0 | |
p03244 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define ALL(A) A.begin(), A.end()
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
// O(N log N)
int solve2(vector<int> v) {
int N = (int)v.size();
map<int, int> cnt;
cnt.clear();
rep(i, N) { ++cnt[v[i]]; } // end r... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define ALL(A) A.begin(), A.end()
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
// O(N log N)
int solve2(vector<int> v) {
int N = (int)v.size();
map<int, int> cnt;
cnt.clear();
rep(i, N) { ++cnt[v[i]]; } // end r... | replace | 32 | 34 | 32 | 34 | TLE | |
p03244 | C++ | Runtime Error | #define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < n; i++)
#include <bits/stdc++.h>
#include <numeric>
using namespace std;
typedef long long ll;
int main() {
int N;
cin >> N;
vector<int> odd(100000, 0);
vector<int> even(100000, 0);
int od = 0, ev = 0;
rep(i, N) {
int t;
cin >> t;
if ... | #define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < n; i++)
#include <bits/stdc++.h>
#include <numeric>
using namespace std;
typedef long long ll;
int main() {
int N;
cin >> N;
vector<int> odd(100010, 0);
vector<int> even(100010, 0);
int od = 0, ev = 0;
rep(i, N) {
int t;
cin >> t;
if ... | replace | 10 | 12 | 10 | 12 | TLE | |
p03244 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int v[n];
for (int i = 0; i < n; i++) {
cin >> v[i];
}
vector<int> cnt1, cnt2;
for (int i = 0; i < n; i++) {
if (i % 2)
cnt2.push_back(v[i]);
else
cnt1.push_back(v[i]);
}
map<int, int> CNT1, CNT2;
fo... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int v[n];
for (int i = 0; i < n; i++) {
cin >> v[i];
}
vector<int> cnt1, cnt2;
for (int i = 0; i < n; i++) {
if (i % 2)
cnt2.push_back(v[i]);
else
cnt1.push_back(v[i]);
}
map<int, int> CNT1, CNT2;
fo... | replace | 31 | 32 | 31 | 32 | TLE | |
p03244 | C++ | Runtime Error | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
#define ll long long
#define rep(i, s, n) for (ll i = (ll)(s); i < (ll)(n); i++)
#define ... | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
#define ll long long
#define rep(i, s, n) for (ll i = (ll)(s); i < (ll)(n); i++)
#define ... | replace | 191 | 206 | 191 | 202 | 0 | |
p03244 | C++ | Runtime Error | //
// AtCoder Beginner Contest 111
// C
// https://atcoder.jp/contests/abc111/tasks/arc103_a
//
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <ctime>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#inc... | //
// AtCoder Beginner Contest 111
// C
// https://atcoder.jp/contests/abc111/tasks/arc103_a
//
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <ctime>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#inc... | replace | 48 | 50 | 48 | 50 | 0 | |
p03244 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
vector<int> mode2(vector<int> a) {
sort(a.begin(), a.end());
int temp1, temp1n;
int temp2, temp2n;
int p = 0;
temp1n = 0;
temp2n = 0;
for (int i = 0; i < a.size() - 1; i++) {
if (a[i] == ... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
vector<int> mode2(vector<int> a) {
sort(a.begin(), a.end());
int temp1, temp1n;
int temp2, temp2n;
int p = 0;
temp1n = 0;
temp2n = 0;
for (int i = 0; i < a.size() - 1; i++) {
if (a[i] == ... | replace | 34 | 35 | 34 | 35 | 0 | |
p03244 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
int main() {
ll n;
cin >> n;
ll e[n], o[n], k = 0, l = 0;
for (ll i = 0; i < n; i++) {
if (i % 2 == 0) {
cin >> e[k];
k++;
} else {
cin >> o[l];
l++;
}
}
vector<pair<ll, ll>> ee, oo;
k = n / 2;
so... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
int main() {
ll n;
cin >> n;
ll e[n], o[n], k = 0, l = 0;
for (ll i = 0; i < n; i++) {
if (i % 2 == 0) {
cin >> e[k];
k++;
} else {
cin >> o[l];
l++;
}
}
vector<pair<ll, ll>> ee, oo;
k = n / 2;
so... | replace | 70 | 71 | 70 | 71 | 0 | |
p03244 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define int ll
#define REP(i, n) for (int i = 0; i < n; ++i)
#define ALL(name) name.begin(), name.end()
#define SORT(name) sort(name.begin(), name.end())
#define ZERO(p) memset(p, 0, sizeof(p))
#define MINUS(p) memset(p, -1, sizeof(p))
#if 1
#define ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define int ll
#define REP(i, n) for (int i = 0; i < n; ++i)
#define ALL(name) name.begin(), name.end()
#define SORT(name) sort(name.begin(), name.end())
#define ZERO(p) memset(p, 0, sizeof(p))
#define MINUS(p) memset(p, -1, sizeof(p))
#if 1
#define ... | replace | 61 | 63 | 61 | 71 | TLE | |
p03244 | C++ | Runtime Error | #include <bits/stdc++.h>
#define MAX 3005
#define mp make_pair
using namespace std;
typedef pair<int, int> ii;
typedef long long ll;
int cnt1[MAX], cnt2[MAX], arr[MAX], vis1[MAX], vis2[MAX];
priority_queue<ii> pq1, pq2;
int main() {
ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
#ifdef ONLINE_JUDGE
freopen("i... | #include <bits/stdc++.h>
#define MAX 100005
#define mp make_pair
using namespace std;
typedef pair<int, int> ii;
typedef long long ll;
int cnt1[MAX], cnt2[MAX], arr[MAX], vis1[MAX], vis2[MAX];
priority_queue<ii> pq1, pq2;
int main() {
ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
#ifdef ONLINE_JUDGE
freopen(... | replace | 1 | 2 | 1 | 2 | 0 | |
p03244 | Python | Runtime Error | import collections
n = int(input())
v = list(map(int, input().split()))
odd = collections.defaultdict(int)
even = collections.defaultdict(int)
for i in range(n):
if i % 2 == 0:
even[v[i]] += 1
else:
odd[v[i]] += 1
even = list(even.items())
odd = list(odd.items())
even.sort(key=lambda x: x... | import collections
n = int(input())
v = list(map(int, input().split()))
odd = collections.defaultdict(int)
even = collections.defaultdict(int)
for i in range(n):
if i % 2 == 0:
even[v[i]] += 1
else:
odd[v[i]] += 1
even = list(even.items())
odd = list(odd.items())
even.sort(key=lambda x: x... | replace | 30 | 31 | 30 | 31 | 0 | |
p03244 | Python | Runtime Error | from collections import Counter
n = int(input())
v = list(map(int, input().split()))
if len(set(v)) == 1:
print(n // 2)
else:
v1 = [v[i] for i in range(0, n, 2)]
v2 = [v[i + 1] for i in range(0, n, 2)]
kw1 = Counter(v1)
kw2 = Counter(v2)
x1 = kw1.most_common()[0][0]
x2 = kw2.most_common(... | from collections import Counter
n = int(input())
v = list(map(int, input().split()))
if len(set(v)) == 1:
print(n // 2)
else:
v1 = [v[i] for i in range(0, n, 2)]
v2 = [v[i + 1] for i in range(0, n, 2)]
kw1 = Counter(v1)
kw2 = Counter(v2)
x1 = kw1.most_common()[0][0]
x2 = kw2.most_common(... | replace | 48 | 49 | 48 | 49 | 0 | |
p03244 | Python | Runtime Error | from collections import Counter
N = int(input())
index = 0
even_numbers = []
odd_numbers = []
for i in input().split():
if index % 2 == 0:
even_numbers.append(int(i))
else:
odd_numbers.append(int(i))
index += 1
even = Counter(even_numbers).most_common(2)
odd = Counter(odd_numbers).most_c... | from collections import Counter
N = int(input())
index = 0
even_numbers = []
odd_numbers = []
for i in input().split():
if index % 2 == 0:
even_numbers.append(int(i))
else:
odd_numbers.append(int(i))
index += 1
even = Counter(even_numbers).most_common(2)
odd = Counter(odd_numbers).most_c... | replace | 18 | 20 | 18 | 23 | 0 | |
p03244 | Python | Runtime Error | n = int(input())
v = list(map(int, input().split()))
even_list = [0] * (n + 1)
odd_list = [0] * (n + 1)
for i in range(n):
if i % 2 == 0:
even_list[v[i]] += 1
else:
odd_list[v[i]] += 1
if even_list.index(max(even_list)) == odd_list.index(max(odd_list)):
even_sorted, odd_sorted = sorted(ev... | n = int(input())
v = list(map(int, input().split()))
even_list = [0] * (100000 + 1)
odd_list = [0] * (100000 + 1)
for i in range(n):
if i % 2 == 0:
even_list[v[i]] += 1
else:
odd_list[v[i]] += 1
if even_list.index(max(even_list)) == odd_list.index(max(odd_list)):
even_sorted, odd_sorted =... | replace | 2 | 4 | 2 | 4 | 0 | |
p03244 | Python | Runtime Error | from collections import Counter
n = int(input())
v = tuple(map(int, input().split()))
c1 = Counter(v[::2])
c2 = Counter(v[1::2])
if len(set(v)) == 1:
print(n // 2)
else:
c1m = c1.most_common(1)
c2m = c2.most_common(1)
if c1m[0][0] == c2m[0][0]:
print(min(n - c1m[0][1] - c2m[1][1], n - c1m[1][1]... | from collections import Counter
n = int(input())
v = tuple(map(int, input().split()))
c1 = Counter(v[::2])
c2 = Counter(v[1::2])
if len(set(v)) == 1:
print(n // 2)
else:
c1m = c1.most_common(2)
c2m = c2.most_common(2)
if c1m[0][0] == c2m[0][0]:
print(min(n - c1m[0][1] - c2m[1][1], n - c1m[1][1]... | replace | 9 | 11 | 9 | 11 | 0 | |
p03244 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
const int Vmax = 100000;
using pii = pair<int, int>;
int N, buf;
cin >> N;
int Nhalf = N / 2;
vector<pii> odd;
vector<pii> even;
for (int i = 1; i <= Vmax; i++) {
odd.emplace_back(make_pair(i, 0));
even.emplace_back(make_pair(i, 0));
... | #include <bits/stdc++.h>
using namespace std;
int main() {
const int Vmax = 100000;
using pii = pair<int, int>;
int N, buf;
cin >> N;
int Nhalf = N / 2;
vector<pii> odd;
vector<pii> even;
for (int i = 0; i <= Vmax;
i++) { // 頻度をとるとき1-indexedのままにするため,ダミーを入れる
odd.emplace_back(make_pair(i, 0)... | replace | 13 | 14 | 13 | 15 | 0 | |
p03244 | Python | Runtime Error | from collections import Counter
n = int(input())
v = input().split()
v1 = v[::2]
v2 = v[1::2]
c1 = Counter(v1).most_common(2)
c2 = Counter(v2).most_common(2)
if c1[0][0] != c2[0][0]:
print(n - c1[0][1] - c2[0][1])
else:
print(min(n - c1[0][1] - c2[1][1], n - c1[1][1] - c2[0][1]))
| from collections import Counter
n = int(input())
v = input().split()
v1 = v[::2]
v2 = v[1::2]
c1 = Counter(v1).most_common(2)
c2 = Counter(v2).most_common(2)
if len(set(v)) == 1:
print(len(v) // 2)
elif c1[0][0] != c2[0][0]:
print(n - c1[0][1] - c2[0][1])
else:
print(min(n - c1[0][1] - c2[1][1], n - c1[1... | replace | 10 | 11 | 10 | 13 | 0 | |
p03244 | Python | Time Limit Exceeded | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from collections import defaultdict
def solve():
n = int(input())
v = [int(i) for i in input().split()]
d1 = defaultdict(int)
d2 = defaultdict(int)
for i in range(n):
if i % 2 == 0:
d1[v[i]] += 1
else:
d2[v[i]] ... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from collections import defaultdict
def solve():
n = int(input())
v = [int(i) for i in input().split()]
d1 = defaultdict(int)
d2 = defaultdict(int)
for i in range(n):
if i % 2 == 0:
d1[v[i]] += 1
else:
d2[v[i]] ... | replace | 31 | 46 | 31 | 44 | TLE | |
p03244 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (n); i++)
const ll MOD = 1000000007;
int main() {
int n;
cin >> n;
vector<pair<int, int>> K;
vector<pair<int, int>> G;
vector<int> KI(n / 2);
vector<int> GU(n / 2);
for (int i = 0; i < n / 2; i++) {... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (n); i++)
const ll MOD = 1000000007;
int main() {
int n;
cin >> n;
vector<pair<int, int>> K;
vector<pair<int, int>> G;
vector<int> KI(n / 2);
vector<int> GU(n / 2);
for (int i = 0; i < n / 2; i++) {... | replace | 29 | 31 | 29 | 31 | 0 | |
p03244 | C++ | Runtime Error | #include <algorithm>
#include <complex>
#include <cstdlib>
#include <ctime>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <time.h>
#include <vector>
using namespace std;
#define SA... | #include <algorithm>
#include <complex>
#include <cstdlib>
#include <ctime>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <time.h>
#include <vector>
using namespace std;
#define SA... | replace | 65 | 67 | 65 | 67 | 0 | |
p03244 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define eps 1e-7
#define For(i, a, b) for (int i = a; i <= b; i++)
#define Fore(i, a, b) for (int i = a; i >= b; i--)
#define lson l, mid, rt << 1
#define rson mid + 1, r, rt << 1 | 1
#define mkp make_pair
#define pb push_back
#define sz size()
#define met(a, b) memset(a, b... | #include <bits/stdc++.h>
using namespace std;
#define eps 1e-7
#define For(i, a, b) for (int i = a; i <= b; i++)
#define Fore(i, a, b) for (int i = a; i >= b; i--)
#define lson l, mid, rt << 1
#define rson mid + 1, r, rt << 1 | 1
#define mkp make_pair
#define pb push_back
#define sz size()
#define met(a, b) memset(a, b... | replace | 59 | 61 | 59 | 61 | TLE | |
p03245 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n;
cin >> n;
ll x[n], y[n];
int f[2] = {0, 0};
for (int i = 0; i < n; i++) {
cin >> x[i] >> y[i];
f[(x[i] + y[i] + 2) % 2]++;
}
if (f[0] * f[1] > 0) {
cout << -1 << endl;
return 0;
}
vector<ll> d;
fo... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n;
cin >> n;
ll x[n], y[n];
int f[2] = {0, 0};
for (int i = 0; i < n; i++) {
cin >> x[i] >> y[i];
f[(x[i] + y[i] + 1000000000000) % 2]++;
}
if (f[0] * f[1] > 0) {
cout << -1 << endl;
return 0;
}
vector... | replace | 10 | 11 | 10 | 11 | 0 | |
p03245 | C++ | Runtime Error | #include <algorithm>
#include <climits>
#include <iostream>
#include <iterator>
#include <sstream>
#include <vector>
using namespace std;
const int dx[4] = {0, 1, 0, -1};
const int dy[4] = {1, 0, -1, 0};
const string dir = "URDL";
string solve(long long x, long long y, const vector<long long> &arm) {
string ret;
... | #include <algorithm>
#include <climits>
#include <iostream>
#include <iterator>
#include <sstream>
#include <vector>
using namespace std;
const int dx[4] = {0, 1, 0, -1};
const int dy[4] = {1, 0, -1, 0};
const string dir = "URDL";
string solve(long long x, long long y, const vector<long long> &arm) {
string ret;
... | replace | 51 | 52 | 51 | 52 | 0 | |
p03245 | C++ | Runtime Error | #include <algorithm>
#include <cctype>
#include <cstdio>
#include <cstring>
using namespace std;
inline int read(int f = 1, int x = 0, char ch = ' ') {
while (!isdigit(ch = getchar()))
if (ch == '-')
f = -1;
while (isdigit(ch))
x = x * 10 + ch - '0', ch = getchar();
return f * x;
}
const int N = 4e1... | #include <algorithm>
#include <cctype>
#include <cstdio>
#include <cstring>
using namespace std;
inline int read(int f = 1, int x = 0, char ch = ' ') {
while (!isdigit(ch = getchar()))
if (ch == '-')
f = -1;
while (isdigit(ch))
x = x * 10 + ch - '0', ch = getchar();
return f * x;
}
const int N = 1e3... | replace | 13 | 16 | 13 | 16 | 0 | |
p03245 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <stdio.h>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
int x[2010], y[2010], pow[2010], sum[2010], n;
int main() {
scanf("%d", &n);
int i, j;
for (i = 1; i <= n; i++) {
scanf("%d%d", &x[i], &y[i]... | #include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <stdio.h>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
int x[2010], y[2010], pow[2010], sum[2010], n;
int main() {
scanf("%d", &n);
int i, j;
for (i = 1; i <= n; i++) {
scanf("%d%d", &x[i], &y[i]... | replace | 31 | 32 | 31 | 32 | 0 | |
p03245 | C++ | Runtime Error | #include <bits/stdc++.h>
#define fst first
#define snd second
#define rep(n) for (lint I = 0; (I) < (lint)(n); ++(I))
#define repeat(i, n) for (lint i = 0; (i) < (lint)(n); ++(i))
#define repeat_to(i, n) for (lint i = 0; (i) <= (lint)(n); ++(i))
#define repeat_from(i, m, n) for (lint i = (m); (i) < (lint)(n); ++(i))
#d... | #include <bits/stdc++.h>
#define fst first
#define snd second
#define rep(n) for (lint I = 0; (I) < (lint)(n); ++(I))
#define repeat(i, n) for (lint i = 0; (i) < (lint)(n); ++(i))
#define repeat_to(i, n) for (lint i = 0; (i) <= (lint)(n); ++(i))
#define repeat_from(i, m, n) for (lint i = (m); (i) < (lint)(n); ++(i))
#d... | replace | 41 | 42 | 41 | 42 | 0 | |
p03245 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <sys/time.h>
using namespace std;
// hamko utils
#define rep(i, n) for (long long i = 0; i < (long long)(n); i++)
#define repi(i, a, b) \
for (long long i = (long long)(a); i < (long long)(b); i++)
#define pb push_back
#define... | #include <bits/stdc++.h>
#include <sys/time.h>
using namespace std;
// hamko utils
#define rep(i, n) for (long long i = 0; i < (long long)(n); i++)
#define repi(i, a, b) \
for (long long i = (long long)(a); i < (long long)(b); i++)
#define pb push_back
#define... | replace | 246 | 247 | 246 | 247 | 0 | |
p03246 | C++ | Runtime Error |
// include
//------------------------------------------
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#inclu... |
// include
//------------------------------------------
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#inclu... | replace | 84 | 86 | 84 | 86 | -11 | |
p03246 | C++ | Runtime Error | #include <cstdio>
#include <iostream>
using namespace std;
int n, mx[2], mi[2], my[2], ans, a[2][100005];
int main() {
int i, j, t;
cin >> n;
for (i = 0; i < n; i++)
scanf("%d", &t), a[i % 2][t]++;
for (i = 0; i < 2; i++)
for (j = 1; j <= 100000; j++) {
if (a[i][j] > mx[i])
mx[i] = a[i][j]... | #include <cstdio>
#include <iostream>
using namespace std;
int n, mx[2], mi[2], my[2], ans, a[2][100005];
int main() {
int i, j, t;
cin >> n;
for (i = 0; i < n; i++)
scanf("%d", &t), a[i % 2][t]++;
for (i = 0; i < 2; i++)
for (j = 1; j <= 100000; j++) {
if (a[i][j] > mx[i])
mx[i] = a[i][j]... | replace | 21 | 22 | 21 | 22 | 0 | |
p03246 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 10000;
int a[N + 1], b[N + 1];
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int n, x;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> x;
if (i % 2) {
b[x]++;
} else {
a[x]++;
}
}
int ma = ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 100000;
int a[N + 1], b[N + 1];
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int n, x;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> x;
if (i % 2) {
b[x]++;
} else {
a[x]++;
}
}
int ma =... | replace | 6 | 7 | 6 | 7 | 0 | |
p03246 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
inline LL read() {
LL x;
scanf("%lld", &x);
return x;
}
inline void read(char *s) { scanf("%s", s); }
inline void no() {
printf("no\n");
exit(0);
}
#define maxn 12000
int v[2][maxn], ans[2], pans[2];
int main() {
int n = read();
for (i... | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
inline LL read() {
LL x;
scanf("%lld", &x);
return x;
}
inline void read(char *s) { scanf("%s", s); }
inline void no() {
printf("no\n");
exit(0);
}
#define maxn 120000
int v[2][maxn], ans[2], pans[2];
int main() {
int n = read();
for (... | replace | 16 | 17 | 16 | 17 | 0 | |
p03246 | C++ | Runtime Error | #include <bits/stdc++.h>
#define pii pair<int, int>
#define ll long long
#define F first
#define S second
#define mp make_pair
using namespace std;
const int N = 1e5 + 123;
int n;
int a[N], cnt1[N], cnt2[N], ans = N;
pii x, y, p;
set<pii> s, t;
int main() {
cin >> n;
for (int i = 1; i <= n; i++) {
cin >... | #include <bits/stdc++.h>
#define pii pair<int, int>
#define ll long long
#define F first
#define S second
#define mp make_pair
using namespace std;
const int N = 1e5 + 123;
int n;
int a[N], cnt1[N], cnt2[N], ans = N;
pii x, y, p;
set<pii> s, t;
int main() {
cin >> n;
for (int i = 1; i <= n; i++) {
cin >... | replace | 35 | 37 | 35 | 37 | -6 | free(): invalid pointer
|
p03246 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define pb push_back
#define mp make_pair
#define pll pair<ll, ll>
#define INF LLONG_MAX
#define PI acos(-1)
const ll MOD = 1e9 + 7;
#define x first
#define y second
#define all(x) x.begin(), x.end()
#define mem(a, b) memset(a, b, sizeof(a))
#define... | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define pb push_back
#define mp make_pair
#define pll pair<ll, ll>
#define INF LLONG_MAX
#define PI acos(-1)
const ll MOD = 1e9 + 7;
#define x first
#define y second
#define all(x) x.begin(), x.end()
#define mem(a, b) memset(a, b, sizeof(a))
#define... | delete | 86 | 90 | 86 | 86 | 0 | |
p03246 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, a, b) for (int i = int(a); i < int(b); i++)
#define rer(i, a, b) for (int i = int(a) - 1; i >= int(b); i--)
using namespace std;
typedef long long int ll;
typedef pair<int, int> P;
vector<P> s;
vector<P> t;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int n;
sc... | #include <bits/stdc++.h>
#define rep(i, a, b) for (int i = int(a); i < int(b); i++)
#define rer(i, a, b) for (int i = int(a) - 1; i >= int(b); i--)
using namespace std;
typedef long long int ll;
typedef pair<int, int> P;
vector<P> s;
vector<P> t;
int main() {
int n;
scanf("%d", &n);
int v[n];
rep(i, 0, n) {
... | delete | 11 | 13 | 11 | 11 | -11 | |
p03246 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
#ifndef ONLINE_JUDGE
freopen("vvv_in.txt", "r", stdin);
#endif
int n;
cin >> n;
map<int, int> high[2];
for (int i = 0; i < n; ++i) {
int k;
cin >> k;
++high[i... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n;
cin >> n;
map<int, int> high[2];
for (int i = 0; i < n; ++i) {
int k;
cin >> k;
++high[i % 2][k];
}
int mx[2] = {};
for (auto it = high[0].begin()... | delete | 8 | 12 | 8 | 8 | TLE | |
p03246 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <string>
#include <time.h>
#include <unordered_map>
#include <... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <string>
#include <time.h>
#include <unordered_map>
#include <... | insert | 51 | 51 | 51 | 52 | TLE | |
p03246 | C++ | Runtime Error | /*
Author : N_o_o_B
Created : June 15 2020 15:42:13
*/
#include <bits/stdc++.h>
using namespace std;
/*
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
*/
#define TRACE
#ifdef TRACE
#define trace(...) \... | /*
Author : N_o_o_B
Created : June 15 2020 15:42:13
*/
#include <bits/stdc++.h>
using namespace std;
/*
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
*/
#define TRACE
#ifdef TRACE
#define trace(...) \... | replace | 118 | 119 | 118 | 119 | 0 | Time Taken : 0.012119
|
p03246 | C++ | Runtime Error | #include <stdio.h>
#define ARC(i, a, b) for (int i = (a); i < (b); ++i)
#define RC(i, n) ARC(i, 0, n)
#define ARCH(i, a, b) for (int i = (a)-1; i >= (b); --i)
#define RCH(i, n) ARCH(i, n, 0)
template <class T> T ath(const T &a, const T &b) { return a > b ? a : b; }
int n, v[2][12000], av[2], inav[2], aav[2], inaav[2... | #include <stdio.h>
#define ARC(i, a, b) for (int i = (a); i < (b); ++i)
#define RC(i, n) ARC(i, 0, n)
#define ARCH(i, a, b) for (int i = (a)-1; i >= (b); --i)
#define RCH(i, n) ARCH(i, n, 0)
template <class T> T ath(const T &a, const T &b) { return a > b ? a : b; }
int n, v[2][120000], av[2], inav[2], aav[2], inaav[... | replace | 9 | 10 | 9 | 10 | 0 | |
p03246 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define all(aaa) aaa.begin(), aaa.end()
const int N = 1e5 + 5;
int ct[2][N], a[N];
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> a[i];
ct[i & 1][a[i]]++;
}
... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define all(aaa) aaa.begin(), aaa.end()
const int N = 1e5 + 5;
int ct[2][N], a[N];
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> a[i];
ct[i & 1][a[i]]++;
}
... | replace | 30 | 31 | 30 | 31 | 0 | |
p03246 | C++ | Time Limit Exceeded |
#include <bits/stdc++.h>
#include <iostream>
using namespace std;
#define int long long
#define double long double
#define endl "\n"
#define pb push_back
#define PI 3.1415926535897932384626433832795l
#define F first
#define S second
#define mp make_pair
#define f(i, n) for (int i = 0; i < n; i++)
#define fastio ... |
#include <bits/stdc++.h>
#include <iostream>
using namespace std;
#define int long long
#define double long double
#define endl "\n"
#define pb push_back
#define PI 3.1415926535897932384626433832795l
#define F first
#define S second
#define mp make_pair
#define f(i, n) for (int i = 0; i < n; i++)
#define fastio ... | replace | 113 | 115 | 113 | 115 | TLE | |
p03246 | C++ | Runtime Error | #include <bits/stdc++.h>
#define int long long
using namespace std;
int32_t main() {
int n;
cin >> n;
map<int, int> odd, even;
for (int i = 0; i < n; i++) {
int temp;
cin >> temp;
if (i % 2) {
odd[temp]++;
} else {
even[temp]++;
}
}
vector<pair<int, int>> a, b;
for (a... | #include <bits/stdc++.h>
#define int long long
using namespace std;
int32_t main() {
int n;
cin >> n;
map<int, int> odd, even;
for (int i = 0; i < n; i++) {
int temp;
cin >> temp;
if (i % 2) {
odd[temp]++;
} else {
even[temp]++;
}
}
vector<pair<int, int>> a, b;
for (a... | replace | 41 | 42 | 41 | 42 | 0 | |
p03246 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define forx(i, a, b) for (int i = (a); i < (b); i++)
#define rep(i, n) for (int i = 0; i < (n); i++)
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int n, ans = 1e9, amax = 0, bmax = 0, af, bf;
cin >> n;
map<int, int> a, b;
rep(i,... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define forx(i, a, b) for (int i = (a); i < (b); i++)
#define rep(i, n) for (int i = 0; i < (n); i++)
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int n, ans = 1e9, amax = 0, bmax = 0, af, bf;
cin >> n;
map<int, int> a, b;
rep(i,... | replace | 26 | 27 | 26 | 27 | TLE | |
p03246 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <utility>
#... | #include <algorithm>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <utility>
#... | replace | 26 | 27 | 26 | 27 | 0 | |
p03246 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <cstdlib>
using namespace std;
int main() {
int n, M, m, amax = 0, amaxi = 0, bmax = 0, bmaxi = 0;
cin >> n;
vector<int> v(n + 10), a(100000, 0), b(100000, 0);
for (int i = 0; i < n; i++) {
cin >> v.at(i);
}
for (int i = 0; i < n - 1; i += 2) {
a.at(v.at(i))++;
... | #include <bits/stdc++.h>
#include <cstdlib>
using namespace std;
int main() {
int n, M, m, amax = 0, amaxi = 0, bmax = 0, bmaxi = 0;
cin >> n;
vector<int> v(n + 10), a(100001, 0), b(100001, 0);
for (int i = 0; i < n; i++) {
cin >> v.at(i);
}
for (int i = 0; i < n - 1; i += 2) {
a.at(v.at(i))++;
... | replace | 7 | 8 | 7 | 8 | 0 | |
p03246 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
using namespace std;
const int N = 10010;
int n, s1[N], s2[N], mx, mx11, mx12, mx21, mx22, v11, v12, v21, v22;
int main() {
int t, ans = 0;
scanf("%d", &n);
for (int i = 1; i <= n; i++) {
scanf("%d", &t);
mx = max(mx, t);
if (i & 1)
s1[t]++;
else
... | #include <algorithm>
#include <cstdio>
using namespace std;
const int N = 100010;
int n, s1[N], s2[N], mx, mx11, mx12, mx21, mx22, v11, v12, v21, v22;
int main() {
int t, ans = 0;
scanf("%d", &n);
for (int i = 1; i <= n; i++) {
scanf("%d", &t);
mx = max(mx, t);
if (i & 1)
s1[t]++;
else
... | replace | 3 | 4 | 3 | 4 | 0 | |
p03246 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> v(n);
for (int i = 0; i < n; i++) {
cin >> v[i];
}
if (*max_element(v.begin(), v.end()) == *min_element(v.begin(), v.end())) {
cout << n / 2 << endl;
return 0;
}
map<int, int> cnt[2];
for (int i = 0; i... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> v(n);
for (int i = 0; i < n; i++) {
cin >> v[i];
}
if (*max_element(v.begin(), v.end()) == *min_element(v.begin(), v.end())) {
cout << n / 2 << endl;
return 0;
}
map<int, int> cnt[2];
for (int i = 0; i... | replace | 22 | 29 | 22 | 38 | TLE | |
p03246 | C++ | Runtime Error | /*
TASK: C - /\/\/\/
LANG: C++
*/
#pragma GCC optimize("O3")
#pragma GCC target("sse4")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/rope>
/*
unsigned seed1 = std::chrono::system_clock::now().time_since_epoch().count();
mt19937 g1.seed(seed1);
//... | /*
TASK: C - /\/\/\/
LANG: C++
*/
#pragma GCC optimize("O3")
#pragma GCC target("sse4")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/rope>
/*
unsigned seed1 = std::chrono::system_clock::now().time_since_epoch().count();
mt19937 g1.seed(seed1);
//... | replace | 192 | 196 | 192 | 196 | 0 | |
p03246 | C++ | Runtime Error | /**
* Author: "Robin Singh" !!!
* BrainyIsTheNewSexy (CodeForces)
* rob_in_1 (Other OJs)
**/
#include <bits/stdc++.h>
using namespace std;
#define IOS \
ios::sync_with_stdio(0); ... | /**
* Author: "Robin Singh" !!!
* BrainyIsTheNewSexy (CodeForces)
* rob_in_1 (Other OJs)
**/
#include <bits/stdc++.h>
using namespace std;
#define IOS \
ios::sync_with_stdio(0); ... | replace | 68 | 72 | 68 | 70 | -11 | |
p03246 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mkp make_pair
#define ld long double
using namespace std;
int n, a[20100], ct[20100], proh;
int maxa1, maxa2, num1, num2;
int main() {
scanf("%d", &n);
for (int i = 0; i < n; i++) {
scanf("%d", &a[i]);
}
maxa1 = 0;
for (int i... | #include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mkp make_pair
#define ld long double
using namespace std;
int n, a[200100], ct[200100], proh;
int maxa1, maxa2, num1, num2;
int main() {
scanf("%d", &n);
for (int i = 0; i < n; i++) {
scanf("%d", &a[i]);
}
maxa1 = 0;
for (int... | replace | 9 | 10 | 9 | 10 | 0 | |
p03246 | C++ | Runtime Error | #include <bits/stdc++.h>
#define CEIL(a, b) ((a) / (b) + ((a) % (b) == 0 ? 0 : 1))
#define X first
#define Y second
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using vl = vector<ll>;
using vs = vector<string>;
constexpr int MOD = int(1e9 + 7);
constexpr int INF = int(1e9 + 1);
constexpr ll... | #include <bits/stdc++.h>
#define CEIL(a, b) ((a) / (b) + ((a) % (b) == 0 ? 0 : 1))
#define X first
#define Y second
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using vl = vector<ll>;
using vs = vector<string>;
constexpr int MOD = int(1e9 + 7);
constexpr int INF = int(1e9 + 1);
constexpr ll... | replace | 56 | 58 | 56 | 57 | 0 | |
p03247 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define For(i, l, r) for (int i = (l), i##end = (r); i <= i##end; i++)
#define Fordown(i, r, l) for (int i = (r), i##end = (l); i >= i##end; i--)
#define debug(x) cout << #x << " = " << x << endl
using namespace std;
typedef long long ll;
template <typename T> inline bool chkmin(T &x, T y) {... | #include <bits/stdc++.h>
#define For(i, l, r) for (int i = (l), i##end = (r); i <= i##end; i++)
#define Fordown(i, r, l) for (int i = (r), i##end = (l); i >= i##end; i--)
#define debug(x) cout << #x << " = " << x << endl
using namespace std;
typedef long long ll;
template <typename T> inline bool chkmin(T &x, T y) {... | delete | 61 | 65 | 61 | 61 | TLE | |
p03247 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <string>
#define REP(i, a, n) for (int i = a; i <= n; ++i)
#define PER(i, a, n) for (int i =... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <string>
#define REP(i, a, n) for (int i = a; i <= n; ++i)
#define PER(i, a, n) for (int i =... | replace | 55 | 61 | 55 | 56 | 0 | |
p03247 | 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 mp make_pair
#define mod 1000000007LL
#define IN freopen("input.txt", "r", stdin)
#define OUT freopen("output.txt", "w", stdout)
#define FOR(i, a, b) for (i = a; i <= b; i++)
#def... | #include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>/
// #include <ext/pb_ds/tree_policy.hpp>
#define pb push_back
#define mp make_pair
#define mod 1000000007LL
#define IN freopen("input.txt", "r", stdin)
#define OUT freopen("output.txt", "w", stdout)
#define FOR(i, a, b) for (i = a; i <= b; i++)
#def... | replace | 40 | 41 | 40 | 41 | 0 | |
p03247 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define fo(i, l, r) for (int i = l; i <= r; i++)
#define of(i, l, r) for (int i = l; i >= r; i--)
#define fe(i, u) for (int i = head[u]; i; i = e[i].next)
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
inline void open(const char *s) {
#ifndef ONLINE_JUDGE
char str[20]... | #include <bits/stdc++.h>
#define fo(i, l, r) for (int i = l; i <= r; i++)
#define of(i, l, r) for (int i = l; i >= r; i--)
#define fe(i, u) for (int i = head[u]; i; i = e[i].next)
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
inline void open(const char *s) {
#ifndef ONLINE_JUDGE
char str[20]... | delete | 80 | 81 | 80 | 80 | TLE | |
p03247 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define F0R(i, a) FOR(i, 0, a)
#define ROF(i, a, b) for (int i = (b)-1; i >= (a); --i)
#define R0F(i, a) ROF(i, 0, a)
#define f first
#define s second
using ll = long long;
using ld = long double;
ll INF = LLONG_MAX;
u... | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define F0R(i, a) FOR(i, 0, a)
#define ROF(i, a, b) for (int i = (b)-1; i >= (a); --i)
#define R0F(i, a) ROF(i, 0, a)
#define f first
#define s second
using ll = long long;
using ld = long double;
ll INF = LLONG_MAX;
u... | replace | 89 | 90 | 89 | 90 | 0 | |
p03247 | C++ | Runtime Error | #include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <set>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
const int N = 1000 + 5;
int n;
int x[N], y[N];
const int dx[4] = {1, -1, 0, 0};
const int dy[4] = {0, 0, 1, -1};
const char dir[... | #include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <set>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
const int N = 1000 + 5;
int n;
int x[N], y[N];
const int dx[4] = {1, -1, 0, 0};
const int dy[4] = {0, 0, 1, -1};
const char dir[... | replace | 55 | 56 | 55 | 56 | 0 | |
p03247 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define all(V) V.begin(), V.end()
#define MOD 1000000007
ll dat[1010][3];
ll arms[41];
short B[41];
string F[1010];
int main() {
arms[0] = arms[1] = 1;
for (int i = 2; i < 35; i++) {
arms[i] = arms[i - 1] * 2;
}
ll S = (1LL << 34);
int N... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define all(V) V.begin(), V.end()
#define MOD 1000000007
ll dat[1010][3];
ll arms[41];
short B[41];
string F[1010];
int main() {
arms[0] = arms[1] = 1;
for (int i = 2; i < 35; i++) {
arms[i] = arms[i - 1] * 2;
}
ll S = (1LL << 34);
int N... | replace | 88 | 89 | 88 | 89 | -6 | d099d00f-f465-4af8-8561-db082d70bb0b.out: /home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03247/C++/s798615135.cpp:134: int main(): Assertion `0' failed.
|
p03247 | C++ | Runtime Error | #include <cmath>
#include <iostream>
using namespace std;
long long a[45], b[45];
int n, m, cnt;
long long x, y;
char s[45];
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
cin >> n;
for (int i = 1; i <= n; i++) {
cin >> a[i] >> b[i];
if ((a[i] + b[i]) & 1)
cnt++;
else
... | #include <cmath>
#include <iostream>
using namespace std;
long long a[1005], b[1005];
int n, m, cnt;
long long x, y;
char s[45];
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
cin >> n;
for (int i = 1; i <= n; i++) {
cin >> a[i] >> b[i];
if ((a[i] + b[i]) & 1)
cnt++;
else... | replace | 3 | 4 | 3 | 4 | 0 | |
p03247 | C++ | Runtime Error | #include <cassert>
#include <cstdio>
#include <iostream>
using namespace std;
typedef long long LL;
LL Abs(LL x) { return x < 0 ? -x : x; }
int n, m;
int d[40];
int x[1005], y[1005];
bool judge(LL x, LL y, int t) { return Abs(x) + Abs(y) < d[t + 1]; }
void print(LL x, LL y, int step) {
if (step == -1) {
return;
... | #include <cassert>
#include <cstdio>
#include <iostream>
using namespace std;
typedef long long LL;
LL Abs(LL x) { return x < 0 ? -x : x; }
int n, m;
int d[40];
int x[1005], y[1005];
bool judge(LL x, LL y, int t) { return Abs(x) + Abs(y) < d[t + 1]; }
void print(LL x, LL y, int step) {
if (step == -1) {
return;
... | replace | 43 | 44 | 43 | 44 | 0 | |
p03247 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int n, x[1010], y[1010];
int main() {
scanf("%d", &n);
for (int i = 1; i <= n; i++)
scanf("%d%d", y + i, x + i);
int tag = !!((x[1] + y[1]) % 2);
for (int i = 1; i <= n; i++)
if (tag != !!((x[i] + y[i]) % 2))
return puts("-1"), 0;
int m = tag ? 31 : ... | #include <bits/stdc++.h>
using namespace std;
int n, x[1010], y[1010];
int main() {
scanf("%d", &n);
for (int i = 1; i <= n; i++)
scanf("%d%d", y + i, x + i);
int tag = !!((x[1] + y[1]) % 2);
for (int i = 1; i <= n; i++)
if (tag != !!((x[i] + y[i]) % 2))
return puts("-1"), 0;
int m = tag ? 32 : ... | replace | 11 | 13 | 11 | 13 | 0 | |
p03247 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 1005;
int n, m;
int X[N], Y[N];
int d[N];
const int dx[5] = {-1, 1, 0, 0}, dy[4] = {0, 0, -1, 1};
const char dc[5] = {'R', 'L', 'U', 'D'};
void getp(ll x, ll y) {
for (int i = m; i; i--) {
int now = d[i];
for (int j = 0; j < ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 1005;
int n, m;
int X[N], Y[N];
ll d[N];
const int dx[5] = {-1, 1, 0, 0}, dy[4] = {0, 0, -1, 1};
const char dc[5] = {'R', 'L', 'U', 'D'};
void getp(ll x, ll y) {
for (int i = m; i; i--) {
int now = d[i];
for (int j = 0; j < 4... | replace | 7 | 8 | 7 | 8 | 0 | |
p03247 | C++ | Runtime Error | #define DEB
#include <bits/stdc++.h>
#define REP(i, m) for (int i = 0; i < (m); ++i)
#define REPN(i, m, in) for (int i = (in); i < (m); ++i)
#define ALL(t) (t).begin(), (t).end()
#define CLR(a) memset((a), 0, sizeof(a))
#define pb push_back
#define mp make_pair
#define fr first
#define sc second
using namespace std;
... | #define DEB
#include <bits/stdc++.h>
#define REP(i, m) for (int i = 0; i < (m); ++i)
#define REPN(i, m, in) for (int i = (in); i < (m); ++i)
#define ALL(t) (t).begin(), (t).end()
#define CLR(a) memset((a), 0, sizeof(a))
#define pb push_back
#define mp make_pair
#define fr first
#define sc second
using namespace std;
... | replace | 123 | 125 | 123 | 130 | 0 | xx = -2
yy = 0
x = 8589934588
y = 8589934588
xx = 0
yy = 2
x = 8589934592
y = 8589934588
xx = 2
yy = 0
x = 8589934592
y = 8589934592
|
p03247 | C++ | Runtime Error | //
// Created by Ильдар Ялалов on 28.10.2019.
//
// #pragma GCC optimize("Ofast")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <algorithm>
#include <assert.h>
#include <iostream>
#include <map>
#include <stdio.h>
#include <string>
#include <time.h>
#include <vector>
using ... | //
// Created by Ильдар Ялалов on 28.10.2019.
//
// #pragma GCC optimize("Ofast")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <algorithm>
#include <assert.h>
#include <iostream>
#include <map>
#include <stdio.h>
#include <string>
#include <time.h>
#include <vector>
using ... | replace | 91 | 93 | 91 | 93 | 0 | |
p03247 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <cstring>
#define fo(i, a, b) for (int i = a; i <= b; i++)
#define fd(i, a, b) for (int i = a; i >= b; i--)
using namespace std;
const int N = 55;
int n, x[N], y[N], d[N], m;
bool in[2];
int main() {
scanf("%d", &n);
fo(i, 1, n) {
scanf("%d%d", &x[i], &y[i]);
... | #include <algorithm>
#include <cstdio>
#include <cstring>
#define fo(i, a, b) for (int i = a; i <= b; i++)
#define fd(i, a, b) for (int i = a; i >= b; i--)
using namespace std;
const int N = 1005;
int n, x[N], y[N], d[N], m;
bool in[2];
int main() {
scanf("%d", &n);
fo(i, 1, n) {
scanf("%d%d", &x[i], &y[i]);... | replace | 7 | 8 | 7 | 8 | 0 | |
p03247 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
bool check(pair<ll, ll> a, int lim) {
return abs(a.first) + abs(a.second) <= lim;
}
int main() {
freopen("test.in", "r", stdin);
int n;
cin >> n;
vector<pair<int, int>> a(n);
int parity = -1;
for (int i = 0; i < n; ++i) {
int x, y;... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
bool check(pair<ll, ll> a, int lim) {
return abs(a.first) + abs(a.second) <= lim;
}
int main() {
int n;
cin >> n;
vector<pair<int, int>> a(n);
int parity = -1;
for (int i = 0; i < n; ++i) {
int x, y;
cin >> x >> y;
if (parity... | delete | 10 | 11 | 10 | 10 | -6 | terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
|
p03248 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int n = (int)s.size();
// 1 indexed にする
s = "x" + s;
if (s[1] == '0') {
cout << -1 << endl;
return 0;
}
if (s[n] == '1') {
cout << -1 << endl;
return 0;
}
for (int i = 1; i < n / 2; i++) {
if (s[i]... | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int n = (int)s.size();
// 1 indexed にする
s = "x" + s;
if (s[1] == '0') {
cout << -1 << endl;
return 0;
}
if (s[n] == '1') {
cout << -1 << endl;
return 0;
}
for (int i = 1; i < n / 2; i++) {
if (s[i]... | replace | 27 | 30 | 27 | 36 | 0 | |
p03248 | C++ | Runtime Error | #include <bits/stdc++.h>
typedef long long ll;
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define REP(i, a) FOR(i, 0, a)
using namespace std;
typedef pair<int, int> P;
string s;
vector<P> ans;
int main() {
cin >> s;
int n = (int)s.size();
bool flg = true;
if (s[n - 1] != '0') {
flg = false;
}
... | #include <bits/stdc++.h>
typedef long long ll;
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define REP(i, a) FOR(i, 0, a)
using namespace std;
typedef pair<int, int> P;
string s;
vector<P> ans;
int main() {
cin >> s;
int n = (int)s.size();
bool flg = true;
if (s[n - 1] != '0') {
flg = false;
}
... | replace | 66 | 68 | 66 | 69 | 0 | |
p03248 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#ifdef _DEBUG
#define _GLIBCXX_DEBUG
#include "dump.hpp"
#else
#define dump(...)
#endif
// #define int long long
typedef __int128_t Int;
#define DBG 1
#define rep(i, a, b) for (int i = (a); i < (b); i++)
#define rrep(i, a, b) for (int i = (b)-1; i >= (a); i--)
#define loo... | #include <bits/stdc++.h>
using namespace std;
#ifdef _DEBUG
#define _GLIBCXX_DEBUG
#include "dump.hpp"
#else
#define dump(...)
#endif
// #define int long long
typedef __int128_t Int;
#define DBG 1
#define rep(i, a, b) for (int i = (a); i < (b); i++)
#define rrep(i, a, b) for (int i = (b)-1; i >= (a); i--)
#define loo... | insert | 134 | 134 | 134 | 136 | 0 | |
p03248 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int n;
string s;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cin >> s;
for (int i = 1; i < s.length() - 1; i++)
if (s[0] == '0' || s[s.length() - 1] == '1' ||
s[i] != s[s.length() - i - 2]) {
cout << -1;
return 1;
}
cout <... | #include <bits/stdc++.h>
using namespace std;
int n;
string s;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cin >> s;
for (int i = 1; i < s.length() - 1; i++)
if (s[0] == '0' || s[s.length() - 1] == '1' ||
s[i] != s[s.length() - i - 2]) {
cout << -1;
return 0;
}
cout <... | replace | 15 | 16 | 15 | 16 | 1 | |
p03248 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main() {
string s, s_rev;
int n, j;
cin >> s;
n = s.length();
if (s[n - 1] == '1') {
cout << "-1";
return 0;
}
s.erase(n - 1);
reverse(s.begin(), s.end());
s_rev = s;
reverse(s.begin(), s.end());
if (s != ... | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main() {
string s, s_rev;
int n, j;
cin >> s;
n = s.length();
if (s[n - 1] == '1' || s[0] == '0') {
cout << "-1";
return 0;
}
s.erase(n - 1);
reverse(s.begin(), s.end());
s_rev = s;
reverse(s.begin(), s.end(... | replace | 10 | 11 | 10 | 11 | 0 | |
p03248 | C++ | Runtime Error | #define pnode node *
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef long long ll;
typedef cc_hash_table<ll, ll, hash<ll>> ht;
void bad() {
cout << -1 << "\n";
exit(0);
}
ll n;
string s;
vector<ll> a;
void solve() {
cin >> s;
n = s.siz... | #define pnode node *
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef long long ll;
typedef cc_hash_table<ll, ll, hash<ll>> ht;
void bad() {
cout << -1 << "\n";
exit(0);
}
ll n;
string s;
vector<ll> a;
void solve() {
cin >> s;
n = s.siz... | insert | 43 | 43 | 43 | 44 | 0 | |
p03248 | C++ | Time Limit Exceeded | #include <cstdio>
#include <cstring>
#include <set>
using std::set;
int u[101000], v[101000], tot = 0;
char c[101000];
set<int> st;
void dfs(int x, int siz) {
int rt = x;
siz--;
x++;
while (1) {
set<int>::iterator it = st.lower_bound(siz);
if (it == st.begin() && (*it) != siz)
break;
if ((*... | #include <cstdio>
#include <cstring>
#include <set>
using std::set;
int u[101000], v[101000], tot = 0;
char c[101000];
set<int> st;
void dfs(int x, int siz) {
int rt = x;
siz--;
x++;
while (1) {
set<int>::iterator it = st.lower_bound(siz);
if (st.size() == 0 || (it == st.begin() && (*it) != siz))
... | replace | 16 | 17 | 16 | 17 | TLE | |
p03248 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <chrono>
#include <cmath>
#include <cstdio>
#include <ctime>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
using namesp... | #include <algorithm>
#include <cassert>
#include <chrono>
#include <cmath>
#include <cstdio>
#include <ctime>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
using namesp... | insert | 140 | 140 | 140 | 145 | 0 | |
p03248 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#include <ctime>
#include <iostream>
using namespace std;
#define _LL long long
#define rep(i, n) for (_LL i = 0; i < (_LL)(n); i++)
#define vecrep(itr, v) for (auto itr = (v).begin(); itr != (v).end(); itr++)
bool check(vector<pair<int, int>> &branch) {
string s;
cin >> s;
int n = s.len... | #include <bits/stdc++.h>
#include <ctime>
#include <iostream>
using namespace std;
#define _LL long long
#define rep(i, n) for (_LL i = 0; i < (_LL)(n); i++)
#define vecrep(itr, v) for (auto itr = (v).begin(); itr != (v).end(); itr++)
bool check(vector<pair<int, int>> &branch) {
string s;
cin >> s;
int n = s.len... | insert | 33 | 33 | 33 | 34 | TLE | |
p03248 | C++ | Runtime Error | // LightOj Pass : qavajxyq
#include <bits/stdc++.h>
#define deb(x) cerr << (#x) << " : " << x << "\n"
#define ll long long int
#define ld long double
using namespace std;
const ll MOD = 1e9 + 7;
const ll INF = 1e18;
ll powmod(ll a, ll b, ll mod = MOD) {
ll res = 1ll;
b %= (mod - 1ll), a %= mod;
while (b) {
... | // LightOj Pass : qavajxyq
#include <bits/stdc++.h>
#define deb(x) cerr << (#x) << " : " << x << "\n"
#define ll long long int
#define ld long double
using namespace std;
const ll MOD = 1e9 + 7;
const ll INF = 1e18;
ll powmod(ll a, ll b, ll mod = MOD) {
ll res = 1ll;
b %= (mod - 1ll), a %= mod;
while (b) {
... | delete | 25 | 29 | 25 | 25 | 0 | |
p03248 | C++ | Runtime Error | #pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#include <bits/stdc++.h>
using namespace std;
#define mp make_pair
#define INF 10000000
#define MOD 1000000007
#define MID (l + r) / 2
#define HASHMOD 2305843009213693951
#define ll long long
#define ull unsigned long long
#define F first
#define S second... | #pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#include <bits/stdc++.h>
using namespace std;
#define mp make_pair
#define INF 10000000
#define MOD 1000000007
#define MID (l + r) / 2
#define HASHMOD 2305843009213693951
#define ll long long
#define ull unsigned long long
#define F first
#define S second... | replace | 43 | 44 | 43 | 44 | 0 | |
p03249 | C++ | Runtime Error | // LightOj Pass : qavajxyq
#include <bits/stdc++.h>
#define deb(x) cerr << (#x) << " : " << x << "\n"
#define ll long long int
#define ld long double
using namespace std;
const ll MOD = 1e9 + 7;
const ll INF = 1e18;
ll powmod(ll a, ll b, ll mod = MOD) {
ll res = 1ll;
b %= (mod - 1ll), a %= mod;
while (b) {
... | // LightOj Pass : qavajxyq
#include <bits/stdc++.h>
#define deb(x) cerr << (#x) << " : " << x << "\n"
#define ll long long int
#define ld long double
using namespace std;
const ll MOD = 1e9 + 7;
const ll INF = 1e18;
ll powmod(ll a, ll b, ll mod = MOD) {
ll res = 1ll;
b %= (mod - 1ll), a %= mod;
while (b) {
... | delete | 63 | 67 | 63 | 63 | 0 | |
p03249 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define MN 100005
int T, num, dep[MN], n, id[MN], head[MN];
ll a[MN];
map<ll, int> rea, cnt;
struct node {
int x, y;
};
vector<node> sc;
struct edge {
int to, next;
} g[MN];
bool cmp(int x, int y) { return a[x] > a[y]; }
void ins(int u, int v) {
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define MN 100005
int T, num, dep[MN], n, id[MN], head[MN];
ll a[MN];
map<ll, int> rea, cnt;
struct node {
int x, y;
};
vector<node> sc;
struct edge {
int to, next;
} g[MN << 1];
bool cmp(int x, int y) { return a[x] > a[y]; }
void ins(int u, int v)... | replace | 13 | 14 | 13 | 14 | 0 | |
p03249 | C++ | Runtime Error | #include <bits/stdc++.h>
#define debug(x) cerr << #x << " " << (x) << endl
using namespace std;
const int N = 100005;
template <class T> void read(T &x) {
int sgn = 1;
char ch;
x = 0;
for (ch = getchar(); (ch < '0' || ch > '9') && ch != '-'; ch = getchar())
;
if (ch == '-')
ch = getchar(), sgn = -1;... | #include <bits/stdc++.h>
#define debug(x) cerr << #x << " " << (x) << endl
using namespace std;
const int N = 100005;
template <class T> void read(T &x) {
int sgn = 1;
char ch;
x = 0;
for (ch = getchar(); (ch < '0' || ch > '9') && ch != '-'; ch = getchar())
;
if (ch == '-')
ch = getchar(), sgn = -1;... | replace | 58 | 67 | 58 | 67 | 0 | |
p03249 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ln '\n'
#define all(dat) dat.begin(), dat.end()
#define loop(i, to) for (int i = 0; i < to; ++i)
#define cont(i, to) for (int i = 1; i <= to; ++i)
#define circ(i, fr, to) for (int i = fr; i <= to; ++i)
#define foreach(i, dat) \
f... | #include <bits/stdc++.h>
#define ln '\n'
#define all(dat) dat.begin(), dat.end()
#define loop(i, to) for (int i = 0; i < to; ++i)
#define cont(i, to) for (int i = 1; i <= to; ++i)
#define circ(i, fr, to) for (int i = fr; i <= to; ++i)
#define foreach(i, dat) \
f... | delete | 32 | 33 | 32 | 32 | 0 | |
p03249 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <map>
#include <set>
using namespace std;
#define R register
#define ll long long
const int MAXN = 1e5 + 10;
int n;
ll D[MAXN];
int siz[MAXN];
map<ll, int> loc;
set<ll> st;
struct edge {
int fr, to, next;
} e[MAXN];
int tot;
int head[MAXN];
int dep[MAXN];
inline vo... | #include <algorithm>
#include <cstdio>
#include <map>
#include <set>
using namespace std;
#define R register
#define ll long long
const int MAXN = 1e5 + 10;
int n;
ll D[MAXN];
int siz[MAXN];
map<ll, int> loc;
set<ll> st;
struct edge {
int fr, to, next;
} e[MAXN << 1];
int tot;
int head[MAXN];
int dep[MAXN];
inli... | replace | 19 | 20 | 19 | 20 | 0 | |
p03249 | C++ | Runtime Error | #include <bits/stdc++.h>
using std::pair;
using std::string;
using std::vector;
typedef long long ll;
typedef pair<int, int> pii;
#define fst first
#define snd second
#define pb(a) push_back(a)
#define mp(a, b) std::make_pair(a, b)
#define debug(...) fprintf(stderr, __VA_ARGS__)
template <typename T> bool chkmax(T ... | #include <bits/stdc++.h>
using std::pair;
using std::string;
using std::vector;
typedef long long ll;
typedef pair<int, int> pii;
#define fst first
#define snd second
#define pb(a) push_back(a)
#define mp(a, b) std::make_pair(a, b)
#define debug(...) fprintf(stderr, __VA_ARGS__)
template <typename T> bool chkmax(T ... | replace | 77 | 78 | 77 | 78 | 0 | |
p03249 | C++ | Runtime Error | #include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
const long long mo = 50000007;
const int maxn = 200010;
int n, m, d[maxn], id[maxn], fa[maxn];
long long siz[maxn], ans, js[maxn];
int tot, nex[maxn * 2], las[maxn * 2], tov[maxn * 2];
int hs[mo + 10];
void con(int x, int y... | #include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
const long long mo = 50000007;
const int maxn = 200010;
int n, m, id[maxn], fa[maxn];
long long d[maxn], siz[maxn], ans, js[maxn];
int tot, nex[maxn * 2], las[maxn * 2], tov[maxn * 2];
int hs[mo + 10];
void con(int x, int y... | replace | 8 | 10 | 8 | 10 | -11 | |
p03249 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <climits>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#... | #include <algorithm>
#include <bitset>
#include <climits>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#... | replace | 78 | 79 | 78 | 84 | TLE | |
p03250 | Python | Runtime Error | a, b, c = map(int, input().split())
print(max(a, b, c) * 9 + sum(a, b, c))
| a, b, c = map(int, input().split())
print(max([a, b, c]) * 9 + sum([a, b, c]))
| replace | 1 | 2 | 1 | 2 | TypeError: sum() takes at most 2 arguments (3 given) | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03250/Python/s838495112.py", line 2, in <module>
print(max(a, b, c) * 9 + sum(a, b, c))
TypeError: sum() takes at most 2 arguments (3 given)
|
p03250 | Python | Runtime Error | a, b, c = map(int, input().split())
print(max(a, b, c) * 9 + sum(a, b, c))
| a, b, c = map(int, input().split())
print(max(a, b, c) * 9 + a + b + c)
| replace | 1 | 2 | 1 | 2 | TypeError: sum() takes at most 2 arguments (3 given) | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03250/Python/s348388771.py", line 2, in <module>
print(max(a, b, c) * 9 + sum(a, b, c))
TypeError: sum() takes at most 2 arguments (3 given)
|
p03250 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> N(3);
for (int i = 0; i < 3; i++)
cin >> N.at(i);
sort(N.begin(), N.end());
int ans = N.at(0) + N.at(2) + N.at(3) * 10;
cout << ans << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> N(3);
for (int i = 0; i < 3; i++)
cin >> N.at(i);
sort(N.begin(), N.end());
int ans = N.at(0) + N.at(1) + N.at(2) * 10;
cout << ans << endl;
}
| replace | 8 | 9 | 8 | 9 | -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)
|
p03250 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
vector<int> ans(3);
for (int i = 0; i < 5; i++)
cin >> ans.at(i);
sort(ans.begin(), ans.end());
cout << ans.at(0) + ans.at(1) + ans.at(2) * 10;
} | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
vector<int> ans(3);
for (int i = 0; i < 3; i++)
cin >> ans.at(i);
sort(ans.begin(), ans.end());
cout << ans.at(0) + ans.at(1) + ans.at(2) * 10;
}
| replace | 7 | 8 | 7 | 8 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): vector::_M_range_check: __n (which is 3) >= this->size() (which is 3)
|
p03250 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <stdlib.h>
using namespace std;
typedef long long ll;
int main() {
int a[3];
scanf("%d %d %d", a[0], a[1], a[2]);
sort(a, a + 3);
cout << 10 * a[2] + a[1] + a[0] << endl;
return 0;
}
| #include <bits/stdc++.h>
#include <stdlib.h>
using namespace std;
typedef long long ll;
int main() {
int a[3];
scanf("%d %d %d", &a[0], &a[1], &a[2]);
sort(a, a + 3);
cout << 10 * a[2] + a[1] + a[0] << endl;
return 0;
}
| replace | 7 | 8 | 7 | 8 | -11 | |
p03250 | C++ | Runtime Error | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <vector>
using namespace std;
#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(a) (a).begin(), (a).end()
#define PI 3.141592653589793238
#defin... | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <vector>
using namespace std;
#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(a) (a).begin(), (a).end()
#define PI 3.141592653589793238
#defin... | replace | 18 | 19 | 18 | 19 | -11 | |
p03250 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
vector<int> a;
for (int i = 0; i < 3; i++) {
cin >> a[i];
}
sort(a.begin(), a.end());
int ans;
ans = a[0] + a[1] + a[2] * 10;
cout << ans << endl;
return 0;
} | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
vector<int> a(3);
for (int i = 0; i < 3; i++) {
cin >> a[i];
}
sort(a.begin(), a.end());
int ans;
ans = a[0] + a[1] + a[2] * 10;
cout << ans << endl;
return 0;
} | replace | 6 | 7 | 6 | 7 | -11 | |
p03250 | C++ | Runtime Error | /* Author - Ankur Kumar Singh
IDE :- Offine Linux
---------------------------------*/
#include <bits/stdc++.h>
using namespace std;
/* variable type :- */
/* variable type :- */
#define ll long long int
#define ld long double
#define I int
#define mod 1000000007
/* map */
#define abc pair<long long int, long l... | /* Author - Ankur Kumar Singh
IDE :- Offine Linux
---------------------------------*/
#include <bits/stdc++.h>
using namespace std;
/* variable type :- */
/* variable type :- */
#define ll long long int
#define ld long double
#define I int
#define mod 1000000007
/* map */
#define abc pair<long long int, long l... | replace | 39 | 43 | 39 | 40 | 0 | |
p03250 | Python | Runtime Error | input_data = [int(i) for i in input().split(" ")]
ans = 0
for k1, v1 in enumerate(input_data):
for k2, v2 in enumerate(input_data):
for k3, v3 in enumerate(input_data):
if k1 == k2 or k2 == k3 or k3 == k1:
continue
kou1 = int(f"{v1}{v2}")
if ans < kou1 + ... | input_data = [int(i) for i in input().split(" ")]
ans = 0
for k1, v1 in enumerate(input_data):
for k2, v2 in enumerate(input_data):
for k3, v3 in enumerate(input_data):
if k1 == k2 or k2 == k3 or k3 == k1:
continue
kou1 = int(str(v1) + str(v2))
kou2 = v3
... | replace | 8 | 10 | 8 | 11 | 0 | |
p03250 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> x;
cin >> x[0] >> x[1] >> x[2];
sort(x.begin(), x.end());
cout << x[2] * 10 + x[1] + x[0] << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> x(3);
cin >> x[0] >> x[1] >> x[2];
sort(x.begin(), x.end());
cout << x[2] * 10 + x[1] + x[0] << endl;
}
| replace | 3 | 4 | 3 | 4 | -11 | |
p03250 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> v;
for (int i = 0; i < 3; i++) {
cin >> v[i];
}
sort(v.begin(), v.end(), greater<int>());
cout << v[0] * 10 + v[1] + v[2] << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> v(3);
for (int i = 0; i < 3; i++) {
cin >> v[i];
}
sort(v.begin(), v.end(), greater<int>());
cout << v[0] * 10 + v[1] + v[2] << endl;
return 0;
}
| replace | 4 | 5 | 4 | 5 | -11 | |
p03250 | 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(0);
cin.tie(0);
cout.tie(0);
int A[3];
cin >> A[0] >> A[1] >> A[2];
sort(A, A + 3);
cout << (A[0] + A[1] + A[2] * 10);... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int A[3];
cin >> A[0] >> A[1] >> A[2];
sort(A, A + 3);
cout << (A[0] + A[1] + A[2] * 10);
return 0;
}
| replace | 4 | 8 | 4 | 5 | 0 | |
p03250 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
#define pb push_back
#define mp make_pair
// random generator
// mt19937 rndm(time(0));
ll gcd(ll a, ll b) {
while (b > 0) {
int tmp = a;
a = b;
b = tmp % b;
}
return a;
}
const int M = 1e9 + 7;
ll powmod(ll a, ll b, ll mod) {
ll... | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
#define pb push_back
#define mp make_pair
// random generator
// mt19937 rndm(time(0));
ll gcd(ll a, ll b) {
while (b > 0) {
int tmp = a;
a = b;
b = tmp % b;
}
return a;
}
const int M = 1e9 + 7;
ll powmod(ll a, ll b, ll mod) {
ll... | replace | 33 | 37 | 33 | 34 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.