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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p02727 | C++ | Time Limit Exceeded | //
// main.cpp
// ProgrammingContestChallengeBook2
//
// Created by Hisaki Kobayashi on 2020/04/04.
// Copyright © 2020 Hisaki Kobayashi. All rights reserved.
//
#include <bits/stdc++.h>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string>
// #include "mylibrary.hpp"
using namespace std;
... | //
// main.cpp
// ProgrammingContestChallengeBook2
//
// Created by Hisaki Kobayashi on 2020/04/04.
// Copyright © 2020 Hisaki Kobayashi. All rights reserved.
//
#include <bits/stdc++.h>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string>
// #include "mylibrary.hpp"
using namespace std;
... | replace | 29 | 33 | 29 | 32 | TLE | |
p02727 | C++ | Runtime Error | #include "bits/stdc++.h"
#define REP(i, n, N) for (ll i = (n); i < (N); i++)
#define RREP(i, n, N) for (ll i = (N - 1); i >= (n); i--)
#define p(s) cout << (s) << endl
#define p2(a, b) cout << (a) << " " << (b) << endl
using namespace std;
typedef long long ll;
ll mod = 1e9 + 7;
ll inf = 1e18;
ll X, Y, A, B, C;
ll p[... | #include "bits/stdc++.h"
#define REP(i, n, N) for (ll i = (n); i < (N); i++)
#define RREP(i, n, N) for (ll i = (N - 1); i >= (n); i--)
#define p(s) cout << (s) << endl
#define p2(a, b) cout << (a) << " " << (b) << endl
using namespace std;
typedef long long ll;
ll mod = 1e9 + 7;
ll inf = 1e18;
ll X, Y, A, B, C;
ll p[... | replace | 23 | 26 | 23 | 26 | 0 | |
p02727 | C++ | Time Limit Exceeded | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define LL long long
#define DB double
#define ST string
#define BS bitset
#define VE vector
#define VL vector<LL>
#define VP vector<pair<LL, LL>>
#define VVL vector<vector<LL>>
#define PQ priority_queue
#define PQS priority_queue<LL, vector<LL>, grea... | #include <bits/stdc++.h>
using namespace std;
#define LL long long
#define DB double
#define ST string
#define BS bitset
#define VE vector
#define VL vector<LL>
#define VP vector<pair<LL, LL>>
#define VVL vector<vector<LL>>
#define PQ priority_queue
#define PQS priority_queue<LL, vector<LL>, greater<LL>>
#define PB pus... | delete | 0 | 1 | 0 | 0 | TLE | |
p02727 | C++ | Runtime Error | #pragma GCC optimize("O3")
#pragma GCC target("avx")
#pragma GCC optimize("unroll-loops")
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define LL long long
#define DB double
#define ST string
#define BS bitset
#define VE vector
#define VL vector<LL>
#define VP vector<pair<LL, LL>>
#define VVL ve... | #pragma GCC optimize("O3")
#pragma GCC target("avx")
#pragma GCC optimize("unroll-loops")
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define LL long long
#define DB double
#define ST string
#define BS bitset
#define VE vector
#define VL vector<LL>
#define VP vector<pair<LL, LL>>
#define VVL ve... | replace | 37 | 38 | 37 | 38 | 0 | |
p02727 | C++ | Runtime Error | #pragma region template
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vi;
typedef pair<ll, ll> ii;
#define REP(i, n) for (ll i = 0; i < (n); ++i)
#define REP1(i, n) for (ll i = 1; i <= (n); ++i)
#define OUT(x) cout << (x) << endl;
#define OUTA(a) ... | #pragma region template
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vi;
typedef pair<ll, ll> ii;
#define REP(i, n) for (ll i = 0; i < (n); ++i)
#define REP1(i, n) for (ll i = 1; i <= (n); ++i)
#define OUT(x) cout << (x) << endl;
#define OUTA(a) ... | replace | 44 | 45 | 44 | 45 | 0 | |
p02727 | C++ | Time Limit Exceeded | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
const double PI = 3.14159265358979323846;
typedef long long ll;
const double EPS = 1e-9;
// #define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep(i, n) for (ll i = 0; i < (n); ++i)
// typedef pair<ll, ll> P;
typedef pair<ll, ll> P;
const ll I... | #include <bits/stdc++.h>
using namespace std;
const double PI = 3.14159265358979323846;
typedef long long ll;
const double EPS = 1e-9;
// #define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep(i, n) for (ll i = 0; i < (n); ++i)
// typedef pair<ll, ll> P;
typedef pair<ll, ll> P;
const ll INF = 10e17;
#define cmin... | delete | 0 | 2 | 0 | 0 | TLE | |
p02727 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define REP(i, d, n) for (int i = (d); i < (n); ++i)
#define all(v) v.begin(), v.end()
using ll = long long;
using P = pair<int, int>;
int main() {
int x, y, a, b, c;
cin >> x >> y >> a >> b >> c;
vector<ll> p(a);
re... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define REP(i, d, n) for (int i = (d); i < (n); ++i)
#define all(v) v.begin(), v.end()
using ll = long long;
using P = pair<int, int>;
int main() {
int x, y, a, b, c;
cin >> x >> y >> a >> b >> c;
vector<ll> p(a);
re... | replace | 17 | 18 | 17 | 18 | 0 | |
p02727 | C++ | Runtime Error | #include <bits/stdc++.h>
#define SORT(x) sort((x).begin(), (x).end())
#define RSORT(x) sort((x).rbegin(), (x).rend())
#define ALL(x) (x).begin(), (x).end()
#define rep(i, n) for (ll i = 0; i < n; i++)
#define reps(i, m, n) for (ll i = m; i < n; i++)
#define repr(i, m, n) for (ll i = m; i >= n; i--)
#define de(x) cout <... | #include <bits/stdc++.h>
#define SORT(x) sort((x).begin(), (x).end())
#define RSORT(x) sort((x).rbegin(), (x).rend())
#define ALL(x) (x).begin(), (x).end()
#define rep(i, n) for (ll i = 0; i < n; i++)
#define reps(i, m, n) for (ll i = m; i < n; i++)
#define repr(i, m, n) for (ll i = m; i >= n; i--)
#define de(x) cout <... | replace | 63 | 64 | 63 | 64 | 0 | |
p02727 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define boost \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define ll ... | #include <bits/stdc++.h>
using namespace std;
#define boost \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define ll ... | replace | 43 | 44 | 43 | 44 | 0 | |
p02727 | 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 FOR(i, x, n) for (ll i = x; i < n; i++)
#define pb push_back
#define pf push_front
#define ll long long
#define hii cout << "hii" << endl
#define pii pair<int... | #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 FOR(i, x, n) for (ll i = x; i < n; i++)
#define pb push_back
#define pf push_front
#define ll long long
#define hii cout << "hii" << endl
#define pii pair<int... | replace | 96 | 97 | 96 | 97 | 0 | |
p02727 | C++ | Runtime Error | #include <bits/stdc++.h>
#define int long long
using namespace std;
using Graph = vector<vector<int>>;
signed main() {
int X, Y, A, B, C;
cin >> X >> Y >> A >> B >> C;
vector<int> P(A);
for (int i = 0; i < A; i++)
cin >> P.at(i);
vector<int> Q(B);
for (int i = 0; i < B; i++)
cin >> Q.at(i);
vecto... | #include <bits/stdc++.h>
#define int long long
using namespace std;
using Graph = vector<vector<int>>;
signed main() {
int X, Y, A, B, C;
cin >> X >> Y >> A >> B >> C;
vector<int> P(A);
for (int i = 0; i < A; i++)
cin >> P.at(i);
vector<int> Q(B);
for (int i = 0; i < B; i++)
cin >> Q.at(i);
vecto... | replace | 14 | 15 | 14 | 15 | 0 | |
p02727 | C++ | Runtime Error | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
#include <string>
#include <utility>
#include <vector>
typedef long long ll;
using namespace std;
int main(void) {
int x, y, a, b, c, i;
vector<ll> p, q, r;
cin >> x >> y >> a >> b ... | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
#include <string>
#include <utility>
#include <vector>
typedef long long ll;
using namespace std;
int main(void) {
int x, y, a, b, c, i;
vector<ll> p, q, r;
cin >> x >> y >> a >> b ... | replace | 44 | 45 | 44 | 45 | 0 | |
p02727 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (long long i = 0; i < n; i++)
#define all(v) v.begin(), v.end()
#define pq priority_queue
using vi = vector<int>; // intの1次元の型に vi という別名をつける
using vvi = vector<vi>; // intの2次元の型に vvi という別名をつける
using vvvi = vector<vvi>;
using ll = long long; // long lo... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (long long i = 0; i < n; i++)
#define all(v) v.begin(), v.end()
#define pq priority_queue
using vi = vector<int>; // intの1次元の型に vi という別名をつける
using vvi = vector<vi>; // intの2次元の型に vvi という別名をつける
using vvvi = vector<vvi>;
using ll = long long; // long lo... | replace | 449 | 450 | 449 | 450 | 0 | |
p02727 | C++ | Runtime Error | /*
Author: Babin Dutta
*/
#include <bits/stdc++.h>
using namespace std;
#define mod 1000000007
#define ll long long int
#define pb push_back
#define mp make_pair
#define boost \
ios_base::sync_with_stdio(false); ... | /*
Author: Babin Dutta
*/
#include <bits/stdc++.h>
using namespace std;
#define mod 1000000007
#define ll long long int
#define pb push_back
#define mp make_pair
#define boost \
ios_base::sync_with_stdio(false); ... | insert | 51 | 51 | 51 | 53 | 0 | |
p02727 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; ++i)
#define rrep(i, n) for (int i = n - 1; i >= 0; --i)
#define fi first
#define se second
using namespace std;
using lint = long long;
using uint = unsigned int;
using ulint = unsigned long long;
using ldouble = long double;
using pii = pair<int, int>;... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; ++i)
#define rrep(i, n) for (int i = n - 1; i >= 0; --i)
#define fi first
#define se second
using namespace std;
using lint = long long;
using uint = unsigned int;
using ulint = unsigned long long;
using ldouble = long double;
using pii = pair<int, int>;... | replace | 43 | 44 | 43 | 44 | 0 | |
p02727 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#include <chrono>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace std::chrono;
using namespace __gnu_pbds;
#define fastio \
ios_base::sync_with_stdio(0); ... | #include <bits/stdc++.h>
#include <chrono>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace std::chrono;
using namespace __gnu_pbds;
#define fastio \
ios_base::sync_with_stdio(0); ... | replace | 111 | 112 | 111 | 112 | TLE | |
p02727 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define rep1(i, n) for (ll i = 1; i <= (ll)(n); i++)
#define INF 1000000000000
#define MOD 1000000007
using ll = long long;
int main() {
ll X, Y, A, B, C;
cin >> X >> Y >> A >> B >> C; // red,green,r,g,rg
vector<ll>... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define rep1(i, n) for (ll i = 1; i <= (ll)(n); i++)
#define INF 1000000000000
#define MOD 1000000007
using ll = long long;
int main() {
ll X, Y, A, B, C;
cin >> X >> Y >> A >> B >> C; // red,green,r,g,rg
vector<ll>... | replace | 25 | 27 | 25 | 35 | 0 | |
p02727 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef vector<char> vc;
typedef vector<vector<int>> vvi;
typedef vector<vector<string>> vvs;
typedef vector<vector<char>> vvc;
typedef vector<vector<bool>> vvb;
typedef pair<i... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef vector<char> vc;
typedef vector<vector<int>> vvi;
typedef vector<vector<string>> vvs;
typedef vector<vector<char>> vvc;
typedef vector<vector<bool>> vvb;
typedef pair<i... | replace | 30 | 46 | 30 | 40 | 0 | |
p02727 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int INF = 1001001001;
const ll LINF = 1001001001001001;
const int MOD = 1000000007;
template <typename T> void print(const T &v);
int main() {
int x, y, a, b, c;
... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int INF = 1001001001;
const ll LINF = 1001001001001001;
const int MOD = 1000000007;
template <typename T> void print(const T &v);
int main() {
int x, y, a, b, c;
... | replace | 38 | 39 | 38 | 39 | 0 | |
p02727 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define dforsn(i, s, n) for (int i = int(n - 1); i >= int(s); i--)
#define forsn(i, s, n) for (int i = int(s); i < int(n); i++)
#define dforn(i, n) for (int i = int(n - 1); i >= 0; i--)
#define forn(i, n) for (int i = 0; i < int(n); i++)
#define D(a) cerr << #a << " = " <<... | #include <bits/stdc++.h>
using namespace std;
#define dforsn(i, s, n) for (int i = int(n - 1); i >= int(s); i--)
#define forsn(i, s, n) for (int i = int(s); i < int(n); i++)
#define dforn(i, n) for (int i = int(n - 1); i >= 0; i--)
#define forn(i, n) for (int i = 0; i < int(n); i++)
#define D(a) cerr << #a << " = " <<... | replace | 23 | 24 | 23 | 24 | 0 | |
p02727 | C++ | Runtime Error | #include <algorithm>
#include <climits>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
int main() {
long X, Y, A, B, C;
std::cin >> X >> Y >> A >> B >> C;
std::vector<long> p, q, r;
long temp;
for (long i = 0; i < A; i++) {
std::cin >> temp;
... | #include <algorithm>
#include <climits>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
int main() {
long X, Y, A, B, C;
std::cin >> X >> Y >> A >> B >> C;
std::vector<long> p, q, r;
long temp;
for (long i = 0; i < A; i++) {
std::cin >> temp;
... | replace | 46 | 47 | 46 | 47 | 0 | |
p02727 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<vi> vvi;
typedef vector<vl> vvl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<pii> vii;
typedef vector<pll> vll;
typedef map<int, int> mii;
typedef vector<char> ... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<vi> vvi;
typedef vector<vl> vvl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<pii> vii;
typedef vector<pll> vll;
typedef map<int, int> mii;
typedef vector<char> ... | delete | 113 | 114 | 113 | 113 | 0 | |
p02727 | C++ | Runtime Error | // AnkitCode99 here....
#include <bits/stdc++.h>
#define endl "\n"
typedef long long int ll;
#define MOD 1000000007
#define mp make_pair
#define pll pair<ll, ll>
#define pb push_back
// max xor btw range of two numbers..
#define max_XOR(a, b) (1 << int(log2(a ^ b) + 1)) - 1
#define vl vector<ll>
#define inf ll(1e18)
#d... | // AnkitCode99 here....
#include <bits/stdc++.h>
#define endl "\n"
typedef long long int ll;
#define MOD 1000000007
#define mp make_pair
#define pll pair<ll, ll>
#define pb push_back
// max xor btw range of two numbers..
#define max_XOR(a, b) (1 << int(log2(a ^ b) + 1)) - 1
#define vl vector<ll>
#define inf ll(1e18)
#d... | delete | 27 | 31 | 27 | 27 | -6 | terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
|
p02727 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> P;
typedef pair<int, int> Pi;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define FOR(i, a, b) for (ll i = a; i < b; i++)
#define fi first
#define se second
template <typename T> inline bool chmax(T &a, T ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> P;
typedef pair<int, int> Pi;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define FOR(i, a, b) for (ll i = a; i < b; i++)
#define fi first
#define se second
template <typename T> inline bool chmax(T &a, T ... | replace | 94 | 95 | 94 | 95 | 0 | |
p02727 | C++ | Runtime Error | //============================================================================
// Name : e.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#include <algorit... | //============================================================================
// Name : e.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#include <algorit... | insert | 44 | 44 | 44 | 46 | 0 | |
p02727 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
int main() {
int x, y, a, b, c;
cin >> x >> y >> a >> b >> c;
vector<int> p(a), q(b), r(c);
for (int i = 0; i < a; ++i)
cin >> p.at(i);
for (int i = 0; i < b; ++i)
cin >> q.at(i);
for (int i = 0; i < c; ... | #include <algorithm>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
int main() {
int x, y, a, b, c;
cin >> x >> y >> a >> b >> c;
vector<int> p(a), q(b), r(c);
for (int i = 0; i < a; ++i)
cin >> p.at(i);
for (int i = 0; i < b; ++i)
cin >> q.at(i);
for (int i = 0; i < c; ... | replace | 23 | 24 | 23 | 24 | 0 | |
p02727 | C++ | Runtime Error | #include <bits/stdc++.h>
#define int long long
using namespace std;
int X, Y, A, B, C;
int red[100005], green[100005], color[100005];
vector<int> best;
long long ans;
int32_t main() {
scanf("%lld %lld %lld %lld %lld", &X, &Y, &A, &B, &C);
for (int i = 0; i < A; i++) {
scanf("%lld", &red[i]);
}
sort(red, r... | #include <bits/stdc++.h>
#define int long long
using namespace std;
int X, Y, A, B, C;
int red[100005], green[100005], color[100005];
vector<int> best;
long long ans;
int32_t main() {
scanf("%lld %lld %lld %lld %lld", &X, &Y, &A, &B, &C);
for (int i = 0; i < A; i++) {
scanf("%lld", &red[i]);
}
sort(red, r... | replace | 34 | 38 | 34 | 36 | 0 | |
p02727 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
typedef vector<vector<ll>> vvll;
typedef vector<vector<vector<ll>>> vvvll;
typedef vector<bool> vb;
typedef vector<vector<bool>> vvb;
typedef vector<vector<vector<bool>>> vvvb;
typedef pair<ll, ll> pll;
typedef vector<pll> vpll... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
typedef vector<vector<ll>> vvll;
typedef vector<vector<vector<ll>>> vvvll;
typedef vector<bool> vb;
typedef vector<vector<bool>> vvb;
typedef vector<vector<vector<bool>>> vvvb;
typedef pair<ll, ll> pll;
typedef vector<pll> vpll... | replace | 110 | 111 | 110 | 111 | 0 | |
p02727 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
typedef long long ll;
int x, n, y, a, b, c, cnt[maxn];
struct node {
int v, c;
bool operator<(const node &rhs) const { return v > rhs.v; }
} p[maxn];
int main() {
scanf("%d%d%d%d%d", &x, &y, &a, &b, &c);
for (int i = 1; i <= a; i++) {
... | #include <bits/stdc++.h>
using namespace std;
const int maxn = 3e5 + 10;
typedef long long ll;
int x, n, y, a, b, c, cnt[maxn];
struct node {
int v, c;
bool operator<(const node &rhs) const { return v > rhs.v; }
} p[maxn];
int main() {
scanf("%d%d%d%d%d", &x, &y, &a, &b, &c);
for (int i = 1; i <= a; i++) {
... | replace | 2 | 3 | 2 | 3 | 0 | |
p02727 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstring>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <un... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstring>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <un... | replace | 93 | 94 | 93 | 94 | -11 | |
p02727 | C++ | Runtime Error | #include <bits/stdc++.h>
// clang-format off
using namespace std; using ll = int64_t; using ull = uint64_t; const ll INF = 9e18;
void print() { cout << endl; }
template<typename Head,typename... Tail> void print(Head head,Tail... tail){cout<<head;if(sizeof...(Tail)>0)cout<<" ";print(tail...);}
void print0() {}
template... | #include <bits/stdc++.h>
// clang-format off
using namespace std; using ll = int64_t; using ull = uint64_t; const ll INF = 9e18;
void print() { cout << endl; }
template<typename Head,typename... Tail> void print(Head head,Tail... tail){cout<<head;if(sizeof...(Tail)>0)cout<<" ";print(tail...);}
void print0() {}
template... | replace | 14 | 15 | 14 | 15 | 0 | |
p02727 | C++ | Runtime Error | #include <memory.h>
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <uti... | #include <memory.h>
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <uti... | replace | 49 | 50 | 49 | 50 | 0 | |
p02727 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int maxn = 2e3 + 5;
int red[maxn], green[maxn], white[maxn];
priority_queue<int, vector<int>, greater<int>> r, g, w;
bool cmp(int a, int b) { return a > b; }
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int x, y, a, b, c;
cin >> x >> y >> a >> b >> c... | #include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
int red[maxn], green[maxn], white[maxn];
priority_queue<int, vector<int>, greater<int>> r, g, w;
bool cmp(int a, int b) { return a > b; }
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int x, y, a, b, c;
cin >> x >> y >> a >> b >> c... | replace | 2 | 3 | 2 | 3 | 0 | |
p02727 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
int x, y, a, b, c;
cin >> x >> y >> a >> b >> c;
vector<int> p(a);
for (int i = 0; i < a; i++)
cin >> p[i];
vector<int> q(b);
for (int i = 0; i < b; i++)
cin >> q[i];
vector<int> r(c);
for (int i = 0; i < c; i++)
... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
int x, y, a, b, c;
cin >> x >> y >> a >> b >> c;
vector<int> p(a);
for (int i = 0; i < a; i++)
cin >> p[i];
vector<int> q(b);
for (int i = 0; i < b; i++)
cin >> q[i];
vector<int> r(c);
for (int i = 0; i < c; i++)
... | replace | 35 | 36 | 35 | 36 | 0 | |
p02727 | C++ | Runtime Error | #include <bits/stdc++.h>
#define CFS \
cin.tie(nullptr); \
ios::sync_with_stdio(false);
#define CST(x) cout << fixed << setprecision(x);
using namespace std;
const int IINF = 1 << 30;
const ... | #include <bits/stdc++.h>
#define CFS \
cin.tie(nullptr); \
ios::sync_with_stdio(false);
#define CST(x) cout << fixed << setprecision(x);
using namespace std;
const int IINF = 1 << 30;
const ... | replace | 19 | 20 | 19 | 20 | 0 | |
p02727 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define INCANT \
cin.tie(0), ios::sync_with_stdio(false), cout << fixed << setprecision(20)
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define rep(i, n) FOR(i, 0, n)
#define a... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define INCANT \
cin.tie(0), ios::sync_with_stdio(false), cout << fixed << setprecision(20)
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define rep(i, n) FOR(i, 0, n)
#define a... | replace | 32 | 34 | 32 | 34 | 0 | |
p02727 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <numeric>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
ll X, Y, A, B, C;
ll p[100005];
ll q[100005];
ll r[100005];
vector<ll> pq;
int main() {
cin >> X >> Y >> A >> B >> C;
for (l... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <numeric>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
ll X, Y, A, B, C;
ll p[100005];
ll q[100005];
ll r[100005];
vector<ll> pq;
int main() {
cin >> X >> Y >> A >> B >> C;
for (l... | replace | 44 | 45 | 44 | 45 | 0 | |
p02727 | C++ | Runtime Error | #include <algorithm>
#include <functional>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int red, green, numa, numb, numc;
cin >> red >> green >> numa >> numb >> numc;
vector<int> v_red;
vector<int> v_green;
vector<int> v_white;
int current;
for (int i = 0; i < numa; i++) {
... | #include <algorithm>
#include <functional>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int red, green, numa, numb, numc;
cin >> red >> green >> numa >> numb >> numc;
vector<int> v_red;
vector<int> v_green;
vector<int> v_white;
int current;
for (int i = 0; i < numa; i++) {
... | insert | 46 | 46 | 46 | 52 | 0 | |
p02727 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int X, Y, A, B, C;
cin >> X >> Y >> A >> B >> C;
long long p[100010] = {0};
long long q[100010] = {0};
long long r[100010] = {0};
for (int i = 0; i < A; i++)
cin >> p[i];
for (int i = 0; i < B; i++)
cin >> q[i];
for (int i = 0; i <... | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int X, Y, A, B, C;
cin >> X >> Y >> A >> B >> C;
long long p[100010] = {0};
long long q[100010] = {0};
long long r[100010] = {0};
for (int i = 0; i < A; i++)
cin >> p[i];
for (int i = 0; i < B; i++)
cin >> q[i];
for (int i = 0; i <... | replace | 28 | 29 | 28 | 29 | 0 | |
p02727 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, y, a, b, c;
cin >> x >> y >> a >> b >> c;
vector<long long> p(a), q(b), r(c);
for (int i = 0; i < a; i++)
cin >> p.at(i);
for (int i = 0; i < b; i++)
cin >> q.at(i);
for (int i = 0; i < c; i++)
cin >> r.at(i);
sort(p.begin(), ... | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, y, a, b, c;
cin >> x >> y >> a >> b >> c;
vector<long long> p(a), q(b), r(c);
for (int i = 0; i < a; i++)
cin >> p.at(i);
for (int i = 0; i < b; i++)
cin >> q.at(i);
for (int i = 0; i < c; i++)
cin >> r.at(i);
sort(p.begin(), ... | replace | 42 | 43 | 42 | 43 | 0 | |
p02727 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(a) (a).begin(), (a).end()
#define VI vector<int>
#define MOD 1000000007
typedef long long int ll;
const ll INF = (ll)1e19;
// const int INF=(1<<30);
int main() {
int x, y, ... | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(a) (a).begin(), (a).end()
#define VI vector<int>
#define MOD 1000000007
typedef long long int ll;
const ll INF = (ll)1e19;
// const int INF=(1<<30);
int main() {
int x, y, ... | replace | 36 | 44 | 36 | 46 | TLE | |
p02727 | C++ | Runtime Error | #include <algorithm>
#include <cfloat>
#include <complex>
#include <functional>
#include <iostream>
#include <limits.h>
#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>
#inc... | #include <algorithm>
#include <cfloat>
#include <complex>
#include <functional>
#include <iostream>
#include <limits.h>
#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>
#inc... | insert | 76 | 76 | 76 | 79 | 0 | |
p02727 | C++ | Runtime Error | #pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("-Ofast")
#include <bits/stdc++.h>
using namespace std;
typedef int in;
#define int long long
#define pb push_back
#define f first
#define s second
#define double long double
const int MAX = 2e3 + 5;
const int MAX2 = 2e5 + 4;
const in... | #pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("-Ofast")
#include <bits/stdc++.h>
using namespace std;
typedef int in;
#define int long long
#define pb push_back
#define f first
#define s second
#define double long double
const int MAX = 2e5 + 5;
const int MAX2 = 2e5 + 4;
const in... | replace | 12 | 13 | 12 | 13 | 0 | |
p02727 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef vector<string> vs;
typedef unordered_set<int> si;
typedef pair<int, int> pp;
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename T> void printV(vector<T> A) {
if (A.... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef vector<string> vs;
typedef unordered_set<int> si;
typedef pair<int, int> pp;
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename T> void printV(vector<T> A) {
if (A.... | replace | 73 | 75 | 73 | 75 | 0 | |
p02727 | C++ | Runtime Error | #define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
#include <unordered_map>
// #include"testlib.h"
#define endl "\n"
#define all(v) v.begin(), v.end()
#define allr(s) s.rbegin(), s.rend()
#define RT(s) return cout << s, 0
#define watch(x) cout << (#x) << " = " << x << endl
#define sz(s) (int)(s.size())
#define PI... | #define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
#include <unordered_map>
// #include"testlib.h"
#define endl "\n"
#define all(v) v.begin(), v.end()
#define allr(s) s.rbegin(), s.rend()
#define RT(s) return cout << s, 0
#define watch(x) cout << (#x) << " = " << x << endl
#define sz(s) (int)(s.size())
#define PI... | replace | 64 | 65 | 64 | 65 | 0 | |
p02727 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef u... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef u... | replace | 74 | 75 | 74 | 75 | 0 | |
p02727 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
// clang-format off
#define range(i, l, r) for (int i = (int)(l); i < (int)(r); ++(i))
#define rrange(i, l, r) for (int i = (int)(r) - 1; i >= (int)(l); --(i))
#define whole(f, x, ...) ([&](decltype((x)) container) { return (f)( begin(container), end(container), ## __... | #include <bits/stdc++.h>
using namespace std;
// clang-format off
#define range(i, l, r) for (int i = (int)(l); i < (int)(r); ++(i))
#define rrange(i, l, r) for (int i = (int)(r) - 1; i >= (int)(l); --(i))
#define whole(f, x, ...) ([&](decltype((x)) container) { return (f)( begin(container), end(container), ## __... | insert | 68 | 68 | 68 | 70 | 0 | |
p02727 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, n) for (int i = 1; i < (n + 1); ++i)
using namespace std;
using ll = long long;
const int INF = -100100100;
typedef pair<int, int> P;
int main() {
ll x, y, a, b, c, ans;
cin >> x >> y >> a >> b >> c;
vector<ll> p(a), q(b), r... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, n) for (int i = 1; i < (n + 1); ++i)
using namespace std;
using ll = long long;
const int INF = -100100100;
typedef pair<int, int> P;
int main() {
ll x, y, a, b, c, ans;
cin >> x >> y >> a >> b >> c;
vector<ll> p(a), q(b), r... | replace | 18 | 35 | 18 | 23 | 0 | |
p02727 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#includ... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#includ... | replace | 82 | 83 | 82 | 83 | TLE | |
p02727 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
const ll mod = 1000000007;
#define rep(i, n) for (int i =... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
const ll mod = 1000000007;
#define rep(i, n) for (int i =... | replace | 32 | 33 | 32 | 33 | 0 | |
p02728 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <ciso646>
#include <cmath>
#include <complex>
#include <cstdio>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include ... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <ciso646>
#include <cmath>
#include <complex>
#include <cstdio>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include ... | replace | 161 | 162 | 161 | 162 | 0 | |
p02728 | C++ | Runtime Error | #pragma GCC optimize(2)
#include <bits/stdc++.h>
#define ll long long
#define maxn 100005
#define inf 1e9
#define eps 1e-10
using namespace std;
inline int read() {
int x = 0, w = 1;
char c = getchar();
while (c < '0' || c > '9') {
if (c == '-')
w = -1;
c = getchar();
}
while (c <= '9' && c >= ... | #pragma GCC optimize(2)
#include <bits/stdc++.h>
#define ll long long
#define maxn 200005
#define inf 1e9
#define eps 1e-10
using namespace std;
inline int read() {
int x = 0, w = 1;
char c = getchar();
while (c < '0' || c > '9') {
if (c == '-')
w = -1;
c = getchar();
}
while (c <= '9' && c >= ... | replace | 3 | 4 | 3 | 4 | 0 | |
p02728 | C++ | Runtime Error | /*input
*/
#include <bits/stdc++.h>
#define up(i, a, b) for (int(i) = (a); (i) <= (b); ++(i))
#define down(i, b, a) for (int(i) = (b); i >= (a); --i)
#define debug(x) cerr << (x) << '\n';
#define bits(x, i) ((x >> i) & 1)
#define mid ((l + r) / 2)
#define pr pair<int, int>
#define long long long
using namespace std;
c... | /*input
*/
#include <bits/stdc++.h>
#define up(i, a, b) for (int(i) = (a); (i) <= (b); ++(i))
#define down(i, b, a) for (int(i) = (b); i >= (a); --i)
#define debug(x) cerr << (x) << '\n';
#define bits(x, i) ((x >> i) & 1)
#define mid ((l + r) / 2)
#define pr pair<int, int>
#define long long long
using namespace std;
c... | replace | 12 | 13 | 12 | 13 | 0 | |
p02728 | C++ | Runtime Error | #pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
template <class T> using V = vector<T>;
#define fi first
#define se second
#define all(v) (v).begin(), (v).end()
const ll inf = (1e18);
// const ll mod=998244353;
const ll mod = 1000000007;
ll gcd(ll a... | #pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
template <class T> using V = vector<T>;
#define fi first
#define se second
#define all(v) (v).begin(), (v).end()
const ll inf = (1e18);
// const ll mod=998244353;
const ll mod = 1000000007;
ll gcd(ll a... | replace | 113 | 114 | 113 | 114 | 0 | |
p02728 | C++ | Runtime Error | // includes {{{
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <tuple>
#include <vector>
// #include<deque>
// #include<multiset>
// #include<c... | // includes {{{
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <tuple>
#include <vector>
// #include<deque>
// #include<multiset>
// #include<c... | replace | 371 | 372 | 371 | 372 | 0 | |
p02728 | C++ | Runtime Error | #include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
typedef long long ll;
const ll MAXN = 2e5 + 10;
const ll MOD = 1e9 + 7;
struct Node {
ll ind, nxt;
} node[MAXN];
ll n, head[MAXN], cnt;
ll sz[MAXN], dp[MAXN], ans[MAXN];
ll fac[MAXN] = {1};
void add(ll x, ll y) {
node[++cnt].ind = y;
no... | #include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
typedef long long ll;
const ll MAXN = 2e5 + 10;
const ll MOD = 1e9 + 7;
struct Node {
ll ind, nxt;
} node[MAXN * 2];
ll n, head[MAXN], cnt;
ll sz[MAXN], dp[MAXN], ans[MAXN];
ll fac[MAXN] = {1};
void add(ll x, ll y) {
node[++cnt].ind = y;
... | replace | 9 | 10 | 9 | 10 | 0 | |
p02728 | C++ | Runtime Error | #include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
#define MX 200005
#define MOD 1'000'000'007
#define invmod(x) bigmod(x, MOD - 2)
#define br '\n'
ll bigmod(ll base, ll pw) {
ll ret = 1;
while (pw) {
if (pw & 1)
ret = ret * base % MOD;
base = ... | #include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
#define MX 200005
#define MOD 1'000'000'007
#define invmod(x) bigmod(x, MOD - 2)
#define br '\n'
ll bigmod(ll base, ll pw) {
ll ret = 1;
while (pw) {
if (pw & 1)
ret = ret * base % MOD;
base = ... | delete | 67 | 70 | 67 | 67 | 0 | |
p02728 | C++ | Runtime Error | #define LOCAL
#ifdef LOCAL
#define _GLIBCXX_DEBUG
#endif
#include <bits/stdc++.h>
using namespace std;
#define rep(i, x) for (ll i = 0; i < (ll)(x); i++)
#define rrep(i, x) for (ll i = (ll)(x)-1; 0 <= i; i--)
#define reps(i, x) for (ll i = 1; i < (ll)(x) + 1; i++)
#define rreps(i, x) for (ll i = (ll)(x); 1 <= i; i--)
#... | #define LOCAL
#ifdef LOCAL
#define _GLIBCXX_DEBUG
#endif
#include <bits/stdc++.h>
using namespace std;
#define rep(i, x) for (ll i = 0; i < (ll)(x); i++)
#define rrep(i, x) for (ll i = (ll)(x)-1; 0 <= i; i--)
#define reps(i, x) for (ll i = 1; i < (ll)(x) + 1; i++)
#define rreps(i, x) for (ll i = (ll)(x); 1 <= i; i--)
#... | replace | 18 | 19 | 18 | 19 | 0 | |
p02728 | C++ | Runtime Error | #include <bits/stdc++.h>
#define del(a, i) memset(a, i, sizeof(a))
#define ll long long
#define inl inline
#define il inl void
#define it inl int
#define ill inl ll
#define re register
#define ri re int
#define rl re ll
#define mid ((l + r) >> 1)
#define lowbit(x) (x & (-x))
#define INF 0x3f3f3f3f
using namespace std;
... | #include <bits/stdc++.h>
#define del(a, i) memset(a, i, sizeof(a))
#define ll long long
#define inl inline
#define il inl void
#define it inl int
#define ill inl ll
#define re register
#define ri re int
#define rl re ll
#define mid ((l + r) >> 1)
#define lowbit(x) (x & (-x))
#define INF 0x3f3f3f3f
using namespace std;
... | replace | 48 | 49 | 48 | 49 | 0 | |
p02728 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define li long long int
#define rep(i, to) for (li i = 0; i < ((li)(to)); i++)
#define repp(i, start, to) for (li i = (li)(start); i < ((li)(to)); i++)
#define pb push_back
#define sz(v) ((li)(v).size())
#define bgn(v) ((v).begin())
#define eend(v) ((v).end())
#define all... | #include <bits/stdc++.h>
using namespace std;
#define li long long int
#define rep(i, to) for (li i = 0; i < ((li)(to)); i++)
#define repp(i, start, to) for (li i = (li)(start); i < ((li)(to)); i++)
#define pb push_back
#define sz(v) ((li)(v).size())
#define bgn(v) ((v).begin())
#define eend(v) ((v).end())
#define all... | insert | 169 | 169 | 169 | 183 | TLE | |
p02728 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define li long long int
#define rep(i, to) for (li i = 0; i < ((li)(to)); i++)
#define repp(i, start, to) for (li i = (li)(start); i < ((li)(to)); i++)
#define pb push_back
#define sz(v) ((li)(v).size())
#define bgn(v) ((v).begin())
#define eend(v) ((v).end())
#define all... | #include <bits/stdc++.h>
using namespace std;
#define li long long int
#define rep(i, to) for (li i = 0; i < ((li)(to)); i++)
#define repp(i, start, to) for (li i = (li)(start); i < ((li)(to)); i++)
#define pb push_back
#define sz(v) ((li)(v).size())
#define bgn(v) ((v).begin())
#define eend(v) ((v).end())
#define all... | replace | 174 | 175 | 174 | 177 | TLE | |
p02728 | C++ | Runtime Error | #include <bits/stdc++.h>
#define MAXN 100010
#define ll long long
using namespace std;
const int mod = 1e9 + 7;
int n, tot;
ll product = 1;
int head[MAXN], siz[MAXN];
ll f[MAXN];
struct edge {
int to, next;
} e[MAXN * 2];
void add_edge(int x, int y) {
e[++tot].to = y;
e[tot].next = head[x];
head[x] = t... | #include <bits/stdc++.h>
#define MAXN 200010
#define ll long long
using namespace std;
const int mod = 1e9 + 7;
int n, tot;
ll product = 1;
int head[MAXN], siz[MAXN];
ll f[MAXN];
struct edge {
int to, next;
} e[MAXN * 2];
void add_edge(int x, int y) {
e[++tot].to = y;
e[tot].next = head[x];
head[x] = t... | replace | 2 | 3 | 2 | 3 | 0 | |
p02728 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define repr(i, n) for (int i = (n - 1); i >= 0; --i)
typedef long long ll;
typedef pair<int, int> P;
// const int MAX = 200005;
const int MAX = 40;
const int INF = 1001001001;
const int MOD = 1000000007;
struct mint {
l... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define repr(i, n) for (int i = (n - 1); i >= 0; --i)
typedef long long ll;
typedef pair<int, int> P;
const int MAX = 200005;
const int INF = 1001001001;
const int MOD = 1000000007;
struct mint {
long long x;
mint(long... | replace | 9 | 11 | 9 | 10 | 0 | |
p02728 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int mod = 1e9 + 7;
const int N = 2e5 + 444;
int re() {
int x;
scanf("%lld", &x);
return x;
}
int val[N];
int tot;
int ans[N];
int fir[N], nxt[N], to[N];
int siz[N];
int jie[N];
int c[N], d[N];
void addedge(int x, int y) {
nxt[++tot] = fir... | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int mod = 1e9 + 7;
const int N = 1e6 + 444;
int re() {
int x;
scanf("%lld", &x);
return x;
}
int val[N];
int tot;
int ans[N];
int fir[N], nxt[N], to[N];
int siz[N];
int jie[N];
int c[N], d[N];
void addedge(int x, int y) {
nxt[++tot] = fir... | replace | 4 | 5 | 4 | 5 | 0 | |
p02728 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
struct modular_num {
int d, md = 1e9 + 7;
modular_num(int x = 0, int _mod = 1e9 + 7) {
d = normal(x);
md = _mod;
}
int normal(int x) {
x %= md;
while (x < 0)
x += md;
return x;
}
modular_num inverse(modular_num t) { return t ^ (md ... | #include <bits/stdc++.h>
using namespace std;
struct modular_num {
int d, md = 1e9 + 7;
modular_num(int x = 0, int _mod = 1e9 + 7) {
d = normal(x);
md = _mod;
}
int normal(int x) {
x %= md;
while (x < 0)
x += md;
return x;
}
modular_num inverse(modular_num t) { return t ^ (md ... | replace | 75 | 76 | 75 | 76 | 0 | |
p02728 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define rep(i, n) for (int i = 0; i < (n); ++i)
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> bool chmin(T &a, const T &b) {
if (b < a) {
a =... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define rep(i, n) for (int i = 0; i < (n); ++i)
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> bool chmin(T &a, const T &b) {
if (b < a) {
a =... | replace | 76 | 77 | 76 | 77 | 0 | |
p02728 | C++ | Runtime Error |
#include <algorithm>
#include <array>
#include <bitset>
#include <cmath>
#include <complex>
#include <cstdio>
#include <deque>
#include <float.h>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <... |
#include <algorithm>
#include <array>
#include <bitset>
#include <cmath>
#include <complex>
#include <cstdio>
#include <deque>
#include <float.h>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <... | replace | 37 | 38 | 37 | 38 | 0 | |
p02728 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include ... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include ... | replace | 262 | 263 | 262 | 263 | 0 | |
p02728 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define Int int64_t
using namespace std;
struct Combination {
vector<int64_t> _fact, _rfact, _inv;
int64_t MOD;
Combination(size_t sz, int64_t mod)
: _fact(sz + 1), _rfact(sz + 1), _inv(sz + 1), MOD(mod) {
_fact[0] = _rfact[sz] = _inv[0] = 1;
for (int i = 1; i <= sz; ++i)... | #include <bits/stdc++.h>
#define Int int64_t
using namespace std;
struct Combination {
vector<int64_t> _fact, _rfact, _inv;
int64_t MOD;
Combination(size_t sz, int64_t mod)
: _fact(sz + 1), _rfact(sz + 1), _inv(sz + 1), MOD(mod) {
_fact[0] = _rfact[sz] = _inv[0] = 1;
for (int i = 1; i <= sz; ++i)... | replace | 103 | 121 | 103 | 109 | TLE | |
p02728 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
#define all(x) x.begin(), x.end()
template <typename T1, typename T2> inline void chkmin(T1 &x, const T2 &y) {
if (x > y)
x = y;
}
template <typename T1, typename T2> inline void chkmax(T1... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
#define all(x) x.begin(), x.end()
template <typename T1, typename T2> inline void chkmin(T1 &x, const T2 &y) {
if (x > y)
x = y;
}
template <typename T1, typename T2> inline void chkmax(T1... | replace | 47 | 48 | 47 | 48 | 0 | |
p02728 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int INF = 1001001001;
template <class T, class U> bool chmax(T &a, const U &b) {
return a < b ? a = b, 1 : 0;
}
template <class T, class U> bool chmin(T &a, const U &b) {
return a > b ? a = b, 1 : 0;
}
template <int mod> class ModInt {
pub... | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int INF = 1001001001;
template <class T, class U> bool chmax(T &a, const U &b) {
return a < b ? a = b, 1 : 0;
}
template <class T, class U> bool chmin(T &a, const U &b) {
return a > b ? a = b, 1 : 0;
}
template <int mod> class ModInt {
pub... | replace | 77 | 78 | 77 | 78 | 0 | |
p02728 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <map>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; ++i)
#define rep1(i, n) for (int i = 1; i <= n; ++i)
using namespace std;
typedef long long ll;
const ll MOD = 1e+9 + 7;
struct mint {
ll x;
mint(ll x = 0) : x(x % MOD) {}
mint &operator+=(const mint... | #include <algorithm>
#include <iostream>
#include <map>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; ++i)
#define rep1(i, n) for (int i = 1; i <= n; ++i)
using namespace std;
typedef long long ll;
const ll MOD = 1e+9 + 7;
struct mint {
ll x;
mint(ll x = 0) : x(x % MOD) {}
mint &operator+=(const mint... | replace | 181 | 182 | 181 | 188 | TLE | |
p02728 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <cstring>
#include <deque>
#include <fstream>
#include <functional>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include ... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <cstring>
#include <deque>
#include <fstream>
#include <functional>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include ... | replace | 182 | 183 | 182 | 183 | 0 | |
p02728 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pr;
typedef vector<ll> vc;
#define rep(i, a, b) for (ll i = a; i <= b; i++)
#define repr(i, a, b) for (ll i = a; i >= b; i--)
#define reps(i, v) for (ll i = 0; i < v.size(); i++)
vc g[200005];
ll n, d[200005] = {0}, par[200005] = {... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pr;
typedef vector<ll> vc;
#define rep(i, a, b) for (ll i = a; i <= b; i++)
#define repr(i, a, b) for (ll i = a; i >= b; i--)
#define reps(i, v) for (ll i = 0; i < v.size(); i++)
vc g[200005];
ll n, d[200005] = {0}, par[200005] = {... | replace | 108 | 127 | 108 | 114 | TLE | |
p02728 | C++ | Runtime Error | #include <bits/stdc++.h>
#define FOR(i, a, b) for (int i = a; i < b; ++i)
#define FR(a, b) for (int i = a; i >= b; --i)
#define _upgrade \
cin.tie(0); \
ios_base::sync_with_stdio(0)
#defin... | #include <bits/stdc++.h>
#define FOR(i, a, b) for (int i = a; i < b; ++i)
#define FR(a, b) for (int i = a; i >= b; --i)
#define _upgrade \
cin.tie(0); \
ios_base::sync_with_stdio(0)
#defin... | replace | 72 | 73 | 72 | 74 | 0 | |
p02728 | C++ | Runtime Error | // #include <bits/stdc++.h>
// #define _ ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
// #define int long long
// #define sz(i) (int)(i.size())
// #define F first
// #define S second
// #define L long double
// #define P pair<int, int>
// const int inf = 0x3f3f3f3f3f3f3f3LL;
// const int mod = (int)1e... | // #include <bits/stdc++.h>
// #define _ ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
// #define int long long
// #define sz(i) (int)(i.size())
// #define F first
// #define S second
// #define L long double
// #define P pair<int, int>
// const int inf = 0x3f3f3f3f3f3f3f3LL;
// const int mod = (int)1e... | replace | 82 | 83 | 82 | 83 | 0 | |
p02728 | C++ | Runtime Error | #include <iostream>
#include <vector>
long long pow(long long n, long long p, long long k) { // n^k(mod p)
if (!k)
return 1;
long long a = pow(n, p, k >> 1);
a = a * a % p;
if (k & 1)
a = a * n % p;
return a;
}
void euclid(long long &a, long long &b, long long p) { // a>=b A*b+B*(a-a/b*b)=1
if (a =... | #include <iostream>
#include <vector>
long long pow(long long n, long long p, long long k) { // n^k(mod p)
if (!k)
return 1;
long long a = pow(n, p, k >> 1);
a = a * a % p;
if (k & 1)
a = a * n % p;
return a;
}
void euclid(long long &a, long long &b, long long p) { // a>=b A*b+B*(a-a/b*b)=1
if (a =... | replace | 131 | 132 | 131 | 132 | 0 | |
p02728 | C++ | Time Limit Exceeded | /*
This code has been written by MinakoKojima, feel free to ask me question.
Blog: http://www.shuizilong.com/house Template Date: 2015.10.12 Note: ...
*/
#pragma comment(linker, "/STACK:36777216")
// #pragma GCC optimize ("O2")
#define LOCAL
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cl... | /*
This code has been written by MinakoKojima, feel free to ask me question.
Blog: http://www.shuizilong.com/house Template Date: 2015.10.12 Note: ...
*/
#pragma comment(linker, "/STACK:36777216")
// #pragma GCC optimize ("O2")
#define LOCAL
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cl... | delete | 822 | 828 | 822 | 822 | TLE | |
p02728 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ull unsigned long long
#define endl '\n'
#define ll long long
const int N = 1e5 + 5;
ll mod = 1e9 + 7;
vector<ll> node[N];
ll sz[N], dp[N], fact[N], ans[N], n;
ll inv(ll u, ll p) {
if (p == 0)
return 1;
if (p == 1)
return u;
ll t = inv(u, p / 2) % mod... | #include <bits/stdc++.h>
using namespace std;
#define ull unsigned long long
#define endl '\n'
#define ll long long
const int N = 2e5 + 5;
ll mod = 1e9 + 7;
vector<ll> node[N];
ll sz[N], dp[N], fact[N], ans[N], n;
ll inv(ll u, ll p) {
if (p == 0)
return 1;
if (p == 1)
return u;
ll t = inv(u, p / 2) % mod... | replace | 6 | 7 | 6 | 7 | 0 | |
p02728 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double ld;
#define lp(var, start, end) for (ll var = start; var < end; ++var)
#define rlp(var, start, end) for (ll var = start; var >= end; var--)
#define pb push_back
#define mp make_pair
#define pf push_front
#define ff first
#defin... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double ld;
#define lp(var, start, end) for (ll var = start; var < end; ++var)
#define rlp(var, start, end) for (ll var = start; var >= end; var--)
#define pb push_back
#define mp make_pair
#define pf push_front
#define ff first
#defin... | replace | 21 | 22 | 21 | 22 | 0 | |
p02728 | C++ | Runtime Error | #include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <utility>
#include <vector>
#define fir first
#define sec second
#define sz(s) (s).size()
#define pb push_back
#define get(n) scanf("%d", &n);
#define gets(s) ... | #include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <utility>
#include <vector>
#define fir first
#define sec second
#define sz(s) (s).size()
#define pb push_back
#define get(n) scanf("%d", &n);
#define gets(s) ... | replace | 259 | 260 | 259 | 260 | 0 | |
p02728 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <numeric>
#include <queue>
#include <regex>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <type_traits>
#include <un... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <numeric>
#include <queue>
#include <regex>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <type_traits>
#include <un... | replace | 566 | 567 | 566 | 567 | -11 | |
p02728 | C++ | Runtime Error | #pragma GCC optimize("O3")
#pragma GCC target("avx")
// #include<bits/stdc++.h>
#include <cstdio>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep1(i, n) for (int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x... | #pragma GCC optimize("O3")
#pragma GCC target("avx")
// #include<bits/stdc++.h>
#include <cstdio>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep1(i, n) for (int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x... | replace | 103 | 104 | 103 | 104 | 0 | |
p02728 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
// エイリアス
using ll = long signed long;
using ull = long unsigned long;
using ld = long double;
using P = pair<int, int>;
using llP = pair<ll, ll>;
using DoP = pair<double, double>;
// 汎用マクロ
#define ALL(a) (a).begin(), (a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#def... | #include <bits/stdc++.h>
using namespace std;
// エイリアス
using ll = long signed long;
using ull = long unsigned long;
using ld = long double;
using P = pair<int, int>;
using llP = pair<ll, ll>;
using DoP = pair<double, double>;
// 汎用マクロ
#define ALL(a) (a).begin(), (a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#def... | insert | 149 | 149 | 149 | 160 | TLE | |
p02728 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define MOD 1000000007
// #define MOD 998244353
class mint {
public:
int i;
mint() : i(0) {}
template <class T> mint(T x) {
i = int(x % MOD);
if (i < 0)
i += MOD;
}
mint operator+(mint x) { return i + x.i; }
mint operator-(mint x) { return i - x.i; }
mint opera... | #include <bits/stdc++.h>
#define MOD 1000000007
// #define MOD 998244353
class mint {
public:
int i;
mint() : i(0) {}
template <class T> mint(T x) {
i = int(x % MOD);
if (i < 0)
i += MOD;
}
mint operator+(mint x) { return i + x.i; }
mint operator-(mint x) { return i - x.i; }
mint opera... | replace | 73 | 88 | 73 | 90 | TLE | |
p02728 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define rep(i, x, y) for (ll i = (x); i < (y); i++)
#define rrep(i, x, y) for (ll i = (ll)(y)-1; i >= (x); i--)
#define all(x) (x).begin(), (x).end()
#ifdef LOCAL
#define dump(x) cerr << #x << " = " << (x) << endl
#define debug(x) ... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, x, y) for (ll i = (x); i < (y); i++)
#define rrep(i, x, y) for (ll i = (ll)(y)-1; i >= (x); i--)
#define all(x) (x).begin(), (x).end()
#ifdef LOCAL
#define dump(x) cerr << #x << " = " << (x) << endl
#define debug(x) ... | replace | 165 | 166 | 165 | 172 | TLE | |
p02728 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int N = 100000 + 5, mod = 1e9 + 7;
int fpow(int base, int v) {
int tot = 1;
for (; v; v >>= 1, base = 1LL * base * base % mod)
if (v & 1)
tot = 1LL * tot * base % mod;
return tot;
}
vector<int> G[N];
int n, dp[N], sz[N], fac[N], ifac[N], ans[N];
vo... | #include <bits/stdc++.h>
using namespace std;
const int N = 200000 + 5, mod = 1e9 + 7;
int fpow(int base, int v) {
int tot = 1;
for (; v; v >>= 1, base = 1LL * base * base % mod)
if (v & 1)
tot = 1LL * tot * base % mod;
return tot;
}
vector<int> G[N];
int n, dp[N], sz[N], fac[N], ifac[N], ans[N];
vo... | replace | 3 | 4 | 3 | 4 | 0 | |
p02728 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, a, ...) \
for (int i = (a) * (strlen(#__VA_ARGS__) != 0); \
i < (int)(strlen(#__VA_ARGS__) ? __VA_ARGS__ : (a)); ++i)
#define per(i, a, ...) ... | #include <bits/stdc++.h>
#define rep(i, a, ...) \
for (int i = (a) * (strlen(#__VA_ARGS__) != 0); \
i < (int)(strlen(#__VA_ARGS__) ? __VA_ARGS__ : (a)); ++i)
#define per(i, a, ...) ... | insert | 204 | 204 | 204 | 218 | TLE | |
p02728 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>... | #include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>... | replace | 103 | 104 | 103 | 104 | 0 | |
p02728 | C++ | Runtime Error | // Optimise
#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 MULTI_TEST
#ifdef LOCAL
#include "/home/shahraaz/bin/debug.h"
#else
#define db(...)
#define pc(...)
#endif
#define f first
#define s second
#de... | // Optimise
#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 MULTI_TEST
#ifdef LOCAL
#include "/home/shahraaz/bin/debug.h"
#else
#define db(...)
#define pc(...)
#endif
#define f first
#define s second
#de... | replace | 30 | 31 | 30 | 31 | 0 | |
p02728 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#include <cmath>
#include <iostream>
#include <vector>
#define ll long long int
#define mp make_pair
#define pb push_back
#define vi vector<int>
using namespace std;
vector<vector<int>> edge(200007);
vector<pair<ll, int>> dp(200007, mp(-1, 0));
vector<ll> ans(200007);
vector<int> euler(400007);... | #include <bits/stdc++.h>
#include <cmath>
#include <iostream>
#include <vector>
#define ll long long int
#define mp make_pair
#define pb push_back
#define vi vector<int>
using namespace std;
vector<vector<int>> edge(200007);
vector<pair<ll, int>> dp(200007, mp(-1, 0));
vector<ll> ans(200007);
vector<int> euler(400007);... | replace | 102 | 104 | 102 | 111 | TLE | |
p02728 | C++ | Runtime Error | #include <bits/stdc++.h>
int main() {
using namespace std;
constexpr unsigned long MOD = 1000000007;
const auto &modinv = [](unsigned long a,
unsigned long b = 1) -> unsigned long {
unsigned long r{b % MOD}, n{MOD - 2};
while (n) {
if (n & 1)
(r *= a) %= MOD;
... | #include <bits/stdc++.h>
int main() {
using namespace std;
constexpr unsigned long MOD = 1000000007;
const auto &modinv = [](unsigned long a,
unsigned long b = 1) -> unsigned long {
unsigned long r{b % MOD}, n{MOD - 2};
while (n) {
if (n & 1)
(r *= a) %= MOD;
... | replace | 33 | 34 | 33 | 34 | 0 | |
p02728 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using VI = vector<int>;
using VL = vector<ll>;
using VVI = vector<vector<int>>;
using VVL = vector<vector<ll>>;
using PII = std::pair<int, int>;
using PLL = std::pair<ll, ll>;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repr(i, n) fo... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using VI = vector<int>;
using VL = vector<ll>;
using VVI = vector<vector<int>>;
using VVL = vector<vector<ll>>;
using PII = std::pair<int, int>;
using PLL = std::pair<ll, ll>;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repr(i, n) fo... | replace | 124 | 125 | 124 | 125 | 0 | |
p02728 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define REP(i, m, n) for (int i = (m); i < (int)(n); i++)
#define RREP(i, m, n) for (int i = (int)(n - 1); i >= m; i--)
#define rep(i, n) REP(i, 0, n)
#define rrep(i, n) RREP(i, 0, n)
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define fi... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, m, n) for (int i = (m); i < (int)(n); i++)
#define RREP(i, m, n) for (int i = (int)(n - 1); i >= m; i--)
#define rep(i, n) REP(i, 0, n)
#define rrep(i, n) RREP(i, 0, n)
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define fi... | replace | 141 | 142 | 141 | 142 | 0 | |
p02728 | C++ | Runtime Error | // agrawal117
// chahatagrawal117
#include <bits/stdc++.h>
#define endl '\n'
#define mod 1000000007
typedef long long int ll;
using namespace std;
#define MAX 100005
vector<ll> v[MAX];
ll in[MAX];
ll out[MAX];
ll dp[MAX];
ll n;
void dfs(int node, int par) {
dp[node] = 1;
in[node] = 1LL;
for (auto i : v[node]) {
... | // agrawal117
// chahatagrawal117
#include <bits/stdc++.h>
#define endl '\n'
#define mod 1000000007
typedef long long int ll;
using namespace std;
#define MAX 300005
vector<ll> v[MAX];
ll in[MAX];
ll out[MAX];
ll dp[MAX];
ll n;
void dfs(int node, int par) {
dp[node] = 1;
in[node] = 1LL;
for (auto i : v[node]) {
... | replace | 7 | 8 | 7 | 8 | 0 | |
p02728 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define lld long long int
#define ld long double
#define mod 1000000007
#define all(v) v.begin(), v.end()
#define rep(i, a, b) for (lld i = a; i <= b; i++)
#define repr(i, a, b) for (lld i = a; i >= b; i--)
#define ar array
#define pb push_back
#define mp make_pair
#define ios ... | #include <bits/stdc++.h>
#define lld long long int
#define ld long double
#define mod 1000000007
#define all(v) v.begin(), v.end()
#define rep(i, a, b) for (lld i = a; i <= b; i++)
#define repr(i, a, b) for (lld i = a; i >= b; i--)
#define ar array
#define pb push_back
#define mp make_pair
#define ios ... | replace | 69 | 75 | 69 | 78 | TLE | |
p02728 | C++ | Runtime Error | // #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#include <iostream>
using namespace std;
#define ll long long
#define ld long double
#define P pair<ll, ll>
#define FOR(i, n, m) for (ll i = n; i < (ll)m; i++)
#define FORr(i, m, n) for (ll i = n; i >= (ll)m; i--)
#define FORm(i, m) for (auto i = m.begin(); i != m.end... | // #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#include <iostream>
using namespace std;
#define ll long long
#define ld long double
#define P pair<ll, ll>
#define FOR(i, n, m) for (ll i = n; i < (ll)m; i++)
#define FORr(i, m, n) for (ll i = n; i >= (ll)m; i--)
#define FORm(i, m) for (auto i = m.begin(); i != m.end... | replace | 155 | 159 | 155 | 157 | 0 | |
p02728 | C++ | Runtime Error | #include <iostream>
#include <vector>
const int maxn = 1e5 + 10;
const int mod = 1e9 + 7;
typedef long long ll;
using namespace std;
int n;
ll quick(ll a, ll b, ll m) {
ll ans = 1;
while (b > 0) {
if (b & 1)
ans = ans * a % mod;
a = a * a % mod;
b >>= 1;
}
return ans;
}
ll jiecheng[maxn];
void... | #include <iostream>
#include <vector>
const int maxn = 2e5 + 10;
const int mod = 1e9 + 7;
typedef long long ll;
using namespace std;
int n;
ll quick(ll a, ll b, ll m) {
ll ans = 1;
while (b > 0) {
if (b & 1)
ans = ans * a % mod;
a = a * a % mod;
b >>= 1;
}
return ans;
}
ll jiecheng[maxn];
void... | replace | 2 | 3 | 2 | 3 | 0 | |
p02728 | C++ | Time Limit Exceeded | #include <queue>
#include <stack>
#include <stdio.h>
#include <vector>
#define mod 1000000007
using namespace std;
typedef long long ll;
ll rev(ll a) {
ll now = mod - 2, ans = 1;
while (now) {
if (now & 1)
ans *= a;
now >>= 1, ans %= mod, a *= a, a %= mod;
}
return ans;
}
int main(void) {
ll i... | #include <queue>
#include <stack>
#include <stdio.h>
#include <vector>
#define mod 1000000007
using namespace std;
typedef long long ll;
ll rev(ll a) {
ll now = mod - 2, ans = 1;
while (now) {
if (now & 1)
ans *= a;
now >>= 1, ans %= mod, a *= a, a %= mod;
}
return ans;
}
int main(void) {
ll i... | replace | 66 | 82 | 66 | 79 | TLE | |
p02728 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
// #include <boost/multiprecision/cpp_int.hpp>
// namespace mp = boost::multiprecision;
// #include "atcoder/all"
using namespace std;
const double PI = 3.14159265358979323846;
typedef long long ll;
const double EPS = 1e-9;
#define rep(i, n) for (int i = 0; i < (n); ++i)
typedef pair<ll, ll> ... | #include <bits/stdc++.h>
// #include <boost/multiprecision/cpp_int.hpp>
// namespace mp = boost::multiprecision;
// #include "atcoder/all"
using namespace std;
const double PI = 3.14159265358979323846;
typedef long long ll;
const double EPS = 1e-9;
#define rep(i, n) for (int i = 0; i < (n); ++i)
typedef pair<ll, ll> ... | replace | 184 | 220 | 184 | 267 | TLE |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.