submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s269384706 | 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);
}
} | a.cc:2:1: error: 'n' does not name a type
2 | n;
| ^
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
3 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:4:27: error: 'n' was not declared in this scope
4 | while(scanf("%d",&n),n){
| ... |
s072818547 | 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);
}
} | a.cc:1:1: error: 'n' does not name a type
1 | n,i;
| ^
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
3 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:4:27: error: 'n' was not declared in this scope
4 | while(scanf("%d",&n),n){
| ... |
s861896326 | p01137 | C++ | n,i,j;
#define rep(i,a) for(i=0;i<a;i++)
main(){
while(scanf("%d",&n),i=0,n){
int mi=999;
rep(i,110)rep(j,1010)mi=fmin(mi,(n<i*i*i+j*j?999:i+j+n-i*i*i-j*j));
printf("%d\n",mi);
}
} | a.cc:1:1: error: 'n' does not name a type
1 | n,i,j;
| ^
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
3 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:4:27: error: 'n' was not declared in this scope
4 | while(scanf("%d",&n),i=0,n){
| ... |
s766059494 | 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=fmin(mi,(n<i*i*i+j*j?999:i+j+n-i*i*i-j*j));
printf("%d\n",mi);
}
0;
} | a.cc:1:1: error: 'n' does not name a type
1 | n,i,j;
| ^
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
3 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:4:27: error: 'n' was not declared in this scope
4 | while(scanf("%d",&n),n){
| ... |
s856432399 | 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;} | a.cc:1:1: error: 'n' does not name a type
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;}
| ^
a.cc:1:11: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
1 | n,i=... |
s318485669 | p01137 | C++ | /* ?????????????????? */
#include <bits/stdc++.h>
using namespace std;
int e;
int main() {
while (1) {
scanf("%d", &e);
if (e == 0) return 0;
int ans = e;
for (int z=zmax; z*z*z<=e; z++) {
int z3 = z*z*z;
for (int y=0; y*y+z3<=e; y++) {
int y2 = y*y;
ans = min(ans, y+z+e... | a.cc: In function 'int main()':
a.cc:13:16: error: 'zmax' was not declared in this scope; did you mean 'fmax'?
13 | for (int z=zmax; z*z*z<=e; z++) {
| ^~~~
| fmax
|
s681298777 | p01137 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int e;
while(1) {
cin >> e;
if(e == 0) {
break;
}
int tmpx, tmpy, tmpz, tmpe;
tmpe = e;
tmpz = pow(e, 1.0 / 3.0);
tmpe = tmpe - pow(tmpz, 3);
if(tmpe == 0){
tmpy = 0; tmpx = 0;
}else{
tmpy = pow(tmpe, 1.0 / 2.0);
tmpe = ... | a.cc: In function 'int main()':
a.cc:32:74: error: expected ';' before ')' token
32 | for(int y = 0; y <= pow(e - pow(z, 3), 1.0 / 2.0)); y++) {
| ^
| ... |
s531365980 | p01137 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int e;
while(1) {
cin >> e;
if(e == 0) {
break;
}
int tmpx, tmpy, tmpz, tmpe;
tmpe = e;
tmpz = pow(e, 1.0 / 3.0);
tmpe = tmpe - pow(tmpz, 3);
if(tmpe == 0){
tmpy = 0; tmpx = 0;
}else{
tmpy = pow(tmpe, 1.0 / 2.0);
tmpe = ... | a.cc: In function 'int main()':
a.cc:32:74: error: expected ';' before ')' token
32 | for(int y = 0; y <= pow(e - pow(z, 3), 1.0 / 2.0)); y++) {
| ^
| ... |
s921751240 | p01137 | C++ | #include<iostream>
#include<cmath>
#include<algorithm>
using namespace std;
int main(){
int e;
int x,y,z;
while(cin >> e){
if(e==0){
return 0;
}
int m;
for(int i=0;i*i<e;i++){
for(int j=0;j*j*j<e;j++){
if(e%j*j*j==0){
m=j;
}
elseif(e%j*j*j!=0&&e%i*i==0){
m=i;
}
elseif(e%j*j*j!=0&&e%i*i!=0){
m=e;
}
}
}
cout << m << ... | a.cc: In function 'int main()':
a.cc:22:1: error: 'elseif' was not declared in this scope
22 | elseif(e%j*j*j!=0&&e%i*i==0){
| ^~~~~~
|
s223860483 | p01137 | C++ | #include<iostream>
using namespace std;
int main(){
int E;
cin >> E;
int min=E;
for(int z=0;z<=100;z++){
for(int y=0:y*y<E-z*z*z;y++){
sum=(E-y*y-z*z*z)+y+z;
if(min>sum) min=sum;
}
}
cout << min <<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:14: error: initializer in range-based 'for' loop
9 | for(int y=0:y*y<E-z*z*z;y++){
| ^
a.cc:9:28: error: expected ')' before ';' token
9 | for(int y=0:y*y<E-z*z*z;y++){
| ~ ^
| )
a.c... |
s209688658 | p01137 | C++ | #include<iostream>
using namespace std;
int main(){
int E;
cin >> E;
int min=E;
int sum;
for(int z=0;z<=100;z++){
for(int y=0:y*y<E-z*z*z;y++){
sum=(E-y*y-z*z*z)+y+z;
if(min>sum) min=sum;
}
}
return min;
} | a.cc: In function 'int main()':
a.cc:10:14: error: initializer in range-based 'for' loop
10 | for(int y=0:y*y<E-z*z*z;y++){
| ^
a.cc:10:28: error: expected ')' before ';' token
10 | for(int y=0:y*y<E-z*z*z;y++){
| ~ ^
| )
a... |
s870040587 | p01137 | C++ | using namespace std;
vector<int> ans;
int main(){
while(1){
int e;
cin >> e;
if(e == 0) break;
int m = 1e9;
for(int i = 0;i < e;i++){
if(i*i*i > e) break;
int iii = i*i*i;
for(int j = 0;j < e - iii;j++){
if(j*j > e - iii) break;
int jj = j*j;
int k = e - jj - iii;
m = min(m,i+j+k);... | a.cc:3:1: error: 'vector' does not name a type
3 | vector<int> ans;
| ^~~~~~
a.cc: In function 'int main()':
a.cc:8:17: error: 'cin' was not declared in this scope
8 | cin >> e;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixab... |
s060946408 | p01137 | C++ |
int main(){
while(true){
int min;
cin >> e;
min = e;
if(e == 0)break;
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){
if((x + y + z) <= min)min = x + y + z;
//cout << "xyz = " << x << ... | a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope; did you mean 'min'?
8 | cin >> e;
| ^~~
| min
a.cc:8:12: error: 'e' was not declared in this scope
8 | cin >> e;
| ^
a.cc:22:5: error: 'cout' was not declared in this scope
22 |... |
s568666538 | p01137 | C++ |
int main(){
while(true){
int min;
cin >> e;
min = e;
if(e == 0)break;
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){
if((x + y + z) <= min)min = x + y + z;
//cout << "xyz = " << x << ... | a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope; did you mean 'min'?
8 | cin >> e;
| ^~~
| min
a.cc:8:12: error: 'e' was not declared in this scope
8 | cin >> e;
| ^
a.cc:22:5: error: 'cout' was not declared in this scope
22 |... |
s084195578 | p01137 | C++ | #include "stdafx.h"
#include <iostream>
#include <cmath>
using namespace std;
#define E 1000000
int main()
{
int e;
while (cin >> e && e > 0) {
int min = E + 1;
int e_i, e_j;
e_i = 1000;
e_j = 100;
for (int i = 0; i < e_i; i++) {
for (int j = 0; j < e_j; j++) {
if (i*i + j*j*j > e)
break;
... | a.cc:1:10: fatal error: stdafx.h: No such file or directory
1 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s156328199 | p01137 | C++ | #include "stdafx.h"
#include <iostream>
#include <cmath>
using namespace std;
#define E 1000000
int main()
{
int e;
int r[10000];
int num = 0;
while (cin >> e && e > 0) {
int min = E + 1;
int e_i, e_j;
e_i = 1000;
e_j = 100;
for (int i = 0; i < e_i; i++) {
for (int j = 0; j < e_j; j++) {
if (i*... | a.cc:1:10: fatal error: stdafx.h: No such file or directory
1 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s999056131 | p01137 | C++ | #include<iostream>
using namespace std;
int x,y,z;
int e;
int solve(){
int minnum = 1000000;
for(int z = 0; z*z*z <= e; z++)
{
y = (int)sqrt(e - z*z*z);
minnum = min(minnum,(int)(e - z*z*z - y*y)+y + z);
}
return minnum;
};
int main(){
int A[100000];
int k = 0;
while( cin>>e && e>0 )
{
A[k]=solve();
... | a.cc: In function 'int solve()':
a.cc:9:26: error: 'sqrt' was not declared in this scope
9 | y = (int)sqrt(e - z*z*z);
| ^~~~
|
s385856494 | p01137 | C++ | #include<iostream>
#include<cmath>
using namespace std;
int x,y,z;
int e;
int solve(){
int minnum = 1000000;
z=pow (e,1/3)
y = (int)sqrt(e - pow(z, 3));
x = (int)(e - pow(z, 3)-pow(y, 2));
return x+y+z;
};
int main(){
int A[100000];
int k = 0;
while( cin>>e && e>0 )
{
A[k]=solve();
k++;
}
for(i... | a.cc: In function 'int solve()':
a.cc:8:22: error: expected ';' before 'y'
8 | z=pow (e,1/3)
| ^
| ;
9 | y = (int)sqrt(e - pow(z, 3));
| ~
|
s763635602 | p01137 | C++ | #include<iostream>
#include<cmath>
using namespace std;
int x,y,z;
int e;
int solve(){
z= (int)(pow (e,1/3));
y = (int)(sqrt(e - pow(z, 3)));
x = (int)(e - pow(z, 3)-pow(y, 2));
int minnum = x+y+z;
return mininum;
};
int main(){
int A[100000];
int k = 0;
while( cin>>e && e>0 )
{
A[k]=solve();
k+... | a.cc: In function 'int solve()':
a.cc:11:16: error: 'mininum' was not declared in this scope; did you mean 'minnum'?
11 | return mininum;
| ^~~~~~~
| minnum
|
s160547698 | p01137 | C++ | #include<iostream>
#include<cmath>
using namespace std;
int x,y,z;
int e;
int solve(){
int minnum;
z= (int)(pow (e,1/3));
y = (int)(sqrt(e - pow(z, 3)));
x = (int)(e - pow(z, 3)-pow(y, 2));
mininum = x+y+z;
return mininum;
};
int main(){
int A[100000];
int k = 0;
while( cin>>e && e>0 )
{
A[k]=solve();
... | a.cc: In function 'int solve()':
a.cc:11:9: error: 'mininum' was not declared in this scope; did you mean 'minnum'?
11 | mininum = x+y+z;
| ^~~~~~~
| minnum
|
s683880890 | p01137 | C++ | #include<iostream>
#include<cmath>
using namespace std;
int x,y,z;
int e;
int minnum;
int solve(){
z= (int)(pow (e,1/3));
y = (int)(sqrt(e - pow(z, 3)));
x = (int)(e - pow(z, 3)-pow(y, 2));
mininum = x+y+z;
return mininum;
};
int main(){
int A[100000];
int k = 0;
while( cin>>e && e>0 )
{
A[k]=solve();
... | a.cc: In function 'int solve()':
a.cc:11:9: error: 'mininum' was not declared in this scope; did you mean 'minnum'?
11 | mininum = x+y+z;
| ^~~~~~~
| minnum
|
s339476898 | p01137 | C++ | #include<iostream>
#include<cmath>
using namespace std;
int x,y,z;
int e;
int main(){
int A[100000];
int k = 0;
while( cin>>e && e>0 )
{
A[k]=solve();
k++;
}
for(int l = 0;l < k; l++)
{
cout<<A[l]<<endl;
}
return 0;
}
int solve(){
int minnum = 1000000;
for(int z = 0; pow(z, 3) <=... | a.cc: In function 'int main()':
a.cc:12:22: error: 'solve' was not declared in this scope
12 | A[k]=solve();
| ^~~~~
|
s039200755 | p01137 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int e;
while(true){
cin>>e;
if(e==0) break;
int x,y,z;
int xm,ym,zm;
int csum,msum=1000000;
zm=(int) pow(e,1.0/3);
//cout<<"zm"<<zm<<endl;
for (int i = zm; i >=0; --i)
{
z=i;
ym=(int)sqrt(e-pow(z,3));
for (int j = ym; j >= 0; -... | a.cc: In function 'int main()':
a.cc:34:15: error: 'msum' was not declared in this scope
34 | cout<<msum<<endl;
| ^~~~
|
s573851662 | p01137 | C++ | #include<iostream>
using namespace std;
int main() {
int e;
while (cin >> e; e>0) {
int y=0;
int z=0;
int sum=0,summin=e; // min: NOTICE how we initialize it
while (y**3+z**3<e) {
while (y**3+z**3<e) {
x= e-y**3+z**3;
sum = x+y+z;
if (sum < summin) summin = sum;
++z;
}
++y;
}
... | a.cc: In function 'int main()':
a.cc:7:24: error: expected ')' before ';' token
7 | while (cin >> e; e>0) {
| ~ ^
| )
a.cc:7:29: error: expected ';' before ')' token
7 | while (cin >> e; e>0) {
| ^
| ... |
s584793414 | p01137 | C++ | #include<iostream>
using namespace std;
int main() {
int e;
while (cin >> e && e>0) {
int y=0;
int z=0;
int sum=0,summin=e; // min: NOTICE how we initialize it
while (y**3+z**3<e) {
while (y**3+z**3<e) {
x= e-y**3+z**3;
sum = x+y+z;
if (sum < summin) summin = sum;
++z;
}
++y;
}
... | a.cc: In function 'int main()':
a.cc:12:26: error: invalid type argument of unary '*' (have 'int')
12 | while (y**3+z**3<e) {
| ^~
a.cc:12:31: error: invalid type argument of unary '*' (have 'int')
12 | while (y**3+z**3<e) {
| ... |
s343041916 | p01137 | C++ | #include<iostream>
using namespace std;
int main() {
int e;
while (cin >> e && e>0) {
int y=0;
int z=0;
int sum=0,summin=e; // min: NOTICE how we initialize it
while (y*y*y+z*z*z<e) {
while (y*y*y+z*z*z<e) {
x= e-y**3+z**3;
sum = x+y+z;
if (sum < summin) summin = sum;
++z;
}
++y;
... | a.cc: In function 'int main()':
a.cc:14:33: error: 'x' was not declared in this scope
14 | x= e-y**3+z**3;
| ^
a.cc:14:40: error: invalid type argument of unary '*' (have 'int')
14 | x= e-y**3+z**3;
| ... |
s569885448 | p01137 | C++ | #include<iostream>
using namespace std;
int main() {
int e;
while (cin >> e && e>0) {
int y=0;
int z=0;
int sum=0,summin=e; // min: NOTICE how we initialize it
while (y*y*y+z*z*z<e) { // third power of something
while (y*y*y+z*z*z<e) {
x= e-y*y*y+z*z*z;
sum = x+y+z;
if (sum < summin) summin... | a.cc: In function 'int main()':
a.cc:14:33: error: 'x' was not declared in this scope
14 | x= e-y*y*y+z*z*z;
| ^
|
s648497777 | p01137 | C++ | #include<iostream>
using namespace std;
int main() {
int e;
while (cin >> e && e>0) {
int y=0;
int z=0;
int sum=0,summin=e; // min: NOTICE how we initialize it
while (y*y*y+z*z*z<e) { // third power of something
while (y*y*y+z*z*z<e) {
x= e-y*y*y-z*z*z;
sum = x+y+z;
if (sum < summin) summin... | a.cc: In function 'int main()':
a.cc:14:33: error: 'x' was not declared in this scope
14 | x= e-y*y*y-z*z*z;
| ^
|
s664654364 | p01137 | C++ | #include <bits/stdc++.h>
#define rep(i,j,k) for(int i=(int)j;i<(int)k;i++)
#define itrep(x) for(auto it=(x).begin();it!=(x).end();it++)
#define Sort(x) sort((x).begin(),(x).end())
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define vi vector<int>
#define INF (int)1e9
#define INFL 1e18
#defi... | a.cc: In function 'int main()':
a.cc:32:29: error: 'x' was not declared in this scope
32 | ans=min(ans,x+y+z);
| ^
|
s865985583 | p01137 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
while(1){
int x,y,z,e;
cin>>e;
if(e==0){break;}
for(int i=1;;i++){
if(e<i*i*i){z=i-1; break;}
}
int Z=z*z*z;
for(int q=1;;q++){
if(e-Z<q*q){y=q-1; break;}
}
int Y=y*y;
for(int p=1;;p++){
if(e... | a.cc: In function 'int main()':
a.cc:26:12: error: expected '}' at end of input
26 | return 0;
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s892764470 | p01137 | C++ | #include <iostream>
#define FOR(i,l,n) for(int (i)=(l);(i)<(n);(i)++)
#define REP(i,n) FOR(i,0,n)
#define MAX_Y 1000
#define MAX_Z 100
using namespace std;
int main(){
long int x,y,z,e,m=1000000;
while(cin>>e,e){
FOR(y,1,MAX_Y+1){
FOR(z,1,MAX_Z+1){
x = e-pow(z,3)-pow(y,2);... | a.cc: In function 'int main()':
a.cc:15:23: error: 'pow' was not declared in this scope
15 | x = e-pow(z,3)-pow(y,2);
| ^~~
|
s247894770 | p01137 | C++ | #include <iostream>
using namespace std;
int main(){
int e,x,y,z;
while (true){
cin >> e;
if (!e)
break;
x = 0;
y = 0;
z = 0;
m = e;
while(e>=z*z*z){
e -= z*z*z;
while(e>=y*y)
y++;
y--;
e -= y*y;
x = e;
if (m>x+y+z)
m = x+y+z;
z++;
... | a.cc: In function 'int main()':
a.cc:14:5: error: 'm' was not declared in this scope
14 | m = e;
| ^
|
s448030144 | p01137 | C++ | #include<iostream>
#include<climits>
using namespace std;
int main(){
int e,m,p,q,r,min;
while(cin>>e,e){
min=INT_MAX;
for(int z=0;z*z*z<=e;z++)
for(int y=0;y*y<=e;y++){
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:10:33: error: 'x' was not declared in this scope
10 | x=e-z*z*z-y*y;
| ^
|
s261388412 | p01137 | C++ | #include <iostream>
using namespace std;
int main()
{
int e;
while (cin >> e,e)
{
int z=0;
while ((z+1)*(z+1)*(z+1) < e) z++;
e -= z*z*z;
int y=0;
while ((y+1)*(y+1) < e) y++;
e -= y*y;
while (x+1 < e) x++;
cout << x+y+z << endl;
}
} | a.cc: In function 'int main()':
a.cc:15:24: error: 'x' was not declared in this scope
15 | while (x+1 < e) x++;
| ^
a.cc:17:25: error: 'x' was not declared in this scope
17 | cout << x+y+z << endl;
| ^
|
s555711695 | p01137 | C++ | #include<iostream>using namespace std;int x,y,z,e,b;main(){while(true){cin>>e;if(!e)break;int ans=e;for(z=0;z*z*z<=e;z++){for(y=0;y*y+z*z*z<=e;y++){b=e-(y*y+z*z*z);ans=min(ans,b+y+z);}}cout<<ans<<endl;}} | a.cc:1:25: warning: extra tokens at end of #include directive
1 | #include<iostream>using namespace std;int x,y,z,e,b;main(){while(true){cin>>e;if(!e)break;int ans=e;for(z=0;z*z*z<=e;z++){for(y=0;y*y+z*z*z<=e;y++){b=e-(y*y+z*z*z);ans=min(ans,b+y+z);}}cout<<ans<<endl;}}
| ^~~~~~~~~
a.cc... |
s097288254 | p01137 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
int main(){
int e;
while(cin >> e){
int ans = 1000000000;
for(int z=1;z*z*z<e;z++)
for(int y=1;y*y+z*z*z<e;y++)
ans = min(ans,(e-y*y*-z*z*z) + y + z);
cout << ans << endl;
} | a.cc: In function 'int main()':
a.cc:13:2: error: expected '}' at end of input
13 | }
| ^
a.cc:5:11: note: to match this '{'
5 | int main(){
| ^
|
s066879802 | p01137 | C++ | #include <cmath>
using namespace std;
int pw (int n, int p) {
if (n == 0) return 0;
if (p == 0) return 1;
if (p == 1) return n;
return n * pw(n, p-1);
}
int computeM (int e) {
int ret = e;
// zが最も自由度の小さい数なので、zから決定していく。
for(int y = 0; y <= sqrt(e); y++) {
for(int z = 0; z <= sqrt(e); z++) {
... | a.cc: In function 'int main()':
a.cc:35:5: error: 'cin' was not declared in this scope
35 | cin >> e; if (e == 0) break;
| ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
1 | #include <cmath>
+++ |+#include <iostream>
... |
s946729662 | p01137 | C++ | #include <cstdio>
#include <cmath>
#define MAX 1000000
int main(void) {
while(1) {
int e, y, z, ans = MAX;
scanf("%d", &e);
if(!e) break;
for(z = 0; z*z*z <= e; z++) {
y = (int)sqrt((double)e - z*z*z);
ans = min(ans, e - y*y - z*z*z + y + z);
}
printf("%d\n", ans);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:14:31: error: 'min' was not declared in this scope; did you mean 'std::min'?
14 | ans = min(ans, e - y*y - z*z*z + y + z);
| ^~~
| std::min
In file included from /usr/include/c++/14/bi... |
s914573309 | p01137 | C++ | #include <cstdio>
#include <cmath>
#include <algorithm>
#define MAX 1000000
int main(void) {
while(1) {
int e, y, z, ans = MAX;
scanf("%d", &e);
if(!e) break;
for(z = 0; z*z*z <= e; z++) {
y = (int)sqrt((double)e - z*z*z);
ans = min(ans, e - y*y - z*z*z + y + z);
}
printf("%d\n", ans);
}
return ... | a.cc: In function 'int main()':
a.cc:15:31: error: 'min' was not declared in this scope; did you mean 'std::min'?
15 | ans = min(ans, e - y*y - z*z*z + y + z);
| ^~~
| std::min
In file included from /usr/include/c++/14/al... |
s006421937 | p01137 | C++ |
import java.util.*;
import java.io.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
import static java.lang.Math.*;
public class Main {
int INF = 1 << 28;
//long INF = 1L << 62;
double EPS = 1e-10;
void run() {
Scanner sc = new Scanner(System.in);
for (;;) {
int e = sc.nextInt(... | a.cc:2:1: error: 'import' does not name a type
2 | import java.util.*;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
3 | import java.io.*;
| ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: ... |
s563124786 | p01138 | Java | import java.io.*;
import java.math.*;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.lang.ArrayIndexOutOfBoundsException;
import topcoder.SRM645.*;
/**
* @author yoshikyoto
*/
class Main extends MyUtil{
// public static ArrayList<ArrayList<Integer>> g;
// public st... | Main.java:8: error: package topcoder.SRM645 does not exist
import topcoder.SRM645.*;
^
1 error
|
s898431170 | p01138 | 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:20: error: constructor AL in class AL cannot be applied to given types;
AL table=new AL(n);
^
required: no arguments
found: int
reason: actual and formal argument lists differ in length
Main.java:25: error: array required, but AL found
table[i].add(new int[]{l,r});
^
2 errors
|
s479992810 | p01138 | 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:28: error: incompatible types: AL cannot be converted to boolean
for(ans=1;UniteSegments(table,ans);ans++);
^
Main.java:62: error: incompatible types: boolean cannot be converted to AL
if(l!=ps[i].pos) return true;
^
Main.java:65: error: incompatible ty... |
s156265794 | p01138 | Java | public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();//nでデータの入力個数を決める
int count = 0;
for(int i=0;i<n;i++) {
//発車時刻
int h = sc.nextInt();
int m = sc.nextInt();
int s = sc.nextInt();
//到着時刻
int H = sc.nextInt();
int M = sc... | Main.java:3: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:3: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s318982257 | p01138 | Java |
import javax.tools.JavaCompiler.CompilationTask;
public class Main {
class C implements Comparable<C> {
int startH;
int startM;
int startS;
int endH;
int endM;
int endS;
public C(String start , String end){
String [] input = start.split(":");
startH = Integer.parseInt(input[0]);
startM = I... | Main.java:89: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:89: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:99: error: cannot find symbol... |
s010432581 | p01138 | C | a | main.c:1:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input
1 | a
| ^
|
s630531003 | p01138 | C | #include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
using namespace std;
typedef pair<int, int> P;
int main() {
int n;
char d;
while(cin>>n) {
if(n == 0){
break;
}
vector<P> t(n);
int h[2],m[2],s[2];
for(int i= 0;i < n;i++){
cin >> h[0]>> d >> m[0] >> d >> s[0] >> h[1] >> d... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s147769732 | p01138 | C++ | #include <vector>
using namespace std;
int main(){
vector< vector<int> > trains;
int n,i,j,k,f,t,h,m,s,flg;
while(1){
scanf("%d",&n);
if(!n){break;}
for(i=0;i<n;i++){
scanf("%d:%d:%d",&h,&m,&s);
f=h*3600+m*60+s;
scanf("%d:%d:%d",&h,&m,&s);
... | a.cc: In function 'int main()':
a.cc:8:9: error: 'scanf' was not declared in this scope
8 | scanf("%d",&n);
| ^~~~~
a.cc:36:9: error: 'printf' was not declared in this scope
36 | printf("%lu\n",trains.size());
| ^~~~~~
a.cc:2:1: note: 'printf' is defined in header '<cs... |
s696892606 | p01138 | C++ | #include <vector>
#include <cstdio>
using namespace std;
int main(){
vector< vector<int> > trains;
vector<int> buf(86401,0);
int n,h,m,s,bf,bt,i,j,add_f;
while(1){
scanf("%d",&n);
if(!n){break;}
for(i=0;i<n;i++){
scanf("%d:%d:%d",&h,&m,&s);
bf=h*3600+m*60... | a.cc: In function 'int main()':
a.cc:27:28: error: 'count' was not declared in this scope
27 | int fn=count(p+bf,p+bt,1);
| ^~~~~
|
s474622834 | p01138 | C++ | #[allow(unused_imports)]
use std::cmp::*;
#[allow(unused_imports)]
use std::collections::*;
use std::io::Read;
#[allow(dead_code)]
fn getline() -> String {
let mut ret = String::new();
std::io::stdin().read_line(&mut ret).ok().unwrap();
ret
}
fn get_word() -> String {
let mut stdin = std::io::stdin();
... | a.cc:1:2: error: invalid preprocessing directive #[
1 | #[allow(unused_imports)]
| ^
a.cc:3:2: error: invalid preprocessing directive #[
3 | #[allow(unused_imports)]
| ^
a.cc:6:2: error: invalid preprocessing directive #[
6 | #[allow(dead_code)]
| ^
a.cc:32:2: error: invalid preprocessi... |
s497490420 | p01138 | 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
| |
s845278971 | p01138 | C++ | #include<cstdio>
#include<cstring>
#include<algorithm>
#include<iostrean>
using namespace std;
int main(void){
int n;
int sum[3000];
while(1){
scanf("%d",&n);
if(n==0)break;
memset(sum,0,sizeof(sum));
for(int i=0;i<n;i++){
int h,m,s;
scanf("%2d:%2d:%2d"... | a.cc:4:9: fatal error: iostrean: No such file or directory
4 | #include<iostrean>
| ^~~~~~~~~~
compilation terminated.
|
s691469352 | p01138 | C++ | #include "bits/stdc++.h"
using namespace std;
#define rep(i,a,n) for(ll i=a;i<n;i++)
#define ALL(s) s.begin(),s.end()
#define P pair<ll,ll>
#define vl vector<ll>
#define vl vector<ll>
#define vvl vector<vector<ll>>
#define vvl vector<vector<ll>>
#define print(n) cout<<n<<endl
const int M=100010;
const int MOD=100000000... | a.cc: In function 'int main()':
a.cc:36:34: error: 'a' was not declared in this scope
36 | rep(i,0,90000)if(a[i]!=0)cnt+=a[i],ans=max(ans,cnt);
| ^
|
s753739378 | p01138 | C++ | #include <iostream>
#include <cstdio>
#include <string>
#include <queue>
#include <functional>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);++i)
#define rep1(i,n) for(int i=1;i<=(n);++i)
#define all(c) (c).begin(),(c).end()
int stoi(string a){
return (a[0]-'0')*10+a[1]-'0';
}
typedef pair<int,int> P;
priori... | a.cc: In function 'int main()':
a.cc:23:35: error: call of overloaded 'stoi(std::__cxx11::basic_string<char>)' is ambiguous
23 | int a=stoi(x.substr(0,2))*3600+stoi(x.substr(3,2))*60+stoi(x.substr(6,2));
| ~~~~^~~~~~~~~~~~~~~
a.cc:10:5: note: candidate: 'in... |
s712369496 | p01138 | C++ | #include<iostream>
#include<vector>
#include<cstring>
#include<map>
using namespace std;
const int VMAX = 5e4;
const int INF = 1e8;
struct edge { int to, cap, rev; };
vector<edge> G[VMAX];
bool used[VMAX];
void add_edge(int from, int to, int cap) {
G[from].push_back((edge){to, cap, G[to].size()});
G[to].push_ba... | a.cc: In function 'void add_edge(int, int, int)':
a.cc:16:47: warning: narrowing conversion of 'G[to].std::vector<edge>::size()' from 'std::vector<edge>::size_type' {aka 'long unsigned int'} to 'int' [-Wnarrowing]
16 | G[from].push_back((edge){to, cap, G[to].size()});
| ~~... |
s827321101 | p01138 | C++ | #include<iostream>
#include<vector>
#include<cstring>
using namespace std;
typedef pair<int,int> pii;
vector<pii>train;
const int H=60*60;
const int M=60;
const int S=1;
int unit[3]={H,M,S};
int getTime(string s){
string tmp;
int res=0;
for(int i=0;i<3;i++){
tmp=s.substr(3*i,2);
int val=unit[i]*atoi(tm... | a.cc: In function 'int main()':
a.cc:41:5: error: 'sort' was not declared in this scope; did you mean 'short'?
41 | sort(train.begin(), train.end());
| ^~~~
| short
|
s780874798 | p01138 | C++ | #! /usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import itertools
import math
from collections import Counter, defaultdict
class Main(object):
def __init__(self):
pass
def solve(self):
'''
insert your code
'''
while True:
n = input()... | a.cc:1:2: error: invalid preprocessing directive #!
1 | #! /usr/bin/env python
| ^
a.cc:2:3: error: invalid preprocessing directive #-
2 | # -*- coding: utf-8 -*-
| ^
a.cc:16:9: error: empty character constant
16 | '''
| ^~
a.cc:16:11: warning: missing terminating ' chara... |
s722305336 | p01138 | C++ | #include<iostream>
#include<cstdio>
#include<string>
#include<vector>
#include<map>
#include<algorithm>
using namespace std;
#define P pair<int,int>//出発、到着
vector<P>ta;
bool used[11000];
init(string x,string y){
int s,e;
string a=x.substr(0,2),b=x.substr(3,2),c=x.substr(6,2);
int aa=(a[0]-'0')*10+(a[1]-'0');
int... | a.cc:12:1: error: ISO C++ forbids declaration of 'init' with no type [-fpermissive]
12 | init(string x,string y){
| ^~~~
a.cc: In function 'int init(std::string, std::string)':
a.cc:27:1: warning: no return statement in function returning non-void [-Wreturn-type]
27 | }
| ^
|
s494295891 | p01138 | C++ | //include
//------------------------------------------
#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 <... | a.cc: In function 'int main()':
a.cc:35:9: error: 'i' was not declared in this scope
35 | REP(i,N){
| ^
a.cc:35:5: error: 'REP' was not declared in this scope
35 | REP(i,N){
| ^~~
|
s694234475 | p01138 | C++ | #include <iostream>
#include <vector>
#include <algorith>
using namespace std;
int solve(n){
vector< pair<int,int> > tm;
char ch1,ch2;
int h,m,s;
for(int i=0;i<n;i++){
cin>>h>>ch1>>m>>ch2>>s;
tm.push_back(make_pair(h*3600+m*60+s,1));
cin>>h>>ch1>>m>>ch2>>s;
tm.push_back(make_pair(h*3600+m*60+s,... | a.cc:3:10: fatal error: algorith: No such file or directory
3 | #include <algorith>
| ^~~~~~~~~~
compilation terminated.
|
s132921942 | p01138 | C++ | #include <iostream>
#include <vector>
#include <algorith>
using namespace std;
int solve(int n){
vector< pair<int,int> > tm;
char ch1,ch2;
int h,m,s;
for(int i=0;i<n;i++){
cin>>h>>ch1>>m>>ch2>>s;
tm.push_back(make_pair(h*3600+m*60+s,1));
cin>>h>>ch1>>m>>ch2>>s;
tm.push_back(make_pair(h*3600+m*6... | a.cc:3:10: fatal error: algorith: No such file or directory
3 | #include <algorith>
| ^~~~~~~~~~
compilation terminated.
|
s760991601 | p01138 | C++ | #include <iostream>
#include <vector>
#include <algorith>
using namespace std;
int main (){
int n;
vector< pair<int,int> > tm;
while(cin>>n && n){
tm.clear();
char ch1,ch2;
int h,m,s;
for(int i=0;i<n;i++){
cin>>h>>ch1>>m>>ch2>>s;
tm.push_back(make_pair(h*3600+m*60+s,1));
cin>>h>... | a.cc:3:10: fatal error: algorith: No such file or directory
3 | #include <algorith>
| ^~~~~~~~~~
compilation terminated.
|
s443326880 | p01138 | C++ | #include <iostream>
#include <string>
#include <algorithm>
#include <vector>
using namespace std;
static const int N = 10000;
int Change(string);
struct data{
int sh,sm,ss,eh,em,es;
bool operator<(const data& right)const{
if(eh!=right.eh) return eh<right.eh;
if(em!=right.em) return em<right.em;
if(es!=r... | a.cc: In function 'int main()':
a.cc:25:16: error: template argument 1 is invalid
25 | vector<data> V(n);
| ^
a.cc:25:16: error: template argument 2 is invalid
a.cc:40:23: error: a function-definition is not allowed here before '{' token
40 | int Change(string sub){
| ... |
s170105693 | p01138 | C++ | #include <bits/stdc++.h>
#define PB push_back
#define MP make_pair
#define REP(i,n) for (int i=0;i<(n);i++)
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define ALL(a) (a).begin(),(a).end()
#define MOD 100000
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> P;
const int IN... | a.cc: In function 'int main()':
a.cc:30:26: error: no matching function for call to 'max(ll&, int&)'
30 | ans=max(cnt[i],ans);
| ~~~^~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++... |
s306987278 | p01138 | C++ | #include<iostream>
#include<cstdio>
#include<vector>
#include<algorithm>
using namespace std;
bool dabu(int a, int b,int a1,int b1){
if (a1>=b)return 0;
if (b1<=a)return 0;
return 1;
}
int main(){
int n;
vector<vector<int>>jikoku(10000,vector<int>(2));
while (cin >> n, n){
int ans=1;
int ans1 = 1;
for (i... | a.cc: In function 'int main()':
a.cc:23:25: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
23 | scanf_s("%d:%d:%d %d:%d:%d", &si1, &si2, &si3, &shu1, &shu2, &shu3);
| ^~~~~~~
| scanf
|
s704921285 | p01138 | C++ | #include<iostream>
#include<cstdio>
#include<vector>
#include<algorithm>
using namespace std;
bool dabu(int a, int b,int a1,int b1){
if (a1>=b)return 0;
if (b1<=a)return 0;
return 1;
}
int main(){
int n;
vector<vector<int>>jikoku(10000,vector<int>(2));
while (cin >> n, n){
int ans=1;
int ans1 = 1;
for (i... | a.cc: In function 'int main()':
a.cc:23:25: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
23 | scanf_s("%d:%d:%d %d:%d:%d", &si1, &si2, &si3, &shu1, &shu2, &shu3);
| ^~~~~~~
| scanf
|
s640413678 | p01138 | C++ | #include<iostream>
#include<cstdio>
#include<vector>
#include<algorithm>
using namespace std;
bool dabu(int a, int b,int a1,int b1){
if (a1>=b)return 0;
if (b1<=a)return 0;
return 1;
}
int main(){
int n;
vector<vector<int>>jikoku(10000,vector<int>(2));
while (cin > > n, n){
int ans=1;
int ans1 = 1;
for (... | a.cc: In function 'int main()':
a.cc:17:22: error: expected primary-expression before '>' token
17 | while (cin > > n, n){
| ^
|
s091475425 | p01138 | C++ | #include<iostream>
#include<iomanip>
#include<algorithm>
#include<bitset>
#include<cctype>
#include<cmath>
#include<cstdio>
#include<cstring>
#include<functional>
#include<limits>
#include<list>
#include<map>
#include<set>
#include<stack>
#include<string>
#include<sstream>
#include<queue>
#include<vector>
using namespa... | a.cc:30:2: error: 'typedef struct time time' redeclared as different kind of entity
30 | }time;
| ^~~~
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr.h:157,... |
s375621582 | p01138 | C++ | #include<iostream>
#include<iomanip>
#include<algorithm>
#include<bitset>
#include<cctype>
#include<cmath>
#include<cstdio>
#include<cstring>
#include<functional>
#include<limits>
#include<list>
#include<map>
#include<set>
#include<stack>
#include<string>
#include<sstream>
#include<queue>
#include<vector>
using namespa... | a.cc:29:2: error: 'typedef struct time time' redeclared as different kind of entity
29 | }time;
| ^~~~
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr.h:157,... |
s154382373 | p01138 | C++ | #include <iostream>
#include <string>
#include <cstdlib>
#include <vector>
using namespace std;
int main() {
int n;
while(cin >>n,n){
vector<int> vat;
vat.capacity(n);
for(int i=0;i<n;i++){
string lts,ats; //leave_time_string,arrive_time_string
cin >>lts>>ats;
lts.erase(lts.begin()+2);
lts.eras... | a.cc: In function 'int main()':
a.cc:11:29: error: no matching function for call to 'std::vector<int>::capacity(int&)'
11 | vat.capacity(n);
| ~~~~~~~~~~~~^~~
In file included from /usr/include/c++/14/vector:66,
from a.cc:4:
/usr/include/c++/14/bits/stl_vector.h... |
s955290746 | p01138 | C++ | #include <bits/stdc++.h>
#define M 1e7
using namespace std;
int main(){
int n,i,b[6];
while(cin>>n&&n){
j=n;
int a[86400]={0},ans=0,c=0;
while(n--){
scanf("%d:%d:%d %d:%d:%d",&b[0],&b[1],&b[2],&b[3],&b[4],&b[5]);
a[b[0]*3600+b[1]*60+b[2]]++;
a[b[3]*3600+b[4]*60+b[5]]--;
}
for(i=0;i<86400;i++){
c... | a.cc: In function 'int main()':
a.cc:7:17: error: 'j' was not declared in this scope
7 | j=n;
| ^
|
s414636488 | p01138 | C++ | #include<iostream>
#include<cstdio>
using namespace std;
int a[24 * 60 * 60+10];
int main() {
long long a1, m1, a2, m2, a3, m3;
int n;
while (cin >> n&&n != 0) {
int h1, m1, s1, h2, m2, s2;
fill(a, a + 60 * 24 * 60+10, 0);
int sum = 0;
for (int i = 0; i<n; i++) {
scanf_s("%d:%d:%d %d:%d:%d", &h1, &m1, &s1... | a.cc: In function 'int main()':
a.cc:13:25: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
13 | scanf_s("%d:%d:%d %d:%d:%d", &h1, &m1, &s1, &h2, &m2, &s2);
| ^~~~~~~
| scanf
|
s504201544 | p01138 | C++ | #include<iostream>
#include<cstdio>
using namespace std;
int a[24 * 60 * 60+10];
int main() {
long long a1, m1, a2, m2, a3, m3;
int n;
while (cin >> n&&n != 0) {
int h1, m1, s1, h2, m2, s2;
fill(a, a + 60 * 24 * 60+10, 0);
int sum = 0;
for (int i = 0; i<n; i++) {
scanf_s("%d:%d:%d %d:%d:%d", &h1, &m1, &s1... | a.cc: In function 'int main()':
a.cc:13:25: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
13 | scanf_s("%d:%d:%d %d:%d:%d", &h1, &m1, &s1, &h2, &m2, &s2);
| ^~~~~~~
| scanf
|
s751855267 | p01138 | C++ | #include "bits/stdc++.h"
#define REP(i,n) for(ll i=0;i<n;++i)
#define RREP(i,n) for(ll i=n-1;i>=0;--i)
#define FOR(i,m,n) for(ll i=m;i<n;++i)
#define RFOR(i,m,n) for(ll i=n-1;i>=m;--i)
#define ALL(v) (v).begin(),(v).end()
#define PB(a) push_back(a)
#define UNIQUE(v) v.erase(unique(ALL(v)),v.end());
#define DUMP(v) REP... | a.cc: In function 'int main()':
a.cc:52:2: error: expected '}' at end of input
52 | }
| ^
a.cc:32:12: note: to match this '{'
32 | int main() {
| ^
|
s924448597 | p01138 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
#define DAY_TIME 86400
//??¢??°(00:00:00??????????§???°?????????)
int timeToNum(char* text) {
int ans=0;
//h
ans += (text[0] - '0') * 60 * 60 * 10;
ans += (text[1] - '0') * 60 * 60;
//m
ans += (text[3] - '0') * 60 * 10;
ans += (text[4] - '0') * 60;
/... | a.cc: In function 'int main()':
a.cc:39:17: error: 'memset' was not declared in this scope
39 | memset(imosu,0,sizeof(int)*DAY_TIME);
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include<algo... |
s535319247 | p01138 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int n;
while (cin >> n, n) {
int T[86410] = {};
for (int i = 0; i < n; i++) {
int h[2], m[2], s[2], t[2];
for (int j = 0; j < 2; j++) {
scanf("%d:%d:%d", &h[j], &m[j], &s[j]);
... | a.cc: In function 'int main()':
a.cc:13:28: error: expected ';' before numeric constant
13 | t[j] = h[j] 3600 + m[j] 60 + s[j];
| ^ ~~~~
| ;
|
s584247294 | p01138 | C++ | #include <iostream>
#include <cstdio>
#include <string>
#include <algorithm>
#include <queue>
#include <vector>
using namespace std;
int main() {
int n, data[6], x[864001] = { 0 };
int max_mini = 0;
while (cin >> n) {
if (n == 0)break;
for (int i = 0; i < n; i++) {
scanf_s("%d:%d:%d %d:%d:%d",&data[0],&data[... | a.cc: In function 'int main()':
a.cc:15:25: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
15 | scanf_s("%d:%d:%d %d:%d:%d",&data[0],&data[1],&data[2],&data[3],&data[4],&data[5]);
| ^~~~~~~
| scanf
|
s287930109 | p01138 | C++ | #include <iostream>
#include <cstdio>
#include <string>
#include <algorithm>
#include <queue>
#include <vector>
using namespace std;
int main() {
int n, data[6];
int max_mini = 0;
while (cin >> n) {
if (n == 0)break;
int x[86401] = { 0 };
for (int i = 0; i < n; i++) {
scanf_s("%d:%d:%d %d:%d:%d",&data[0]... | a.cc: In function 'int main()':
a.cc:17:25: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
17 | scanf_s("%d:%d:%d %d:%d:%d",&data[0],&data[1],&data[2],&data[3],&data[4],&data[5]);
| ^~~~~~~
| scanf
|
s971515269 | p01138 | C++ | import qualified Control.Monad as C
import qualified Data.List as L
import Control.Applicative ((<$>))
solve :: Int -> IO ()
solve n = do
rideAndLeftTimes <- concat <$> (C.forM [1..n] $ \_ -> do
[ride, left] <- map read . words . filter (/= ':') <$> getLine :: IO [Int]
return [(ride, 1), (left,... | a.cc:7:45: error: too many decimal points in number
7 | rideAndLeftTimes <- concat <$> (C.forM [1..n] $ \_ -> do
| ^~~~
a.cc:7:53: error: stray '\' in program
7 | rideAndLeftTimes <- concat <$> (C.forM [1..n] $ \_ -> do
| ... |
s119136132 | p01138 | C++ | #include <iostream>
#include <cstdio>
#include <vector>
#include <map>
using namespace std;
typedef pair< int, int > iP;
int main() {
int n;
while(cin >> n, n) {
vector< iP > v;
vector< int > t(24 * 3600, 0);
for(int i = 0; i < n; i++) {
int h, m, s, hh, mm, ss;
... | a.cc: In function 'int main()':
a.cc:26:18: error: 'max_element' was not declared in this scope
26 | cout << *max_element(t.begin(), t.end()) << endl;
| ^~~~~~~~~~~
|
s654560102 | p01138 | C++ | #include<iostream>
#include<string>
#include<sstream>
#include<string.h>
#include<algorithm>
using namespace std;
int time[86400];
int stoi(string str){
stringstream ss;
int num;
ss << str;
ss >> num;
return num;
}
int hmstot(string str){
return stoi(str.substr(0,2)) * 3600 + stoi(str.substr(2,2)) * 60 + stoi... | a.cc:9:15: error: 'int time [86400]' redeclared as different kind of entity
9 | int time[86400];
| ^
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/14/bits... |
s011000084 | p01138 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <math.h>
#include <numeric>
#include <algorithm>
#include <stack>
#include <map>
#include <cstdlib>
using namespace std;
int N;
int t[86400];
int main() {
while(cin >> N, N){
int t[86400+1]={0};
for(int i=0; i<N; ++i){
int h, m... | a.cc: In function 'int main()':
a.cc:19:13: error: 'scan_f' was not declared in this scope; did you mean 'scanf'?
19 | scan_f("%d:%d:%d", &h, &m, &s);
| ^~~~~~
| scanf
|
s640864505 | p01138 | C++ | #include <iostream>
#include <vector>
#include <queue>
using namespace std;
void read(int& s0, int& s1)
{
char d;
int h0, m0, h1, m1;
cin >> h0 >> d >> m0 >> d >> s0;
cin >> h1 >> d >> m1 >> d >> s1;
s0 += 3600*h0 + 60*m0;
s1 += 3600*h1 + 60*m1;
}
int main()
{
int n;
while (cin >> n && n != 0) {
v... | a.cc: In function 'int main()':
a.cc:24:5: error: 'sort' was not declared in this scope; did you mean 'short'?
24 | sort(entries.begin(), entries.end());
| ^~~~
| short
|
s909283723 | p01138 | C++ | #include<iostream>
#include<vector>
#include<string>
using namespace std;
int convert(string s){
int h=(s[0]-'0')*10+(s[1]-'0');
int m=(s[3]-'0')*10+(s[4]-'0');
int t=(s[6]-'0')*10+(s[7]-'0');
return h*3600+m*60+t;
}
class range{
public:
int left,right;
range(int left,int right):left(left),right(right){}
range... | a.cc: In function 'int main()':
a.cc:38:17: error: 'memset' was not declared in this scope
38 | memset(ans,0,sizeof(ans));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include<vector>
+++ |... |
s312413866 | p01138 | C++ | #include<complex>
#include<iostream>
#include<iomanip>
#include<cmath>
#include<vector>
#include<map>
#include<ctime>
#include<sstream>
#include<cstdio>
#include<cstdlib>
#include<cassert>
#include<deque>
#include<queue>
#include<climits>
#include<list>
#include<stack>
#include<ctime>
#define all(n) n.begin(),n.end()
#... | a.cc: In function 'int main()':
a.cc:105:5: error: 'sort' was not declared in this scope; did you mean 'sor'?
105 | sort(all(sor),cmp);
| ^~~~
| sor
|
s080101638 | p01138 | C++ | // AOJ 2013
#include <iostream>
using namespace std;
int data[24][60][60];
int main(void)
{
int n;
while (cin >> n, n){
for (int i = 0; i < 24; i++){
for (int j = 0; j < 60; j++){
for (int k = 0; k < 60; k++){
data[i][j][k] = 0;
}
}
}
int s[3], e[3];
for (int i = 0; i < n; i++){
sca... | a.cc: In function 'int main()':
a.cc:16:41: error: reference to 'data' is ambiguous
16 | data[i][j][k] = 0;
| ^~~~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bits/locale_classes.h... |
s993437305 | p01138 | C++ | #include <sstream>
#include <iomanip>
using namespace std;
typedef ostringstream oss;
typedef istringstream iss;
typedef vector<int> vi;
typedef vector< vi > vvi;
typedef long L;
typedef long long LL;
const int SECOND_OF_DAY = 24 * 60 * 60;
LL toSecond(int h, int m, int s) {
return (LL)h * 60 * 60 + (LL)m * 60 + ... | a.cc:8:9: error: 'vector' does not name a type
8 | typedef vector<int> vi;
| ^~~~~~
a.cc:9:9: error: 'vector' does not name a type
9 | typedef vector< vi > vvi;
| ^~~~~~
a.cc: In function 'int main()':
a.cc:22:16: error: 'cin' was not declared in this scope
22 | while (cin... |
s921323689 | p01138 | C++ | #include <iostream>
#include <string>
#include <cstdlib>
#include <algorithm>
using namespace std;
int time[60*60*24];
int main(void){
int n;
while(cin >> n,n){
for(int i=0;i<60*60*24;i++)
time[i]=0;
for(int j=0;j<n;j++){
string l,a;
cin >> l >> a;
int lh=atoi(l.substr(0,2).c_str());
int lm=atoi... | a.cc:7:18: error: 'int time [86400]' redeclared as different kind of entity
7 | int time[60*60*24];
| ^
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/1... |
s867604013 | p01138 | C++ | #include<iostream>
#include<vector>
#include<utility>
using namespace std;
typedef struct Time{
int h;
int m;
int s;
}Time;
typedef pair<int,int> pii;
int main(){
int n;
Time s[10000],e[10000];
vector<pii>::iterator ite;
vector<pii> train;
while(cin>>n,n){
train.clear();
int ans=0,sum=0;
fo... | a.cc: In function 'int main()':
a.cc:24:5: error: 'sort' was not declared in this scope; did you mean 'short'?
24 | sort(train.begin(),train.end());
| ^~~~
| short
|
s699886847 | p01138 | C++ | #include<iostream>
#include<vector>
#include<utility>
using namespace std;
typedef struct Time{
int h;
int m;
int s;
}Time;
typedef pair<int,int> pii;
int main(){
int n;
Time s[10000],e[10000];
vector<pii>::iterator ite;
vector<pii> train;
while(cin>>n,n){
train.clear();
int ans=0,sum=0,i = 0;
... | a.cc: In function 'int main()':
a.cc:24:5: error: 'sort' was not declared in this scope; did you mean 'short'?
24 | sort(train.begin(),train.end());
| ^~~~
| short
|
s270098886 | p01138 | C++ | #include<iostream>
#include<vector>
#include<utility>
#include<cstdio>
using namespace std;
typedef struct Time{
int h;
int m;
int s;
}Time;
typedef pair<int,int> pii;
int main(){
int n;
Time s[10000],e[10000];
vector<pii>::iterator ite;
vector<pii> train;
while(cin>>n,n){
train.clear();
int an... | a.cc: In function 'int main()':
a.cc:25:5: error: 'sort' was not declared in this scope; did you mean 'short'?
25 | sort(train.begin(),train.end());
| ^~~~
| short
|
s432031109 | p01138 | C++ | #include<iostream>
#include<vector>
#include<utility>
#include<cstdio>
using namespace std;
typedef struct Time{
int h;
int m;
int s;
}Time;
typedef pair<int,int> pii;
int main(){
int n;
Time s[10000],e[10000];
vector<pii>::iterator ite;
vector<pii> train;
while(cin>>n,n){
train.clear();
int an... | a.cc: In function 'int main()':
a.cc:25:5: error: 'sort' was not declared in this scope; did you mean 'short'?
25 | sort(train.begin(),train.end());
| ^~~~
| short
|
s232252975 | p01139 | Java |
import java.util.Scanner;
public class Main{
int nx;
int ny;
int[] dx = {0,-1,0,1};
int[] dy = {1,0,-1,0};
char[][] map;
boolean flagW ;
boolean flagB ;
int res = 0;
void dfs(int y, int x){
int sx;
int sy;
map[y][x] = 'X';
for(int i=0; i<4; i++){
sy = y + dy[i];
sx = x + dx[i];
if(sx < 0... | Main.java:86: error: cannot find symbol
new A3().run();
^
symbol: class A3
location: class Main
1 error
|
s314729161 | p01139 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.Bi... | Main.java:50: error: illegal start of type
public static void bfs(int x,int y,int m,){
^
1 error
|
s695404292 | p01139 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.Bi... | Main.java:42: error: ';' expected
static int w,h
^
1 error
|
s157590469 | p01139 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.Bi... | Main.java:54: error: method in in class Main cannot be applied to given types;
if(!in(nx,ny,h,w)) continue;
^
required: int,int
found: int,int,int,int
reason: actual and formal argument lists differ in length
Main.java:63: error: method in in class Main cannot be applied to given types;
if(!in(nx,ny... |
s022178567 | p01139 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.Bi... | Main.java:45: error: illegal start of expression
static final int[] dd=new int[]{0,-1,0,1};
^
1 error
|
s876890316 | p01139 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.Bi... | Main.java:28: error: variable i is already defined in method solve()
for(int i=0;i<4;i++){
^
Main.java:29: error: cannot find symbol
int nx=x+dd[i],ny=y+dd[i^1];
^
symbol: variable x
location: class Main
Main.java:29: error: cannot find symbol
int nx=x+dd[i],ny=y+dd[i^1]... |
s123123676 | p01139 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.Bi... | Main.java:29: error: cannot find symbol
int nx=x+dd[k],ny=y+dd[k^1];
^
symbol: variable x
location: class Main
Main.java:29: error: cannot find symbol
int nx=x+dd[k],ny=y+dd[k^1];
^
symbol: variable y
location: class Main
Main.java:31: error: cannot find symb... |
s611821816 | p01139 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.Bi... | Main.java:28: error: method dfs in class Main cannot be applied to given types;
int ret=dfs(i,j);
^
required: int,int,int
found: int,int
reason: actual and formal argument lists differ in length
Main.java:29: error: cannot find symbol
if(ret==1) bl++;
^
symbol: variab... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.