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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p01554 | C++ | Runtime Error | #include <iostream>
#include <string>
using namespace std;
int main() {
int N, M;
int frag = 0;
string U[255];
string T;
cin >> N;
for (int i = 0; i < N; i++) {
cin >> U[i];
}
cin >> M;
for (int j = 0; j < M; j++) {
cin >> T;
for (int i = 0; i < N; i++) {
if (T == U[i]) {
fra... | #include <iostream>
#include <string>
using namespace std;
int main() {
int N, M;
int frag = 0;
string U[256];
string T;
cin >> N;
for (int i = 0; i < N; i++) {
cin >> U[i];
}
cin >> M;
for (int j = 0; j < M; j++) {
cin >> T;
for (int i = 0; i < N; i++) {
if (T == U[i]) {
fra... | replace | 6 | 7 | 6 | 7 | 0 | |
p01554 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main(void) {
int n;
cin >> n;
string id[11];
for (int i = 0; i < n; i++) {
cin >> id[i];
}
int lock = 0;
int m;
cin >> m;
string x;
for (int i = 0; i < m; i++) {
int cnt = 0;
cin >> x;
for (int j = 0; j < n; j++) {
if (x == id[j]) {
... | #include <iostream>
using namespace std;
int main(void) {
int n;
cin >> n;
string id[257];
for (int i = 0; i < n; i++) {
cin >> id[i];
}
int lock = 0;
int m;
cin >> m;
string x;
for (int i = 0; i < m; i++) {
int cnt = 0;
cin >> x;
for (int j = 0; j < n; j++) {
if (x == id[j]) {... | replace | 5 | 6 | 5 | 6 | 0 | |
p01555 | C++ | Time Limit Exceeded | #include <stdio.h>
#include <string.h>
#define MAX_NUM 1000000000000000000ll
long long FizzBuzz(
long long
X) { // X - 1までのfizzとbuzzの数を数え、その文字数分(4)をかけている
return ((X - 1) / 3) * 4 + ((X - 1) / 5) * 4;
}
long long theOtherNum(
long long x) { // x - 1 までに出てくる通常数字(fizzbuzz以外)を数えている
return (x - 1) - ((... | #include <stdio.h>
#include <string.h>
#define MAX_NUM 1000000000000000000ll
long long FizzBuzz(
long long
X) { // X - 1までのfizzとbuzzの数を数え、その文字数分(4)をかけている
return ((X - 1) / 3) * 4 + ((X - 1) / 5) * 4;
}
long long theOtherNum(
long long x) { // x - 1 までに出てくる通常数字(fizzbuzz以外)を数えている
return (x - 1) - ((... | delete | 84 | 86 | 84 | 84 | TLE | |
p01555 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll length(ll n) {
if (n == 0) {
return 0;
}
ll k = 1, d = 1;
while (10 * k <= n) {
k *= 10;
d++;
}
k--;
ll n3 = n / 3 - k / 3;
ll n5 = n / 5 - k / 5;
ll n15 = n / 15 - k / 15;
return length(k) + 4 * (n3 + n5) + d * (n -... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll length(ll n) {
if (n == 0) {
return 0;
}
ll k = 1, d = 1;
while (10 * k <= n) {
k *= 10;
d++;
}
k--;
ll n3 = n / 3 - k / 3;
ll n5 = n / 5 - k / 5;
ll n15 = n / 15 - k / 15;
return length(k) + 4 * (n3 + n5) + d * (n -... | delete | 47 | 48 | 47 | 47 | 0 | 12Fizz4BuzzFizz78FizzBuzz11Fizz1314FizzBuzz1617Fizz19BuzzFizz2223FizzBuzz26Fizz2829FizzBuzz3132Fizz34
|
p01555 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll sum[20];
ll len(ll x) {
if (x == 0)
return 0;
ll ret = 0;
int keta = 0;
ll t = x;
ll ex = 1;
while (t) {
keta++;
t /= 10;
ex *= 10;
}
ex /= 10;
ret += sum[keta - 1];
// cout<<"keta "<<keta<<endl;
ll fiz = x /... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll sum[20];
ll len(ll x) {
if (x == 0)
return 0;
ll ret = 0;
int keta = 0;
ll t = x;
ll ex = 1;
while (t) {
keta++;
t /= 10;
ex *= 10;
}
ex /= 10;
ret += sum[keta - 1];
// cout<<"keta "<<keta<<endl;
ll fiz = x /... | replace | 50 | 51 | 50 | 51 | 0 | |
p01555 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace ... | #include <algorithm>
#include <bitset>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace ... | replace | 47 | 48 | 47 | 48 | 0 | |
p01555 | C++ | Runtime Error | #include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
// #include<cctype>
#include <climits>
#include <iostream>
#include <map>
#include <string>
#include <vector>
// #include<list>
#include <algorithm>
#include <deque>
#include <queue>
// #include<numeric>
#include <complex>
#include <utility>
// #i... | #include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
// #include<cctype>
#include <climits>
#include <iostream>
#include <map>
#include <string>
#include <vector>
// #include<list>
#include <algorithm>
#include <deque>
#include <queue>
// #include<numeric>
#include <complex>
#include <utility>
// #i... | replace | 82 | 83 | 82 | 83 | 0 | |
p01555 | C++ | Memory Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long int LL;
LL fz_add(LL x) { return (x / 3LL) + (x / 5LL); }
LL fz_cnt(LL x) { return (x / 3LL) + (x / 5LL) - (x / 15LL); }
LL count_char(LL x) {
LL count = 0;
for (LL z = 1, inc = 1; z <= x; ++inc) {
z *= 10;
if (z <= x) {
count += inc ... | #include <bits/stdc++.h>
using namespace std;
typedef long long int LL;
LL fz_add(LL x) { return (x / 3LL) + (x / 5LL); }
LL fz_cnt(LL x) { return (x / 3LL) + (x / 5LL) - (x / 15LL); }
LL count_char(LL x) {
LL count = 0;
for (LL z = 1, inc = 1; z <= x; ++inc) {
z *= 10;
if (z <= x) {
count += inc ... | replace | 47 | 48 | 47 | 48 | MLE | |
p01555 | C++ | Memory Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#ifdef DEBUG_MODE
#define DBG(n) n;
#else
#define DBG(n) ;
#endif
#define REP(i, n) for (ll(i) = (0); (i) < (n); ++i)
#define rep(i, s, g) for (ll(i) = (s); (i) < (g); ++i)
#define rrep(i, s, g) for (ll(i) = (s); i >= (g); --(i))
#define PB push_back
#define MP make_pair
... | #include <bits/stdc++.h>
using namespace std;
#ifdef DEBUG_MODE
#define DBG(n) n;
#else
#define DBG(n) ;
#endif
#define REP(i, n) for (ll(i) = (0); (i) < (n); ++i)
#define rep(i, s, g) for (ll(i) = (s); (i) < (g); ++i)
#define rrep(i, s, g) for (ll(i) = (s); i >= (g); --(i))
#define PB push_back
#define MP make_pair
... | replace | 83 | 84 | 83 | 84 | MLE | |
p01555 | C++ | Runtime Error | #define _CRT_SECURE_NO_WARNINGS
// #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> pii;
#define all(c) (c).begin(), (c).end()
#define loop(i, a, b) for (ll i = a; i < ll(b); i++)
#define rep(i, b) loop(i, 0... | #define _CRT_SECURE_NO_WARNINGS
// #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> pii;
#define all(c) (c).begin(), (c).end()
#define loop(i, a, b) for (ll i = a; i < ll(b); i++)
#define rep(i, b) loop(i, 0... | replace | 72 | 73 | 72 | 73 | 0 | |
p01556 | C++ | Runtime Error | #include <cmath>
#include <cstdlib>
#include <iostream>
#include <vector>
using namespace std;
constexpr long double EPS = 1e-7;
struct point {
long double x, y;
point(long double x = 0.0, long double y = 0.0) : x(x), y(y) {}
point(const point &p) : x(p.x), y(p.y) {}
point operator+(const point &p) const { r... | #include <cmath>
#include <cstdlib>
#include <iostream>
#include <vector>
using namespace std;
constexpr long double EPS = 1e-7;
struct point {
long double x, y;
point(long double x = 0.0, long double y = 0.0) : x(x), y(y) {}
point(const point &p) : x(p.x), y(p.y) {}
point operator+(const point &p) const { r... | delete | 125 | 126 | 125 | 125 | 0 | 50 50
|
p01557 | C++ | Memory Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, k, n) for (int i = (k); i < (n); i++)
#define REP(i, n) FOR(i, 0, n)
#define ALL(a) a.begin(), a.end()
#define MS(m, v) memset(m, v, sizeof(m))
#define D10 fixed << setprecision(10)
typedef long long ll;
typedef long double ld;
typedef vector<short> vi;
typed... | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, k, n) for (int i = (k); i < (n); i++)
#define REP(i, n) FOR(i, 0, n)
#define ALL(a) a.begin(), a.end()
#define MS(m, v) memset(m, v, sizeof(m))
#define D10 fixed << setprecision(10)
typedef long long ll;
typedef long double ld;
typedef vector<short> vi;
typed... | replace | 31 | 32 | 31 | 32 | MLE | |
p01557 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <queue>
#include <set>
#include <vector>
using namespace std;
short n;
vector<short> a;
queue<pair<vector<short>, short>> Q;
vector<pair<vector<short>, short>> a1, a2;
set<vector<short>> E;
void init(vector<short> R, short Lim, short D) {
Q.push(make_pair(R, 0));
E.... | #include <algorithm>
#include <iostream>
#include <queue>
#include <set>
#include <vector>
using namespace std;
short n;
vector<short> a;
queue<pair<vector<short>, short>> Q;
vector<pair<vector<short>, short>> a1, a2;
set<vector<short>> E;
void init(vector<short> R, short Lim, short D) {
Q.push(make_pair(R, 0));
E.... | replace | 48 | 49 | 48 | 49 | TLE | |
p01557 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <map>
#include <queue>
using namespace std;
typedef long long ll;
int n;
ll perm[11];
int dist[4000000];
bool check[4000000];
map<ll, int> ma;
void permutation2() {
for (int i = 0; i < n; i++) {
perm[i] = i;
}
int j = 0;
do {
ll d = 0;... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <map>
#include <queue>
using namespace std;
typedef long long ll;
int n;
ll perm[11];
int dist[4000000];
bool check[4000000];
map<ll, int> ma;
void permutation2() {
for (int i = 0; i < n; i++) {
perm[i] = i;
}
int j = 0;
do {
ll d = 0;... | replace | 44 | 45 | 44 | 45 | TLE | |
p01557 | C++ | Time Limit Exceeded | #include <algorithm>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <fstream>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <str... | #include <algorithm>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <fstream>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <str... | replace | 105 | 106 | 105 | 106 | TLE | |
p01557 | C++ | Memory Limit Exceeded | #include <algorithm>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <vector>
using namespace std;
int n;
vector<int> a;
struct state {
vector<int> v;
int dist1;
int dist2;
state(vector<int> v1, int d1, int d2) : v(v1), dist1(d1), dist2(d2) {}
};
bool operator<(const sta... | #include <algorithm>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <vector>
using namespace std;
int n;
vector<int> a;
struct state {
vector<int> v;
int dist1;
int dist2;
state(vector<int> v1, int d1, int d2) : v(v1), dist1(d1), dist2(d2) {}
};
bool operator<(const sta... | replace | 49 | 50 | 49 | 56 | MLE | |
p01557 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define REACH cout << __LINE__ << endl
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define REP(i, b) FOR(i, 0, b)
#define PB push_back
#define ALL(c) c.begin(), c.end()
#define MP make_pair
using namespace std;
typedef long long LL;
typedef long double ld;
typedef int ut;
typedef vecto... | #include <bits/stdc++.h>
#define REACH cout << __LINE__ << endl
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define REP(i, b) FOR(i, 0, b)
#define PB push_back
#define ALL(c) c.begin(), c.end()
#define MP make_pair
using namespace std;
typedef long long LL;
typedef long double ld;
typedef int ut;
typedef vecto... | replace | 83 | 84 | 83 | 84 | TLE | |
p01557 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define int long long
int n;
int po[11], a[11];
void print(int x) {
for (int i = 0; i < n; i++)
cout << x % 11 << " ", x /= 11;
cout << endl;
}
void sw(int &x, int i, int j) {
int s = (x % po[i + 1]) / po[i] * (po[j] - po[i]);
int t = (x % po[j + 1]) / po[j] * (... | #include <bits/stdc++.h>
using namespace std;
#define int long long
int n;
int po[11], a[11];
void print(int x) {
for (int i = 0; i < n; i++)
cout << x % 11 << " ", x /= 11;
cout << endl;
}
void sw(int &x, int i, int j) {
int s = (x % po[i + 1]) / po[i] * (po[j] - po[i]);
int t = (x % po[j + 1]) / po[j] * (... | replace | 43 | 44 | 43 | 44 | TLE | |
p01558 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ulli;
const ulli B = 1000000007ULL;
const int MAXN = 100005;
int n, m;
string s;
ulli Bn[MAXN];
ulli sum_h[MAXN];
int main() {
for (int i = 0; i < MAXN; ++i) {
if (i == 0)
Bn[i] = 1;
else
Bn[i] = Bn[i - 1] * B;
}
while... | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ulli;
const ulli B = 1000000007ULL;
const int MAXN = 300005;
int n, m;
string s;
ulli Bn[MAXN];
ulli sum_h[MAXN];
int main() {
for (int i = 0; i < MAXN; ++i) {
if (i == 0)
Bn[i] = 1;
else
Bn[i] = Bn[i - 1] * B;
}
while... | replace | 6 | 7 | 6 | 7 | 0 | |
p01558 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
struct RollingHash {
vector<unsigned> hashed, power;
RollingHash(const string &s, unsigned _base = 1000000007) {
_base = _base;
int sz = s.size();
hashed.assign(sz + 1, 0);
power.assign(sz + 1, 0);
power[0] = 1;
for (int i = 0; i < sz; i++) {
... | #include <bits/stdc++.h>
using namespace std;
struct RollingHash {
vector<unsigned> hashed, power;
RollingHash(const string &s, unsigned _base = 1000000007) {
_base = _base;
int sz = s.size();
hashed.assign(sz + 1, 0);
power.assign(sz + 1, 0);
power[0] = 1;
for (int i = 0; i < sz; i++) {
... | replace | 27 | 28 | 27 | 28 | 0 | |
p01558 | C++ | Runtime Error |
// @snippet<sh19910711/contest:headers.cpp>
#include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <map>
#include <numeric>
#include <... |
// @snippet<sh19910711/contest:headers.cpp>
#include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <map>
#include <numeric>
#include <... | replace | 126 | 128 | 126 | 128 | 0 | |
p01558 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ull;
const ull P1 = 1000532779;
const ull P2 = 1777777777;
const ull B1 = 1000000009;
const ull B2 = 1000000007;
int main() {
char s[100001];
static pair<ull, ull> hs[100001], pow[100001];
int n, m;
scanf("%d %d", &n, &m);
scanf("%s", s);
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ull;
const ull P1 = 1000532779;
const ull P2 = 1777777777;
const ull B1 = 1000000009;
const ull B2 = 1000000007;
int main() {
char s[300001];
static pair<ull, ull> hs[300001], pow[300001];
int n, m;
scanf("%d %d", &n, &m);
scanf("%s", s);
... | replace | 11 | 13 | 11 | 13 | 0 | |
p01558 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <set>
#include <string>
#include <vector>
using namespace std;
int main() {
int N, M, L, R, C;
string S;
char Q[4];
scanf("%d", &N);
scanf("%d", &M);
cin >> S;
L = 0;
R = 0;
C = 0;
vector<vector<int>> F(N + 1, vector<int>());
for (int i = 0;... | #include <algorithm>
#include <iostream>
#include <set>
#include <string>
#include <vector>
using namespace std;
int main() {
int N, M, L, R, C;
string S;
char Q[4];
scanf("%d", &N);
scanf("%d", &M);
cin >> S;
L = 0;
R = 0;
C = 0;
vector<vector<int>> F(N + 1, vector<int>());
for (int i = 0;... | replace | 50 | 51 | 50 | 53 | -11 | |
p01558 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
const ull B = 100000007;
int main() {
int n, m;
cin >> n >> m;
string s;
cin >> s;
ull hash[100100];
ull po[100100];
hash[0] = 0;
po[0] = 1;
int l = 0, r = 1;
for (int i = 1; i <= n; i++) {
po[i] = po[i - 1] * B;
... | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
const ull B = 100000007;
int main() {
int n, m;
cin >> n >> m;
string s;
cin >> s;
ull hash[300010];
ull po[300010];
hash[0] = 0;
po[0] = 1;
int l = 0, r = 1;
for (int i = 1; i <= n; i++) {
po[i] = po[i - 1] * B;
... | replace | 11 | 13 | 11 | 13 | 0 | |
p01558 | C++ | Runtime Error | #include <bits/stdc++.h>
#define BASE 1000000007ULL
#define MAXN 100100
using namespace std;
typedef unsigned long long ull;
// Rolling Hash
set<ull> hash;
ull acc_h[MAXN]; // hash value for interval (-1,i)
ull power[MAXN]; // M power of i
void init_roll(string s, int n) {
acc_h[0] = 0;
power[0] = 1;
for (int ... | #include <bits/stdc++.h>
#define BASE 1000000007ULL
#define MAXN 300100
using namespace std;
typedef unsigned long long ull;
// Rolling Hash
set<ull> hash;
ull acc_h[MAXN]; // hash value for interval (-1,i)
ull power[MAXN]; // M power of i
void init_roll(string s, int n) {
acc_h[0] = 0;
power[0] = 1;
for (int ... | replace | 2 | 3 | 2 | 3 | 0 | |
p01559 | C++ | Runtime Error | #include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <memory.h>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
#define rep(i, n) for (in... | #include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <memory.h>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
#define rep(i, n) for (in... | replace | 73 | 74 | 73 | 74 | 0 | |
p01560 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define dump(n) cout << "# " << #n << '=' << (n) << endl
#define repi(i, a, b) for (int i = int(a); i < int(b); i++)
#define peri(i, a, b) for (int i = int(b); i-- > int(a);)
#define rep(i, n) repi(i, 0, n)
#define per(i, n) peri(i, 0, n)
#define all(c) begin(c), end(c)
#d... | #include <bits/stdc++.h>
using namespace std;
#define dump(n) cout << "# " << #n << '=' << (n) << endl
#define repi(i, a, b) for (int i = int(a); i < int(b); i++)
#define peri(i, a, b) for (int i = int(b); i-- > int(a);)
#define rep(i, n) repi(i, 0, n)
#define per(i, n) peri(i, 0, n)
#define all(c) begin(c), end(c)
#d... | replace | 49 | 50 | 49 | 50 | 0 | |
p01561 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define all(v) begin(v), end(v)
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define reps(i, s, n) for (int i = (int)(s); i < (int)(n); i++)
#define min(...) min({__VA_ARGS__})
#define max(...) max({__VA_ARGS__})
template <class T1, class T2> void chmin(T1 &a, T2... | #include <bits/stdc++.h>
using namespace std;
#define all(v) begin(v), end(v)
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define reps(i, s, n) for (int i = (int)(s); i < (int)(n); i++)
#define min(...) min({__VA_ARGS__})
#define max(...) max({__VA_ARGS__})
template <class T1, class T2> void chmin(T1 &a, T2... | replace | 92 | 93 | 92 | 93 | 0 | |
p01561 | C++ | Memory Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define MAX_H 55
#define MAX_W 55
#define MAX_S 15
struct State {
int d, x, y, s, f;
State(int d, int x, int y, int s, int f) : d(d), x(x), y(y), s(s), f(f) {}
};
char M[MAX_H][MAX_W];
bool visited[MAX_H][MAX_W][1 << MAX_S][2];
int getFloor(int x, int y, int f) {
... | #include <bits/stdc++.h>
using namespace std;
#define MAX_H 50
#define MAX_W 50
#define MAX_S 10
struct State {
int d, x, y, s, f;
State(int d, int x, int y, int s, int f) : d(d), x(x), y(y), s(s), f(f) {}
};
char M[MAX_H][MAX_W];
bool visited[MAX_H][MAX_W][1 << MAX_S][2];
int getFloor(int x, int y, int f) {
... | replace | 4 | 7 | 4 | 7 | MLE | |
p01562 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-4, PI = acos(-1), INF = 1e9;
inline bool eq(double a, double b) { return abs(b - a) < EPS; }
struct Point {
double x, y;
Point(){};
Point(double x, double y) : x(x), y(y){};
Point operator+(const Point &b) const { return Point(x + b.x, y... | #include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-5, PI = acos(-1), INF = 1e9;
inline bool eq(double a, double b) { return abs(b - a) < EPS; }
struct Point {
double x, y;
Point(){};
Point(double x, double y) : x(x), y(y){};
Point operator+(const Point &b) const { return Point(x + b.x, y... | replace | 4 | 5 | 4 | 5 | 0 | |
p01564 | C++ | Time Limit Exceeded | #include <algorithm>
#include <array>
#include <climits>
#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 <type_traits>
#include <utility>
#include <vector>
usi... | #include <algorithm>
#include <array>
#include <climits>
#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 <type_traits>
#include <utility>
#include <vector>
usi... | insert | 218 | 218 | 218 | 219 | TLE | |
p01564 | C++ | Time Limit Exceeded | #include <algorithm>
#include <array>
#include <climits>
#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 <type_traits>
#include <utility>
#include <vector>
usi... | #include <algorithm>
#include <array>
#include <climits>
#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 <type_traits>
#include <utility>
#include <vector>
usi... | replace | 286 | 287 | 286 | 287 | TLE | |
p01564 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define all(c) (c).begin(), (c).end()
#define mp make_pair
#define pb push_back
#define each(i, c) \
for (__typeof((c).begin()) i = (c).begin(); i != (c).end(); i++)
#define dbg(x) ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define all(c) (c).begin(), (c).end()
#define mp make_pair
#define pb push_back
#define each(i, c) \
for (__typeof((c).begin()) i = (c).begin(); i != (c).end(); i++)
#define dbg(x) ... | replace | 138 | 140 | 138 | 140 | -11 | |
p01564 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define all(v) begin(v), end(v)
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define reps(i, s, n) for (int i = (int)(s); i < (int)(n); i++)
#define min(...) min({__VA_ARGS__})
#define max(...) max({__VA_ARGS__})
const int inf = 1LL << 55;
c... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define all(v) begin(v), end(v)
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define reps(i, s, n) for (int i = (int)(s); i < (int)(n); i++)
#define min(...) min({__VA_ARGS__})
#define max(...) max({__VA_ARGS__})
const int inf = 1LL << 55;
c... | replace | 135 | 136 | 135 | 136 | -6 | free(): invalid pointer
|
p01564 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
template <typename Monoid, typename OperatorMonoid = Monoid>
struct LazySegmentTree {
using F = function<Monoid(Monoid, Monoid)>;
using G = function<Monoid(Monoid, OperatorMonoid, int)>;
using H = function<OperatorMonoid(OperatorMonoid, Ope... | #include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
template <typename Monoid, typename OperatorMonoid = Monoid>
struct LazySegmentTree {
using F = function<Monoid(Monoid, Monoid)>;
using G = function<Monoid(Monoid, OperatorMonoid, int)>;
using H = function<OperatorMonoid(OperatorMonoid, Ope... | replace | 309 | 310 | 309 | 310 | 0 | |
p01568 | C++ | Runtime Error | #include "bits/stdc++.h"
#include <unordered_map>
#pragma warning(disable : 4996)
using namespace std;
/* 幾何の基本 */
#include <complex>
typedef long double ld;
typedef complex<ld> Point;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(x) (x).begin(), (x).end()
const ld eps = 1e-12, pi = acos(-1.0);
c... | #include "bits/stdc++.h"
#include <unordered_map>
#pragma warning(disable : 4996)
using namespace std;
/* 幾何の基本 */
#include <complex>
typedef long double ld;
typedef complex<ld> Point;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(x) (x).begin(), (x).end()
const ld eps = 1e-12, pi = acos(-1.0);
c... | replace | 591 | 592 | 591 | 592 | 0 | |
p01570 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <queue>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
int main() {
int n;
scanf("%d", &n);
static vector<int> G[160000], G_rev[160000];
static int cost[160000];
rep(u, n) {
int v;
scanf("%d%d", cost + u, &... | #include <algorithm>
#include <cstdio>
#include <queue>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
int main() {
int n;
scanf("%d", &n);
static vector<int> G[1000000], G_rev[1000000];
static int cost[1000000];
rep(u, n) {
int v;
scanf("%d%d", cost + u... | replace | 13 | 15 | 13 | 15 | 0 | |
p01570 | C++ | Runtime Error | #include <algorithm>
#include <assert.h>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdio.h>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
static const dou... | #include <algorithm>
#include <assert.h>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdio.h>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
static const dou... | replace | 30 | 32 | 30 | 32 | 0 | |
p01570 | C++ | Time Limit Exceeded | #include <algorithm>
#include <assert.h>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdio.h>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
static const dou... | #include <algorithm>
#include <assert.h>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdio.h>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
static const dou... | replace | 37 | 38 | 37 | 38 | TLE | |
p01570 | C++ | Time Limit Exceeded | #include <algorithm>
#include <assert.h>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdio.h>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
static const dou... | #include <algorithm>
#include <assert.h>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdio.h>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
static const dou... | replace | 37 | 38 | 37 | 38 | TLE | |
p01570 | C++ | Runtime Error | #pragma comment(linker, "/STACK:204800000,204800000");
#include <algorithm>
#include <cstdio>
#include <vector>
using namespace std;
int n, sum, l[1000000], vis[1000000], S[4000000], stage[4000000], top;
long long ans;
vector<int> g[1000000];
int DFS(int v) {
for (int i = 0; i < g[v].size(); i++)
l[v] += DFS(g[v]... | #pragma comment(linker, "/STACK:204800000,204800000");
#include <algorithm>
#include <cstdio>
#include <vector>
using namespace std;
int n, sum, l[1000000], vis[1000000], S[4000000], stage[4000000], top;
long long ans;
vector<int> g[1000000];
int DFS(int v) {
for (int i = 0; i < g[v].size(); i++)
l[v] += DFS(g[v]... | replace | 27 | 28 | 27 | 28 | 0 | |
p01571 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define FOR(i, k, n) for (int i = (k); i < (i... | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define FOR(i, k, n) for (int i = (k); i < (i... | replace | 38 | 39 | 38 | 39 | TLE | |
p01591 | C++ | Runtime Error | #include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < int(n); ++i)
#define REP(i, b, n) for (int i = b; i < n; i++)
typedef long double D;
typedef pair<D, D> P;
#define sq(x) ((x) * (x))
typedef vector<D> Vector;
typede... | #include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < int(n); ++i)
#define REP(i, b, n) for (int i = b; i < n; i++)
typedef long double D;
typedef pair<D, D> P;
#define sq(x) ((x) * (x))
typedef vector<D> Vector;
typede... | replace | 58 | 59 | 58 | 59 | 0 | |
p01591 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define sgn(v) (abs((v)) < eps ? 0 : ((v) < 0 ? -1 : 1)... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define sgn(v) (abs((v)) < eps ? 0 : ((v) < 0 ? -1 : 1)... | replace | 35 | 36 | 35 | 36 | 0 | |
p01600 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define INF (1 << 29)
#define all(c) (c).begin(), (c).end()
#define D(x) cout << #x " is " << (x) << endl
#define rep(i, n... | #include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define INF (1 << 29)
#define all(c) (c).begin(), (c).end()
#define D(x) cout << #x " is " << (x) << endl
#define rep(i, n... | replace | 24 | 25 | 24 | 25 | 0 | |
p01601 | C++ | Runtime Error | #include <iostream>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
vector<bool> kai(1001, false);
for (int i = 1; i < 10; i++) {
kai[i] = true;
}
for (int i = 1; i < 10; i++) {
kai[10 * i + i] = true;
}
for (int i = 1; i < 10; i++) {
for (int j = 0; j < 10; j++) {
... | #include <iostream>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
vector<bool> kai(10001, false);
for (int i = 1; i < 10; i++) {
kai[i] = true;
}
for (int i = 1; i < 10; i++) {
kai[10 * i + i] = true;
}
for (int i = 1; i < 10; i++) {
for (int j = 0; j < 10; j++) {
... | replace | 8 | 9 | 8 | 9 | -6 | malloc(): corrupted top size
|
p01601 | C++ | Time Limit Exceeded | #include <cstdio>
#include <cstdlib>
#include <cstring>
using namespace std;
int floor_num(int n) {
int ret = 0, i;
if (n == 0) {
return 1;
} else if (n < 0) {
ret++;
}
for (i = 0; n != 0; i++) {
n /= 10;
}
ret += i;
return ret;
}
char *int_to_str(int n) {
int i, tmp, len;
char *str;
... | #include <cstdio>
#include <cstdlib>
#include <cstring>
using namespace std;
int floor_num(int n) {
int ret = 0, i;
if (n == 0) {
return 1;
} else if (n < 0) {
ret++;
}
for (i = 0; n != 0; i++) {
n /= 10;
}
ret += i;
return ret;
}
char *int_to_str(int n) {
int i, tmp, len;
char *str;
... | delete | 94 | 96 | 94 | 94 | TLE | |
p01602 | C++ | Runtime Error | #include <iostream>
#include <stack>
using namespace std;
int main() {
int n;
cin >> n;
char c;
int x;
cin >> c >> x;
bool flag = true;
if (c == ')' || n == 1) {
cout << "NO" << endl;
return 0;
}
stack<int> st;
st.push(x);
for (int i = 1; i < n; i++) {
cin >> c >> x;
int y = st.t... | #include <iostream>
#include <stack>
using namespace std;
int main() {
int n;
cin >> n;
char c;
int x;
cin >> c >> x;
bool flag = true;
if (c == ')' || n == 1) {
cout << "NO" << endl;
return 0;
}
stack<int> st;
st.push(x);
for (int i = 1; i < n; i++) {
cin >> c >> x;
int y = st.t... | replace | 34 | 35 | 34 | 35 | 0 | |
p01606 | C++ | Runtime Error | #define _GLIBCXX_DEBUG
#include <iostream>
#include <vector>
using namespace std;
int main() {
int N, W;
cin >> N >> W;
vector<int> ans(N + 1, 0);
ans[0] = W;
for (int i = 1; i <= W / 2; ++i) {
++ans[i + 1];
}
for (int i = W / 2 + 1; i < W; ++i) {
for (int j = 3; j * i <= N; ++j) {
++ans[j ... | #define _GLIBCXX_DEBUG
#include <iostream>
#include <vector>
using namespace std;
int main() {
int N, W;
cin >> N >> W;
vector<int> ans(N + 2, 0);
ans[0] = W;
for (int i = 1; i <= W / 2; ++i) {
++ans[i + 1];
}
for (int i = W / 2 + 1; i < W; ++i) {
for (int j = 3; j * i <= N; ++j) {
++ans[j ... | replace | 8 | 9 | 8 | 9 | 0 | |
p01606 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
inline vector<int> factorize(int x) {
vector<int> ret;
for (int i = 1; i * i <= x; i++) {
ret.push_back(i);
if (i * i != x)
ret.push_back(x / i);
}
return (ret);
}
int main() {
int N, W;
int cnt = 0;
bool manage[100001] = {0};
scanf("%d %... | #include <bits/stdc++.h>
using namespace std;
inline vector<int> factorize(int x) {
vector<int> ret;
for (int i = 1; i * i <= x; i++) {
if (x % i == 0) {
ret.push_back(i);
if (i * i != x)
ret.push_back(x / i);
}
}
return (ret);
}
int main() {
int N, W;
int cnt = 0;
bool ma... | replace | 8 | 11 | 8 | 13 | TLE | |
p01606 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <s... | #include <algorithm>
#include <bitset>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <s... | replace | 25 | 26 | 25 | 26 | 0 | |
p01606 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#incl... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#incl... | replace | 162 | 163 | 162 | 163 | 0 | |
p01606 | C++ | Runtime Error | #define _GLIBCXX_DEBUG
#include <iostream>
#include <vector>
using namespace std;
int main() {
int N, W;
cin >> N >> W;
vector<int> ans(N + W, 0);
ans[0] = W;
for (int i = 1; i <= W / 2; ++i) {
++ans[i + 1];
}
for (int i = W / 2 + 1; i < W; ++i) {
for (int j = 3; j * i <= N; ++j) {
++ans[j ... | #define _GLIBCXX_DEBUG
#include <iostream>
#include <vector>
using namespace std;
int main() {
int N, W;
cin >> N >> W;
vector<int> ans(2 * (N + W), 0);
ans[0] = W;
for (int i = 1; i <= W / 2; ++i) {
++ans[i + 1];
}
for (int i = W / 2 + 1; i < W; ++i) {
for (int j = 3; j * i <= N; ++j) {
++... | replace | 8 | 9 | 8 | 9 | 0 | |
p01609 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef long double ld;
const ld eps = 1e-9;
vector<ld> quadraticEquation(ld a, ld b, ld c) {
ld d = b * b - 4 * a * c;
if (abs(a) < eps)
return {-c / b};
if (abs(d) < eps)
return {(-b + sqrt(d)) / (2 * a)}... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef long double ld;
const ld eps = 1e-9;
vector<ld> quadraticEquation(ld a, ld b, ld c) {
ld d = b * b - 4 * a * c;
if (abs(a) < eps)
return {-c / b};
if (abs(d) < eps)
return {(-b + sqrt(d)) / (2 * a)}... | replace | 21 | 22 | 21 | 22 | TLE | |
p01609 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define FOR(i, k, n) for (int i = (k); i < (i... | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define FOR(i, k, n) for (int i = (k); i < (i... | replace | 114 | 116 | 114 | 118 | 0 | |
p01610 | C++ | Time Limit Exceeded | #include <cstdio>
using namespace std;
char cmd[7] = {"UFRDBL"};
int dy[6][6][8] = {{{0, 0, 0, 1, 0, 0, 0, 0},
{0, 0, -1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{... | #include <cstdio>
using namespace std;
char cmd[7] = {"UFRDBL"};
int dy[6][6][8] = {{{0, 0, 0, 1, 0, 0, 0, 0},
{0, 0, -1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{... | delete | 110 | 112 | 110 | 110 | TLE | |
p01612 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <map>
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#include <cstdio>
#include <queue>
#include <set>
inline int getInt() {
int s;
scanf("%d", &s);
return s;
}
using namespace std;
bool one(double x) { return x + 1e-9 > 1.0; }
int main() {
const int n... | #include <algorithm>
#include <iostream>
#include <map>
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#include <cstdio>
#include <queue>
#include <set>
inline int getInt() {
int s;
scanf("%d", &s);
return s;
}
using namespace std;
bool one(double x) { return x + 1e-9 > 1.0; }
int main() {
const int n... | replace | 63 | 64 | 63 | 64 | 0 | |
p01620 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <complex>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define ll long long
#define vvi vector<vector<int>>
#define All(X) X.begin(), X.end()
#define FOR... | #include <algorithm>
#include <cmath>
#include <complex>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define ll long long
#define vvi vector<vector<int>>
#define All(X) X.begin(), X.end()
#define FOR... | insert | 43 | 43 | 43 | 45 | TLE | |
p01622 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define INF 0x33433433
int n;
int rmin;
int rmax;
int rsum;
int wsum;
int r[114514];
int w[114514];
bool G[114514];
void SubsetSum(int N, int *as, int n) {
int maxsum = 1000;
int sum = 0;
fill(G, G + N + 1, false);
G[0] = true;
for (int i = 1; i <= n; i++) {
... | #include <bits/stdc++.h>
using namespace std;
#define INF 0x33433433
int n;
int rmin;
int rmax;
int rsum;
int wsum;
int r[114514];
int w[114514];
bool G[114514];
void SubsetSum(int N, int *as, int n) {
int maxsum = 1000;
int sum = 0;
fill(G, G + N + 1, false);
G[0] = true;
for (int i = 1; i <= n; i++) {
... | replace | 21 | 22 | 21 | 22 | 0 | |
p01622 | C++ | Memory Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <queue>
#define rep(i, a, b) for (int(i) = (a); (i) < (b); (i)++)
#define min_(a, b) ((a) < (b) ? (a) : (b))
using namespace std;
int N;
struct Book {
int page;
int write;
};
Book book[1000];
... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <queue>
#define rep(i, a, b) for (int(i) = (a); (i) < (b); (i)++)
#define min_(a, b) ((a) < (b) ? (a) : (b))
using namespace std;
int N;
struct Book {
int page;
int write;
};
Book book[1000];
... | replace | 17 | 18 | 17 | 18 | MLE | |
p01622 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
using namespace std;
pair<int, int> x[1000];
int n, a, b, s1, s2, dp[1100000];
int main() {
while (true) {
cin >> n;
s1 = 0;
s2 = 0;
if (n == 0)
break;
for (int i = 0; i < n; i++) {
cin >> a >... | #include <algorithm>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
using namespace std;
pair<int, int> x[1000];
int n, a, b, s1, s2, dp[1100000];
int main() {
while (true) {
cin >> n;
s1 = 0;
s2 = 0;
if (n == 0)
break;
for (int i = 0; i < n; i++) {
cin >> a >... | replace | 25 | 26 | 25 | 26 | TLE | |
p01624 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (int)(n); ++i)
using namespace std;
class ParseError {};
struct Result {
int p, val;
Result(int a, int b) : p(a), val(b) {}
};
struct Parser {
int order_dict[256];
Parser() {
memset(order_dict, 0, sizeof(order_dict));
order_dict['*'] = 5;
... | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (int)(n); ++i)
using namespace std;
class ParseError {};
struct Result {
int p, val;
Result(int a, int b) : p(a), val(b) {}
};
struct Parser {
int order_dict[256];
Parser() {
memset(order_dict, 0, sizeof(order_dict));
order_dict['*'] = 5;
... | replace | 108 | 112 | 108 | 116 | TLE | |
p01628 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <iostream>
using namespace std;
int x[9][9];
int N, M, A[9], P[9], cx, pows[9][9];
int power2(int a, int b) {
int res = 1;
for (int i = 0; i < b; i++) {
res *= a;
}
return res;
}
int main() {
for (int i = 0; i < 9; i++) {
for (int j = 0; j < 9; j++) {
... | #include <algorithm>
#include <cmath>
#include <iostream>
using namespace std;
int x[9][9];
int N, M, A[9], P[9], cx, pows[9][9];
int power2(int a, int b) {
int res = 1;
for (int i = 0; i < b; i++) {
res *= a;
}
return res;
}
int main() {
for (int i = 0; i < 9; i++) {
for (int j = 0; j < 9; j++) {
... | replace | 40 | 41 | 40 | 41 | TLE | |
p01632 | C++ | Runtime Error | #include <algorithm>
#include <cfloat>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <time.h>
#include <vector>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define MOD 100000... | #include <algorithm>
#include <cfloat>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <time.h>
#include <vector>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define MOD 100000... | replace | 45 | 46 | 45 | 46 | 0 | |
p01637 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); i++)
#... | #include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); i++)
#... | replace | 40 | 41 | 40 | 41 | TLE | |
p01639 | C++ | Memory Limit Exceeded | #include <algorithm>
#include <stdio.h>
#include <vector>
using namespace std;
int cnt[200000];
vector<long long> v;
int main() {
int a, b, c;
scanf("%d%d%d", &a, &b, &c);
b--;
unsigned long long x = c;
for (int i = 0; i < a; i++) {
cnt[((long long)x) / (1LL << 47) + 100000]++;
x ^= x << 13;
x ^= ... | #include <algorithm>
#include <stdio.h>
#include <vector>
using namespace std;
int cnt[200000];
vector<long long> v;
int main() {
int a, b, c;
scanf("%d%d%d", &a, &b, &c);
if (c == 0) {
printf("0\n");
return 0;
}
b--;
unsigned long long x = c;
for (int i = 0; i < a; i++) {
cnt[((long long)x) /... | insert | 9 | 9 | 9 | 13 | MLE | |
p01639 | C++ | Memory Limit Exceeded | #include <algorithm>
#include <cfloat>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <time.h>
#include <vector>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define MOD 100000... | #include <algorithm>
#include <cfloat>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <time.h>
#include <vector>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define MOD 100000... | insert | 32 | 32 | 32 | 36 | MLE | |
p01639 | C++ | Memory Limit Exceeded | // #define NDEBUG
#include <algorithm>
#include <cassert>
#include <chrono>
#include <complex>
#include <cstring>
#include <deque>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <tuple>
#include <vector>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
ull mask ... | // #define NDEBUG
#include <algorithm>
#include <cassert>
#include <chrono>
#include <complex>
#include <cstring>
#include <deque>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <tuple>
#include <vector>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
ull mask ... | insert | 25 | 25 | 25 | 29 | MLE | |
p01639 | C++ | Memory Limit Exceeded | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
typedef unsigned long long ull;
int x, n, k, cnt[1050000];
int main() {
cin >> n >> k >> x;
k--;
ull z1 = x;
for (int i = 0; i < n; i++) {
long long w = z1;
cnt[(w >> 44) + 524288]++;
z1 ^= (z1 << 13);
z1 ^= (z1 >> 7... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
typedef unsigned long long ull;
int x, n, k, cnt[1050000];
int main() {
cin >> n >> k >> x;
k--;
if (x == 0) {
cout << 0 << endl;
return 0;
}
ull z1 = x;
for (int i = 0; i < n; i++) {
long long w = z1;
cnt[(w >> ... | insert | 9 | 9 | 9 | 13 | MLE | |
p01646 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
bool dfs(int pos, int start, const vector<vector<int>> &graph,
vector<bool> &visited) {
if (visited[pos])
return false;
visited[pos] = true;
for (int v : graph[pos]) {
if (v == star... | #include <algorithm>
#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
bool dfs(int pos, int start, const vector<vector<int>> &graph,
vector<bool> &visited) {
if (visited[pos])
return false;
visited[pos] = true;
for (int v : graph[pos]) {
if (v == star... | replace | 49 | 50 | 49 | 50 | 0 | |
p01646 | C++ | Runtime Error | #include <algorithm>
#include <cstring>
#include <iostream>
#include <vector>
using namespace std;
typedef pair<char, char> P;
typedef pair<int, int> Pii;
const int MAX = 30;
vector<Pii> E;
P comp(string a, string b) {
for (int i = 0; i < (int)min(a.length(), b.length()); i++)
if (a[i] != b[i])
return P... | #include <algorithm>
#include <cstring>
#include <iostream>
#include <vector>
using namespace std;
typedef pair<char, char> P;
typedef pair<int, int> Pii;
const int MAX = 30;
vector<Pii> E;
P comp(string a, string b) {
for (int i = 0; i < (int)min(a.length(), b.length()); i++)
if (a[i] != b[i])
return P... | replace | 42 | 43 | 42 | 43 | 0 | |
p01646 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define REP(i, s, e) for (int i = (int)s; i < (int)e; i++)
#define rep(i, n) REP(i, 0, n)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define fi first
#define se second
typedef long long ll;
int main() {
int n;
char s[256][256];
... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, s, e) for (int i = (int)s; i < (int)e; i++)
#define rep(i, n) REP(i, 0, n)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define fi first
#define se second
typedef long long ll;
int main() {
int n;
char s[1024][256];
... | replace | 15 | 16 | 15 | 16 | 0 | |
p01648 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 30;
class DisjointSet {
private:
vector<int> rank, p;
void link(int x, int y) {
if (rank[x] > rank[y]) {
p[y] = x;
} else {
p[x] = y;
if (rank[x] == rank[y])
rank[y]++;
}
}
public:
DisjointSet(int size) {
... | #include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 30;
class DisjointSet {
private:
vector<int> rank, p;
void link(int x, int y) {
if (rank[x] > rank[y]) {
p[y] = x;
} else {
p[x] = y;
if (rank[x] == rank[y])
rank[y]++;
}
}
public:
DisjointSet(int size) {
... | replace | 42 | 43 | 42 | 43 | 0 | |
p01648 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, x, y) for (int i = (x); i < (y); ++i)
#define debug(x) #x << "=" << (x)
#ifdef DEBUG
#define _GLIBCXX_DEBUG
#define dump(x) std::cerr << debug(x) << " (L:" << __LINE__ << ")" << std::endl
#else
#define dump(x)
#endif
typedef long long int ll;
typedef pair<... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, x, y) for (int i = (x); i < (y); ++i)
#define debug(x) #x << "=" << (x)
#ifdef DEBUG
#define _GLIBCXX_DEBUG
#define dump(x) std::cerr << debug(x) << " (L:" << __LINE__ << ")" << std::endl
#else
#define dump(x)
#endif
typedef long long int ll;
typedef pair<... | replace | 106 | 108 | 106 | 107 | 0 | [5,]
[1,2,3,]
[43,51,345,421,426,582,608,]
|
p01649 | C++ | Time Limit Exceeded | #include <algorithm>
#include <array>
#include <cmath>
#include <complex>
#include <iomanip>
#include <iostream>
#include <vector>
using namespace std;
const double EPS = 1e-8;
const double INF = 1e12;
#define EQ(n, m) (abs((n) - (m)) < EPS)
#define X real()
#define Y imag()
typedef complex<double> P;
typedef vector<P... | #include <algorithm>
#include <array>
#include <cmath>
#include <complex>
#include <iomanip>
#include <iostream>
#include <vector>
using namespace std;
const double EPS = 1e-8;
const double INF = 1e12;
#define EQ(n, m) (abs((n) - (m)) < EPS)
#define X real()
#define Y imag()
typedef complex<double> P;
typedef vector<P... | insert | 29 | 29 | 29 | 35 | TLE | |
p01650 | 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... | insert | 64 | 64 | 64 | 65 | 0 | |
p01653 | C++ | Runtime Error | #include "bits/stdc++.h"
#include <unordered_map>
#include <unordered_set>
#pragma warning(disable : 4996)
using namespace std;
using ld = long double;
template <class T> using Table = vector<vector<T>>;
const ld eps = 1e-9;
//// < "D:\D_Download\Visual Studio
///2015\Projects\programing_contest_c++\Debug\a.txt" > "D:... | #include "bits/stdc++.h"
#include <unordered_map>
#include <unordered_set>
#pragma warning(disable : 4996)
using namespace std;
using ld = long double;
template <class T> using Table = vector<vector<T>>;
const ld eps = 1e-9;
//// < "D:\D_Download\Visual Studio
///2015\Projects\programing_contest_c++\Debug\a.txt" > "D:... | insert | 179 | 179 | 179 | 181 | 0 | |
p01653 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <valarray>
#include <vector>
using names... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <valarray>
#include <vector>
using names... | insert | 61 | 61 | 61 | 63 | 0 | |
p01656 | C++ | Runtime Error | #include <iostream>
#include <map>
#include <string>
using namespace std;
int main() {
int n, q;
cin >> n >> q;
map<int, string> nm;
nm[0] = "kogakubu10gokan";
for (int i = 0; i < n; i++) {
int num;
string s;
cin >> num >> s;
nm[num] = s;
}
bool ju = true;
map<int, string>::iterator itr... | #include <iostream>
#include <map>
#include <string>
using namespace std;
int main() {
int n, q;
cin >> n >> q;
map<int, string> nm;
nm[0] = "kogakubu10gokan";
for (int i = 0; i < n; i++) {
int num;
string s;
cin >> num >> s;
nm[num] = s;
}
bool ju = true;
map<int, string>::iterator itr... | replace | 26 | 27 | 26 | 27 | 0 | |
p01656 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define pb(n) push_back(n)
#... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define pb(n) push_back(n)
#... | insert | 52 | 52 | 52 | 53 | 0 | |
p01657 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
#define loop(i, a, b) for (int i = (a); i < int(b); i++)
#define rep(i, b) loop(i, 0, b)
#define iter(it, c) for (auto it = c.begin(); it != c.end(); it++)
typedef vector<int> vi;
pair<vi, int> solve(int n, int x, int ... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
#define loop(i, a, b) for (int i = (a); i < int(b); i++)
#define rep(i, b) loop(i, 0, b)
#define iter(it, c) for (auto it = c.begin(); it != c.end(); it++)
typedef vector<int> vi;
pair<vi, int> solve(int n, int x, int ... | replace | 51 | 52 | 51 | 52 | 0 | |
p01657 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
int n, m, x;
int l[10], r[10], s[10];
while (cin >> n >> x >> m) {
for (int i = 0; i < n; i++) {
cin >> l[i] >> r[i] >> s[i];
}
x++;
int end = 1;
for (int i = 0; i < n; i++)
end *= x;
int maxSum = -1;
int ans[10];
... | #include <iostream>
using namespace std;
int main() {
int n, m, x;
int l[10], r[10], s[10];
while (cin >> n >> x >> m) {
for (int i = 0; i < m; i++) {
cin >> l[i] >> r[i] >> s[i];
}
x++;
int end = 1;
for (int i = 0; i < n; i++)
end *= x;
int maxSum = -1;
int ans[10];
... | replace | 8 | 9 | 8 | 9 | 0 | |
p01659 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <tuple>
#include <utility>
#include <vector>
using namespace std;
typedef long long LL;
typedef pair<int, int> ... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <tuple>
#include <utility>
#include <vector>
using namespace std;
typedef long long LL;
typedef pair<int, int> ... | insert | 33 | 33 | 33 | 34 | 0 | |
p01659 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <set>
using namespace std;
int n, res, a[21600];
set<int> nums;
int main() {
cin >> n;
for (int i = 0; i < n; i++)
cin >> a[i];
for (int i = 0; i < n; i++) {
nums.insert(a[i]);
while (*nums.rbegin() > a[i]) {
res++;
nums.erase(*nums.rbegi... | #include <algorithm>
#include <iostream>
#include <set>
using namespace std;
int n, res, a[216000];
set<int> nums;
int main() {
cin >> n;
for (int i = 0; i < n; i++)
cin >> a[i];
for (int i = 0; i < n; i++) {
nums.insert(a[i]);
while (*nums.rbegin() > a[i]) {
res++;
nums.erase(*nums.rbeg... | replace | 6 | 7 | 6 | 7 | 0 | |
p01667 | C++ | Runtime Error | #include <algorithm>
#include <stdio.h>
using namespace std;
char str[3];
pair<int, int> v[100][100];
int g[100][100];
int main() {
int a, b;
scanf("%d%d", &a, &b);
for (int i = 0; i < a; i++) {
int c;
scanf("%d", &c);
for (int j = 0; j < b; j++)
v[i][j] = make_pair(0, 100);
for (int j = 0;... | #include <algorithm>
#include <stdio.h>
using namespace std;
char str[10];
pair<int, int> v[110][110];
int g[110][110];
int main() {
int a, b;
scanf("%d%d", &a, &b);
for (int i = 0; i < a; i++) {
int c;
scanf("%d", &c);
for (int j = 0; j < b; j++)
v[i][j] = make_pair(0, 100);
for (int j = 0... | replace | 4 | 7 | 4 | 7 | 0 | |
p01667 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <fstream>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define REP(i, n) for (int i = 0; i < n; ++i)
#define FOR(i, a, b) for (int i = a; i... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <fstream>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define REP(i, n) for (int i = 0; i < n; ++i)
#define FOR(i, a, b) for (int i = a; i... | replace | 28 | 29 | 28 | 29 | TLE | |
p01667 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define l first
#define r second
#define INF (1e9)
using namespace std;
typedef pair<int, int> P;
int ans = 1, m, n, used[101], memo[101][101];
P cmd[101][101];
int check(int a, int b) {
if (memo[a][b] != -1)
return memo[a][b];
for (int i = 0; i < n; i++)
if (cmd[a][i].l > cmd[b][i... | #include <bits/stdc++.h>
#define l first
#define r second
#define INF (1e9)
using namespace std;
typedef pair<int, int> P;
int ans = 1, m, n, used[101], memo[101][101];
P cmd[101][101];
int check(int a, int b) {
if (memo[a][b] != -1)
return memo[a][b];
for (int i = 0; i < n; i++)
if (cmd[a][i].l > cmd[b][i... | replace | 23 | 24 | 23 | 24 | TLE | |
p01670 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <iostream>
#include <numeric>
#include <vector>
using namespace std;
typedef bitset<300000> BS;
BS absbs;
BS is[3000];
vector<int> idx;
int a[32345], b[32345];
int rec(const BS &bs, int nth, int r) {
if (r < 0)
return r;
if (bs == absbs)
return r;
while ... | #include <algorithm>
#include <bitset>
#include <iostream>
#include <numeric>
#include <vector>
using namespace std;
typedef bitset<300000 / 10> BS;
BS absbs;
BS is[3000];
vector<int> idx;
int a[32345], b[32345];
int rec(const BS &bs, int nth, int r) {
if (r < 0)
return r;
if (bs == absbs)
return r;
w... | replace | 8 | 9 | 8 | 9 | -11 | |
p01670 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define ll long long
#define INF 1000000005
#define MOD 1000000007
#define EPS 1e-10
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define rrep(i, n) for (int i = (int)(n)-1; i >= 0; --i)
#define srep(i, s, t) for (int i = (int)(s); i < (int)(t); ++i)
#define each(a, b) for (auto &(a) : ... | #include <bits/stdc++.h>
#define ll long long
#define INF 1000000005
#define MOD 1000000007
#define EPS 1e-10
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define rrep(i, n) for (int i = (int)(n)-1; i >= 0; --i)
#define srep(i, s, t) for (int i = (int)(s); i < (int)(t); ++i)
#define each(a, b) for (auto &(a) : ... | insert | 301 | 301 | 301 | 302 | TLE | |
p01671 | C++ | Runtime Error | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
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... | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
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... | replace | 71 | 72 | 71 | 72 | 0 | |
p01671 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <string>
#pragma comment(linker, "/STACK:1024000000,1024000000")
#include <list>
#include <map>
#include <queue>
#include <set>
#include <vector>
using namespace std;
typedef lo... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <string>
#pragma comment(linker, "/STACK:1024000000,1024000000")
#include <list>
#include <map>
#include <queue>
#include <set>
#include <vector>
using namespace std;
typedef lo... | replace | 130 | 131 | 130 | 131 | TLE | |
p01671 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
struct edge {
int from, to, id;
ll cost;
edge(int f, int t, int i, ll c) : from(f), to(t), id(i), cost(c) {}
bool operator<(const edge &that) const { return cost < that.cost; }
};
using edges = vector<edge>;
class union_find {
vector<int> ... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
struct edge {
int from, to, id;
ll cost;
edge(int f, int t, int i, ll c) : from(f), to(t), id(i), cost(c) {}
bool operator<(const edge &that) const { return cost < that.cost; }
};
using edges = vector<edge>;
class union_find {
vector<int> ... | replace | 134 | 135 | 134 | 135 | -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)
|
p01671 | C++ | Runtime Error | #include <bits/stdc++.h>
#define int long long
#define N 100010
using namespace std;
const int INF = 1LL << 55;
const int mod = (1e9) + 7;
const double EPS = 1e-8;
const double PI = 6.0 * asin(0.5);
template <class T> T Max(T &a, T b) { return a = max(a, b); }
template <class T> T Min(T &a, T b) { return a = min(a, b);... | #include <bits/stdc++.h>
#define int long long
#define N 100010
using namespace std;
const int INF = 1LL << 55;
const int mod = (1e9) + 7;
const double EPS = 1e-8;
const double PI = 6.0 * asin(0.5);
template <class T> T Max(T &a, T b) { return a = max(a, b); }
template <class T> T Min(T &a, T b) { return a = min(a, b);... | replace | 240 | 242 | 240 | 241 | 0 | |
p01672 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#incl... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#incl... | replace | 160 | 161 | 160 | 161 | -6 | terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
|
p01675 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int PMAX = 1000000;
template <typename T> struct node {
T val, add;
node *l, *r;
void init(T v, T a, node *left, node *right) {
val = v;
add = a;
l = left;
r = right;
}
};
node<ll> pool[PMAX];
template <typename T> clas... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int PMAX = 10000000;
template <typename T> struct node {
T val, add;
node *l, *r;
void init(T v, T a, node *left, node *right) {
val = v;
add = a;
l = left;
r = right;
}
};
node<ll> pool[PMAX];
template <typename T> cla... | replace | 3 | 4 | 3 | 4 | 0 | |
p01676 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
struct edge {
int to, from;
edge(int to, int from) : to(to), from(from) {}
edge() {}
};
int N, M;
bool used[5000];
set<int> G[555];
vector<edge> E;
int main() {
cin >> N >> M;
for (int i = 0; i < M; i++) {
int s, t;
cin >> s >> t;
--s;
--t;
... | #include <bits/stdc++.h>
using namespace std;
struct edge {
int to, from;
edge(int to, int from) : to(to), from(from) {}
edge() {}
};
int N, M;
bool used[5000];
set<int> G[555];
vector<edge> E;
int main() {
cin >> N >> M;
for (int i = 0; i < M; i++) {
int s, t;
cin >> s >> t;
--s;
--t;
... | insert | 24 | 24 | 24 | 28 | 0 | |
p01679 | C++ | Time Limit Exceeded | #include <algorithm> // other
#include <bitset>
#include <cassert> // c
#include <complex>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream> // io
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <regex>
#include <set>
#include <sstream>
#include <stack>
#inclu... | #include <algorithm> // other
#include <bitset>
#include <cassert> // c
#include <complex>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream> // io
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <regex>
#include <set>
#include <sstream>
#include <stack>
#inclu... | insert | 266 | 266 | 266 | 267 | TLE | |
p01680 | C++ | Runtime Error | #include <bits/stdc++.h>
#define GET_BIT(n, i) (((n) & (1 << ((i)-1))) >> ((i)-1)) // i start from 1
#define SET_BIT(n, i) ((n) | (1 << ((i)-1)))
#define CLR_BIT(n, i) ((n) & ~(1 << ((i)-1)))
#define SHOW_A(x) \
{ cout << #x << " = " << x << endl; }
#defin... | #include <bits/stdc++.h>
#define GET_BIT(n, i) (((n) & (1 << ((i)-1))) >> ((i)-1)) // i start from 1
#define SET_BIT(n, i) ((n) | (1 << ((i)-1)))
#define CLR_BIT(n, i) ((n) & ~(1 << ((i)-1)))
#define SHOW_A(x) \
{ cout << #x << " = " << x << endl; }
#defin... | replace | 56 | 57 | 56 | 57 | 0 | |
p01680 | C++ | Runtime Error | #include <bits/stdc++.h>
#define GET_BIT(n, i) (((n) & (1 << ((i)-1))) >> ((i)-1)) // i start from 1
#define SET_BIT(n, i) ((n) | (1 << ((i)-1)))
#define CLR_BIT(n, i) ((n) & ~(1 << ((i)-1)))
#define SHOW_A(x) \
{ cout << #x << " = " << x << endl; }
#defin... | #include <bits/stdc++.h>
#define GET_BIT(n, i) (((n) & (1 << ((i)-1))) >> ((i)-1)) // i start from 1
#define SET_BIT(n, i) ((n) | (1 << ((i)-1)))
#define CLR_BIT(n, i) ((n) & ~(1 << ((i)-1)))
#define SHOW_A(x) \
{ cout << #x << " = " << x << endl; }
#defin... | replace | 56 | 61 | 56 | 57 | 0 | |
p01680 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
typedef long long int lli;
const lli mod = 1e9 + 7;
struct UnionFindTree {
vector<int> v;
vector<int> rank;
int numgroup;
UnionFindTree(int n) : v(n, -1), rank(n, 0), numgroup(n) {}
int Find(int x) {
if (v[x] < 0)
retu... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
typedef long long int lli;
const lli mod = 1e9 + 7;
struct UnionFindTree {
vector<int> v;
vector<int> rank;
int numgroup;
UnionFindTree(int n) : v(n, -1), rank(n, 0), numgroup(n) {}
int Find(int x) {
if (v[x] < 0)
retu... | insert | 53 | 53 | 53 | 55 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.