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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p03182 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef struct line {
int lp, rp, value;
bool operator<(const struct line &n) const { return rp < n.rp; }
} LINE, *PLINE;
LINE arr[200000];
long long linetree[1 << 19], lazy[1 << 19];
long long query(int index, int lb, int rb, int lq, int rq) {
if (lb == lq && rb == r... | #include <bits/stdc++.h>
using namespace std;
typedef struct line {
int lp, rp, value;
bool operator<(const struct line &n) const { return rp < n.rp; }
} LINE, *PLINE;
LINE arr[200000];
long long linetree[1 << 19], lazy[1 << 19];
long long query(int index, int lb, int rb, int lq, int rq) {
if (lb == lq && rb == r... | replace | 60 | 61 | 60 | 61 | -11 | |
p03182 | C++ | Runtime Error | #include <bits/stdc++.h>
// using namespace std;
#pragma GCC target("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define rep(i, j, n) for (ll i = (ll)(j); i < (ll)(n); i++)
#define REP(i, j, n) for (ll i = (ll)(j); i... | #include <bits/stdc++.h>
// using namespace std;
#pragma GCC target("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define rep(i, j, n) for (ll i = (ll)(j); i < (ll)(n); i++)
#define REP(i, j, n) for (ll i = (ll)(j); i... | insert | 251 | 251 | 251 | 253 | 0 | |
p03182 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define TemplateVersion "3.7.1"
// Useful Marcos
//====================START=====================
// Compile use C++11 and above
#ifdef LOCAL
#define debug(args...) \
do { ... | #include <bits/stdc++.h>
using namespace std;
#define TemplateVersion "3.7.1"
// Useful Marcos
//====================START=====================
// Compile use C++11 and above
#ifdef LOCAL
#define debug(args...) \
do { ... | replace | 122 | 123 | 122 | 123 | 0 | |
p03182 | C++ | Runtime Error | #include <algorithm>
#include <chrono>
#include <iostream>
#include <random>
#define rep(i, x) for (int i = 0; i < x; i++)
using namespace std;
typedef long long ll;
ll MOD = (ll)1e9 + 7;
const int N = 1e5 + 5, inf = 1e9 + 5;
ll add(ll x, ll y) {
x += y;
if (x >= MOD)
return x - MOD;
return x;
}
ll sub(ll x, ... | #include <algorithm>
#include <chrono>
#include <iostream>
#include <random>
#define rep(i, x) for (int i = 0; i < x; i++)
using namespace std;
typedef long long ll;
ll MOD = (ll)1e9 + 7;
const ll N = 2e5 + 5, inf = 1e18 + 5;
ll add(ll x, ll y) {
x += y;
if (x >= MOD)
return x - MOD;
return x;
}
ll sub(ll x, ... | replace | 8 | 9 | 8 | 9 | 0 | |
p03182 | C++ | Runtime Error | // #pragma GCC optimize("Ofast")
// #pragma GCC target("avx")
// #pragma GCC optimize ("unroll-loops")
#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 fi first
#define se second
#define pb push_back
#define... | // #pragma GCC optimize("Ofast")
// #pragma GCC target("avx")
// #pragma GCC optimize ("unroll-loops")
#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 fi first
#define se second
#define pb push_back
#define... | replace | 46 | 47 | 46 | 47 | 0 | |
p03182 | 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 pb p... | #include <bits/stdc++.h>
#define _ \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define int long long
#define pb p... | replace | 62 | 64 | 62 | 64 | 0 | |
p03182 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int MAXN = (4);
struct Intervalle {
int maximum, ajout;
};
struct Event {
int moment, debut, fin, valeur;
bool operator<(const Event &autre) const { return moment < autre.moment; }
};
int taille;
Intervalle arbre[MAXN * 2];
void update(in... | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int MAXN = (1 << 18);
struct Intervalle {
int maximum, ajout;
};
struct Event {
int moment, debut, fin, valeur;
bool operator<(const Event &autre) const { return moment < autre.moment; }
};
int taille;
Intervalle arbre[MAXN * 2];
void upd... | replace | 3 | 4 | 3 | 4 | 0 | |
p03182 | C++ | Runtime Error | #include <bits/stdc++.h>
#define FI first
#define SE second
#define EPS 1e-9
#define ALL(a) a.begin(), a.end()
#define SZ(a) int((a).size())
#define MS(s, n) memset(s, n, sizeof(s))
#define FOR(i, a, b) for (int i = (a); i <= (b); i++)
#define FORE(i, a, b) for (int i = (a); i >= (b); i--)
#define FORALL(it, a) ... | #include <bits/stdc++.h>
#define FI first
#define SE second
#define EPS 1e-9
#define ALL(a) a.begin(), a.end()
#define SZ(a) int((a).size())
#define MS(s, n) memset(s, n, sizeof(s))
#define FOR(i, a, b) for (int i = (a); i <= (b); i++)
#define FORE(i, a, b) for (int i = (a); i >= (b); i--)
#define FORALL(it, a) ... | replace | 46 | 47 | 46 | 47 | 0 | |
p03182 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using lint = long long int;
using pint = pair<int, int>;
using plint = pair<lint, lint>;
struct fast_ios {
fast_ios() {
cin.tie(0);
ios::sync_with_stdio(false);
cout << fixed << setprecision(20);
};
} fast_ios_;
#define FOR(i, begin, end) ... | #include <bits/stdc++.h>
using namespace std;
using lint = long long int;
using pint = pair<int, int>;
using plint = pair<lint, lint>;
struct fast_ios {
fast_ios() {
cin.tie(0);
ios::sync_with_stdio(false);
cout << fixed << setprecision(20);
};
} fast_ios_;
#define FOR(i, begin, end) ... | replace | 189 | 190 | 189 | 190 | 0 | |
p03182 | C++ | Runtime Error | #include "bits/stdc++.h"
#define int long long
using namespace std;
const int TREE_SZ = 1 << 19;
vector<int> mx(TREE_SZ, -2e18);
vector<int> buf(TREE_SZ);
int upd(int v, int l, int r) {
mx[v] += buf[v];
if (l < r - 1) {
buf[2 * v + 1] += buf[v];
buf[2 * v + 2] += buf[v];
}
buf[v] = 0;
}
void add_seg... | #include "bits/stdc++.h"
#define int long long
using namespace std;
const int TREE_SZ = 1 << 19;
vector<int> mx(TREE_SZ, -2e18);
vector<int> buf(TREE_SZ);
void upd(int v, int l, int r) {
mx[v] += buf[v];
if (l < r - 1) {
buf[2 * v + 1] += buf[v];
buf[2 * v + 2] += buf[v];
}
buf[v] = 0;
}
void add_se... | replace | 9 | 10 | 9 | 10 | 0 | |
p03182 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define fi first
#define se second
#define pq priority_queue
#define mp make_pair
#define pii pair<int, int>
#define mod 998244353
int lowbit(int x) { return x & (-x); }
int n, m;
vector<pii> p[200010];
long long tree[400040];
long long tag[400040];
... | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define fi first
#define se second
#define pq priority_queue
#define mp make_pair
#define pii pair<int, int>
#define mod 998244353
int lowbit(int x) { return x & (-x); }
int n, m;
vector<pii> p[200010];
long long tree[800040];
long long tag[800040];
... | replace | 15 | 17 | 15 | 17 | 0 | |
p03182 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define X first
#define Y second
#define pb push_back
#define mp make_pair
#define all(a) a.begin(), a.end()
#define rep(i, st, n) for (int i = (st); i < (n); ++i)
#define repinv(i, st, n) for (int i = ((n)-1); i >= (st); --i)
#define MEM(a, b) memset(a, b, sizeof(a));
#... | #include <bits/stdc++.h>
using namespace std;
#define X first
#define Y second
#define pb push_back
#define mp make_pair
#define all(a) a.begin(), a.end()
#define rep(i, st, n) for (int i = (st); i < (n); ++i)
#define repinv(i, st, n) for (int i = ((n)-1); i >= (st); --i)
#define MEM(a, b) memset(a, b, sizeof(a));
#... | replace | 76 | 77 | 76 | 77 | 0 | |
p03182 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef long long LL;
typedef pair<int, int> PI;
typedef pair<LL, LL> PLL;
typedef unsigned long long ULL;
typedef pair<double, double> PD;
#define FOR(x, b, e) for (int x = b; x <= (e); x++)
#define FORD(x, b, e) for (int x... | #include <bits/stdc++.h>
using namespace std;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef long long LL;
typedef pair<int, int> PI;
typedef pair<LL, LL> PLL;
typedef unsigned long long ULL;
typedef pair<double, double> PD;
#define FOR(x, b, e) for (int x = b; x <= (e); x++)
#define FORD(x, b, e) for (int x... | replace | 24 | 26 | 24 | 26 | 0 | |
p03182 | C++ | Time Limit Exceeded | /*
数据不清空,爆零两行泪。
多测不读完,爆零两行泪。
边界不特判,爆零两行泪。
贪心不证明,爆零两行泪。
D P 顺序错,爆零两行泪。
大小少等号,爆零两行泪。
变量不统一,爆零两行泪。
越界不判断,爆零两行泪。
调试不注释,爆零两行泪。
溢出不 l l,爆零两行泪。
*/
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define mp make_pair
#define X first
#define Y second
const int inf = 0x3f3f3f3f3f3f3f3f;
c... | /*
数据不清空,爆零两行泪。
多测不读完,爆零两行泪。
边界不特判,爆零两行泪。
贪心不证明,爆零两行泪。
D P 顺序错,爆零两行泪。
大小少等号,爆零两行泪。
变量不统一,爆零两行泪。
越界不判断,爆零两行泪。
调试不注释,爆零两行泪。
溢出不 l l,爆零两行泪。
*/
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define mp make_pair
#define X first
#define Y second
const int inf = 0x3f3f3f3f3f3f3f3f;
c... | replace | 68 | 69 | 68 | 69 | TLE | |
p03183 | C++ | Memory Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> P;
typedef pair<ll, ll> l_l;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<P> vp;
typedef vector<l_l> vpl;
typedef vector<string> vs;
typedef pair<l_l, ll> lll;
#define pb push_back
#define... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> P;
typedef pair<ll, ll> l_l;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<P> vp;
typedef vector<l_l> vpl;
typedef vector<string> vs;
typedef pair<l_l, ll> lll;
#define pb push_back
#define... | replace | 39 | 40 | 39 | 40 | MLE | |
p03183 | C++ | Runtime Error | #include <bits/stdc++.h>
#define x first
#define y second
#define y1 Y1
#define y2 Y2
#define mp make_pair
#define pb push_back
using namespace std;
typedef long long LL;
typedef pair<int, int> pii;
template <typename T> inline int Chkmax(T &a, T b) {
return a < b ? a = b, 1 : 0;
}
template <typename T> inline in... | #include <bits/stdc++.h>
#define x first
#define y second
#define y1 Y1
#define y2 Y2
#define mp make_pair
#define pb push_back
using namespace std;
typedef long long LL;
typedef pair<int, int> pii;
template <typename T> inline int Chkmax(T &a, T b) {
return a < b ? a = b, 1 : 0;
}
template <typename T> inline in... | replace | 40 | 41 | 40 | 41 | 0 | |
p03183 | C++ | Runtime Error | /*
___mennat khoday ra azz o va jall ke taatash mojebe ghorbat ast o be shokr
andarash mazide nemat.
___har nafasi ke foro miravad momedde hayatast o chon bar miayad mofarrahe zat.
___pas dar har nafasi 2 nemat mojod ast o bar har nematy shokry vajeb.
___az dast o zabane ke barayad ?
___kaz ohdeye shokrash be dar ayad... | /*
___mennat khoday ra azz o va jall ke taatash mojebe ghorbat ast o be shokr
andarash mazide nemat.
___har nafasi ke foro miravad momedde hayatast o chon bar miayad mofarrahe zat.
___pas dar har nafasi 2 nemat mojod ast o bar har nematy shokry vajeb.
___az dast o zabane ke barayad ?
___kaz ohdeye shokrash be dar ayad... | replace | 71 | 72 | 71 | 72 | 0 | |
p03183 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
struct trio {
int wt, sz, v;
bool operator<(const trio &t) const { return sz + wt < t.sz + t.wt; }
};
int N;
trio arr[1005];
long long dp[10005];
int main() {
cin >> N;
for (int i = 1; i <= N; i++) {
cin >> arr[i].wt >> arr[i].sz >> arr[i].v;
}
sort(arr ... | #include <bits/stdc++.h>
using namespace std;
struct trio {
int wt, sz, v;
bool operator<(const trio &t) const { return sz + wt < t.sz + t.wt; }
};
int N;
trio arr[1005];
long long dp[30005];
int main() {
cin >> N;
for (int i = 1; i <= N; i++) {
cin >> arr[i].wt >> arr[i].sz >> arr[i].v;
}
sort(arr ... | replace | 11 | 12 | 11 | 12 | 0 | |
p03183 | C++ | Runtime Error | #include <bits/stdc++.h>
typedef long long ll;
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
using namespace std;
const int N = 1e4 + 69;
const ll INF = 1e18;
int n;
ll answer;
ll best[N];
bool fix[N];
vector<pair<int, int>> P;
struct bla {
int w, s, v;
};
bla A[N];
bool cmp(bl... | #include <bits/stdc++.h>
typedef long long ll;
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
using namespace std;
const int N = 1e4 + 69;
const ll INF = 1e18;
int n;
ll answer;
ll best[N];
bool fix[N];
vector<pair<int, int>> P;
struct bla {
int w, s, v;
};
bla A[N];
bool cmp(bl... | insert | 61 | 61 | 61 | 63 | 0 | |
p03183 | C++ | Runtime Error | // khodaya khodet komak kon
#include <bits/stdc++.h>
#define F first
#define S second
#define pb push_back
#define all(x) x.begin(), x.end()
#pragma GCC optimise("ofast")
#pragma GCC optimise("unroll-loops")
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
const int N =... | // khodaya khodet komak kon
#include <bits/stdc++.h>
#define F first
#define S second
#define pb push_back
#define all(x) x.begin(), x.end()
#pragma GCC optimise("ofast")
#pragma GCC optimise("unroll-loops")
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
const int N =... | replace | 16 | 17 | 16 | 17 | 0 | |
p03183 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define rep(i, a, b) for (int i = a; i < (b); ++i)
#define p(s) std::cout << s;
#define pl(s) std::cout << s << endl;
#define printIf(j, s1, s2) cout << (j ? s1 : s2) << endl;
#define YES(j) cout << (j ? "YES" : "NO") << endl... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define rep(i, a, b) for (int i = a; i < (b); ++i)
#define p(s) std::cout << s;
#define pl(s) std::cout << s << endl;
#define printIf(j, s1, s2) cout << (j ? s1 : s2) << endl;
#define YES(j) cout << (j ? "YES" : "NO") << endl... | replace | 112 | 113 | 112 | 114 | 0 | |
p03183 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define lli long long int
using namespace std;
#define mod 1000000007
#define MOD 1000000037
#define mod1 998244353
#define fastio \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); ... | #include <bits/stdc++.h>
#define lli long long int
using namespace std;
#define mod 1000000007
#define MOD 1000000037
#define mod1 998244353
#define fastio \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); ... | replace | 25 | 27 | 25 | 27 | TLE | |
p03183 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define int long long
#define endl '\n'
#define pb push_back
#define fi first
#define se second
#define all(c) (c).begin(), (c).end()
typedef long long ll;
typedef long... | #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 int long long
#define endl '\n'
#define pb push_back
#define fi first
#define se second
#define all(c) (c).begin(), (c).end()
typedef long long ll;
typedef long... | replace | 43 | 44 | 43 | 44 | 0 | |
p03183 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
// State
// dp[i][j]: The maximum value we can get by using blocks from
// 0...i and sum of blocks in the tower = j
// Initialization
// dp[0][W[0]] = V[0]
// Transitions
// dp[i][j] = max(V[j]+dp[i-W[0]][j-1], dp[i][j-1])
// Order of evaluation
// ... | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
// State
// dp[i][j]: The maximum value we can get by using blocks from
// 0...i and sum of blocks in the tower = j
// Initialization
// dp[0][W[0]] = V[0]
// Transitions
// dp[i][j] = max(V[j]+dp[i-W[0]][j-1], dp[i][j-1])
// Order of evaluation
// ... | replace | 25 | 26 | 25 | 26 | -11 | |
p03183 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define mod 1000000007
#define pb push_back
#define mp make_pair
#define fi first
#define sec second
typedef long long ll;
typedef long double ld;
#define pii pair<ll, ll>
#define pic pair<ll, char>
#define vi vector<ll>
#define vvi vector<vi>
#define vpi vector<pii>
#defin... | #include <bits/stdc++.h>
using namespace std;
#define mod 1000000007
#define pb push_back
#define mp make_pair
#define fi first
#define sec second
typedef long long ll;
typedef long double ld;
#define pii pair<ll, ll>
#define pic pair<ll, char>
#define vi vector<ll>
#define vvi vector<vi>
#define vpi vector<pii>
#defin... | insert | 61 | 61 | 61 | 63 | 0 | |
p03183 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define M 1000000007
#define F first
#define S second
#define mp make_pair
#define pb push_back
#define gcd __gcd
#define in(a) scanf("%d", &a)
#define in2(a, b) scanf("%d%d", &a, &b)
#define in3(a, b, c) scanf("%d%d%d", &a, &b, &c)
#define read(v, i, n) ... | #include <bits/stdc++.h>
using namespace std;
#define M 1000000007
#define F first
#define S second
#define mp make_pair
#define pb push_back
#define gcd __gcd
#define in(a) scanf("%d", &a)
#define in2(a, b) scanf("%d%d", &a, &b)
#define in3(a, b, c) scanf("%d%d%d", &a, &b, &c)
#define read(v, i, n) ... | replace | 52 | 54 | 52 | 54 | 0 | |
p03183 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define i_7 (ll)(1E9 + 7)
#define i_5 (ll)(1E9 + 5)
ll mod(ll a) {
ll c = a % i_7;
if (c >= 0)
return c;
else
return c + i_7;
}
typedef pair<int, int> i_i;
typedef pair<ll, ll> l_l;
ll inf = (ll)1E12;
#define rep(i, l, r) for (ll i = l; i... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define i_7 (ll)(1E9 + 7)
#define i_5 (ll)(1E9 + 5)
ll mod(ll a) {
ll c = a % i_7;
if (c >= 0)
return c;
else
return c + i_7;
}
typedef pair<int, int> i_i;
typedef pair<ll, ll> l_l;
ll inf = (ll)1E12;
#define rep(i, l, r) for (ll i = l; i... | replace | 53 | 54 | 53 | 54 | 0 | |
p03183 | C++ | Memory Limit Exceeded | #include <bits/stdc++.h>
#define ll long long
#define all(a) (a).begin(), (a).end()
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define sz() size()
#define fr first
#define sc second
#define pb push_back
#define er erase
#define ... | #include <bits/stdc++.h>
#define ll long long
#define all(a) (a).begin(), (a).end()
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define sz() size()
#define fr first
#define sc second
#define pb push_back
#define er erase
#define ... | replace | 24 | 25 | 24 | 25 | MLE | |
p03183 | C++ | Runtime Error | #pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
// #include<bits/extc++.h>
using namespace std;
// using namespace __gnu_pbds;
// typedef
// tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update>
// set_t;
#define mp(a, b) make_pair((a), (b))
#define pii pair<int, int>
#define pll pair<LL, L... | #pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
// #include<bits/extc++.h>
using namespace std;
// using namespace __gnu_pbds;
// typedef
// tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update>
// set_t;
#define mp(a, b) make_pair((a), (b))
#define pii pair<int, int>
#define pll pair<LL, L... | replace | 33 | 34 | 33 | 34 | 0 | |
p03183 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
struct Block {
ll s, w, v;
bool operator<(const Block &b1) {
ll s1 = s, w1 = w, s2 = b1.s, w2 = b1.w;
return s1 + w1 <= s2 + w2;
}
};
ll tower(Block arr[], int n) {
// Suppose if we have 3 blocks with (weight, solidness, value) as... | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
struct Block {
ll s, w, v;
bool operator<(const Block &b2) {
ll s1 = s, w1 = w, s2 = b2.s, w2 = b2.w;
return s1 + w1 < s2 + w2;
}
};
ll tower(Block arr[], int n) {
// Suppose if we have 3 blocks with (weight, solidness, value) as:... | replace | 6 | 9 | 6 | 9 | 0 | |
p03183 | C++ | Runtime Error | #include <bits/stdc++.h>
#define int long long
#define maxc 20005
#define maxn 105
using namespace std;
struct Pt {
int w, s, v;
void RD() { cin >> w >> s >> v; }
bool operator<(const Pt &a) const { return w + s < a.w + a.s; }
};
int dp[maxc] = {};
Pt arr[maxn];
int n;
int32_t main() {
ios_base::sync_with_std... | #include <bits/stdc++.h>
#define int long long
#define maxc 20005
#define maxn 1005
using namespace std;
struct Pt {
int w, s, v;
void RD() { cin >> w >> s >> v; }
bool operator<(const Pt &a) const { return w + s < a.w + a.s; }
};
int dp[maxc] = {};
Pt arr[maxn];
int n;
int32_t main() {
ios_base::sync_with_st... | replace | 3 | 4 | 3 | 4 | 0 | |
p03183 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define rep(i, a, b) for (int i = a; i < (b); ++i)
#define p(s) std::cout << s;
#define pl(s) std::cout << s << endl;
#define printIf(j, s1, s2) cout << (j ? s1 : s2) << endl;
#define YES(j) cout << (j ? "YES" : "NO") << endl... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define rep(i, a, b) for (int i = a; i < (b); ++i)
#define p(s) std::cout << s;
#define pl(s) std::cout << s << endl;
#define printIf(j, s1, s2) cout << (j ? s1 : s2) << endl;
#define YES(j) cout << (j ? "YES" : "NO") << endl... | replace | 106 | 107 | 106 | 107 | 0 | |
p03183 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, m, n) for (int(i) = (int)(m); i < (int)(n); i++)
#define rep2(i, m, n) for (int(i) = (int)(n)-1; i >= (int)(m); i--)
#define REP(i, n) rep(i, 0, n)
#define REP2(i, n) rep2(i, 0, n)
#define FOR(i, c) ... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, m, n) for (int(i) = (int)(m); i < (int)(n); i++)
#define rep2(i, m, n) for (int(i) = (int)(n)-1; i >= (int)(m); i--)
#define REP(i, n) rep(i, 0, n)
#define REP2(i, n) rep2(i, 0, n)
#define FOR(i, c) ... | replace | 68 | 69 | 68 | 69 | 0 | |
p03183 | C++ | Runtime Error | #include <bits/stdc++.h>
#define f first
#define s second
#define fore(i, a, b) for (int i = (a), ThxMK = (b); i < ThxMK; ++i)
#define pb push_back
#define all(s) begin(s), end(s)
#define _ \
ios_base::sync_with_stdio(0); ... | #include <bits/stdc++.h>
#define f first
#define s second
#define fore(i, a, b) for (int i = (a), ThxMK = (b); i < ThxMK; ++i)
#define pb push_back
#define all(s) begin(s), end(s)
#define _ \
ios_base::sync_with_stdio(0); ... | replace | 117 | 118 | 117 | 118 | 0 | |
p03183 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int N = 1e3 + 5, MAX_S = 2e4 + 5;
int n;
long long dp[N][MAX_S], ans;
struct Block {
int w, s, v;
Block(int w = 0, int s = 0, int v = 0) : w(w), s(s), v(v) {}
bool operator<(const Block &rhs) const {
return w + s == rhs.w + rhs.s ? s < rhs.s : w + s < rhs... | #include <bits/stdc++.h>
using namespace std;
const int N = 1e3 + 5, MAX_S = 2e4 + 5;
int n;
long long dp[N][MAX_S], ans;
struct Block {
int w, s, v;
Block(int w = 0, int s = 0, int v = 0) : w(w), s(s), v(v) {}
bool operator<(const Block &rhs) const {
return w + s == rhs.w + rhs.s ? s < rhs.s : w + s < rhs... | replace | 30 | 32 | 30 | 32 | -11 | |
p03183 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define i_7 (ll)(1E9 + 7)
#define i_5 (ll)(1E9 + 5)
ll mod(ll a) {
ll c = a % i_7;
if (c >= 0)
return c;
else
return c + i_7;
}
typedef pair<int, int> i_i;
typedef pair<ll, ll> l_l;
ll inf = (ll)1E12;
#define rep(i, l, r) for (ll i = l; i... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define i_7 (ll)(1E9 + 7)
#define i_5 (ll)(1E9 + 5)
ll mod(ll a) {
ll c = a % i_7;
if (c >= 0)
return c;
else
return c + i_7;
}
typedef pair<int, int> i_i;
typedef pair<ll, ll> l_l;
ll inf = (ll)1E12;
#define rep(i, l, r) for (ll i = l; i... | replace | 53 | 54 | 53 | 54 | 0 | |
p03183 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#if __has_include(<boost/multiprecision/cpp_int.hpp>)
#include <boost/multiprecision/cpp_int.hpp>
#include <boost/multiprecision/cpp_dec_float.hpp>
using bll = boost::multiprecision::cpp_int;
using bdouble =
boost::multiprecision::number<boost::multiprecision::cpp_dec_f... | #include <bits/stdc++.h>
using namespace std;
#if __has_include(<boost/multiprecision/cpp_int.hpp>)
#include <boost/multiprecision/cpp_int.hpp>
#include <boost/multiprecision/cpp_dec_float.hpp>
using bll = boost::multiprecision::cpp_int;
using bdouble =
boost::multiprecision::number<boost::multiprecision::cpp_dec_f... | replace | 224 | 226 | 224 | 230 | 0 | |
p03183 | C++ | Runtime Error |
#include <algorithm>
#include <assert.h>
#include <bitset>
#include <chrono>
#include <cmath>
#include <complex>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#includ... |
#include <algorithm>
#include <assert.h>
#include <bitset>
#include <chrono>
#include <cmath>
#include <complex>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#includ... | replace | 65 | 66 | 65 | 66 | 0 | |
p03183 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define ll long long
const ll inf = 1e18L + 5;
struct block {
int w, s;
ll v;
};
int main() {
int n;
cin >> n;
vector<block> vec(n);
int max_w = 0;
for (int i = 0; i < n; i++) {
cin >> vec[i].w >> vec[i].s >> vec[i].v;
max_w += vec[i].w;
}
sort(vec... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
const ll inf = 1e18L + 5;
struct block {
int w, s;
ll v;
};
int main() {
int n;
cin >> n;
vector<block> vec(n);
int max_w = 0;
for (int i = 0; i < n; i++) {
cin >> vec[i].w >> vec[i].s >> vec[i].v;
max_w += vec[i].w;
}
sort(vec... | replace | 23 | 27 | 23 | 27 | TLE | |
p03183 | C++ | Runtime Error | // Author : Rifayat Samee (Sanzee)
// Problem :
// Algorithm:
/*
*/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define maxval 10005
struct Node {
int w;
int s;
ll v;
bool operator<(const Node &b) const { return b.w + b.s > w + s; }
};
int main() {
// freopen("in.txt","r",stdin);
... | // Author : Rifayat Samee (Sanzee)
// Problem :
// Algorithm:
/*
*/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define maxval 2 * 10005
struct Node {
int w;
int s;
ll v;
bool operator<(const Node &b) const { return b.w + b.s > w + s; }
};
int main() {
// freopen("in.txt","r",stdin... | replace | 10 | 11 | 10 | 11 | 0 | |
p03183 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define NDEBUG
#include <cassert>
typedef long long ll;
typedef long double Double;
typedef unsigned long long ull;
typedef pair<int, int> ii;
typedef pair<ll, ll> llll;
typedef pair<double, double> dd;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef vec... | #include <bits/stdc++.h>
using namespace std;
#define NDEBUG
#include <cassert>
typedef long long ll;
typedef long double Double;
typedef unsigned long long ull;
typedef pair<int, int> ii;
typedef pair<ll, ll> llll;
typedef pair<double, double> dd;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef vec... | replace | 122 | 123 | 122 | 123 | 0 | |
p03183 | C++ | Runtime Error | // thuanqvbn03
#include <bits/stdc++.h>
using namespace std;
struct Block {
int w, s, v;
bool operator<(const Block data) const { return (w + s <= data.w + data.s); }
};
int n;
Block a[1005];
long long dp[1005][20005];
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
cin >> n;
f... | // thuanqvbn03
#include <bits/stdc++.h>
using namespace std;
struct Block {
int w, s, v;
bool operator<(const Block data) const {
return (w + s != data.w + data.s ? w + s < data.w + data.s : s < data.s);
}
};
int n;
Block a[1005];
long long dp[1005][20005];
int main() {
ios_base::sync_with_stdio(false);... | replace | 7 | 8 | 7 | 10 | -11 | |
p03183 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
#define FAST \
ios_base::sync_with_stdio(false); \
cin.tie(0);
#define LLINF (long long)1e18 // 1234567890987654321
#define INF 1234567890
#define pb push_back
#... | #include "bits/stdc++.h"
using namespace std;
#define FAST \
ios_base::sync_with_stdio(false); \
cin.tie(0);
#define LLINF (long long)1e18 // 1234567890987654321
#define INF 1234567890
#define pb push_back
#... | replace | 52 | 53 | 52 | 53 | 0 | |
p03184 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <vector>
#define debug(x) cerr << #x << " = " << x << endl
using namespace std;
typedef long long ll;
typedef long double ld;
typedef ... | #include <algorithm>
#include <cmath>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <vector>
#define debug(x) cerr << #x << " = " << x << endl
using namespace std;
typedef long long ll;
typedef long double ld;
typedef ... | replace | 18 | 19 | 18 | 19 | 0 | |
p03184 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cmath>
#include <complex>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <regex>
#include <set>
#include <stack>
#include <string>
#include <vector>
const int MOD = 1e9 + 7;
const int... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <complex>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <regex>
#include <set>
#include <stack>
#include <string>
#include <vector>
const int MOD = 1e9 + 7;
const int... | replace | 94 | 95 | 94 | 95 | 0 | |
p03184 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long int
#define lld long double
#define pb push_back
#define pii pair<ll, ll>
#define mi map<ll, ll>
#define vec vector<ll>
#define all(a) (a).begin(), (a).end()
#define F first
#define S second
#define mod 1000000007
#define nmod -1000000007
#define rep(i, a, b) for (ll i = a;... | #include <bits/stdc++.h>
#define ll long long int
#define lld long double
#define pb push_back
#define pii pair<ll, ll>
#define mi map<ll, ll>
#define vec vector<ll>
#define all(a) (a).begin(), (a).end()
#define F first
#define S second
#define mod 1000000007
#define nmod -1000000007
#define rep(i, a, b) for (ll i = a;... | replace | 56 | 57 | 56 | 57 | 0 | |
p03184 | C++ | Runtime Error |
#include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < n; ++i)
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
const ll INF = 1e18;
// auto mod int
// https://youtu.be/L8grWxBlIZ4?t=9858
// https://youtu.be/ERZuLAxZffQ?t=4807 : optimize
// https://youtu.be/8uowVvQ_-Mo?t=1329 : division
const... |
#include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < n; ++i)
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
const ll INF = 1e18;
// auto mod int
// https://youtu.be/L8grWxBlIZ4?t=9858
// https://youtu.be/ERZuLAxZffQ?t=4807 : optimize
// https://youtu.be/8uowVvQ_-Mo?t=1329 : division
const... | replace | 71 | 72 | 71 | 72 | 0 | |
p03184 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
using namespace std;
const ll mod = 1e9 + 7;
const int maxv = 200100;
const int maxn = 3100;
ll fact[maxv], ifact[maxv];
ll power(ll x, ll y) {
if (y == 0)
return 1LL;
else if (y == 1)
return 1LL * x % mod;
else {
... | #include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
using namespace std;
const ll mod = 1e9 + 7;
const int maxv = 200100;
const int maxn = 3100;
ll fact[maxv], ifact[maxv];
ll power(ll x, ll y) {
if (y == 0)
return 1LL;
else if (y == 1)
return 1LL * x % mod;
else {
... | replace | 58 | 59 | 58 | 59 | 0 | |
p03184 | C++ | Time Limit Exceeded | #include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <tuple>
#include <utility>
#include <v... | #include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <tuple>
#include <utility>
#include <v... | replace | 51 | 52 | 51 | 57 | TLE | |
p03184 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
using namespace std;
const int mod = 1e9 + 7;
struct node {
ll x, y;
};
node w[3030];
ll n, m, t, f[3030][2], ny[200020], jc[200020];
bool cmp(node a1, node b1) {
if (a1.x == b1.x)
return a1.y < b1.y;
return a1.x < b1.x;
}
ll ksm(ll d, ll z) {
ll base = d, res =... | #include <bits/stdc++.h>
#define ll long long
using namespace std;
const int mod = 1e9 + 7;
struct node {
ll x, y;
};
node w[3030];
ll n, m, t, f[3030][2], ny[200020], jc[200020];
bool cmp(node a1, node b1) {
if (a1.x == b1.x)
return a1.y < b1.y;
return a1.x < b1.x;
}
ll ksm(ll d, ll z) {
ll base = d, res =... | replace | 40 | 43 | 40 | 45 | 0 | |
p03184 | C++ | Runtime Error | /* Akshat Sharma @akshat98 */
#include <bits/stdc++.h>
#include <iostream>
#define IOS ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define mp make_pair
#define pb push_back
#define F first
#define S second
#define ll long long
#define MOD 1000000007
#define MAX 1000000001
#define vi vector<int>
#define vl... | /* Akshat Sharma @akshat98 */
#include <bits/stdc++.h>
#include <iostream>
#define IOS ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define mp make_pair
#define pb push_back
#define F first
#define S second
#define ll long long
#define MOD 1000000007
#define MAX 1000000001
#define vi vector<int>
#define vl... | replace | 52 | 53 | 52 | 53 | -6 | terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
|
p03184 | C++ | Runtime Error | #pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
using namespace std;
#define fo(i, a, b) for (int i = a; i <= b; i++)
#define _fo(i, a, b) for (int i = a; i >= b; i--)
#define foa(i, a) for (auto... | #pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
using namespace std;
#define fo(i, a, b) for (int i = a; i <= b; i++)
#define _fo(i, a, b) for (int i = a; i >= b; i--)
#define foa(i, a) for (auto... | replace | 24 | 25 | 24 | 25 | 0 | |
p03184 | C++ | Runtime Error | // In The Name of Allah
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define X first
#define Y second
const int N = 3e1 + 10;
const int M = 2e5 + 10;
const ll mod = 1e9 + 7;
pair<ll, ll> a[N];
ll dp[N], fact[M], inv[M];
ll Pow(ll a, ll b) {
if (b == 0)
return 1;
ll res = Pow(a, b / ... | // In The Name of Allah
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define X first
#define Y second
const int N = 3e3 + 10;
const int M = 2e5 + 10;
const ll mod = 1e9 + 7;
pair<ll, ll> a[N];
ll dp[N], fact[M], inv[M];
ll Pow(ll a, ll b) {
if (b == 0)
return 1;
ll res = Pow(a, b / ... | replace | 10 | 11 | 10 | 11 | 0 | |
p03184 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define taskname "CNT"
const int MOD = 1e9 + 7;
typedef long long LL;
const int lim2 = 2e6 + 1;
LL fact[lim2], ifact[lim2];
void computeFactorials(int N);
LL powerMod(LL a, LL n, LL m);
LL combination(int N, int K);
LL countPath(int m, int n);
const int maxK = 1005;
LL F... | #include <bits/stdc++.h>
using namespace std;
#define taskname "CNT"
const int MOD = 1e9 + 7;
typedef long long LL;
const int lim2 = 2e6 + 1;
LL fact[lim2], ifact[lim2];
void computeFactorials(int N);
LL powerMod(LL a, LL n, LL m);
LL combination(int N, int K);
LL countPath(int m, int n);
const int maxK = 2e5;
LL F[... | replace | 14 | 15 | 14 | 15 | 0 | |
p03184 | C++ | Runtime Error | #include "bits/stdc++.h"
#define int long long
using namespace std;
const int mod = 1e9 + 7;
int qpow(int a, int power) {
if (power == 0) {
return 1;
}
int b = qpow(a, power / 2);
if (power % 2 == 0) {
return (b * b) % mod;
} else {
return (((b * b) % mod) * a) % mod;
}
}
int inv(int a) { r... | #include "bits/stdc++.h"
#define int long long
using namespace std;
const int mod = 1e9 + 7;
int qpow(int a, int power) {
if (power == 0) {
return 1;
}
int b = qpow(a, power / 2);
if (power % 2 == 0) {
return (b * b) % mod;
} else {
return (((b * b) % mod) * a) % mod;
}
}
int inv(int a) { r... | replace | 52 | 53 | 52 | 55 | 0 | |
p03184 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < ((int)(n)); i++)
#define reg(i, a, b) for (int i = ((int)(a)); i <= ((int)(b)); i++)
#define irep(i, n) for (int i = ((int)(n)-1); i >= 0; i--)
#define ireg(i, a, b) for (int i = ((int)(b)); i >= ((int)(a)); i--)
typedef long long ll;
t... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < ((int)(n)); i++)
#define reg(i, a, b) for (int i = ((int)(a)); i <= ((int)(b)); i++)
#define irep(i, n) for (int i = ((int)(n)-1); i >= 0; i--)
#define ireg(i, a, b) for (int i = ((int)(b)); i >= ((int)(a)); i--)
typedef long long ll;
t... | replace | 77 | 78 | 77 | 78 | 0 | |
p03184 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
#define MAXN 200001
#define MOD 1000000007
int H, W, N;
pair<int, int> bl[2001];
int dp[2001];
// x must be relatively prime to p
int fact[MAXN], inv[MAXN], ifact[MAXN];
// x must be relatively prime to p
template <typename T, typename T1> T mod(... | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
#define MAXN 200001
#define MOD 1000000007
int H, W, N;
pair<int, int> bl[3001];
int dp[3001];
// x must be relatively prime to p
int fact[MAXN], inv[MAXN], ifact[MAXN];
// x must be relatively prime to p
template <typename T, typename T1> T mod(... | replace | 9 | 11 | 9 | 11 | 0 | |
p03184 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define mp make_pair
#define pb push_back
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep1(i, n) for (int i = 1; i <= (int)(n); i++)
template <int mod> struct ModInt {
int x;
ModInt() : x(0) {}
ModInt(int64_t y) : x(y >= 0 ? y % mod ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define mp make_pair
#define pb push_back
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep1(i, n) for (int i = 1; i <= (int)(n); i++)
template <int mod> struct ModInt {
int x;
ModInt() : x(0) {}
ModInt(int64_t y) : x(y >= 0 ? y % mod ... | replace | 120 | 124 | 120 | 123 | TLE | |
p03184 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define fastio \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define pi 3.... | #include <bits/stdc++.h>
using namespace std;
#define fastio \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define pi 3.... | replace | 30 | 42 | 30 | 41 | TLE | |
p03184 | C++ | Time Limit Exceeded | #include <algorithm>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <set>
#include <stdio.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;
long long P = 1000000007;
struct N {
int i, j;
long long v;
};
vector<N> ns;
vector<vector<i... | #include <algorithm>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <set>
#include <stdio.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;
long long P = 1000000007;
struct N {
int i, j;
long long v;
};
vector<N> ns;
vector<vector<i... | replace | 96 | 97 | 96 | 98 | TLE | |
p03184 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define MAXN 100005
typedef long long ll;
const ll mod = 1e9 + 7;
ll fac[MAXN], ifac[MAXN];
ll fastpow(ll a, ll b) {
ll res = 1;
while (b) {
if (b & 1)
(res *= a) %= mod;
(a *= a) %= mod;
b >>= 1;
}
return res;
}
ll C(int m, int n) { return fac[m] ... | #include <bits/stdc++.h>
using namespace std;
#define MAXN 200005
typedef long long ll;
const ll mod = 1e9 + 7;
ll fac[MAXN], ifac[MAXN];
ll fastpow(ll a, ll b) {
ll res = 1;
while (b) {
if (b & 1)
(res *= a) %= mod;
(a *= a) %= mod;
b >>= 1;
}
return res;
}
ll C(int m, int n) { return fac[m] ... | replace | 2 | 3 | 2 | 3 | 0 | |
p03184 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define F first
#define S second
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pll;
const ll MOD = 1e9 + 7;
ll H, W, N;
vector<ll> fact, finv;
vector<pll> walls;
vector<vector<ll>> dp;
ll modpow(ll a, ll b) {
ll result = 1;
for (; b; b /= 2) {
if (b % 2)
res... | #include <bits/stdc++.h>
#define F first
#define S second
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pll;
const ll MOD = 1e9 + 7;
ll H, W, N;
vector<ll> fact, finv;
vector<pll> walls;
vector<vector<ll>> dp;
ll modpow(ll a, ll b) {
ll result = 1;
for (; b; b /= 2) {
if (b % 2)
res... | replace | 55 | 65 | 55 | 61 | TLE | |
p03184 | C++ | Runtime Error | /*
_____ _ _ _ _
|_ _| |__ ___ / \ _ __ ___| |__ _ _| |
| | | '_ \ / _ \ / _ \ | '_ \/ __| '_ \| | | | |
| | | | | | __// ___ \| | | \__ \ | | | |_| | |
|_| |_| |_|\___/_/ \_\_| |_|___/_| |_|\__,_|_|
*/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_containe... | /*
_____ _ _ _ _
|_ _| |__ ___ / \ _ __ ___| |__ _ _| |
| | | '_ \ / _ \ / _ \ | '_ \/ __| '_ \| | | | |
| | | | | | __// ___ \| | | \__ \ | | | |_| | |
|_| |_| |_|\___/_/ \_\_| |_|___/_| |_|\__,_|_|
*/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_containe... | replace | 60 | 61 | 60 | 61 | 0 |
Time elapsed: 211.89ms
|
p03184 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, a, n) for (int i = a; i < n; i++)
#define per(i, a, n) for (int i = n - 1; i >= a; i--)
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define SZ(x) ((int)(x).size())
#define fi first
#define se second
typedef vector<int> VI;
... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, a, n) for (int i = a; i < n; i++)
#define per(i, a, n) for (int i = n - 1; i >= a; i--)
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define SZ(x) ((int)(x).size())
#define fi first
#define se second
typedef vector<int> VI;
... | replace | 26 | 28 | 26 | 28 | 0 | |
p03184 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ff first
#define ss second
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pi;
typedef pair<long long, long long> pl;
const int MOD = 1e9 + 7;
const ll INF = 1e18;
const double EPS = 1e-6;
const int MAX_H = 1e5 + 5;
const int MAX_N = 1e3 + 5... | #include <bits/stdc++.h>
using namespace std;
#define ff first
#define ss second
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pi;
typedef pair<long long, long long> pl;
const int MOD = 1e9 + 7;
const ll INF = 1e18;
const double EPS = 1e-6;
const int MAX_H = 1e5 + 5;
const int MAX_N = 3e3 + 5... | replace | 16 | 17 | 16 | 17 | 0 | |
p03184 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define what_is(x) cerr << #x << " is " << x << endl;
#define IOS \
ios::sync_with_stdio(false); \
cin.tie(0);
typedef long long ll;
const int N = 3e3 + 5;... | #include <bits/stdc++.h>
using namespace std;
#define what_is(x) cerr << #x << " is " << x << endl;
#define IOS \
ios::sync_with_stdio(false); \
cin.tie(0);
typedef long long ll;
const int N = 3e3 + 5;... | replace | 12 | 14 | 12 | 16 | 0 | |
p03184 | C++ | Runtime Error | #define _USE_MATH_DEFINES
#include "bits/stdc++.h"
using namespace std;
#define FOR(i, j, k) for (int(i) = (j); (i) < (int)(k); ++(i))
#define rep(i, j) FOR(i, 0, j)
#define each(x, y) for (auto &(x) : (y))
#define mp make_pair
#define MT make_tuple
#define all(x) (x).begin(), (x).end()
#define debug(x) cout << #x << "... | #define _USE_MATH_DEFINES
#include "bits/stdc++.h"
using namespace std;
#define FOR(i, j, k) for (int(i) = (j); (i) < (int)(k); ++(i))
#define rep(i, j) FOR(i, 0, j)
#define each(x, y) for (auto &(x) : (y))
#define mp make_pair
#define MT make_tuple
#define all(x) (x).begin(), (x).end()
#define debug(x) cout << #x << "... | replace | 140 | 141 | 140 | 141 | 0 | |
p03184 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vi;
typedef vector<vi> vvi;
#define ff first
#define ss second
#define pb push_back
#define all(s) (s).begin(), (s).end()
const ll mod = 1e9 + 7;
ll h, w, x;
vector<pair<ll, ll>> arr;
vi ans, fact;
ll binexp(ll a) {
ll res = 1, y... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vi;
typedef vector<vi> vvi;
#define ff first
#define ss second
#define pb push_back
#define all(s) (s).begin(), (s).end()
const ll mod = 1e9 + 7;
ll h, w, x;
vector<pair<ll, ll>> arr;
vi ans, fact;
ll binexp(ll a) {
ll res = 1, y... | replace | 33 | 34 | 33 | 34 | 0 | |
p03184 | C++ | Runtime Error | #include <bits/stdc++.h>
#define MOD 1000000007
using namespace std;
typedef struct point {
int x, y;
bool operator<(const struct point &t) const {
return x == t.x ? y < t.y : x < t.x;
}
} POINT, *PPOINT;
int w, h;
POINT arr[30002];
long long fac[200010], rev[200010], f[30002];
void init() {
int i;
fac[0]... | #include <bits/stdc++.h>
#define MOD 1000000007
using namespace std;
typedef struct point {
int x, y;
bool operator<(const struct point &t) const {
return x == t.x ? y < t.y : x < t.x;
}
} POINT, *PPOINT;
int w, h;
POINT arr[200002];
long long fac[200010], rev[200010], f[200002];
void init() {
int i;
fac[... | replace | 10 | 12 | 10 | 12 | 0 | |
p03184 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define len(s) s.length()
#define forp(i, a, b) for (i = a; i <= b; i++)
#define FOR(tt, a, b) for (int tt = a; tt <= b; tt++)
#define rep(i, n) for (i = 0; i < n; i++)
#define ren(i, n) for (i = n - 1; i >= 0; i--)
#... | #include <bits/stdc++.h>
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define len(s) s.length()
#define forp(i, a, b) for (i = a; i <= b; i++)
#define FOR(tt, a, b) for (int tt = a; tt <= b; tt++)
#define rep(i, n) for (i = 0; i < n; i++)
#define ren(i, n) for (i = n - 1; i >= 0; i--)
#... | replace | 41 | 43 | 41 | 43 | 0 | |
p03184 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
template <typename T> void read(T &t) {
t = 0;
char ch = getchar();
int f = 1;
while (ch < '0' || ch > '9') {
if (ch == '-')
f = -1;
ch = getchar();
}
do {
(t *= 10) += ch - '0';
ch = getchar();
} while ('0' <= ch && ch <= '9');
t *= f;... | #include <bits/stdc++.h>
using namespace std;
template <typename T> void read(T &t) {
t = 0;
char ch = getchar();
int f = 1;
while (ch < '0' || ch > '9') {
if (ch == '-')
f = -1;
ch = getchar();
}
do {
(t *= 10) += ch - '0';
ch = getchar();
} while ('0' <= ch && ch <= '9');
t *= f;... | replace | 19 | 20 | 19 | 20 | 0 | |
p03184 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MOD = 1e9 + 7;
int dp[2001];
int fact[200001];
int tcaf[200001];
int pow1(int n, int p) {
ll cur, res;
cur = n;
res = 1;
while (p) {
if (p & 1) {
res *= cur;
res %= MOD;
}
p /= 2;
cur *= cur;
cur %= MO... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MOD = 1e9 + 7;
int dp[3001];
int fact[200001];
int tcaf[200001];
int pow1(int n, int p) {
ll cur, res;
cur = n;
res = 1;
while (p) {
if (p & 1) {
res *= cur;
res %= MOD;
}
p /= 2;
cur *= cur;
cur %= MO... | replace | 5 | 6 | 5 | 6 | 0 | |
p03184 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define LL long long
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pil pair<int, ll>
#define pli pair<ll, int>
#define vi vector<int>
#define vl vector<ll>
#define vii vector<pii>
#define vll vector<pll>
#define vil vector<pil>
#define vl... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define LL long long
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pil pair<int, ll>
#define pli pair<ll, int>
#define vi vector<int>
#define vl vector<ll>
#define vii vector<pii>
#define vll vector<pll>
#define vil vector<pil>
#define vl... | replace | 138 | 139 | 138 | 141 | 0 | |
p03185 | C++ | Runtime Error | // in the name of Allah
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define pb push_back
#define ll long long
#define double long double
#define sz(x) ((int)(x.size()))
#define fr first
#define se second
#define inf 1e18
#define max_n 123456
#define mod 1000000007
ll add(ll a, ll b) {
a += b;... | // in the name of Allah
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define pb push_back
#define ll long long
#define double long double
#define sz(x) ((int)(x.size()))
#define fr first
#define se second
#define inf 1e18
#define max_n 123456
#define mod 1000000007
ll add(ll a, ll b) {
a += b;... | replace | 97 | 98 | 97 | 98 | 0 | |
p03185 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using i64 = int64_t;
#define rep(i, x, y) \
for (i64 i = i64(x), i##_max_for_repmacro = i64(y); \
i < i##_max_for_repmacro; ++i)
#define debug(x) #x << "=" << (x)
#ifdef DEBUG
#de... | #include <bits/stdc++.h>
using namespace std;
using i64 = int64_t;
#define rep(i, x, y) \
for (i64 i = i64(x), i##_max_for_repmacro = i64(y); \
i < i##_max_for_repmacro; ++i)
#define debug(x) #x << "=" << (x)
#ifdef DEBUG
#de... | replace | 139 | 140 | 139 | 140 | TLE | |
p03185 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
mt19937_64 llrand(random_device{}());
#define st first
#define nd second
#define mp make_pair
#define pb push_back
#define cl(x, v) memset((x), (v), sizeof(x))
#define db(x) cerr << #x << " == " << x << endl
#define dbs(x) cerr << x << endl
#define _ << ", " <<
#define gc... | #include <bits/stdc++.h>
using namespace std;
mt19937_64 llrand(random_device{}());
#define st first
#define nd second
#define mp make_pair
#define pb push_back
#define cl(x, v) memset((x), (v), sizeof(x))
#define db(x) cerr << #x << " == " << x << endl
#define dbs(x) cerr << x << endl
#define _ << ", " <<
#define gc... | replace | 27 | 28 | 27 | 28 | 0 | |
p03185 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define REP(i, n) for (ll i = 0; i < (ll)n; i++)
#define INF 1000000000000000
using namespace std;
typedef long long ll;
typedef double db;
typedef string str;
t... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define REP(i, n) for (ll i = 0; i < (ll)n; i++)
#define INF 1000000000000000
using namespace std;
typedef long long ll;
typedef double db;
typedef string str;
t... | replace | 32 | 33 | 32 | 33 | 0 | |
p03185 | C++ | Runtime Error | #pragma optimization_level 3
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
// #pragma GCC target("avx,avx2,fma")
#include <bits/stdc++.h>
#define F first
#define S second
#define vec vector
#define pb push_back... | #pragma optimization_level 3
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
// #pragma GCC target("avx,avx2,fma")
#include <bits/stdc++.h>
#define F first
#define S second
#define vec vector
#define pb push_back... | replace | 33 | 34 | 33 | 34 | 0 | |
p03185 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = long long int;
constexpr ll M = 1e9 + 7;
inline ll sum_1(const ll n) { return ((n * (n + 1)) / 2) % M; }
inline ll sum_2(const ll n) { return ((n * (n + 1) * (2 * n + 1)) / 6) % M; }
inline ll sum_3(const ll n) {
return (((n * (n + 1)) / 2) % M * ((n * (n + 1)... | #include <bits/stdc++.h>
using namespace std;
using ll = long long int;
constexpr ll M = 1e9 + 7;
inline ll sum_1(const ll n) { return ((n * (n + 1)) / 2) % M; }
inline ll sum_2(const ll n) { return ((n * (n + 1) * (2 * n + 1)) / 6) % M; }
inline ll sum_3(const ll n) {
return (((n * (n + 1)) / 2) % M * ((n * (n + 1)... | insert | 205 | 205 | 205 | 207 | TLE | |
p03185 | C++ | Time Limit Exceeded | #include <cassert>
#include <iostream>
#include <map>
#include <vector>
template <typename T> class LineSet {
private:
std::map<T, T> L; // 傾き→切片
T max_a, min_a;
public:
LineSet(T ai) : L(), max_a(-ai), min_a(ai) {}
void push(T a, T b) { // push ax + b
min_a = std::min(min_a, a);
max_a = std::max(max_... | #include <cassert>
#include <iostream>
#include <map>
#include <vector>
template <typename T> class LineSet {
private:
std::map<T, T> L; // 傾き→切片
T max_a, min_a;
public:
LineSet(T ai) : L(), max_a(-ai), min_a(ai) {}
void push(T a, T b) { // push ax + b
min_a = std::min(min_a, a);
max_a = std::max(max_... | replace | 79 | 84 | 79 | 84 | TLE | |
p03185 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
bool query = 0;
struct line {
long long m, b;
mutable function<const line *()> succ;
bool operator<(const line &rhs) const {
if (!query)
return m < rhs.m;
const line *s = succ();
return s ? (b - s->b) < rhs.m * (s->m - m) : 0;
}
};
struct hull : m... | #include <bits/stdc++.h>
using namespace std;
bool query = 0;
struct line {
long long m, b;
mutable function<const line *()> succ;
bool operator<(const line &rhs) const {
if (!query)
return m < rhs.m;
const line *s = succ();
return s ? (b - s->b) < rhs.m * (s->m - m) : 0;
}
};
struct hull : m... | replace | 48 | 49 | 48 | 49 | 0 | |
p03185 | C++ | Runtime Error | #include <bits/stdc++.h>
#define pb push_back
#define f first
#define s second
#define mp make_pair
#define inlld(x) scanf("%lld", &x)
#define ind(x) scanf("%d", &x)
#define inlld2(x, y) scanf("%lld%lld", &x, &y)
#define inlld3(x, y, z) scanf("%lld%lld%lld", &x, &y, &z)
#define ind2(x, y) scanf("%d%d", &x, &y)
#define ... | #include <bits/stdc++.h>
#define pb push_back
#define f first
#define s second
#define mp make_pair
#define inlld(x) scanf("%lld", &x)
#define ind(x) scanf("%d", &x)
#define inlld2(x, y) scanf("%lld%lld", &x, &y)
#define inlld3(x, y, z) scanf("%lld%lld%lld", &x, &y, &z)
#define ind2(x, y) scanf("%d%d", &x, &y)
#define ... | replace | 12 | 13 | 12 | 13 | 0 | |
p03185 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
bool Q;
struct Line {
mutable ll k, m, p;
bool operator<(const Line &o) const { return Q ? p < o.p : k < o.k; }
};
struct LineContainer : multiset<Line> {
const ll inf = LLONG_MAX;
ll div(ll a, ll b) { return a / b - ((a ^ b) < 0 && a % b); }... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
bool Q;
struct Line {
mutable ll k, m, p;
bool operator<(const Line &o) const { return Q ? p < o.p : k < o.k; }
};
struct LineContainer : multiset<Line> {
const ll inf = LLONG_MAX;
ll div(ll a, ll b) { return a / b - ((a ^ b) < 0 && a % b); }... | replace | 45 | 46 | 45 | 46 | 0 | |
p03185 | C++ | Runtime Error | #include <bits/stdc++.h>
#define MAXN 2001000
#define lc (x << 1)
#define rc (x << 1 | 1)
#define pii pair<int, int>
#define pb push_back
typedef long long ll;
using namespace std;
ll n, C, h[MAXN], dp[MAXN];
int vis[MAXN << 1];
struct line {
double k, b;
line(double _k = 0, double _b = 0) {
k = _k;
b = ... | #include <bits/stdc++.h>
#define MAXN 3001000
#define lc (x << 1)
#define rc (x << 1 | 1)
#define pii pair<int, int>
#define pb push_back
typedef long long ll;
using namespace std;
ll n, C, h[MAXN], dp[MAXN];
int vis[MAXN << 1];
struct line {
double k, b;
line(double _k = 0, double _b = 0) {
k = _k;
b = ... | replace | 1 | 2 | 1 | 2 | -11 | |
p03185 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int maxn = 50005;
typedef long long ll;
struct line {
ll m, n;
line(ll _m = 0, ll _n = 0) { m = _m, n = _n; }
} A[maxn];
ll get_y(const line &a, const int &x) { return a.m * x + a.n; }
bool ok(const line &a, const line &b, const line &c) {
return (a.m - b.m) * (... | #include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 5;
typedef long long ll;
struct line {
ll m, n;
line(ll _m = 0, ll _n = 0) { m = _m, n = _n; }
} A[maxn];
ll get_y(const line &a, const int &x) { return a.m * x + a.n; }
bool ok(const line &a, const line &b, const line &c) {
return (a.m - b.m) *... | replace | 2 | 3 | 2 | 3 | 0 | |
p03185 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
template <class T, class U> void maximize(T &x, U y) {
if (x < y)
x = y;
}
template <class T, class U> void minimize(T &x, U y) {
if (x > y)
x = y;
}
template <class T> T Abs(T x) { return (x < (T)0 ? -x : x); }
#define llong long long
#define MASK(i) ((1LL) ... | #include <bits/stdc++.h>
using namespace std;
template <class T, class U> void maximize(T &x, U y) {
if (x < y)
x = y;
}
template <class T, class U> void minimize(T &x, U y) {
if (x > y)
x = y;
}
template <class T> T Abs(T x) { return (x < (T)0 ? -x : x); }
#define llong long long
#define MASK(i) ((1LL) ... | replace | 90 | 91 | 90 | 91 | 0 | |
p03185 | C++ | Runtime Error | #include <bits/stdc++.h>
#define DIM 100007
typedef long long ll;
typedef long double ld;
using namespace std;
struct ev {
ll k, b;
};
ll n, i, j, m, nlines;
ev lines[DIM];
ll a[DIM];
ll benz[DIM];
ll dp[DIM];
ll check(ev l1, ev l2, ev l3) {
return (ld)(l3.b - l1.b) / (ld)(l1.k - l3.k) >=
(ld)(l3.b - l2... | #include <bits/stdc++.h>
#define DIM 200007
typedef long long ll;
typedef long double ld;
using namespace std;
struct ev {
ll k, b;
};
ll n, i, j, m, nlines;
ev lines[DIM];
ll a[DIM];
ll benz[DIM];
ll dp[DIM];
ll check(ev l1, ev l2, ev l3) {
return (ld)(l3.b - l1.b) / (ld)(l1.k - l3.k) >=
(ld)(l3.b - l2... | replace | 2 | 3 | 2 | 3 | 0 | |
p03185 | C++ | Runtime Error | #include <bits/stdc++.h>
typedef long long ll;
using namespace std;
typedef pair<ll, ll> pii;
#define endl '\n'
#define F first
#define S second
const int MAX_N = 2e5 + 5;
int n;
ll c;
ll h[MAX_N];
ll dp[MAX_N];
set<int> st;
priority_queue<pii, vector<pii>, greater<pii>> pq;
ll step(int x, int y) { return dp[x] + (h[... | #include <bits/stdc++.h>
typedef long long ll;
using namespace std;
typedef pair<ll, ll> pii;
#define endl '\n'
#define F first
#define S second
const int MAX_N = 2e5 + 5;
int n;
ll c;
ll h[MAX_N];
ll dp[MAX_N];
set<int> st;
priority_queue<pii, vector<pii>, greater<pii>> pq;
ll step(int x, int y) { return dp[x] + (h[... | replace | 31 | 32 | 31 | 37 | 0 | |
p03185 | C++ | Runtime Error | #include <bits/stdc++.h>
#define int long long
using namespace std;
const int M = 1 << 20, N = 2 * M, INF = 1e18;
int n, val[N], h[N], a[N], b[N], d[N], f[N];
void insert(int i, int A, int B) {
int deb[] = {A * d[i] + B, a[i] * d[i] + b[i]},
fin[] = {A * f[i] + B, a[i] * f[i] + b[i]};
if (deb[0] <= deb[1] ... | #include <bits/stdc++.h>
#define int long long
using namespace std;
const int M = 1 << 20, N = 2 * M, INF = 1e18;
int n, val[N], h[N], a[N], b[N], d[N], f[N];
void insert(int i, int A, int B) {
if (i >= N)
return;
int deb[] = {A * d[i] + B, a[i] * d[i] + b[i]},
fin[] = {A * f[i] + B, a[i] * f[i] + b[i]... | insert | 9 | 9 | 9 | 11 | 127 | /tmp/c7844e89-b358-4ea4-a405-933a2ee32b08.out: error while loading shared libraries: libc.so.6: failed to map segment from shared object
|
p03185 | C++ | Runtime Error | #pragma GCC optimize("-O3")
#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;
// #include <boost/multiprecision/cpp_int.hpp>
// using namespace boost::multiprecision;
using namespace std;
#define all(c) (c).begin(), (c).end()
#de... | #pragma GCC optimize("-O3")
#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;
// #include <boost/multiprecision/cpp_int.hpp>
// using namespace boost::multiprecision;
using namespace std;
#define all(c) (c).begin(), (c).end()
#de... | replace | 88 | 91 | 88 | 89 | 0 | |
p03185 | C++ | Runtime Error | #include <bits/stdc++.h>
#define inf 100000000000000LL
#define ll long long
#define mx 100007
using namespace std;
vector<vector<ll>> tree(4LL * mx, {0LL, inf});
ll f(vector<ll> line, int x) { return line[0] * x + line[1]; }
void insert(vector<ll> line, int lo = 1, int hi = mx, int i = 1) {
int m = (lo + hi) / 2;
... | #include <bits/stdc++.h>
#define inf 100000000000000LL
#define ll long long
#define mx 1000007
using namespace std;
vector<vector<ll>> tree(4LL * mx, {0LL, inf});
ll f(vector<ll> line, int x) { return line[0] * x + line[1]; }
void insert(vector<ll> line, int lo = 1, int hi = mx, int i = 1) {
int m = (lo + hi) / 2;... | replace | 3 | 4 | 3 | 4 | 0 | |
p03185 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pll;
#define F first
#define S second
#define pb push_back
#define mp make_pair
#define all(X) (X).begin(), (X).end()
#define REP(i, x, y) for (ll i = x; i <= y; ++i)
vector<string> vec_splitter(string s) {
for (char &c : s)
... | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pll;
#define F first
#define S second
#define pb push_back
#define mp make_pair
#define all(X) (X).begin(), (X).end()
#define REP(i, x, y) for (ll i = x; i <= y; ++i)
vector<string> vec_splitter(string s) {
for (char &c : s)
... | replace | 72 | 73 | 72 | 73 | 0 | |
p03185 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define ll long long
typedef complex<ll> reta;
const ll INF = 1e18 + 7;
const int MAXN = 2e5 + 7, MAXX = 1e6 + 7;
int n, node_counter = 0, raiz, fe[4 * MAXN], fd[4 * MAXN];
reta f[4 * MAXN], inicial;
ll h[MAXN], c, dp[MAXN];
inline int create() {
node_counter++;
fe[nod... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
typedef complex<ll> reta;
const ll INF = 1e18 + 7;
const int MAXN = 2e5 + 7, MAXX = 1e6 + 7;
int n, node_counter = 0, raiz, fe[4 * MAXN], fd[4 * MAXN];
reta f[4 * MAXN], inicial;
ll h[MAXN], c, dp[MAXN];
inline int create() {
node_counter++;
fe[nod... | replace | 28 | 29 | 28 | 29 | TLE | |
p03185 | C++ | Runtime Error | #include <bits/stdc++.h>
#define int long long
using namespace std;
const int M = 1 << 20, N = 2 * M, INF = 1e18;
struct Tree {
int a[N], b[N], d[N], f[N];
void init() {
for (int i = M; i < N; i++)
f[i] = 1 + (d[i] = i - M);
for (int i = M - 1; i > -1; i--) {
d[i] = d[i * 2];
f[i] = f[i... | #include <bits/stdc++.h>
#define int long long
using namespace std;
const int M = 1 << 20, N = 2 * M, INF = 1e18;
struct Tree {
int a[N], b[N], d[N], f[N];
void init() {
for (int i = M; i < N; i++)
f[i] = 1 + (d[i] = i - M);
for (int i = M - 1; i > -1; i--) {
d[i] = d[i * 2];
f[i] = f[i... | insert | 23 | 23 | 23 | 25 | -11 | |
p03185 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
#define mod 1000000007
#define dom 998244353
#define all(c) begin(c), end(c)
#define rep(i, n) repi(i, 0, n)
#define repi(i, a, b) for (int i = (a); i < (b); i++)
#define rrep(i, a, b) for (int i = (b)-1; i >= (a); i--)
template <typename T> bool chmax(T &a, const T &b) {
... | #include "bits/stdc++.h"
using namespace std;
#define mod 1000000007
#define dom 998244353
#define all(c) begin(c), end(c)
#define rep(i, n) repi(i, 0, n)
#define repi(i, a, b) for (int i = (a); i < (b); i++)
#define rrep(i, a, b) for (int i = (b)-1; i >= (a); i--)
template <typename T> bool chmax(T &a, const T &b) {
... | insert | 65 | 65 | 65 | 66 | -11 | |
p03185 | C++ | Runtime Error | #include <bits/stdc++.h>
#define LL long long
#define PII pair<int, int>
using namespace std;
const int MAXN = 100005;
const LL MOD = 998244353;
LL N, C, s, t, h[MAXN], dp[MAXN];
int deq[MAXN];
bool useless(int a, int b, int c) {
LL m1 = -2 * h[a], b1 = dp[a] + h[a] * h[a];
LL m2 = -2 * h[b], b2 = dp[b] + h[b] * ... | #include <bits/stdc++.h>
#define LL long long
#define PII pair<int, int>
using namespace std;
const int MAXN = 200005;
const LL MOD = 998244353;
LL N, C, s, t, h[MAXN], dp[MAXN];
int deq[MAXN];
bool useless(int a, int b, int c) {
LL m1 = -2 * h[a], b1 = dp[a] + h[a] * h[a];
LL m2 = -2 * h[b], b2 = dp[b] + h[b] * ... | replace | 4 | 5 | 4 | 5 | 0 | |
p03185 | C++ | Runtime Error | #include <algorithm>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define mod 1000000007
#define... | #include <algorithm>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define mod 1000000007
#define... | replace | 41 | 42 | 41 | 42 | 0 | |
p03186 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define REP(i, a, b) for (int i = (a); i < (b); i++)
#define rep(i, n) REP(i, 0, (n))
typedef long long ll;
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
int ans = 0;
bool health = true;
while (true) {
if (health) {
if (c) {
ans++;
c--;
... | #include <bits/stdc++.h>
#define REP(i, a, b) for (int i = (a); i < (b); i++)
#define rep(i, n) REP(i, 0, (n))
typedef long long ll;
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
int ans = 0;
if (a + b >= c - 1) {
ans = b + c;
} else {
ans = a + b + b;
if (b != 0 || c != 0)
... | replace | 10 | 36 | 10 | 16 | TLE | |
p03186 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int gcd(int x, int y) {
if (y == 0)
return x;
return gcd(y, x % y);
}
int lcm(int x, int y) { return x * y / gcd(x, y); }
int ctoi(char c) {
if (c >= '0' && c <= '9') {
return c - '0';
}
return 0;
}
int main() {
int A, B, C, ans = 0, f = 0;
cin >... | #include <bits/stdc++.h>
using namespace std;
int gcd(int x, int y) {
if (y == 0)
return x;
return gcd(y, x % y);
}
int lcm(int x, int y) { return x * y / gcd(x, y); }
int ctoi(char c) {
if (c >= '0' && c <= '9') {
return c - '0';
}
return 0;
}
int main() {
int A, B, C, ans = 0, f = 0;
cin >... | replace | 24 | 49 | 24 | 25 | TLE | |
p03186 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main(void) {
// Your code here!
int a, b, c;
std::cin >> a >> b >> c;
bool x = true;
int count = 0;
while (true) {
if (x && c != 0) {
c--;
count++;
x = false;
continue;
}
if (b != 0) {
b--;
count++;
x = true;
... | #include <iostream>
using namespace std;
int main(void) {
// Your code here!
int a, b, c;
std::cin >> a >> b >> c;
bool x = true;
int count = 0;
while (true) {
if (x && c != 0) {
c--;
count++;
x = false;
continue;
}
if (b != 0) {
b--;
count++;
x = true;
... | insert | 21 | 21 | 21 | 24 | TLE |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.