submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s803615817
p00079
C++
#include <iostream> #include <vector> #include <cstdio> #include <cstdlib> #include <cctype> using namespace std; typedef long long ll; #define FOR(i,a,b) for(int i=(a);i<(int)(b);++i) #define rep(i,n) FOR(i,0,n) vector<double> x, y; double __pow(double a) { return a * a; } int main() { double px,py; ...
a.cc: In function 'int main()': a.cc:28:20: error: 'sqrt' was not declared in this scope 28 | double a = sqrt(__pow(x[0]-x[i-1]) + __pow(y[0]-y[i-1])); | ^~~~
s401098452
p00079
C++
#define _USE_MATH_DEFINES #include <iostream> #include <iomanip> #include <cctype> #include <algorithm> #include <functional> #include <vector> #include <cstdio> #include <cstring> #include <cmath> #include <cfloat> #include <map> #include <queue> #include <stack> #include <list> #include <string> #include <set> #inclu...
a.cc: In function 'int main()': a.cc:31:46: error: could not convert '(((void)(& std::operator>><char, char_traits<char> >((* & std::cin.std::basic_istream<char>::operator>>(p[n].std::pair<double, double>::first)), c))->std::basic_istream<char>::operator>>(p[n].std::pair<double, double>::second)), p[n])' from 'P' {aka ...
s065390158
p00079
C++
#include <iostream> #include <cmath> #include <complex> using namespace std; int main(){ int n=0; double x,y; complex<double> v[20]; while(cin >> x >> y){ v[n]=complex<double>(x,y); n++; } double s=0.0; for(int i=1;(i+1)<n;i++){ s+=abs((conj(v[i]-v[0])*(v[i+1]-v[0])).imag()) } cout << s...
a.cc: In function 'int main()': a.cc:17:51: error: expected ';' before '}' token 17 | s+=abs((conj(v[i]-v[0])*(v[i+1]-v[0])).imag()) | ^ | ; 18 | } | ~ ...
s482053150
p00079
C++
#include<iostream> #include<complex> #include<cstdio> #include<cmath> typedef std::complex<double> point; double CalS(double a,double b,double c){ double z=(a+b+c)/2; return sqrt(z*(z-a)*(z-b)*(z-c)); } int main(void){ point p[20]; int n=0; double x,y; while(scanf("%lf%lf",&x,&y)!=EOF) ...
a.cc: In function 'int main()': a.cc:21:69: error: no matching function for call to 'abs(point&, point&)' 21 | sum+=CalS(std::abs(p[0]-p[i]),std::abs(p[0]-p[i+1]),std::abs(p[i],p[i+1])); | ~~~~~~~~^~~~~~~~~~~~~ In file included from a.cc:2: /u...
s117380564
p00079
C++
#include<iostream> #include<complex> #include<cstdio> #include<cmath> typedef std::complex<double> point; double CalS(double a,double b,double c){ double z=(a+b+c)/2; return sqrt(z*(z-a)*(z-b)*(z-c)); } int main(void){ point p[20]; int n=0; double x,y; while(scanf("%lf%lf",&x,&y)!=EOF) ...
a.cc: In function 'int main()': a.cc:21:69: error: no matching function for call to 'abs(point&, point&)' 21 | sum+=CalS(std::abs(p[0]-p[i]),std::abs(p[0]-p[i+1]),std::abs(p[i],p[i+1])); | ~~~~~~~~^~~~~~~~~~~~~ In file included from a.cc:2: /u...
s369872003
p00079
C++
#include<stdio.h> </stdio.h> typedef struct vec vec; struct vec { double x, y; }; /* 便利なコンストラクタ関数*/ static vec P(double x, double y) { vec p = {x, y}; return p; } static vec add(vec a,vec b){ returnVec(a.x + b.y, a.y + b.y); } int main(void){ vec a = {1.0,2.0}; vec b = Vec{2....
a.cc:24:9: error: extended character   is not valid in an identifier 24 | vec a = {1.0,2.0}; | ^ a.cc:3:1: error: expected unqualified-id before '<' token 3 | </stdio.h> | ^ a.cc: In function 'vec add(vec, vec)': a.cc:19:5: error: 'returnVec' was not declared in this scope 19 | ret...
s910165628
p00079
C++
#include<stdio.h> </stdio.h> typedef struct vec vec; struct vec { double x, y; }; /* 便利なコンストラクタ関数*/ static vec P(double x, double y) { vec p = {x, y}; return p; } static vec add(vec a,vec b){ return Vec(a.x + b.y, a.y + b.y); } static vec add(vec a,vec b){ return Vec(a.x - b.y, a....
a.cc:36:9: error: extended character   is not valid in an identifier 36 | vec a = {1.0,2.0}; | ^ a.cc:3:1: error: expected unqualified-id before '<' token 3 | </stdio.h> | ^ a.cc: In function 'vec add(vec, vec)': a.cc:19:12: error: 'Vec' was not declared in this scope; did you mean 'vec'?...
s942357634
p00079
C++
#include<stdio.h> </stdio.h> typedef struct vec vec; struct vec { double x, y; }; /* 便利なコンストラクタ関数*/ static vec P(double x, double y) { vec p = {x, y}; return p; } static vec add(vec a,vec b){ return Vec(a.x + b.y, a.y + b.y); } static vec add(vec a,vec b){ return Vec(a.x - b.y, a....
a.cc:36:9: error: extended character   is not valid in an identifier 36 | vec a = {1.0,2.0}; | ^ a.cc:3:1: error: expected unqualified-id before '<' token 3 | </stdio.h> | ^ a.cc: In function 'vec add(vec, vec)': a.cc:19:12: error: 'Vec' was not declared in this scope; did you mean 'vec'?...
s224072607
p00079
C++
#include<iostream> #include<cmath> using namespace std; int main(){ double x[3],y[3],s=0,z,a,b,c; char cc; cin>>x[0]>>cc>>y[0]>>x[1]>>cc>>y[1]; for(int i=1;cin>>x[i%2+1]>>cc>>y[i%2+1];i++){ for(int i=0;i<3;i++)a[i] = sqrt((x[i%3]-x[(i+1)%3])*(x[i%3]-x[(i+1)%3])+(y[i%3]-y[(i+1)%3])*(y[i%3]-y[(i+1)%3])); ...
a.cc: In function 'int main()': a.cc:9:26: error: invalid types 'double[int]' for array subscript 9 | for(int i=0;i<3;i++)a[i] = sqrt((x[i%3]-x[(i+1)%3])*(x[i%3]-x[(i+1)%3])+(y[i%3]-y[(i+1)%3])*(y[i%3]-y[(i+1)%3])); | ^
s982478431
p00079
C++
#include<iostream> #include<cstdio> #include<cstdlib> using namespace std; int main(){ double x,y,sum=0; double x1,x2,y1,y2,x3,y3,s,a,b,c; scanf("%lf,%lf",&x1,&y1); scanf("%lf,%lf",&x2,&y2); while(scanf("%lf,%lf",&x3,&y3)!=EOF){ a=sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)); b=sqrt((x2-x3)*(x2-x3)+(y2-y3)*(y2-y3)); ...
a.cc: In function 'int main()': a.cc:11:19: error: 'sqrt' was not declared in this scope 11 | a=sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)); | ^~~~
s039897671
p00079
C++
import java.util.*; import static java.lang.Math.*; import static java.util.Arrays.*; public class Main { int INF = 1 << 28; void run() { Scanner sc = new Scanner(System.in); double s = 0; double[] x = new double[3]; double[] y = new double[3]; String[] str = sc.next().split(","); x[0] = Double.parseDo...
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 static java.lang.Math.*; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-...
s428464333
p00079
C++
#include<cmath> #include<algorithm> #include<iostream> #include<vector> #include<cstdio> using namespace std; double EPS = 1e-10; const double PI = acos(-1); double add(double a, double b){ if(abs(a+b) < EPS * (abs(a)+abs(b)))return 0; return a+b; } struct point{ double x, y; point(){} point(double x,doub...
/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
s270164787
p00079
C++
#include<cmath> #include<algorithm> #include<iostream> #include<vector> #include<cstdio> using namespace std; double EPS = 1e-10; const double PI = acos(-1); double add(double a, double b){ if(abs(a+b) < EPS * (abs(a)+abs(b)))return 0; return a+b; } struct point{ double x, y; point(){} point(double x,doub...
a.cc: In function 'int main()': a.cc:141:13: error: 'x' was not declared in this scope 141 | while(cin>>x>>k>>y){ | ^ a.cc:141:19: error: 'y' was not declared in this scope 141 | while(cin>>x>>k>>y){ | ^
s683346424
p00079
C++
#include <iostream> #include <cmath> int main() { double cx[20], cy[20]; int i; double a, b, c, z; double S; char dummy; i=0; while( std::cin >> cx[i] >> dummy >> cy[i] ) i++; i++; S = 0.0; for( int j=0; j<i-2; j++) { a = sqrt( (cx[0]-cx[j+1])*(cx[0]-cx[j+1]) + (cy[0]-cy[j+1])*(cy[0]-cy[j+1]) ); b = sq...
a.cc: In function 'int main()': a.cc:25:18: error: expected '}' at end of input 25 | return 0; | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s387668505
p00079
C++
#include<iostream> #include<cstdio> #include<cstdlib> using namespace std; int main(){ char _; int n=0; double x[21],y[21]; while(cin>>x[n]>>_>>y[n])n++; x[n]=x[0];y[n]=y[0]; double s=0; for(int i=0;i<n;i++){ s += x[i]*y[i+1] - y[i]*x[i+1]; } printf("%.6f\n",fabs(s/2)); return 0; }
a.cc: In function 'int main()': a.cc:17:25: error: 'fabs' was not declared in this scope; did you mean 'labs'? 17 | printf("%.6f\n",fabs(s/2)); | ^~~~ | labs
s643982428
p00079
C++
#include <iostream> #include <vector> vector<double> X,Y; int main(){ double x,y,s=0; int i,n=0; char c; while(std::cin>>x>>c>>y){ X.push_back(x); Y.push_back(y); n++; } X.push_back(X[0]); Y.push_back(Y[0]); for(i=0;i<n;i++) s+=(X[i]*Y[i+1]-X[i+1]*Y[i]); std::cout<<abs(s)/2<<endl; }
a.cc:3:1: error: 'vector' does not name a type 3 | vector<double> X,Y; | ^~~~~~ a.cc: In function 'int main()': a.cc:9:17: error: 'X' was not declared in this scope 9 | X.push_back(x); | ^ a.cc:10:17: error: 'Y' was not declared in this scope 10 | Y...
s159444532
p00079
C++
#include <cstdlib> #include <iostream> #include <vector> vector<double> X,Y; int main(){ double x,y,s=0; int i,n=0; char c; while(std::cin>>x>>c>>y){ X.push_back(x); Y.push_back(y); n++; } X.push_back(X[0]); Y.push_back(Y[0]); for(i=0;i<n;i++) s+=(X[i]*Y[i+1]-X[i+1]*Y[i]); std::cout<<abs(s)/2<<endl; }
a.cc:4:1: error: 'vector' does not name a type 4 | vector<double> X,Y; | ^~~~~~ a.cc: In function 'int main()': a.cc:10:17: error: 'X' was not declared in this scope 10 | X.push_back(x); | ^ a.cc:11:17: error: 'Y' was not declared in this scope 11 | ...
s193456646
p00079
C++
#include <cstdlib> #include <cstdio> #include <iostream> int main(){ double x0,y0,x1,y1,x, y, s = 0; char c; std::cin >> x0 >> c >> y0; x1 = x0; y1 = y0; while(std::cin>>x>>c>>y){ s += x1*y - y1*x; x1 = x; y1 = y; } s += x1*y0 - y1*x0; printf("%.6f\n", fabs(s / 2)); }
a.cc: In function 'int main()': a.cc:15:34: error: 'fabs' was not declared in this scope; did you mean 'labs'? 15 | printf("%.6f\n", fabs(s / 2)); | ^~~~ | labs
s781772397
p00079
C++
#include <iostream> int main(){ double x0,y0,x1,y1,x,y,s=0; char c; std::cin>>x0>>c>>y0; x1=x0;y1=y0; while(std::cin>>x>>c>>y){ s+=x1*y-y1*x; x1=x;y1=y; } s+=x1*y0-y1*x0; std::cout<<fabs((s<0?-s:s)/2)<<"\n"; }
a.cc: In function 'int main()': a.cc:12:20: error: 'fabs' was not declared in this scope; did you mean 'labs'? 12 | std::cout<<fabs((s<0?-s:s)/2)<<"\n"; | ^~~~ | labs
s299788559
p00080
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); double q; while ((q = in.nextDouble() >= 1) { double xn = q / 2.0; double checkVal = Math.pow(xn, 3.0) - q; while (Math.abs(checkVal) >= 0.00001 * q) { checkVal = Math.pow(xn,...
Main.java:7: error: ')' expected while ((q = in.nextDouble() >= 1) { ^ 1 error
s271097223
p00080
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.math.BigDecimal; import java.math.MathContext; import java.math.RoundingMode; public class AOJ_0080 { public static void main(String[] args) throws NumberFormatException, IOException { BufferedReader input...
Main.java:8: error: class AOJ_0080 is public, should be declared in a file named AOJ_0080.java public class AOJ_0080 ^ 1 error
s292449222
p00080
C
#include <stdio.h> #include <math.h> int main(void){ int q; double xn,x1,k; while(scanf("%d",&q)!=EOF){ if(q==-1) break; else{ n=0; x1=(double)q/2.0; //printf("x1:%.6f\n",x1); while(fabs(x1*x1*x1-q)>=(0.00001*q)){ k=(x1*x1*x1-q)/(3*x1*x1); xn=x1-k; x1=xn; //printf("//%.6f\n",x...
main.c: In function 'main': main.c:10:7: error: 'n' undeclared (first use in this function) 10 | n=0; | ^ main.c:10:7: note: each undeclared identifier is reported only once for each function it appears in
s294331312
p00080
C
#include <stdio.h>double zenka(double q){ double x=q/2; while(x*x*x-q>=0.00001*q || x*x*x-q<=-0.00001*q) { x=x-((x*x*x)-q)/(3*x*x); } return x;}int main(void){ int q; while(1) { scanf("%d",&q); if(q==-1) break; else { printf("%.7f\n",zenk...
main.c:1:19: warning: extra tokens at end of #include directive 1 | #include <stdio.h>double zenka(double q){ double x=q/2; while(x*x*x-q>=0.00001*q || x*x*x-q<=-0.00001*q) { x=x-((x*x*x)-q)/(3*x*x); } return x;}int main(void){ int q; while(1) { scanf("%d",&q); ...
s669958316
p00080
C
#include <stdio.h>double zenka(double q){ double x=q/2; while(x*x*x-q>=0.00001*q || x*x*x-q<=-0.00001*q) { x=x-((x*x*x)-q)/(3*x*x); } return x;}int main(void){ int q; while(1) { scanf("%d",&q); if(q==-1) break; else { printf("%.7f\n",zenk...
main.c:1:19: warning: extra tokens at end of #include directive 1 | #include <stdio.h>double zenka(double q){ double x=q/2; while(x*x*x-q>=0.00001*q || x*x*x-q<=-0.00001*q) { x=x-((x*x*x)-q)/(3*x*x); } return x;}int main(void){ int q; while(1) { scanf("%d",&q); ...
s593920334
p00080
C
#include <stdio.h> #include <math.h> int main(void){ int q; while(scanf("%d", &q)!= EOF) { double x; x=(double)q/2.0; if(q>0) { double xx; while((fabs(x*x*x-q))>(0.00001*q)){ xx=x-((x*x*x-q)/(3*x*x)); x=xx; } ...
main.c:20:17: error: stray '\343' in program 20 | <U+4E09><U+4E57><U+6839><U+306E><U+554F><U+984C><U+3067><U+3059><U+3002> | ^~~~~~~~ main.c:20:1: error: unknown type name '\U00004e09\U00004e57\U00006839\U0000306e\U0000554f\U0000984c\U00003067\U00...
s220731298
p00080
C
#include <stdio.h> #include <math.h> int main(void){ int q; while(scanf("%d", &q)!= EOF) { double x; x=(double)q/2; if(q>0) { double xx; while((fabs(x*x*x-q))>(0.00001*q)){ xx=x-((x*x*x-q)/(3*x*x)); x=xx; } ...
main.c:20:17: error: stray '\343' in program 20 | <U+4E09><U+4E57><U+6839><U+306E><U+554F><U+984C><U+3067><U+3059><U+3002> | ^~~~~~~~ main.c:20:1: error: unknown type name '\U00004e09\U00004e57\U00006839\U0000306e\U0000554f\U0000984c\U00003067\U00...
s373706934
p00080
C
#include <stdio.h> #include <math.h> int main(void){ double q; while(scanf("%d", &q)!= EOF&&q=-1) { double x; x=q/2; if(q>0) { double xx; while((fabs(x*x*x-q))>(0.00001*q)){ xx=x-((x*x*x-q)/(3*x*x)); x=xx; } pr...
main.c: In function 'main': main.c:5:34: error: lvalue required as left operand of assignment 5 | while(scanf("%d", &q)!= EOF&&q=-1) { | ^
s256087712
p00080
C
#include <stdio.h> #include <math.h>int main(void){ double q; while(scanf("%lf", &q)!= EOF && q != -1) { double x, a; x=q/2; while(1){ if(fabs(x*x*x-q)<0.00001*q) break; x=x-((x*x*x-q)/(3*x*x)); x = x; } ...
main.c:2:18: warning: extra tokens at end of #include directive 2 | #include <math.h>int main(void){ | ^~~ main.c:4:5: error: expected identifier or '(' before 'while' 4 | while(scanf("%lf", &q)!= EOF && q != -1) { | ^~~~~ main.c:15:1: error: expected identifier or '(' befor...
s389581684
p00080
C
#include <stdio.h> #include <math.h>int main(void){ double q; while(scanf("%lf", &q)!= EOF && q != -1) { double x, a; x=q/2; while(1){ if(fabs(x*x*x-q)<0.00001*q) break; x=x-((x*x*x-q)/(3*x*x)); x = x; } printf("%.7f\n",x); } return 0; }
main.c:2:18: warning: extra tokens at end of #include directive 2 | #include <math.h>int main(void){ | ^~~ main.c:4:1: error: expected identifier or '(' before 'while' 4 | while(scanf("%lf", &q)!= EOF && q != -1) { | ^~~~~ main.c:14:1: error: expected identifier or '(' before 'retur...
s188222983
p00080
C
#include <stdio.h>#include <math.h>int main(void){ double q; while(scanf("%lf", &q)!= EOF && q != -1) { double x, a; x=q/2; while(1){ if(fabs(x*x*x-q)<0.00001*q) break; x=x-((x*x*x-q)/(3*x*x)); x = x; } ...
main.c:1:19: warning: extra tokens at end of #include directive 1 | #include <stdio.h>#include <math.h>int main(void){ double q; while(scanf("%lf", &q)!= EOF && q != -1) { double x, a; x=q/2; while(1){ if(fabs(x*x*x-q)<0.00001*q) break; x=x-((...
s365214031
p00080
C
#include <iostream> #include <sstream> #include <cstdio> #include <cstdlib> #include <cmath> #include <cstring> #include <string> #include <vector> #include <stack> #include <queue> #include <set> #include <map> #include <algorithm> #include <functional> using namespace std; int main() { while ( true ) { int q; ...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s139283534
p00080
C
#include <stdio.h> #include <stdlib.h> int main(int argc, char const *argv[]) { int n; double ans, limit; while (1) { scanf("%d", &n); if (n == -1) break; limit = 0.00001 * n; ans = double(n/2); while (1) { ans = ans - (ans * ans * ans - n) / (3 * ans * ans); if ((ans * ans * ans...
main.c: In function 'main': main.c:13:11: error: expected expression before 'double' 13 | ans = double(n/2); | ^~~~~~
s507471775
p00080
C
#include <stdio.h> #include <stdlib.h> int main(void) { int n; double ans, limit; while (1) { scanf("%d", &n); if (n == -1) break; limit = 0.00001 * n; ans = double(n/2); while (1) { ans = ans - (ans * ans * ans - n) / (3 * ans * ans); if ((ans * ans * ans) - n < limit) break; ...
main.c: In function 'main': main.c:13:11: error: expected expression before 'double' 13 | ans = double(n/2); | ^~~~~~
s886863825
p00080
C
while(n=gets.to_i)!=-1 p n.cbrt;end
main.c:1:1: error: expected identifier or '(' before 'while' 1 | while(n=gets.to_i)!=-1 | ^~~~~ main.c:2:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input 2 | p n.cbrt;end | ^
s283867750
p00080
C++
#include<iostream> #include<stdio.h> using namespace std; int main(){ double a,x; while(cin>>a){ if(a==-1) break; x=a/2; while(1){ x=x-(x*x*x-a)/(3*x*x); if(fabs(x*x*x-a)<0.00001*a) break; } printf("%.6f\n",x); } }
a.cc: In function 'int main()': a.cc:13:16: error: 'fabs' was not declared in this scope; did you mean 'labs'? 13 | if(fabs(x*x*x-a)<0.00001*a) | ^~~~ | labs
s272819162
p00080
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a; double b,c; while(cin>>a&&a!=-1){ b=a c=b/2; while(fabs(c*c*c-b)>=b*1e-5){ c=c-(c*c*c-b)/(3*c*c); } cout<<c<<endl; } }
a.cc: In function 'int main()': a.cc:8:12: error: expected ';' before 'c' 8 | b=a | ^ | ; 9 | c=b/2; | ~
s365597094
p00080
C++
import sys for e in sys.stdin:print(float(e)**(1/3)) #################################################### #################################################### #################################################### #################################################### #################################################### ...
a.cc:5:1: error: stray '##' in program 5 | #################################################### | ^~ a.cc:5:3: error: stray '##' in program 5 | #################################################### | ^~ a.cc:5:5: error: stray '##' in program 5 | #################################################...
s082041137
p00080
C++
#include<stdio.h> #include <algorithm> #include <cassert> #include <cctype> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <iostream> #include <iterator> #include <list> #include <map> #include <numeric> #include <queue> #inc...
a.cc: In function 'int main()': a.cc:44:31: error: call of overloaded 'abs(long double)' is ambiguous 44 | while ((ld)abs((ld)x *(ld)x * (ld)x - (ld)a) >=(ld) 0.00001*(ld)a) { | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/cstdlib:79, ...
s644446282
p00080
C++
#include <iostream> using namespace std; int main(){ int q; while(cin>>q,q!=-1){ double x=q/2.0; while(fabs(x*x*x-q)>=0.00001*q)x-=(x*x*x-q)/(3*x*x); printf("%.6f\n",x); } return 0; }
a.cc: In function 'int main()': a.cc:8:15: error: 'fabs' was not declared in this scope; did you mean 'labs'? 8 | while(fabs(x*x*x-q)>=0.00001*q)x-=(x*x*x-q)/(3*x*x); | ^~~~ | labs
s114524007
p00080
C++
#include <stdio.h>double zenka(double q){ double x=q/2; while(x*x*x-q>=0.00001*q || x*x*x-q<=-0.00001*q) { x=x-((x*x*x)-q)/(3*x*x); } return x;}int main(void){ int q; while(1) { scanf("%d",&q); if(q==-1) break; else { printf("%.7f\n",zenk...
a.cc:1:26: warning: extra tokens at end of #include directive 1 | #include <stdio.h>double zenka(double q){ double x=q/2; while(x*x*x-q>=0.00001*q || x*x*x-q<=-0.00001*q) { x=x-((x*x*x)-q)/(3*x*x); } return x;}int main(void){ int q; while(1) { scanf("%d",&q); ...
s347890956
p00080
C++
#include<stdio.h> double abs(double A){ return A<0.0?-A:A; } int main(){ int a; while(scanf("%d",&a),~a){ double p=(double)a/2.0; while(1){ p=p-((p*p*p)-(double)a)/(3.0*p*p); if(abs(p*p*p-(double)a)<(double)a*0.00001)break; //printf("%.6lf\n",p); } printf("%.6lf\n",p); } }
a.cc: In function 'int main()': a.cc:14:2: error: expected '}' at end of input 14 | } | ^ a.cc:7:12: note: to match this '{' 7 | int main(){ | ^
s258974038
p00080
C++
#include<stdio.h> double abs(double A){ return A<0.0?-A:A; } int main(){ int a; while(scanf("%d",&a),~a){ double p=(double)a/2.0; while(1){ p=p-((p*p*p)-(double)a)/(3.0*p*p); if(abs(p*p*p-(double)a)<(double)a*0.00001)break; //printf("%.6lf\n",p); } printf("%.6lf\n",p); } }
a.cc: In function 'int main()': a.cc:15:2: error: expected '}' at end of input 15 | } | ^ a.cc:7:12: note: to match this '{' 7 | int main(){ | ^
s516196158
p00080
C++
#include<stdio.h> double abs(double A){ return A<0.0?-A:A; } int main() { int a; while(scanf("%d",&a),~a){ double p=(double)a/2.0; while(1){ p=p-((p*p*p)-(double)a)/(3.0*p*p); if(abs(p*p*p-(double)a)<(double)a*0.00001)break; //printf("%.6lf\n",p); } printf("%.6lf\n",p); } }
a.cc: In function 'int main()': a.cc:18:2: error: expected '}' at end of input 18 | } | ^ a.cc:9:1: note: to match this '{' 9 | { | ^
s062734957
p00080
C++
include<iostream> #include<cstdio> #include<cmath> using namespace std; #define EPS 0.00001 void compute(int q){ double x = 1.0*q/2; while(1){ if ( fabs(x*x*x - q) < EPS ) break; x = x - (x*x*x - q)/(3*x*x); } printf("%.6lf\n", x); } main(){ int q; while( cin >> q && q >= 0 ) compute(q); }
a.cc:1:1: error: 'include' does not name a type 1 | include<iostream> | ^~~~~~~ In file included from /usr/include/c++/14/cmath:45, from a.cc:3: /usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cxx::__is_null_pointer' redeclared as different kind of entity 16...
s637364759
p00080
C++
#include <cstdio> #include <cstdlib> #include <cmath> #include <climits> #include <cfloat> #include <map> #include <utility> #include <set> #include <iostream> #include <memory> #include <string> #include <vector> #include <algorithm> #include <functional> #include <sstream> #include <fstream> #include <complex> #inclu...
a.cc: In function 'int main()': a.cc:40:40: error: expression list treated as compound expression in functional cast [-fpermissive] 40 | printf("%lf\n",double(q,(double)1/3)); | ^
s216420962
p00080
C++
#include<cstdio> #include<cmath> int main(){ int q; x; for(;scanf("%d",&q),~q;printf("%f\n",x)) for(x=q/2.;fabs(x*x*x-q)>1e-5*q;x-=(x*x*x-q)/3./x/x); }
a.cc: In function 'int main()': a.cc:4:16: error: 'x' was not declared in this scope 4 | int q; x; | ^
s136749330
p00080
C++
#import<cstdio> #import<cmath> main(q){float x;for(;scanf("%d",&q),~q;printf("%f\n",x))for(x=q/2.;fabs(x*x*x-q)>1e-5*q;x-=(x*x*x-q)/(3*x*x));}
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<cstdio> | ^~~~~~ a.cc:2:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 2 | #import<cmath> | ^~~~~~ a.cc:3:5: error: expected constructor, destructor, or type conversion before '(' token 3 | ma...
s672510378
p00080
C++
#include <iostream> #include <cmath> #include <iomanip> using namespace std; int main(void) { int a; while(cin>>a) { if(a==-1)break; double q = (double)a; double x = q/2; while(abs(x*x*x-q)>=0.00001*q) { double y = x-(x*x*x-q)/(3*x*x); x ...
a.cc: In function 'int main()': a.cc:18:15: error: 'set' was not declared in this scope 18 | cout<<set.precision(6)<<fixed; | ^~~ a.cc:4:1: note: 'std::set' is defined in header '<set>'; this is probably fixable by adding '#include <set>' 3 | #include <iomanip> +++ |+#include <set> ...
s848857344
p00080
C++
#include <iostream> #include <cmath> #include <stdio.h> using namespace std; int main(void) { int a; while(cin>>a) { if(a==-1)break; double q = (double)a; double x = q/2; while(abs(x*x*x-q)>=0.00001*q) { double y = x-(x*x*x-q)/(3*x*x); x ...
a.cc: In function 'int main()': a.cc:18:14: error: expected primary-expression before '%' token 18 | printf(%.6lf/n,x); | ^ a.cc:18:15: error: unable to find numeric literal operator 'operator""lf' 18 | printf(%.6lf/n,x); | ^~~~ a.cc:18:20: error: 'n' was not dec...
s472936705
p00080
C++
#include <iostream> #include <cmath> #include <stdio.h> using namespace std; int main(void) { int a; while(cin>>a) { if(a==-1)break; double q = (double)a; double x = q/2; while(abs(x*x*x-q)>=0.00001*q) { double y = x-(x*x*x-q)/(3*x*x); x ...
a.cc:18:19: error: stray '\' in program 18 | printf(%.6lf\n,x); | ^ a.cc: In function 'int main()': a.cc:18:14: error: expected primary-expression before '%' token 18 | printf(%.6lf\n,x); | ^ a.cc:18:15: error: unable to find numeric literal operator 'operato...
s852201695
p00080
C++
#include<iostream> #include<cmath> #include<iostream> #include<cstdio> using namespace std; int main(void){ double q; while(cin >> q,q!=-1){ double x=q/2; while(abs(x*x*x-q)>0.00001*q) x=x-(x*x*x-q)/(3*x*x); printf("%.6lf\",x); } return 0; }
a.cc:17:12: warning: missing terminating " character 17 | printf("%.6lf\",x); | ^ a.cc:17:12: error: missing terminating " character 17 | printf("%.6lf\",x); | ^~~~~~~~~~~~ a.cc: In function 'int main()': a.cc:18:3: error: expected primary-expression before '}' token 1...
s979060445
p00080
C++
#include <iostream> #include <cmath> #include using namespace std; int main(){ int q; while(cin>>q,q!=-1){ double x=q/2.0; while(fabs(x*x*x-q)>=0.00001*q)x-=(x*x*x-q)/(3*x*x); printf("%.6f\n", x); } return 0; }
a.cc:3:9: error: #include expects "FILENAME" or <FILENAME> 3 | #include | ^
s148507996
p00080
C++
#include <iostream> #include <cmath> #include <cstdio> #include using namespace std; int main(){ int q; while(cin>>q,q!=-1){ double x=q/2.0; while(fabs(x*x*x-q)>=0.00001*q)x-=(x*x*x-q)/(3*x*x); printf("%.6f\n", x); } return 0; }
a.cc:4:9: error: #include expects "FILENAME" or <FILENAME> 4 | #include | ^
s762362429
p00080
C++
#include <iostream> #include <cmath> #include <cstdio> #include using namespace std; int main(){ int q; while(cin>>q&&q!=-1){ double x=q/2.0; while(fabs(x*x*x-q)>=0.00001*q)x-=(x*x*x-q)/(3*x*x); printf("%.6f\n", x); } return 0; }
a.cc:4:9: error: #include expects "FILENAME" or <FILENAME> 4 | #include | ^
s217736167
p00080
C++
a#include <iostream> #include <stdio.h> #include <math.h> #include <iomanip> using namespace std; double third_root(double xn, double q){ if((xn*xn*xn-q)>-0.00001 && (xn*xn*xn-q)<0.00001){ return xn; } xn = xn-((xn*xn*xn-q))/(3.0*xn*xn); return third_root(xn, q); } int main(void)...
a.cc:1:2: error: stray '#' in program 1 | a#include <iostream> | ^ a.cc:1:1: error: 'a' does not name a type 1 | a#include <iostream> | ^ In file included from /usr/include/math.h:275, from /usr/include/c++/14/cmath:47, from /usr/include/c++/14/math.h:36, ...
s278901483
p00080
C++
#include<map> #include<set> #include<list> #include<cmath> #include<queue> #include<stack> #include<cstdio> #include<string> #include<vector> #include<complex> #include<cstdlib> #include<cstring> #include<numeric> #include<sstream> #include<iostream> #include<algorithm> #include<functional> #define mp make_pair ...
a.cc: In function 'int main()': a.cc:51:18: error: expected '}' at end of input 51 | return 0; | ^ a.cc:39:11: note: to match this '{' 39 | int main(){ | ^
s750580251
p00080
C++
#include<iostream> #include<cstdio> #include<cmath> using namespace std; typedef long long LL; typedef double double DD; int main(){ LL q; DD x; while(1){ cin>>q; if(q==-1) break; x=(DD)q/2; while(abs(x*x*x-q)>=0.00001*q){ x=x-(x*x*x-q)/(3*x*x); } printf("%.6f\n",x); } }
a.cc:8:9: error: two or more data types in declaration of 'DD' 8 | typedef double double DD; | ^~~~~~ a.cc: In function 'int main()': a.cc:13:9: error: 'DD' was not declared in this scope 13 | DD x; | ^~ a.cc:20:17: error: 'x' was not declared in this scope 20 | ...
s846433270
p00080
C++
#include <iostream> #include <deque> #include <sstream> #include <math.h> using namespace std; double distance(int r1, int r2) { double a = pow(abs(r1 - r2), 2); double b = pow(r1 + r2, 2); return sqrt(-a + b); } int main() { int box_width; while (cin >> box_width) { string line; stringstream ss; deque<int...
a.cc: In function 'int main()': a.cc:27:17: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 27 | sort(cakes.begin(), cakes.end()); | ^~~~ | sqrt
s356763286
p00080
C++
#include <iostream> #include <deque> #include <sstream> #include <cmath> using namespace std; double distance(int r1, int r2) { double a = pow(abs(r1 - r2), 2); double b = pow(r1 + r2, 2); return sqrt(-a + b); } int main() { int box_width; while (cin >> box_width) { string line; stringstream ss; deque<int>...
a.cc: In function 'int main()': a.cc:27:17: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 27 | sort(cakes.begin(), cakes.end()); | ^~~~ | sqrt
s556128926
p00080
C++
#include <cmath> #include <iostream> int main(){ int q; while(std::cin>>q,q!=-1){ double x=q/2.0,a; while(1){ a=x*x*x-q; if(fabs(a)<1e-5*q)break; x-=a/3/x/x; } printf "%.6f\n",x; } }
a.cc: In function 'int main()': a.cc:12:23: error: expected ';' before string constant 12 | printf "%.6f\n",x; | ^~~~~~~~~ | ;
s992908658
p00081
C
#include<stdio.h> #include<math.h> main(){ double x1,y1,x2,y2,xq,yq,ans_x,ans_y; while(scanf("%lf,%lf,%lf,%lf,%lf,%lf",&x1,&y1,&x2,&y2,&xq,&yq)==6){ ans_x=(x2-xq)+x1; ans_y=f(y2-y1)+y1; printf("%lf %lf\n",ans_x,ans_y); } return 0; }
main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int] 4 | main(){ | ^~~~ main.c: In function 'main': main.c:10:11: error: implicit declaration of function 'f' [-Wimplicit-function-declaration] 10 | ans_y=f(y2-y1)+y1; | ^
s001641152
p00081
C
#include<stdio.h> int main(void){ double x1,y1,x2,y2,xq,yq,x,y; double a,b,A,B,cx,cy; while(~scanf("%lf,%lf,%lf,%lf,%lf,%lf",&x1,&y1,&x2,&y2,&xq,&yq)){ if(y1==0 && y2==0){ printf("%lf %lf\n",xq,-yq); continue; } if(xx1==0 && x2==0){ printf("%lf %lf\n",-xq,yq); continue;...
main.c: In function 'main': main.c:14:8: error: 'xx1' undeclared (first use in this function); did you mean 'x1'? 14 | if(xx1==0 && x2==0){ | ^~~ | x1 main.c:14:8: note: each undeclared identifier is reported only once for each function it appears in
s830366226
p00081
C
#include<cstdio> #include<cmath> #include<iostream> #include<algorithm> using namespace std; int main(void){ double x1,y1,x2,y2,xq,yq,n,m,x,y; while(scanf("%lf,%lf,%lf,%lf,%lf,%lf",&x1,&y1,&x2,&y2,&xq,&yq) != EOF){ if(x1 == x2){ printf("%lf %lf\n",xq+(x1-xq)*2,yq); continue; } if(y1 == y2){ ...
main.c:1:9: fatal error: cstdio: No such file or directory 1 | #include<cstdio> | ^~~~~~~~ compilation terminated.
s666824834
p00081
C
#include <cstdio> #include <complex> #include <cmath> using namespace std; typedef complex<double> Vector; double dot(const Vector &v1, const Vector &v2) { return v1.real()*v2.real() + v1.imag()*v2.imag(); } int main() { double X1, Y1, X2, Y2, XQ, YQ; while(scanf("%lf,%lf,%lf,%lf,%lf,%lf", &X1, &Y1, &X2,...
main.c:1:10: fatal error: cstdio: No such file or directory 1 | #include <cstdio> | ^~~~~~~~ compilation terminated.
s600612733
p00081
C++
#include <iostream> #include <cstdio> using namespace std; #define rep2(x,from,to) for(int x = (from); x < (to); ++(x)) #define rep(x,to) rep2(x,0,to) int main() { double x1,y1,x2,y2,qx,qy; while(scanf("%lf,%lf,%lf,%lf,%lf,%lf", &x1,&y1,&x2,&y2,&qx,&qy) != EOF) { qx -= x1, qy -= y1, x2 -= x1, y2 -= y1; double cos...
a.cc: In function 'int main()': a.cc:10:35: error: 'sqrt' was not declared in this scope 10 | double cos = x2 / sqrt(x2*x2+y2*y2), sin = y2 / sqrt(x2*x2+y2*y2); | ^~~~ a.cc:12:29: error: 'sin' was not declared in this scope 12 | qx = cos*qx+s...
s282930392
p00081
C++
#include<iostream> #include<stdio.h> #include<math.h> #include<vector> using namespace std; class Point { public: double x, y; Point(double x = 0, double y = 0): x(x), y(y) {} double norm(){return x*x + y*y;} }; typedef Point Vector; double dot(Vector a, Vector b){ return a.x*b.x + a.y*b.y; } struct...
a.cc: In function 'Point project(Segment, Point)': a.cc:25:24: error: no match for 'operator-' (operand types are 'Point' and 'Point') 25 | Vector base = s.p2 - s.p1; | ~~~~ ^ ~~~~ | | | | Point Point In file included from /usr/inc...
s126718862
p00081
C++
#include<iostream> #include<stdio.h> #include<math.h> #include<vector> using namespace std; class Point { public: double x, y; Point(double x = 0, double y = 0): x(x), y(y) {} Point operator + (Point p) {return Point(x + p.x, y + p.y);} Point operator - (Point p) {return Point(x - p.x, y - p.y);} ...
a.cc: In member function 'bool Point::operator==(const Point&) const': a.cc:24:30: error: 'EPS' was not declared in this scope 24 | return fabs(x-p.x) < EPS && fabs(y-p.y) < EPS; | ^~~ a.cc: In function 'Point project(Segment, Point)': a.cc:40:36: error: 'norm' was not decl...
s494082984
p00081
C++
#include<iostream> #include<stdio.h> #include<math.h> #include<vector> using namespace std; #define EPS (1e-10) class Point { public: double x, y; Point(double x = 0, double y = 0): x(x), y(y) {} Point operator + (Point p) {return Point(x + p.x, y + p.y);} Point operator - (Point p) {return Point...
a.cc: In function 'Point project(Segment, Point)': a.cc:42:36: error: 'norm' was not declared in this scope 42 | double r = dot(p-s.p1, base) / norm(base); | ^~~~
s545947018
p00081
C++
#include<iostream> #include<stdio.h> #include<math.h> #include<vector> using namespace std; #define EPS (1e-10) class Point { public: double x, y; Point(double x = 0, double y = 0): x(x), y(y) {} Point operator + (Point p) {return Point(x + p.x, y + p.y);} Point operator - (Point p) {return Point...
a.cc: In function 'Point project(Segment, Point)': a.cc:42:36: error: 'norm' was not declared in this scope 42 | double r = dot(p-s.p1, base) / norm(base); | ^~~~
s115914718
p00081
C++
#include<iostream> #include<stdio.h> #include<math.h> #include<vector> using namespace std; #define EPS (1e-10) class Point { public: double x, y; Point(double x = 0, double y = 0): x(x), y(y) {} Point operator + (Point p) {return Point(x + p.x, y + p.y);} Point operator - (Point p) {return Point...
a.cc: In member function 'double Point::abs()': a.cc:19:31: error: 'norm' was not declared in this scope 19 | double abs() {return sqrt(norm());} | ^~~~
s952713591
p00081
C++
#include<iostream> #include<stdio.h> #include<math.h> #include<vector> using namespace std; #define EPS (1e-10) class Point { public: double x, y; Point(double x = 0, double y = 0): x(x), y(y) {} Point operator + (Point p) {return Point(x + p.x, y + p.y);} Point operator - (Point p) {return Point...
a.cc: In function 'Point project(Segment, Point)': a.cc:43:36: error: 'norm' was not declared in this scope 43 | double r = dot(p-s.p1, base) / norm(base); | ^~~~
s340097870
p00081
C++
//http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0081 //????§£????????? //????????????????????? #include<iostream> #include<complex> using namespace std; typedef complex<double> xy_t; double x[3], y[3]; double pro(xy_t a, xy_t b) { return (conj(a)*b).real(); } int main() { xy_t p[3], a, b, c, d; ...
a.cc:29:5: error: expected unqualified-id before 'return' 29 | return 0; | ^~~~~~ a.cc:30:1: error: expected declaration before '}' token 30 | } | ^
s523910010
p00081
C++
include <iostream> #include <cstdio> #include <cmath> using namespace std; int main(void){ int n; double x1, x2, y1, y2, x3, y3, x, y, xx, yy; cin >> n; while(scanf("%lf,%lf,%lf,%lf,%lf,%lf",&x1,&y1,&x2,&y2,&x3,&y3)!=EOF){ xx = (x2-x1)/(y2-y1); yy = (y2-y1)/(x2-x1); x = x1 + (y3-...
a.cc:1:1: error: 'include' does not name a type 1 | include <iostream> | ^~~~~~~ In file included from /usr/include/c++/14/cmath:45, from a.cc:3: /usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cxx::__is_null_pointer' redeclared as different kind of entity 1...
s244269348
p00081
C++
#include<math.h> int main(void) { double x1,x2,xq,y1,y2,yq,a,b,c,xe,ye,t; while(scanf("%lf,%lf,%lf,%lf,%lf,%lf",&x1,&y1,&x2,&y2,&xq,&yq)>0) { a = y1-y2; b = x2-x1; c = x1*(y2-y1)-y1*(x2-x1); t=(a*xq+b*yq+c)/(a*a+b*b); xe = xq-a*t; ye = yq-b*t; printf("%f %f\n", 2*xe-xq, 2*ye-yq); } return 0; }
a.cc: In function 'int main()': a.cc:5:15: error: 'scanf' was not declared in this scope 5 | while(scanf("%lf,%lf,%lf,%lf,%lf,%lf",&x1,&y1,&x2,&y2,&xq,&yq)>0) | ^~~~~ a.cc:13:17: error: 'printf' was not declared in this scope 13 | printf("%f %f\n", 2*xe-xq, 2*ye-yq); ...
s279239337
p00081
C++
#include <iostream> #include <cmath> #include <stdio.h> #define INF 10000000 #include <stdio.h> using namespace std; void kaiten(double *a,double *b){ } int main(){ double x1,x2,y1,y2,px,py; char ch; cin >> x1>>ch >> y1>>ch >> x2>>ch >> y2>>ch >> px >>ch>> py double a = (y1 - y2)/(x1 - x2); double m = y1 ...
a.cc: In function 'int main()': a.cc:14:62: error: expected ';' before 'double' 14 | cin >> x1>>ch >> y1>>ch >> x2>>ch >> y2>>ch >> px >>ch>> py | ^ | ; 15 | 16 | double a ...
s742122895
p00082
Java
a.util.Scanner; import java.util.StringTokenizer; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); while (scanner.hasNext()) { StringTokenizer tokenizer = new StringTokenizer(scanner.nextLine() ); int[] num = new int[8]; for (int i = 0; i < 8; ...
Main.java:1: error: class, interface, enum, or record expected a.util.Scanner; ^ Main.java:2: error: class, interface, enum, or record expected import java.util.StringTokenizer; ^ 2 errors
s829255938
p00082
Java
import java.util.*; public class aoj0082 { static final Scanner stdin = new Scanner(System.in); static final int[] RIDE = {4, 1, 4, 1, 2, 1, 2, 1}; static final int[][] PAT = new int[8][8]; static final String[] sPAT = new String[8]; public static void main(String[] args) { int[] c = new int[8]; for(int i = 0;...
Main.java:2: error: class aoj0082 is public, should be declared in a file named aoj0082.java public class aoj0082 { ^ 1 error
s755066915
p00082
C
#include<stdio.h> int main(){ int a[8],b[8]={1,4,1,2,1,2,1,4},x[8].z,mim; while(scanf("%d %d %d %d %d %d %d %d",&a[0],&a[1],&a[2],&a[3],&a[4],&z[5],&a[6],&a[7])!=EOF){ c=8; j=0; mim=100000000; whille(c--){ for(i=0;i<8;i++) if(a[i]-b[i]>0) x[c]+=a[i]-b[i]; z=a[7]; for(i=0;i<8;i++) ...
main.c: In function 'main': main.c:3:53: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token 3 | int a[8],b[8]={1,4,1,2,1,2,1,4},x[8].z,mim; | ^ main.c:4:86: error: 'z' undeclared (first use in this function) 4 | ...
s851893652
p00082
C
#include<stdio.h> #include<stdlib.h> int main(){ int c[]={4,1,4,1,2,1,2,1}; int pos[]={0,2,6,4,7,1,5,3}; int p[8],d=0,o,i,s,m,mp; while(~scanf("%d",p+d)){ if(++d==8){ d=0; m=0; for(o=0;o<8;o++){ s=0; for(i=0;i<8;i++){ s+=min(p[i],c[(pos[o]+i)%8]); } if(s>m){ m=s; mp=pos[o];...
main.c: In function 'main': main.c:14:44: error: implicit declaration of function 'min'; did you mean 'main'? [-Wimplicit-function-declaration] 14 | s+=min(p[i],c[(pos[o]+i)%8]); | ^~~ | ...
s836957072
p00082
C
#include<stdio.h> int main(void){ int i,j; int p[8]; int c[16]; int curS,minS,minP; for(i=0;i<16;i++) if(i%2==0) c[i]=1; c[1]=2; c[3]=2; c[5]=4; c[7]=4; c[9]=2; c[11]=2; c[13]=4; c[15]=4; for( ; scanf("%d%d%d%d%d%d%d%d", &p[0], &p[1], &p[2], &p[3], &p[4], &p[5], ...
main.c:56:5: error: redefinition of 'main' 56 | int main(void){ | ^~~~ main.c:3:5: note: previous definition of 'main' with type 'int(void)' 3 | int main(void){ | ^~~~
s959593048
p00082
C++
#include <cstdio> #include <algorithm> using namespace std; const int r[] = {4, 1, 4, 1, 2, 1, 2, 1}; struct PA { int s; int num; int V; }; bool cmp(PA A, PA B) { if (A.num == B.num){ return (A.V < B.V); } return (A.num < B.num); } int main() { int c[8]; PA pa[8]; while (1){ memset(pa, 0, sizeof(pa))...
a.cc: In function 'int main()': a.cc:28:17: error: 'memset' was not declared in this scope 28 | memset(pa, 0, sizeof(pa)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <algorithm> +...
s443970256
p00082
C++
#include<iostream> #include<vector> using namespace std; int main(){ int p[8], q[8]={4,1,4,1,2,1,2,1},a=0,m=999999999; while(cin>>p[0]){ vector<pair<int,int> >vec; for(int i=1;i<8;i++) cin>>p[i]; for(int i=0;i<8;i++){ int t=0; for(int j=0;j<8;j++) ...
a.cc: In function 'int main()': a.cc:24:9: error: 'sort' was not declared in this scope; did you mean 'short'? 24 | sort(vec.begin(),vec.end()); | ^~~~ | short
s918705252
p00082
C++
#include<bits/stdc++.h> using namespace std; int main() { int f[]={4,1,4,1,2,1,2,1},p[8],r,P; while(cin>>p[0]){ for(int i=1;i<8;i++)cin>>p[i]; for(int i=0;i<8;i++){ int n=0; for(int j=0;j<8;j++)if(f[(i+j)%8]<p[j])n+=p[j]-f[(i+j)%8]; if(r>n||i==0){ ...
a.cc: In function 'int main()': a.cc:16:46: error: 'fl' was not declared in this scope; did you mean 'f'? 16 | for(int j=0;j<8&&f[(i+j)%8]<=fl[(P+j)%8];j++){ | ^~ | f
s928235103
p00082
C++
#include <stdio.h> #include <algorithm> int p[8], c[8] = { 1, 4, 1, 4, 1, 2, 1, 2 }; int main() { while(~scanf("%d%d%d%d%d%d%d%d", &p[0], &p[1], &p[2], &p[3], &p[4], &p[5], &p[6], &p[7])) { int ret = 999999999; for(int i = 0; i < 8; i++) { int res = 0; for(int j = i; j < i + 8; j++) res += max(p[j - i] - c[j...
a.cc: In function 'int main()': a.cc:9:63: error: 'max' was not declared in this scope; did you mean 'std::max'? 9 | for(int j = i; j < i + 8; j++) res += max(p[j - i] - c[j % 8], 0); | ^~~ | ...
s206116976
p00082
C++
#include<iostream> #include<vector> #include<string> #include<algorithm> #include<map> using namespace std; int mery[8] = { 4,1,4,1,2,1,2,1 }; void kaiten() { int a = mery[0]; for (int b = 0; b < 7; b++)mery[b] = mery[b + 1]; mery[7] = a; } int k() { int b = 0; for (int a : mery) { b = b * 10 + a; } return b;...
a.cc: In function 'int main()': a.cc:25:27: error: 'INT_MAX' was not declared in this scope 25 | int MIN = INT_MAX; | ^~~~~~~ a.cc:6:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 5 | #include<map> +++...
s491160127
p00082
C++
int main() { int a[] = {1,2,1,2,1,4,1,4}; int p[8],i=0; while(cin >> p[(i++)%8]) { if(i%8==0) { int ans=0, md = 1e5, dist; REP(j,8) { dist = 0; REP(k,8) dist+=(p[k]>a[(k+j)%8])?p[k]-a[(k+j)%8]:0; if(dist == md) { int s1=0, s2=0; for(i...
a.cc: In function 'int main()': a.cc:5:9: error: 'cin' was not declared in this scope 5 | while(cin >> p[(i++)%8]) | ^~~ a.cc:10:11: error: 'j' was not declared in this scope 10 | REP(j,8) | ^ a.cc:10:7: error: 'REP' was not declared in this scope 10 | REP(j,8) ...
s028571218
p00082
C++
#include<iostream> #include<cassert> using namespace std; #define N 8 static const int cap[N] = {4, 1, 4, 1, 2, 1, 2, 1}; int main(){ int Q[N]; while( cin >> Q[0] ){ for ( int i = 1; i < N; i++ ) cin >> Q[i]; int min = INT_MAX; int minv = INT_MAX; int start; for ( int s = 0; s < N; s++ ){ int sum ...
a.cc: In function 'int main()': a.cc:13:19: error: 'INT_MAX' was not declared in this scope 13 | int min = INT_MAX; | ^~~~~~~ a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 2 | #include<cassert> +++ |+#include ...
s389861030
p00082
C++
#include<iostream> #include<climit> using namespace std; #define N 8 static const int cap[N] = {4, 1, 4, 1, 2, 1, 2, 1}; int main(){ int Q[N]; while( cin >> Q[0] ){ for ( int i = 1; i < N; i++ ) cin >> Q[i]; int min = INT_MAX; int minv = INT_MAX; int start; for ( int s = 0; s < N; s++ ){ int sum =...
a.cc:2:9: fatal error: climit: No such file or directory 2 | #include<climit> | ^~~~~~~~ compilation terminated.
s809579808
p00082
C++
#include <iostream> using namespace std; int main() { int p[8]; int c[8]; int temp[8]={4,1,4,1,2,1,2,1}; int men[8]; int min_men; int ans[8]; long int v[8]; long int v_men; int idx; int answer; while(cin >> p[0] >> p[1] >> p[2] >> p[3] >> p[4] >> p[5] >> p[6] >> p[7]) { for(int i=0;i<8;...
a.cc: In function 'int main()': a.cc:99:5: error: expected primary-expression before '/' token 99 | /cout << answer << endl; | ^
s937086102
p00082
C++
#include<iostream> #include<cstdio> #include<algorithm> #include<vector> #include<string> #include<cmath> #include<map> #include<cstdlib> #include<deque> using namespace std; int Jenny[8]={4,1,4,1,2,1,2,1}; vector<int>keys; vector<int>value; void t_sort(){ for(int y=0;y<keys.size()-1;y++) for(int x=0;x<keys.size()...
a.cc: In function 'void t_sort()': a.cc:21:61: error: 'x' was not declared in this scope 21 | int t=keys[x]; keys[x]=keys[x+1]; keys[x+1]=t; | ^ a.cc:21:85: error: 't' was not declared in this scope; did you mea...
s273514931
p00082
C++
#include <iostream> #include <string> #include <algorithm> #include <cstdlib> #include <vector> using namespace std; // calc num of passengers int calc(vector<int> passengers, string s){ int remain = 0; int n; for (int i = 0; i < 8; i++) { n = passengers[i] - (s[i] - '0'); n = (n < 0) ? 0 : n; remain += n; ...
a.cc: In function 'int main()': a.cc:33:30: error: 'INT_MAX' was not declared in this scope 33 | ans_remain = INT_MAX; | ^~~~~~~ a.cc:6:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 5 | #include <vec...
s396083468
p00082
C++
#include <iostream> using namespace std; int ArrayToInt(const int* arry, int ofs){ int result; result = arry[ofs]*10000000 + arry[ofs+1]*1000000 + arry[ofs+2]*100000 + arry[ofs+3]*10000 + arry[ofs+4]*1000 + arry[ofs+5]*100 + arry[ofs+6]*10 + arry[ofs+7]; return result; } //0082 int main(){ c...
a.cc: In function 'int main()': a.cc:29:34: error: 'INT_MAX' was not declared in this scope 29 | int min_remain = INT_MAX; | ^~~~~~~ a.cc:2:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 1 | #incl...
s292300790
p00082
C++
2 3 1 4 0 1 0 1 4 2 3 2 2 2 1 1
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 2 3 1 4 0 1 0 1 | ^
s401030343
p00082
C++
g#include <iostream> #include <algorithm> #include <vector> #include <string> #include <sstream> using namespace std; int p[8]; int m[] = {4, 1, 4, 1, 2, 1, 2, 1, 4, 1, 4, 1, 2, 1, 2, 1}; int to_i(string s) { istringstream is(s); int n; is >> n; return n; } int hash(int index) { string s; for (i...
a.cc:1:2: error: stray '#' in program 1 | g#include <iostream> | ^ a.cc:1:1: error: 'g' does not name a type 1 | g#include <iostream> | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/algorithm:60, from a.cc:2: /usr/incl...
s683493720
p00083
Java
import java.util.*; public class AOJ0083{ static long getHash(int y,int m,int o){ return (long)(y*10000+m*100+o); } public static void main(String[] args){ int Y,M,O; Scanner in = new Scanner(System.in); long premeiji = getHash(1868,9,7); long meiji_u = getHash(1868,9,8),meiji_b = getHash(1912,7,2...
Main.java:3: error: class AOJ0083 is public, should be declared in a file named AOJ0083.java public class AOJ0083{ ^ 1 error
s566774981
p00083
C
#include<stdio.h> #include<string.h> ?? int y[9], m[9], d[9], i; char s[9][20]; ?? int main(){ ?? ?? strcat(s[0],"pre-meiji"); ?? ?? y[1] = 1868; m[1] = 9; d[1] = 8; strcat(s[1], "meiji"); ?? ?? y[2] = 1912; m[2] = 7; d[2] = 30; strcat(s[2], "taisho"); ?? ?? y[3] = 1926; m[3] = 12; d[3] = 25; strcat(s[3], "showa"); ...
main.c:3:1: error: expected identifier or '(' before '?' token 3 | ?? | ^ main.c:6:1: error: expected identifier or '(' before '?' token 6 | ?? | ^
s073568272
p00083
C
#include<stdio.h> #include<string.h> ?? int y[9], m[9], d[9], i; char s[9][20]; ?? int main(){ ?? ?? strcat(s[0],"pre-meiji"); ?? ?? y[1] = 1868; m[1] = 9; d[1] = 8; strcat(s[1], "meiji"); ?? ?? y[2] = 1912; m[2] = 7; d[2] = 30; strcat(s[2], "taisho"); ?? ?? y[3] = 1926; m[3] = 12; d[3] = 25; strcat(s[3], "showa"); ...
main.c:3:1: error: expected identifier or '(' before '?' token 3 | ?? | ^ main.c:6:1: error: expected identifier or '(' before '?' token 6 | ?? | ^
s354425133
p00083
C++
#include<stdio.h> void era_transformation(int year, int month, int day); int main(void) { int year, month, day; while(scanf("%d %d %d", &year, &month, &day) != EOF) { era_transformation(year, month, day); } return 0; } void era_transformation(int year, int month, int day) { int date_number = year * 10000...
a.cc:22:14: error: empty character constant 22 | printf(''&#157;pre_meiji''); | ^~ a.cc:22:17: error: stray '#' in program 22 | printf(''&#157;pre_meiji''); | ^ a.cc:22:31: error: empty character constant 22 | printf(''&#157;pre_meiji''); | ...
s777646471
p00083
C++
#include<stdio.h> void era_transformation(int year, int month, int day); int main(void) { int year, month, day; while(scanf("%d %d %d", &year, &month, &day) != EOF) { era_transformation(year, month, day); } return 0; } void era_transformation(int year, int month, int day) { int date_number = year * 10000...
a.cc:22:14: error: extended character ” is not valid in an identifier 22 | printf(”pre_meiji”); | ^ a.cc:22:14: error: extended character ” is not valid in an identifier a.cc:25:14: error: extended character ” is not valid in an identifier 25 | printf(”meiji”); | ...
s424992018
p00083
C++
#include<stdio.h> void era_transform(int year, int month, int day); int main(void) { int year, month, day; while(scanf("%d %d %d", &year, &month, &day) != EOF) { era_transform(year, month, day); } return 0; } void era_transform(int year, int month, int day) { int date_number = year * 10000 + month * 100 + day;...
a.cc:30:1: error: extended character   is not valid in an identifier 30 |    printf("heisei %d %d %d\n", year - 1988, month, day); | ^ a.cc:30:1: error: extended character   is not valid in an identifier a.cc:30:1: error: extended character   is not valid in an identifier a.cc: In function 'void era_transform(...