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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p01126 | C++ | Runtime Error | #include <bits/stdc++.h>
#define mp make_pair
#define pb push_back
#define REP(i, a, n) for (int i = a; i < (n); i++)
#define rep(i, n) for (int i = 0; i < (n); i++)
#define all(s) s.begin(), s.end()
#define rall(s) s.rbegin(), s.rend()
#define range(x, min, max) ((min) <= (x) && (x) <= (max))
#define xyrange(x, minX,... | #include <bits/stdc++.h>
#define mp make_pair
#define pb push_back
#define REP(i, a, n) for (int i = a; i < (n); i++)
#define rep(i, n) for (int i = 0; i < (n); i++)
#define all(s) s.begin(), s.end()
#define rall(s) s.rbegin(), s.rend()
#define range(x, min, max) ((min) <= (x) && (x) <= (max))
#define xyrange(x, minX,... | replace | 39 | 41 | 39 | 41 | 0 | |
p01126 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
typedef pair<int, int> P;
struct st {
int a, b, c;
};
int main() {
int n, m, a;
while (cin >> n >> m >> a, n) {
vector<st> v;
rep(i, n) {
int h, p, q;
cin >> h >> p >> q;
v.push_back({h, p, q});
... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
typedef pair<int, int> P;
struct st {
int a, b, c;
};
int main() {
int n, m, a;
while (cin >> n >> m >> a, n) {
vector<st> v;
rep(i, m) {
int h, p, q;
cin >> h >> p >> q;
v.push_back({h, p, q});
... | replace | 12 | 13 | 12 | 13 | TLE | |
p01126 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <set>
using namespace std;
int main() {
int n, m, a;
// a,bÌcüÉ©©é¡ü̳Ìê
set<int> rightLine[101];
set<int> leftLine[101];
while (cin >> n >> m >> a && !(n == 0 && m == 0 && a == 0)) {
for (int i = 0; i < 101; i++) {
rightLine[i].cle... | #include <algorithm>
#include <iostream>
#include <set>
using namespace std;
int main() {
int n, m, a;
// a,bÌcüÉ©©é¡ü̳Ìê
set<int> rightLine[101];
set<int> leftLine[101];
while (cin >> n >> m >> a && !(n == 0 && m == 0 && a == 0)) {
for (int i = 0; i < 101; i++) {
rightLine[i].cle... | insert | 47 | 47 | 47 | 55 | TLE | |
p01126 | C++ | Time Limit Exceeded | #include <iostream>
#include <vector>
using namespace std;
int main() {
int n, m, a;
while (true) {
cin >> n >> m >> a;
vector<int> amida1(m), amida2(m), amida3(m);
for (int i = 0; i < m; i++) {
cin >> amida1[i] >> amida2[i] >> amida3[i];
}
int maxh, maxpos, pos = a, posh = 869120;
... | #include <iostream>
#include <vector>
using namespace std;
int main() {
int n, m, a;
while (true) {
cin >> n >> m >> a;
if (n == 0 && m == 0 && a == 0) {
break;
}
vector<int> amida1(m), amida2(m), amida3(m);
for (int i = 0; i < m; i++) {
cin >> amida1[i] >> amida2[i] >> amida3[... | insert | 10 | 10 | 10 | 14 | TLE | |
p01126 | C++ | Runtime Error | #define _CRT_SECURE_NO_WARNINGS // #pragma warning(disable:4996)
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std... | #define _CRT_SECURE_NO_WARNINGS // #pragma warning(disable:4996)
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std... | replace | 34 | 35 | 34 | 35 | 0 | |
p01126 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define int long long
vector<vector<int>> w_line;
signed main() {
int n, m, a;
while (cin >> n >> m >> a, n) {
map<int, int> w_line[1001];
for (int i = 0; i < n; i++) {
int h, p, q;
cin >> h >> p >> q;
w_line[h][p] = q;
w_line[h][q] = ... | #include <bits/stdc++.h>
using namespace std;
#define int long long
vector<vector<int>> w_line;
signed main() {
int n, m, a;
while (cin >> n >> m >> a, n) {
int w_line[1001][101] = {0};
for (int i = 0; i < m; i++) {
int h, p, q;
cin >> h >> p >> q;
w_line[h][p] = q;
w_line[h][q] =... | replace | 10 | 12 | 10 | 12 | TLE | |
p01126 | C++ | Runtime Error | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
using namespace std;
struct ans {
int n;
ans *next;
};
int main() {
//
ans *start = new ans();
start->next = NULL;
ans *end = start, *buf;
//
char s[20];
char *ps;
int i, j;
int n, m, a;
int h, p, q;
int line[100][10... | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
using namespace std;
struct ans {
int n;
ans *next;
};
int main() {
//
ans *start = new ans();
start->next = NULL;
ans *end = start, *buf;
//
char s[20];
char *ps;
int i, j;
int n, m, a;
int h, p, q;
int line[100][10... | replace | 43 | 45 | 43 | 45 | 0 | |
p01126 | C++ | Runtime Error | #include <cstring>
#include <iostream>
using namespace std;
int t[1002][1002];
int main() {
int n, m, a;
while (cin >> n >> m >> a, n || m || a) {
memset(t, -1, sizeof(t));
for (int i = 0; i < m; i++) {
int h, p, q;
cin >> h >> p >> q;
t[1000 - h - 1][p - 1] = q - 1;
t[1000 - h -... | #include <cstring>
#include <iostream>
using namespace std;
int t[1002][1002];
int main() {
int n, m, a;
while (cin >> n >> m >> a, n || m || a) {
memset(t, -1, sizeof(t));
for (int i = 0; i < m; i++) {
int h, p, q;
cin >> h >> p >> q;
t[1000 - h][p - 1] = q - 1;
t[1000 - h][q - ... | replace | 15 | 17 | 15 | 17 | 0 | |
p01126 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctype.h>
#include <iostream>
#include <map>
#include <queue>
#include <sstream>
#include <string>
#include <utility>
using namespace std;
int main() {
int n, m, a;
while (1) {
cin >> n >> m >> a;
if (n == 0 && m == 0 && a... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctype.h>
#include <iostream>
#include <map>
#include <queue>
#include <sstream>
#include <string>
#include <utility>
using namespace std;
int main() {
int n, m, a;
while (1) {
cin >> n >> m >> a;
if (n == 0 && m == 0 && a... | replace | 20 | 21 | 20 | 21 | 0 | |
p01126 | C++ | Runtime Error |
// http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=2001
#include <algorithm>
#include <climits>
#include <cmath>
#include <cstring>
#include <ctime>
#include <iostream>
#include <map>
#include <numeric>
#include <vector>
#define ALL(v) (v).begin(), (v).end()
#define REP(i, p, n) for (int i = p; i < (int)(n)... |
// http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=2001
#include <algorithm>
#include <climits>
#include <cmath>
#include <cstring>
#include <ctime>
#include <iostream>
#include <map>
#include <numeric>
#include <vector>
#define ALL(v) (v).begin(), (v).end()
#define REP(i, p, n) for (int i = p; i < (int)(n)... | replace | 46 | 47 | 46 | 47 | 0 | |
p01126 | C++ | Time Limit Exceeded | #include <iostream>
#include <map>
#include <vector>
using namespace std;
int main() {
int n, m, a;
while (cin >> n >> m >> a, n) {
vector<vector<pair<int, int>>> line(1001);
for (int i = 0; i < n; i++) {
int h, p, q;
cin >> h >> p >> q;
line[h].push_back(make_pair(p, q));
line[h].... | #include <iostream>
#include <map>
#include <vector>
using namespace std;
int main() {
int n, m, a;
while (cin >> n >> m >> a, n) {
vector<vector<pair<int, int>>> line(1001);
for (int i = 0; i < m; i++) {
int h, p, q;
cin >> h >> p >> q;
line[h].push_back(make_pair(p, q));
line[h].... | replace | 10 | 11 | 10 | 11 | TLE | |
p01126 | 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;
class position {
public:
int x, y;
int height;
};
int main() {
int n, m, a;
while (1) {
cin >> n >> m >> a;
if (!n && !m && !a)
break;
int dt[n + 1];
rep(i, n + 1) d... | #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;
class position {
public:
int x, y;
int height;
};
int main() {
int n, m, a;
while (1) {
cin >> n >> m >> a;
if (!n && !m && !a)
break;
int dt[n + 1];
rep(i, n + 1) d... | replace | 21 | 23 | 21 | 23 | 0 | |
p01126 | C++ | Runtime Error | #include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
int field[1001][101];
while (true) {
int n, m, a;
cin >> n >> m >> a;
if (n == 0 && m == 0 && a == 0) {
break;
}
memset(field, 0, sizeof(field));
int st = 0;
for (int i = 0; i < m; i++) {
... | #include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
int field[1001][101];
while (true) {
int n, m, a;
cin >> n >> m >> a;
if (n == 0 && m == 0 && a == 0) {
break;
}
memset(field, 0, sizeof(field));
int st = 0;
for (int i = 0; i < m; i++) {
... | replace | 22 | 23 | 22 | 23 | 0 | |
p01126 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int n, m, a, h, p, q;
while (cin >> n >> m >> a, n) {
vector<pair<int, int>> v;
vector<vector<pair<int, int>>> vec;
for (int i = 0; i < n + 2; i++)
vec.push_back(v);
for (int i = 0; i < m; i++) {
... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int n, m, a, h, p, q;
while (cin >> n >> m >> a, n) {
vector<pair<int, int>> v;
vector<vector<pair<int, int>>> vec;
for (int i = 0; i < n + 2; i++)
vec.push_back(v);
for (int i = 0; i < m; i++) {
... | delete | 21 | 23 | 21 | 21 | 0 | |
p01126 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
struct line {
int h, p, q;
line() {}
~line() {}
bool operator<(const line &b) const { return h < b.h; }
};
int main() {
int n, m, a;
while (true) {
scanf("%d%d%d", &n, &m, &a);
if ((n | m | a) == 0)
break;
vector<int> amd(n);
for (int i =... | #include <bits/stdc++.h>
using namespace std;
struct line {
int h, p, q;
line() {}
~line() {}
bool operator<(const line &b) const { return h < b.h; }
};
int main() {
int n, m, a;
while (true) {
scanf("%d%d%d", &n, &m, &a);
if ((n | m | a) == 0)
break;
vector<int> amd(n);
for (int i =... | replace | 20 | 21 | 20 | 21 | 0 | |
p01126 | C++ | Runtime Error | #include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include <cassert>
#include <functional>
typedef long long ll;
using namespace std;
#define mod 100000... | #include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include <cassert>
#include <functional>
typedef long long ll;
using namespace std;
#define mod 100000... | replace | 23 | 24 | 23 | 24 | 0 | |
p01126 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
using namespace std;
int n, m, a;
int h, p, q;
int now_a;
pair<int, pair<int, int>> data[100];
int main() {
while (1) {
// Input
cin >> n >> m >> a;
now_a = a;
if (n + m + a == 0)
break;
for (int i = 0; i < m; i++) {
cin >> h >> p >> q;
... | #include <algorithm>
#include <iostream>
using namespace std;
int n, m, a;
int h, p, q;
int now_a;
pair<int, pair<int, int>> data[1000];
int main() {
while (1) {
// Input
cin >> n >> m >> a;
now_a = a;
if (n + m + a == 0)
break;
for (int i = 0; i < m; i++) {
cin >> h >> p >> q;
... | replace | 8 | 9 | 8 | 9 | TLE | |
p01126 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
struct amida {
int h, p, q;
};
bool cmp(const amida &x, const amida &y) { return x.h > y.h; }
int main() {
int n, m, a;
while (cin >> n >> m >> a && (n || m || a)) {
vector<amida> b(n);
for (int i = 0; i ... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
struct amida {
int h, p, q;
};
bool cmp(const amida &x, const amida &y) { return x.h > y.h; }
int main() {
int n, m, a;
while (cin >> n >> m >> a && (n || m || a)) {
vector<amida> b(m);
for (int i = 0; i ... | replace | 16 | 17 | 16 | 17 | 0 | |
p01126 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
struct Bridge {
int p, q;
};
int n, m, a;
vector<vector<Bridge>> bvec;
void solve() {
for (int i = 1000 - 1; i >= 0; i--) {
for (int j = 0; j < (int)bvec[i].size(); i++) {
Bridge br = bvec[i][j];
if (br.p == a) {
a = br.q;
break;
... | #include <bits/stdc++.h>
using namespace std;
struct Bridge {
int p, q;
};
int n, m, a;
vector<vector<Bridge>> bvec;
void solve() {
for (int i = 1000 - 1; i >= 0; i--) {
for (int j = 0; j < (int)bvec[i].size(); j++) {
Bridge br = bvec[i][j];
if (br.p == a) {
a = br.q;
break;
... | replace | 13 | 14 | 13 | 14 | TLE | |
p01126 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, a;
while (cin >> n >> m >> a, n || m || a) {
--a;
int kuji[1000][100];
for (int i = 0; i < 100; i++) {
for (int j = 0; j < 1000; j++)
kuji[j][i] = i;
}
for (int i = 0; i < m; i++) {
int h, p, q;
cin ... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, a;
while (cin >> n >> m >> a, n || m || a) {
--a;
int kuji[1000][100];
for (int i = 0; i < 100; i++) {
for (int j = 0; j < 1000; j++)
kuji[j][i] = i;
}
for (int i = 0; i < m; i++) {
int h, p, q;
cin ... | replace | 20 | 21 | 20 | 21 | -11 | |
p01126 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int n, m, a;
int memo[1005][105] = {0};
int main() {
int b, i, j = 0, h, p, q;
while (1) {
cin >> n >> m >> a;
if (n + m + a == 0)
break;
for (b = 0; b < m; b++) {
cin >> h >> p >> q;
memo[h][p] = q;
memo[h][q] = p;
if (j < h... | #include <bits/stdc++.h>
using namespace std;
int n, m, a;
int memo[1005][105] = {0};
int main() {
int b, i, j = 0, h, p, q;
while (1) {
cin >> n >> m >> a;
if (n + m + a == 0)
break;
for (b = 0; b < m; b++) {
cin >> h >> p >> q;
memo[h][p] = q;
memo[h][q] = p;
if (j < h... | replace | 26 | 27 | 26 | 27 | TLE | |
p01127 | C++ | Time Limit Exceeded | #include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include <cassert>
#include <functional>
typedef long long ll;
using namespace std;
#define debug(x) c... | #include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include <cassert>
#include <functional>
typedef long long ll;
using namespace std;
#define debug(x) c... | replace | 42 | 43 | 42 | 43 | TLE | |
p01127 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define loop(n, i) for (int i = 0; i < n; i++)
#define all(v) v.begin(), v.end()
#define HERE cout << "HERE: " << __LINE__ << endl;
#define INSP(v) cout << v << " at " << __LINE__ << endl;
using namespace std;
typedef long long ll;
int main() {
int n;
cin >> n;
while (n--) {
int w,... | #include <bits/stdc++.h>
#define loop(n, i) for (int i = 0; i < n; i++)
#define all(v) v.begin(), v.end()
#define HERE cout << "HERE: " << __LINE__ << endl;
#define INSP(v) cout << v << " at " << __LINE__ << endl;
using namespace std;
typedef long long ll;
int main() {
int n;
cin >> n;
while (n--) {
int h,... | replace | 14 | 16 | 14 | 16 | TLE | |
p01127 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <map>
#include <vector>
using namespace std;
typedef pair<int, int> P;
int h, w;
bool ans;
void debug(vector<string> s) {
cout << "[debug]" << endl;
for (int y = 0; y < h; y++) {
cout << s[y] << endl;
}
cout << endl;
}
// ツ債カツ湘」ツづ?右ツ可コツづ個催?標ツづーツ陛板つキ
pair<... | #include <algorithm>
#include <iostream>
#include <map>
#include <vector>
using namespace std;
typedef pair<int, int> P;
int h, w;
bool ans;
void debug(vector<string> s) {
cout << "[debug]" << endl;
for (int y = 0; y < h; y++) {
cout << s[y] << endl;
}
cout << endl;
}
// ツ債カツ湘」ツづ?右ツ可コツづ個催?標ツづーツ陛板つキ
pair<... | replace | 102 | 103 | 102 | 103 | 0 | |
p01128 | C++ | Runtime Error | #include <algorithm>
#include <complex>
#include <iostream>
#include <utility>
#include <vector>
#define X real()
#define Y imag()
#define EPS (1e-10)
using namespace std;
typedef complex<double> P;
typedef pair<P, P> L;
namespace std {
bool operator<(const P &a, const P &b) {
return a.X != b.X ? a.X < b.X : a.Y < b... | #include <algorithm>
#include <complex>
#include <iostream>
#include <utility>
#include <vector>
#define X real()
#define Y imag()
#define EPS (1e-10)
using namespace std;
typedef complex<double> P;
typedef pair<P, P> L;
namespace std {
bool operator<(const P &a, const P &b) {
return a.X != b.X ? a.X < b.X : a.Y < b... | insert | 69 | 69 | 69 | 73 | 0 | |
p01128 | C++ | Runtime Error | #include <algorithm>
#include <array>
#include <cassert>
#include <complex>
#include <iostream>
#include <tuple>
#include <vector>
using namespace std;
const double EPS = 1e-10;
template <class T> bool eq(const T &a, const T &b) { return abs(a - b) < EPS; }
typedef complex<double> point;
double cross(const point &a, ... | #include <algorithm>
#include <array>
#include <cassert>
#include <complex>
#include <iostream>
#include <tuple>
#include <vector>
using namespace std;
const double EPS = 1e-10;
template <class T> bool eq(const T &a, const T &b) { return abs(a - b) < EPS; }
typedef complex<double> point;
double cross(const point &a, ... | insert | 73 | 73 | 73 | 75 | 0 | |
p01128 | 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 = (b)-1; i >= (a); i--)
#define al... | #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 = (b)-1; i >= (a); i--)
#define al... | replace | 102 | 103 | 102 | 103 | 0 | |
p01128 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <iostream>
#include <vector>
#define REP(i, a, n) for (int i = (a); i < (n); i++)
using namespace std;
typedef pair<double, int> pdi;
struct point {
int x, y;
};
struct line {
point p, q;
};
int T, N, O[110], L[110];
line A, S[110];
bool intersect(line l1, line l2) ... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <vector>
#define REP(i, a, n) for (int i = (a); i < (n); i++)
using namespace std;
typedef pair<double, int> pdi;
struct point {
int x, y;
};
struct line {
point p, q;
};
int T, N, O[110], L[110];
line A, S[110];
bool intersect(line l1, line l2) ... | replace | 65 | 66 | 65 | 66 | 0 | |
p01128 | C++ | Runtime Error | #include <algorithm>
#include <complex>
#include <cstdio>
#include <vector>
#define mp make_pair
#define pb push_back
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef complex<double> Point;
const double EPS = 1e-9;
class Line : public vector<Point> {
public:
Line() {}
Line(const Poi... | #include <algorithm>
#include <complex>
#include <cstdio>
#include <vector>
#define mp make_pair
#define pb push_back
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef complex<double> Point;
const double EPS = 1e-9;
class Line : public vector<Point> {
public:
Line() {}
Line(const Poi... | insert | 96 | 96 | 96 | 98 | 0 | |
p01128 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define EPS (1e-10)
#define equals(a, b) (fabs((a) - (b)) < EPS)
// ???/????????????
struct Point {
double x, y;
Point(double x = 0.0, double y = 0.0) : x(x), y(y) {}
Point operator+(Point p) { return Point(x + p.x, y + p.y); }
Point operator-(Point p) { return ... | #include <bits/stdc++.h>
using namespace std;
#define EPS (1e-10)
#define equals(a, b) (fabs((a) - (b)) < EPS)
// ???/????????????
struct Point {
double x, y;
Point(double x = 0.0, double y = 0.0) : x(x), y(y) {}
Point operator+(Point p) { return Point(x + p.x, y + p.y); }
Point operator-(Point p) { return ... | insert | 148 | 148 | 148 | 153 | 0 | |
p01128 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, a, b) for (int i = a; i < b; i++)
const double EPS = 1e-8;
const double INF = 1e12;
typedef complex<double> P;
namespace std {
bool operator<(const P &a, const P &b) {
return real(a) != real(b) ? real(a) < real(b) : imag(a) < imag(b);
}
} // namespace std
... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, a, b) for (int i = a; i < b; i++)
const double EPS = 1e-8;
const double INF = 1e12;
typedef complex<double> P;
namespace std {
bool operator<(const P &a, const P &b) {
return real(a) != real(b) ? real(a) < real(b) : imag(a) < imag(b);
}
} // namespace std
... | insert | 104 | 104 | 104 | 109 | 0 | |
p01128 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define pb(n) push_back(n)
#define fi first
#define se second
#define all(r) begin(r), end(r)
#define vmax(ary) *max_element(all(ary))
#define vmin(ary) *min_element(all(ary))
#define debug(x) cout << #x << ": " << x << endl
#define fcout(n) cout << fixed << setprecision((... | #include <bits/stdc++.h>
using namespace std;
#define pb(n) push_back(n)
#define fi first
#define se second
#define all(r) begin(r), end(r)
#define vmax(ary) *max_element(all(ary))
#define vmin(ary) *min_element(all(ary))
#define debug(x) cout << #x << ": " << x << endl
#define fcout(n) cout << fixed << setprecision((... | replace | 218 | 233 | 218 | 235 | 0 | |
p01130 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
using namespace std;
#define INF 10000001
#define MAX_SIZE 101
long long g_d[MAX_SIZE][MAX_SIZE];
void warshall_floyd(int v) {
for (int k = 0; k < v; ++k) {
for (int i = 0; i < v; ++i) {
for (int j = 0; j < v; ++j) {
g_d[i][j] = min(g_d[i][j], g_d[i][k] + g... | #include <algorithm>
#include <iostream>
using namespace std;
#define INF 10000001
#define MAX_SIZE 101
long long g_d[MAX_SIZE][MAX_SIZE];
void warshall_floyd(int v) {
for (int k = 0; k < v; ++k) {
for (int i = 0; i < v; ++i) {
for (int j = 0; j < v; ++j) {
g_d[i][j] = min(g_d[i][j], g_d[i][k] + g... | delete | 19 | 20 | 19 | 19 | TLE | |
p01130 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
using namespace std;
const int MAX = 100;
const int INF = (1 << 10);
int main() {
int n, m;
int s, g1, g2;
int pipe[MAX][MAX];
while (1) {
scanf("%d%d%d%d%d", &n, &m, &s, &g1, &g2);
if (n == 0 && m == 0 && s == 0 && g1 == 0 && g2 == 0)
break;
for (in... | #include <algorithm>
#include <cstdio>
using namespace std;
const int MAX = 101;
const int INF = (1 << 21);
int main() {
int n, m;
int s, g1, g2;
int pipe[MAX][MAX];
while (1) {
scanf("%d%d%d%d%d", &n, &m, &s, &g1, &g2);
if (n == 0 && m == 0 && s == 0 && g1 == 0 && g2 == 0)
break;
for (in... | replace | 4 | 6 | 4 | 6 | 0 | |
p01130 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
template <class T> inline void chmin(T &a, const T &b) {
if (a > b)
a = b;
}
constexpr int MAX_N = 100;
constexpr int INF = (1 << 29);
int dist[MAX_N][MAX_N];
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
for (int n, m, s, g1, g2; cin >> n >> m... | #include <bits/stdc++.h>
using namespace std;
template <class T> inline void chmin(T &a, const T &b) {
if (a > b)
a = b;
}
constexpr int MAX_N = 100;
constexpr int INF = (1 << 29);
int dist[MAX_N][MAX_N];
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
for (int n, m, s, g1, g2; cin >> n >> m... | insert | 21 | 21 | 21 | 25 | 0 | |
p01131 | C++ | Runtime Error | #include <stdio.h>
#include <string>
using namespace std;
string table[] = {"", ".,!? ", "abc", "def", "ghi",
"jkl", "mno", "pqrs", "tuv", "wxyz"};
char str[128];
int main() {
int a;
scanf("%d", &a);
while (a--) {
scanf("%s", str);
int renzoku = 0;
char now = '0';
for (int ... | #include <stdio.h>
#include <string>
using namespace std;
string table[] = {"", ".,!? ", "abc", "def", "ghi",
"jkl", "mno", "pqrs", "tuv", "wxyz"};
char str[1280];
int main() {
int a;
scanf("%d", &a);
while (a--) {
scanf("%s", str);
int renzoku = 0;
char now = '0';
for (int... | replace | 5 | 6 | 5 | 6 | 0 | |
p01131 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
char bt[9][8] = {".,!? ", "abc", "def", "ghi", "jkl",
"mno", "pqrs", "tuv", "wxyz"};
int main() {
int N;
for (scanf("%d", &N); N--;) {
char mes[128];
scanf(" %s", mes);
int len = strlen(mes);
int prv = 0, count = 0;
for (int i =... | #include <bits/stdc++.h>
using namespace std;
char bt[9][8] = {".,!? ", "abc", "def", "ghi", "jkl",
"mno", "pqrs", "tuv", "wxyz"};
int main() {
int N;
for (scanf("%d", &N); N--;) {
char mes[1280];
scanf(" %s", mes);
int len = strlen(mes);
int prv = 0, count = 0;
for (int i ... | replace | 9 | 10 | 9 | 10 | 0 | |
p01131 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
string bottan[] = {
"",
".,!? ", // 1
"abc", // 2
"def", // 3
"ghi", // 4
"jkl", // 5
"mno", // 6
"pqrs", // 7
"tuv", // 8
"wxyz", // 9
};
int cnt[] = {5, 3, 3, 3, 3, 3, 4... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
string bottan[] = {
"",
".,!? ", // 1
"abc", // 2
"def", // 3
"ghi", // 4
"jkl", // 5
"mno", // 6
"pqrs", // 7
"tuv", // 8
"wxyz", // 9
};
int cnt[] = {0, 5, 3, 3, 3, 3, 3... | replace | 17 | 18 | 17 | 18 | -8 | |
p01131 | C++ | Runtime Error | #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... | replace | 28 | 29 | 28 | 29 | 0 | |
p01131 | C++ | Runtime Error | #include <iostream>
#include <string>
using namespace std;
const string button[] = {
"", ".,!? ", "abc", "def", "ghi", "jkl", "mno", "pqrs", "tuv", "wxyz",
};
void solve() {
string line;
cin >> line;
char pre;
int count = -1;
for (unsigned i = 0; i < line.size(); ++i) {
if (line[i] == '0') {
i... | #include <iostream>
#include <string>
using namespace std;
const string button[] = {
"", ".,!? ", "abc", "def", "ghi", "jkl", "mno", "pqrs", "tuv", "wxyz",
};
void solve() {
string line;
cin >> line;
char pre = '0';
int count = -1;
for (unsigned i = 0; i < line.size(); ++i) {
if (line[i] == '0') {
... | replace | 11 | 12 | 11 | 12 | 0 | |
p01131 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <numeric>
#include <string>
#include <vector>
using namespace std;
#define all(i) i.begin(), i.end()
#define rep(i, n) for (int i = 0; i < n; i++)
int main() {
int num = 0;
cin >> num;
string dat[12] = {"", ".,!? ", "abc", "def", "ghi",
... | #include <algorithm>
#include <iostream>
#include <numeric>
#include <string>
#include <vector>
using namespace std;
#define all(i) i.begin(), i.end()
#define rep(i, n) for (int i = 0; i < n; i++)
int main() {
int num = 0;
cin >> num;
string dat[12] = {"", ".,!? ", "abc", "def", "ghi",
... | replace | 25 | 26 | 25 | 29 | TLE | |
p01131 | C++ | Runtime Error | #include <cstdio>
using namespace std;
int main() {
char *dic[] = {"", ".,!? ", "abc", "def", "ghi",
"jkl", "mno", "pqrs", "tuv", "wxyz"};
int len[] = {-1, 5, 3, 3, 3, 3, 3, 4, 3, 4};
int n;
scanf("%d", &n);
while (n--) {
char s[80];
scanf("%s", s);
char bef = '@';
int... | #include <cstdio>
using namespace std;
int main() {
char *dic[] = {"", ".,!? ", "abc", "def", "ghi",
"jkl", "mno", "pqrs", "tuv", "wxyz"};
int len[] = {-1, 5, 3, 3, 3, 3, 3, 4, 3, 4};
int n;
scanf("%d", &n);
while (n--) {
char s[1025];
scanf("%s", s);
char bef = '@';
i... | replace | 11 | 12 | 11 | 12 | 0 | |
p01131 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
struct Data {
char c;
int n;
};
int main(void) {
int n;
cin >> n;
string str;
strin... | #include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
struct Data {
char c;
int n;
};
int main(void) {
int n;
cin >> n;
string str;
strin... | replace | 25 | 26 | 25 | 26 | 0 | |
p01132 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
int n[1000], c10[1000], c50[1000], c100[1000], c500[1000], i = 0;
while (1) {
cin >> n[i];
if (n[i] == 0)
break;
cin >> c10[i] >> c50[i] >> c100[i] >> c500[i];
i++;
}
for (int j = 0; j < i; j++) {
int m, k10, k50, k100, k500;
... | #include <iostream>
using namespace std;
int main() {
int n[10000], c10[10000], c50[10000], c100[10000], c500[10000], i = 0;
while (1) {
cin >> n[i];
if (n[i] == 0)
break;
cin >> c10[i] >> c50[i] >> c100[i] >> c500[i];
i++;
}
for (int j = 0; j < i; j++) {
int m, k10, k50, k100, k50... | replace | 5 | 6 | 5 | 6 | 0 | |
p01133 | C++ | Time Limit Exceeded | #include <math.h>
#include <stdio.h>
#define MAX_NUM 100000000
double dist(int x, int y) { return sqrt((double)(x * x + y * y)); }
double min(double a, double b) {
if (a > b)
return b;
else
return a;
}
int n, cx[20], cy[20], dx, dy;
double dfs(int now, double sum, int bit) {
int i;
double ret = MAX_... | #include <math.h>
#include <stdio.h>
#define MAX_NUM 100000000
double dist(int x, int y) { return sqrt((double)(x * x + y * y)); }
double min(double a, double b) {
if (a > b)
return b;
else
return a;
}
int n, cx[20], cy[20], dx, dy;
double dfs(int now, double sum, int bit) {
int i;
double ret = MAX_... | insert | 18 | 18 | 18 | 22 | TLE | |
p01133 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define rep(i, j) REP((i), 0, (j))
#define REP(i, j, k) for (int i = (j); (i) < (k)... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define rep(i, j) REP((i), 0, (j))
#define REP(i, j, k) for (int i = (j); (i) < (k)... | insert | 46 | 46 | 46 | 53 | TLE | |
p01133 | C++ | Time Limit Exceeded | #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>
#inc... | #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>
#inc... | replace | 98 | 100 | 98 | 100 | TLE | |
p01133 | C++ | Time Limit Exceeded | #include <cmath>
#include <iostream>
#include <map>
// S
using namespace std;
typedef pair<int, int> P;
int cx[30], cy[30], n, hx, hy, dx, dy;
map<P, double> mp;
bool func(int S, int now, double time) {
if (S == (1 << n) - 1)
return 1;
for (int i = 0; i < n; i++) {
if (!(S & (1 << i))) {
double pre = ... | #include <cmath>
#include <iostream>
#include <map>
// S
using namespace std;
typedef pair<int, int> P;
int cx[30], cy[30], n, hx, hy, dx, dy;
map<P, double> mp;
bool func(int S, int now, double time) {
if (S == (1 << n) - 1)
return 1;
for (int i = 0; i < n; i++) {
if (!(S & (1 << i))) {
if (mp[P(now,... | insert | 11 | 11 | 11 | 17 | TLE | |
p01133 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <iostream>
#include <vector>
using namespace std;
#define EPS 1e-10
struct Point {
double x, y, d;
};
int n;
Point hero, demon;
vector<Point> crystal;
bool ok;
double dist(Point a, Point b) {
return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));
}
void... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <vector>
using namespace std;
#define EPS 1e-10
struct Point {
double x, y, d;
};
int n;
Point hero, demon;
vector<Point> crystal;
bool ok;
double dist(Point a, Point b) {
return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));
}
void... | insert | 24 | 24 | 24 | 30 | TLE | |
p01133 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <cctype>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <... | #include <algorithm>
#include <cassert>
#include <cctype>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <... | replace | 60 | 61 | 60 | 61 | 1 | |
p01133 | C++ | Time Limit Exceeded | #include "bits/stdc++.h"
using namespace std;
int N, M, K, L, R, H, W;
const long long int MOD = 1000000007;
const float EPS = 1e-8;
float dis(float a, float c, float b, float d) {
return sqrt((a - b) * (a - b) + (c - d) * (c - d));
}
float dp[1 << 20][20];
int main() {
int N;
float sx, sy, gx, gy;
while... | #include "bits/stdc++.h"
using namespace std;
int N, M, K, L, R, H, W;
const long long int MOD = 1000000007;
const float EPS = 1e-8;
float dis(float a, float c, float b, float d) {
return sqrt((a - b) * (a - b) + (c - d) * (c - d));
}
float dp[1 << 20][20];
int main() {
int N;
float sx, sy, gx, gy;
while... | insert | 57 | 57 | 57 | 67 | TLE | |
p01133 | C++ | Time Limit Exceeded | #include <algorithm>
#include <math.h>
#include <stdio.h>
using namespace std;
double eps = 1e-9;
int x[23];
int y[23];
double dist[23][23];
int n;
int solve(int a, int b, double s) {
if (a == (1 << n) - 1)
return 1;
for (int i = 0; i < n; i++) {
if (a & (1 << i))
continue;
if (s + dist[b][i] + ep... | #include <algorithm>
#include <math.h>
#include <stdio.h>
using namespace std;
double eps = 1e-9;
int x[23];
int y[23];
double dist[23][23];
int n;
int solve(int a, int b, double s) {
if (a == (1 << n) - 1)
return 1;
for (int i = 0; i < n; i++) {
if (a & (1 << i))
continue;
if (s + dist[b][i] + ep... | insert | 17 | 17 | 17 | 22 | TLE | |
p01133 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#define INF (1 << 30)
#define EPS (double)(1e-5)
using namespace std;
int n, hx, hy, dx, dy;
int cx[22], cy[22];
double L(int x, int y) { return sqrt(x * x + y * y); }
bool solve(int m, int bit, double l) {
if (bit == (1 << n) - 1)
retu... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#define INF (1 << 30)
#define EPS (double)(1e-5)
using namespace std;
int n, hx, hy, dx, dy;
int cx[22], cy[22];
double L(int x, int y) { return sqrt(x * x + y * y); }
bool solve(int m, int bit, double l) {
if (bit == (1 << n) - 1)
retu... | insert | 20 | 20 | 20 | 24 | TLE | |
p01136 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
vector<int> v[31];
ll dp[31][50];
int main() {
int n;
while (scanf("%d", &n), n) {
rep(i, n) {
int f;
scanf("%d", &f);
rep(j, f) {
int k;
scanf("%d", &k);
... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
vector<int> v[31];
ll dp[31][50];
int main() {
int n;
while (scanf("%d", &n), n) {
rep(i, 31) v[i].clear();
rep(i, n) {
int f;
scanf("%d", &f);
rep(j, f) {
int k;
... | insert | 10 | 10 | 10 | 11 | TLE | |
p01136 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int n, m, a;
cin >> n;
while (n != 0) {
int i, j, k, l;
int v[51][31] = {{}};
for (i = 0; i < n; i++) {
cin >> m;
for (j = 0; j < m; j++) {
cin >> a;
v[i][a] = 1;
}
}
... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int n, m, a;
cin >> n;
while (n != 0) {
int i, j, k, l;
int v[51][31] = {{}};
for (i = 0; i < n; i++) {
cin >> m;
for (j = 0; j < m; j++) {
cin >> a;
v[i][a] = 1;
}
}
... | replace | 25 | 27 | 25 | 27 | 0 | |
p01136 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#incl... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#incl... | replace | 75 | 76 | 75 | 76 | 0 | |
p01136 | C++ | Runtime Error | #include <iostream>
#include <vector>
using namespace std;
int main() {
int n;
while (cin >> n, n) {
bool f[50][50] = {false};
vector<int> day[30];
for (int i = 0; i < n; i++)
f[i][i] = true;
for (int i = 0, a; i < n; i++) {
cin >> a;
for (int j = 0, b; j < a; j++) {
cin >>... | #include <iostream>
#include <vector>
using namespace std;
int main() {
int n;
while (cin >> n, n) {
bool f[50][50] = {false};
vector<int> day[30];
for (int i = 0; i < n; i++)
f[i][i] = true;
for (int i = 0, a; i < n; i++) {
cin >> a;
for (int j = 0, b; j < a; j++) {
cin >>... | replace | 17 | 18 | 17 | 18 | 0 | |
p01136 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int main() {
int a;
while (cin >> a, a) {
vector<int> b[30];
for (int c = 0; c < a; c++) ... | #include <algorithm>
#include <cstdio>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int main() {
int a;
while (cin >> a, a) {
vector<int> b[30];
for (int c = 0; c < a; c++) ... | replace | 28 | 29 | 28 | 29 | 0 | |
p01136 | C++ | Runtime Error | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<int, int> P... | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<int, int> P... | replace | 20 | 22 | 20 | 22 | 0 | |
p01136 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define FOR(i, k, n) for (int i = (k); i < (int)(n); ++i)
#define REP(i, n) FOR(i, 0, n)
#define FORIT(i, c) ... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define FOR(i, k, n) for (int i = (k); i < (int)(n); ++i)
#define REP(i, n) FOR(i, 0, n)
#define FORIT(i, c) ... | replace | 59 | 60 | 59 | 61 | 0 | |
p01136 | C++ | Runtime Error | #include <cstdio>
#include <cstring>
using namespace std;
typedef long long STATES;
int main(void) {
STATES free_days[31], dp[51], goal_state, next;
STATES *p;
short int i, j, n, answer, free_day, k;
while (scanf("%d", &n) == 1 && n) {
memset(free_days, 0, sizeof(free_days));
memset(dp, 0, sizeof(dp)... | #include <cstdio>
#include <cstring>
using namespace std;
typedef long long STATES;
int main(void) {
STATES free_days[31], dp[51], goal_state, next;
STATES *p;
int i, j, n, free_day, k;
short answer;
while (scanf("%d", &n) == 1 && n) {
memset(free_days, 0, sizeof(free_days));
memset(dp, 0, sizeof(d... | replace | 9 | 10 | 9 | 11 | 0 | |
p01137 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
while (1) {
int e;
cin >> e;
if (e == 0)
break;
int ans = e + 1;
for (int x = 0; x * x <= e; x++)
for (int y = 0; y * y <= e; y++)
for (int z = 0; z * z * z <= e; z++)
if (x + y * y + z * z * ... | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
while (1) {
int e;
cin >> e;
if (e == 0)
break;
int ans = e + 1;
for (int y = 0; y * y <= e; y++)
for (int z = 0; z * z * z <= e; z++)
if (y * y + z * z * z <= e)
ans = min(ans, e - y * y - z ... | replace | 11 | 16 | 11 | 15 | TLE | |
p01137 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vs = vector<string>;
using msi = map<string, int>;
using mii = map<int, int>;
using psi = pair<string, int>;
using pii = pair<int, int>;
using vlai = valarray<int>;
#define rep(i, n) for (int i = 0;... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vs = vector<string>;
using msi = map<string, int>;
using mii = map<int, int>;
using psi = pair<string, int>;
using pii = pair<int, int>;
using vlai = valarray<int>;
#define rep(i, n) for (int i = 0;... | replace | 37 | 38 | 37 | 38 | TLE | |
p01137 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int main(int argc, char *argv[]) {
int e;
while (cin >> e, e) {
int m = e;
for (int z = 0; pow(z, 3) <= e; ++z) {
for ... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int main(int argc, char *argv[]) {
int e;
while (cin >> e, e) {
int m = e;
for (int z = 0; z * z * z <= e; ++z) {
for ... | replace | 16 | 19 | 16 | 19 | TLE | |
p01137 | C++ | Time Limit Exceeded | #include <iostream>
#include <math.h>
using namespace std;
int e;
int main() {
for (;;) {
cin >> e;
;
int m = e;
if (e == 0)
break;
for (int y = 0; pow(y, 2) <= e; y++) {
for (int z = 0; pow(y, 2) + pow(z, 3) <= e; z++) {
int x = e - pow(z, 3) - pow(y, 2);
if (x + y + z... | #include <iostream>
#include <math.h>
using namespace std;
int e;
int main() {
for (;;) {
cin >> e;
;
int m = e;
if (e == 0)
break;
for (int y = 0; y * y <= e; y++) {
for (int z = 0; y * y + z * z * z <= e; z++) {
int x = e - z * z * z - y * y;
if (x + y + z < m) {
... | replace | 11 | 14 | 11 | 14 | TLE | |
p01137 | C++ | Time Limit Exceeded | #include <cmath>
#include <iostream>
using namespace std;
int main() {
int e;
while (cin >> e, e) {
int ret = 1e6;
for (int z = 0; z <= e; ++z) {
int y = (int)pow(e - z * z * z, 1.0 / 2.0);
int x = e - z * z * z - y * y;
ret = min(ret, x + y + z);
}
cout << ret << endl;
}
retur... | #include <cmath>
#include <iostream>
using namespace std;
int main() {
int e;
while (cin >> e, e) {
int ret = 1e6;
for (int z = 0; z * z * z <= e; ++z) {
int y = (int)pow(e - z * z * z, 1.0 / 2.0);
int x = e - z * z * z - y * y;
ret = min(ret, x + y + z);
}
cout << ret << endl;
}... | replace | 7 | 8 | 7 | 8 | TLE | |
p01137 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int e;
while (cin >> e, e) {
int num;
int ans = 1e9;
for (int i = 0; i < e; i++) {
for (int j = 0; j < e; j++) {
num = e - i * i * i - j * j;
if (num < 0)
break;
ans = min(ans, num + i + j);
}
}... | #include <bits/stdc++.h>
using namespace std;
int main() {
int e;
while (cin >> e, e) {
int num;
int ans = 1e9;
for (int i = 0; i < e; i++) {
if (i * i * i > e)
break;
for (int j = 0; j < e; j++) {
num = e - i * i * i - j * j;
if (num < 0)
break;
an... | insert | 9 | 9 | 9 | 11 | TLE | |
p01137 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define ll long long
#define inf 1000000000
using namespace std;
int e;
int yy(int a) {
int i = 0;
while (i * i <= a) {
if (i * i == a)
return i;
i++;
}
return inf;
}
int zzz(int a) {
int i = 0;
while (i * i * i <= a) {
if (i * i * i == a)
return i;
i... | #include <bits/stdc++.h>
#define ll long long
#define inf 1000000000
using namespace std;
int e;
int yy(int a) {
int i = 0;
while (i * i <= a) {
if (i * i == a)
return i;
i++;
}
return inf;
}
int zzz(int a) {
int i = 0;
while (i * i * i <= a) {
if (i * i * i == a)
return i;
i... | replace | 31 | 35 | 31 | 35 | TLE | |
p01137 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (n); i++)
#define REAP(i, a, n) for (int i = (a); i < (n); i++)
#define YES cout << "Yes" << endl
#define NO cout << "No" << endl
#define fr first
#define sc second
#define pb push_back
#define All(v) v.begin(), v.end()
typedef long lo... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (n); i++)
#define REAP(i, a, n) for (int i = (a); i < (n); i++)
#define YES cout << "Yes" << endl
#define NO cout << "No" << endl
#define fr first
#define sc second
#define pb push_back
#define All(v) v.begin(), v.end()
typedef long lo... | replace | 19 | 20 | 19 | 20 | TLE | |
p01137 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
int e, ans;
while (cin >> e && e != 0) {
ans = 1000000;
for (int z = 0; z * z * z <= e; z++) {
for (int y = 0; z * z * z + y * y <= e; y++) {
for (int x = 0; z * z * z + y * y + x <= e; x++) {
if (z * z * z + y * y + x == e && x ... | #include <iostream>
using namespace std;
int main() {
int e, ans;
while (cin >> e && e != 0) {
ans = 1000000;
for (int z = 0; z * z * z <= e; z++) {
for (int y = 0; z * z * z + y * y <= e; y++) {
int x = e - z * z * z - y * y;
if (x + y + z < ans)
ans = x + y + z;
}
... | replace | 9 | 13 | 9 | 12 | TLE | |
p01137 | C++ | Time Limit Exceeded | #define _USE_MATH_DEFINES
#include "bits/stdc++.h"
#define EPS 1e-10
using namespace std;
typedef long long llong;
int main() {
int e;
while (cin >> e, e) {
int m = 20000000;
int x, y, z;
for (z = 0; (int)pow(z, 3) <= e; z++) {
for (y = 0; (int)pow(y, 2) + (int)pow(z, 3) <= e; y++) {
x = ... | #define _USE_MATH_DEFINES
#include "bits/stdc++.h"
#define EPS 1e-10
using namespace std;
typedef long long llong;
int main() {
int e;
while (cin >> e, e) {
int m = 20000000;
int x, y, z;
for (z = 0; z * z * z <= e; z++) {
for (y = 0; y * y + z * z * z <= e; y++) {
x = e - (y * y + z * z ... | replace | 11 | 14 | 11 | 14 | TLE | |
p01137 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main(void) {
ios::sync_with_stdio(false);
cin.tie(0);
int e;
while (cin >> e, e) {
int x, y, z;
int ans = INT_MAX;
for (z = 0; z <= pow(e, 1.0 / 3.0); z++) {
for (y = 0; y <= sqrt(e); y++) {
if (pow(z, 3) + pow(y, 2) > e)
bre... | #include <bits/stdc++.h>
using namespace std;
int main(void) {
ios::sync_with_stdio(false);
cin.tie(0);
int e;
while (cin >> e, e) {
int x, y, z;
int ans = INT_MAX;
for (z = 0; z * z * z <= e; z++) {
y = sqrt(e - pow(z, 3));
x = e - pow(z, 3) - pow(y, 2);
ans = min(ans, x + y + z)... | replace | 10 | 16 | 10 | 14 | TLE | |
p01137 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
using namespace std;
#define INF 9999999
int main() {
int e;
while (cin >> e, e) {
// x+y^2+z^3=e
int ans = INF;
for (int z = 0; z * z * z <= e; z++) {
for (int y = 0; (y * y) + (z * z * z) <= e; y++) {
for (int x = 0; x + (y * y) + (z * z * z) <... | #include <algorithm>
#include <iostream>
using namespace std;
#define INF 9999999
int main() {
int e;
while (cin >> e, e) {
// x+y^2+z^3=e
int ans = INF;
for (int z = 0; z * z * z <= e; z++) {
for (int y = 0; (y * y) + (z * z * z) <= e; y++) {
ans = min(ans, e - y * y - z * z * z + y + ... | replace | 14 | 18 | 14 | 15 | TLE | |
p01137 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
int e;
while (cin >> e && e) {
int m = 1 << 30, tmp;
for (int x = 0; x <= 1000000 && x <= e; x++) {
for (int y = 0; y <= 1000 && (x + y * y) <= e; y++) {
for (int z = 0; z <= 100 && (x + y * y + z * z * z) <= e; z++) {
if ((x + ... | #include <iostream>
using namespace std;
int main() {
int e;
while (cin >> e && e) {
int m = 1 << 30;
for (int y = 0; y <= 1000; y++) {
for (int z = 0; z <= 100; z++) {
int x = e - y * y - z * z * z;
if (x >= 0)
m = min(m, x + y + z);
}
}
cout << m << endl;
... | replace | 7 | 14 | 7 | 13 | TLE | |
p01137 | C++ | Time Limit Exceeded | #include <complex>
#include <iostream>
#include <map>
#include <math.h>
#include <string>
using namespace std;
int main() {
int e;
while (cin >> e, e) {
int x, y, z;
int answer = 1000000;
/*for(int i=0;i<=e;i++){
for(int j=0;j<=sqrt(e)-i;j++){
for(int k=0;k<=pow(e,1.0/3.0)-i+pow... | #include <complex>
#include <iostream>
#include <map>
#include <math.h>
#include <string>
using namespace std;
int main() {
int e;
while (cin >> e, e) {
int x, y, z;
int answer = 1000000;
/*for(int i=0;i<=e;i++){
for(int j=0;j<=sqrt(e)-i;j++){
for(int k=0;k<=pow(e,1.0/3.0)-i+pow... | replace | 29 | 30 | 29 | 30 | TLE | |
p01137 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
while (1) {
int e, min = 100000000, ans;
cin >> e;
if (e == 0)
break;
for (int i = 0; i <= e; i++) {
for (int j = 0; j <= e; j++) {
ans = e - (i * i + j * j * j);
if (min > ans + j + i && e >= ans && ans >= 0)
... | #include <iostream>
using namespace std;
int main() {
while (1) {
int e, min = 100000000, ans;
cin >> e;
if (e == 0)
break;
for (int i = 0; i * i * i <= e; i++) {
for (int j = 0; j * j <= e; j++) {
ans = e - (i * i * i + j * j);
if (min > ans + j + i && e >= ans && ans >= ... | replace | 9 | 12 | 9 | 12 | TLE | |
p01137 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int e;
cin >> e;
while (e) {
int x = 0;
int y = 0;
int z = 0;
int m = 0;
for (z = 0; z <= e / 9; z++)
for (y = 0; y <= e / 2; y++) {
x = e - z * z * z - y * y;
if (x < 0)
continue;
int t = x + ... | #include <bits/stdc++.h>
using namespace std;
int main() {
int e;
cin >> e;
while (e) {
int x = 0;
int y = 0;
int z = 0;
int m = 0;
for (z = 0; z * z * z <= e; z++)
for (y = 0; z * z * z + y * y <= e; y++) {
x = e - z * z * z - y * y;
if (x < 0)
continue;
... | replace | 11 | 13 | 11 | 13 | TLE | |
p01137 | C++ | Time Limit Exceeded | #include <iostream>
#include <math.h>
using namespace std;
int solve(int E) {
int ans = E;
for (int z = 0; z * z * z <= E; ++z) {
for (int y = 0; y * y <= E; ++y) {
for (int x = 0; x < E; ++x)
if (x + y * y + z * z * z == E && x + y + z < ans)
ans = x + y + z;
}
}
return ans;
}
i... | #include <iostream>
#include <math.h>
using namespace std;
int solve(int E) {
int ans = E;
for (int z = 0; z * z * z <= E; ++z) {
for (int y = 0; y * y <= E; ++y) {
int x = E - y * y - z * z * z;
if (x + y + z < ans && x >= 0)
ans = x + y + z;
}
}
return ans;
}
int main() {
int E;
... | replace | 7 | 10 | 7 | 10 | TLE | |
p01137 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
while (true) {
int e;
cin >> e;
if (e == 0) {
break;
}
int ans = e;
for (int x = 0; x <= e; x++) {
for (int y = 0; y * y <= e; y++) {
for (int z = 0; z * z * z <= e; z++) {
if (x + y * ... | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
while (true) {
int e;
cin >> e;
if (e == 0) {
break;
}
int ans = e;
for (int y = 0; y * y <= e; y++) {
for (int z = 0; z * z * z <= e; z++) {
if (y * y + z * z * z <= e) {
ans = min(e -... | replace | 15 | 21 | 15 | 19 | TLE | |
p01137 | C++ | Time Limit Exceeded | #include <cctype>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <stdio.h>
using namespace std;
int main(int argc, char const *argv[]) {
int e;
while (cin >> e, e) {
int x, y, z;
int m = 1000000;
// for (int i = 0; i <= e; i++)
//{
// for (int j = 0; j*j <=... | #include <cctype>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <stdio.h>
using namespace std;
int main(int argc, char const *argv[]) {
int e;
while (cin >> e, e) {
int x, y, z;
int m = 1000000;
// for (int i = 0; i <= e; i++)
//{
// for (int j = 0; j*j <=... | replace | 29 | 30 | 29 | 30 | TLE | |
p01137 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define REP(i, n, N) for (int i = n; i < N; i++)
#define p(S) cout << S << endl
#define mp(a, b) make_pair(a, b)
using namespace std;
int main() {
int e;
while (cin >> e, e) {
int mini = 1000000;
for (int x = 0; x <= e; x++) {
for (int y = 0; x + y * y <= e; y++) {
fo... | #include <bits/stdc++.h>
#define REP(i, n, N) for (int i = n; i < N; i++)
#define p(S) cout << S << endl
#define mp(a, b) make_pair(a, b)
using namespace std;
int main() {
int e;
while (cin >> e, e) {
int mini = 1000000;
int k;
for (int z = 0; (k = e - z * z * z) >= 0; z++) {
int y = (int)sqrt(k)... | replace | 10 | 17 | 10 | 15 | TLE | |
p01137 | C++ | Time Limit Exceeded |
#include <algorithm>
#include <cassert>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <set>
#include <stack>
#include <vector>
using namespace std;
bool solve() {
int n;
cin >> n;
i... |
#include <algorithm>
#include <cassert>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <set>
#include <stack>
#include <vector>
using namespace std;
bool solve() {
int n;
cin >> n;
i... | replace | 24 | 30 | 24 | 26 | TLE | |
p01137 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
int e;
while (scanf("%d", &e) != EOF && e) {
int m = 1000;
for (int z = 100; z >= 0; z--) {
if (e < z * z * z) {
continue;
}
for (int y = 0; y < m; y++) {
if (e < y * y + z * z * z) {
break;
}
... | #include <iostream>
using namespace std;
int main() {
int e;
while (scanf("%d", &e) != EOF && e) {
int m = 1000;
for (int z = 100; z >= 0; z--) {
if (e < z * z * z) {
continue;
}
for (int y = 0; y < m; y++) {
if (e < y * y + z * z * z) {
break;
}
... | replace | 15 | 21 | 15 | 18 | TLE | |
p01137 | C++ | Time Limit Exceeded | #include <iostream>
int main() {
int e;
while (1) {
std::cin >> e;
if (!e)
break;
int m = 1000001;
for (int i = 0; i * i * i <= e; i++) {
for (int ii = 0; i * i * i + ii * ii <= e; ii++) {
for (int i3 = 0; i * i * i + ii * ii + i3 <= e; i3++) {
if (i * i * i + ii * ii ... | #include <iostream>
int main() {
int e;
while (1) {
std::cin >> e;
if (!e)
break;
int m = 1000001;
for (int i = 0; i * i * i <= e; i++) {
for (int ii = 0; i * i * i + ii * ii <= e; ii++) {
int x = e - i * i * i - ii * ii;
int tmp = i + ii + x;
if (tmp < m)
... | replace | 11 | 18 | 11 | 15 | TLE | |
p01137 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int e;
void solve() {
int m = e;
for (int x = 0; x <= e; x++) {
for (int y = 0; y * y <= e; y++) {
for (int z = 0; z * z * z <= e; z++) {
if (x + y * y + z * z * z == e) {
m = min(m, x + y + z);
}
}
}
}
cout << m <<... | #include <bits/stdc++.h>
using namespace std;
int e;
void solve() {
int m = e;
for (int y = 0; y * y <= e; y++) {
for (int z = 0; z * z * z <= e; z++) {
int x = e - (y * y) - (z * z * z);
if (0 <= x) {
m = min(m, x + y + z);
}
}
}
cout << m << endl;
}
int main() {
while... | replace | 9 | 15 | 9 | 14 | TLE | |
p01137 | C++ | Time Limit Exceeded | /* 2012-08-20T10:33:30 */
#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... | /* 2012-08-20T10:33:30 */
#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... | replace | 197 | 200 | 197 | 200 | TLE | |
p01137 | C++ | Time Limit Exceeded | #include <iostream>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i, m, n) for (int i = m; i < (int)(n); i++)
const int INF = 10000000;
using namespace std;
typedef long long ll;
const int MAX = 10000;
/** Problem2012 : Space Coconut Grab **/
int main() {
int e;
int m = INF;
while (cin >> e... | #include <iostream>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i, m, n) for (int i = m; i < (int)(n); i++)
const int INF = 10000000;
using namespace std;
typedef long long ll;
const int MAX = 10000;
/** Problem2012 : Space Coconut Grab **/
int main() {
int e;
int m = INF;
while (cin >> e... | replace | 17 | 25 | 17 | 23 | TLE | |
p01137 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
int e;
while (cin >> e, e) {
for (int x = 0; x <= e; x++)
for (int y = 0; y <= e; y++)
for (int z = 0; z <= e; z++)
if (x + y * y + z * z * z == e) {
cout << x + y + z << endl;
goto out;
}
out:;
... | #include <iostream>
using namespace std;
int main() {
int e;
while (cin >> e, e) {
int min_a = 1000000;
int z_, y_;
for (int z = 0; z * z * z <= e; z++)
for (int y = 0; y * y + z * z * z <= e; y++) {
if (min_a > z + y + e - y * y - z * z * z) {
min_a = z + y + e - y * y - z *... | replace | 8 | 16 | 8 | 20 | TLE | |
p01137 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <stack>
#include <string>
#include <vector>
#define rep(i, j) for (int i = 0; i < j; i++)
#define all(i) i.begin(), i.end()
using namespace std;
int main() {
int e;
while (cin >> e && e != 0) {
int m = 214214, x = 0;
rep(z, 1000) rep(y, 100... | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <stack>
#include <string>
#include <vector>
#define rep(i, j) for (int i = 0; i < j; i++)
#define all(i) i.begin(), i.end()
using namespace std;
int main() {
int e;
while (cin >> e && e != 0) {
int m = 214214, x = 0;
rep(z, 111) rep(y, 1111... | replace | 13 | 14 | 13 | 14 | TLE | |
p01137 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define INF 999999999
#define mod 1000000007
#define rep(i, n) for (int i = 0; i < int(n); i++)
#define ... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define INF 999999999
#define mod 1000000007
#define rep(i, n) for (int i = 0; i < int(n); i++)
#define ... | replace | 36 | 39 | 36 | 39 | TLE | |
p01137 | C++ | Time Limit Exceeded | #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 = (b)-1; i >= (a); i--)
#define al... | #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 = (b)-1; i >= (a); i--)
#define al... | replace | 24 | 31 | 24 | 28 | TLE | |
p01137 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cstdio>
#include <vector>
using namespace std;
int main() {
int e;
while (scanf("%d", &e), e) {
int m = 1 << 25;
for (int i = 0; i <= e; i++) {
for (int j = 0; i + j * j <= e; j++) {
for (int k = 0; i + j * j + k * k * k <= e; k++) {
if (i + j * j + k *... | #include <algorithm>
#include <cstdio>
#include <vector>
using namespace std;
int main() {
int e;
while (scanf("%d", &e), e) {
int m = 1 << 25;
for (int i = 0; i * i * i <= e; i++) {
for (int j = 0; i * i * i + j * j <= e; j++) {
int val = i * i * i + j * j;
m = min(m, i + j + (e - val... | replace | 8 | 15 | 8 | 12 | TLE | |
p01137 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define REP(i, m) for (long long i = 0; i < m; i++)
#define FOR(i, n, m) for (long long i = n; i < m; i++)
#define INF 1000000000
#define INFL 10000000000000000LL
#define ALL(v) v.begin(), v.end()
#define pb push_back
#define ll long long int
#define P pair<ll, ll>
int m... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, m) for (long long i = 0; i < m; i++)
#define FOR(i, n, m) for (long long i = n; i < m; i++)
#define INF 1000000000
#define INFL 10000000000000000LL
#define ALL(v) v.begin(), v.end()
#define pb push_back
#define ll long long int
#define P pair<ll, ll>
int m... | replace | 21 | 25 | 21 | 26 | TLE | |
p01137 | C++ | Time Limit Exceeded | #include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
int INF = 10000000;
int cast(int e) {
int Min = INF;
for (int i = 0; pow(i, 3) <= e; i++) {
for (int j = 0; pow(j, 2) <= e - pow(i, 3); j++) {
int k = e - pow(i, 3) - pow(j, 2);
if (k >= 0) {
Min = min(i + j + k... | #include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
int INF = 10000000;
int cast(int e) {
int Min = INF;
for (int i = 0; i * i * i <= e; i++) {
for (int j = 0; j * j <= e - i * i * i; j++) {
int k = e - i * i * i - j * j;
if (k >= 0) {
Min = min(i + j + k, Min);
... | replace | 12 | 15 | 12 | 15 | TLE | |
p01137 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, s, n) for (int i = s; i < (int)n; i++)
#define per(i, n) for (int i = n; i >= 0; i--)
#define ROF(i, s, n) for (int i = s; i >= (int)n; i--)
#define FORIT(i, A) for (auto i : A)
#define PRINT(x) cout << (x) << "\n"
#define ALL(a) (a).begin(), (a).end()
#defin... | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, s, n) for (int i = s; i < (int)n; i++)
#define per(i, n) for (int i = n; i >= 0; i--)
#define ROF(i, s, n) for (int i = s; i >= (int)n; i--)
#define FORIT(i, A) for (auto i : A)
#define PRINT(x) cout << (x) << "\n"
#define ALL(a) (a).begin(), (a).end()
#defin... | replace | 45 | 55 | 45 | 48 | TLE | |
p01137 | C++ | Time Limit Exceeded | #include <cmath>
#include <iostream>
using namespace std;
int main() {
int E, X, tempmin;
int min;
while (true) {
cin >> E;
if (E == 0) {
break;
}
min = 1000000;
for (int Z = 0; Z * Z * Z <= E; Z++) {
for (int Y = 0; Y * Y <= (E - Z * Z * Z); Y++) {
X = E - Y * Y - Z * Z... | #include <cmath>
#include <iostream>
using namespace std;
int main() {
int E, X, tempmin;
int min;
while (true) {
cin >> E;
if (E == 0) {
break;
}
min = 1000000;
for (int Z = 0; Z * Z * Z <= E; Z++) {
for (int Y = 0; Y * Y <= (E - Z * Z * Z); Y++) {
X = E - Y * Y - Z * Z... | replace | 19 | 20 | 19 | 20 | TLE | |
p01137 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main(void) {
for (;;) {
int e;
cin >> e;
int m = 1 << 26;
if (e == 0) {
return 0;
}
for (int z = 0; z * z * z <= e; z++) {
for (int y = 0; y * y + z * z * z <= e; y++) {
for (int x = 0; x + y * y + z * z * z <= e; x++) {
... | #include <iostream>
using namespace std;
int main(void) {
for (;;) {
int e;
cin >> e;
int m = 1 << 26;
if (e == 0) {
return 0;
}
for (int z = 0; z * z * z <= e; z++) {
for (int y = 0; y * y + z * z * z <= e; y++) {
int x = e - y * y - z * z * z;
if (x + y + z < m) {... | replace | 12 | 16 | 12 | 15 | TLE | |
p01137 | C++ | Time Limit Exceeded | #include <cmath>
#include <iostream>
using namespace std;
int E;
int main() {
while (cin >> E && E > 0) {
int m = 500;
for (int z = 0; z <= cbrt(E); z++) {
if (z >= m)
break;
for (int y = 0; y <= sqrt(E - pow(z, 3)); y++) {
if (y + z >= m)
break;
int x = E - pow(z... | #include <cmath>
#include <iostream>
using namespace std;
int E;
int main() {
while (cin >> E && E > 0) {
int m = 1000000;
for (int z = 0; z * z * z <= E; z++) {
// if(z >= m) break;
for (int y = 0; y * y <= E - z * z * z; y++) {
// if (y+z >= m) break;
int x = E - z * z * z - y * ... | replace | 6 | 14 | 6 | 12 | TLE | |
p01137 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int e, m, a;
while (1) {
cin >> e;
m = e;
if (e == 0) {
return 0;
}
for (int i = 0; i < m; i++) {
for (int j = 0; j < m - i; j++) {
... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int e, m, a;
while (1) {
cin >> e;
m = e;
if (e == 0) {
return 0;
}
for (int i = 0; i < m; i++) {
for (int j = 0; j < m - i; j++) {
... | insert | 23 | 23 | 23 | 26 | TLE | |
p01137 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <queue>
#include <set>
#include <stack>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <utility>
#include <vector>
#define ll long long int
#define ld long double
#define INF 1000000000
#define EPS 0.0000000001
#def... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <queue>
#include <set>
#include <stack>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <utility>
#include <vector>
#define ll long long int
#define ld long double
#define INF 1000000000
#define EPS 0.0000000001
#def... | replace | 29 | 33 | 29 | 34 | TLE |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.