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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p01269 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
typedef struct {
int to;
int D;
int E;
} Edge;
class State {
public:
int now;
int money;
int damaged;
State(int now, int money, int damaged) {
this->now = now;
this->money = money;
this->damage... | #include <algorithm>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
typedef struct {
int to;
int D;
int E;
} Edge;
class State {
public:
int now;
int money;
int damaged;
State(int now, int money, int damaged) {
this->now = now;
this->money = money;
this->damage... | replace | 57 | 58 | 57 | 58 | TLE | |
p01269 | C++ | Time Limit Exceeded | #include <iostream>
#include <map>
#include <queue>
#define LEN 100
#define BASE 25
using namespace std;
int maps[LEN][LEN];
int off[LEN][LEN];
// int checker[4];
// int ncheck[4];
map<int, int> points[LEN];
class State {
public:
char where;
int enemy;
int budget;
// int check[4];
State() {}
// State()... | #include <iostream>
#include <map>
#include <queue>
#define LEN 100
#define BASE 25
using namespace std;
int maps[LEN][LEN];
int off[LEN][LEN];
// int checker[4];
// int ncheck[4];
map<int, int> points[LEN];
class State {
public:
char where;
int enemy;
int budget;
// int check[4];
State() {}
// State()... | insert | 89 | 89 | 89 | 90 | TLE | |
p01269 | C++ | Memory Limit Exceeded | #include <iostream>
#include <map>
#include <queue>
#define LEN 100
#define BASE 25
using namespace std;
int maps[LEN][LEN];
int off[LEN][LEN];
int checker[4];
int ncheck[4];
map<int, int> points[LEN];
class State {
public:
char where;
int enemy;
int budget;
int check[4];
State() {
check[0] = 0;
... | #include <iostream>
#include <map>
#include <queue>
#define LEN 100
#define BASE 25
using namespace std;
int maps[LEN][LEN];
int off[LEN][LEN];
int checker[4];
int ncheck[4];
map<int, int> points[LEN];
class State {
public:
char where;
int enemy;
int budget;
int check[4];
State() {
check[0] = 0;
... | insert | 84 | 84 | 84 | 85 | MLE | |
p01269 | C++ | Memory Limit Exceeded | #include <iostream>
#include <map>
#include <queue>
#include <vector>
#define fr first
#define sc second
#define INF (1 << 25)
using namespace std;
typedef pair<int, int> F;
typedef pair<F, int> P;
struct edge {
int to, dis, enemy;
edge() {}
edge(int to, int dis, int enemy) : to(to), dis(dis), enemy(enemy) {}
};... | #include <iostream>
#include <map>
#include <queue>
#include <vector>
#define fr first
#define sc second
#define INF (1 << 25)
using namespace std;
typedef pair<int, int> F;
typedef pair<F, int> P;
struct edge {
int to, dis, enemy;
edge() {}
edge(int to, int dis, int enemy) : to(to), dis(dis), enemy(enemy) {}
};... | replace | 61 | 62 | 61 | 62 | MLE | |
p01269 | C++ | Runtime Error | #include <queue>
#include <stdio.h>
#include <string.h>
struct S {
int i, c, m;
S(int i, int c, int m) : i(i), c(c), m(m) {}
bool operator<(const S &r) const { return c > r.c; }
};
#define C(d) memset(d, X, sizeof(d))
int main() {
int N, M, L, A, B, D, E, X = 0x7f7f7f7f;
int d[100][100], e[100][100], x[100][1... | #include <queue>
#include <stdio.h>
#include <string.h>
struct S {
int i, c, m;
S(int i, int c, int m) : i(i), c(c), m(m) {}
bool operator<(const S &r) const { return c > r.c; }
};
#define C(d) memset(d, X, sizeof(d))
int main() {
int N, M, L, A, B, D, E, X = 0x7f7f7f7f;
int d[100][100], e[100][100], x[100][1... | replace | 11 | 12 | 11 | 12 | 0 | |
p01269 | C++ | Memory Limit Exceeded | #include <iostream>
#include <map>
#include <queue>
#include <vector>
#define fr first
#define sc second
#define INF (1 << 25)
using namespace std;
typedef pair<int, int> P;
typedef pair<P, int> iP;
struct edge {
int to, dis, enemy;
edge() {}
edge(int to, int dis, int enemy) : to(to), dis(dis), enemy(enemy) {}
}... | #include <iostream>
#include <map>
#include <queue>
#include <vector>
#define fr first
#define sc second
#define INF (1 << 25)
using namespace std;
typedef pair<int, int> P;
typedef pair<P, int> iP;
struct edge {
int to, dis, enemy;
edge() {}
edge(int to, int dis, int enemy) : to(to), dis(dis), enemy(enemy) {}
}... | replace | 53 | 54 | 53 | 54 | MLE | |
p01269 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define PB push_back
#define F first
#define S second
#define mkp make_pair
static const int INF = 1 << 24;
typedef long long ll;
typedef pair<int, int> pi... | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define PB push_back
#define F first
#define S second
#define mkp make_pair
static const int INF = 1 << 24;
typedef long long ll;
typedef pair<int, int> pi... | replace | 50 | 62 | 50 | 62 | -11 | |
p01269 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cctype>
#include <complex>
#include <cstdio>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using n... | #include <algorithm>
#include <bitset>
#include <cctype>
#include <complex>
#include <cstdio>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using n... | replace | 53 | 54 | 53 | 54 | 0 | |
p01269 | C++ | Runtime Error | #include <iostream>
#include <queue>
#include <vector>
using namespace std;
int num[101][101];
int dist[101][101];
#define INF 100000000
class state {
public:
int now, money, cost;
state(int now, int money, int cost) : now(now), cost(cost), money(money) {}
bool operator<(const state &a) { return cost > a.cost; ... | #include <iostream>
#include <queue>
#include <vector>
using namespace std;
int num[101][101];
int dist[101][101];
#define INF 100000000
class state {
public:
int now, money, cost;
state(int now, int money, int cost) : now(now), cost(cost), money(money) {}
bool operator<(const state &a) { return cost > a.cost; ... | insert | 41 | 41 | 41 | 42 | 0 | |
p01270 | C++ | Time Limit Exceeded | /*
*/
#include <algorithm>
#include <iostream>
#include <list>
using namespace std;
typedef pair<int, int> P;
// init
// input
int iN;
char cC; // 0 <= N <= 100,000
int iI; // 1 <= P <= 100
int iS; // 1 <= P <= 100
int iP; // 1 <= P <= 100
// manage
// ú»
void init() {}
// üÍ
bool input() {
scanf("%d... | /*
*/
#include <algorithm>
#include <iostream>
#include <list>
using namespace std;
typedef pair<int, int> P;
// init
// input
int iN;
char cC; // 0 <= N <= 100,000
int iI; // 1 <= P <= 100
int iS; // 1 <= P <= 100
int iP; // 1 <= P <= 100
// manage
// ú»
void init() {}
// üÍ
bool input() {
scanf("%d... | replace | 40 | 47 | 40 | 47 | TLE | |
p01270 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <map>
#define rep(i, n) for (int i = 0; i < n; i++)
#define foreach(i, c) for (__typeof(c.begin()) i = c.begin(); i != c.end(); i++)
#define mp make_pair
using namespace std;
typedef map<pair<int, int>, int> S;
int main() {
int n, t1, t2;
char c;
while (cin >> n, ... | #include <algorithm>
#include <iostream>
#include <map>
#define rep(i, n) for (int i = 0; i < n; i++)
#define foreach(i, c) for (__typeof(c.begin()) i = c.begin(); i != c.end(); i++)
#define mp make_pair
using namespace std;
typedef map<pair<int, int>, int> S;
int main() {
int n, t1, t2;
char c;
while (cin >> n, ... | insert | 30 | 30 | 30 | 32 | TLE | |
p01270 | C++ | Runtime Error | #include <algorithm>
#include <assert.h>
#include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
const int LIMIT = 1000000000;
struct Data {
int id;
int st;
int num;
Data(int id, int st, int num) : id(id), st(st), num(num) {}
bool operator<(const Data &rhs) const { return st < rhs.st; ... | #include <algorithm>
#include <assert.h>
#include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
const int LIMIT = 1000000000;
struct Data {
int id;
int st;
int num;
Data(int id, int st, int num) : id(id), st(st), num(num) {}
bool operator<(const Data &rhs) const { return st < rhs.st; ... | replace | 39 | 40 | 39 | 40 | 0 | |
p01270 | C++ | Runtime Error | #include <iostream>
#define REP(i, a, n) for (int i = (a); i < (n); i++)
using namespace std;
typedef long long ll;
struct sector {
ll l, r, f;
};
ll N, I, S, P;
char C;
sector a[1000];
int k;
void write() {
cin >> I >> S;
REP(i, 0, k) if (a[i].f == -1 && S > 0) {
if (S >= a[i].r - a[i].l) {
a[i].f =... | #include <iostream>
#define REP(i, a, n) for (int i = (a); i < (n); i++)
using namespace std;
typedef long long ll;
struct sector {
ll l, r, f;
};
ll N, I, S, P;
char C;
sector a[20000];
int k;
void write() {
cin >> I >> S;
REP(i, 0, k) if (a[i].f == -1 && S > 0) {
if (S >= a[i].r - a[i].l) {
a[i].f ... | replace | 11 | 12 | 11 | 12 | 0 | |
p01271 | C++ | Memory Limit Exceeded | #include <iostream>
#include <queue>
#include <string>
#include <tuple>
using namespace std;
#define MAX_N 70
#define INF 1 << 30
int dist[MAX_N][MAX_N][MAX_N][MAX_N];
int dy1[4] = {0, 1, 0, -1};
int dy2[4] = {0, 1, 0, -1};
int dx1[4] = {1, 0, -1, 0};
int dx2[4] = {-1, 0, 1, 0};
int H, W, map1[MAX_N][MAX_N], map2[MAX... | #include <iostream>
#include <queue>
#include <string>
#include <tuple>
using namespace std;
#define MAX_N 63
#define INF 1 << 30
int dist[MAX_N][MAX_N][MAX_N][MAX_N];
int dy1[4] = {0, 1, 0, -1};
int dy2[4] = {0, 1, 0, -1};
int dx1[4] = {1, 0, -1, 0};
int dx2[4] = {-1, 0, 1, 0};
int H, W, map1[MAX_N][MAX_N], map2[MAX... | replace | 6 | 7 | 6 | 7 | MLE | |
p01271 | C++ | Memory Limit Exceeded | #include <cstring>
#include <iostream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
const int dx[] = {-1, 0, 1, 0};
const int dy[] = {0, -1, 0, 1};
vector<string> field;
int W, H;
unsigned char memo[52][52][52][52];
struct State {
int rx, ry, lx, ly;
int index;
};... | #include <cstring>
#include <iostream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
const int dx[] = {-1, 0, 1, 0};
const int dy[] = {0, -1, 0, 1};
vector<string> field;
int W, H;
unsigned char memo[52][52][52][52];
struct State {
unsigned char rx, ry, lx, ly;
uns... | replace | 17 | 19 | 17 | 19 | MLE | |
p01271 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define lp(i, n) for (int i = 0; i < n; i++)
char a[52][52], b[52][52];
set<tuple<int, int, int, int>> dp;
int ans;
void calc(int lx, int ly, int rx, int ry) {
if (ans == 1)
return;
if (a[lx][ly] == '%' && b[rx][ry] == '%') {
ans = 1;
return;
} else if (a... | #include <bits/stdc++.h>
using namespace std;
#define lp(i, n) for (int i = 0; i < n; i++)
char a[52][52], b[52][52];
set<tuple<int, int, int, int>> dp;
int ans;
void calc(int lx, int ly, int rx, int ry) {
queue<tuple<int, int, int, int>> Q;
Q.push(make_tuple(lx, ly, rx, ry));
while (!Q.empty()) {
lx = get<0... | replace | 8 | 54 | 8 | 61 | 0 | |
p01271 | C++ | Runtime Error | // C++11
#include "bits/stdc++.h"
#include <bitset>
#include <emmintrin.h>
#include <fstream>
#include <random>
#include <sstream>
#include <string>
#include <sys/time.h>
using namespace std;
inline long long GetTSC() {
long long lo, hi;
asm volatile("rdtsc" : "=a"(lo), "=d"(hi));
return lo + (hi << 32);
}
inli... | // C++11
#include "bits/stdc++.h"
#include <bitset>
#include <emmintrin.h>
#include <fstream>
#include <random>
#include <sstream>
#include <string>
#include <sys/time.h>
using namespace std;
inline long long GetTSC() {
long long lo, hi;
asm volatile("rdtsc" : "=a"(lo), "=d"(hi));
return lo + (hi << 32);
}
inli... | replace | 107 | 108 | 107 | 108 | 0 | time: 0.00168785
|
p01271 | C++ | Memory Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cctype>
#include <complex>
#include <cstdio>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using n... | #include <algorithm>
#include <bitset>
#include <cctype>
#include <complex>
#include <cstdio>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using n... | replace | 27 | 28 | 27 | 28 | MLE | |
p01271 | C++ | Memory Limit Exceeded | #include <cstring>
#include <iostream>
#include <memory.h>
#include <queue>
#include <vector>
using namespace std;
int maxw, maxh;
int lsx, lsy;
int rsx, rsy;
const int dxl[] = {1, 0, -1, 0};
const int dxr[] = {-1, 0, 1, 0};
const int dyl[] = {0, 1, 0, -1};
const int dyr[] = {0, 1, 0, -1};
typedef pair<int, int> PP... | #include <cstring>
#include <iostream>
#include <memory.h>
#include <queue>
#include <vector>
using namespace std;
int maxw, maxh;
int lsx, lsy;
int rsx, rsy;
const int dxl[] = {1, 0, -1, 0};
const int dxr[] = {-1, 0, 1, 0};
const int dyl[] = {0, 1, 0, -1};
const int dyr[] = {0, 1, 0, -1};
typedef pair<int, int> PP... | insert | 93 | 93 | 93 | 95 | MLE | |
p01271 | C++ | Runtime Error | #include <cstring>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
struct P {
int rx, ry, lx, ly;
P() {}
P(int rx, int ry, int lx, int ly) : rx(rx), ry(ry), lx(lx), ly(ly){};
};
int w, h, dx[] = {0, 1, -1, 0}, dy[] = {1, 0, 0, -1};
bool used[50][50][50][50];
char Rin[50][50], Len[50][5... | #include <cstring>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
struct P {
int rx, ry, lx, ly;
P() {}
P(int rx, int ry, int lx, int ly) : rx(rx), ry(ry), lx(lx), ly(ly){};
};
int w, h, dx[] = {0, 1, -1, 0}, dy[] = {1, 0, 0, -1};
bool used[50][50][50][50];
char Rin[50][50], Len[50][5... | insert | 36 | 36 | 36 | 38 | 0 | |
p01271 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < int(n); ++i)
const int dx[] = {1, 0, -1, 0}, dy[] = {0, 1, 0, -1};
template <class T, class U, class V>
inline T clamp(const T &x, const U &lo, const V &hi) {
return x < lo ? lo : x > hi ? hi : x;
}
bool solve(int W, int H, const v... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < int(n); ++i)
const int dx[] = {1, 0, -1, 0}, dy[] = {0, 1, 0, -1};
template <class T, class U, class V>
inline T clamp(const T &x, const U &lo, const V &hi) {
return x < lo ? lo : x > hi ? hi : x;
}
bool solve(int W, int H, const v... | replace | 20 | 21 | 20 | 21 | 0 | |
p01273 | C++ | Runtime Error | #include <iostream>
#define loop(i, a, b) for (int i = a; i < b; i++)
#define rep(i, a) loop(i, 0, a)
using namespace std;
int main() {
int n, m;
while (cin >> n >> m, n || m) {
bool infect[n + 1];
rep(i, n + 1) infect[i] = false;
infect[1] = true;
long long ans = 1;
long long t[m];
int s[m... | #include <iostream>
#define loop(i, a, b) for (int i = a; i < b; i++)
#define rep(i, a) loop(i, 0, a)
using namespace std;
int main() {
int n, m;
while (cin >> n >> m, n || m) {
bool infect[n + 1];
rep(i, n + 1) infect[i] = false;
infect[1] = true;
long long ans = 1;
long long t[m];
int s[m... | replace | 30 | 31 | 30 | 31 | -11 | |
p01273 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
struct Packet {
int t, s, d;
Packet() = default;
Packet(int t, int s, int d) : t(t), s(s), d(d) {}
bool operator<(const Packet &p) const { return t < p.t; }
};
int main() {
while (true) {
int N, M;
cin >> N >> M;
... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
struct Packet {
int t, s, d;
Packet() = default;
Packet(int t, int s, int d) : t(t), s(s), d(d) {}
bool operator<(const Packet &p) const { return t < p.t; }
};
int main() {
while (true) {
int N, M;
cin >> N >> M;
... | replace | 36 | 37 | 36 | 37 | 0 | |
p01273 | C++ | Runtime Error | #define _USE_MATH_DEFINES
#define INF 0x3f3f3f3f
#include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#in... | #define _USE_MATH_DEFINES
#define INF 0x3f3f3f3f
#include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#in... | replace | 56 | 57 | 56 | 57 | 0 | |
p01273 | C++ | Runtime Error | #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 | 109 | 110 | 109 | 110 | 0 | |
p01274 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int HP[100], M;
long long dp1[100001], dp2[100001];
int solve(int N) {
memset(dp1, 0, sizeof(dp1));
memset(dp2, 0, sizeof(dp2));
for (int i = 0; i < N; i++) {
cin >> HP[i];
}
cin >> M;
bool end = false;
while (M--) {
string Name, Target;
int MP... | #include <bits/stdc++.h>
using namespace std;
int HP[100], M;
long long dp1[100001], dp2[100001];
int solve(int N) {
memset(dp1, 0, sizeof(dp1));
memset(dp2, 0, sizeof(dp2));
for (int i = 0; i < N; i++) {
cin >> HP[i];
}
cin >> M;
bool end = false;
while (M--) {
string Name, Target;
int MP... | replace | 33 | 35 | 33 | 35 | 0 | |
p01274 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int multi[100010], single[100010], hp[110];
int main() {
int N;
while (cin >> N && N) {
for (int i = 0; i < 100010; i++) {
multi[i] = 1e9;
single[i] = 1e9;
}
multi[0] = 0;
single[0] = 0;
for (int i = 0;... | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int multi[100010], single[100010], hp[110];
int main() {
int N;
while (cin >> N && N) {
for (int i = 0; i < 100010; i++) {
multi[i] = 1e9;
single[i] = 1e9;
}
multi[0] = 0;
single[0] = 0;
for (int i = 0;... | replace | 46 | 47 | 46 | 47 | 0 | |
p01275 | C++ | Memory Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define rep(i, a, b) for (int i = a; i < b; i++)
#define INF INT_MAX / 2
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef string Node;
typedef pair<Node, int> pni;
struct Comp {
bool operator()(pni a, pni b) { return a.second > b.second; }
};
string rot(string a... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, a, b) for (int i = a; i < b; i++)
#define INF INT_MAX / 2
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef string Node;
typedef pair<Node, int> pni;
struct Comp {
bool operator()(pni a, pni b) { return a.second > b.second; }
};
string rot(string a... | replace | 48 | 53 | 48 | 51 | MLE | |
p01275 | C++ | Runtime Error | #include <iostream>
#include <vector>
using namespace std;
int solve(vector<int> D, vector<int> imos, int i, int d) {
int n = D.size();
if (i == n)
return 0;
d += imos[i];
D[i] += 10 - d;
D[i] %= 10;
int ret = 1e9;
if (D[i]) {
for (int j = i + 1; j <= n; ++j) {
imos[j] -= D[i];
ret = ... | #include <iostream>
#include <vector>
using namespace std;
int solve(vector<int> D, vector<int> imos, int i, int d) {
int n = D.size();
if (i == n)
return 0;
d += imos[i];
D[i] += 10 - d;
D[i] %= 10;
int ret = 1e9;
if (D[i]) {
for (int j = i + 1; j <= n; ++j) {
imos[j] -= D[i];
ret = ... | replace | 33 | 34 | 33 | 34 | -6 | munmap_chunk(): invalid pointer
|
p01275 | C++ | Memory Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int N;
int solve(string &s, string &t) {
queue<string> Q;
map<string, int> dist;
Q.push(s);
dist[s] = 0;
while (!Q.empty()) {
string v = Q.front();
Q.pop();
if (v == t)
return dist[v];
for (int i = 0; i < N; i++) {
if (v[i] == t[i])
... | #include <bits/stdc++.h>
using namespace std;
int N;
int solve(string &s, string &t) {
queue<string> Q;
map<string, int> dist;
Q.push(s);
dist[s] = 0;
while (!Q.empty()) {
string v = Q.front();
Q.pop();
if (v == t)
return dist[v];
int i;
for (i = 0; i < N; i++) {
if (v[i] !=... | replace | 16 | 27 | 16 | 28 | MLE | |
p01275 | C++ | Runtime Error | #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... | insert | 37 | 37 | 37 | 41 | 0 | |
p01275 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int n, ans;
string A, B;
string cal(string a, int x, int l, int r) {
for (int i = l; i < r; i++) {
int p = a[i] - '0';
p = (p + x) % 10;
a[i] = '0' + p;
}
return a;
}
void dfs(string a, string b, int d, int sum) {
// cout<<a<<' '<<b<<' '<<d<<endl;
... | #include <bits/stdc++.h>
using namespace std;
int n, ans;
string A, B;
string cal(string a, int x, int l, int r) {
for (int i = l; i < r; i++) {
int p = a[i] - '0';
p = (p + x) % 10;
a[i] = '0' + p;
}
return a;
}
void dfs(string a, string b, int d, int sum) {
// cout<<a<<' '<<b<<' '<<d<<endl;
... | insert | 18 | 18 | 18 | 21 | TLE | |
p01275 | C++ | Time Limit Exceeded | #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 <utility>
// #include<memory>
#inc... | #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 <utility>
// #include<memory>
#inc... | replace | 48 | 49 | 48 | 49 | TLE | |
p01277 | C++ | Time Limit Exceeded | #include <iostream>
#include <random>
#include <set>
#include <vector>
using namespace std;
using ll = long long;
struct P {
ll x;
ll y;
bool operator<(const P &p) const { return (x != p.x) ? x < p.x : y < p.y; }
};
vector<P> pos;
int N;
bool ok(const int i, const int j) {
const ll x = (pos[i].x + pos[j].x) / ... | #include <iostream>
#include <random>
#include <set>
#include <vector>
using namespace std;
using ll = long long;
struct P {
ll x;
ll y;
bool operator<(const P &p) const { return (x != p.x) ? x < p.x : y < p.y; }
};
vector<P> pos;
int N;
bool ok(const int i, const int j) {
const ll x = (pos[i].x + pos[j].x) / ... | replace | 56 | 57 | 56 | 57 | TLE | |
p01277 | C++ | Time Limit Exceeded | #include <cmath>
#include <iostream>
#include <limits>
#include <set>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
namespace libcomp {
namespace geometry {
const double EPS = 1e-9;
bool tolerant_eq(double a, double b) { return abs(a - b) < EPS; }
... | #include <cmath>
#include <iostream>
#include <limits>
#include <set>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
namespace libcomp {
namespace geometry {
const double EPS = 1e-9;
bool tolerant_eq(double a, double b) { return abs(a - b) < EPS; }
... | replace | 162 | 163 | 162 | 163 | TLE | |
p01278 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cassert>
#include <complex>
#include <iomanip>
#include <iostream>
#include <vector>
using namespace std;
#define EPS 1e-8
typedef complex<double> P;
typedef vector<P> G;
double cross(const P &a, const P &b) { return imag(conj(a) * b); }
double dot(const P &a, const P &b) { return real(... | #include <algorithm>
#include <cassert>
#include <complex>
#include <iomanip>
#include <iostream>
#include <vector>
using namespace std;
#define EPS 1e-8
typedef complex<double> P;
typedef vector<P> G;
double cross(const P &a, const P &b) { return imag(conj(a) * b); }
double dot(const P &a, const P &b) { return real(... | delete | 131 | 132 | 131 | 131 | TLE | |
p01279 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <queue>
#include <vector>
using namespace std;
#define INF 10000000
#define SOUR 200
#define SINK 201
int N, M;
class Node {
public:
vector<int> to;
};
class Edge {
public:
int s, d;
double c;
Edge(int s, int d, double c) : s... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <queue>
#include <vector>
using namespace std;
#define INF 10000000
#define SOUR 200
#define SINK 201
int N, M;
class Node {
public:
vector<int> to;
};
class Edge {
public:
int s, d;
double c;
Edge(int s, int d, double c) : s... | delete | 138 | 139 | 138 | 138 | TLE | |
p01279 | C++ | Runtime Error | /*
16:50 - 17:23
*/
#include <algorithm>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <string>
#include <vector>
#define REP(i, s, n) for (int i = s; i < n; i++)
#define rep(i, n) REP(i, 0, n)
#define II... | /*
16:50 - 17:23
*/
#include <algorithm>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <string>
#include <vector>
#define REP(i, s, n) for (int i = s; i < n; i++)
#define rep(i, n) REP(i, 0, n)
#define II... | replace | 109 | 110 | 109 | 110 | 0 | |
p01279 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vecto... | #include <algorithm>
#include <bitset>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vecto... | replace | 105 | 106 | 105 | 106 | TLE | |
p01279 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef complex<double> Point;
int n, m;
Point p[100];
double v[100];
vector<vector<int>> g;
vector<int> match;
vector<bool> used;
bool dfs(int v) {
used[v] = true;
for (int u : g[v]) {
int w = match[u];
if (w < 0 || !used[w] && dfs(w)) {
match[v] = u;... | #include <bits/stdc++.h>
using namespace std;
typedef complex<double> Point;
int n, m;
Point p[200];
double v[200];
vector<vector<int>> g;
vector<int> match;
vector<bool> used;
bool dfs(int v) {
used[v] = true;
for (int u : g[v]) {
int w = match[u];
if (w < 0 || !used[w] && dfs(w)) {
match[v] = u;... | replace | 6 | 8 | 6 | 8 | 0 | |
p01279 | C++ | Time Limit Exceeded | #include <cstdio>
#include <vector>
using namespace std;
bool match(int x, const vector<vector<int>> &xg, vector<bool> &visited,
vector<int> &p) {
if (x < 0)
return true;
if (visited[x])
return false;
visited[x] = true;
for (int i = 0; i < xg[x].size(); ++i) {
int y = xg[x][i];
if (... | #include <cstdio>
#include <vector>
using namespace std;
bool match(int x, const vector<vector<int>> &xg, vector<bool> &visited,
vector<int> &p) {
if (x < 0)
return true;
if (visited[x])
return false;
visited[x] = true;
for (int i = 0; i < xg[x].size(); ++i) {
int y = xg[x][i];
if (... | replace | 59 | 60 | 59 | 60 | TLE | |
p01281 | C++ | Runtime Error | #define DEBUG_ON
#define CONDITION true
using namespace std; /*{{{*/
#include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <iterator>
#include <list>
#include... | #define DEBUG_ON
#define CONDITION true
using namespace std; /*{{{*/
#include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <iterator>
#include <list>
#include... | replace | 234 | 238 | 234 | 240 | 0 | 0 0 0 0
0 0 0 0
0 0 0 0
1 2 0 0
0 0 0 0
0 0 0 0
1 2 1 2
0 0 0 0
0 0 0 0
1 2 1 2
3 0 0 0
4 0 0 0
1 2 1 2
3 1 2 0
4 0 0 0
1 2 1 2
3 1 2 3
4 0 0 4
1 2 3 0
0 0 4 0
0 0 0 0
1 2 3 3
0 0 4 4
0 0 0 0
1 2 3 3
1 2 4 4
0 0 0 0
1 2 3 3
3 0 4 4
4 0 0 0
1 2 3 3
3 3 4 4
4 4 0 0
3 0 0 0
4 0 0 0
0 0 0... |
p01283 | C++ | Time Limit Exceeded | #include <cmath>
#include <iostream>
using namespace std;
int n, a[256];
int main() {
while (cin >> n, n) {
for (int i = 0; i < n; i++)
cin >> a[i];
int mi, mj, mk;
long double v = 1e+300L;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
for (int k = 0; k < n; k++) {
... | #include <cmath>
#include <iostream>
using namespace std;
int n, a[256];
int main() {
while (cin >> n, n) {
for (int i = 0; i < n; i++)
cin >> a[i];
int mi, mj, mk;
long double v = 1e+300L;
for (int i = 0; i < 16; i++) {
for (int j = 0; j < 16; j++) {
for (int k = 0; k < 16; k++) {... | replace | 10 | 13 | 10 | 13 | TLE | |
p01284 | C++ | Runtime Error | #include "bits/stdc++.h"
#include <unordered_map>
#pragma warning(disable : 4996)
using namespace std;
const int My_Inf = 2147483647;
const long long int My_LInf = 9223372036854775807;
int main() {
while (1) {
int T;
cin >> T;
if (!T)
break;
vector<int> sleeps;
for (int i = 0; i < T; ++i) ... | #include "bits/stdc++.h"
#include <unordered_map>
#pragma warning(disable : 4996)
using namespace std;
const int My_Inf = 2147483647;
const long long int My_LInf = 9223372036854775807;
int main() {
while (1) {
int T;
cin >> T;
if (!T)
break;
vector<int> sleeps;
for (int i = 0; i < T; ++i) ... | replace | 42 | 43 | 42 | 43 | -11 | |
p01285 | C++ | Runtime Error | #include <bits/stdc++.h>
#define REP(i, s, n) for (int i = s; i < n; i++)
#define rep(i, n) REP(i, 0, n)
#define EPS (1e-6)
#define equals(a, b) (fabs((a) - (b)) < EPS)
#define COUNTER_CLOCKWISE 1
#define CLOCKWISE -1
#define ONLINE_BACK 2
#define ONLINE_FRONT -2
#define ON_SEGMENT 0
using namespace std;
class Point... | #include <bits/stdc++.h>
#define REP(i, s, n) for (int i = s; i < n; i++)
#define rep(i, n) REP(i, 0, n)
#define EPS (1e-6)
#define equals(a, b) (fabs((a) - (b)) < EPS)
#define COUNTER_CLOCKWISE 1
#define CLOCKWISE -1
#define ONLINE_BACK 2
#define ONLINE_FRONT -2
#define ON_SEGMENT 0
using namespace std;
class Point... | replace | 213 | 214 | 213 | 214 | 0 | |
p01287 | C++ | Time Limit Exceeded | #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 | 35 | 36 | 35 | 36 | TLE | |
p01288 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <stdio.h>
#include <string.h>
#include <string>
#include <vector>
// #pragma comment(linker,"/STACK:1024000000,1024000000")
using namespace std;
const int INF = 0x3f3f3f3f;
const double ... | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <stdio.h>
#include <string.h>
#include <string>
#include <vector>
// #pragma comment(linker,"/STACK:1024000000,1024000000")
using namespace std;
const int INF = 0x3f3f3f3f;
const double ... | replace | 32 | 33 | 32 | 33 | TLE | |
p01288 | C++ | Runtime Error | #include <algorithm>
#include <assert.h>
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <vector>
using namespace std;
typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
static const double EPS = 1e-9;
static const double PI = acos(-1.0);
#define REP... | #include <algorithm>
#include <assert.h>
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <vector>
using namespace std;
typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
static const double EPS = 1e-9;
static const double PI = acos(-1.0);
#define REP... | replace | 40 | 41 | 40 | 41 | 0 | |
p01288 | C++ | Time Limit Exceeded | #include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
typedef pair<char, int> P;
const int maxn = 100005;
int tree[maxn];
int ar[maxn];
P query[maxn];
int get(int i) {
int par = tree[i];
while (!ar[par]) {
par = tree[par];
}
return par;
}
int main() {
int n, q;
while (scanf("%d%d... | #include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
typedef pair<char, int> P;
const int maxn = 100005;
int tree[maxn];
int ar[maxn];
P query[maxn];
int get(int i) {
if (ar[i])
return i;
return tree[i] = get(tree[i]);
}
int main() {
int n, q;
while (scanf("%d%d", &n, &q) && (q + n)... | replace | 10 | 15 | 10 | 13 | TLE | |
p01288 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long // <-----!!!!!!!!!!!!!!!!!!!
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep2(i, a, b) for (int i = (a); i < (b); i++)
#define rrep(i, n) for (int i = (n)-1; i >= 0; i--)
#define rrep2(i, a, b) for (int i = (a)-1; i >= b; i--)
#define chmi... | #include <bits/stdc++.h>
using namespace std;
#define int long long // <-----!!!!!!!!!!!!!!!!!!!
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep2(i, a, b) for (int i = (a); i < (b); i++)
#define rrep(i, n) for (int i = (n)-1; i >= 0; i--)
#define rrep2(i, a, b) for (int i = (a)-1; i >= b; i--)
#define chmi... | replace | 73 | 74 | 73 | 74 | 0 | |
p01288 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
using namespace std;
int n, q, root[105000];
long long res;
int marked[105000];
pair<char, int> query[105000];
int r(int x) {
if (marked[x])
return x;
return root[x] = r(root[x]);
}
int main() {
while (true) {
scanf("%d%d", &n, &... | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
using namespace std;
int n, q, root[105000];
long long res;
int marked[105000];
pair<char, int> query[105000];
int r(int x) {
if (marked[x])
return x;
return root[x] = r(root[x]);
}
int main() {
while (true) {
scanf("%d%d", &n, &... | replace | 25 | 26 | 25 | 26 | -11 | |
p01288 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
inline int toInt(string s) {
int v;
istringstream sin(s);
sin >> v;
return v;
}
template <class T> inline string toString(T x) {
ostringstream sout;
sout << x;
return sout.str();
}
template <class T> inline T sqr(T x) { return x * x; }
typedef vector<int> v... | #include <bits/stdc++.h>
using namespace std;
inline int toInt(string s) {
int v;
istringstream sin(s);
sin >> v;
return v;
}
template <class T> inline string toString(T x) {
ostringstream sout;
sout << x;
return sout.str();
}
template <class T> inline T sqr(T x) { return x * x; }
typedef vector<int> v... | replace | 102 | 103 | 102 | 104 | 0 | i = 2
ans = 0
i = 1
ans = 3
i = 0
ans = 3
|
p01288 | C++ | Runtime Error | #include <bits/stdc++.h>
#define PB push_back
#define MP make_pair
#define FI first
#define SE second
#define int long long
using namespace std;
static const int MAX_N = 100000;
static const int inf = 1ll << 60;
static const int MAX_SEG = 1 << 17;
typedef pair<int, int> pii;
int dat[2 * MAX_SEG];
class segment {
publi... | #include <bits/stdc++.h>
#define PB push_back
#define MP make_pair
#define FI first
#define SE second
#define int long long
using namespace std;
static const int MAX_N = 100000;
static const int inf = 1ll << 60;
static const int MAX_SEG = 1 << 17;
typedef pair<int, int> pii;
int dat[2 * MAX_SEG];
class segment {
publi... | replace | 54 | 55 | 54 | 55 | 0 | |
p01288 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define MAX (1 << 17)
#define INF (1LL << 55)
typedef long long ll;
typedef pair<ll, ll> P;
struct SegmentTree {
int n;
P dat[2 * MAX - 1];
SegmentTree(int n_) {
n = 1;
while (n < n_) {
n *= 2;
}
for (int i = 0; i < 2 * n - 1; i++) {
da... | #include <bits/stdc++.h>
using namespace std;
#define MAX (1 << 17)
#define INF (1LL << 55)
typedef long long ll;
typedef pair<ll, ll> P;
struct SegmentTree {
int n;
P dat[2 * MAX - 1];
SegmentTree(int n_) {
n = 1;
while (n < n_) {
n *= 2;
}
for (int i = 0; i < 2 * n - 1; i++) {
da... | delete | 71 | 72 | 71 | 71 | -11 | |
p01290 | C++ | Memory Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep1(i, n) for (int i = 1; i <= (n); ++i)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define f... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep1(i, n) for (int i = 1; i <= (n); ++i)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define f... | replace | 18 | 19 | 18 | 19 | MLE | |
p01290 | C++ | Memory Limit Exceeded | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (int)(n); ++i)
using namespace std;
typedef long long LL;
int dx[5] = {1, 0, -1, 0, 0};
int dy[5] = {0, 1, 0, -1, 0};
const int MAX_T = 10 * 30;
int W, H;
string grid[30];
char memo[30][30][30][30][MAX_T];
bool valid(int x, int w) { return 0 <= x && x < w... | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (int)(n); ++i)
using namespace std;
typedef long long LL;
int dx[5] = {1, 0, -1, 0, 0};
int dy[5] = {0, 1, 0, -1, 0};
const int MAX_T = 10 * 30 / 4;
int W, H;
string grid[30];
char memo[30][30][30][30][MAX_T];
bool valid(int x, int w) { return 0 <= x && x... | replace | 7 | 8 | 7 | 8 | MLE | |
p01291 | C++ | Time Limit Exceeded | #include <algorithm>
#include <complex>
#include <iostream>
#include <queue>
#include <stdio.h>
#include <string.h>
#include <vector>
using namespace std;
typedef complex<double> Complex;
typedef Complex Line[2];
typedef vector<Complex> Polygon;
static const double EPS = 1e-8;
inline double dot(const Complex &a, con... | #include <algorithm>
#include <complex>
#include <iostream>
#include <queue>
#include <stdio.h>
#include <string.h>
#include <vector>
using namespace std;
typedef complex<double> Complex;
typedef Complex Line[2];
typedef vector<Complex> Polygon;
static const double EPS = 1e-8;
inline double dot(const Complex &a, con... | insert | 94 | 94 | 94 | 97 | TLE | |
p01292 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define EQ(a, b) (abs((a) - (b)) < EPS)
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define fs first
#define sc second
#define pb push_back
#define sz size()
#define all(a) (a).begin(), (a).end()
using namespace std;
typedef long double D;
typedef complex<D> P;
typedef pair<P, P> Lin... | #include <bits/stdc++.h>
#define EQ(a, b) (abs((a) - (b)) < EPS)
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define fs first
#define sc second
#define pb push_back
#define sz size()
#define all(a) (a).begin(), (a).end()
using namespace std;
typedef double D;
typedef complex<D> P;
typedef pair<P, P> Line;
ty... | replace | 11 | 12 | 11 | 12 | TLE | |
p01292 | C++ | Time Limit Exceeded | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <queue>
#include ... | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <queue>
#include ... | replace | 238 | 240 | 238 | 240 | TLE | |
p01293 | 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 | 70 | 71 | 70 | 71 | 0 | |
p01293 | C++ | Runtime Error | // Header {{{
// includes {{{
#include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <iterator>
#include <limits>
#include <list>
#include <map>
#include <numer... | // Header {{{
// includes {{{
#include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <iterator>
#include <limits>
#include <list>
#include <map>
#include <numer... | replace | 299 | 300 | 299 | 300 | TLE | |
p01294 | C++ | Runtime Error | #include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iostream>
#include <iterator>
#include <list>
#inc... | #include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iostream>
#include <iterator>
#include <list>
#inc... | replace | 107 | 108 | 107 | 108 | 0 | |
p01294 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
bool solve(int n, int d) {
vector<vector<int>> c(n);
for (int i = 0; i < n; i++) {
int m;
cin >> m;
for (int j = 0; j < m; j++) {
int buf;
cin >> buf;
c[i].push_back(buf);
}
}
if (n == 1)
return true;
while (true) {
vec... | #include <bits/stdc++.h>
using namespace std;
bool solve(int n, int d) {
vector<vector<int>> c(n);
for (int i = 0; i < n; i++) {
int m;
cin >> m;
for (int j = 0; j < m; j++) {
int buf;
cin >> buf;
c[i].push_back(buf);
}
}
if (n == 1)
return true;
while (true) {
vec... | delete | 44 | 47 | 44 | 44 | 0 | 0
0
0
2
2
1
|
p01294 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
for (int n, d; cin >> n >> d, n;) {
vector<int> c[100];
int s[100] = {};
int nm = 0;
for (int i = 0; i < n; i++) {
int m;
cin >> m;
c[i].resize(m);
for (int j = 0; j < m; j++) {
... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
for (int n, d; cin >> n >> d, n;) {
vector<int> c[100];
int s[100] = {};
int nm = 0;
for (int i = 0; i < n; i++) {
int m;
cin >> m;
c[i].resize(m);
for (int j = 0; j < m; j++) {
... | replace | 28 | 29 | 28 | 29 | 0 | |
p01294 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int main() {
int n, d;
while (cin >> n >> d && (n || d)) {
vector<int> si[100];
int max_potential = -1;
for (int i = 0; i < n; i++) {
int m;
cin >> m;
for (int j = 0; j <... | #include <algorithm>
#include <iostream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int main() {
int n, d;
while (cin >> n >> d && (n || d)) {
vector<int> si[100];
int max_potential = -1;
for (int i = 0; i < n; i++) {
int m;
cin >> m;
for (int j = 0; j <... | replace | 23 | 24 | 23 | 24 | 0 | |
p01294 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 28;
int main() {
for (int n, d; cin >> n >> d && (n | d);) {
vector<vector<int>> c(n);
for (int i = 0; i < n; ++i) {
int m;
cin >> m;
c[i].resize(m);
for (int j = 0; j < m; ++j)
cin >> c[i][j];
}
vecto... | #include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 28;
int main() {
for (int n, d; cin >> n >> d && (n | d);) {
vector<vector<int>> c(n);
for (int i = 0; i < n; ++i) {
int m;
cin >> m;
c[i].resize(m);
for (int j = 0; j < m; ++j)
cin >> c[i][j];
}
vecto... | insert | 22 | 22 | 22 | 24 | 0 | |
p01294 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <s... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <s... | replace | 57 | 58 | 57 | 58 | 0 | |
p01295 | C++ | Runtime Error | #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 vector<int> vi;
typedef vector<string> vs;
typedef pair<int, int> pii... | #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 vector<int> vi;
typedef vector<string> vs;
typedef pair<int, int> pii... | insert | 44 | 44 | 44 | 45 | 0 | |
p01295 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sst... | #include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sst... | replace | 85 | 87 | 85 | 86 | 0 | 0th digit of 4
0th digit of 6
|
p01295 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll len(ll x) {
ll a = 1, k = 0, j = 1;
while (a * 10 <= x)
k += 9 * a * j, a *= 10, j++;
k += (x - a + 1) * j;
return k;
}
int main() {
ll n, k;
while (cin >> n >> k, n || k) {
ll l = 0, r = 100000000LL, m, i;
string s;
whil... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll len(ll x) {
ll a = 1, k = 0, j = 1;
while (a * 10 <= x)
k += 9 * a * j, a *= 10, j++;
k += (x - a + 1) * j;
return k;
}
int main() {
ll n, k;
while (cin >> n >> k, n || k) {
ll l = 0, r = 1000000000LL, m, i;
string s;
whi... | replace | 13 | 14 | 13 | 14 | 0 | |
p01295 | C++ | Time Limit Exceeded | #include <cstdio>
#include <iostream>
#include <string>
using namespace std;
int main() {
long long int N, K;
while (1) {
scanf("%lld%lld", &N, &K);
long long int base = 9;
for (int d = 1; d < 10; d++) {
long long int sum = d * base;
if (N > sum) {
N -= sum;
base *= 10;
... | #include <cstdio>
#include <iostream>
#include <string>
using namespace std;
int main() {
long long int N, K;
while (1) {
scanf("%lld%lld", &N, &K);
if (!N)
break;
long long int base = 9;
for (int d = 1; d < 10; d++) {
long long int sum = d * base;
if (N > sum) {
N -= sum;... | insert | 9 | 9 | 9 | 11 | TLE | |
p01295 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
typedef vector<int> vint;
typedef pair<int, int> pint;
typedef vector<pint> vpint;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define reps(i, f, n) for (int i = (f); i < (n); i++)
#define all(v) (v).begin(), (v).end()
#define each(it, v) ... | #include <bits/stdc++.h>
using namespace std;
#define int long long
typedef vector<int> vint;
typedef pair<int, int> pint;
typedef vector<pint> vpint;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define reps(i, f, n) for (int i = (f); i < (n); i++)
#define all(v) (v).begin(), (v).end()
#define each(it, v) ... | replace | 30 | 31 | 30 | 31 | 0 | |
p01295 | C++ | Runtime Error | #include <cmath>
#include <cstdio>
#include <cstring>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
int main() {
ll order[9];
rep(i, 9) order[i] = (i + 1) * 9 * (ll)pow(10., i);
for (int n, k; scanf("%d%d", &n, &k), n;) {
int p;
for (p = 0; p < 9; p++) {
... | #include <cmath>
#include <cstdio>
#include <cstring>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
int main() {
ll order[9];
rep(i, 9) order[i] = (i + 1) * 9 * (ll)pow(10., i);
for (int n, k; scanf("%d%d", &n, &k), n;) {
int p;
for (p = 0; p < 9; p++) {
... | replace | 24 | 25 | 24 | 25 | 0 | |
p01296 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define r(i, n) for (int i = 0; i < n; i++)
using namespace std;
char c;
int x[20001][2], y[20001][2];
vector<int> v[40001];
int b[40001], f, n;
void dfs(int p, int col) {
b[p] = col;
r(i, v[p].size()) {
if (!(p == v[p][i] + n || p + n == v[p][i]) && b[v[p][i]] &&
b[v[p][i]] != ... | #include <bits/stdc++.h>
#define r(i, n) for (int i = 0; i < n; i++)
using namespace std;
char c;
int x[20001][2], y[20001][2];
vector<int> v[40001];
int b[40001], f, n;
void dfs(int p, int col) {
b[p] = col;
r(i, v[p].size()) {
if (!(p == v[p][i] + n || p + n == v[p][i]) && b[v[p][i]] &&
b[v[p][i]] != ... | delete | 45 | 62 | 45 | 45 | TLE | |
p01296 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define int long long
typedef pair<int, int> P;
#define X first
#define Y second
signed main() {
int n;
while (cin >> n, n) {
P p[n];
char d[n];
for (int i = 0; i < n; i++)
cin >> p[i].X >> p[i].Y >> d[i];
map<P, int> m;
for (int i = 0; i < n; ... | #include <bits/stdc++.h>
using namespace std;
#define int long long
typedef pair<int, int> P;
#define X first
#define Y second
signed main() {
int n;
while (cin >> n, n) {
P p[n];
char d[n];
for (int i = 0; i < n; i++)
cin >> p[i].X >> p[i].Y >> d[i];
map<P, int> m;
for (int i = 0; i < n; ... | replace | 146 | 147 | 146 | 147 | TLE | |
p01296 | C++ | Runtime Error | #include <algorithm>
#include <assert.h>
#include <iostream>
#include <map>
#include <math.h>
#include <set>
#include <stdio.h>
#include <string.h>
#include <vector>
using namespace std;
typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
static const double EPS = 1e-9;
static const double... | #include <algorithm>
#include <assert.h>
#include <iostream>
#include <map>
#include <math.h>
#include <set>
#include <stdio.h>
#include <string.h>
#include <vector>
using namespace std;
typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
static const double EPS = 1e-9;
static const double... | delete | 51 | 52 | 51 | 51 | 0 | |
p01296 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using pii = pair<int, int>;
struct union_find {
vector<int> data;
union_find(int n) : data(n, -1) {}
int find(int a) { return data[a] < 0 ? a : data[a] = find(data[a]); }
bool same(int a, int b) { return find(a) == find(b); }
void unite(int a, int b) {
a = fi... | #include <bits/stdc++.h>
using namespace std;
using pii = pair<int, int>;
struct union_find {
vector<int> data;
union_find(int n) : data(n, -1) {}
int find(int a) { return data[a] < 0 ? a : data[a] = find(data[a]); }
bool same(int a, int b) { return find(a) == find(b); }
void unite(int a, int b) {
a = fi... | replace | 43 | 44 | 43 | 44 | 0 | |
p01297 | C++ | Time Limit Exceeded | ////////////////////////////////////////
/// tu3 pro-con template ///
////////////////////////////////////////
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <list>
#include... | ////////////////////////////////////////
/// tu3 pro-con template ///
////////////////////////////////////////
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <list>
#include... | delete | 339 | 343 | 339 | 339 | TLE | |
p01298 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, k, n) for (int i = (int)(k); i < (int)(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))
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<string> vs;
typedef ... | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, k, n) for (int i = (int)(k); i < (int)(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))
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<string> vs;
typedef ... | replace | 34 | 35 | 34 | 35 | TLE | |
p01298 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define repi(i, a, b) for (int i = (a); i < (b); i++)
#define rep(i, a) repi(i, 0, a)
#... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define repi(i, a, b) for (int i = (a); i < (b); i++)
#define rep(i, a) repi(i, 0, a)
#... | replace | 27 | 28 | 27 | 28 | TLE | |
p01298 | C++ | Time Limit Exceeded | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const double EPS = 1e-12;
const int INF = numeric_limits<int>::max() / 2;
const int MOD = 1e9 + 7;
vector<double> cap(200000, 0);
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int n;
while (cin >> n, n) {
... | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const double EPS = 1e-12;
const int INF = numeric_limits<int>::max() / 2;
const int MOD = 1e9 + 7;
vector<double> cap(200000, 0);
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int n;
while (cin >> n, n) {
... | replace | 30 | 44 | 30 | 44 | TLE | |
p01298 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <vector>
using namespace std;
#define EPS (1e-10)
#define EQ(a, b) ((abs((a) - (b))) < EPS)
int a[100001];
int n, l;
bool check(double f) {
double lf = l;
double rec = 0;
bool flag = false;
for (int j = 0... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <vector>
using namespace std;
#define EPS (1e-10)
#define EQ(a, b) ((abs((a) - (b))) < EPS)
int a[100001];
int n, l;
bool check(double f) {
double lf = l;
double rec = 0;
bool flag = false;
for (int j = 0... | replace | 51 | 52 | 51 | 52 | TLE | |
p01300 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
string S;
int dp[80000][11];
int rec(int idx, int mod) {
if (idx == S.size())
return (mod == 0);
if (~dp[idx][mod])
return (dp[idx][mod]);
return (rec(idx + 1, (mod * 10 + S[idx] - '0') % 11) + (mod == 0));
}
int main() {
while (cin >> S, S != "0") {
... | #include <bits/stdc++.h>
using namespace std;
string S;
int dp[80000][11];
int rec(int idx, int mod) {
if (idx == S.size())
return (mod == 0);
if (~dp[idx][mod])
return (dp[idx][mod]);
return (dp[idx][mod] =
rec(idx + 1, (mod * 10 + S[idx] - '0') % 11) + (mod == 0));
}
int main() {
whil... | replace | 11 | 12 | 11 | 13 | TLE | |
p01300 | C++ | Time Limit Exceeded | // include
//------------------------------------------
#include <algorithm>
#include <bitset>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#inc... | // include
//------------------------------------------
#include <algorithm>
#include <bitset>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#inc... | replace | 67 | 79 | 67 | 75 | TLE | |
p01300 | C++ | Runtime Error | #include <iostream>
#include <stdlib.h>
int main() {
while (1) {
// 入力
std::string number;
std::cin >> number;
// 演算
if (number == "0")
return 0;
int N = number.length();
int dp[801][11];
int answer = 0;
for (int i = 0; i < 11; i++) {
dp[0][i] = 0;
}
for (int i... | #include <iostream>
#include <stdlib.h>
int main() {
while (1) {
// 入力
std::string number;
std::cin >> number;
// 演算
if (number == "0")
return 0;
int N = number.length();
int dp[80001][11];
int answer = 0;
for (int i = 0; i < 11; i++) {
dp[0][i] = 0;
}
for (int... | replace | 12 | 13 | 12 | 13 | 0 | |
p01301 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
template <class T> inline void chmin(T &a, T b) { a = min(a, b); }
template <class T> inline void chmax(T &a, T &b) { a = max(a, b); }
string getBin(int n) {
stri... | #include <algorithm>
#include <bitset>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
template <class T> inline void chmin(T &a, T b) { a = min(a, b); }
template <class T> inline void chmax(T &a, T &b) { a = max(a, b); }
string getBin(int n) {
stri... | replace | 277 | 279 | 277 | 279 | TLE | |
p01301 | C++ | Time Limit Exceeded | #include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <valarray>
#include <vector>... | #include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <valarray>
#include <vector>... | replace | 72 | 73 | 72 | 73 | TLE | |
p01304 | C++ | Runtime Error | #include <iostream>
using namespace std;
int mt[16][16][16][16];
int dp[16][16];
int i, j, k, l, m, n, o, a, b, c, d, cnt, X, Y;
void init() {
for (int i = 0; i < 16; i++) {
for (int j = 0; j < 16; j++) {
dp[i][j] = 0;
for (int k = 0; k < 16; k++) {
for (int l = 0; l < 16; l++) {
mt[... | #include <iostream>
using namespace std;
int mt[16][16][16][16];
int dp[16][16];
int i, j, k, l, m, n, o, a, b, c, d, cnt, X, Y;
void init() {
for (int i = 0; i < 16; i++) {
for (int j = 0; j < 16; j++) {
dp[i][j] = 0;
for (int k = 0; k < 16; k++) {
for (int l = 0; l < 16; l++) {
mt[... | replace | 60 | 61 | 60 | 61 | 4 | |
p01306 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <string>
using namespace std;
int Tanni(string);
int main() {
int i, j, n;
string st, str, str2;
cin >> n;
for (int t = 0; t < n; t++) {
int keta, a[1003], aa, dot;
cin >> st >> str;
dot = -1;
bool f = false... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <string>
using namespace std;
int Tanni(string);
int main() {
int i, j, n;
string st, str, str2;
cin >> n;
for (int t = 0; t < n; t++) {
int keta, a[1003], aa, dot;
cin >> st >> str;
dot = -1;
bool f = false... | replace | 70 | 71 | 70 | 71 | TLE | |
p01308 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
#define rp(i, c) r... | #include <algorithm>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
#define rp(i, c) r... | insert | 44 | 44 | 44 | 47 | TLE | |
p01314 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
int main() {
int n;
while (cin >> n) {
if (n == 0)
break;
int l = 1;
int r... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
int main() {
int n;
while (cin >> n) {
if (n == 0)
break;
int l = 1;
int r... | replace | 39 | 40 | 39 | 40 | 0 | 1 1 2
3 1 3
6 1 4
10 1 5
14 2 6
15 4 7
13 6 8
15 7 9
1 1 2
3 1 3
6 1 4
10 1 5
15 1 6
21 1 7
28 1 8
36 1 9
45 1 10
55 1 11
66 1 12
78 1 13
91 1 14
105 1 15
120 1 16
136 1 17
153 1 18
171 1 19
190 1 20
210 1 21
231 1 22
253 1 23
276 1 24
300 1 25
325 1 26
351 1 27
378 1 28
406 1 29
435 1 30
465 1 31
496 1 32
528 1 33
533... |
p01314 | C++ | Time Limit Exceeded | #include <iostream>
#include <stdio.h>
#include <string>
using namespace std;
int main() {
int n, x;
while (true) {
scanf("%d", &n);
x = 0;
if (n == 0)
break;
for (int i = 2; i <= n; i++) {
for (int j = 1; j < n; j++) {
int count = 0;
for (int k = 0; k < i; k++)
... | #include <iostream>
#include <stdio.h>
#include <string>
using namespace std;
int main() {
int n, x;
while (true) {
scanf("%d", &n);
x = 0;
if (n == 0)
break;
for (int i = 2; i <= n; i++) {
for (int j = 1; j < n; j++) {
int count = 0;
for (int k = j; k < j + i; k++)
... | replace | 14 | 16 | 14 | 16 | TLE | |
p01314 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (n); i++)
#define ALL(a) (a).begin(), (a).end()
#define RFOR(i, a, b) for (int i = (b)-1; i >= (a); i--)
#define REP(i, n) for (int i = 0; i < (n); i++)
#define RREP(i, n) for (int i = (n)-1; i >= 0; i--)
#define ll long long
#define ull unsigned long long
... | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (n); i++)
#define ALL(a) (a).begin(), (a).end()
#define RFOR(i, a, b) for (int i = (b)-1; i >= (a); i--)
#define REP(i, n) for (int i = 0; i < (n); i++)
#define RREP(i, n) for (int i = (n)-1; i >= 0; i--)
#define ll long long
#define ull unsigned long long
... | replace | 22 | 23 | 22 | 27 | TLE | |
p01314 | C++ | Time Limit Exceeded | // 52
#include <iostream>
using namespace std;
int main() {
for (int n; cin >> n, n;) {
int ans = 0;
for (int i = 2; i <= 1000; i++) {
for (int j = 1; j <= 1000; j++) {
int s = 0;
for (int k = 0; k < i; k++) {
s += j + k;
}
ans += s == n;
}
}
cou... | // 52
#include <iostream>
using namespace std;
int main() {
for (int n; cin >> n, n;) {
int ans = 0;
for (int i = 1; i <= 1000; i++) {
for (int j = 2; j <= 1000; j++) {
ans += n == i * j + j * (j - 1) / 2;
}
}
cout << ans << endl;
}
return 0;
} | replace | 8 | 15 | 8 | 11 | TLE | |
p01315 | C++ | Time Limit Exceeded | #include <iostream>
#include <string>
using namespace std;
int main() {
int n;
string l[50];
double ans[50];
int a[9];
while (true) {
cin >> n;
if (n == 0)
break;
for (int i = 0; i < n; i++) {
cin >> l[i];
for (int j = 0; j < 9; j++)
cin >> a[j];
ans[i] = a[6] * a[7... | #include <iostream>
#include <string>
using namespace std;
int main() {
int n;
string l[50];
double ans[50];
int a[9];
while (true) {
cin >> n;
if (n == 0)
break;
for (int i = 0; i < n; i++) {
cin >> l[i];
for (int j = 0; j < 9; j++)
cin >> a[j];
ans[i] = a[6] * a[7... | insert | 45 | 45 | 45 | 46 | TLE | |
p01315 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <vector>
using namespace std;
#define FOR(I, A, B) for (in... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <vector>
using namespace std;
#define FOR(I, A, B) for (in... | replace | 21 | 22 | 21 | 22 | 0 | |
p01315 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
struct cmp {
bool operator()(const pair<double, string> &lhs,
const pair<double, string> &rhs) const {
return greater<double>()(lhs.first, rhs.first)
? true
: less<string>()(lhs.second,... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
struct cmp {
bool operator()(const pair<double, string> &lhs,
const pair<double, string> &rhs) const {
return lhs.first == rhs.first ? lhs.second < rhs.second
: lhs.first > rhs.firs... | replace | 8 | 11 | 8 | 10 | 0 | |
p01316 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
int C[16];
int x[2001];
int dp[2001][256];
const int INF = 1 << 30;
int main() {
int N, M;
while (cin >> N >> M, N) {
for (int i = 0; i < M; i++) {
cin >> C[i];
}
for (int i = 0; i < N; i++) {
cin >> x[i];
}
for (int i = 0; i <= N; i++) {... | #include "bits/stdc++.h"
using namespace std;
int C[16];
int x[20001];
int dp[20001][256];
const int INF = 1 << 30;
int main() {
int N, M;
while (cin >> N >> M, N) {
for (int i = 0; i < M; i++) {
cin >> C[i];
}
for (int i = 0; i < N; i++) {
cin >> x[i];
}
for (int i = 0; i <= N; i++)... | replace | 3 | 5 | 3 | 5 | 0 | |
p01316 | C++ | Time 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 INF 114514810
#define MOD 1000000007
#define ALL(a) (a).begin(), (a).end()
#define ms(m, v) memset(m, v, sizeof(m))
#define D10 fixed << setprecision(10)
typedef vector<int> vi;
type... | #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 INF 114514810
#define MOD 1000000007
#define ALL(a) (a).begin(), (a).end()
#define ms(m, v) memset(m, v, sizeof(m))
#define D10 fixed << setprecision(10)
typedef vector<int> vi;
type... | replace | 37 | 38 | 37 | 38 | TLE | |
p01316 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define inf 1e9
#define ll long long
#define ull unsigned long long
#define M 1000000007
#define P pair<int, int>
#define PLL pair<ll, ll>
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define RFOR(i, m, n) for (int i = m; i >= n; i--)
#define rep(i, n) FOR(i, 0, n)
#def... | #include <bits/stdc++.h>
using namespace std;
#define inf 1e9
#define ll long long
#define ull unsigned long long
#define M 1000000007
#define P pair<int, int>
#define PLL pair<ll, ll>
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define RFOR(i, m, n) for (int i = m; i >= n; i--)
#define rep(i, n) FOR(i, 0, n)
#def... | replace | 22 | 24 | 22 | 24 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.