submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s611165548 | p01136 | C++ | #include <bits/stdc++.h>
using namespace std;
int n;
vector<int> scjl[33];
vector<int> now[55];
int solve();
int main() {
int i, j, f, x;
while(1) {
cin >> n;
if(n == 0) break;
for(i = 0; i < n; ++i) {
cin >> f;
for(j = 0; j < f; ++j) {
cin >> x;
scjl[x].push_back(i);
... | a.cc: In function 'int solve()':
a.cc:44:11: error: 'skjl' was not declared in this scope; did you mean 'scjl'?
44 | now[skjl[i][j]] = nextv;
| ^~~~
| scjl
|
s795787330 | p01136 | C++ | # include <bits/stdc++.h>
using namespace std;
long long N;
//vector<int> A[51];
long long P[51];
vector<int> D[51];
void solve() {
for (int n = 0; n < N; n ++) {
int F;
cin >> F;
for (int f = 0; f < F; f ++) {
int a;
cin >> a;
D[a].push_back(n);
}
}
for (long long n = 0; n < N; n++) {
P[n] = ... | a.cc: In function 'void solve()':
a.cc:21:36: error: '__int64' does not name a type; did you mean '__int64_t'?
21 | P[n] = static_cast<__int64>(1) << n;
| ^~~~~~~
| __int64_t
a.cc:28:51: error: '__int64' does not name ... |
s151996048 | p01136 | C++ | #include <iostream>
#include <vector>
#include <queue>
using namespace std;
int main() {
int N;
const int M = 60;
while (scanf("%d", &N) != EOF && N) {
bool R[M][M]; // 隣接行列。i日目までに会える人がつながっている。
fill(&R[0][0], &R[0][0]+M*M, 0);
vector<int> S[M];
for (int i=0; i<N; i++) {
int f;
scanf("... | a.cc: In function 'int main()':
a.cc:28:17: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)'
28 | if (find(S[j].begin(), S[j].end(), i) != S[j].end()) {
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/... |
s245148735 | p01136 | C++ | #include <iostream>
#include <vector>
#include <queue>
using namespace std;
int main() {
int N;
const int M = 60;
while (scanf("%d", &N) != EOF && N) {
bool R[M][M]; // 隣接行列。i日目までに会える人がつながっている。
fill(&R[0][0], &R[0][0]+M*M, 0);
vector<int> S[M];
for (int i=0; i<N; i++) {
int f;
scanf("... | a.cc: In function 'int main()':
a.cc:28:17: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)'
28 | if (find(S[j].begin(), S[j].end(), i) != S[j].end()) {
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/... |
s989005425 | p01136 | C++ | #include <iostream>
#include <vector>
#include <queue>
using namespace std;
int main() {
int N;
const int M = 60;
while (scanf("%d", &N) != EOF && N) {
bool R[M][M]; // 隣接行列。i日目までに会える人がつながっている。
fill(&R[0][0], &R[0][0]+M*M, 0);
vector<int> S[M];
for (int i=0; i<N; i++) {
int f;
scanf("... | a.cc: In function 'int main()':
a.cc:28:17: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)'
28 | if (find(S[j].begin(), S[j].end(), i) != S[j].end()) {
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/... |
s757439423 | p01136 | C++ | #include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <c... | a.cc: In function 'int main()':
a.cc:83:14: error: 'tmp' was not declared in this scope; did you mean 'tm'?
83 | dp[tmp[i]] |= S;
| ^~~
| tm
|
s087053837 | p01136 | C++ | #include<iostream>
#include<vector>
#include<queue>
using namespace std;
class unionFindTree{
vector<int> par;
vector<int> rank;
public:
unionFindTree();
unionFindTree(int _n){
par.resize(_n);
rank.resize(_n);
for (int i = 0; i < _n; i++) {
par[i] = i;
rank[i] = 0;
}
}
int find... | a.cc: In member function 'int unionFindTree::size()':
a.cc:49:5: error: 'memset' was not declared in this scope
49 | memset(s, 0, sizeof(s));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include<queue>
+++ |+#incl... |
s596541196 | p01136 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
#include<queue>
using namespace std;
class unionFindTree{
vector<int> par;
vector<int> rank;
public:
unionFindTree();
unionFindTree(int _n){
par.resize(_n);
rank.resize(_n);
for (int i = 0; i < _n; i++) {
par[i] = i;
rank[i] = 0;
... | a.cc: In member function 'int unionFindTree::size()':
a.cc:50:5: error: 'memset' was not declared in this scope
50 | memset(s, 0, sizeof(s));
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include<queue>
+++ |+#incl... |
s691821505 | p01136 | C++ | #include<iostream>
#include<cstring>
#include<vector>
#include<algorithm>
#include<queue>
using namespace std;
class unionFindTree{
vector<int> par;
vector<int> rank;
public:
unionFindTree();
unionFindTree(int _n){
par.resize(_n);
rank.resize(_n);
for (int i = 0; i < _n; i++) {
par[i] = i;
... | a.cc: In function 'int main(int, char**)':
a.cc:94:12: error: expected '}' at end of input
94 | return 0;
| ^
a.cc:61:33: note: to match this '{'
61 | int main(int argc, char *argv[]){
| ^
|
s611619259 | p01136 | C++ | #include<iostream>
#include<vector>
using namespace std;
int main(int argc, char *argv[]){
int n;
long long int sche[n];
memset(sche, 0, sizeof(sche));
while(cin >> n, n){
for (int i = 0; i < n; i++) {
int x;
cin >> x;
for (int j = 0; j < x; j++) {
int tmp;
cin >> tmp;
... | a.cc: In function 'int main(int, char**)':
a.cc:8:3: error: 'memset' was not declared in this scope
8 | memset(sche, 0, sizeof(sche));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include<vector>
+++ |+#include <cstr... |
s656894337 | p01136 | C++ | #include<iostream>
#include<cstring>
#include<vector>
using namespace std;
int main(int argc, char *argv[]){
long long int n;
while(cin >> n, n){
long long int sche[n];
vector<long long int> used(n, 0);
memset(sche, 0, sizeof(sche));
for (int i = 0; i < n; i++) {
used[i] += (1LL << i);
... | a.cc: In function 'int main(int, char**)':
a.cc:32:14: error: no matching function for call to 'find(std::vector<long long int>::iterator, std::vector<long long int>::iterator, long long int)'
32 | if(find(used.begin(), used.end(), (1LL << n) - 1) != used.end()){
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~... |
s402731507 | p01136 | C++ | #include<iostream>
#include<cstring>
#include<vector>
#include<algorithm
using namespace std;
int main(int argc, char *argv[]){
long long int n;
while(cin >> n, n){
long long int sche[n];
vector<long long int> used(n, 0);
memset(sche, 0, sizeof(sche));
for (int i = 0; i < n; i++) {
used[i] +=... | a.cc:4:19: error: missing terminating > character
4 | #include<algorithm
| ^
|
s044453855 | p01136 | C++ | #include <vector>
#include <numeric>
#include <iostream>
using namespace std;
int n, f, r;
int main()
{
scanf("%d", &n);
vector<vector<bool> > c(n, vector<bool>(30, false));
for(int i = 0; i < n; i++)
{
scanf("%d", &f);
for(int j = 0; j < f; j++)
{
... | a.cc: In function 'int main()':
a.cc:27:50: error: expected ',' or ';' before ')' token
27 | vector<vector<int> > D(n, vector<int>(n, -1)));
| ^
|
s368139341 | p01136 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
while(cin >> n, n){
bool schedule[51][31];
fill(schedule[0], schedule[51], false);
for(int i = 0; i < n; i++){
int f; cin >> f;
for(int j = 0; j < f; j++){
int d; cin >> d;
schedule[i][d] = true;#include <bits/stdc++.h>
u... | a.cc:15:31: error: stray '#' in program
15 | schedule[i][d] = true;#include <bits/stdc++.h>
| ^
a.cc: In function 'int main()':
a.cc:15:32: error: 'include' was not declared in this scope
15 | schedule[i][d] = true;#include <bits/stdc++.h>
| ... |
s438662540 | p01136 | C++ | #include<vector>
#include<algorithm>
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;
}
}
vector <int> g[51];
vector <int> p[51];
for(i=0;i<n;i++) g... | a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
6 | cin >> n;
| ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
2 | #include<algorithm>
+++ |+#include <iostream>
3 | using namespace s... |
s802732231 | p01136 | C++ | #include <iostream>
#include <fstream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <cstring>
#include <string>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <algorithm>
using namespace std;
#define REP(i,n) for(int i=0; i<n; ++i)
#define FOR(i,a,b) for(int i=a; i<=b; ++i)
... | a.cc: In function 'int main()':
a.cc:30:29: error: 'loop' was not declared in this scope
30 | while (cin >> n && n && loop--){
| ^~~~
|
s749854962 | p01136 | C++ | #include <iostream>
#include <cstdio>
#include <cmath>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <algorithm>
using namespace std;
int main() {
int n;
bool f[55][35];
while(1){
memset(f, false, sizeof(f));
cin>>n;
if(n == 0) break;
for(int i=0; i<n; i++){
... | a.cc: In function 'int main()':
a.cc:19:5: error: 'memset' was not declared in this scope
19 | memset(f, false, sizeof(f));
| ^~~~~~
a.cc:9:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
8 | #include <algorithm>
+++ |+#include <cstring>... |
s069345237 | p01136 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
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 REP(i,n) for(int i=n-1;i>=(0);i--)
#define reps(i,f,n) for(int i=(f);i<(n);i++)
#define each(it,v) for(__typeof((v).begin(... | a.cc: In member function 'int DisjointSet::findSet(int)':
a.cc:45:46: error: 'A' was not declared in this scope
45 | p[x] = findSet(p[x]);A
| ^
|
s053516010 | p01136 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main() {
int n;
while(cin >> n, n) {
vector<vector<int> > v(n);
for(int i = 0; i < n; i++) {
int f; cin >> f;
v[i].resize(f);
for(int j = 0; j < f; j++) {
cin >> v[i][j];
}
sort(v[i].rbegin(), v[i].rend());
}
vector<int> met(n)... | a.cc: In function 'int main()':
a.cc:15:25: error: 'sort' was not declared in this scope; did you mean 'short'?
15 | sort(v[i].rbegin(), v[i].rend());
| ^~~~
| short
|
s246251531 | p01136 | C++ | 4
1 1
2 2 3
2 1 2
3 3 4 5
0 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 4
| ^
|
s682411265 | p01136 | C++ | #include <iostream>
constexpr int NUM_OF_DAYS = 30;
bool dp[50][50] = { {false} }; //??°???????????????????????????????????? [???][??°???] = hasMap
bool isFree[50][31] = { {false} };
int main() {
int n;
while (std::cin >> n && n) {
std::memset(dp, false, 50*50);
std::memset(isFree, false, 50*31);
for (int i =... | a.cc: In function 'int main()':
a.cc:10:22: error: 'memset' is not a member of 'std'; did you mean 'wmemset'?
10 | std::memset(dp, false, 50*50);
| ^~~~~~
| wmemset
a.cc:11:22: error: 'memset' is not a member of 'std'; did you mean 'wmemset'?
1... |
s178452365 | p01136 | C++ | #include<iostream>
#include<algorithm>
#include<stack>
#include<queue>
#include<string>
#include<functional>
#include<set>
using namespace std;
#define INF 1<<21
#define DIV 1000000007
#define MAX 100005
int main(){
int n;
while (cin >> n,n) {
int meet[55][35];
int have[55][55];
memset(meet, 0, sizeof(meet));... | a.cc: In function 'int main()':
a.cc:20:9: error: 'memset' was not declared in this scope
20 | memset(meet, 0, sizeof(meet));
| ^~~~~~
a.cc:8:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
7 | #include<set>
+++ |+#include <cstri... |
s336268543 | p01136 | C++ | #include<bits/stdc++.h>
#define INF 1e9
#define llINF 1e18
#define MOD 1e9+7
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define ll long long
using namespace std;
int main(){
int n;
while(cin>>n,n){
vector<vector<int> >vvi(n+100);
for(int i=0;i<n;i++){
int a;cin>>a;
... | a.cc: In function 'int main()':
a.cc:25:5: error: 'UF' was not declared in this scope; did you mean 'F'?
25 | UF uni(n+100);
| ^~
| F
|
s332104977 | p01136 | C++ | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
| |
s593169724 | p01136 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <set>
using namespace std;
int main(){
int n;
while(cin>>n&&n!=0){
set<int> schedules[101];
for(int i = 0; i < n; i++){
int t;
cin>>t;
for(int j = 0; j < t; j++){
int p;
... | a.cc: In function 'int main()':
a.cc:22:9: error: 'memset' was not declared in this scope
22 | memset(m,0,sizeof(m));
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include <set>
+++ |+#include <cstring>
... |
s052710961 | p01136 | C++ | /**
* Gather the Maps! (Problem F, Practice Contest for Japan Domestic, 2005-06-19)
* by Kenji Inoue, 2007-01-04
**/
#include <iostream>
#include <set>
using namespace std;
int main() {
int d[51][31]; // available dates
int m[51][51]; // maps collected
int n;
while (cin >> n, n) {
memset(d, 0, size... | a.cc: In function 'int main()':
a.cc:17:5: error: 'memset' was not declared in this scope
17 | memset(d, 0, sizeof(d));
| ^~~~~~
a.cc:8:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
7 | #include <set>
+++ |+#include <cstring>
8 |
|
s432218427 | p01136 | C++ | #include <algorithm>
#include <vector>
using namespace std;
int main( void )
{
long long OK;
bool T[50][30];
vector<int> V[30];
long long A[50];
int n;
while(cin >> n, n) {
OK = 1;
OK = (OK << n) - 1;
fill(A, A+50, 1);
for(int i=0; i < 30; ++i) V[i].clear();
for(int i=0; i < n; ++i) {
A[i] = A[i] <... | a.cc: In function 'int main()':
a.cc:13:15: error: 'cin' was not declared in this scope
13 | while(cin >> n, n) {
| ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
2 | #include <vector>
+++ |+#include <iostre... |
s901622969 | p01136 | C++ | #include<stdio.h>
#include<set>
#include<vector>
using namespace std;
vector<int> sc[30];
set<int> p[50];
set<int> t;
int main(){
int n;
int i,j;
while(1){
scanf("%d",&n);
if(n==0)return 0;
for(i=0;i<30;i++)sc[i].clear();
for(i=0;i<n;i++)p[i].clear();
for(i=0;i<n;i++){
int k;
scanf("%d",&k);
for(j=0;j<k;j... | a.cc: In function 'int main()':
a.cc:40:2: error: expected '}' at end of input
40 | }
| ^
a.cc:8:11: note: to match this '{'
8 | int main(){
| ^
|
s982036189 | p01136 | C++ | #include<iostream>
#include<cstdio>
#include<cmath>
#include<vector>
#include<string>
#include<queue>
#include<map>
#include<stack>
#include<cstdlib>
#include<cstring>
#include<algorithm>
#include<sstream>
#define reps(i,f,n) for(int i = f; i < int(n); i++)
#define rep(i,n) reps(i,0,n)
typedef __int64 ll;
using name... | a.cc:17:9: error: '__int64' does not name a type; did you mean '__int64_t'?
17 | typedef __int64 ll;
| ^~~~~~~
| __int64_t
a.cc: In function 'int main()':
a.cc:26:17: error: 'll' was not declared in this scope
26 | ll p[60]={0};
| ^~
a.cc:31:25: er... |
s044672541 | p01136 | C++ | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (true) {
int n = sc.nextInt();
if (n == 0)
break;
boolean[][] canMeet = new boolean[30][n];
for (int i = 0; i < 30; i++)
for (int j = 0; j < n; j++)
canMeet[i][j] = ... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class Main {
| ^~~~~~
|
s866801557 | p01136 | C++ | #include <iostream>
#include <vector>
#include <cstring>
using namespace std;
#define MAX 50
int N, day;
bool ok[MAX][31];
bool G[MAX][MAX];
bool visited[MAX];
void init(){
day = 0;
memset(ok, false, sizeof(ok));
memset(G, false, sizeof(G));
}
void rec(int now){
for(int i = 0 ; i < N ; i++){
if(!visite... | a.cc: In function 'bool check()':
a.cc:34:8: error: 'count' was not declared in this scope
34 | if(count(visited, visited+N, true) == N){
| ^~~~~
|
s824568665 | p01137 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.BigInteger;
public class Main{
static PrintWriter out... | Main.java:19: error: cannot find symbol
for(int i=0;i<cu.length;i++) cb[i]=i*i*i;
^
symbol: variable cu
location: class Main
1 error
|
s871058506 | p01137 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.BigInteger;
public class Main{
static PrintWriter out... | Main.java:24: error: cannot find symbol
mi=Math.mi(mi,i+sqrt+e-cb[i]-sq[sqrt]);
^
symbol: method mi(int,int)
location: class Math
1 error
|
s883239343 | p01137 | Java | public class Main {
public static void main(String[] args) {
// インプットデータ取得
Scanner sc = new Scanner(System.in);
while(true) {
double m=sc.nextDouble();
if(m==0) {break;}
double x_double=0;
double y_double=0;
double z_double=0;
//mの三乗根に一番近い整数... | Main.java:5: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:5: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s935009582 | p01137 | C | #include <stdio.h>
int main(){
int e,x,y,z,s;
s=1000000
scanf("%d",&e);
if (e!=0) {
for (z=0;z<=100;z++) {
for (y=0;y<=1000;y++) {
x=e-z*z*z-y*y;
if (x+y+z<s) {s=x+y+z;}
}
}
scanf("%d",&e);
}
return 0;
} | main.c: In function 'main':
main.c:5:10: error: expected ';' before 'scanf'
5 | s=1000000
| ^
| ;
6 | scanf("%d",&e);
| ~~~~~
|
s677359997 | p01137 | C | #include <stdio.h>
int main(){
int e,x,y,z,m;
s=1000000;
scanf("%d",&e);
if (e!=0) {
for (z=0;z<=100;z++) {
for (y=0;y<=1000;y++) {
x=e-z*z*z-y*y;
if (x+y+z<m) {m=x+y+z;}
}
}
printf("%d\n",m);
scanf("%d",&e);
}
return 0;
} | main.c: In function 'main':
main.c:5:1: error: 's' undeclared (first use in this function)
5 | s=1000000;
| ^
main.c:5:1: note: each undeclared identifier is reported only once for each function it appears in
|
s466998552 | p01137 | C | #include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#include <math.h>
//Space Crab
/* Minimize x + y + z
Subject to x + y^2 + z^3 = E
Input is E
*/
int solve(int E) {
int ans = INT_MAX;
for (int x = 0; x<=E; x++) {
for (int y = 0; y*y<=E; y++) {
int z = cbrt(E - x - y * y);
if (!(x +... | /usr/bin/ld: /tmp/ccrJHoH9.o: in function `solve':
main.c:(.text+0x4a): undefined reference to `cbrt'
collect2: error: ld returned 1 exit status
|
s815857662 | p01137 | C | #include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#include <math.h>
int solve(int E) {
int ans = INT_MAX;
for (int x = 0; x<=E; x++) {
for (int y = 0; y*y<=E; y++) {
int z = cbrt(E - x - y * y);
if (!(x + y * y + z * z * z == E)) continue;
if (x + y + z < ans) ans = (x + y + z);
... | /usr/bin/ld: /tmp/ccjr1uKb.o: in function `solve':
main.c:(.text+0x4a): undefined reference to `cbrt'
collect2: error: ld returned 1 exit status
|
s451861152 | p01137 | C | #include <stdio.h>
int main(void)
{
int x,y,z,m,e;
while(1){
scanf("%d",&e);
if(e==0){
break;
}
m=e;
for(z=0;z*z*z*<=e;z++){
for(y-0;y*y+z*z*z<=e;y++){
x=e-z*z*z-y*y;
if(m>x+y+z){
m=x+y+z;
}
}
}
printf("%d\n",m);
}
return 0;
} | main.c: In function 'main':
main.c:12:23: error: expected expression before '<=' token
12 | for(z=0;z*z*z*<=e;z++){
| ^~
|
s924273116 | p01137 | C | #define rep(i,a) for(int i=0;i<a;i++)
n;
main(){
while(scanf("%d",&n),n){
int mi=999;
rep(i,110)rep(j,1010)mi=min(mi,(n<i*i*i+j*j?inf:i+j+n-i*i*i-j*j));
cout<<mi<<endl;
}
} | main.c:2:1: warning: data definition has no type or storage class
2 | n;
| ^
main.c:2:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
3 | main(){
| ^~~~
main.c: In function 'main':
main.c:4:15: error: implicit ... |
s120351597 | p01137 | C | #define rep(i,a) for(int i=0;i<a;i++)
n;
main(){
while(scanf("%d",&n),n){
int mi=999;
rep(i,110)rep(j,1010)mi=min(mi,(n<i*i*i+j*j?inf:i+j+n-i*i*i-j*j));
printf("%d\n",mi);
}
} | main.c:2:1: warning: data definition has no type or storage class
2 | n;
| ^
main.c:2:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
3 | main(){
| ^~~~
main.c: In function 'main':
main.c:4:15: error: implicit ... |
s879669128 | p01137 | C | n,i;
#define rep(i,a) for(i=0;i<a;i++)
main(){
while(scanf("%d",&n),n){
int mi=999;
rep(i,110)rep(j,1010)mi=min(mi,(n<i*i*i+j*j?999:i+j+n-i*i*i-j*j));
printf("%d\n",mi);
}
} | main.c:1:1: warning: data definition has no type or storage class
1 | n,i;
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int]
1 | n,i;
| ^
main.c:3:1: error: return type defaults to '... |
s002337630 | p01137 | C | n,i,j;
#define rep(i,a) for(i=0;i<a;i++)
main(){
while(scanf("%d",&n),n){
int mi=999;
rep(i,110)rep(j,1010)mi=min(mi,(n<i*i*i+j*j?999:i+j+n-i*i*i-j*j));
printf("%d\n",mi);
}
} | main.c:1:1: warning: data definition has no type or storage class
1 | n,i,j;
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int]
1 | n,i,j;
| ^
main.c:1:5: error: type defaults to 'int... |
s197953358 | p01137 | C | n,i=110,j;main(){while(scanf("%d",&n),n){int mi=999;while(i--)for(int j=1;j<1010;j++)mi=fmin(mi,(n<i*i*i+j*j?999:i+j+n-i*i*i-j*j));printf("%d\n",mi);}return 0;} | main.c:1:1: warning: data definition has no type or storage class
1 | n,i=110,j;main(){while(scanf("%d",&n),n){int mi=999;while(i--)for(int j=1;j<1010;j++)mi=fmin(mi,(n<i*i*i+j*j?999:i+j+n-i*i*i-j*j));printf("%d\n",mi);}return 0;}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit... |
s882763502 | p01137 | C | #include <stdio.h>
#define min(a, b) ((a < b) ? a : b)
int main() {
int x, y, z, e, ans;
while (cin >> e) {
if (!e) { break; }
ans = e;
for (z = 0; z*z*z <= e; z++) {
for (y = 0; y*y + z*z*z <= e; y++) {
x = e - y*y - z*z*z;
ans = min(ans, x... | main.c: In function 'main':
main.c:7:12: error: 'cin' undeclared (first use in this function); did you mean 'min'?
7 | while (cin >> e) {
| ^~~
| min
main.c:7:12: note: each undeclared identifier is reported only once for each function it appears in
|
s647721475 | p01137 | C | y,m,z,e;main(k){
for(;m=1e7,scanf("%d",&e),e;printf("%d\n",m))
for(z=0;(k=z*z*z)<=e;z++)
y=sqrt(e-k);
k=y+z+e-y*y-k;
if(m>k)m=k;
}
}
} | main.c:1:1: warning: data definition has no type or storage class
1 | y,m,z,e;main(k){
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'y' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'm' [-Wimplicit-int]
1 | y,m,z,e;main(k){
| ^
main.c:1:5: error: t... |
s031702453 | p01137 | C | y,m,e;main(z){
for(;m=scanf("%d",&e)*e;y=!printf("%d\n",m))
for(;z=cbrt(e+=~y+y),k>=0;m=fmin(m,e-z*z*z+z+y++));
} | main.c:1:1: warning: data definition has no type or storage class
1 | y,m,e;main(z){
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'y' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'm' [-Wimplicit-int]
1 | y,m,e;main(z){
| ^
main.c:1:5: error: type ... |
s823686520 | p01137 | C | b,d,e,m;main(a){
for(;d=!scanf("%d",&a),a;printf("%d\n",m))
for(m=s;(e=d*d*d-a)<1;d++)
b=sqrt(-e),m=fmin(d+b-e-b*b,m);
} | main.c:1:1: warning: data definition has no type or storage class
1 | b,d,e,m;main(a){
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'd' [-Wimplicit-int]
1 | b,d,e,m;main(a){
| ^
main.c:1:5: error: t... |
s800218165 | p01137 | C | y,m,z;main(e){for(;m=scanf("%d",&e)*e;z=!printf("%d\n",m))for(;y=sqrt(e+=3*z*~z),k>=0;m=fmin(m,e--+y-y*y+z++));} | main.c:1:1: warning: data definition has no type or storage class
1 | y,m,z;main(e){for(;m=scanf("%d",&e)*e;z=!printf("%d\n",m))for(;y=sqrt(e+=3*z*~z),k>=0;m=fmin(m,e--+y-y*y+z++));}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'y' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' ... |
s379595787 | p01137 | C | #include <stdio.h>
int power( int, int );
int main( void ) {
int i, power2[ 1001 ], power3[ 101 ], e, ee, x, y, z, min;
for ( i = 0; i < 1001; i++ )
power2[ i ] = power( i, 2 );
for ( i = 0; i < 101; i++ )
power3[ i ] = power( i, 3 );
while ( scanf( "%d", &e ), e ) {
min = e;
for ( z = 0; power[ z ] <= ... | main.c: In function 'main':
main.c:15:35: error: subscripted value is neither array nor pointer nor vector
15 | for ( z = 0; power[ z ] <= e; z++ ) {
| ^
main.c:16:39: error: subscripted value is neither array nor pointer nor vector
16 | ... |
s199456401 | p01137 | C | #include <stdio.h>
int main( void ) {
int i, e, ee, x, y, z, min;
while ( scanf( "%d", &e ), e ) {
min = e;
for ( z = 0; z * z * z <= e; z++ ) {
ee = e - z * z * z;
for ( y = 0; y * y <= ee; y++ ) ;
x = ee - y * y;
if ( x + y + z < min )
min = x + y + z;
}
}
printf( "%d\n", min );
}
... | main.c:22:9: error: expected identifier or '(' before 'return'
22 | return 0;
| ^~~~~~
main.c:23:1: error: expected identifier or '(' before '}' token
23 | }
| ^
|
s497931278 | p01137 | C | #include <cstdio>
void aizu(int e){
int x, y, z;
int xyz;
for(xyz = 1; xyz <= e; xyz++){
for(x = 0; x <= xyz; x++){
for(y = 0; x + y <= xyz; y++){
z = xyz - x - y;
if(x + y * y + z * z * z == e){
printf("%d\n", xyz);
... | main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s150942748 | p01137 | C | #include<stdio.h>
#include<math.h>
#define min(a,b) (a) < (b) ? (a) : (b)
#define INF 9999999
int e;
int all(){
double limx=pow(e,1.0/3.0);
int x,y,p,q,minm=INF;
for(y=(int)sqrt(e);y>=0;y--){
p=y*y;
for(x=0;x<=(int)limx;x++){
q=x*x*x+p;
if(q>e)break;
minm=min(minm,x+y+(e-q));
}
}
return minm;
}
in... | main.c:30:9: error: expected identifier or '(' before 'for'
30 | for(y=(int)sqrt(e);y>=0;y--){
| ^~~
main.c:30:29: error: expected '=', ',', ';', 'asm' or '__attribute__' before '>=' token
30 | for(y=(int)sqrt(e);y>=0;y--){
| ^~
main.c:30:34: error: ... |
s677212702 | p01137 | C | #include<stdio.h>
#include<math.h>
#include<stdio.h>
#ifndef min
#define min(a,b) (a) < (b) ? (a) : (b)
#endif
#define INF 9999999
int *d;
void init(){
int x,y,z,p;
for(x=0;x<=100;x++)for(y=0;y<=1000;y++){
p=x*x*x+y*y;
if(p<=1000000){
if(d[p])d[p]=min(d[p],x+y);
else d[p]=x+y;
}
}
for(x=2;x<1000000;x++... | main.c: In function 'main':
main.c:26:18: error: implicit declaration of function 'malloc' [-Wimplicit-function-declaration]
26 | d=(int *)malloc(sizeof(int)*1000000);
| ^~~~~~
main.c:3:1: note: include '<stdlib.h>' or provide a declaration of 'malloc'
2 | #include<math.h>
+++ |+... |
s937282221 | p01137 | C | #include<stdio.h>
#include<math.h>
#include<stdio.h>
#ifndef min
#define min(a,b) (a) < (b) ? (a) : (b)
#endif
#define INF 9999999
int *d;
void init(){
int x,y,z,p;
for(x=0;x<=100;x++)for(y=0;y<=1000;y++){
p=x*x*x+y*y;
if(p<=1000000){
if(d[p])d[p]=min(d[p],x+y);
else d[p]=x+y;
}
}
for(x=2;x<1000000;x++... | main.c: In function 'main':
main.c:26:18: error: implicit declaration of function 'malloc' [-Wimplicit-function-declaration]
26 | d=(int *)malloc(sizeof(int)*1000000);
| ^~~~~~
main.c:3:1: note: include '<stdlib.h>' or provide a declaration of 'malloc'
2 | #include<math.h>
+++ |+... |
s153795852 | p01137 | C++ | #include<stdio.h>
using namespace std;
int main() {
int e;
while (scanf("%d", &e), e) {
int m = 10000000;
for (int y = 0; y <= 1000; y++) {
for (int z = 0; z <= 1000; z++) {
int x=e + y - y * y + z - z * z * z;
if(x>=0&&e>=y*y+z*z*z)m = min(x,m);
}
}
printf("%d",&m);
}
}
| a.cc: In function 'int main()':
a.cc:10:67: error: 'min' was not declared in this scope; did you mean 'main'?
10 | if(x>=0&&e>=y*y+z*z*z)m = min(x,m);
| ^~~
| ... |
s730994453 | p01137 | C++ | #include <bits/stdc++.h>
#define int long long
using namespace std;
main(){
int e;
while(cin>>e,e){
int ans=1e9;
for(int z=0;;z++){
if(z*z*z>e)break;
for(int y=0;;y++){
if(z*z*z+y*y>e)break;
int a=e-z*z*z+y*y;
ans=min(ans,x+y+z);
}
}
cout<<ans<<endl;
}
}
| a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
4 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:13:21: error: 'x' was not declared in this scope
13 | ans=min(ans,x+y+z);
| ^
|
s558640283 | p01137 | C++ |
import java.util.Scanner;
/**
* Created by Reopard on 2014/07/03.
*/
public class Main{
public static void main(String[] args){
int x, y, z, e, m, min;
Scanner scan = new Scanner(System.in);
while((e = scan.nextInt()) != 0){
min = Integer.MAX_VALUE;
for(z = 0; z*... | a.cc:2:1: error: 'import' does not name a type
2 | import java.util.Scanner;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:7:1: error: expected unqualified-id before 'public'
7 | public class Main{
| ^~~~~~
|
s985659023 | p01137 | C++ | #include<iostream>
#include<cmath>
#include<algorithm>
using namespace std;
int Bsearch(int e,int n){
//cout << n << endl;
int l=0,r=e;
int i=(l+r)/2;
while(r-l>=1){
i=(l+r)/2;
//cout << "i:" << i << endl;
if(e == pow(i,n)){
//cout << "aaa:" << i << endl;
return i;
}else if(e > pow(... | a.cc: In function 'int main()':
a.cc:31:5: error: 'memset' was not declared in this scope
31 | memset(a,0,sizeof(a));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include<algorithm>
+++ |+#include <cstring>
4 ... |
s638257472 | p01137 | C++ | #include<iostream>
#include<cmath>
#include<vector>
#include<functional>
using namespace std;
int main(){
int e;
while(cin>>e,e){
int m=0;
vector<int>anss(0);
for(int i=0;i<=e;i++){
for(int j=0;j*j<=e;j++){
for(int k=0;k*k*k<=e;k++){
if(i+j*j+k*k*k<e)break;
if(i+j*j+k*k*k==e)anss.push_back(i+j+k);
... | a.cc: In function 'int main()':
a.cc:20:17: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
20 | sort(anss.begin(),anss.end());
| ^~~~
| sqrt
|
s198089746 | p01137 | C++ | #include <iostream>
using namespace std;
int main() {
int ene;
for (int i=0; cin >> ene && ene>0; i++){
int min = 1000000;
int z=0;
while (z<=100) {
int xy = e - z^3;
int y=0;
while (y<xy) {
int x = xy - y^2;
if (x+y+z<min) min = x+y+z;
}
}
cout << min << endl;
}
} | a.cc: In function 'int main()':
a.cc:9:16: error: 'e' was not declared in this scope
9 | int xy = e - z^3;
| ^
|
s594053273 | p01137 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
int main()
{
long e;
while (cin >> e && e != 0)
{
long m = LONG_MAX;
for (long x = 0; x < 1000000; x++)
{
for (long y = 0; y <= e - x; y++)
{
for (long z = 0; z <= e - x - (y * y); z++)
{
if (e == x + y * y + z * z * z)
{
... | a.cc: In function 'int main()':
a.cc:10:26: error: 'LONG_MAX' was not declared in this scope
10 | long m = LONG_MAX;
| ^~~~~~~~
a.cc:3:1: note: 'LONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
2 | #include<algorith... |
s460747394 | p01137 | C++ | #include <iostream>
using namespace std;
int E;
int main(){
while(cin >> E && E > 0 )
int min = 10000001;
for (int z = 0; z < E; ++z)
{
for (int y = 0; y*y < E - z*z*z ; ++y)
{
int x = E - z*z*z - y*y;
if( x + y + z < min ) min = x + y + z ;
}
}
cout << min << en... | a.cc: In function 'int main()':
a.cc:15:23: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<'
15 | if( x + y + z < min ) min = x + y + z ;
| ~~~~~~~~~~^~~~~
a.cc:15:45: error: overloaded function with no contextual type information
1... |
s685119302 | p01137 | C++ | #include <iostream>
using namespace std;
int E;
int main(){
while(cin >> E && E > 0 )
int min = 1000001;
for (int z = 0; z < E; ++z)
{
for (int y = 0; y*y < E - z*z*z ; ++y)
{
int x = E - z*z*z - y*y;
if( x + y + z < min ) min = x + y + z ;
}
}
cout << min << end... | a.cc: In function 'int main()':
a.cc:15:23: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<'
15 | if( x + y + z < min ) min = x + y + z ;
| ~~~~~~~~~~^~~~~
a.cc:15:45: error: overloaded function with no contextual type information
1... |
s093305531 | p01137 | C++ | #include <iostream>
using namespace std;
int E;
int main(){
while(cin >> E && E > 0 )
int min = 1000001;
for (int z = 0; z < E; ++z){
for (int y = 0; y*y < E - z*z*z ; ++y){
int x = E - z*z*z - y*y;
if( x + y + z < min ) min = x + y + z ;
}
}
cout << min << endl;
return 0... | a.cc: In function 'int main()':
a.cc:13:23: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<'
13 | if( x + y + z < min ) min = x + y + z ;
| ~~~~~~~~~~^~~~~
a.cc:13:45: error: overloaded function with no contextual type information
1... |
s031766815 | p01137 | C++ | #include <stdio.h>
2
3 int e;
4
5 int x, y, z;
6 int m;
7
8 int main(void)
9 {
10 while(1) {
11 m = 1000000;
12 y = 0;
13 z = 0;
14 scanf("%d", &e);
15 if (e == 0) break;
16 while (z * z * z <= e) {
17 while (y * y <= e - z * z ... | a.cc:2:3: error: expected unqualified-id before numeric constant
2 | 2
| ^
a.cc:4:3: error: expected unqualified-id before numeric constant
4 | 4
| ^
a.cc:6:3: error: expected unqualified-id before numeric constant
6 | 6 int m;
| ^
a.cc:7:3: error: expected unqualified-id befor... |
s179890020 | p01137 | C++ | #include <cstdio>
using namespace std;
int E;
int solve(){
int ans = 1000000;
for(int z = 0; z * z * z <= E; ++z){
int F = E - z * z * z;
for(int y = 0; y * y <= F; ++y){
int x = F - y * y;
ans = min(ans, x + y + z);
}
}
return ans;
}
int main(){
while(scanf("%d", &E) && E > 0){
... | a.cc: In function 'int solve()':
a.cc:12:13: error: 'min' was not declared in this scope
12 | ans = min(ans, x + y + z);
| ^~~
|
s561194737 | p01137 | C++ | // Space Coconut Crab
#include <iostream>
using namespace std;
int count = 0; // ?¨???¬??¨ global ?????°
int solve(int E) {
// ?????´????±???????
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) {
++count;
if (x+y*y+z*z*z == E)
... | a.cc: In function 'int solve(int)':
a.cc:8:3: error: expected ',' or ';' before 'for'
8 | for (int x=0; x<=E; ++x)
| ^~~
a.cc:8:17: error: 'x' was not declared in this scope
8 | for (int x=0; x<=E; ++x)
| ^
a.cc:9:19: error: 'y' was not declared in this scope
9 | for (i... |
s666257182 | p01137 | C++ | // Space Coconut Crab
#include <iostream>
using namespace std;
int count = 0; // ?¨???¬??¨ global ?????°
int solve(int E) {
// ?????´????±???????
// x+y*y+z*z*z=E
int ans = E; // ?????§???
for (int z=0; z*z*z<=E; ++x)
for (int y=0; y*y<=E-z*z*z; ++y)
for (int x=0; x<=E-y*y-z*z*z; ++z) {
++cou... | a.cc: In function 'int solve(int)':
a.cc:9:29: error: 'x' was not declared in this scope
9 | for (int z=0; z*z*z<=E; ++x)
| ^
|
s997294946 | p01137 | C++ | #include<iostream>
using namespace std;
int main(){
long long sum=1000000;
int x,y,z;
for(z=0;z*z*z>E;z++)
for(y=0;y<(z+1)*(z+1)*(z+1)-z*z*z;y++)
for(x=0;x<(y+1)*(y+1)-y*y;x++){
if(x+y*y+z*z*z==E)
if(sum>x+y+z)sum=(x+y+z);
}
cout << sum << endl;
} | a.cc: In function 'int main()':
a.cc:7:23: error: 'E' was not declared in this scope
7 | for(z=0;z*z*z>E;z++)
| ^
|
s970279425 | p01137 | C++ | #include<iostream>
using namespace std;
int main(){
long long E, sum=1000000;
int y,z,
long long x= E-z*z*z-y*y;
while(1){
cin >> E;
if(E==0)break;
for(z=0;z*z*z<=E;z++)
for(y=0;y*y<=E;y++){
if(z*z*z+y*y>E)break;
else if(sum>x+y+z)sum=x+y+z;
}
cout << sum << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:9: error: expected unqualified-id before 'long'
7 | long long x= E-z*z*z-y*y;
| ^~~~
a.cc:14:37: error: 'x' was not declared in this scope
14 | else if(sum>x+y+z)sum=x+y+z;
| ^
|
s249917027 | p01137 | C++ | #include<iostream>
using namespace std;
int main(){
long long E, sum=1000000;
int y,z,
long long x= E-z*z*z-y*y;
while(1){
cin >> E;
if(E==0)break;
for(z=0;z*z*z<=E;z++)
for(y=0;y*y<=E;y++){
if(z*z*z+y*y>E)break;
else if(sum>x+y+z)sum=x+y+z;
}
cout << sum << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:9: error: expected unqualified-id before 'long'
7 | long long x= E-z*z*z-y*y;
| ^~~~
a.cc:14:37: error: 'x' was not declared in this scope
14 | else if(sum>x+y+z)sum=x+y+z;
| ^
|
s810138991 | p01137 | C++ | #include<stdio.h>
using namespace std;
int main(){
long long E, sum=1000000;
int y,z;
long long x= E-z*z*z-y*y;
while(scanf("%ld",&E){
if(E==0)break;
for(z=0;z*z*z<=E;z++)
for(y=0;y*y<=E;y++){
if(z*z*z+y*y>E)break;
else if(sum>x+y+z)sum=x+y+z;
}
printf("%ld\n",sum);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:8:30: error: expected ')' before '{' token
8 | while(scanf("%ld",&E){
| ~ ^
| )
|
s381398102 | p01137 | C++ | #include<stdio.h>
using namespace std;
int main(){
long long E, sum=1000000;
int y,z;
long long x= E-z*z*z-y*y;
while(scanf("%lld",&E){
if(E==0)break;
for(z=0;z*z*z<=E;z++)
for(y=0;y*y<=E;y++){
if(z*z*z+y*y>E)break;
else if(sum>x+y+z)sum=x+y+z;
}
printf("%lld\n",sum);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:8:31: error: expected ')' before '{' token
8 | while(scanf("%lld",&E){
| ~ ^
| )
|
s682418154 | p01137 | C++ | #include<stdio.h>
using namespaze std;
int main(){
long long sum=1000000,E;
int y,z;
while(scanf("%lld",&E),E){
for(z=0;z*z*z<=E;z++)
for(y=0;y*y<=E;y++){
long long x = E-z*z*z-y*y;
if(x<0)break;
else if(sum>x+y+z)sum=x+y+z;
}
printf("%lld",sum);
}
return 0;
} | a.cc:2:7: error: expected nested-name-specifier before 'namespaze'
2 | using namespaze std;
| ^~~~~~~~~
|
s398413437 | p01137 | C++ | #include<stdio.h>
using namespace std;
int main(){
long long sum , E;
int y, z;
while (scanf_s("%lld", &E), E){
sum = 1000000;
for (z = 0; z*z*z <= E; z++)
for (y = 0; y*y <= E; y++){
long long x = E - z*z*z - y*y;
if (x<0){ break; }
else if (sum>(x + y + z))sum = x + y + z;
}
printf("%lld\n... | a.cc: In function 'int main()':
a.cc:7:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
7 | while (scanf_s("%lld", &E), E){
| ^~~~~~~
| scanf
|
s881616787 | p01137 | C++ | #include <iostream>
using namespace std;
bool check(int a, int b, int c, int n){
if (a + b*b + c*c*c == n)
{
return true
}
return false
}
int solve(int n){
int a, b, c;
a = 0;
b = 0;
c = 0;
if(a, b, c){
return a+b+c;
}
for (int i = 0; i < 1000000; ++i)
{
if(a, b, c+1){
retu... | a.cc: In function 'bool check(int, int, int, int)':
a.cc:9:16: error: expected ';' before '}' token
9 | return true
| ^
| ;
10 | }
| ~
a.cc:11:15: error: expected ';' before '}' token
11 | return false
| ^
| ... |
s022849242 | p01137 | C++ | #include <iostream>
using namespace std;
#define REP(i,n) for(int i=0;i<=(int)(n);i++)
int dou(int a){
return a*a;
}
int tri(int a){
return a*a*a;
}
int main(){
while(1){
double e;
cin >> e;
if(e==0) break;
int x,y,z;
int cb = cbrt(e);
int m = 1000000;
REP(i,cb){
z = cb - i;
int huga = sq... | a.cc: In function 'int main()':
a.cc:23:18: error: 'cbrt' was not declared in this scope; did you mean 'cb'?
23 | int cb = cbrt(e);
| ^~~~
| cb
a.cc:29:22: error: 'sqrt' was not declared in this scope
29 | int huga = sqrt(e - tri(z));
| ... |
s754510393 | p01137 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
int e,x,y,MIN,i,j;
int main(){
while(true){
MIN=1<<31;
cin>>e;if(!e){break;}
x=pow(e,0.5);
y=pow(e,0.334);
for(i=0;i<=y;i++){
for(j=0;j<=x;j++){
MIN=min(MIN,x+y+e-(i*i*i+j*j));
}
}
cout<<MIN<<endl;
}
} | a.cc: In function 'int main()':
a.cc:9:19: error: 'pow' was not declared in this scope
9 | x=pow(e,0.5);
| ^~~
|
s545672546 | p01137 | C++ | 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*z == e)
ans = min(ans,x+y+z);
cout << ans << endl;
}
} | a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope
5 | cin >> e;
| ^~~
a.cc:12:19: error: 'min' was not declared in this scope; did you mean 'main'?
12 | ans = min(ans,x+y+z);
| ^~~
| main
a.cc:13:5: erro... |
s993194703 | p01137 | C++ | #include <bits/stdc++.h>
#define REP(i, n) for(int i = 0; i < (int) (n); i++)
#define ALL(v) (v).begin(), (v).end()
#define INF 1e9
int main(){
int e;
while(cin >> e and e){
int res = INF;
REP(i, 105){
int ne = e;
if(pow(i, 3) > ne) break;
ne -= pow(i, 3);
REP(j, 1005){
int... | a.cc: In function 'int main()':
a.cc:9:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
9 | while(cin >> e and e){
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
from a.cc:1:
/usr/include/c++/14/io... |
s274988830 | p01137 | C++ | #include <iostream>
using namespace std;
int main(){
int e,x,y,z,small ;
x=0;
y=0;
z=0;
small=10000000;
while(cin >> e && e>0)
break(e == 0;)
while(z*z*z <= 1000000){
while(y*y <= 1000000){
x = e-y*y-z*z*z;
if (small > x+y+z){
small = x+y+z;
}
y = y+1;
}
z = z+1;
}
cout << smal... | a.cc: In function 'int main()':
a.cc:12:22: error: expected ';' before '(' token
12 | break(e == 0;)
| ^
| ;
a.cc:12:29: error: expected ')' before ';' token
12 | break(e == 0;)
| ~ ^
| ... |
s043560106 | p01137 | C++ | #include <iostream>
using namespace std;
int main(){
int e,x,y,z,small ;
x=0;
y=0;
z=0;
small=10000000;
while(cin >> e && e>0)
while(z*z*z <= 1000000){
while(y*y <= 1000000){
x = e-y*y-z*z*z;
if (small > x+y+z){
small = x+y+z;
}
y = y+1;
}
z = z+1;
}
cout << small << endl ;
}
} | a.cc:24:1: error: expected declaration before '}' token
24 | }
| ^
|
s377243292 | p01137 | C++ | #include <iostream>
using namespace std;
int main() {
int e,small ;
while(cin >> e && e>0){
small = e;
for(int z = 0; (z*z)*z <= e; z++){
for(int y = 0; y*y <= e; y++){
x = e-y*y-(z*z)*z;
small=min(small, x+y+z);
}
}
cout << small << endl ;
}
} | a.cc: In function 'int main()':
a.cc:11:33: error: 'x' was not declared in this scope
11 | x = e-y*y-(z*z)*z;
| ^
|
s434611906 | p01137 | C++ | #include<iostream>
using namespace std;
#define MAX 1000000
int min(int a, int b) {
if (a > b)
return b;
else
return a;
}
int main()
{
while (1)
{
int y, z, e, ans = MAX;
cin >> e;
if (!e)
break;
for (z=0; z*z*z <= e; z++) {
y = (i... | a.cc: In function 'int main()':
a.cc:20:22: error: 'sqrt' was not declared in this scope
20 | y = (int)sqrt((double)e - z*z*z);
| ^~~~
|
s741227207 | p01137 | C++ | #include<iostream>
using namespace std;
#define MAX 1000000
int min(int a, int b);
int min(int a, int b) {
if (a > b)
return b;
else
return a;
}
int main()
{
while (1)
{
int y, z, e, ans = MAX;
cin >> e;
if (!e)
break;
for (z=0; z*z*z <= e; z... | a.cc: In function 'int main()':
a.cc:22:22: error: 'sqrt' was not declared in this scope
22 | y = (int)sqrt((double)e - z*z*z);
| ^~~~
|
s397050368 | p01137 | C++ | #include<iostream>
using namespace std;
#define MAX 1000000
int min(int a, int b);
int min(int a, int b) {
if (a > b)
return b;
else
return a;
}
int main()
{
while (1)
{
int y, z, e, ans = MAX;
cin >> e;
if (!e)
break;
for (z=0; z*z*z <= e; z... | a.cc: In function 'int main()':
a.cc:22:22: error: 'sqrt' was not declared in this scope
22 | y = (int)sqrt((double)e - z*z*z);
| ^~~~
|
s832948132 | p01137 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <map>
using namespace std;
int main(){
int e;
int minimum = 0;
cin >> e;
while(e != 0){
for(int z = 0; z * z * z <= e; z++)){
for(int y = 0; y * y <= e; y++){
if(ceil(e - y * y - z * z * z) == floor(e - y * y - z * z * z)){
minim... | a.cc: In function 'int main()':
a.cc:14:52: error: expected primary-expression before ')' token
14 | for(int z = 0; z * z * z <= e; z++)){
| ^
|
s131507276 | p01137 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <map>
using namespace std;
int main(){
int e;
int minimum = 0;
cin >> e;
while(e != 0){
for(int z = 0; z * z * z <= e; z++){
for(int y = 0; y * y <= e; y++){
if(ceil(e - y * y - z * z * z) == floor(e - y * y - z * z * z)){
minimu... | a.cc: In function 'int main()':
a.cc:16:36: error: 'ceil' was not declared in this scope
16 | if(ceil(e - y * y - z * z * z) == floor(e - y * y - z * z * z)){
| ^~~~
a.cc:16:67: error: 'floor' was not declared in this scope
16 | ... |
s670897824 | p01137 | C++ |
#include <iostream>
int main(int argc, char const *argv[]) {
int count = 10^6;
for (int i = 0; i < count; i++) {
int e= 0;
cin >> e ;
if (e==0){
return 0;
}
int min = e;
for (int z = 0; z*z*z <= e; z++) {
for (int y = 0; y*y <= e- z*z*z; y++) {
int x = e-y*y-z*z*z;
... | a.cc: In function 'int main(int, const char**)':
a.cc:5:17: warning: result of '10^6' is 12; did you mean '1e6'? [-Wxor-used-as-pow]
5 | int count = 10^6;
| ^
| ---
| 1e
a.cc:5:15: note: you can silence this warning by using a hexadecimal constant (0xa... |
s150674627 | p01137 | C++ |
#include <iostream>
using namespace std;
int main(int argc, char const *argv[]) {
int count = pow(10,6);
for (int i = 0; i < count; i++) {
int e = 0;
cin >> e;
if (e == 0){
return 0;
}
int min = e;
for (int z = 0; z*z*z <= e; z++) {
for (int y = 0; y*y <= e - z*z*z; y++) {
int x = e - y*y - z*... | a.cc: In function 'int main(int, const char**)':
a.cc:6:21: error: 'pow' was not declared in this scope
6 | int count = pow(10,6);
| ^~~
|
s870075037 | p01137 | C++ | #include<iostream>
#include<cmath>
using namespace std;
int main(){
int e,x,y,z,min=INF;
while(1){
cin >> e;
if(e == 0)break;
for(z=0;z*z*z<=e;z++){
y=(int)sqrt((double)(e-z*z*z));
x = e-z*z*z-y*y;
min = (min > x+y+z)?x+y+z:min;
}
cout << min;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:6:17: error: 'INF' was not declared in this scope
6 | int e,x,y,z,min=INF;
| ^~~
|
s523946063 | p01137 | C++ | #include <cstdio>
const int inf = 1e9;
int main()
{
int e;
while (scanf("%d", &e), e) {
int mi = inf;
for (int z = 0; z * z * z <= e; ++z) {
for (int y = 0; y * y <= e - z * z * z; ++y) {
chmin(mi, e - z * z * z - y * y + y + z);
}
}
... | a.cc: In function 'int main()':
a.cc:13:17: error: 'chmin' was not declared in this scope
13 | chmin(mi, e - z * z * z - y * y + y + z);
| ^~~~~
|
s497308170 | p01137 | C++ | #include <cstdio>
const int inf = 1e9;
int main()
{
int e;
while (scanf("%d", &e), e) {
int mi = inf;
for (int z = 0; z * z * z <= e; ++z) {
for (int y = 0; y * y <= e - z * z * z; ++y) {
mi = min(mi, e - z * z * z - y * y + y + z);
}
}
... | a.cc: In function 'int main()':
a.cc:13:22: error: 'min' was not declared in this scope; did you mean 'mi'?
13 | mi = min(mi, e - z * z * z - y * y + y + z);
| ^~~
| mi
|
s882813400 | p01137 | C++ | #include "bits/stdc++.h"
#define ALL(a) (a).begin(),(a).end()
#define debug(x) cout << #x << " : " << (x) << " --------------" << endl;
using namespace std;
int main(void){
int e;
while (cin >> e, e) {
for (int z = 100; z >= 0; --z) {
int val = z * z * z;
if (val > e) continue;
... | a.cc: In function 'int main()':
a.cc:15:17: error: 'm' was not declared in this scope
15 | m = min(m, (e - val2) + y + z);
| ^
a.cc:18:17: error: 'm' was not declared in this scope
18 | cout << m << endl;
| ^
|
s202875236 | p01137 | C++ | #include<iostream>
#include<math.h>
using namespace std;
int count = 0;
int solve(int E)
{
int ans =INT_MAX;
for (int x=0; x<=E; ++x)
for (int y=0; y*y<=E; ++y)
{
//cout<<"y="<<y<<endl;
int z=(int)round(pow(E-x-y*y,1.0/3));
//cout<<"z="<<z<<endl;
if (x+y*y+z*z*z == E)
{
if((x+y+z)<ans)
{
a... | a.cc: In function 'int solve(int)':
a.cc:7:12: error: 'INT_MAX' was not declared in this scope
7 | int ans =INT_MAX;
| ^~~~~~~
a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
2 | #include<math.h>
+++ |+#include <climits>
... |
s258582848 | p01137 | C++ | #include<iostream>
#include<math.h>
#include<stdint.h>
using namespace std;
int count = 0;
int solve(int E)
{
int ans =INT_MAX;
for (int z=0; z*z*z<=E; ++z)
for (int y=0; y*y<=E; ++y)
{
//cout<<"y="<<y<<endl;
int x=(int)round(E-z*z*z-y*y);
//cout<<"z="<<z<<endl;
if (x+y*y+z*z*z == E)
{
if((x+y+z)<... | a.cc: In function 'int solve(int)':
a.cc:8:12: error: 'INT_MAX' was not declared in this scope
8 | int ans =INT_MAX;
| ^~~~~~~
a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
3 | #include<stdint.h>
+++ |+#include <climits>
... |
s705669306 | p01137 | C++ | #include<iostream>
#include<math.h>
//#include<limits.h>
using namespace std;
int solve(int E)
{
int ans =999999;
for (int z=0; z*z*z<=E; z++)
for (int y=0; y*y<=E; y++)
{
//cout<<"z="<<z<<" y="<<y<<endl;
int x=E-z*z*z-y*y;
//cout<<"x="<<x<<endl;
//cout<<"x+y*y+z*z*z="<<x+y*y+z*z*z<<endl;
if (((x+y*y... | a.cc: In function 'int solve(int)':
a.cc:15:41: error: expected ')' before '{' token
15 | if (((x+y*y+z*z*z == E)&&(x>=0))
| ~ ^
| )
16 | {
| ~
a.cc:24:7: error: ... |
s828774947 | p01137 | C++ | include <iostream>
using namespace std;
int count = 0; // ?¨???¬??¨ global ?????°
int solve(int E) {
// ?????´????±???????
int ans = 1000000 // ?????§???
for (int x=0; x<=E; ++x)
for (int y=0; y*y<=E; ++y)
for (int z=0; z*z*z<=E; ++z) {
++count;
if (x+y*y+z*z*z == E)
if (x+y+z<=ans)
ans = x+... | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
a.cc: In function 'int solve(int)':
a.cc:8:9: error: expected ',' or ';' before 'for'
8 | for (int x=0; x<=E; ++x)
| ^~~
a.cc:8:23: error: 'x' was not declared in this scope
8 | for (int x=0;... |
s674149887 | p01137 | C++ | #include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<cmath>
#include<cstring>
#include<queue>
#include<stack>
#include<cstdio>
#include<sstream>
#include<iomanip>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
#define pb... | a.cc:53:1: error: 'ZS' does not name a type
53 | ZS
| ^~
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.