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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p02555 | C++ | Runtime Error | #include <bits/stdc++.h>
#define all(a) a.begin(), a.end()
#define db(a) cout << fixed << #a << " = " << a << endl;
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
const ll MOD = 1e9 + 7;
const int MAXN = 20 + 5;
vector<vector<ll>> dp(MAXN, vector<ll>(MAXN, 0));
int main() {
ios_base::sync_w... | #include <bits/stdc++.h>
#define all(a) a.begin(), a.end()
#define db(a) cout << fixed << #a << " = " << a << endl;
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
const ll MOD = 1e9 + 7;
const int MAXN = 2000 + 5;
vector<vector<ll>> dp(MAXN, vector<ll>(MAXN, 0));
int main() {
ios_base::sync... | replace | 9 | 10 | 9 | 10 | 0 | |
p02555 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#include <climits>
using namespace std;
#define debug(x, y) \
cout << (#x) << " " << (#y) << " is " << (x) << " " << (y) << endl
#define watch(x) cout << (#x) << " is " << (x) << endl
#define fast ios_base::sync_with_stdio(false)
#d... | #include <bits/stdc++.h>
#include <climits>
using namespace std;
#define debug(x, y) \
cout << (#x) << " " << (#y) << " is " << (x) << " " << (y) << endl
#define watch(x) cout << (#x) << " is " << (x) << endl
#define fast ios_base::sync_with_stdio(false)
#d... | replace | 41 | 45 | 41 | 45 | TLE | |
p02555 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define sync \
{ \
ios_base ::sync_with_stdio(false); \
cin.tie(NULL); ... | #include <bits/stdc++.h>
using namespace std;
#define sync \
{ \
ios_base ::sync_with_stdio(false); \
cin.tie(NULL); ... | insert | 17 | 17 | 17 | 27 | 0 | |
p02555 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
mt19937 gen(chrono::steady_clock::now().time_since_epoch().count());
ll INF = (ll)1e20;
int iINF = (int)1e20;
ll mod = (ll)1e9 + 7;
signed main() {
ll n;
cin >> n;
ll dp[n + 1];
fill(&dp[0], &dp[0] + n + 1, 0);
dp[3... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
mt19937 gen(chrono::steady_clock::now().time_since_epoch().count());
ll INF = (ll)1e20;
int iINF = (int)1e20;
ll mod = (ll)1e9 + 7;
signed main() {
ll n;
cin >> n;
vector<ll> dp(n + 100, 0);
if (n < 3) {
cout << 0... | replace | 16 | 18 | 16 | 21 | 0 | |
p02555 | C++ | Runtime Error | #include <bits/stdc++.h>
#define x first
#define y second
#define pb push_back
#define mk make_pair
#define all(a) a.begin(), a.end()
#define len(a) (int)a.size()
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pii;
vector<ll> dp;
ll ans = 0;
ll mod = 1e9 + 7;
int solve(int ... | #include <bits/stdc++.h>
#define x first
#define y second
#define pb push_back
#define mk make_pair
#define all(a) a.begin(), a.end()
#define len(a) (int)a.size()
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pii;
vector<ll> dp;
ll ans = 0;
ll mod = 1e9 + 7;
int solve(int ... | insert | 31 | 31 | 31 | 33 | 0 | |
p02555 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int64_t mod = 1000000007;
int64_t f(int n, vector<int64_t> &a) {
if (a.at(n) != -1)
return a.at(n);
else {
a.at(n) = (f(n - 1, a) + f(n - 3, a));
a.at(n) %= mod;
return a.at(n);
}
}
int main() {
int s;
cin >> s;
vector<int64_t> a(s + 1, -1);
... | #include <bits/stdc++.h>
using namespace std;
int64_t mod = 1000000007;
int64_t f(int n, vector<int64_t> &a) {
if (a.at(n) != -1)
return a.at(n);
else {
a.at(n) = (f(n - 1, a) + f(n - 3, a));
a.at(n) %= mod;
return a.at(n);
}
}
int main() {
int s;
cin >> s;
vector<int64_t> a(s + 1, -1);
... | replace | 24 | 25 | 24 | 25 | 0 | |
p02555 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define irep(i, n) for (int i = (n); i >= 0; i--)
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int INF = 1 << 25;
const int MOD = 1e9 + 7;
ll dp[1000];
int main() {
int s;
cin >> s;
dp[0] = 1;
for (int i = 3; ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define irep(i, n) for (int i = (n); i >= 0; i--)
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int INF = 1 << 25;
const int MOD = 1e9 + 7;
int dp[2050];
int main() {
int s;
cin >> s;
dp[0] = 1;
for (int i = 3;... | replace | 8 | 9 | 8 | 9 | 0 | |
p02555 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int mod = 1e9 + 7;
int n;
cin >> n;
long long int dp[n + 1];
dp[1] = 0;
dp[2] = 0;
dp[3] = 1;
dp[4] = 1;
dp[5] = 1;
dp[6] = 2;
for (int i = 7; i <= n; i++)
dp[i] = (dp[i - 3] * 2 + dp[i - 4] + dp[i - 5]) % mod;
cout << dp[n];
retu... | #include <bits/stdc++.h>
using namespace std;
int main() {
int mod = 1e9 + 7;
int n;
cin >> n;
long long int dp[n + 7];
dp[1] = 0;
dp[2] = 0;
dp[3] = 1;
dp[4] = 1;
dp[5] = 1;
dp[6] = 2;
for (int i = 7; i <= n; i++)
dp[i] = (dp[i - 3] * 2 + dp[i - 4] + dp[i - 5]) % mod;
cout << dp[n];
retu... | replace | 7 | 8 | 7 | 8 | 0 | |
p02555 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define int long long int
#define pb push_back
const int mod = 1e9 + 7;
#define all(x) x.begin(), x.end()
#define endl '\n'
#define IOS \
ios::sync_with_stdio(0); ... | #include <bits/stdc++.h>
using namespace std;
#define int long long int
#define pb push_back
const int mod = 1e9 + 7;
#define all(x) x.begin(), x.end()
#define endl '\n'
#define IOS \
ios::sync_with_stdio(0); ... | replace | 28 | 29 | 28 | 29 | TLE | |
p02555 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define int long long int
#define fi first
#define se second
#define pb push_back
#define soo(v) sort(v.rbegin(), v.rend())
#define so(v) sort(v.begin(), v.end())
#define lb(v, x) lower_bound(v.begin(), v.end(), x)
#define ub(v, x) upper_bound(v.begin(), v.end(), x)
#define... | #include <bits/stdc++.h>
using namespace std;
#define int long long int
#define fi first
#define se second
#define pb push_back
#define soo(v) sort(v.rbegin(), v.rend())
#define so(v) sort(v.begin(), v.end())
#define lb(v, x) lower_bound(v.begin(), v.end(), x)
#define ub(v, x) upper_bound(v.begin(), v.end(), x)
#define... | replace | 65 | 66 | 65 | 66 | TLE | |
p02555 | C++ | Runtime Error | // 177
#include <algorithm>
#include <climits>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <numeric>
#include <queue>
#include <string>
#include <vector>
using namespace std;
using ll = long long int;
#define NUM 1000000007
int main() {
int s;
ll ans = 0;
cin >> s;
vector<vector<ll>> v(s... | // 177
#include <algorithm>
#include <climits>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <numeric>
#include <queue>
#include <string>
#include <vector>
using namespace std;
using ll = long long int;
#define NUM 1000000007
int main() {
int s;
ll ans = 0;
cin >> s;
vector<vector<ll>> v(s... | replace | 20 | 21 | 20 | 21 | 0 | |
p02555 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int MOD = 1000000007;
int main() {
ll s;
cin >> s;
ll dp[s + 1]; // oooo|ooooooo i番目の右に仕切り
dp[0] = dp[1] = dp[2] = 0; // 数列なし
dp[3] = dp[4] = dp[5] = 1; // 数列はひとつだけ(仕切りが右端)
dp[6] = dp[3] + 1;
// dp[7] = dp[4] + dp[3] ... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int MOD = 1000000007;
int main() {
ll s;
cin >> s;
ll dp[2001]; // oooo|ooooooo i番目の右に仕切り
dp[0] = dp[1] = dp[2] = 0; // 数列なし
dp[3] = dp[4] = dp[5] = 1; // 数列はひとつだけ(仕切りが右端)
dp[6] = dp[3] + 1;
// dp[7] = dp[4] + dp[3] ... | replace | 9 | 10 | 9 | 10 | 0 | |
p02555 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> pii;
typedef tuple<ll, ll, ll> ti;
#define REP(a, b, c) for (ll a = b; a < (c); a++)
#define PER(a, b, c) for (ll a = b; a >= (c); a--)
inline ll ii() {
ll x;
cin >> x;
... | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> pii;
typedef tuple<ll, ll, ll> ti;
#define REP(a, b, c) for (ll a = b; a < (c); a++)
#define PER(a, b, c) for (ll a = b; a >= (c); a--)
inline ll ii() {
ll x;
cin >> x;
... | replace | 53 | 64 | 53 | 62 | TLE | |
p02555 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep_(i, n, m) for (int i = n; i < (int)(m); i++)
#define all(v) v.begin(), v.end()
#define int long long
#define stoi stoll
// #define _GLIBCXX_DEBUG
const int mod = 1000000007;
int a(vector<int> &dp, int S) {
... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep_(i, n, m) for (int i = n; i < (int)(m); i++)
#define all(v) v.begin(), v.end()
#define int long long
#define stoi stoll
// #define _GLIBCXX_DEBUG
const int mod = 1000000007;
int a(vector<int> &dp, int S) {
... | insert | 33 | 33 | 33 | 42 | 0 | |
p02555 | Python | Runtime Error | S = int(input())
MOD = 10**9 + 7
A = [0] * (S + 1)
A[0] = 1
A[1] = 0
A[2] = 0
cumsum = 1
for i in range(3, len(A)):
A[i] = cumsum
cumsum += A[i - 2]
cumsum %= MOD
print(A[-1])
| S = int(input())
if S == 1:
print(0)
exit()
MOD = 10**9 + 7
A = [0] * (S + 1)
A[0] = 1
A[1] = 0
A[2] = 0
cumsum = 1
for i in range(3, len(A)):
A[i] = cumsum
cumsum += A[i - 2]
cumsum %= MOD
print(A[-1])
| insert | 1 | 1 | 1 | 4 | 0 | |
p02555 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
#define ll long long int
#define ld long double
#define MAX 100005
#define MOD 1000000007
#define fast \
ios::sync_with_stdio(0); \
... | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
#define ll long long int
#define ld long double
#define MAX 100005
#define MOD 1000000007
#define fast \
ios::sync_with_stdio(0); \
... | replace | 28 | 29 | 28 | 29 | 0 | |
p02555 | Python | Runtime Error | S = int(input())
if S < 3:
print(0)
exit()
x = [0] * (S + 1)
x[3] = x[4] = x[5] = 1
for i in range(6, S + 1):
x[i] += 1
for j in range(3, i - 3 + 1):
x[i] += x[i - j]
print(x[S] % (10**9 + 7))
| S = int(input())
if S < 3:
print(0)
exit()
if S < 6:
print(1)
exit()
x = [0] * (S + 1)
x[3] = x[4] = x[5] = 1
for i in range(6, S + 1):
x[i] += 1
for j in range(3, i - 3 + 1):
x[i] += x[i - j]
print(x[S] % (10**9 + 7))
| insert | 4 | 4 | 4 | 8 | 0 | |
p02555 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
struct listnode {
int val;
listnode *next;
};
vector<int> func(vector<int> a, vector<int> l, int sum) {
vector<int> k, val;
for (int i = 0; i < l.size(); i++)
if (l[i] == 0) {
k.push_back(i);
val.push_back(a[i]);
}
if (su... | #include <bits/stdc++.h>
using namespace std;
#define int long long
struct listnode {
int val;
listnode *next;
};
vector<int> func(vector<int> a, vector<int> l, int sum) {
vector<int> k, val;
for (int i = 0; i < l.size(); i++)
if (l[i] == 0) {
k.push_back(i);
val.push_back(a[i]);
}
if (su... | replace | 39 | 40 | 39 | 40 | 0 | |
p02555 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MAXN = 1e5 + 10;
const int mod = 1e9 + 7;
ll c[2010][2010];
void init(int n) {
for (int i = 0; i < n; i++) {
for (int j = 0; j <= i; j++) {
if (!j)
c[i][j] = 1;
else
c[i][j] = (c[i - 1][j] + c[i - 1][j - 1]) ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MAXN = 1e5 + 10;
const int mod = 1e9 + 7;
ll c[2010][2010];
void init(int n) {
for (int i = 0; i < n; i++) {
for (int j = 0; j <= i; j++) {
if (!j)
c[i][j] = 1;
else
c[i][j] = (c[i - 1][j] + c[i - 1][j - 1]) ... | replace | 23 | 24 | 23 | 24 | 0 | |
p02556 | C++ | Runtime Error | #include <stdio.h>
int main(void) {
static double p[100000][2];
double min[32], max[32];
int n;
int i, j, k;
double dat;
double ans;
scanf("%d", &n);
for (i = 0; i < n; i++) {
for (j = 0; j < 2; j++) {
scanf("%lf", &p[i][j]);
}
}
ans = 0;
for (i = 0; i < 1 << 2; i++) {
for (j... | #include <stdio.h>
int main(void) {
static double p[220000][2];
double min[32], max[32];
int n;
int i, j, k;
double dat;
double ans;
scanf("%d", &n);
for (i = 0; i < n; i++) {
for (j = 0; j < 2; j++) {
scanf("%lf", &p[i][j]);
}
}
ans = 0;
for (i = 0; i < 1 << 2; i++) {
for (j... | replace | 3 | 4 | 3 | 4 | 0 | |
p02556 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> v1, v2;
for (int i = 0; i < n; i++) {
int x, y;
cin >> x >> y;
v1.push_back(x + y);
v2.push_back(x - y);
}
sort(v1.begin(), v2.end());
sort(v2.begin(), v2.end());
cout << max(v1[n - 1] - v1[0], v2[n -... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> v1, v2;
for (int i = 0; i < n; i++) {
int x, y;
cin >> x >> y;
v1.push_back(x + y);
v2.push_back(x - y);
}
sort(v1.begin(), v1.end());
sort(v2.begin(), v2.end());
cout << max(v1[n - 1] - v1[0], v2[n -... | replace | 12 | 13 | 12 | 13 | -6 | double free or corruption (out)
|
p02556 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
#define inf 1e200
typedef long long ll;
ll a[100001][2];
ll n;
ll GetManhattan(ll p[][2], ll n, ll dem) {
ll ans = 0, Min, Max;
ll i, j, k;
for (i = 0; i < (1 << (dem)); i++) { // 用二进制形式遍历所有可能的运算情况
Min = inf, Ma... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
#define inf 1e200
typedef long long ll;
ll a[200003][2];
ll n;
ll GetManhattan(ll p[][2], ll n, ll dem) {
ll ans = 0, Min, Max;
ll i, j, k;
for (i = 0; i < (1 << (dem)); i++) { // 用二进制形式遍历所有可能的运算情况
Min = inf, Ma... | replace | 7 | 8 | 7 | 8 | 0 | |
p02556 | C++ | Runtime Error | #include <map>
#include <math.h>
#include <stdio.h>
#include <string.h>
#define N 60060
#define ll long long
using namespace std;
map<ll, int> mp[33];
typedef map<ll, int>::iterator iter;
int seq[N][5];
int n, m;
void del(int pos, int val) {
iter t1 = mp[pos].find(val);
t1->second--;
if (t1->second == 0)
mp[... | #include <map>
#include <math.h>
#include <stdio.h>
#include <string.h>
#define N 200060
#define ll long long
using namespace std;
map<ll, int> mp[33];
typedef map<ll, int>::iterator iter;
int seq[N][5];
int n, m;
void del(int pos, int val) {
iter t1 = mp[pos].find(val);
t1->second--;
if (t1->second == 0)
mp... | replace | 4 | 5 | 4 | 5 | 0 | |
p02556 | C++ | Runtime Error | #include <bits/stdc++.h>
/*
#include <atcoder/all>
using namespace atcoder;
*/
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
// #include <boost/multiprecision/cpp_int.hpp>
using namespace std;
using dou = long double;
string yes = "yes";
string Yes = "Yes";
string YES = "Y... | #include <bits/stdc++.h>
/*
#include <atcoder/all>
using namespace atcoder;
*/
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
// #include <boost/multiprecision/cpp_int.hpp>
using namespace std;
using dou = long double;
string yes = "yes";
string Yes = "Yes";
string YES = "Y... | replace | 189 | 190 | 189 | 190 | 0 | |
p02556 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <iostream>
using namespace std;
const int M = 2e4 + 5;
int a[M], b[M];
int n, ans = 0;
int main() {
int i;
scanf("%d", &n);
for (i = 1; i <= n; i++) {
int x, y;
cin >> x >> y;
a[i] = x + y;
b[i] = y - x;
}
sort(a + 1, a + n + 1);
sort(b + 1, b... | #include <algorithm>
#include <cstdio>
#include <iostream>
using namespace std;
const int M = 2e5 + 5;
int a[M], b[M];
int n, ans = 0;
int main() {
int i;
scanf("%d", &n);
for (i = 1; i <= n; i++) {
int x, y;
cin >> x >> y;
a[i] = x + y;
b[i] = y - x;
}
sort(a + 1, a + n + 1);
sort(b + 1, b... | replace | 5 | 6 | 5 | 6 | 0 | |
p02556 | C++ | Runtime Error | #include <bits/stdc++.h>
#define in(x) freopen(x, "r", stdin)
#define out(x) freopen(x, "w", stdout)
using namespace std;
const int N = (int)(1e5 + 500);
int x[N], y[N];
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
#ifndef _LOCAL
#endif // _LOCAL
int n;
int mx1, mx2, mx3, mx4;
m... | #include <bits/stdc++.h>
#define in(x) freopen(x, "r", stdin)
#define out(x) freopen(x, "w", stdout)
using namespace std;
const int N = (int)(2e5 + 500);
int x[N], y[N];
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
#ifndef _LOCAL
#endif // _LOCAL
int n;
int mx1, mx2, mx3, mx4;
m... | replace | 5 | 6 | 5 | 6 | 0 | |
p02556 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define re register
#define ls (o << 1)
#define rs (o << 1 | 1)
#define pb push_back
const double PI = acos(-1.0);
const int M = 1e5 + 7;
/*
int head[M],cnt=1;
void init(int n){cnt=1;for(int i=0;i<=n;i++)head[i]=0;}
struct EDGE{int to,nxt,w;}ee[M*2];
v... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define re register
#define ls (o << 1)
#define rs (o << 1 | 1)
#define pb push_back
const double PI = acos(-1.0);
const int M = 2e5 + 7;
/*
int head[M],cnt=1;
void init(int n){cnt=1;for(int i=0;i<=n;i++)head[i]=0;}
struct EDGE{int to,nxt,w;}ee[M*2];
v... | replace | 8 | 9 | 8 | 9 | 0 | |
p02556 | C++ | Runtime Error | #include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;
using namespace std;
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define ff first
#define ss second
#define null 0
#define pi 3.14159265358979323846
#define a... | #include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;
using namespace std;
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define ff first
#define ss second
#define null 0
#define pi 3.14159265358979323846
#define a... | replace | 44 | 45 | 44 | 45 | 0 | |
p02556 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
// mannhattan distance => 45 degree rotation
// max( abs(x1-x2) + abs(y1-y2) )
// abs(x1-x2) = max( x1-x2, x2-x1)
// => max( abs(x1-x2) + abs(y1-y2) ) = max( x1-x2+y1-y2, x1-x2... | #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>;
// mannhattan distance => 45 degree rotation
// max( abs(x1-x2) + abs(y1-y2) )
// abs(x1-x2) = max( x1-x2, x2-x1)
// => max( abs(x1-x2) + abs(y1-y2) ) = max( x1-x2+y1-y2, x1-x2... | replace | 24 | 25 | 24 | 25 | -6 | double free or corruption (out)
|
p02556 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(ver, n) rep2(ver, 0, n)
#define rep2(ver, m, n) for (int ver = m; ver < (n); ver++)
#define loop while (true)
#define dup(x, y) (((x) + (y)-1) / (y))
#define all(v) (v).begin(), (v).end()
#define debug(x) std::cerr << #x << ": " << x << "\n"
#define debug2(x, y... | #include <bits/stdc++.h>
using namespace std;
#define rep(ver, n) rep2(ver, 0, n)
#define rep2(ver, m, n) for (int ver = m; ver < (n); ver++)
#define loop while (true)
#define dup(x, y) (((x) + (y)-1) / (y))
#define all(v) (v).begin(), (v).end()
#define debug(x) std::cerr << #x << ": " << x << "\n"
#define debug2(x, y... | replace | 33 | 34 | 33 | 34 | 0 | |
p02556 | C++ | Runtime Error | #include <algorithm>
#include <complex>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#define REP(i, m, n) for (int i... | #include <algorithm>
#include <complex>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#define REP(i, m, n) for (int i... | insert | 90 | 90 | 90 | 92 | 0 | |
p02556 | C++ | Runtime Error | #pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("unroll-loops")
#include <algorithm>
#include <array>
#include <bitset>
#include <chrono>
#include <cmath>
#include <cstring>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <qu... | #pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("unroll-loops")
#include <algorithm>
#include <array>
#include <bitset>
#include <chrono>
#include <cmath>
#include <cstring>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <qu... | replace | 32 | 33 | 32 | 33 | 0 | |
p02556 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
typedef long double ld;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef pair<int, int> pii;
type... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
typedef long double ld;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef pair<int, int> pii;
type... | replace | 246 | 250 | 246 | 250 | 0 | |
p02556 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vl = vector<ll>;
template <class T> using vc = vector<T>;
template <class T> using vvc = vector<vector<T>>;
#define eb emplace_back
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for (ll i = 0; i < (n); i++)
#def... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vl = vector<ll>;
template <class T> using vc = vector<T>;
template <class T> using vvc = vector<vector<T>>;
#define eb emplace_back
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for (ll i = 0; i < (n); i++)
#def... | replace | 77 | 78 | 77 | 78 | TLE | |
p02556 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int maxn = 100000 + 10;
const int dem = 2;
const long long INF = 1e18;
struct Point {
long long x[dem];
} p[maxn];
int n;
long long minx[1 << dem], maxx[1 << dem];
long long solve() {
int tmp = (1 << dem);
for (int i = 0; i < tmp; i++) {
minx[i] = INF;
m... | #include <bits/stdc++.h>
using namespace std;
const int maxn = 200000 + 10;
const int dem = 2;
const long long INF = 1e18;
struct Point {
long long x[dem];
} p[maxn];
int n;
long long minx[1 << dem], maxx[1 << dem];
long long solve() {
int tmp = (1 << dem);
for (int i = 0; i < tmp; i++) {
minx[i] = INF;
m... | replace | 2 | 3 | 2 | 3 | 0 | |
p02556 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
using namespace std;
const int N = 1e5 + 100;
struct Node {
ll x, y;
ll num1, num2;
} p[N];
ll n;
bool cmp1(const Node &a, const Node &b) { return a.num1 < b.num1; }
bool cmp2(const Node &a, const Node &b) { return a.num2 < b.num2; }
int main() {
cin >> n;
for (ll ... | #include <bits/stdc++.h>
#define ll long long
using namespace std;
const int N = 2e5 + 100;
struct Node {
ll x, y;
ll num1, num2;
} p[N];
ll n;
bool cmp1(const Node &a, const Node &b) { return a.num1 < b.num1; }
bool cmp2(const Node &a, const Node &b) { return a.num2 < b.num2; }
int main() {
cin >> n;
for (ll ... | replace | 3 | 4 | 3 | 4 | 0 | |
p02556 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define deb(x) cout << "> " << #x << " : " << x << endl;
#define deb2(x, y) \
cout << "> " << #x << "->" << x << " " << #y << "->" << y << endl;
#define LINE cout << "--- LINE NO : " << __LINE__ << " ---" << en... | #include <bits/stdc++.h>
using namespace std;
#define deb(x) cout << "> " << #x << " : " << x << endl;
#define deb2(x, y) \
cout << "> " << #x << "->" << x << " " << #y << "->" << y << endl;
#define LINE cout << "--- LINE NO : " << __LINE__ << " ---" << en... | insert | 49 | 49 | 49 | 50 | 0 | |
p02556 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
#define FAST \
ios_base::sync_with_stdio(false); \
cin.tie(0);
#define pb push_back
#define eb emplace_back
#define ins insert
#define f first
#define s second
... | #include "bits/stdc++.h"
using namespace std;
#define FAST \
ios_base::sync_with_stdio(false); \
cin.tie(0);
#define pb push_back
#define eb emplace_back
#define ins insert
#define f first
#define s second
... | replace | 74 | 75 | 74 | 75 | 0 | |
p02556 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define all(a) (a).begin(), (a).end()
#define sz(x) (int)x.size()
#define F first
#define S second
#define endl "\n"
#define inf (long long)1000000007
#define FOR(i, a, b) for (int i = a; i < b; i++)
#define bigint 1e18
mt19937 RNG... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define all(a) (a).begin(), (a).end()
#define sz(x) (int)x.size()
#define F first
#define S second
#define endl "\n"
#define inf (long long)1000000007
#define FOR(i, a, b) for (int i = a; i < b; i++)
#define bigint 1e18
mt19937 RNG... | replace | 34 | 35 | 34 | 35 | 0 |
Time elapsed: 23ms
|
p02556 | C++ | Runtime Error | /*input
2
1 1
1 1
*/
// Nihesh Anderson - knandy
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
typedef long long ll;
typedef long double ld;
typedef tree<ll, null_type, less<ll>, rb_tree_tag,
tree_... | /*input
2
1 1
1 1
*/
// Nihesh Anderson - knandy
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
typedef long long ll;
typedef long double ld;
typedef tree<ll, null_type, less<ll>, rb_tree_tag,
tree_... | replace | 63 | 64 | 63 | 64 | 0 | |
p02556 | C++ | Runtime Error | #include <bits/stdc++.h>
#define f first
#define s second
#define mp make_pair
using namespace std;
typedef long long ll;
const int nax = 1e5 + 5;
int xx[nax];
int yy[nax];
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
for (int i = 0; i < n; i++) {
int a, b;
cin >> a >... | #include <bits/stdc++.h>
#define f first
#define s second
#define mp make_pair
using namespace std;
typedef long long ll;
const int nax = 2e5 + 5;
int xx[nax];
int yy[nax];
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
for (int i = 0; i < n; i++) {
int a, b;
cin >> a >... | replace | 9 | 10 | 9 | 10 | 0 | |
p02556 | C++ | Runtime Error | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <queue>
#include <stack>
using namespace std;
const int maxn = 100000 + 10;
const int dem = 2; // 维数
const double INF = (1e200);
struct Point {
double x[dem];
} p[maxn];
int n;
double minx[1 << dem], maxx[1 << dem];
long long so... | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <queue>
#include <stack>
using namespace std;
const int maxn = 400000 + 10;
const int dem = 2; // 维数
const double INF = (1e200);
struct Point {
double x[dem];
} p[maxn];
int n;
double minx[1 << dem], maxx[1 << dem];
long long so... | replace | 9 | 10 | 9 | 10 | 0 | |
p02556 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int mod = 1e9;
int main() {
int N;
scanf("%d", &N);
int Max1 = mod * -1, Min1 = mod;
int Max0 = mod * -1, Min0 = mod;
for (int i = 1; i <= N; ++i) {
int x, y;
scanf("%d%d", &x, &y);
Max1 = max(Max1, x + y);
Min1 = min(Min1, x + y);
Max... | #include <bits/stdc++.h>
using namespace std;
const int mod = 1e9;
int main() {
int N;
scanf("%d", &N);
int Max1 = mod * -1, Min1 = mod;
int Max0 = mod * -1, Min0 = mod;
for (int i = 1; i <= N; ++i) {
int x, y;
scanf("%d%d", &x, &y);
Max1 = max(Max1, x + y);
Min1 = min(Min1, x + y);
Max... | replace | 20 | 21 | 20 | 21 | 1 | |
p02556 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
vector<int> x(n);
vector<int> y(n);
for (int i = 0; i < n; i++) {
cin >> x[i] >> y[i];
}
vector<int> rect(4, 0);
for (int i = 0; i < n; i++) {
if (x[i] + y[i] > x[rect[0]] + y[rect[0]]) {
rect[0] = i;
}
if (x[i] - y[i]... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> x(n);
vector<int> y(n);
for (int i = 0; i < n; i++) {
cin >> x[i] >> y[i];
}
vector<int> rect(4, 0);
for (int i = 0; i < n; i++) {
if (x[i] + y[i] > x[rect[0]] + y[rect[0]]) {
rect[0] = i;
}
if ... | insert | 4 | 4 | 4 | 5 | -11 | |
p02556 | C++ | Runtime Error | #include <cassert>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <deque>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#inc... | #include <cassert>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <deque>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#inc... | replace | 307 | 308 | 307 | 308 | 0 | |
p02556 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
typedef long long int ll;
typedef long double ld;
#define sync \
ios_base::sync_with_stdio(false); \
cin.tie(NULL)
#define input(arr, n) ... | #include <bits/stdc++.h>
typedef long long int ll;
typedef long double ld;
#define sync \
ios_base::sync_with_stdio(false); \
cin.tie(NULL)
#define input(arr, n) ... | replace | 34 | 38 | 34 | 46 | TLE | |
p02556 | 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 pii pair<int, int>
int N;
int X[100010], Y[100010];
signed main() {
cin >> N;
rep(i, N) {
int x, y;
cin >> x >> y;
X[i] = x + y;
Y[i] = x - y;
}
sort(X, X + N);
sort(Y,... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i, n) for (int i = 0; i < n; i++)
#define pii pair<int, int>
int N;
int X[200010], Y[200010];
signed main() {
cin >> N;
rep(i, N) {
int x, y;
cin >> x >> y;
X[i] = x + y;
Y[i] = x - y;
}
sort(X, X + N);
sort(Y,... | replace | 8 | 9 | 8 | 9 | 0 | |
p02556 | C++ | Runtime Error | #include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
const int N = 100005;
const double INF = 1e100;
int a[N][3];
int n;
int main() {
while (~scanf("%d", &n)) {
for (int i = 0; i < n; i++)
for (int j = 0; j < 2; j++)
scanf("%d", &a[i][j]);
int ans = 0, mi, mx, t;
... | #include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
const int N = 200005;
const double INF = 1e100;
int a[N][3];
int n;
int main() {
while (~scanf("%d", &n)) {
for (int i = 0; i < n; i++)
for (int j = 0; j < 2; j++)
scanf("%d", &a[i][j]);
int ans = 0, mi, mx, t;
... | replace | 5 | 6 | 5 | 6 | 0 | |
p02556 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, a, b) for (int i = (a), i##end = (b); i <= i##end; ++i)
#define per(i, a, b) for (int i = (a), i##end = (b); i >= i##end; --i)
namespace IO {
#define gc getchar()
template <typename T> inline void read(T &x) {
x = 0;
bool f = 1;
char ch;
for (ch = g... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, a, b) for (int i = (a), i##end = (b); i <= i##end; ++i)
#define per(i, a, b) for (int i = (a), i##end = (b); i >= i##end; --i)
namespace IO {
#define gc getchar()
template <typename T> inline void read(T &x) {
x = 0;
bool f = 1;
char ch;
for (ch = g... | replace | 67 | 68 | 67 | 68 | 0 | |
p02556 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define INF 9999999999999
#define D 2 // 空间维数
#define M 100005 // 坐标个数
struct Point {
int x[D];
} pt[M];
int dis[1 << D][M], minx[1 << D], maxx[1 << D];
// 去掉绝对值后有2^D种可能
void Get(int N) // 取得所有点在指定状态(S)下的“本点有效距离”
{
int tot = (1 << D);
for (int s = 0; s < tot; s+... | #include <bits/stdc++.h>
using namespace std;
#define INF 9999999999999
#define D 2 // 空间维数
#define M 200005 // 坐标个数
struct Point {
int x[D];
} pt[M];
int dis[1 << D][M], minx[1 << D], maxx[1 << D];
// 去掉绝对值后有2^D种可能
void Get(int N) // 取得所有点在指定状态(S)下的“本点有效距离”
{
int tot = (1 << D);
for (int s = 0; s < tot; s+... | replace | 4 | 5 | 4 | 5 | 0 | |
p02556 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define int long long
#define ar array<int, 2>
#define inf 1000000000000000000
int mod = 1e9 + 7;
int min(int a, int b) { return (a < b) ? a : b; }
int max(int a, int b) { return (a > b) ? a : b; }
int fp(int a, int b) {
if (b == 0)
return 1;
int x... | #include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define int long long
#define ar array<int, 2>
#define inf 1000000000000000000
int mod = 1e9 + 7;
int min(int a, int b) { return (a < b) ? a : b; }
int max(int a, int b) { return (a > b) ? a : b; }
int fp(int a, int b) {
if (b == 0)
return 1;
int x... | replace | 29 | 30 | 29 | 30 | 0 | |
p02556 | C++ | Time Limit Exceeded | #define _overload(_1, _2, _3, _4, name, ...) name
#define _rep1(Itr, N) _rep3(Itr, 0, N, 1)
#define _rep2(Itr, a, b) _rep3(Itr, a, b, 1)
#define _rep3(Itr, a, b, step) for (i64(Itr) = a; (Itr) < b; (Itr) += step)
#define repeat(...) _overload(__VA_ARGS__, _rep3, _rep2, _rep1)(__VA_ARGS__)
#include "bits/stdc++.h"
usin... | #define _overload(_1, _2, _3, _4, name, ...) name
#define _rep1(Itr, N) _rep3(Itr, 0, N, 1)
#define _rep2(Itr, a, b) _rep3(Itr, a, b, 1)
#define _rep3(Itr, a, b, step) for (i64(Itr) = a; (Itr) < b; (Itr) += step)
#define repeat(...) _overload(__VA_ARGS__, _rep3, _rep2, _rep1)(__VA_ARGS__)
#include "bits/stdc++.h"
usin... | replace | 238 | 239 | 238 | 239 | TLE | |
p02556 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<vi> vvi;
typedef vector<vii> vvii;
#define fi first
#define se second
#define ALL(x) (x).begin(), (x).end()
#define RALL(x) (x).rbegin(), (x).rend()
#define eb em... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<vi> vvi;
typedef vector<vii> vvii;
#define fi first
#define se second
#define ALL(x) (x).begin(), (x).end()
#define RALL(x) (x).rbegin(), (x).rend()
#define eb em... | delete | 190 | 191 | 190 | 190 | 0 | |
p02556 | C++ | Runtime Error | #include <cstdio>
#ifdef _MSC_VER
#define GC getchar
#else
#define GC getchar_unlocked
#endif
int input() {
int x = 0;
char c;
bool minus = false;
for (;;) {
c = GC();
if (c == '-') {
minus = true;
continue;
}
if (c == ' ' || c == '\n')
if (minus)
return -x;
else
... | #include <cstdio>
#ifdef _MSC_VER
#define GC getchar
#else
#define GC getchar_unlocked
#endif
int input() {
int x = 0;
char c;
bool minus = false;
for (;;) {
c = GC();
if (c == '-') {
minus = true;
continue;
}
if (c == ' ' || c == '\n')
if (minus)
return -x;
else
... | replace | 43 | 44 | 43 | 45 | 0 | |
p02556 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <math.h>
using namespace std;
typedef long long int lli;
typedef unsigned long long int uli;
typedef long double Lf;
typedef pair<int, int> pii;
typedef vector<int> vi;
#define fastIO \
std::ios::sync_with_stdio(false); ... | #include <bits/stdc++.h>
#include <math.h>
using namespace std;
typedef long long int lli;
typedef unsigned long long int uli;
typedef long double Lf;
typedef pair<int, int> pii;
typedef vector<int> vi;
#define fastIO \
std::ios::sync_with_stdio(false); ... | replace | 12 | 13 | 12 | 13 | 0 | |
p02557 | C++ | Runtime Error | ///////////////////////////////////////////////////////////////////////////////
#include <bits/stdc++.h>
#include <sys/time.h>
#include <time.h>
#include <unistd.h>
using namespace std;
///////////////////////////////////////////////////////////////////////////////
#define DEBUG 0
#define pb push_back
#define V ve... | ///////////////////////////////////////////////////////////////////////////////
#include <bits/stdc++.h>
#include <sys/time.h>
#include <time.h>
#include <unistd.h>
using namespace std;
///////////////////////////////////////////////////////////////////////////////
#define DEBUG 0
#define pb push_back
#define V ve... | replace | 276 | 280 | 276 | 303 | 0 | |
p02557 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <time.h>
#include ... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <time.h>
#include ... | insert | 116 | 116 | 116 | 118 | 0 | |
p02557 | C++ | Runtime Error | // #define _GLIBCXX_DEBUG // for STL debug (optional)
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#inc... | // #define _GLIBCXX_DEBUG // for STL debug (optional)
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#inc... | insert | 90 | 90 | 90 | 91 | 0 | |
p02557 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
// conversion
//------------------------------------------
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();
}
// math
//--------... | #include <bits/stdc++.h>
using namespace std;
// conversion
//------------------------------------------
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();
}
// math
//--------... | insert | 220 | 220 | 220 | 222 | 0 | |
p02557 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define ld long double
#define ll long long
#define P pair<int, int>
#define fi first
#define se second
#define rep(i, n) for (int i = 0; i < n; i++)
#define all(v) v.begin(), v.end()
#define pb push_back
#define eb emplace_back
template <class T> void... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define ld long double
#define ll long long
#define P pair<int, int>
#define fi first
#define se second
#define rep(i, n) for (int i = 0; i < n; i++)
#define all(v) v.begin(), v.end()
#define pb push_back
#define eb emplace_back
template <class T> void... | insert | 101 | 101 | 101 | 102 | TLE | |
p02557 | C++ | Runtime Error | #include <bits/stdc++.h>
#define maxn 200086
using namespace std;
int n;
int a[maxn], b[maxn];
int main() {
scanf("%d", &n);
for (int i = 1; i <= n; i++)
scanf("%d", &a[i]);
for (int i = 1; i <= n; i++)
scanf("%d", &b[i]);
reverse(b + 1, b + 1 + n);
int l = n, r = 1;
for (int i = 1; i <= n; i++) ... | #include <bits/stdc++.h>
#define maxn 200086
using namespace std;
int n;
int a[maxn], b[maxn];
int main() {
scanf("%d", &n);
for (int i = 1; i <= n; i++)
scanf("%d", &a[i]);
for (int i = 1; i <= n; i++)
scanf("%d", &b[i]);
reverse(b + 1, b + 1 + n);
int l = n, r = 1;
for (int i = 1; i <= n; i++) ... | replace | 25 | 26 | 25 | 26 | 0 | |
p02557 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <tuple>
#include <vector>
#define mkp make_pair
#define mkt make_tuple
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define all(v) v.begin(), v.end()
using namespace ... | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <tuple>
#include <vector>
#define mkp make_pair
#define mkt make_tuple
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define all(v) v.begin(), v.end()
using namespace ... | replace | 46 | 47 | 46 | 47 | 0 | |
p02557 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstring>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <regex>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <tu... | #include <algorithm>
#include <cmath>
#include <cstring>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <regex>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <tu... | replace | 85 | 87 | 85 | 86 | 0 | |
p02557 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#pragma GCC optimization("O3")
#define endl '\n'
#define pb push_back
#define fr first
#define sc second
#define ll long long int
#define ld long double
#define bit(idx) idx & (-idx)
#define bin(x, a) bitset<a>(x)
#define all(A) A.begin(), A.end()
#def... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#pragma GCC optimization("O3")
#define endl '\n'
#define pb push_back
#define fr first
#define sc second
#define ll long long int
#define ld long double
#define bit(idx) idx & (-idx)
#define bin(x, a) bitset<a>(x)
#define all(A) A.begin(), A.end()
#def... | replace | 53 | 54 | 53 | 54 | 0 | |
p02557 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define fi first
#define se second
#define mp make_pair
using namespace std;
typedef pair<int, int> pii;
set<pii> s1, s2;
int a[200010], b[200010], ans[200010];
int pos[200010], cnt[200010];
set<pii>::iterator get_pre(set<pii>::iterator it) {
it--;
return it;
}
int main() {
int n;
s... | #include <bits/stdc++.h>
#define fi first
#define se second
#define mp make_pair
using namespace std;
typedef pair<int, int> pii;
set<pii> s1, s2;
int a[200010], b[200010], ans[200010];
int pos[200010], cnt[200010];
set<pii>::iterator get_pre(set<pii>::iterator it) {
it--;
return it;
}
int main() {
int n;
s... | delete | 50 | 53 | 50 | 50 | TLE | |
p02557 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#ifdef LOCAL_TEST
#define BOOST_STACKTRACE_USE_ADDR2LINE
#define BOOST_STACKTRACE_ADDR2LINE_LOCATION \
/ usr / local / opt / binutils / bin / addr2line
#define _GNU_SOURCE 1
#include <boost/stacktrace.hpp>
namespac... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#ifdef LOCAL_TEST
#define BOOST_STACKTRACE_USE_ADDR2LINE
#define BOOST_STACKTRACE_ADDR2LINE_LOCATION \
/ usr / local / opt / binutils / bin / addr2line
#define _GNU_SOURCE 1
#include <boost/stacktrace.hpp>
namespac... | replace | 201 | 203 | 201 | 203 | 0 | |
p02557 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using i64 = long long;
#define endl "\n"
const i64 timeLimit = 1950;
unsigned long xor128() {
static unsigned long x = 123456789, y = 362436069, z = 521288629,
w = 88675123;
unsigned long t = (x ^ (x << 11));
x = y;
y = z;
z = w;
return ... | #include <bits/stdc++.h>
using namespace std;
using i64 = long long;
#define endl "\n"
const i64 timeLimit = 1900;
unsigned long xor128() {
static unsigned long x = 123456789, y = 362436069, z = 521288629,
w = 88675123;
unsigned long t = (x ^ (x << 11));
x = y;
y = z;
z = w;
return ... | replace | 5 | 6 | 5 | 6 | TLE | |
p02557 | C++ | Runtime Error |
/**
* Dont raise your voice, improve your argument.
* --Desmond Tutu
*/
#include <bits/stdc++.h>
using namespace std;
const bool ready = []() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout << fixed << setprecision(12);
return true;
}();
const double PI = acos(-1);
using ll = long long;
#define int ... |
/**
* Dont raise your voice, improve your argument.
* --Desmond Tutu
*/
#include <bits/stdc++.h>
using namespace std;
const bool ready = []() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout << fixed << setprecision(12);
return true;
}();
const double PI = acos(-1);
using ll = long long;
#define int ... | replace | 96 | 99 | 96 | 97 | 0 | |
p02557 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#define _USE_MATH_DEFINES
#include <cassert>
#include <complex>
#include <functional>
#include <math.h>
using namespace std;
#define rep(i, x) for (ll i = 0; i ... | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#define _USE_MATH_DEFINES
#include <cassert>
#include <complex>
#include <functional>
#include <math.h>
using namespace std;
#define rep(i, x) for (ll i = 0; i ... | insert | 208 | 208 | 208 | 210 | 0 | |
p02557 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
vector<int> A(N), B(N);
for (int i = 0; i < N; i++)
cin >> A[i];
for (int i = 0; i < N; i++)
cin >> B[i];
reverse(B.begin(), B.end());
for (int i = 0; i < N; i++) {
if (A[i] == B[i]) {
int now = N, now2 = N;
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
vector<int> A(N), B(N);
for (int i = 0; i < N; i++)
cin >> A[i];
for (int i = 0; i < N; i++)
cin >> B[i];
reverse(B.begin(), B.end());
for (int i = 0; i < N; i++) {
if (A[i] == B[i]) {
int now = N, now2 = N;
... | replace | 34 | 35 | 34 | 35 | 0 | |
p02557 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define mem(a, x) memset(a, x, sizeof(a));
#define ft \
ios_base::sync_with_stdio(0); \
cin.tie(0); ... | #include <bits/stdc++.h>
using namespace std;
#define mem(a, x) memset(a, x, sizeof(a));
#define ft \
ios_base::sync_with_stdio(0); \
cin.tie(0); ... | insert | 27 | 27 | 27 | 28 | TLE | |
p02557 | C++ | Runtime Error | /*input
10
1 1 5 1 4 5 5 4 9 4
1 4 9 9 8 2 1 8 2 1
*/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef tree<pair<int, int>, null_type, less<pair<int, int>>, rb_tree_tag,
tree_order_statistics_node... | /*input
10
1 1 5 1 4 5 5 4 9 4
1 4 9 9 8 2 1 8 2 1
*/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef tree<pair<int, int>, null_type, less<pair<int, int>>, rb_tree_tag,
tree_order_statistics_node... | replace | 81 | 82 | 81 | 82 | 0 | |
p02557 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
void pv(vector<int> &v) {
for (int i = 0; i < v.size(); i++)
cout << v[i] << " ";
cout << endl;
}
void solve() {}
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
ll n;
cin >> n;
vector<int> a(n, 0);
vector<int... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
void pv(vector<int> &v) {
for (int i = 0; i < v.size(); i++)
cout << v[i] << " ";
cout << endl;
}
void solve() {}
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
ll n;
cin >> n;
vector<int> a(n, 0);
vector<int... | replace | 87 | 88 | 87 | 89 | TLE | |
p02557 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define fastIO \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define int l... | #include <bits/stdc++.h>
using namespace std;
#define fastIO \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define int l... | replace | 82 | 83 | 82 | 83 | 0 | |
p02557 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define x first
#define y second
#define pb push_back
using namespace std;
typedef long long LL;
typedef pair<int, int> PII;
const double PI = acos(-1.0);
const double eps = 1e-8;
const int inf = 0x3f3f3f3f;
const LL INF = 0x3f3f3f3f3f3f3f3f;
const int N = 3e5 + 10;
const int M = 1e6 + 10;
cons... | #include <bits/stdc++.h>
#define x first
#define y second
#define pb push_back
using namespace std;
typedef long long LL;
typedef pair<int, int> PII;
const double PI = acos(-1.0);
const double eps = 1e-8;
const int inf = 0x3f3f3f3f;
const LL INF = 0x3f3f3f3f3f3f3f3f;
const int N = 3e5 + 10;
const int M = 1e6 + 10;
cons... | insert | 58 | 58 | 58 | 60 | TLE | |
p02557 | C++ | Time Limit Exceeded | #include <algorithm>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <vector>
// using namespace atcoder;
... | #include <algorithm>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <vector>
// using namespace atcoder;
... | insert | 914 | 914 | 914 | 918 | TLE | |
p02557 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
void Main() {
int n;
cin >> n;
vector<int> a(n), b(n);
map<int, int> m;
for (int i = 0; i < n; i++) {
cin >> a[i];
m[a[i]]++;
}
for (int i = 0; i < n; i++) {
cin >> b[n - 1 - i];
m[b[i]]++;
}
for (auto i : m) {
if (i.second > n) {
... | #include <bits/stdc++.h>
using namespace std;
void Main() {
int n;
cin >> n;
vector<int> a(n), b(n);
map<int, int> m;
for (int i = 0; i < n; i++) {
cin >> a[i];
m[a[i]]++;
}
for (int i = 0; i < n; i++) {
cin >> b[n - 1 - i];
m[b[n - 1 - i]]++;
}
for (auto i : m) {
if (i.second > n... | replace | 14 | 15 | 14 | 15 | TLE | |
p02557 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define fo(i, a, b) for (int i = (a); i < (b); i++)
#define qi queue<int>
#define vi vector<int>
#define ll long long
#define pb push_back
#define lb lower_bound
#define ub upper_bound
#define pii pair<int, int>
#define mp make_pair
#define all(a) (a).begin(), (a).end()
#define fi first
#define... | #include <bits/stdc++.h>
#define fo(i, a, b) for (int i = (a); i < (b); i++)
#define qi queue<int>
#define vi vector<int>
#define ll long long
#define pb push_back
#define lb lower_bound
#define ub upper_bound
#define pii pair<int, int>
#define mp make_pair
#define all(a) (a).begin(), (a).end()
#define fi first
#define... | replace | 41 | 42 | 41 | 42 | TLE | |
p02557 | C++ | Runtime Error | #include <bits/stdc++.h>
/*
#include <atcoder/all>
using namespace atcoder;
*/
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
// #include <boost/multiprecision/cpp_int.hpp>
using namespace std;
using dou = long double;
string yes = "yes";
string Yes = "Yes";
string YES = "Y... | #include <bits/stdc++.h>
/*
#include <atcoder/all>
using namespace atcoder;
*/
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
// #include <boost/multiprecision/cpp_int.hpp>
using namespace std;
using dou = long double;
string yes = "yes";
string Yes = "Yes";
string YES = "Y... | replace | 195 | 196 | 195 | 196 | 0 | |
p02557 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
typedef pair<int, int> P;
typedef pair<P, int> PP;
int a[200005], b[200005];
vector<int> c[200005], d[200005];
PP p[200005];
int ans[200005];
int main() {
int n;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> a[... | #include <algorithm>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
typedef pair<int, int> P;
typedef pair<P, int> PP;
int a[200005], b[200005];
vector<int> c[200005], d[200005];
PP p[200005];
int ans[200005];
int main() {
int n;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> a[... | insert | 76 | 76 | 76 | 78 | -11 | |
p02557 | C++ | Runtime Error | // Never stop trying
#pragma GCC target("avx2")
#pragma GCC optimization("O3")
#pragma GCC optimization("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
#define boost \
ios_base::sync_with_stdio(false); ... | // Never stop trying
#pragma GCC target("avx2")
#pragma GCC optimization("O3")
#pragma GCC optimization("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
#define boost \
ios_base::sync_with_stdio(false); ... | replace | 99 | 100 | 99 | 100 | -6 | terminate called after throwing an instance of 'std::length_error'
what(): cannot create std::vector larger than max_size()
|
p02557 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define PI 3.141592653589793238462
using namespace std;
typedef long long ll;
typedef long double db;
ll a[200005], b[200005], p[200005];
int main() {
ll n;
cin >> n;
for (ll i = 1; i <= n; i++) {
cin >> a[i];
p[a[i]]++;
}
for (ll i = 1; i <= n; i++) {
cin >> b[i];
p[b... | #include <bits/stdc++.h>
#define PI 3.141592653589793238462
using namespace std;
typedef long long ll;
typedef long double db;
ll a[200005], b[200005], p[200005];
int main() {
ll n;
cin >> n;
for (ll i = 1; i <= n; i++) {
cin >> a[i];
p[a[i]]++;
}
for (ll i = 1; i <= n; i++) {
cin >> b[i];
p[b... | insert | 24 | 24 | 24 | 25 | TLE | |
p02557 | C++ | Runtime Error | #include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
int32_t n, *a, *b;
void swap(int32_t *x, int32_t *y) {
int32_t t = *x;
*x = *y;
*y = t;
}
int32_t main() {
scanf("%d", &n);
a = (int32_t *)malloc(n * sizeof(int32_t));
b = (int32_t *)malloc(n * sizeof(int32_t));
for (int i = 0; i < n; i++)
... | #include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
int32_t n, *a, *b;
void swap(int32_t *x, int32_t *y) {
int32_t t = *x;
*x = *y;
*y = t;
}
int32_t main() {
scanf("%d", &n);
a = (int32_t *)malloc(n * sizeof(int32_t));
b = (int32_t *)malloc(n * sizeof(int32_t));
for (int i = 0; i < n; i++)
... | replace | 20 | 21 | 20 | 21 | -6 | Fatal glibc error: malloc assertion failure in sysmalloc: (old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)
|
p02557 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
#define IOS \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie... | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
#define IOS \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie... | replace | 24 | 25 | 24 | 25 | TLE | |
p02557 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int n, k, a[N], f[N], b[N], F, le, ri, l, r;
int main() {
cin >> n;
for (k = 1; k <= n; k++) {
cin >> a[k];
f[a[k]]++;
}
for (k = 1; k <= n; k++) {
cin >> b[k];
f[b[k]]++;
if (f[b[k]] > n) {
F = 1;
}
}
if (F)
... | #include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
int n, k, a[N], f[N], b[N], F, le, ri, l, r;
int main() {
cin >> n;
for (k = 1; k <= n; k++) {
cin >> a[k];
f[a[k]]++;
}
for (k = 1; k <= n; k++) {
cin >> b[k];
f[b[k]]++;
if (f[b[k]] > n) {
F = 1;
}
}
if (F)
... | replace | 2 | 3 | 2 | 3 | 0 | |
p02557 | C++ | Runtime Error | #include <bits/stdc++.h>
// #include <boost/multiprecision/cpp_int.hpp>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
#pragma GCC optimize("O3")
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPP(i, n) for (int i = 1; i <= n; i++)
#define ALL(obj) (obj).begin(), (obj).end()... | #include <bits/stdc++.h>
// #include <boost/multiprecision/cpp_int.hpp>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
#pragma GCC optimize("O3")
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPP(i, n) for (int i = 1; i <= n; i++)
#define ALL(obj) (obj).begin(), (obj).end()... | replace | 182 | 183 | 182 | 183 | 0 | |
p02557 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define SZ(a) ((int)(a).size())
typedef long long int64;
int main() {
#ifdef LOCAL
freopen(".a.in", "r", stdin);
#endif
ios_base::sync_with_stdio(false), cout.tie(0), cin.tie(0);
int n;
cin >> n;
vector<int> A(n), B(n), C(3 * n);
for (auto &i : A)
cin >> i;
... | #include <bits/stdc++.h>
using namespace std;
#define SZ(a) ((int)(a).size())
typedef long long int64;
int main() {
#ifdef LOCAL
freopen(".a.in", "r", stdin);
#endif
ios_base::sync_with_stdio(false), cout.tie(0), cin.tie(0);
int n;
cin >> n;
vector<int> A(n), B(n), C(3 * n);
for (auto &i : A)
cin >> i;
... | replace | 22 | 23 | 22 | 23 | 0 | |
p02557 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const string YES = "Yes";
const string NO = "No";
void solve(int N, vector<int> A, vector<int> B) {
vector<int> cnt_A(N + 1), cnt_B(N + 1);
for (int i = 0; i < N; i++) {
cnt_A.at(A.at(i))++;
cnt_B.at(B.at(i))++;
}
for (int i = 1; i <= N; i++) {
if (c... | #include <bits/stdc++.h>
using namespace std;
const string YES = "Yes";
const string NO = "No";
void solve(int N, vector<int> A, vector<int> B) {
vector<int> cnt_A(N + 1), cnt_B(N + 1);
for (int i = 0; i < N; i++) {
cnt_A.at(A.at(i))++;
cnt_B.at(B.at(i))++;
}
for (int i = 1; i <= N; i++) {
if (c... | replace | 33 | 34 | 33 | 34 | 0 | |
p02557 | C++ | Runtime Error | /*
これを入れて実行
g++ code.cpp
./a.out
*/
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <... | /*
これを入れて実行
g++ code.cpp
./a.out
*/
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <... | replace | 104 | 105 | 104 | 105 | 0 | |
p02557 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) REP(i, 0, n)
#define REP(i, s, e) for (int i = (s); i < (int)(e); i++)
#define repr(i, n) REPR(i, n, 0)
#define REPR(i, s, e) for (int i = (int)(s - 1); i >= (int)(e); i--)
#define all(r) r.begin(), r.end()
#define rall(r) r.rbegin(), r.rend()
typedef lon... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) REP(i, 0, n)
#define REP(i, s, e) for (int i = (s); i < (int)(e); i++)
#define repr(i, n) REPR(i, n, 0)
#define REPR(i, s, e) for (int i = (int)(s - 1); i >= (int)(e); i--)
#define all(r) r.begin(), r.end()
#define rall(r) r.rbegin(), r.rend()
typedef lon... | replace | 94 | 95 | 94 | 95 | 0 | |
p02557 | C++ | Time Limit Exceeded | #define _USE_MATH_DEFINES
#include <bits/stdc++.h>
#define REP(i, start, end) for (ll i = start, i##Len = (end); i < i##Len; ++i)
#define REPR(i, start, end) for (ll i = start, i##Len = (end); i > i##Len; --i)
using ll = long long;
using namespace std;
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
... | #define _USE_MATH_DEFINES
#include <bits/stdc++.h>
#define REP(i, start, end) for (ll i = start, i##Len = (end); i < i##Len; ++i)
#define REPR(i, start, end) for (ll i = start, i##Len = (end); i > i##Len; --i)
using ll = long long;
using namespace std;
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
... | replace | 40 | 41 | 40 | 41 | TLE | |
p02557 | 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 vi = vector<int>;
using vll = vector<ll>;
#define MOD 1000000007
int main() {
int n;
cin >> n;
map<int, int> ma, mb;
vi aa(n), bb(n);
rep(i, n) {
int a;
cin >> a;
ma[a]++;
... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
using vi = vector<int>;
using vll = vector<ll>;
#define MOD 1000000007
int main() {
int n;
cin >> n;
map<int, int> ma, mb;
vi aa(n), bb(n);
rep(i, n) {
int a;
cin >> a;
ma[a]++;
... | replace | 36 | 37 | 36 | 48 | TLE | |
p02557 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
#define fi first
#define se second
typedef pair<ll, ll> P;
using VP = vector<P>;
using VVP = vector<VP>;
using VI = vector<ll>;
using VVI = vector<VI>;
using VVVI = vector<VVI>;
const int inf = 1e9 + 7;
const ll INF = 1LL << 61;
co... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
#define fi first
#define se second
typedef pair<ll, ll> P;
using VP = vector<P>;
using VVP = vector<VP>;
using VI = vector<ll>;
using VVI = vector<VI>;
using VVVI = vector<VVI>;
const int inf = 1e9 + 7;
const ll INF = 1LL << 61;
co... | replace | 64 | 65 | 64 | 65 | 0 | |
p02557 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int n, a[200001], b[200001], ta[200001], tb[200001], l = 1, r = 1;
int main() {
scanf("%d", &n);
for (int i = 1; i <= n; i++)
scanf("%d", &a[i]), ta[a[i]]++;
for (int i = 1; i <= n; i++)
scanf("%d", &b[i]), tb[b[i]]++;
for (int i = 1; i <= n; i++)
if (ta... | #include <bits/stdc++.h>
using namespace std;
int n, a[400001], b[400001], ta[400001], tb[400001], l = 1, r = 1;
int main() {
scanf("%d", &n);
for (int i = 1; i <= n; i++)
scanf("%d", &a[i]), ta[a[i]]++;
for (int i = 1; i <= n; i++)
scanf("%d", &b[i]), tb[b[i]]++;
for (int i = 1; i <= n; i++)
if (ta... | replace | 2 | 3 | 2 | 3 | 0 | |
p02558 | Python | Time Limit Exceeded | from typing import List
class DSU:
def __init__(self, n: int) -> None:
self._n = n
self.parent_or_size = [-1] * n
def merge(self, a: int, b: int) -> int:
assert 0 <= a <= self._n
assert 0 <= b <= self._n
x, y = self.leader(a), self.leader(b)
if x == y:
... | from typing import List
class DSU:
def __init__(self, n: int) -> None:
self._n = n
self.parent_or_size = [-1] * n
def merge(self, a: int, b: int) -> int:
assert 0 <= a <= self._n
assert 0 <= b <= self._n
x, y = self.leader(a), self.leader(b)
if x == y:
... | insert | 30 | 30 | 30 | 31 | TLE | |
p02558 | C++ | Runtime Error | // #Sazaの1日1AC
#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000000 + 7;
const long long INF = 9e18;
const double PI = 3.14159265358979323846;
// マクロ
// 型エイリアス
using ll = long long;
using P = pair<long long, long long>;
using vl = vector<long long>;
using vvl = vector<vector<long long>>;
usin... | // #Sazaの1日1AC
#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000000 + 7;
const long long INF = 9e18;
const double PI = 3.14159265358979323846;
// マクロ
// 型エイリアス
using ll = long long;
using P = pair<long long, long long>;
using vl = vector<long long>;
using vvl = vector<vector<long long>>;
usin... | delete | 152 | 154 | 152 | 152 | -6 | free(): invalid pointer
|
p02558 | C++ | Runtime Error | #include <iostream>
#include <vector>
using namespace std;
struct Unionfind {
vector<int> par;
vector<int> rank;
void init(int n) {
par.resize(n);
rank.resize(n);
for (int i = 0; i < n; i++)
par[i] = i;
}
int root(int x) {
if (par[x] == x)
return x;
else
return par[x]... | #include <iostream>
#include <vector>
using namespace std;
struct Unionfind {
vector<int> par;
vector<int> rank;
void init(int n) {
par.resize(n);
rank.resize(n);
for (int i = 0; i < n; i++)
par[i] = i;
}
int root(int x) {
if (par[x] == x)
return x;
else
return par[x]... | replace | 48 | 49 | 48 | 49 | 0 | |
p02558 | C++ | Runtime Error | #include "algorithm"
#include "bitset"
#include "cassert"
#include "climits"
#include "cmath"
#include "cstdio"
#include "ctime"
#include "functional"
#include "iomanip"
#include "iostream"
#include "list"
#include "map"
#include "numeric"
#include "queue"
#include "random"
#include "set"
#include "stack"
#include "str... | #include "algorithm"
#include "bitset"
#include "cassert"
#include "climits"
#include "cmath"
#include "cstdio"
#include "ctime"
#include "functional"
#include "iomanip"
#include "iostream"
#include "list"
#include "map"
#include "numeric"
#include "queue"
#include "random"
#include "set"
#include "stack"
#include "str... | delete | 77 | 78 | 77 | 77 | 0 | |
p02558 | C++ | Runtime Error | #include <bits/stdc++.h>
#define fast \
ios::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0)
#define int long long
using namespace ... | #include <bits/stdc++.h>
#define fast \
ios::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0)
#define int long long
using namespace ... | replace | 8 | 9 | 8 | 9 | 0 | |
p02558 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define ordered_set \
tree<int, null_type, less<int>, rb_tree_tag, \
... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define ordered_set \
tree<int, null_type, less<int>, rb_tree_tag, \
... | replace | 28 | 29 | 28 | 29 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.