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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p02345 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define DUMP(x) cerr << #x << "=" << x << endl
#define DUMP2(x, y) \
cerr << "(" << #x << ", " << #y << ") = (" << x << ", " << y << ")" << endl
#define BINARY(x) static_cast<bitset<16>>(x)
#define rep(i, n) for... | #include <bits/stdc++.h>
using namespace std;
#define DUMP(x) cerr << #x << "=" << x << endl
#define DUMP2(x, y) \
cerr << "(" << #x << ", " << #y << ") = (" << x << ", " << y << ")" << endl
#define BINARY(x) static_cast<bitset<16>>(x)
#define rep(i, n) for... | replace | 74 | 75 | 74 | 75 | 0 | 1
2
|
p02345 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define MAX_N 1 << 17
int n, dat[2 * MAX_N - 1];
// INT_MAXで初期化
void init(int n_) {
n = 1;
while (n < n_)
n *= 2;
for (int i = 0; i < 2 * n - 1; i++)
dat[i] = INT_MAX;
}
void update(int k, int a) {
k += n - 1;
dat[k] = a;
while (k > 0) {
k = (k - 1... | #include <bits/stdc++.h>
using namespace std;
#define MAX_N 1 << 17
int n, dat[2 * (MAX_N)-1];
// INT_MAXで初期化
void init(int n_) {
n = 1;
while (n < n_)
n *= 2;
for (int i = 0; i < 2 * n - 1; i++)
dat[i] = INT_MAX;
}
void update(int k, int a) {
k += n - 1;
dat[k] = a;
while (k > 0) {
k = (k - 1... | replace | 3 | 4 | 3 | 4 | 0 | |
p02345 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
using namespace std;
typedef long long ll;
static const int INF = 2147483647;
static const int MAX_N = 100000;
int n, dat[2 * MAX_N - 1];
void init(int n_) {
n = 1;
while (n < n_)
n *= 2;
for (int i = 0; i < 2 * n - 1; i++)
dat[i] = INF;
}
void update(int k, int ... | #include <algorithm>
#include <cstdio>
using namespace std;
typedef long long ll;
static const int INF = 2147483647;
static const int MAX_N = 1 << 18;
int n, dat[2 * MAX_N - 1];
void init(int n_) {
n = 1;
while (n < n_)
n *= 2;
for (int i = 0; i < 2 * n - 1; i++)
dat[i] = INF;
}
void update(int k, int... | replace | 5 | 6 | 5 | 6 | 0 | |
p02345 | C++ | Runtime Error | #include <algorithm>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <string... | #include <algorithm>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <string... | replace | 25 | 26 | 25 | 26 | 0 | |
p02346 | C++ | Runtime Error | #include <bits/stdc++.h>
#define REP(i, a, b) for (int i = (a); i < (b); i++)
#define RREP(i, a, b) for (int i = (a); i >= (b); i--)
#define pq priority_queue
#define P pair<int, int>
#define P2 pair<int, P>
#define P3 pair<int, P2>
typedef long long ll;
typedef long double ld;
using namespace std;
const int INF = 1e9,... | #include <bits/stdc++.h>
#define REP(i, a, b) for (int i = (a); i < (b); i++)
#define RREP(i, a, b) for (int i = (a); i >= (b); i--)
#define pq priority_queue
#define P pair<int, int>
#define P2 pair<int, P>
#define P3 pair<int, P2>
typedef long long ll;
typedef long double ld;
using namespace std;
const int INF = 1e9,... | replace | 24 | 25 | 24 | 25 | 0 | |
p02346 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
using namespace std;
#define N 131072
int tree[N * 2];
int getsum(int a, int b, int k, int l, int r) {
if (r <= a || b <= l)
return 0;
if (a <= l && r <= b)
return tree[k];
int m = (r) / 2;
return getsum(a, b, k * 2 + 1, l, m) + getsum(a, b, k * 2 + 2, m, r);
}
v... | #include <algorithm>
#include <iostream>
using namespace std;
#define N 131072
int tree[N * 2];
int getsum(int a, int b, int k, int l, int r) {
if (r <= a || b <= l)
return 0;
if (a <= l && r <= b)
return tree[k];
int m = (l + r) / 2;
return getsum(a, b, k * 2 + 1, l, m) + getsum(a, b, k * 2 + 2, m, r);... | replace | 10 | 11 | 10 | 11 | 0 | |
p02346 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define loop(i, a, b) for (int i = a; i < b; i++)
#define rep(i, a) ... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define loop(i, a, b) for (int i = a; i < b; i++)
#define rep(i, a) ... | replace | 137 | 138 | 137 | 138 | 0 | |
p02346 | C++ | Runtime Error | #include <algorithm> // require sort next_permutation count __gcd reverse etc.
#include <cctype> // require tolower, toupper
#include <cfloat>
#include <climits>
#include <cmath> // require fabs
#include <cstdio> // require scanf printf
#include <cstdlib> // require abs exit atof atoi
#include <cstring> // requir... | #include <algorithm> // require sort next_permutation count __gcd reverse etc.
#include <cctype> // require tolower, toupper
#include <cfloat>
#include <climits>
#include <cmath> // require fabs
#include <cstdio> // require scanf printf
#include <cstdlib> // require abs exit atof atoi
#include <cstring> // requir... | replace | 31 | 32 | 31 | 32 | 0 | |
p02346 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <vector>
#define MAX 100000
using namespace std;
vector<int> S(MAX, 0);
int N;
void update(int i, int x) {
i += (N - 1);
S[i] += x;
while (i > 0) {
i = (i - 1) / 2;
S[i] += x;
}
}
int find(int s, int t, int k, int l, int r) {
if (r <= s || t <= l... | #include <algorithm>
#include <iostream>
#include <vector>
#define MAX 100000
using namespace std;
vector<int> S(MAX * 4, 0);
int N;
void update(int i, int x) {
i += (N - 1);
S[i] += x;
while (i > 0) {
i = (i - 1) / 2;
S[i] += x;
}
}
int find(int s, int t, int k, int l, int r) {
if (r <= s || t ... | replace | 8 | 9 | 8 | 9 | 0 | |
p02346 | C++ | Time Limit Exceeded | #include <algorithm>
#include <array>
#include <cstdint>
#include <functional>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdlib.h>
#include <string>
#include <time.h>
#include <utility>
#include <vector>
#define INF 1000000000
#define MOD 1000000007... | #include <algorithm>
#include <array>
#include <cstdint>
#include <functional>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdlib.h>
#include <string>
#include <time.h>
#include <utility>
#include <vector>
#define INF 1000000000
#define MOD 1000000007... | insert | 236 | 236 | 236 | 238 | TLE | |
p02346 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
struct SegTree {
public:
int n;
const int MAX = 100000;
vector<int> tree;
SegTree(int n) {
tree = vector<int>(MAX, 0);
SegTree::n = 1;
while (SegTree::n < n)
SegTree::n *= 2;
}
void update(int i, int x) {... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
struct SegTree {
public:
int n;
const int MAX = 100000;
vector<int> tree;
SegTree(int n) {
tree = vector<int>(MAX * 4, 0);
SegTree::n = 1;
while (SegTree::n < n)
SegTree::n *= 2;
}
void update(int i, int ... | replace | 14 | 15 | 14 | 15 | 0 | |
p02346 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int n;
long long int dat[300000];
void init(int nn) {
n = 1;
while (n < nn)
n *= 2;
for (int i = 0; i < n * 2 - 1; i++) {
dat[i] = 0ll;
}
}
void add(int x, int i) {
x += n - 1;
dat[x] += i;
while (x) {
x = (x - 1) / 2;
dat[x] = dat[x * 2 + 1] + d... | #include <iostream>
using namespace std;
int n;
long long int dat[300000];
void init(int nn) {
n = 1;
while (n < nn)
n *= 2;
for (int i = 0; i < n * 2 - 1; i++) {
dat[i] = 0ll;
}
}
void add(int x, int i) {
x += n - 1;
dat[x] += i;
while (x) {
x = (x - 1) / 2;
dat[x] = dat[x * 2 + 1] + d... | replace | 27 | 28 | 27 | 28 | TLE | |
p02346 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
#define VARIABLE(x) cerr << #x << "=" << x << ... | #include <algorithm>
#include <bitset>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
#define VARIABLE(x) cerr << #x << "=" << x << ... | replace | 33 | 34 | 33 | 34 | 0 | |
p02346 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
int seg[200005];
int n, q;
void add(int a, int b) {
a += n - 1;
seg[a] += b;
while (a > 0) {
a = (a - 1) / 2;
seg[a] += b;
}
}
int sum(int a, int b, int l, int m, int k) ... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
int seg[20000000];
int n, q;
void add(int a, int b) {
a += n - 1;
seg[a] += b;
while (a > 0) {
a = (a - 1) / 2;
seg[a] += b;
}
}
int sum(int a, int b, int l, int m, int k... | replace | 7 | 8 | 7 | 8 | 0 | |
p02346 | C++ | Runtime Error | #include <iostream>
using namespace std;
int n, q, bit[100001];
void add(int a, int b) {
bit[a] += b;
while (a <= n) {
a += a & -a;
bit[a] += b;
}
}
int sum(int i) {
if (i == 0)
return 0;
return bit[i] + sum(i - (i & -i));
}
int main(void) {
cin >> n >> q;
for (int i = 0; i < q; i++) {
in... | #include <iostream>
using namespace std;
int n, q, bit[10000001];
void add(int a, int b) {
bit[a] += b;
while (a <= n) {
a += a & -a;
bit[a] += b;
}
}
int sum(int i) {
if (i == 0)
return 0;
return bit[i] + sum(i - (i & -i));
}
int main(void) {
cin >> n >> q;
for (int i = 0; i < q; i++) {
... | replace | 2 | 3 | 2 | 3 | 0 | |
p02346 | C++ | Runtime Error | #include <iostream>
#define MAX 250000
using namespace std;
int D[MAX];
int n = 1;
void initRSQ(int n_) {
while (n < n_)
n *= 2;
for (int i = 0; i < 2 * n - 1; i++)
D[i] = 0;
}
void add(int k, int a) {
k += n - 1;
D[k] += a;
while (k > 0) {
k = (k - 1) / 2;
D[k] = D[2 * k + 1] + D[2 * k + 2... | #include <iostream>
#define MAX 300000
using namespace std;
int D[MAX];
int n = 1;
void initRSQ(int n_) {
while (n < n_)
n *= 2;
for (int i = 0; i < 2 * n - 1; i++)
D[i] = 0;
}
void add(int k, int a) {
k += n - 1;
D[k] += a;
while (k > 0) {
k = (k - 1) / 2;
D[k] = D[2 * k + 1] + D[2 * k + 2... | replace | 1 | 2 | 1 | 2 | 0 | |
p02346 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
using namespace std;
template <typename T, int MAX_N> struct segment_tree_sum {
T arr[MAX_N << 1];
int N;
segment_tree_sum(int n) {
N = 1;
while (N < n)
N *= 2;
for (int i = 0; i < 2 * N - 1; ++i) {
arr[i] = (T)0;
}
}
void add(int i, T v... | #include <algorithm>
#include <iostream>
using namespace std;
template <typename T, int MAX_N> struct segment_tree_sum {
T arr[MAX_N << 1];
int N;
segment_tree_sum(int n) {
N = 1;
while (N < n)
N *= 2;
for (int i = 0; i < 2 * N - 1; ++i) {
arr[i] = (T)0;
}
}
void add(int i, T v... | replace | 46 | 47 | 46 | 47 | 0 | |
p02346 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
using namespace std;
const int maxn = 10005;
int bit[maxn];
int n;
int get_sum(int i) {
int ret = 0;
while (i > 0) {
ret += bit[i];
i -= i & -i;
}
return ret;
}
void add(int i, int x) {
while (i <= n) {
... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
using namespace std;
const int maxn = 100005;
int bit[maxn];
int n;
int get_sum(int i) {
int ret = 0;
while (i > 0) {
ret += bit[i];
i -= i & -i;
}
return ret;
}
void add(int i, int x) {
while (i <= n) {
... | replace | 6 | 7 | 6 | 7 | 0 | |
p02346 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
struct SegTree {
vector<int> node;
int n;
SegTree(int sz) {
n = 1;
while (sz > n)
n *= 2;
node.resize(2 * n - 1, 0);
}
void add(int p, int x) {
p += n - 1;
node[p] += x;
do {
p = (p - 1) / 2;
node[p] += x;
} while (p... | #include <bits/stdc++.h>
using namespace std;
struct SegTree {
vector<int> node;
int n;
SegTree(int sz) {
n = 1;
while (sz > n)
n *= 2;
node.resize(2 * n - 1, 0);
}
void add(int p, int x) {
p += n - 1;
node[p] += x;
do {
p = (p - 1) / 2;
node[p] += x;
} while (p... | insert | 49 | 49 | 49 | 50 | TLE | |
p02346 | C++ | Runtime Error | #define _CRT_SECURE_NO_WARNINGS
#define NDEBUG
#include <array>
#include <bitset>
#include <cassert>
#include <memory>
template <::std::size_t Bitlength, class Size = ::std::size_t>
class binary_trie {
public:
using value_type = ::std::bitset<Bitlength>;
using size_type = Size;
private:
class node_type {
publ... | #define _CRT_SECURE_NO_WARNINGS
#define NDEBUG
#include <array>
#include <bitset>
#include <cassert>
#include <memory>
template <::std::size_t Bitlength, class Size = ::std::size_t>
class binary_trie {
public:
using value_type = ::std::bitset<Bitlength>;
using size_type = Size;
private:
class node_type {
publ... | replace | 123 | 125 | 123 | 125 | 0 | |
p02346 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
using namespace std;
#define MAX 100001
int n, seg[MAX * 2 - 1];
void init(int size) {
n = 1;
while (n < size)
n *= 2;
}
int query(int a, int b, int k, int l, int r) {
if (r <= a || b <= l)
return 0;
if (a <= l && r <= b)
return seg[k];
int vl = query(a, b, k... | #include <algorithm>
#include <cstdio>
using namespace std;
#define MAX (1 << 17)
int n, seg[MAX * 2 - 1];
void init(int size) {
n = 1;
while (n < size)
n *= 2;
}
int query(int a, int b, int k, int l, int r) {
if (r <= a || b <= l)
return 0;
if (a <= l && r <= b)
return seg[k];
int vl = query(a, b... | replace | 3 | 4 | 3 | 4 | 0 | |
p02346 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
template <class T> struct treap {
#define treapInf INT_MAX
public:
struct node {
T val;
node *lch, *rch;
int pri, sz;
T sum, mini;
node(T val, int pri) : val(val), pri(pri), sz(1), sum(val), mini(val) {
lch = rch = NULL;
}
};
node *ro... | #include <bits/stdc++.h>
using namespace std;
template <class T> struct treap {
#define treapInf INT_MAX
public:
struct node {
T val;
node *lch, *rch;
int pri, sz;
T sum, mini;
node(T val, int pri) : val(val), pri(pri), sz(1), sum(val), mini(val) {
lch = rch = NULL;
}
};
node *ro... | replace | 27 | 28 | 27 | 29 | 0 | |
p02346 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cstdio>
#include <vector>
using namespace std;
template <typename T> struct Add {
T operator()(T x, T y) { return x + y; }
};
template <class T, class Functor> struct SegmentTree {
size_t n;
T e;
vector<T> tree;
Functor F;
SegmentTree(size_t m, T e = T()) : n(1), e(e) {
... | #include <algorithm>
#include <cstdio>
#include <vector>
using namespace std;
template <typename T> struct Add {
T operator()(T x, T y) { return x + y; }
};
template <class T, class Functor> struct SegmentTree {
size_t n;
T e;
vector<T> tree;
Functor F;
SegmentTree(size_t m, T e = T()) : n(1), e(e) {
... | replace | 16 | 17 | 16 | 17 | TLE | |
p02346 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define REP(i, n) FOR(i, 0, n)
#define rep(i, n) FOR(i, 0, n)
#define DEBUG(x) cout << #x << ": " << x << endl
#define vint vector<int>
#define vdouble ve... | #include <algorithm>
#include <cassert>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define REP(i, n) FOR(i, 0, n)
#define rep(i, n) FOR(i, 0, n)
#define DEBUG(x) cout << #x << ": " << x << endl
#define vint vector<int>
#define vdouble ve... | replace | 100 | 102 | 100 | 102 | 0 | 6 3 3 1 2 3 0
|
p02346 | C++ | Memory Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, a, b) for (int i = a; i < b; i++)
#define rrep(i, a, b) for (int i = a; i >= b; i--)
#define fore(i, a) for (auto &i : a)
#pragma GCC optimize("-O3")
using namespace std;
void _main();
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
_main();
}
//----------------------... | #include <bits/stdc++.h>
#define rep(i, a, b) for (int i = a; i < b; i++)
#define rrep(i, a, b) for (int i = a; i >= b; i--)
#define fore(i, a) for (auto &i : a)
#pragma GCC optimize("-O3")
using namespace std;
void _main();
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
_main();
}
//----------------------... | replace | 14 | 15 | 14 | 15 | MLE | |
p02347 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<int, int> P;
typedef pair<ll, ll> Pll;
typedef vector<int> Vi;
// typedef tuple<int, int, int> T;
#define FOR(i, s, x) for (int i = s; i < (int)(x); i++)
#define REP(i, x) FOR(i, 0, x)
#define ALL(c) c.begin(), c.end()
#define DUMP(x)... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<int, int> P;
typedef pair<ll, ll> Pll;
typedef vector<int> Vi;
// typedef tuple<int, int, int> T;
#define FOR(i, s, x) for (int i = s; i < (int)(x); i++)
#define REP(i, x) FOR(i, 0, x)
#define ALL(c) c.begin(), c.end()
#define DUMP(x)... | replace | 295 | 297 | 295 | 297 | TLE | |
p02347 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
class Node {
public:
int p, location, l, r;
};
class Point {
public:
int id;
long x, y;
Point() {}
Point(int id, long x, long y) {
this->id = id;
this->x = x;
this->y = y;
}
bool operator<(con... | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
class Node {
public:
int p, location, l, r;
};
class Point {
public:
int id;
long x, y;
Point() {}
Point(int id, long x, long y) {
this->id = id;
this->x = x;
this->y = y;
}
bool operator<(con... | replace | 102 | 103 | 102 | 104 | TLE | |
p02347 | C++ | Time Limit Exceeded | #include <algorithm>
#include <array>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
using ll = long long int;
using ull = unsigned long long int;
#define rep(... | #include <algorithm>
#include <array>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
using ll = long long int;
using ull = unsigned long long int;
#define rep(... | replace | 314 | 317 | 314 | 317 | TLE | |
p02347 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef pair<int, int> P;
vector<P> dat[1000001];
struct st {
int a, b, c;
} p[500000];
bool operator<(st a, st b) { return P(a.a, a.b) < P(b.a, b.b); }
void init(int k, int l, int r) {
if (r - l == 1) {
dat[k].push_b... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef pair<int, int> P;
vector<P> dat[1500000];
struct st {
int a, b, c;
} p[500000];
bool operator<(st a, st b) { return P(a.a, a.b) < P(b.a, b.b); }
void init(int k, int l, int r) {
if (r - l == 1) {
dat[k].push_b... | replace | 5 | 6 | 5 | 6 | 0 | |
p02347 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef pair<int, int> P;
vector<P> dat[1010000];
struct st {
int a, b, c;
} p[500000];
bool operator<(st a, st b) { return P(a.a, a.b) < P(b.a, b.b); }
void init(int k, int l, int r) {
if (r - l == 1) {
dat[k].push_b... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef pair<int, int> P;
vector<P> dat[1050000];
struct st {
int a, b, c;
} p[500000];
bool operator<(st a, st b) { return P(a.a, a.b) < P(b.a, b.b); }
void init(int k, int l, int r) {
if (r - l == 1) {
dat[k].push_b... | replace | 5 | 6 | 5 | 6 | 0 | |
p02347 | C++ | Memory Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef pair<int, int> P;
vector<P> dat[10000000];
struct st {
int a, b, c;
} p[500000];
bool operator<(st a, st b) { return P(a.a, a.b) < P(b.a, b.b); }
void init(int k, int l, int r) {
if (r - l == 1) {
dat[k].push_... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef pair<int, int> P;
vector<P> dat[2000000];
struct st {
int a, b, c;
} p[500000];
bool operator<(st a, st b) { return P(a.a, a.b) < P(b.a, b.b); }
void init(int k, int l, int r) {
if (r - l == 1) {
dat[k].push_b... | replace | 5 | 6 | 5 | 6 | MLE | |
p02347 | C++ | Time Limit Exceeded | // Drawing heavily from 2579705 by vjudge2
// http://judge.u-aizu.ac.jp/onlinejudge/review.jsp?rid=2579705#1
#include <algorithm>
#include <iostream>
#include <set>
#include <vector>
using namespace std;
#define NMAX 500010
int dim = 0, tree_idx = 1;
struct Point {
int xy[2], id, left, right;
bool operator<(cons... | // Drawing heavily from 2579705 by vjudge2
// http://judge.u-aizu.ac.jp/onlinejudge/review.jsp?rid=2579705#1
#include <algorithm>
#include <iostream>
#include <set>
#include <vector>
using namespace std;
#define NMAX 500010
int dim = 0, tree_idx = 1;
struct Point {
int xy[2], id, left, right;
bool operator<(cons... | insert | 62 | 62 | 62 | 64 | TLE | |
p02347 | C++ | Runtime Error | #include <iostream>
using namespace std;
#include <algorithm> // sort.
#include <cstdio> // scanf, printf.
#include <utility> // pair.
typedef pair<int, pair<int, int>> Point;
inline int pos_x(Point p) { return p.second.first; }
inline int pos_y(Point p) { return p.second.second; }
bool cmp_x(const Point &p1, c... | #include <iostream>
using namespace std;
#include <algorithm> // sort.
#include <cstdio> // scanf, printf.
#include <utility> // pair.
typedef pair<int, pair<int, int>> Point;
inline int pos_x(Point p) { return p.second.first; }
inline int pos_y(Point p) { return p.second.second; }
bool cmp_x(const Point &p1, c... | replace | 82 | 83 | 82 | 83 | 0 | |
p02347 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
#ifdef _DEBUG
#include "dump.hpp"
#else
#define dump(...)
#endif
// #define int long long
#define rep(i, a, b) for (int i = (a); i < (b); i++)
#define rrep(i, a, b) for (int i = (b)-1; i >= (a); i--)
#define all(c) begin(c), end(c)
const int INF =
sizeof(int) == sizeof... | #include "bits/stdc++.h"
using namespace std;
#ifdef _DEBUG
#include "dump.hpp"
#else
#define dump(...)
#endif
// #define int long long
#define rep(i, a, b) for (int i = (a); i < (b); i++)
#define rrep(i, a, b) for (int i = (b)-1; i >= (a); i--)
#define all(c) begin(c), end(c)
const int INF =
sizeof(int) == sizeof... | replace | 104 | 105 | 104 | 105 | -11 | |
p02347 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
class Node {
public:
int location;
int p, l, r;
Node() {}
};
class Point {
public:
int id, x, y;
Point() {}
Point(int id, int x, int y) : id(id), x(x), y(y) {}
bool operator<(const Point &p) { return id < p.id; }
}... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
class Node {
public:
int location;
int p, l, r;
Node() {}
};
class Point {
public:
int id, x, y;
Point() {}
Point(int id, int x, int y) : id(id), x(x), y(y) {}
bool operator<(const Point &p) { return id < p.id; }
}... | replace | 16 | 18 | 16 | 18 | TLE | |
p02348 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <functional>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define INF ((1 << 30) - 1 + (1 << 30))
#define EPS 1.0e-6
using namespace std;
typedef long long ll;
int n, q;
int m[... | #include <algorithm>
#include <cstdio>
#include <functional>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define INF ((1 << 30) - 1 + (1 << 30))
#define EPS 1.0e-6
using namespace std;
typedef long long ll;
int n, q;
int m[... | replace | 19 | 20 | 19 | 20 | 0 | |
p02348 | C++ | Runtime Error | #include <stdio.h>
const int INF = 2147483647;
struct segment_tree {
int map[200010];
void build(int now, int l, int r) {
if (l == r) {
map[now] = INF;
return;
}
map[now] = -1;
int mid = (l + r) / 2;
build(now * 2 + 1, l, mid);
build(now * 2 + 2, mid + 1, r);
return;
}
vo... | #include <stdio.h>
const int INF = 2147483647;
struct segment_tree {
int map[2000010];
void build(int now, int l, int r) {
if (l == r) {
map[now] = INF;
return;
}
map[now] = -1;
int mid = (l + r) / 2;
build(now * 2 + 1, l, mid);
build(now * 2 + 2, mid + 1, r);
return;
}
v... | replace | 3 | 4 | 3 | 4 | 0 | |
p02349 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int n, z;
pair<int, int> st[4 * 100000];
int op(int iz, int der) { return st[iz].first + st[der].first; }
void push(int v, int l, int r) {
int m = (r + l) / 2;
st[2 * v].second += st[v].second;
st[2 * v].first += st[v].second * (m - l);
st[2 * v + 1].second += st... | #include <bits/stdc++.h>
using namespace std;
int n, z;
pair<int, int> st[4 * 100000];
int op(int iz, int der) { return st[iz].first + st[der].first; }
void push(int v, int l, int r) {
if (r - l == 1)
return;
int m = (r + l) / 2;
st[2 * v].second += st[v].second;
st[2 * v].first += st[v].second * (m - l)... | insert | 9 | 9 | 9 | 11 | 0 | |
p02349 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int INF = 1e9;
const ll LINF = 1e18;
template <class S, class T>
ostream &operator<<(ostream &out, const pair<S, T> &o) {
out << "(" << o.first << "," << o.second << ")";
return out;
}
tem... | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int INF = 1e9;
const ll LINF = 1e18;
template <class S, class T>
ostream &operator<<(ostream &out, const pair<S, T> &o) {
out << "(" << o.first << "," << o.second << ")";
return out;
}
tem... | replace | 47 | 48 | 47 | 48 | 0 | |
p02349 | C++ | Runtime Error | #include <stdio.h>
const int INF = 2147483647;
struct segment_tree {
int map[200010];
void build(int now, int l, int r) {
map[now] = 0;
if (l == r)
return;
int mid = (l + r) / 2;
build(now * 2 + 1, l, mid);
build(now * 2 + 2, mid + 1, r);
return;
}
void change(int n, int now, int L... | #include <stdio.h>
const int INF = 2147483647;
struct segment_tree {
int map[2000010];
void build(int now, int l, int r) {
map[now] = 0;
if (l == r)
return;
int mid = (l + r) / 2;
build(now * 2 + 1, l, mid);
build(now * 2 + 2, mid + 1, r);
return;
}
void change(int n, int now, int ... | replace | 3 | 4 | 3 | 4 | 0 | |
p02349 | C++ | Runtime Error | /*
* s????????????????´??????????s'????????????????´?????????¨????????¨
* i < l s'[i] = s[i]
* l <= i <= r s'[i] = s[i] + x*i - x*(l-1)
* r < i s'[i] = s[i] + x*(r-l+1)
* ?????????BIT???????????¨??????????£?
* ????´°????????¬
* dsl2_g,poj3468??¨??????
*/
#include <algorithm>
#include <bitset>
#include <cmath>
#... | /*
* s????????????????´??????????s'????????????????´?????????¨????????¨
* i < l s'[i] = s[i]
* l <= i <= r s'[i] = s[i] + x*i - x*(l-1)
* r < i s'[i] = s[i] + x*(r-l+1)
* ?????????BIT???????????¨??????????£?
* ????´°????????¬
* dsl2_g,poj3468??¨??????
*/
#include <algorithm>
#include <bitset>
#include <cmath>
#... | replace | 37 | 38 | 37 | 38 | 0 | |
p02350 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, l, r) for (int i = (int)(l); i < (int)(r); i++)
#define ALL(x) x.begin(), x.end()
template <typename T> bool chmax(T &a, const T &b) {
return a < b ? (a = b, true) : false;
}
template <typename T> bool chmin(T &a, const T &b) {
return b < a ? (a = b, tru... | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, l, r) for (int i = (int)(l); i < (int)(r); i++)
#define ALL(x) x.begin(), x.end()
template <typename T> bool chmax(T &a, const T &b) {
return a < b ? (a = b, true) : false;
}
template <typename T> bool chmin(T &a, const T &b) {
return b < a ? (a = b, tru... | insert | 57 | 57 | 57 | 58 | TLE | |
p02350 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define mind(a, b) (a > b ? b : a)
#define ma... | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define mind(a, b) (a > b ? b : a)
#define ma... | replace | 55 | 57 | 55 | 57 | 0 | |
p02350 | C++ | Runtime Error |
/*vvv>
zzzzzI
.---. zzuzuI .vgggg&,.
+++++= dunkoI .WbbWo JMM9^```?TMB` ..&gNNg,. gggggggJ, qgggggggg]
(&&&&&&&&[ c+OA&J, (&&&&&&+J, .cJeAA&-. (&&&&&&&&x .&AA&=-.
+++++= dunkoI Xpbpbp JM#` (M#^ ?MMp MM| +TMN. JMF '
|yk ` dVY 7Vk, Vy ... |
/*vvv>
zzzzzI
.---. zzuzuI .vgggg&,.
+++++= dunkoI .WbbWo JMM9^```?TMB` ..&gNNg,. gggggggJ, qgggggggg]
(&&&&&&&&[ c+OA&J, (&&&&&&+J, .cJeAA&-. (&&&&&&&&x .&AA&=-.
+++++= dunkoI Xpbpbp JM#` (M#^ ?MMp MM| +TMN. JMF '
|yk ` dVY 7Vk, Vy ... | replace | 147 | 148 | 147 | 148 | 0 | |
p02350 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int n, q;
struct Node {
int min = 0x7fffffff, lazy = -1;
} seg[400005];
void update(int u, int l, int r, int ql, int qr, int v) {
if (seg[u].lazy != -1) {
seg[u << 1].lazy = seg[u << 1 | 1].lazy = seg[u].lazy;
seg[u].lazy = -1;
}
if (l == ql && r == qr) ... | #include <bits/stdc++.h>
using namespace std;
int n, q;
struct Node {
int min = 0x7fffffff, lazy = -1;
} seg[800005];
void update(int u, int l, int r, int ql, int qr, int v) {
if (seg[u].lazy != -1) {
seg[u << 1].lazy = seg[u << 1 | 1].lazy = seg[u].lazy;
seg[u].lazy = -1;
}
if (l == ql && r == qr) ... | replace | 7 | 8 | 7 | 8 | 0 | |
p02350 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
constexpr int MAX_N = 100000, INF = 2147483647;
int n, q;
int seg[MAX_N * 4], lazy[MAX_N * 4];
bool flag[MAX_N * 4];
void init(int size) {
n = 1;
while (n < size)
n *= 2;
for (int i = 0; i < n * 2 - 1; ++i) {
seg[i] = INF;
lazy[i] = INF;
}
}
void eva... | #include <algorithm>
#include <iostream>
constexpr int MAX_N = 100000, INF = 2147483647;
int n, q;
int seg[MAX_N * 4], lazy[MAX_N * 4];
bool flag[MAX_N * 4];
void init(int size) {
n = 1;
while (n < size)
n *= 2;
for (int i = 0; i < n * 2 - 1; ++i) {
seg[i] = INF;
lazy[i] = INF;
}
}
void eva... | delete | 96 | 98 | 96 | 96 | 0 | sh: 1: pause: not found
|
p02351 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using Int = long long;
template <typename T, typename E> struct SegmentTree {
typedef function<T(T, T)> F;
typedef function<T(T, E)> G;
typedef function<T(E, E)> H;
typedef function<E(E, int)> P;
int n;
F f;
G g;
H h;
P p;
T d1;
E d0;
vector<T> dat;... | #include <bits/stdc++.h>
using namespace std;
using Int = long long;
template <typename T, typename E> struct SegmentTree {
typedef function<T(T, T)> F;
typedef function<T(T, E)> G;
typedef function<T(E, E)> H;
typedef function<E(E, int)> P;
int n;
F f;
G g;
H h;
P p;
T d1;
E d0;
vector<T> dat;... | replace | 73 | 77 | 73 | 74 | 0 | 2
2
1
1
1
1
2
2
1
1
2
2
2
2
1
1
1
1
2
|
p02351 | C++ | Runtime Error | // #pragma GCC optimize ("-O3")
#include <bits/stdc++.h>
using namespace std;
//@起動時
struct initon {
initon() {
cin.tie(0);
ios::sync_with_stdio(false);
cout.setf(ios::fixed);
cout.precision(16);
srand((unsigned)clock() + (unsigned)time(NULL));
};
} __initon;
// 衝突対策
#define ws ___ws
struct T {
... | // #pragma GCC optimize ("-O3")
#include <bits/stdc++.h>
using namespace std;
//@起動時
struct initon {
initon() {
cin.tie(0);
ios::sync_with_stdio(false);
cout.setf(ios::fixed);
cout.precision(16);
srand((unsigned)clock() + (unsigned)time(NULL));
};
} __initon;
// 衝突対策
#define ws ___ws
struct T {
... | replace | 870 | 871 | 870 | 871 | 0 | |
p02351 | C++ | Runtime Error |
// #pragma GCC optimize ("-O3")
#include <bits/stdc++.h>
using namespace std;
//@起動時
struct initon {
initon() {
cin.tie(0);
ios::sync_with_stdio(false);
cout.setf(ios::fixed);
cout.precision(16);
srand((unsigned)clock() + (unsigned)time(NULL));
};
} __initon;
// 衝突対策
#define ws ___ws
struct T {... |
// #pragma GCC optimize ("-O3")
#include <bits/stdc++.h>
using namespace std;
//@起動時
struct initon {
initon() {
cin.tie(0);
ios::sync_with_stdio(false);
cout.setf(ios::fixed);
cout.precision(16);
srand((unsigned)clock() + (unsigned)time(NULL));
};
} __initon;
// 衝突対策
#define ws ___ws
struct T {... | replace | 820 | 821 | 820 | 821 | 0 | |
p02351 | C++ | Runtime Error |
// #pragma GCC optimize ("-O3")
#include <bits/stdc++.h>
using namespace std;
//@起動時
struct initon {
initon() {
cin.tie(0);
ios::sync_with_stdio(false);
cout.setf(ios::fixed);
cout.precision(16);
srand((unsigned)clock() + (unsigned)time(NULL));
};
} __initon;
// 衝突対策
#define ws ___ws
struct T {... |
// #pragma GCC optimize ("-O3")
#include <bits/stdc++.h>
using namespace std;
//@起動時
struct initon {
initon() {
cin.tie(0);
ios::sync_with_stdio(false);
cout.setf(ios::fixed);
cout.precision(16);
srand((unsigned)clock() + (unsigned)time(NULL));
};
} __initon;
// 衝突対策
#define ws ___ws
struct T {... | replace | 820 | 821 | 820 | 821 | 0 | |
p02351 | C++ | Runtime Error | #include <bits/stdc++.h>
#define range(i, a, b) for (int i = (a); i < (b); i++)
#define rep(i, b) for (int i = 0; i < (b); i++)
#define all(a) (a).begin(), (a).end()
#define show(x) cerr << #x << " = " << (x) << endl;
// const int INF = 1e8;
using namespace std;
struct RAQ {
using T = long long;
T operator()(const... | #include <bits/stdc++.h>
#define range(i, a, b) for (int i = (a); i < (b); i++)
#define rep(i, b) for (int i = 0; i < (b); i++)
#define all(a) (a).begin(), (a).end()
#define show(x) cerr << #x << " = " << (x) << endl;
// const int INF = 1e8;
using namespace std;
struct RAQ {
using T = long long;
T operator()(const... | replace | 57 | 58 | 57 | 58 | 0 | |
p02351 | C++ | Memory Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <typename T> class node {
public:
node<T> *l, *r;
T val, val2;
node() : val2(0) {}
node(T val_, node<T> *l_ = nullptr, node<T> *r_ = nullptr)
: l(l_), r(r_), val(val_), val2(0) {}
void init(T val_, node<T> *l_ = nullptr, node... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <typename T> class node {
public:
node<T> *l, *r;
T val, val2;
node() : val2(0) {}
node(T val_, node<T> *l_ = nullptr, node<T> *r_ = nullptr)
: l(l_), r(r_), val(val_), val2(0) {}
void init(T val_, node<T> *l_ = nullptr, node... | replace | 67 | 68 | 67 | 68 | MLE | |
p02351 | C++ | Memory Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <typename T> class node {
public:
node<T> *l, *r;
T val, add;
node(T val_ = 0, node<T> *l_ = nullptr, node<T> *r_ = nullptr)
: l(l_), r(r_), val(val_), add(0) {}
};
template <typename T> class DynamicLazySegmentTree {
const ll... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <typename T> class node {
public:
node<T> *l, *r;
T val, add;
node(T val_ = 0, node<T> *l_ = nullptr, node<T> *r_ = nullptr)
: l(l_), r(r_), val(val_), add(0) {}
};
template <typename T> class DynamicLazySegmentTree {
const ll... | replace | 116 | 117 | 116 | 117 | MLE | |
p02351 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <string>
#include <vector>
#define REP(i, n) for (int i = 0; i < (n); i++)
#define FOR(i, a, b) for (int i = (a... | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <string>
#include <vector>
#define REP(i, n) for (int i = 0; i < (n); i++)
#define FOR(i, a, b) for (int i = (a... | replace | 26 | 27 | 26 | 27 | 0 | |
p02352 | C++ | Runtime Error | #include <cassert>
#include <functional>
#include <utility>
#include <vector>
template <typename ValueMonoid, typename OperatorMonoid, class Modify>
class LazySegmentTree {
public:
using value_type = ValueMonoid;
using reference = value_type &;
using const_reference = const value_type &;
using operator_type = ... | #include <cassert>
#include <functional>
#include <utility>
#include <vector>
template <typename ValueMonoid, typename OperatorMonoid, class Modify>
class LazySegmentTree {
public:
using value_type = ValueMonoid;
using reference = value_type &;
using const_reference = const value_type &;
using operator_type = ... | replace | 63 | 64 | 63 | 64 | -6 | Fatal glibc error: malloc assertion failure in sysmalloc: (old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)
|
p02352 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using lint = long long int;
template <class T = int> using V = vector<T>;
template <class T = int> using VV = V<V<T>>;
template <class T> void assign(V<T> &v, int n, const T &a = T()) {
v.assign(n, a);
}
template <class T, class... U> void assign(V<T> &v, int n, const U &... | #include <bits/stdc++.h>
using namespace std;
using lint = long long int;
template <class T = int> using V = vector<T>;
template <class T = int> using VV = V<V<T>>;
template <class T> void assign(V<T> &v, int n, const T &a = T()) {
v.assign(n, a);
}
template <class T, class... U> void assign(V<T> &v, int n, const U &... | replace | 109 | 110 | 109 | 110 | TLE | |
p02352 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 100005;
int n, q;
bool tag[maxn];
ll S[4 * maxn], lazy[4 * maxn];
void upd(int id, int l, int r, int ql, int qr, int v) {
if (ql == l && qr == r) {
tag[id] = 1;
lazy[id] += v;
return;
}
if (tag[id]) {
S[id] += l... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 100005;
int n, q;
bool tag[4 * maxn];
ll S[4 * maxn], lazy[4 * maxn];
void upd(int id, int l, int r, int ql, int qr, int v) {
if (ql == l && qr == r) {
tag[id] = 1;
lazy[id] += v;
return;
}
if (tag[id]) {
S[id] ... | replace | 6 | 7 | 6 | 7 | 0 | |
p02353 | C++ | Runtime Error | #include <bits/stdc++.h>
#define int long long
using namespace std;
/*Starry Sky Tree*/
/*Range Add Min(Max) Query*/
/*区間加算、区間Min,区間Max*/
class RSUQ {
public:
// 遅延用の型
struct T {
int type; // 0 - empty , 1 - update
int value;
T() : type(0), value(0) {}
T(int type, int value) : type(type), value(... | #include <bits/stdc++.h>
#define int long long
using namespace std;
/*Starry Sky Tree*/
/*Range Add Min(Max) Query*/
/*区間加算、区間Min,区間Max*/
class RSUQ {
public:
// 遅延用の型
struct T {
int type; // 0 - empty , 1 - update
int value;
T() : type(0), value(0) {}
T(int type, int value) : type(type), value(... | delete | 108 | 109 | 108 | 108 | 0 | |
p02355 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
vector<int> counts(k + 1, 0);
vector<int> v(n);
for (int i = 0; i < n; i++) {
cin >> v[i];
}
int total = 0;
int ans = 1000000000;
for (int l = 0, r = 0; r < n; r++) {
if (... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
vector<int> counts(k + 1, 0);
vector<int> v(n);
for (int i = 0; i < n; i++) {
cin >> v[i];
}
int total = 0;
int ans = 1000000000;
for (int l = 0, r = 0; r < n; r++) {
if (... | replace | 28 | 29 | 28 | 31 | 0 | |
p02356 | C++ | Runtime Error | #include <cstdio>
#include <iostream>
using namespace std;
long long p[100005], N, Q, A;
int main() {
cin >> N >> Q;
for (int i = 0; i < N; i++)
scanf("%lld", p[i]);
for (int i = 0; i < Q; i++) {
long long sum = 0, R = 0;
cin >> A;
long long cnt = 0;
for (int i = 0; i < N; i++) {
while (... | #include <cstdio>
#include <iostream>
using namespace std;
long long p[100005], N, Q, A;
int main() {
cin >> N >> Q;
for (int i = 0; i < N; i++)
scanf("%lld", &p[i]);
for (int i = 0; i < Q; i++) {
long long sum = 0, R = 0;
cin >> A;
long long cnt = 0;
for (int i = 0; i < N; i++) {
while ... | replace | 7 | 8 | 7 | 8 | -11 | |
p02357 | C++ | Runtime Error | // clang-format off
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define main signed main()
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define prec(n) fixed << setprecision(n)... | // clang-format off
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define main signed main()
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define prec(n) fixed << setprecision(n)... | replace | 46 | 47 | 46 | 47 | 0 | |
p02357 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> P;
int main() {
int n, l, a[111111];
cin >> n >> l;
for (int i = 0; i < n; i++)
cin >> a[i];
priority_queue<P> q;
for (int i = 0; i < n; i++) {
q.push(P(-a[i], i));
if (i < l - 1)
continue;
while (q.top().second <= i - ... | #include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> P;
int main() {
int n, l, a[1111111];
cin >> n >> l;
for (int i = 0; i < n; i++)
cin >> a[i];
priority_queue<P> q;
for (int i = 0; i < n; i++) {
q.push(P(-a[i], i));
if (i < l - 1)
continue;
while (q.top().second <= i -... | replace | 4 | 5 | 4 | 5 | 0 | |
p02357 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
int a[400000];
int main() {
int n, l;
scanf("%d%d", &n, &l);
rep(i, n) scanf("%d", &a[i]);
multiset<int> se;
rep(i, l) se.insert(a[i]);
printf("%d", *se.begin());
for (int i = l; i < n; i++) {
se.insert(a[i]... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
int a[1000000];
int main() {
int n, l;
scanf("%d%d", &n, &l);
rep(i, n) scanf("%d", &a[i]);
multiset<int> se;
rep(i, l) se.insert(a[i]);
printf("%d", *se.begin());
for (int i = l; i < n; i++) {
se.insert(a[i... | replace | 4 | 5 | 4 | 5 | 0 | |
p02357 | C++ | Runtime Error | #include <algorithm>
#include <array>
#include <cstdint>
#include <functional>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdlib.h>
#include <string>
#include <time.h>
#include <utility>
#include <vector>
#define INF 1000000000
#define MOD 1000000007
... | #include <algorithm>
#include <array>
#include <cstdint>
#include <functional>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdlib.h>
#include <string>
#include <time.h>
#include <utility>
#include <vector>
#define INF 1000000000
#define MOD 1000000007
... | replace | 164 | 165 | 164 | 165 | -6 | terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
|
p02357 | C++ | Time Limit Exceeded | #include <iostream>
#include <set>
using namespace std;
int main() {
int N, L, a[1000000];
cin >> N >> L;
for (int i = 0; i < N; i++) {
cin >> a[i];
}
// solve
multiset<int> ms;
for (int i = 0; i < L; i++) {
ms.insert(a[i]);
}
cout << *ms.begin();
for (int i = L; i < N; i++) {
i... | #include <iostream>
#include <set>
using namespace std;
int main() {
int N, L, a[1000000];
cin >> N >> L;
for (int i = 0; i < N; i++) {
cin >> a[i];
}
// solve
multiset<int> ms;
for (int i = 0; i < L; i++) {
ms.insert(a[i]);
}
cout << *ms.begin();
for (int i = L; i < N; i++) {
m... | replace | 25 | 29 | 25 | 26 | TLE | |
p02357 | C++ | Runtime Error | #include <bits/stdc++.h>
#define MAX 1000010
#define inf 2147483647
#define linf (1e16)
#define eps (1e-8)
#define Eps (1e-12)
#define mod 1000000007
#define pi acos(-1.0)
#define phi (1.0 + sqrt(5.0)) / 2.0
#define f first
#define s second
#define mp make_pair
#define pb push_back
#define all(a) (a).begin(), (a).end()... | #include <bits/stdc++.h>
#define MAX 2000010
#define inf 2147483647
#define linf (1e16)
#define eps (1e-8)
#define Eps (1e-12)
#define mod 1000000007
#define pi acos(-1.0)
#define phi (1.0 + sqrt(5.0)) / 2.0
#define f first
#define s second
#define mp make_pair
#define pb push_back
#define all(a) (a).begin(), (a).end()... | replace | 1 | 2 | 1 | 2 | 0 | |
p02357 | C++ | Runtime Error | #define _USE_MATH_DEFINES
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <map>
#include <queue>
#include <vector>
using namespace std;
typedef pair<long long int, long long int> P;
long long int INF = 1e18;
long long int a[110000], deq[110000];
int main() {
... | #define _USE_MATH_DEFINES
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <map>
#include <queue>
#include <vector>
using namespace std;
typedef pair<long long int, long long int> P;
long long int INF = 1e18;
long long int a[1100000], deq[1100000];
int main() ... | replace | 16 | 17 | 16 | 17 | 0 | |
p02358 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
#define INF 999999999
#define MOD 1000000007
#define rep(i, n) for (int i = 0; i < n; ++i)
using namespace std;
typedef pair<int, int> P;
const int MAX_N = 2005;
vector<int> X, Y, X1, Y1, X2, Y2;
bool flag[MAX_N][MAX_N];
int n;
int main() {
int p, q, r, s;
scanf("%... | #include <bits/stdc++.h>
#define ll long long
#define INF 999999999
#define MOD 1000000007
#define rep(i, n) for (int i = 0; i < n; ++i)
using namespace std;
typedef pair<int, int> P;
const int MAX_N = 2005;
vector<int> X, Y, X1, Y1, X2, Y2;
bool flag[MAX_N * 2][MAX_N * 2];
int n;
int main() {
int p, q, r, s;
... | replace | 13 | 14 | 13 | 14 | 0 | |
p02358 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (n); i++)
ll N;
vector<ll> x, y;
ll x1[2000], y1[2000], x2[2000], y2[2000];
ll c[2020][2020];
int main() {
cin >> N;
rep(i, N) {
cin >> x1[i] >> y1[i] >> x2[i] >> y2[... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (n); i++)
ll N;
vector<ll> x, y;
ll x1[2000], y1[2000], x2[2000], y2[2000];
ll c[4020][4020]; // x1,x2があるのでNの倍必要
int main() {
cin >> N;
rep(i, N) {
cin >> x1[i] >> y1... | replace | 14 | 15 | 14 | 15 | 0 | |
p02358 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <vector>
#define ll long long
using namespace std;
//
int n;
ll px[2000], py[2000], qx[2000], qy[2000];
int dp[8000][8000];
vector<ll> compress(ll *x1, ll *x2) {
vector<ll> xs;
for (int i = 0; i < n; i++) {
for (int j = -1; j <= 1; j++) {
xs.push_back(x1[i... | #include <algorithm>
#include <iostream>
#include <vector>
#define ll long long
using namespace std;
//
int n;
ll px[2000], py[2000], qx[2000], qy[2000];
int dp[8000][8000];
vector<ll> compress(ll *x1, ll *x2) {
vector<ll> xs;
for (int i = 0; i < n; i++) {
for (int j = 0; j <= 1; j++) {
xs.push_back(x1[i]... | replace | 12 | 13 | 12 | 13 | -11 | |
p02358 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
//
int n;
vector<int> px, py, qx, qy;
int dp[8100][8100];
struct vevev {
vector<int> a;
vector<int> b;
vector<int> ab;
};
vevev compress(vector<int> x1, vector<int> x2) {
vector<int> xs;
for (int i = 0; i < n; i++) {
for (int ... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
//
int n;
vector<int> px, py, qx, qy;
int dp[8100][8100];
struct vevev {
vector<int> a;
vector<int> b;
vector<int> ab;
};
vevev compress(vector<int> x1, vector<int> x2) {
vector<int> xs;
for (int i = 0; i < n; i++) {
for (int ... | replace | 16 | 17 | 16 | 17 | -11 | |
p02358 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
int n;
int X1[2000], Y1[2000], X2[2000], Y2[2000];
int fld[2000][2000];
int compress(int *X1, int *X2, vector<int> &X) {
rep(i, n) {
X.push_back(X1[i]);
X.push_back(X2[i]);
}
sort(X.begin()... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
int n;
int X1[2000], Y1[2000], X2[2000], Y2[2000];
int fld[4000][4000];
int compress(int *X1, int *X2, vector<int> &X) {
rep(i, n) {
X.push_back(X1[i]);
X.push_back(X2[i]);
}
sort(X.begin()... | replace | 7 | 8 | 7 | 8 | 0 | |
p02358 | C++ | Runtime Error | #include <bits/stdc++.h>
#define range(i, a, b) for (int i = (a); i < (b); i++)
#define rep(i, b) for (int i = 0; i < (b); i++)
#define all(a) (a).begin(), (a).end()
#define show(x) cerr << #x << " = " << (x) << endl;
#define debug(x) \
cerr << #x << " = "... | #include <bits/stdc++.h>
#define range(i, a, b) for (int i = (a); i < (b); i++)
#define rep(i, b) for (int i = 0; i < (b); i++)
#define all(a) (a).begin(), (a).end()
#define show(x) cerr << #x << " = " << (x) << endl;
#define debug(x) \
cerr << #x << " = "... | replace | 11 | 12 | 11 | 12 | 0 | |
p02358 | C++ | Runtime Error | #include <bits/stdc++.h>
#define x first
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<int, pii> pip;
struct node {
int num, l, r, ls, rs;
node(int _l, int _r) {
num = 0;
l = _l;
r = _r;
}
};
vector<node> T;
vector<ll> d;
int make(int l, int r) {
int id = T... | #include <bits/stdc++.h>
#define x first
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<int, pii> pip;
struct node {
int num, l, r, ls, rs;
node(int _l, int _r) {
num = 0;
l = _l;
r = _r;
}
};
vector<node> T;
vector<ll> d;
int make(int l, int r) {
int id = T... | replace | 56 | 57 | 56 | 57 | -6 | terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
|
p02358 | C++ | Memory Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <utility>
#include <vector>
#define loop(i, a, b) for (int i = a; i < b; i++)
#define rep(i, a) loop(i, 0, a)
#de... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <utility>
#include <vector>
#define loop(i, a, b) for (int i = a; i < b; i++)
#define rep(i, a) loop(i, 0, a)
#de... | replace | 38 | 40 | 38 | 40 | MLE | |
p02360 | C++ | Runtime Error | #include <iostream>
#include <vector>
struct Square {
int x1, y1, x2, y2;
};
std::istream &operator>>(std::istream &is, Square &s) {
return is >> s.x1 >> s.y1 >> s.x2 >> s.y2;
}
int main() {
int n;
std::cin >> n;
constexpr int max_coord = 4;
std::vector<std::vector<int>> map(max_coord + 1,
... | #include <iostream>
#include <vector>
struct Square {
int x1, y1, x2, y2;
};
std::istream &operator>>(std::istream &is, Square &s) {
return is >> s.x1 >> s.y1 >> s.x2 >> s.y2;
}
int main() {
int n;
std::cin >> n;
constexpr int max_coord = 1000;
std::vector<std::vector<int>> map(max_coord + 1,
... | replace | 12 | 13 | 12 | 13 | 0 | |
p02361 | C++ | Runtime Error | #include <algorithm>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <string... | #include <algorithm>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <string... | replace | 67 | 82 | 67 | 80 | -11 | |
p02361 | C++ | Time Limit Exceeded | #include <iostream>
#include <queue>
#include <vector>
using namespace std;
#define pb push_back
#define INF 1010001000
#define loop(i, n) for (int i = 0; i < n; i++)
typedef pair<int, int> i_i;
typedef struct edge {
int st, en, cst;
} Edge;
int main() {
int v, e, r;
cin >> v >> e >> r;
vector<vector<i_i>> ... | #include <iostream>
#include <queue>
#include <vector>
using namespace std;
#define pb push_back
#define INF 1010001000
#define loop(i, n) for (int i = 0; i < n; i++)
typedef pair<int, int> i_i;
typedef struct edge {
int st, en, cst;
} Edge;
int main() {
int v, e, r;
cin >> v >> e >> r;
vector<vector<i_i>> ... | replace | 37 | 38 | 37 | 39 | TLE | |
p02361 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <stack>
#include <vector>
using namespace std;
#define int long long
inline int in() {
int32_t x;
scanf("%d", &x);
return x;
}
inline string getStr() {
char ch[200000];
scanf("%s", ch);
return ch;
}
inline ch... | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <stack>
#include <vector>
using namespace std;
#define int long long
inline int in() {
int32_t x;
scanf("%d", &x);
return x;
}
inline string getStr() {
char ch[200000];
scanf("%s", ch);
return ch;
}
inline ch... | replace | 35 | 36 | 35 | 36 | 0 | |
p02361 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
typedef long long lint;
#define MAXN 100010
// d,edge,g,P,q
lint d[MAXN];
struct edge {
int to;
lint cost;
};
vector<edge> g[MAXN];
typedef pair<lint, int> P;
priority_queue<P, vector<P>, greater<P>> q;
void pfs(int s) {
d[s] = 0;
q.push({0, s});
lint cd, v;
w... | #include "bits/stdc++.h"
using namespace std;
typedef long long lint;
#define MAXN 100010
// d,edge,g,P,q
lint d[MAXN];
struct edge {
int to;
lint cost;
};
vector<edge> g[MAXN];
typedef pair<lint, int> P;
priority_queue<P, vector<P>, greater<P>> q;
void pfs(int s) {
d[s] = 0;
q.push({0, s});
lint cd, v;
w... | replace | 48 | 49 | 48 | 49 | 0 | |
p02361 | 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) : (b... | #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) : (b... | replace | 60 | 61 | 60 | 61 | TLE | |
p02361 | C++ | Runtime Error | #include <climits>
#include <iostream>
#include <queue>
#include <vector>
#define INF 1e+18
using namespace std;
struct Edge {
int trg;
long long w;
};
struct vertex {
int v;
long long w;
bool operator<(const vertex &x) const { return w < x.w; }
bool operator>(const vertex &x) const { return w > x.w; }
};... | #include <climits>
#include <iostream>
#include <queue>
#include <vector>
#define INF 1e+18
using namespace std;
struct Edge {
int trg;
long long w;
};
struct vertex {
int v;
long long w;
bool operator<(const vertex &x) const { return w < x.w; }
bool operator>(const vertex &x) const { return w > x.w; }
};... | replace | 19 | 20 | 19 | 20 | 0 | |
p02361 | C++ | Memory Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int(i) = 0; (i) < (n); ++(i))
const int INF_32 = -1 + (1 << 30);
template <class Abel> struct D_Graph {
int V, E;
bool **exist;
vector<vector<pair<int, Abel>>> adj;
vector<vector<pair<int, Abel>>> adj_inv;
D_Graph(int V_size = 0) { init... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int(i) = 0; (i) < (n); ++(i))
const int INF_32 = -1 + (1 << 30);
template <class Abel> struct D_Graph {
int V, E;
bool **exist;
vector<vector<pair<int, Abel>>> adj;
vector<vector<pair<int, Abel>>> adj_inv;
D_Graph(int V_size = 0) { init... | replace | 33 | 35 | 33 | 35 | MLE | |
p02361 | C++ | Runtime Error | #include <iostream>
#define MAX_V 1000
#define MAX_E 2000
#define INF 1e9
using namespace std;
struct edge {
int from, to, cost;
};
edge es[MAX_E];
int d[MAX_V];
int V;
int E;
bool find_negative_loop(int s) {
d[s] = 0;
int count = 0;
while (true) {
bool update = false;
count++;
for (int i = 0; i < ... | #include <iostream>
#define MAX_V 100000
#define MAX_E 500000
#define INF 1e9
using namespace std;
struct edge {
int from, to, cost;
};
edge es[MAX_E];
int d[MAX_V];
int V;
int E;
bool find_negative_loop(int s) {
d[s] = 0;
int count = 0;
while (true) {
bool update = false;
count++;
for (int i = 0; ... | replace | 1 | 3 | 1 | 3 | 0 | |
p02361 | C++ | Runtime Error | #include <iostream>
#include <queue>
#include <set>
#include <vector>
using namespace std;
const int MAXN = 20020;
int NODOS = 0;
typedef int Costo;
const Costo INF = 1 << 30;
typedef pair<Costo, int> CostoNodo;
vector<CostoNodo> grafoCosto[MAXN];
const bool bi = false;
// Grafos con ponderacion.
// Nodos indexados d... | #include <iostream>
#include <queue>
#include <set>
#include <vector>
using namespace std;
const int MAXN = 200020;
int NODOS = 0;
typedef int Costo;
const Costo INF = 1 << 30;
typedef pair<Costo, int> CostoNodo;
vector<CostoNodo> grafoCosto[MAXN];
const bool bi = false;
// Grafos con ponderacion.
// Nodos indexados ... | replace | 6 | 7 | 6 | 7 | 0 | |
p02361 | C++ | Runtime Error | #include <iostream>
#include <queue>
#include <vector>
using namespace std;
typedef pair<long long, long long> P;
int v, e, r;
struct edge {
int to;
long long cost;
edge(int _to, long long _cost) : to(_to), cost(_cost) {}
};
vector<edge> G[100010];
long long d[10010];
void dijkstra(int start) {
priority_queue<... | #include <iostream>
#include <queue>
#include <vector>
using namespace std;
typedef pair<long long, long long> P;
int v, e, r;
struct edge {
int to;
long long cost;
edge(int _to, long long _cost) : to(_to), cost(_cost) {}
};
vector<edge> G[100010];
long long d[100100];
void dijkstra(int start) {
priority_queue... | replace | 12 | 13 | 12 | 13 | 0 | |
p02361 | C++ | Time Limit Exceeded | #include <algorithm>
#include <queue>
#include <stdio.h>
#include <vector>
using namespace std;
#define MAX_V 100001
#define INF (1e9 + 1)
int V, E, r, a, b, c;
vector<int> G_t[MAX_V];
vector<int> G_c[MAX_V];
int d[MAX_V];
void dijkstra() {
int i;
for (i = 0; i < MAX_V; i++)
d[i] = INF;
d[r] = 0;
priority... | #include <algorithm>
#include <queue>
#include <stdio.h>
#include <vector>
using namespace std;
#define MAX_V 100001
#define INF (1e9 + 1)
int V, E, r, a, b, c;
vector<int> G_t[MAX_V];
vector<int> G_c[MAX_V];
int d[MAX_V];
void dijkstra() {
int i;
for (i = 0; i < MAX_V; i++)
d[i] = INF;
d[r] = 0;
priority... | replace | 22 | 23 | 22 | 23 | TLE | |
p02361 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
#include <chrono>
//?????????
#pragma region MACRO
#define putans(x) \
std::cerr << "[ answer ]: "; \
cout << (x) << endl
#define dputans(x) ... | #include "bits/stdc++.h"
using namespace std;
#include <chrono>
//?????????
#pragma region MACRO
#define putans(x) \
std::cerr << "[ answer ]: "; \
cout << (x) << endl
#define dputans(x) ... | replace | 139 | 140 | 139 | 140 | 0 | |
p02361 | C++ | Runtime Error | #include <algorithm>
#include <functional>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
vector<pair<int, int>> x[500];
int n, m, s, a, b, c, dist[500], dist2[500][500];
priority_queue<pair<int, int>, vector<pair<int, int>>, greater<pair<int, int>>>
Q;
void dijkstra(int V, int E, int s... | #include <algorithm>
#include <functional>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
vector<pair<int, int>> x[300000];
int n, m, s, a, b, c, dist[300000], dist2[500][500];
priority_queue<pair<int, int>, vector<pair<int, int>>, greater<pair<int, int>>>
Q;
void dijkstra(int V, int E,... | replace | 6 | 8 | 6 | 8 | 0 | |
p02361 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<int, pii> pip;
typedef vector<int> vi;
typedef vector<vi> vii;
typedef vector<pii> vpii;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep2(i, a, b) for (int i = (a); i < (b); i... | #include <bits/stdc++.h>
using namespace std;
#define int long long
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<int, pii> pip;
typedef vector<int> vi;
typedef vector<vi> vii;
typedef vector<pii> vpii;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep2(i, a, b) for (int i = (a); i < (b); i... | replace | 31 | 32 | 31 | 32 | 0 | |
p02361 | Python | Runtime Error | import sys
import queue
class Dijkstra:
class Edge:
def __init__(self, end, cost):
self.to = end
self.cost = cost
def __init__(self, node_size, inf):
self._node = node_size
self._graph = [[] for _ in range(self._node)]
self.inf = inf
self.dist =... | import sys
import queue
class Dijkstra:
class Edge:
def __init__(self, end, cost):
self.to = end
self.cost = cost
def __init__(self, node_size, inf):
self._node = node_size
self._graph = [[] for _ in range(self._node)]
self.inf = inf
self.dist =... | replace | 23 | 24 | 23 | 24 | TLE | |
p02361 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int kInfinity = 0x3F3F3F3F;
const int kNil = -1;
const int kMaxV = 10010;
template <class T> struct Edge {
using w_type = T;
Edge(int u, int v, w_type w) : u(u), v(v), w(w) {}
int u, v;
w_type w;
bool operator<(const Edge<T> &rhs) const {
if (w != rhs... | #include <bits/stdc++.h>
using namespace std;
const int kInfinity = 0x3F3F3F3F;
const int kNil = -1;
const int kMaxV = 100010;
template <class T> struct Edge {
using w_type = T;
Edge(int u, int v, w_type w) : u(u), v(v), w(w) {}
int u, v;
w_type w;
bool operator<(const Edge<T> &rhs) const {
if (w != rh... | replace | 6 | 7 | 6 | 7 | 0 | |
p02361 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <queue>
#include <utility>
using namespace std;
const int Inf = 10000 * 100000 + 100;
int a, b, V, E, R, S, Start[500000 + 10], To[500000 + 10], Dis[500000 + 10],
N[500000 + 10];
int Ans[100000 + 10];
priority_queue<pair<int, int>> Q;
// first is the distance fr... | #include <algorithm>
#include <iostream>
#include <queue>
#include <utility>
using namespace std;
const int Inf = 10000 * 100000 + 100;
int a, b, V, E, R, S, Start[500000 + 10], To[500000 + 10], Dis[500000 + 10],
N[500000 + 10];
int Ans[100000 + 10];
priority_queue<pair<int, int>, vector<pair<int, int>>, greater... | replace | 12 | 20 | 12 | 14 | TLE | |
p02361 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
struct node {
int id;
ll dp;
};
struct edge {
int des;
ll w;
};
int n, m;
vector<edge> adj[10007];
ll Min[100007];
bool mark[100007];
bool operator<(node a, node b) { return a.dp >= b.dp; }
void prim(int u) {
fill(Min, Min + 100007, 1e1... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
struct node {
int id;
ll dp;
};
struct edge {
int des;
ll w;
};
int n, m;
vector<edge> adj[100007];
ll Min[100007];
bool mark[100007];
bool operator<(node a, node b) { return a.dp >= b.dp; }
void prim(int u) {
fill(Min, Min + 100007, 1e... | replace | 16 | 17 | 16 | 17 | 0 | |
p02361 | C++ | Time Limit Exceeded | /****Author: Barish Namazov****/
#include <bits/stdc++.h>
using namespace std;
/***TEMPLATE***/
#define intt long long
#define pii pair<intt, intt>
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define F first
#define S second
#define pb push_back
#define IO ... | /****Author: Barish Namazov****/
#include <bits/stdc++.h>
using namespace std;
/***TEMPLATE***/
#define intt long long
#define pii pair<intt, intt>
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define F first
#define S second
#define pb push_back
#define IO ... | replace | 92 | 93 | 92 | 93 | TLE | |
p02361 | C++ | Runtime Error | #include <iostream>
#include <queue>
#include <vector>
#define INF 50000000000
struct vertex {
std::vector<int> edge_to;
std::vector<int> edge_cost;
bool done;
long long int mincost;
};
std::vector<vertex> G(10000);
void shortest_path(int v);
int V, E;
int r;
int main(void) {
std::cin >> V >> E >> r;
for (i... | #include <iostream>
#include <queue>
#include <vector>
#define INF 50000000000
struct vertex {
std::vector<int> edge_to;
std::vector<int> edge_cost;
bool done;
long long int mincost;
};
std::vector<vertex> G(100000);
void shortest_path(int v);
int V, E;
int r;
int main(void) {
std::cin >> V >> E >> r;
for (... | replace | 10 | 11 | 10 | 11 | 0 | |
p02361 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vect... | #include <algorithm>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vect... | replace | 52 | 53 | 52 | 53 | TLE | |
p02361 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define inf 999999999
typedef pair<int, int> P;
int V, E, r;
int d[100000];
vector<P> edges[10000];
priority_queue<P, vector<P>, greater<P>> q;
void solve() {
P start = P(0, r);
d[r] = 0;
q.push(start);
while (!q.empty()) {
P p = q.top();
q.pop();
if (... | #include <bits/stdc++.h>
using namespace std;
#define inf 999999999
typedef pair<int, int> P;
int V, E, r;
int d[100000];
vector<P> edges[100000];
priority_queue<P, vector<P>, greater<P>> q;
void solve() {
P start = P(0, r);
d[r] = 0;
q.push(start);
while (!q.empty()) {
P p = q.top();
q.pop();
if ... | replace | 6 | 7 | 6 | 7 | 0 | |
p02361 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include ... | #include <algorithm>
#include <bitset>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include ... | replace | 92 | 93 | 92 | 93 | TLE | |
p02361 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <queue>
#define ll long long
#define INF 100000000000000
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
ll V, E, r;
cin >> V >> E >> r;
vector<vector<pair<ll, ll>>> edges(V);
vector<ll> dist(V, INF);
for (ll i = 0; i < E; i++) {
ll s... | #include <algorithm>
#include <iostream>
#include <queue>
#define ll long long
#define INF 100000000000000
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
ll V, E, r;
cin >> V >> E >> r;
vector<vector<pair<ll, ll>>> edges(V);
vector<ll> dist(V, INF);
for (ll i = 0; i < E; i++) {
ll s... | replace | 18 | 19 | 18 | 19 | TLE |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.