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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p03201 | C++ | Runtime Error | // #define NDEBUG
#include <cstddef>
#include <cstdint>
#include <vector>
using i8 = ::std::int_least8_t;
using i32 = ::std::int_least32_t;
using i64 = ::std::int_least64_t;
using u8 = ::std::uint_least8_t;
using u32 = ::std::uint_least32_t;
using u64 = ::std::uint_least64_t;
using isize = ::std::ptrdiff_t;
using usiz... | // #define NDEBUG
#include <cstddef>
#include <cstdint>
#include <vector>
using i8 = ::std::int_least8_t;
using i32 = ::std::int_least32_t;
using i64 = ::std::int_least64_t;
using u8 = ::std::uint_least8_t;
using u32 = ::std::uint_least32_t;
using u64 = ::std::uint_least64_t;
using isize = ::std::ptrdiff_t;
using usiz... | replace | 99 | 100 | 99 | 100 | TLE | |
p03201 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
std::map<int, int> mp;
int n, a[200005];
void init() {
scanf("%d", &n);
for (int i = 1; i <= n; ++i) {
scanf("%d", a + i);
mp[a[i]] ? (++mp[a[i]]) : mp[a[i]] = 1;
}
std::map<int, int>::iterator it = mp.end();
--it;
int ans... | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
std::map<int, int> mp;
int n, a[200005];
void init() {
scanf("%d", &n);
for (int i = 1; i <= n; ++i) {
scanf("%d", a + i);
mp[a[i]] ? (++mp[a[i]]) : mp[a[i]] = 1;
}
std::map<int, int>::iterator it = mp.end();
--it;
int ans... | replace | 25 | 26 | 25 | 26 | TLE | |
p03201 | C++ | Time Limit Exceeded | #include "bits/stdc++.h"
#define in std::cin
#define out std::cout
#define rep(i, N) for (LL i = 0; i < N; ++i)
typedef long long int LL;
int main() {
LL N;
in >> N;
std::vector<LL> A(N);
rep(i, N) in >> A[i];
std::map<LL, LL> cnt;
rep(i, N)++ cnt[A[i]];
LL ans = 0;
for (LL b = 31; b >= 0; --b) {
... | #include "bits/stdc++.h"
#define in std::cin
#define out std::cout
#define rep(i, N) for (LL i = 0; i < N; ++i)
typedef long long int LL;
int main() {
LL N;
in >> N;
std::vector<LL> A(N);
rep(i, N) in >> A[i];
std::map<LL, LL> cnt;
rep(i, N)++ cnt[A[i]];
LL ans = 0;
for (LL b = 31; b >= 0; --b) {
... | replace | 20 | 21 | 20 | 21 | TLE | |
p03201 | C++ | Time Limit Exceeded | #include <cstdio>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <cstring>
#include <deque>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include <list>
#include <utility>
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cl... | #include <cstdio>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <cstring>
#include <deque>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include <list>
#include <utility>
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cl... | replace | 46 | 49 | 46 | 51 | TLE | |
p03201 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <ctime>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef vector<int> VI;
typedef p... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <ctime>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef vector<int> VI;
typedef p... | replace | 40 | 41 | 40 | 42 | TLE | |
p03201 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string.h>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
using ll = long long;
using ld = long double;
u... | #include <algorithm>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string.h>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
using ll = long long;
using ld = long double;
u... | replace | 96 | 101 | 96 | 103 | TLE | |
p03201 | C++ | Time Limit Exceeded | /*
confirm 0LL and 1LL
confirm cornercases such as 0
confirm times of cin < 10^6
*/
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<ll, ll>;
using Pld = pair<ld, ld>;
using Vec = vector<ll>;
using VecP = vector<P>;
using VecB = vector<bool>;
using VecC = vector... | /*
confirm 0LL and 1LL
confirm cornercases such as 0
confirm times of cin < 10^6
*/
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<ll, ll>;
using Pld = pair<ld, ld>;
using Vec = vector<ll>;
using VecP = vector<P>;
using VecB = vector<bool>;
using VecC = vector... | insert | 92 | 92 | 92 | 97 | TLE | |
p03201 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define brep(i, n) for (int i = n - 1; i >= 0; i--)
#define rep1(i, n) for (int i = 1; i < n; i++)
#define cY cout << "Yes" << endl
#define cN cout << "No" << endl
#define ll long long
ll pow2(ll p, ll n) {
long long num = 1;... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define brep(i, n) for (int i = n - 1; i >= 0; i--)
#define rep1(i, n) for (int i = 1; i < n; i++)
#define cY cout << "Yes" << endl
#define cN cout << "No" << endl
#define ll long long
ll pow2(ll p, ll n) {
long long num = 1;... | insert | 35 | 35 | 35 | 38 | TLE | |
p03201 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
long long t, n, a[200000 + 10], ans;
multiset<long long> st;
int main() {
cin >> n;
for (int i = 0; i < n; i++) {
cin >> a[i];
st.insert(a[i]);
}
for (int i = 0; i < n; i++) {
t = 1;
for (int j = 1; j < 30 && t < 1e9 + 10; j++) {
t *= 2;
... | #include <bits/stdc++.h>
using namespace std;
long long t, n, a[200000 + 10], ans;
multiset<long long> st;
int main() {
cin >> n;
for (int i = 0; i < n; i++) {
cin >> a[i];
st.insert(a[i]);
}
sort(a, a + n);
for (int i = n - 1; i >= 0; i--) {
if (st.find(a[i]) != st.end()) {
t = 1;
st.... | replace | 10 | 19 | 10 | 22 | 0 | |
p03201 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define FOR(i, n) for (long long i = 0; i < (n); ++i)
#define pb push_back
#define int long long
#define debug(x) std::cout << #x << ": " << x << '\n';
typedef long long ll;
const int N = 2e5 + 10;
int a[N];
signed main() {
std::ios::sync_with_stdio(false);
int n;
std::cin >> n;
std::m... | #include <bits/stdc++.h>
#define FOR(i, n) for (long long i = 0; i < (n); ++i)
#define pb push_back
#define int long long
#define debug(x) std::cout << #x << ": " << x << '\n';
typedef long long ll;
const int N = 2e5 + 10;
int a[N];
signed main() {
std::ios::sync_with_stdio(false);
int n;
std::cin >> n;
std::u... | replace | 13 | 14 | 13 | 14 | TLE | |
p03201 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, a, n) for (int i = a; i < n; i++)
#define repr(i, a, b) for (int i = a; i >= b; i--)
#define int long long
#define all(a) a.begin(), a.end()
#define chmax(x, y) x = max(x, y)
#define chmin(x, y) x = min(x, y)
using namespace std;
typedef pair<int, int> P;
const int mod = 10000000... | #include <bits/stdc++.h>
#define rep(i, a, n) for (int i = a; i < n; i++)
#define repr(i, a, b) for (int i = a; i >= b; i--)
#define int long long
#define all(a) a.begin(), a.end()
#define chmax(x, y) x = max(x, y)
#define chmin(x, y) x = min(x, y)
using namespace std;
typedef pair<int, int> P;
const int mod = 10000000... | insert | 29 | 29 | 29 | 31 | TLE | |
p03201 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int n, x, count = 0;
long int t;
vector<int> num;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> x;
num.push_back(x);
}
sort(num.begin(), num.end());
while (num.size() > 1) {
t = 1;
x = num[num.size() - 1];
// cout << x <... | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int n, x, count = 0;
long int t;
vector<int> num;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> x;
num.push_back(x);
}
sort(num.begin(), num.end());
while (num.size() > 1) {
t = 1;
x = num[num.size() - 1];
// cout << x <... | insert | 21 | 21 | 21 | 23 | 0 | |
p03201 | C++ | Time Limit Exceeded | #include <algorithm>
#include <climits>
#include <cmath>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
#define ll long long int
#define re... | #include <algorithm>
#include <climits>
#include <cmath>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
#define ll long long int
#define re... | insert | 41 | 41 | 41 | 43 | TLE | |
p03201 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <map>
#include <utility>
#include <vector>
using namespace std;
int a[200010];
int main() {
int n;
scanf("%d", &n);
map<int, int> m;
for (int i = 0; i < n; i++) {
scanf("%d", &a[i]);
m[a[i]]++;
}
vector<pair<int, int>> b(m.begin(), m.end());
int ans ... | #include <algorithm>
#include <cstdio>
#include <map>
#include <utility>
#include <vector>
using namespace std;
int a[200010];
int main() {
int n;
scanf("%d", &n);
map<int, int> m;
for (int i = 0; i < n; i++) {
scanf("%d", &a[i]);
m[a[i]]++;
}
vector<pair<int, int>> b(m.begin(), m.end());
int ans ... | replace | 17 | 18 | 17 | 18 | 0 | |
p03201 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
const int MAX = 200010;
int main() {
int N;
int A[MAX];
map<long long, long long> table;
int... | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
const int MAX = 200010;
int main() {
int N;
int A[MAX];
map<long long, long long> table;
int... | replace | 33 | 37 | 33 | 39 | TLE | |
p03201 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> Pint;
typedef pair<ll, int> P;
// typedef tuple<int,int,int> T;
ll INFL = 1000000000000000010; // 10^18 = 2^60
int INF = 2147483600; // 10^9
ll MOD = 1000000007;
ll r(ll x) {
ll xdash = x;
int cnt = 0;
while (xdash... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> Pint;
typedef pair<ll, int> P;
// typedef tuple<int,int,int> T;
ll INFL = 1000000000000000010; // 10^18 = 2^60
int INF = 2147483600; // 10^9
ll MOD = 1000000007;
ll r(ll x) {
ll xdash = x;
int cnt = 0;
while (xdash... | replace | 50 | 51 | 50 | 51 | 0 | |
p03201 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define F(i, a, b) for (int i = a; i <= (b); ++i)
#define F2(i, a, b) for (int i = a; i < (b); ++i)
#define dF(i, a, b) for (int i = a; i >= (b); --i)
#define dF2(i, a, b) for (int i = a; i > (b); --i)
#define eF(i, u) for (int i = h[u]; i; i = nxt[i])
#define SZ(x) ((int)(... | #include <bits/stdc++.h>
using namespace std;
#define F(i, a, b) for (int i = a; i <= (b); ++i)
#define F2(i, a, b) for (int i = a; i < (b); ++i)
#define dF(i, a, b) for (int i = a; i >= (b); --i)
#define dF2(i, a, b) for (int i = a; i > (b); --i)
#define eF(i, u) for (int i = h[u]; i; i = nxt[i])
#define SZ(x) ((int)(... | replace | 22 | 33 | 22 | 35 | TLE | |
p03201 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bits/stdc++.h>
#include <deque>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdio.h>
#include <string.h>
#include <vector>
// #include "D:\C++\test_lib_projects\testlib.h"
using namespace std;
#define ll long long
#define pii pair<int, in... | #include <algorithm>
#include <bits/stdc++.h>
#include <deque>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdio.h>
#include <string.h>
#include <vector>
// #include "D:\C++\test_lib_projects\testlib.h"
using namespace std;
#define ll long long
#define pii pair<int, in... | replace | 64 | 65 | 64 | 67 | TLE | |
p03201 | C++ | Runtime Error | #include <algorithm>
#include <bitset> //UWAGA - w czasie kompilacji musi byc znany rozmiar wektora - nie mozna go zmienic
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <fstream>
#include <iomanip> //do setprecision
#include <ios... | #include <algorithm>
#include <bitset> //UWAGA - w czasie kompilacji musi byc znany rozmiar wektora - nie mozna go zmienic
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <fstream>
#include <iomanip> //do setprecision
#include <ios... | replace | 40 | 41 | 40 | 41 | 0 | |
p03201 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
typedef ... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
typedef ... | replace | 104 | 105 | 104 | 106 | TLE | |
p03201 | C++ | Runtime Error | /*************************************************
*************************************************
*************************************************
*** _________________ | | | /***
*** | | | | / ***
*** | | | | / ***
*** |... | /*************************************************
*************************************************
*************************************************
*** _________________ | | | /***
*** | | | | / ***
*** | | | | / ***
*** |... | replace | 185 | 186 | 185 | 186 | 0 | |
p03201 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep2(i, m, n) for (int i = int(m); i < int(n); i++)
#define rep(i, n) rep2(i, 0, n)
#define all(a) a.begin(), a.end()
using ll = long long;
using ld = long double;
using V = vector<int>;
using Vll = vector<ll>;
using Vld = vector<ld>;
using VV... | #include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep2(i, m, n) for (int i = int(m); i < int(n); i++)
#define rep(i, n) rep2(i, 0, n)
#define all(a) a.begin(), a.end()
using ll = long long;
using ld = long double;
using V = vector<int>;
using Vll = vector<ll>;
using Vld = vector<ld>;
using VV... | replace | 48 | 49 | 48 | 50 | TLE | |
p03201 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define f first
#define s second
#define all(a) (a).begin(), (a).end()
#define For(i, a, b) for (auto i = (a); i < (b); i++)
#define FOR(i, b) For(i, 0, b)
#define Rev(i, a, b) for (auto i = (a); i > (b); i--... | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define f first
#define s second
#define all(a) (a).begin(), (a).end()
#define For(i, a, b) for (auto i = (a); i < (b); i++)
#define FOR(i, b) For(i, 0, b)
#define Rev(i, a, b) for (auto i = (a); i > (b); i--... | replace | 537 | 538 | 537 | 538 | TLE | |
p03201 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
ll smallest2(ll a) {
ll rtn = 1;
while (rtn <= a)
rtn *= 2;
return rtn;
}
int main() {
int n;
cin >> n;
map<ll, int> cnt;
for (int i = 0; i < n; i++) {
ll a;
cin >> a;
cnt[a]++;
}
i... | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
ll smallest2(ll a) {
ll rtn = 1;
while (rtn <= a)
rtn *= 2;
return rtn;
}
int main() {
int n;
cin >> n;
map<ll, int> cnt;
for (int i = 0; i < n; i++) {
ll a;
cin >> a;
cnt[a]++;
}
i... | replace | 26 | 27 | 26 | 27 | TLE | |
p03201 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int n;
pair<int, int> a[100001];
int ans;
int main() {
cin >> n;
for (int i = 0; i < n; i++)
cin >> a[i].first;
sort(a, a + n);
for (int i = n; i--;) { // 好聪明啊
if (a[i].second)
continue;
int t = 2 << __lg(a[i].first); // fantastic
int k = upper... | #include <bits/stdc++.h>
using namespace std;
int n;
pair<int, int> a[200001];
int ans;
int main() {
cin >> n;
for (int i = 0; i < n; i++)
cin >> a[i].first;
sort(a, a + n);
for (int i = n; i--;) { // 好聪明啊
if (a[i].second)
continue;
int t = 2 << __lg(a[i].first); // fantastic
int k = upper... | replace | 3 | 4 | 3 | 4 | 0 | |
p03202 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, a) for (int i = 0; (i) < (int)(a); (i)++)
#define reps(i, a, b) for (int i = (int)(a); (i) < (int)(b); (i)++)
#define rrep(i, a) for (int i = (int)a - 1; (i) >= 0; (i)--)
#define rreps(i, a, b) for (int i = (int)(a)-1; (i) >= (int)(b);... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, a) for (int i = 0; (i) < (int)(a); (i)++)
#define reps(i, a, b) for (int i = (int)(a); (i) < (int)(b); (i)++)
#define rrep(i, a) for (int i = (int)a - 1; (i) >= 0; (i)--)
#define rreps(i, a, b) for (int i = (int)(a)-1; (i) >= (int)(b);... | insert | 80 | 80 | 80 | 81 | -11 | |
p03202 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> P;
typedef pair<int, P> P1;
#define fr first
#define... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> P;
typedef pair<int, P> P1;
#define fr first
#define... | replace | 79 | 80 | 79 | 89 | TLE | |
p03202 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <unorde... | #include <algorithm>
#include <bitset>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <unorde... | replace | 52 | 53 | 52 | 63 | TLE | |
p03202 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define fr(i, n) for (int i = 0; i < n; i++)
#define frab(i, a, b) for (int i = a; i < b; i++)
#define pb push_back
#define mp make_pair
#define fi first
#define se second
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
const ll INF = 1e9 + ... | #include <bits/stdc++.h>
#define fr(i, n) for (int i = 0; i < n; i++)
#define frab(i, a, b) for (int i = a; i < b; i++)
#define pb push_back
#define mp make_pair
#define fi first
#define se second
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
const ll INF = 1e9 + ... | replace | 52 | 56 | 52 | 58 | TLE | |
p03202 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0, max_i = (n); i < max_i; i++)
#define REPI(i, a, b) for (int i = (a), max_i = (b); i < max_i; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define RALL(obj) (obj).rbegin(), (obj).rend()
#define fi first
#define se second
#define int long long
using namespace... | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0, max_i = (n); i < max_i; i++)
#define REPI(i, a, b) for (int i = (a), max_i = (b); i < max_i; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define RALL(obj) (obj).rbegin(), (obj).rend()
#define fi first
#define se second
#define int long long
using namespace... | insert | 75 | 75 | 75 | 84 | TLE | |
p03202 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define fo(i, a, b) for (i = a; i <= b; i++)
#define fd(i, a, b) for (i = a; i >= b; i--)
#define max(a, b) (a > b ? a : b)
#define min(a, b) (a < b ? a : b)
using namespace std;
typedef long long ll;
inline int read() {
int n = 0, f = 1;
char c;
for (c = getchar(); c != '-' && (c < '0' |... | #include <bits/stdc++.h>
#define fo(i, a, b) for (i = a; i <= b; i++)
#define fd(i, a, b) for (i = a; i >= b; i--)
#define max(a, b) (a > b ? a : b)
#define min(a, b) (a < b ? a : b)
using namespace std;
typedef long long ll;
inline int read() {
int n = 0, f = 1;
char c;
for (c = getchar(); c != '-' && (c < '0' |... | insert | 47 | 47 | 47 | 49 | TLE | |
p03202 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define N 200010
using namespace std;
typedef int ll;
ll p[N];
map<ll, ll> mp;
ll a;
bool check(ll k) {
mp.clear();
for (ll i = 2; i <= a; i++)
if (p[i] > p[i - 1])
continue;
else {
while (mp.size()) {
ll u = mp.rbegin()->first;
if (u > p[i])
m... | #include <bits/stdc++.h>
#define N 200010
using namespace std;
typedef int ll;
ll p[N];
map<ll, ll> mp;
ll a;
bool check(ll k) {
mp.clear();
for (ll i = 2; i <= a; i++)
if (p[i] > p[i - 1])
continue;
else {
if (k == 1)
return false;
while (mp.size()) {
ll u = mp.rbegin()->... | insert | 13 | 13 | 13 | 15 | TLE | |
p03202 | C++ | Time Limit Exceeded | #pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("fast-math")
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using ull = unsigned long long;
// #define int long long
#define F first
#define S second
#define all(v) v.begin(), v.end()
#de... | #pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("fast-math")
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using ull = unsigned long long;
// #define int long long
#define F first
#define S second
#define all(v) v.begin(), v.end()
#de... | replace | 33 | 34 | 33 | 34 | TLE | |
p03202 | C++ | Time Limit Exceeded | #include <iostream>
#include <map>
#include <vector>
#define rep(i, n) for (i = 0; i < n; i++)
using namespace std;
int n;
int a[200001];
bool check(int x) {
map<int, int>
str; //(桁の位置(0-indexed), 桁の値(0~x-1)). (pos, 0)以外を記録.
int i;
for (i = 1; i < n; i++) {
if (a[i] > a[i - 1])
continue;
wh... | #include <iostream>
#include <map>
#include <vector>
#define rep(i, n) for (i = 0; i < n; i++)
using namespace std;
int n;
int a[200001];
bool check(int x) {
map<int, int>
str; //(桁の位置(0-indexed), 桁の値(0~x-1)). (pos, 0)以外を記録.
int i;
for (i = 1; i < n; i++) {
if (a[i] > a[i - 1])
continue;
wh... | replace | 42 | 43 | 42 | 54 | TLE | |
p03202 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define int long long int
using namespace std;
template <typename T, typename U> using P = pair<T, U>;
template <typename T> using V = vector<T>;
template <typename T> bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <typename T> bool chmin(T &a,... | #include <bits/stdc++.h>
#define int long long int
using namespace std;
template <typename T, typename U> using P = pair<T, U>;
template <typename T> using V = vector<T>;
template <typename T> bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <typename T> bool chmin(T &a,... | replace | 104 | 105 | 104 | 117 | TLE | |
p03202 | C++ | Time Limit Exceeded | #pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
// need
#include <algorithm>
#include <iostream>
// data structure
#include <bitset>
#include <complex>
#include <map>
#include <queue>
#include <set>
#include <stack>... | #pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
// need
#include <algorithm>
#include <iostream>
// data structure
#include <bitset>
#include <complex>
#include <map>
#include <queue>
#include <set>
#include <stack>... | insert | 196 | 196 | 196 | 198 | TLE | |
p03202 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using PP = pair<long, long>;
const int INF = 1e9;
template <class T> T Next() {
T buf;
cin >> buf;
return buf;
}
int n;
int a[200000];
bool ok(int kind) {
map<int, int> mp;
for (int i = 1; i < n; ++i) {
if (a[i - 1] < a[i])
continue;
int idx = a[i... | #include <bits/stdc++.h>
using namespace std;
using PP = pair<long, long>;
const int INF = 1e9;
template <class T> T Next() {
T buf;
cin >> buf;
return buf;
}
int n;
int a[200000];
bool ok(int kind) {
map<int, int> mp;
for (int i = 1; i < n; ++i) {
if (a[i - 1] < a[i])
continue;
if (kind == 1)... | insert | 18 | 18 | 18 | 20 | TLE | |
p03202 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
const int N = 200005;
int n, a[N];
bool check(int mid) {
map<int, int> b;
for (int i = 2; i <= n; ++i) {
while (!b.empty() && b.rbegin()->first >= a[i])
b.erase(--b.end());
if (a[i] <= a[i - 1]) {
++b[a[i] - 1];
for (int j = a[i] - 1; b.count... | #include <bits/stdc++.h>
using namespace std;
const int N = 200005;
int n, a[N];
bool check(int mid) {
map<int, int> b;
for (int i = 2; i <= n; ++i) {
while (!b.empty() && b.rbegin()->first >= a[i])
b.erase(--b.end());
if (a[i] <= a[i - 1]) {
++b[a[i] - 1];
for (int j = a[i] - 1; b.count... | replace | 28 | 29 | 28 | 34 | TLE | |
p03202 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<ll, ll>;
using Pld = pair<ld, ld>;
using Vec = vector<ll>;
using VecP = vector<P>;
using VecB = vector<bool>;
using VecC = vector<char>;
using VecD = vector<ld>;
using VecS = vector<string>;
template <class T> usi... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<ll, ll>;
using Pld = pair<ld, ld>;
using Vec = vector<ll>;
using VecP = vector<P>;
using VecB = vector<bool>;
using VecC = vector<char>;
using VecD = vector<ld>;
using VecS = vector<string>;
template <class T> usi... | insert | 150 | 150 | 150 | 152 | TLE | |
p03202 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<ll, ll>;
using Pld = pair<ld, ld>;
using Vec = vector<ll>;
using VecP = vector<P>;
using VecB = vector<bool>;
using VecC = vector<char>;
using VecD = vector<ld>;
using VecS = vector<string>;
template <class T> usi... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<ll, ll>;
using Pld = pair<ld, ld>;
using Vec = vector<ll>;
using VecP = vector<P>;
using VecB = vector<bool>;
using VecC = vector<char>;
using VecD = vector<ld>;
using VecS = vector<string>;
template <class T> usi... | delete | 72 | 74 | 72 | 72 | -11 | |
p03202 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;
#define fi first
#define se second
#define repl(i, a, b) for (ll i = (ll)(a); i < (ll)(b); i++)
#define rep(i, n) repl(i, 0, n)
#define all(x) (x).begin(), (x).end()
#define dbg(x) cout << #x "=... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;
#define fi first
#define se second
#define repl(i, a, b) for (ll i = (ll)(a); i < (ll)(b); i++)
#define rep(i, n) repl(i, 0, n)
#define all(x) (x).begin(), (x).end()
#define dbg(x) cout << #x "=... | insert | 42 | 42 | 42 | 49 | TLE | |
p03202 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using i64 = long long;
#define rep(i, s, e) for (i64 i = (s); (i) < (e); (i)++)
#define all(x) x.begin(), x.end()
#define STRINGIFY(n) #n
#define TOSTRING(n) STRINGIFY(n)
#define PREFIX "#" TOSTRING(__LINE__) "| "
#define debug(x) ... | #include <bits/stdc++.h>
using namespace std;
using i64 = long long;
#define rep(i, s, e) for (i64 i = (s); (i) < (e); (i)++)
#define all(x) x.begin(), x.end()
#define STRINGIFY(n) #n
#define TOSTRING(n) STRINGIFY(n)
#define PREFIX "#" TOSTRING(__LINE__) "| "
#define debug(x) ... | replace | 88 | 89 | 88 | 89 | 0 | |
p03202 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for (int i = 0; i < (n); i++)
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
constexpr int dx[] = {1, 0, -1, 0, 1, 1, -1, -1};
constexpr int... | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for (int i = 0; i < (n); i++)
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
constexpr int dx[] = {1, 0, -1, 0, 1, 1, -1, -1};
constexpr int... | insert | 29 | 29 | 29 | 37 | TLE | |
p03202 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define fi first
#define se second
#define pb push_back
#define SZ(x) ((int)x.size())
#define L(i, u) for (register int i = head[u]; i; i = nxt[i])
#define rep(i, a, b) for (register int i = (a); i <= (b); i++)
#define per(i, a, b) for (register int i = (a); i >= (b); i--)
using namespace std;
... | #include <bits/stdc++.h>
#define fi first
#define se second
#define pb push_back
#define SZ(x) ((int)x.size())
#define L(i, u) for (register int i = head[u]; i; i = nxt[i])
#define rep(i, a, b) for (register int i = (a); i <= (b); i++)
#define per(i, a, b) for (register int i = (a); i >= (b); i--)
using namespace std;
... | insert | 70 | 70 | 70 | 71 | TLE | |
p03202 | C++ | Runtime Error | #include <bits/stdc++.h>
#define fi first
#define se second
#define pii pair<int, int>
#define pdi pair<db, int>
#define mp make_pair
#define pb push_back
#define enter putchar('\n')
#define space putchar(' ')
#define eps 1e-8
#define mo 974711
#define MAXN 200005
// #define ivorysi
using namespace std;
typedef long lo... | #include <bits/stdc++.h>
#define fi first
#define se second
#define pii pair<int, int>
#define pdi pair<db, int>
#define mp make_pair
#define pb push_back
#define enter putchar('\n')
#define space putchar(' ')
#define eps 1e-8
#define mo 974711
#define MAXN 200005
// #define ivorysi
using namespace std;
typedef long lo... | insert | 67 | 67 | 67 | 69 | 0 | |
p03202 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cassert>
#include <complex>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
typedef long long... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <complex>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
typedef long long... | insert | 346 | 346 | 346 | 348 | TLE | |
p03202 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define fio ios_base::sync_with_stdio(false)
#define pdl cout << "*" << endl
#define MOD 1000000007
#define INF 1000000000
#define INFLL 1000000000000000000ll
#define mp make_pair
#define pb push_back
#define ff first... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define fio ios_base::sync_with_stdio(false)
#define pdl cout << "*" << endl
#define MOD 1000000007
#define INF 1000000000
#define INFLL 1000000000000000000ll
#define mp make_pair
#define pb push_back
#define ff first... | insert | 44 | 44 | 44 | 46 | TLE | |
p03202 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
int N;
cin >> N;
vector<ll> A(N);
for (auto &e : A) {
cin >> e;
}
int l = 0, r = N;
while (r - l > 1) {
int mid = (l + r) / 2;
map<int, int> mp;
mp[A[0]] = 0;
bool ok = true;
for (int i = 1; i < N;... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
int N;
cin >> N;
vector<ll> A(N);
for (auto &e : A) {
cin >> e;
}
int l = 0, r = N;
while (r - l > 1) {
int mid = (l + r) / 2;
map<int, int> mp;
mp[A[0]] = 0;
bool ok = true;
for (int i = 1; i < N;... | replace | 55 | 56 | 55 | 56 | 0 | |
p03202 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll n, a[200005];
map<ll, ll> p;
bool check(ll x) {
p.clear();
for (int i = 1; i < n; i++) {
ll b = a[i - 1], c = a[i];
if (b >= c) {
p.erase(p.upper_bound(c), p.end());
while (1) {
if (c == 0)
return false;
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll n, a[200005];
map<ll, ll> p;
bool check(ll x) {
p.clear();
for (int i = 1; i < n; i++) {
ll b = a[i - 1], c = a[i];
if (b >= c) {
if (x == 1)
return false;
p.erase(p.upper_bound(c), p.end());
while (1) {
... | insert | 10 | 10 | 10 | 12 | TLE | |
p03202 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define brep(i, n) for (int i = n - 1; i >= 0; i--)
#define rep1(i, n) for (int i = 1; i < n; i++)
#define brep1(i, n) for (int i = n - 1; i >= 1; i--)
vector<int> a;
int n;
bool check(int x) { // x文字以内で要件を満たせるかどうか
map<int, ... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define brep(i, n) for (int i = n - 1; i >= 0; i--)
#define rep1(i, n) for (int i = 1; i < n; i++)
#define brep1(i, n) for (int i = n - 1; i >= 1; i--)
vector<int> a;
int n;
bool check(int x) { // x文字以内で要件を満たせるかどうか
map<int, ... | replace | 15 | 16 | 15 | 18 | TLE | |
p03202 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <queue>
#include <vector>
#define LL long long
#define LD long double
using namespace std;
const int NN = 200000 + 117;
const int MM = 200000 + 117;
int read() {
int fl = 1, x;
char c;
for (c... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <queue>
#include <vector>
#define LL long long
#define LD long double
using namespace std;
const int NN = 200000 + 117;
const int MM = 200000 + 117;
int read() {
int fl = 1, x;
char c;
for (c... | replace | 69 | 70 | 69 | 70 | TLE | |
p03202 | C++ | Time Limit Exceeded | // problem:agc029_c
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mk make_pair
#define lob lower_bound
#define upb upper_bound
#define fst first
#define scd second
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
inline int read(... | // problem:agc029_c
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mk make_pair
#define lob lower_bound
#define upb upper_bound
#define fst first
#define scd second
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
inline int read(... | insert | 50 | 50 | 50 | 52 | TLE | |
p03202 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 1;
int n, a[N], l, r, t;
vector<int> p, q;
bool C(int k) {
p.clear(), q.clear();
for (int i = 2; i <= n; i++)
if (a[i] <= a[i - 1]) {
if (k == 1)
return false;
while (!p.empty() && p[p.size() - 1] > a[i])
p.pop_back(),... | #include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 1;
int n, a[N], l, r, t;
vector<int> p, q;
bool C(int k) {
p.clear(), q.clear();
for (int i = 2; i <= n; i++)
if (a[i] <= a[i - 1]) {
if (k == 1)
return false;
while (!p.empty() && p[p.size() - 1] > a[i])
p.pop_back(),... | replace | 19 | 20 | 19 | 20 | 0 | |
p03202 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define ll long long
#define INF 1000000005
#define MOD 1000000007
#define EPS 1e-10
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define rrep(i, n) for (int i = (int)(n)-1; i >= 0; --i)
#define srep(i, s, t) for (int i = (int)(s); i < (int)(t); ++i)
#define each(a, b) for (auto &(a) : ... | #include <bits/stdc++.h>
#define ll long long
#define INF 1000000005
#define MOD 1000000007
#define EPS 1e-10
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define rrep(i, n) for (int i = (int)(n)-1; i >= 0; --i)
#define srep(i, s, t) for (int i = (int)(s); i < (int)(t); ++i)
#define each(a, b) for (auto &(a) : ... | replace | 97 | 98 | 97 | 98 | TLE | |
p03202 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#ifdef DEMETRIO
#define deb(...) fprintf(stderr, __VA_ARGS__)
#define deb1(x) cerr << #x << " = " << x << endl
#else
#define deb(...) 0
#define deb1(x) 0
#endif
#define pb push_back
#define mp make_pair
#define fst first
#define snd second
#define fore(i, a, b) for (int i = a, ThxDem = b; i < T... | #include <bits/stdc++.h>
#ifdef DEMETRIO
#define deb(...) fprintf(stderr, __VA_ARGS__)
#define deb1(x) cerr << #x << " = " << x << endl
#else
#define deb(...) 0
#define deb1(x) 0
#endif
#define pb push_back
#define mp make_pair
#define fst first
#define snd second
#define fore(i, a, b) for (int i = a, ThxDem = b; i < T... | insert | 27 | 27 | 27 | 29 | TLE | |
p03202 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll INF = 1e18;
const int BIG = 1e9 + 555;
const int maxN = 2e5 + 55;
int n;
ll a[maxN];
bool chk(ll x) {
map<ll, ll> mp;
for (int i = 2; i <= n; i++) {
if (a[i - 1] >= a[i]) {
while (!mp.empty()) {
ll mx = mp.rbegin()->fi... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll INF = 1e18;
const int BIG = 1e9 + 555;
const int maxN = 2e5 + 55;
int n;
ll a[maxN];
bool chk(ll x) {
map<ll, ll> mp;
for (int i = 2; i <= n; i++) {
if (a[i - 1] >= a[i]) {
if (x == 1) {
return false;
}
whi... | insert | 15 | 15 | 15 | 18 | TLE | |
p03202 | C++ | Time Limit Exceeded | // user:halahen
#include <bits/stdc++.h>
using namespace std;
const int maxn = 200010;
int i, j, k;
int n, a[maxn];
int l, r, mid, ans;
int read() {
int tot = 0, fh = 1;
char c = getchar();
while ((c < '0') || (c > '9')) {
if (c == '-')
fh = -1;
c = getchar();
}
while ((c >= '0') && (c <= '9')) ... | // user:halahen
#include <bits/stdc++.h>
using namespace std;
const int maxn = 200010;
int i, j, k;
int n, a[maxn];
int l, r, mid, ans;
int read() {
int tot = 0, fh = 1;
char c = getchar();
while ((c < '0') || (c > '9')) {
if (c == '-')
fh = -1;
c = getchar();
}
while ((c >= '0') && (c <= '9')) ... | insert | 27 | 27 | 27 | 29 | TLE | |
p03202 | C++ | Time Limit Exceeded | #include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <algorithm>
#include <functional>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <vector>
#define LOG(FMT...) fprintf(stderr, FMT)
using namespace std;
ty... | #include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <algorithm>
#include <functional>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <vector>
#define LOG(FMT...) fprintf(stderr, FMT)
using namespace std;
ty... | replace | 53 | 54 | 53 | 61 | TLE | |
p03202 | C++ | Time Limit Exceeded | //{{{
#include <bits/stdc++.h>
using namespace std;
#define repX(a, b, c, x, ...) x
#define repN(a) repX a
#define rep(...) repN((__VA_ARGS__, rep3, rep2, loop))(__VA_ARGS__)
#define rrep(...) repN((__VA_ARGS__, rrep3, rrep2))(__VA_ARGS__)
#define loop(n) rep2(i_, n)
#define rep2(i, n) rep3(i, 0, n)
#define rep3(i, beg... | //{{{
#include <bits/stdc++.h>
using namespace std;
#define repX(a, b, c, x, ...) x
#define repN(a) repX a
#define rep(...) repN((__VA_ARGS__, rep3, rep2, loop))(__VA_ARGS__)
#define rrep(...) repN((__VA_ARGS__, rrep3, rrep2))(__VA_ARGS__)
#define loop(n) rep2(i_, n)
#define rep2(i, n) rep3(i, 0, n)
#define rep3(i, beg... | replace | 33 | 37 | 33 | 40 | TLE | |
p03202 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> pii;
typedef long long ll;
typedef vector<int> vi;
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define fi first
#define se second
#define rep(i, n) rep2(i, 0, n)
#define rep2(i, m, n) for (int i = m; i < (n); i++)
#define ALL(c... | #include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> pii;
typedef long long ll;
typedef vector<int> vi;
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define fi first
#define se second
#define rep(i, n) rep2(i, 0, n)
#define rep2(i, m, n) for (int i = m; i < (n); i++)
#define ALL(c... | replace | 17 | 18 | 17 | 18 | 0 | |
p03202 | C++ | Time Limit Exceeded | #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 | 92 | 93 | 92 | 93 | TLE | |
p03202 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
#define mp make_pair
#define PI pair<int, int>
#define poly vector<ll>
#define For(i, l, r) for (int i = (int)(l); i <= (int)(r); i++)
#define Rep(i, r, l) for (int i = (int)(r); i >= (int)(l); i-... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
#define mp make_pair
#define PI pair<int, int>
#define poly vector<ll>
#define For(i, l, r) for (int i = (int)(l); i <= (int)(r); i++)
#define Rep(i, r, l) for (int i = (int)(r); i >= (int)(l); i-... | replace | 66 | 67 | 66 | 67 | TLE | |
p03202 | C++ | Time Limit Exceeded | #include <cstdio>
#include <iostream>
#include <map>
using namespace std;
const int N = 2e5 + 10;
int n, a[N], l = 1, r = N - 10, mid, ans;
map<int, int> p;
inline bool judge(int x) {
p.clear();
for (register int i = 2; i <= n; i++) {
if (a[i] > a[i - 1])
continue;
++p[a[i]];
map<int, int>::iterat... | #include <cstdio>
#include <iostream>
#include <map>
using namespace std;
const int N = 2e5 + 10;
int n, a[N], l = 1, r = N - 10, mid, ans;
map<int, int> p;
inline bool judge(int x) {
p.clear();
for (register int i = 2; i <= n; i++) {
if (a[i] > a[i - 1])
continue;
if (x == 1)
return 0;
++p[... | insert | 12 | 12 | 12 | 14 | TLE | |
p03202 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
map<int, int> mp;
int a[200100], n;
bool chk(int x) {
mp.clear();
for (int i = 1; i <= n; ++i)
if (a[i] <= a[i - 1]) {
for (auto it = mp.upper_bound(a[i]); it != mp.end();
it = mp.upper_bound(a[i]))
mp.erase(it);
++mp[a[i]];
for... | #include <bits/stdc++.h>
using namespace std;
map<int, int> mp;
int a[200100], n;
bool chk(int x) {
mp.clear();
for (int i = 1; i <= n; ++i)
if (a[i] <= a[i - 1]) {
for (auto it = mp.upper_bound(a[i]); it != mp.end();
it = mp.upper_bound(a[i]))
mp.erase(it);
++mp[a[i]];
if ... | insert | 13 | 13 | 13 | 15 | TLE | |
p03202 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include ... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include ... | replace | 98 | 99 | 98 | 99 | TLE | |
p03202 | C++ | Time Limit Exceeded | #pragma GCC optimize(2)
#include <bits/stdc++.h>
#define INF 1000000007
using namespace std;
int n, a[200010], cnt;
pair<int, int> q[200010];
inline bool check(int x) {
if (x == 1) {
bool flag = false;
for (int i = 1; i < n; i++)
if (a[i] >= a[i + 1]) {
flag = true;
break;
}
... | #pragma GCC optimize(2)
#include <bits/stdc++.h>
#define INF 1000000007
using namespace std;
int n, a[200010], cnt;
pair<int, int> q[200010];
inline bool check(int x) {
if (x == 1) {
bool flag = false;
for (int i = 1; i < n; i++)
if (a[i] >= a[i + 1]) {
flag = true;
break;
}
... | insert | 18 | 18 | 18 | 19 | TLE | |
p03202 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, a) for (int i = 0; (i) < (int)(a); (i)++)
#define reps(i, a, b) for (int i = (int)(a); (i) < (int)(b); (i)++)
#define rrep(i, a) for (int i = (int)a - 1; (i) >= 0; (i)--)
#define rreps(i, a, b) for (int i = (int)(a)-1; (i) >= (int)(b);... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, a) for (int i = 0; (i) < (int)(a); (i)++)
#define reps(i, a, b) for (int i = (int)(a); (i) < (int)(b); (i)++)
#define rrep(i, a) for (int i = (int)a - 1; (i) >= 0; (i)--)
#define rreps(i, a, b) for (int i = (int)(a)-1; (i) >= (int)(b);... | replace | 79 | 80 | 79 | 80 | 0 | |
p03202 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < int(n); i++)
#define rrep(i, n) for (int i = int(n) - 1; i >= 0; i--)
#define reps(i, n) for (int i = 1; i <= int(n); i++)
#define rreps(i, n) for (int i = int(n); i >= 1; i--)
#define repc(i, n) for (int i = 0; i <= int(n); i++)
#define rrepc(i, n) for (i... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < int(n); i++)
#define rrep(i, n) for (int i = int(n) - 1; i >= 0; i--)
#define reps(i, n) for (int i = 1; i <= int(n); i++)
#define rreps(i, n) for (int i = int(n); i >= 1; i--)
#define repc(i, n) for (int i = 0; i <= int(n); i++)
#define rrepc(i, n) for (i... | insert | 109 | 109 | 109 | 111 | TLE | |
p03202 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
inline int read() {
int x = 0, f = 1;
char ch;
do {
ch = getchar();
if (ch == '-')
f = -1;
} while (ch < '0' || ch > '9');
do {
x = x * 10 + ch - '0';
ch = getchar();
} while (ch >= '0' &... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
inline int read() {
int x = 0, f = 1;
char ch;
do {
ch = getchar();
if (ch == '-')
f = -1;
} while (ch < '0' || ch > '9');
do {
x = x * 10 + ch - '0';
ch = getchar();
} while (ch >= '0' &... | insert | 43 | 43 | 43 | 45 | 0 | |
p03202 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int n, l, r, mid, ans;
int a[100005];
struct node {
int u, l, r;
};
int check(int x) {
stack<node> f;
f.push((node){1, 1, a[1]});
for (int i = 2; i <= n; i++) {
if (a[i] > a[i - 1])
f.push((node){1, a[i - 1] + 1, a[i]});
else {
int p;
whil... | #include <bits/stdc++.h>
using namespace std;
int n, l, r, mid, ans;
int a[200005];
struct node {
int u, l, r;
};
int check(int x) {
stack<node> f;
f.push((node){1, 1, a[1]});
for (int i = 2; i <= n; i++) {
if (a[i] > a[i - 1])
f.push((node){1, a[i - 1] + 1, a[i]});
else {
int p;
whil... | replace | 3 | 4 | 3 | 4 | 0 | |
p03202 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int check(int m, vector<int> &A) {
map<int, int> S;
for (int i = 1; i < A.size(); i++) {
if (A[i - 1] < A[i])
continue;
if (m == 0)
return 0;
int a = A[i];
S.erase(S.upper_bound(a), S.end());
while (S[a] == m - 1) {
a--;
if (... | #include <bits/stdc++.h>
using namespace std;
int check(int m, vector<int> &A) {
map<int, int> S;
for (int i = 1; i < A.size(); i++) {
if (A[i - 1] < A[i])
continue;
if (m == 1)
return 0;
int a = A[i];
S.erase(S.upper_bound(a), S.end());
while (S[a] == m - 1) {
a--;
if (... | replace | 8 | 9 | 8 | 9 | TLE | |
p03202 | C++ | Time Limit Exceeded | #include <iostream>
#include <unordered_map>
#include <vector>
using namespace std;
#define fs first
#define sc second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define ALL(A) A.begin(), A.end()
#define RALL(A) A.rbegin(), A.rend()
typedef long long LL;
typedef pair<LL, LL> P;
const LL mod = 100... | #include <iostream>
#include <unordered_map>
#include <vector>
using namespace std;
#define fs first
#define sc second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define ALL(A) A.begin(), A.end()
#define RALL(A) A.rbegin(), A.rend()
typedef long long LL;
typedef pair<LL, LL> P;
const LL mod = 100... | replace | 85 | 86 | 85 | 86 | TLE | |
p03202 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long i64;
const int inf = (int)1.05e9;
int construct_tree(int v, vector<int> &as, vector<v... | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long i64;
const int inf = (int)1.05e9;
int construct_tree(int v, vector<int> &as, vector<v... | insert | 30 | 30 | 30 | 32 | TLE | |
p03202 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int MAX = 1000000;
const int MOD = 1000000007;
signed main() {
int n;
cin >> n;
int a[n];
for (int i = 0; i < n; i++)
cin >> a[i];
int ok = n, ng = 0, mid, j;
map<int, int> mp;
while (abs(ok - ng) > 1) {
mp.clear();
mi... | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int MAX = 1000000;
const int MOD = 1000000007;
signed main() {
int n;
cin >> n;
int a[n];
for (int i = 0; i < n; i++)
cin >> a[i];
for (int i = 1; i < n; i++) {
if (a[i - 1] >= a[i])
break;
if (i == n - 1) {
co... | replace | 13 | 14 | 13 | 26 | TLE | |
p03202 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
#define db double
#define mp make_pair
#define pb push_back
#define pii pair<int, int>
#define A first
#define B second
#define lowbit(p) (p & (-p))
using namespace std;
void read(int &x) {
x = 0;
char c = getchar();
int p = 1;
for (; c < 48; c = getchar())
if (... | #include <bits/stdc++.h>
#define ll long long
#define db double
#define mp make_pair
#define pb push_back
#define pii pair<int, int>
#define A first
#define B second
#define lowbit(p) (p & (-p))
using namespace std;
void read(int &x) {
x = 0;
char c = getchar();
int p = 1;
for (; c < 48; c = getchar())
if (... | replace | 69 | 70 | 69 | 70 | 0 | |
p03202 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <fstream>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int a[200005];
int b[200005];... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <fstream>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int a[200005];
int b[200005];... | replace | 44 | 45 | 44 | 53 | TLE | |
p03202 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define finish(x) return cout << x << endl, 0
#define ll long long
int n;
vector<int> a;
bool check(int x) {
map<int, int> cnt;
for (int i = 1; i < n; i++) {
if (a[i] > a[i - 1])
continue;
while (cnt.size() && a[i] < cnt.rbegin()->first) {
cnt.eras... | #include <bits/stdc++.h>
using namespace std;
#define finish(x) return cout << x << endl, 0
#define ll long long
int n;
vector<int> a;
bool check(int x) {
map<int, int> cnt;
for (int i = 1; i < n; i++) {
if (a[i] > a[i - 1])
continue;
while (cnt.size() && a[i] < cnt.rbegin()->first) {
cnt.eras... | replace | 35 | 36 | 35 | 42 | TLE | |
p03202 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define dbg(...) \
do { \
cerr << __LINE__ <<... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define dbg(...) \
do { \
cerr << __LINE__ <<... | replace | 68 | 69 | 68 | 79 | TLE | |
p03202 | C++ | Time Limit Exceeded | /*
`-:://:::-
`//:-------:/:`
.+:--.......--:+`
`+:--..`````..--//`
.o:--..`` ``..--:o`
... | /*
`-:://:::-
`//:-------:/:`
.+:--.......--:+`
`+:--..`````..--//`
.o:--..`` ``..--:o`
... | replace | 331 | 332 | 331 | 344 | TLE | |
p03202 | C++ | Runtime Error | #include <bits/stdc++.h>
#define fi first
#define se second
using namespace std;
const int N = 2e5 + 5;
int n, a[N];
bool solve(int m) {
stack<pair<int, int>> s;
for (int i = 1; i <= n; i++) {
if (s.empty())
s.push({a[i], 1});
else {
if (a[i] > s.top().fi)
s.push({a[i], 1});
else {... | #include <bits/stdc++.h>
#define fi first
#define se second
using namespace std;
const int N = 2e5 + 5;
int n, a[N];
bool solve(int m) {
stack<pair<int, int>> s;
for (int i = 1; i <= n; i++) {
if (s.empty())
s.push({a[i], 1});
else {
if (a[i] > s.top().fi)
s.push({a[i], 1});
else {... | replace | 29 | 30 | 29 | 30 | 0 | |
p03202 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <queue>
#include <stack>
#include <string>
#include <vector>
using ll = long long;
using namespace std;
using P = pair<long, long>;
#define fi first
#define se second
#define MAX 1000000000l
#define INF 1000000001l
long pow(long n, long k) {
if (k <= 0 || n == 1)... | #include <algorithm>
#include <iostream>
#include <queue>
#include <stack>
#include <string>
#include <vector>
using ll = long long;
using namespace std;
using P = pair<long, long>;
#define fi first
#define se second
#define MAX 1000000000l
#define INF 1000000001l
long pow(long n, long k) {
if (k <= 0 || n == 1)... | replace | 71 | 72 | 71 | 72 | TLE | |
p03202 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (rint i = 1; i <= (n); i++)
#define re0(i, n) for (rint i = 0; i < (int)n; i++)
#define travel(i, u) for (rint i = head[u]; i; i = e[i].nxt)
#define rint register int
using namespace std;
typedef long long lo;
template <typename tp> inline void read(tp &x) {
x = 0;
c... | #include <bits/stdc++.h>
#define rep(i, n) for (rint i = 1; i <= (n); i++)
#define re0(i, n) for (rint i = 0; i < (int)n; i++)
#define travel(i, u) for (rint i = head[u]; i; i = e[i].nxt)
#define rint register int
using namespace std;
typedef long long lo;
template <typename tp> inline void read(tp &x) {
x = 0;
c... | replace | 87 | 88 | 87 | 94 | 0 | |
p03202 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
vector<int> A;
int check(int x) {
if (x == 1)
return is_sorted(A.begin(), A.end());
map<int, int> m;
for (int i = 1; i < A.size(); i++) {
if (A[i - 1] < A[i])
continue;
m.erase(m.upper_bound(A[i]));
int k = A[i];
m[k]++;
while (k > 0 && m... | #include <bits/stdc++.h>
using namespace std;
vector<int> A;
int check(int x) {
if (x == 1)
return is_sorted(A.begin(), A.end());
map<int, int> m;
for (int i = 1; i < A.size(); i++) {
if (A[i - 1] < A[i])
continue;
if (m.upper_bound(A[i]) != m.end())
m.erase(m.upper_bound(A[i]));
int k... | replace | 10 | 11 | 10 | 12 | TLE | |
p03202 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
void debug_out() { cerr << endl; }
template <class T> ostream &prnt(ostream &out, T v) {
out << v.size() << '\n';
for (auto e : v)
out << e << ' ';
return out;
}
template <class T> ostream &operator<<(ostream &out, vector<T> v) {
return prnt(out, v);
}
template ... | #include <bits/stdc++.h>
using namespace std;
void debug_out() { cerr << endl; }
template <class T> ostream &prnt(ostream &out, T v) {
out << v.size() << '\n';
for (auto e : v)
out << e << ' ';
return out;
}
template <class T> ostream &operator<<(ostream &out, vector<T> v) {
return prnt(out, v);
}
template ... | insert | 52 | 52 | 52 | 54 | TLE | |
p03202 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
#define MOD 1000000007
#... | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
#define MOD 1000000007
#... | insert | 108 | 108 | 108 | 110 | TLE | |
p03202 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
const int N = 200200;
int n;
int a[N];
map<int, int> st;
bool test(int cnt) {
st.clear();
for (int i = 1; i <= n; i++) {
if (a[i] <= a[i - 1]) {
int j = a[i];
while (++st[j] == cnt) {
j--;
if (j == 0) {
ret... | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
const int N = 200200;
int n;
int a[N];
map<int, int> st;
bool test(int cnt) {
st.clear();
for (int i = 1; i <= n; i++) {
if (a[i] <= a[i - 1]) {
int j = a[i];
while (++st[j] == cnt) {
j--;
if (j == 0 || cnt == 1) {
... | replace | 14 | 15 | 14 | 15 | TLE | |
p03202 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <vector>
using namespace std;
#define LL long long
#define fgx cerr << "--------------" << endl;
#define dgx cerr << "==============" << endl;
inline int read() {
int x = 0, f = 1;
char c = getchar();
for (; !isdigit(c); c =... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <vector>
using namespace std;
#define LL long long
#define fgx cerr << "--------------" << endl;
#define dgx cerr << "==============" << endl;
inline int read() {
int x = 0, f = 1;
char c = getchar();
for (; !isdigit(c); c =... | replace | 22 | 23 | 22 | 23 | 0 | |
p03202 | C++ | Time Limit Exceeded | // ΔAGC029C
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>
using namespace std;
typedef long long LL;
typedef double DB;
const int N = 222222;
int n, a... | // ΔAGC029C
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>
using namespace std;
typedef long long LL;
typedef double DB;
const int N = 222222;
int n, a... | replace | 56 | 57 | 56 | 63 | TLE | |
p03202 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define inf 0x3f3f3f3f
#define mod 1000000007
#define pb push_back
#define mp make_pair
#define ll long long
#define vi vector<int>
#define pii pair<int, int>
#define eprintf(...) fprintf(stderr, __VA_ARGS__)
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define fore... | #include <bits/stdc++.h>
using namespace std;
#define inf 0x3f3f3f3f
#define mod 1000000007
#define pb push_back
#define mp make_pair
#define ll long long
#define vi vector<int>
#define pii pair<int, int>
#define eprintf(...) fprintf(stderr, __VA_ARGS__)
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define fore... | replace | 25 | 26 | 25 | 26 | 0 | |
p03202 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define REP(i, m, n) for (int i = (int)m; i <... | #include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define REP(i, m, n) for (int i = (int)m; i <... | replace | 48 | 49 | 48 | 49 | 0 | |
p03202 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using V = vector<int>;
using Vll = vector<ll>;
using Vld = vector<ld>;
using Vbo = vector<bool>;
using VV = vector<V>;
using VVll = vector<Vll>;
using VVld = vector<Vld>;
using VVbo = vector<Vbo>;
using VVV = vector<VV>;
using V... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using V = vector<int>;
using Vll = vector<ll>;
using Vld = vector<ld>;
using Vbo = vector<bool>;
using VV = vector<V>;
using VVll = vector<Vll>;
using VVld = vector<Vld>;
using VVbo = vector<Vbo>;
using VVV = vector<VV>;
using V... | replace | 105 | 106 | 105 | 106 | 0 | |
p03202 | C++ | Runtime Error | #include <bits/stdc++.h>
#define llong long long
#define pii pair<int, int>
#define mkpr make_pair
#define riterator reverse_iterator
using namespace std;
inline int read() {
int x = 0, f = 1;
char ch = getchar();
for (; !isdigit(ch); ch = getchar()) {
if (ch == '-')
f = -1;
}
for (; isdigit(ch); c... | #include <bits/stdc++.h>
#define llong long long
#define pii pair<int, int>
#define mkpr make_pair
#define riterator reverse_iterator
using namespace std;
inline int read() {
int x = 0, f = 1;
char ch = getchar();
for (; !isdigit(ch); ch = getchar()) {
if (ch == '-')
f = -1;
}
for (; isdigit(ch); c... | replace | 20 | 21 | 20 | 21 | 0 | |
p03202 | C++ | Time Limit Exceeded | // By Don4ick
// #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
typedef long long ll;
typedef long double ld;
typedef unsigned int ui;
#define forn(i, n) for (int i = 1; i <= n; i++)
#define pb push_back
#define all(x) x.begin(), x.end()
#define y1 qewr1234
const double PI = acos(-1.0);
const int DIR = 4;
const in... | // By Don4ick
// #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
typedef long long ll;
typedef long double ld;
typedef unsigned int ui;
#define forn(i, n) for (int i = 1; i <= n; i++)
#define pb push_back
#define all(x) x.begin(), x.end()
#define y1 qewr1234
const double PI = acos(-1.0);
const int DIR = 4;
const in... | replace | 73 | 74 | 73 | 81 | TLE | |
p03202 | C++ | Time Limit Exceeded | //{{{By oToToT
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <st... | //{{{By oToToT
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <st... | insert | 112 | 112 | 112 | 114 | TLE | |
p03202 | C++ | Time Limit Exceeded | #include <iostream>
#include <map>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define vec vector
#define INF 1000000007
void p(vec<int> a) {
rep(i, a.size()) cout << a[i] << endl;
return;
}
bool check(vec<int> a, int k) {
map<int, int> s;
s[a[0] - 1] = 1;
rep... | #include <iostream>
#include <map>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define vec vector
#define INF 1000000007
void p(vec<int> a) {
rep(i, a.size()) cout << a[i] << endl;
return;
}
bool check(vec<int> a, int k) {
map<int, int> s;
s[a[0] - 1] = 1;
rep... | insert | 22 | 22 | 22 | 24 | TLE | |
p03202 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define REP(i, m, n) for (int i = (m); i < (n); i++)
#define rep(i, n) REP(i, 0, n)
#define pb push_back
#define all(a) a.begin(), a.end()
#define rall(c) (c).rbegin(), (c).rend()
#define mp make_pair
#define endl '\n'
#define fi first
#define se secon... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define REP(i, m, n) for (int i = (m); i < (n); i++)
#define rep(i, n) REP(i, 0, n)
#define pb push_back
#define all(a) a.begin(), a.end()
#define rall(c) (c).rbegin(), (c).rend()
#define mp make_pair
#define endl '\n'
#define fi first
#define se secon... | insert | 35 | 35 | 35 | 39 | TLE | |
p03202 | C++ | Runtime Error | #include <bits/stdc++.h>
#define syosu(x) fixed << setprecision(x)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> P;
typedef pair<double, double> pdd;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<double> vd;
typedef vector<vd... | #include <bits/stdc++.h>
#define syosu(x) fixed << setprecision(x)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> P;
typedef pair<double, double> pdd;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<double> vd;
typedef vector<vd... | replace | 42 | 44 | 42 | 44 | 0 | |
p03202 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using Int = long long;
bool test(const vector<int> &A, int k) {
int last = 0;
map<int, int> m;
for (int a : A) {
if (a <= last) {
m[a] += 1;
m.erase(++m.find(a), m.end());
int b = a;
while (b > 0 && m[b] >= k) {
m[b] = 0;
m[... | #include <bits/stdc++.h>
using namespace std;
using Int = long long;
bool test(const vector<int> &A, int k) {
int last = 0;
if (k == 1) {
for (int a : A) {
if (a <= last)
return false;
last = a;
}
return true;
}
map<int, int> m;
for (int a : A) {
if (a <= last) {
m[a]... | insert | 5 | 5 | 5 | 13 | TLE | |
p03202 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define int long long
const double PI = 3.14159265358979323846;
typedef vector<int> vint;
typedef pair<int, int> pint;
const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
// cout << fixed << setprecision(20);
int N;
int A[220000]... | #include <bits/stdc++.h>
using namespace std;
#define int long long
const double PI = 3.14159265358979323846;
typedef vector<int> vint;
typedef pair<int, int> pint;
const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
// cout << fixed << setprecision(20);
int N;
int A[220000]... | replace | 19 | 20 | 19 | 26 | TLE | |
p03202 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define Fast_IO ios::sync_with_stdio(false);
#define DEBUG \
fprintf(stderr, "Running on Line %d in Function %s\n", __LINE__, __FUNCTION__)
/... | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define Fast_IO ios::sync_with_stdio(false);
#define DEBUG \
fprintf(stderr, "Running on Line %d in Function %s\n", __LINE__, __FUNCTION__)
/... | replace | 33 | 34 | 33 | 34 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.