submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s694393474
p00034
C
#include <stdio.h> int main() { double L[10]; double V1, V2; double meet_pos; double railway_lenth; int cnt1, cnt2; int output[50]; cnt2 = 0; while(1) { if(scanf("%lf,", &L[0]) == EOF) { break; } for(cnt1 = 1; cnt1 < 10; cnt1++) { scanf("%lf,", &L[cnt1]...
main.c: In function 'main': main.c:45:45: error: expected ';' before '}' token 45 | printf("%d\n", output[cnt1]) | ^ | ; 46 | } | ~
s337405875
p00034
C
#include <stdio.h> main(){ int n[10],a,b,i,nsum,m; while(scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",&n[0],&n[1],&n[2],&n[3],&n[4],&n[5],&n[6],&n[7],&n[8],&n[9],&a,&b) !=EOF){ double t=0,x; nsum=0; for(i=0;i<10;i++){#include <stdio.h> main(){ int n[10],a,b,i,nsum,m; while(scanf("%d,%d,%d,%d,%d,%d,%d,...
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int] 2 | main(){ | ^~~~ main.c: In function 'main': main.c:7:22: error: stray '#' in program 7 | for(i=0;i<10;i++){#include <stdio.h> | ^ main.c:7:23: error: 'include' undeclared (first use in this function) 7 |...
s718176490
p00034
C
#include <stdio.h> main(){ int n[10],a,b,i,nsum,m; while(scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",&n[0],&n[1],&n[2],&n[3],&n[4],&n[5],&n[6],&n[7],&n[8],&n[9],&a,&b) !=EOF){ double t=0,x; nsum=0; for(i=0;i<10;i++){ nsum+=n[i]; } t=nsum/(double)(a+b); x=t*(double)a; m=0; for(i=0;i<10...
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int] 2 | main(){ | ^~~~ main.c:27:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '+=' token 27 | nsum+=n[i]; | ^~ main.c:28:4: error: expected identifier or '(' before '}' token 28 | } | ^ ma...
s078210618
p00034
C
#include<stdio.h> int main() { int v1,v2; int dist[10]; int dist0to10; int i,station; double intersect,tmp; while(scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,% d",dist,dist+1,dist+2,dist+3,dist+4,dist+5,dist+6,dist+7,dist+8,dist+9,&v1,&v2)!=EOF) { dist0to10=0; tmp=0; for(i=0;i<10;i++) { dist0to10+=dist...
main.c: In function 'main': main.c:11:21: warning: missing terminating " character 11 | while(scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,% | ^ main.c:11:21: error: missing terminating " character 11 | while(scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,% | ...
s065010890
p00034
C
#include<stdio.h> int main() { int v1,v2; int dist[10]; int dist0to10; int i,station; double intersect,tmp; while(scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,% d",dist,dist+1,dist+2,dist+3,dist+4,dist+5,dist+6,dist+7,dist+8,dist+9,&v1,&v2)!=EOF) { dist0to10=0; tmp=0; for(i=0;i<10;i++) { dist0to10+=dist...
main.c: In function 'main': main.c:11:21: warning: missing terminating " character 11 | while(scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,% | ^ main.c:11:21: error: missing terminating " character 11 | while(scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,% | ...
s056566221
p00034
C++
#include <iostream> #include <string> using namespace std; int main() { int l[10] , v1 , v2 , n , cnt; double d , t; char ch; while((cin>>l[0]>>ch>>l[1]>>ch>>l[2]>>ch>>l[3]>>ch>>l[4]>>ch>>l[5]>>ch>>l[6]>>ch>>l[7]>>ch>>l[8]>>ch>>l[9]>>ch>>v1>>ch>>v2) !=EOF)){ n=0; for(int i=0;i<10;i++){ ...
a.cc: In function 'int main()': a.cc:10:129: error: no match for 'operator!=' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int') 10 | while((cin>>l[0]>>ch>>l[1]>>ch>>l[2]>>ch>>l[3]>>ch>>l[4]>>ch>>l[5]>>ch>>l[6]>>ch>>l[7]>>ch>>l[8]>>ch>>l[9]>>ch>>v1>>ch>>v2) ...
s571094014
p00034
C++
#include <iostream> #include <string> using namespace std; int main() { int l[10] , v1 , v2 , n , cnt; double d , t; char ch; while(cin>>l[0]>>ch>>l[1]>>ch>>l[2]>>ch>>l[3]>>ch>>l[4]>>ch>>l[5]>>ch>>l[6]>>ch>>l[7]>>ch>>l[8]>>ch>>l[9]>>ch>>v1>>ch>>v2 !=EOF){ n=0; for(int i=0;i<10;i++){ ...
a.cc: In function 'int main()': a.cc:10:127: error: no match for 'operator!=' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int') 10 | while(cin>>l[0]>>ch>>l[1]>>ch>>l[2]>>ch>>l[3]>>ch>>l[4]>>ch>>l[5]>>ch>>l[6]>>ch>>l[7]>>ch>>l[8]>>ch>>l[9]>>ch>>v1>>ch>>v2 !=...
s271114989
p00034
C++
#include <iostream> #include <string> using namespace std; int main() { int l[10] , v1 , v2 , n , cnt; double d , t; char ch; while((cin>>l[0]>>ch>>l[1]>>ch>>l[2]>>ch>>l[3]>>ch>>l[4]>>ch>>l[5]>>ch>>l[6]>>ch>>l[7]>>ch>>l[8]>>ch>>l[9]>>ch>>v1>>ch>>v2) !=EOF){ n=0; for(int i=0;i<10;i++){ ...
a.cc: In function 'int main()': a.cc:10:129: error: no match for 'operator!=' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int') 10 | while((cin>>l[0]>>ch>>l[1]>>ch>>l[2]>>ch>>l[3]>>ch>>l[4]>>ch>>l[5]>>ch>>l[6]>>ch>>l[7]>>ch>>l[8]>>ch>>l[9]>>ch>>v1>>ch>>v2) ...
s311082425
p00034
C++
#include <iostream> #include <string> using namespace std; int main() { int l[10] , v1 , v2 , n , cnt; double d , t; char ch; while(cin(>>l[0]>>ch>>l[1]>>ch>>l[2]>>ch>>l[3]>>ch>>l[4]>>ch>>l[5]>>ch>>l[6]>>ch>>l[7]>>ch>>l[8]>>ch>>l[9]>>ch>>v1>>ch>>v2) !=EOF){ n=0; for(int i=0;i<10;i++){ ...
a.cc: In function 'int main()': a.cc:10:15: error: expected primary-expression before '>>' token 10 | while(cin(>>l[0]>>ch>>l[1]>>ch>>l[2]>>ch>>l[3]>>ch>>l[4]>>ch>>l[5]>>ch>>l[6]>>ch>>l[7]>>ch>>l[8]>>ch>>l[9]>>ch>>v1>>ch>>v2) !=EOF){ | ^~
s410625229
p00034
C++
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; class Main{ public static void main(String[] args)throws IOException{ BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); String str; while((str = reader.readLine()) != null){ String[] co...
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.BufferedReader; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.io.IOException; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fm...
s054010589
p00034
C++
$<.map{|i|*a,b,c=i.split(?,).map(&:to_f);s=0;p a.index{|j|(s+=j)>=a.reduce(:+)*b/(b+c)}+1}
a.cc:1:1: error: '$' does not name a type 1 | $<.map{|i|*a,b,c=i.split(?,).map(&:to_f);s=0;p a.index{|j|(s+=j)>=a.reduce(:+)*b/(b+c)}+1} | ^
s441967848
p00034
C++
#include <cstdio> using namespace std; #define SIZE 10 #define scanf scanf_s int main() { int l[SIZE] = { 0 }, v1, v2; double s; char t; while (scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",&l[0],&l[1],&l[2],&l[3],&l[4],&l[5],&l[6],&l[7],&l[8],&l[9],&v1,&v2) != EOF) { s = 0; for (int i = 0; i < SIZE; i++) { ...
a.cc: In function 'int main()': a.cc:5:15: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 5 | #define scanf scanf_s | ^~~~~~~ a.cc:11:16: note: in expansion of macro 'scanf' 11 | while (scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",&l[0],&l[1],&l[2],&l[3],&l[4],&...
s928005760
p00034
C++
#include <iostream> #include <numeric> int main() { int lengthes[10]; char tmp; while (std::cin >> lengthes[0] >> tmp >> lengthes[1] >> tmp >> lengthes[2] >> tmp >> lengthes[3] >> tmp >> lengthes[4] >> tmp >> lengthes[5] >> tmp >> lengthes[6] >> tmp >> lengthes[7] >> tmp >> lengthes[8] >> tmp >> lengthes[9] >> tmp ...
In file included from /usr/include/c++/14/numeric:62, from a.cc:2: /usr/include/c++/14/bits/stl_numeric.h: In instantiation of '_Tp std::accumulate(_InputIterator, _InputIterator, _Tp) [with _InputIterator = int; _Tp = int]': a.cc:13:28: required from here 13 | int sum = std::accum...
s462037150
p00034
C++
#include<iostream> #include<stdio.h> #include<vector> int main(){ int dis[10];int speed[2];vector<int> answers; while(scanf("%d,%d,%d,%d,%d,%d.%d,%d,%d,%d,%d,%d",&dis[0],&dis[1],&dis[2],&dis[3],&dis[4],&dis[5],&dis[6],&dis[7],&dis[8],&dis[9],&speed[0],&speed[1])!=EOF){ int all=0; for(int i=0;i<10;i++){ ...
a.cc: In function 'int main()': a.cc:5:28: error: 'vector' was not declared in this scope 5 | int dis[10];int speed[2];vector<int> answers; | ^~~~~~ a.cc:5:28: note: suggested alternatives: In file included from /usr/include/c++/14/vector:66, from a.cc:3: /usr/inc...
s092851105
p00034
C++
#include <cstdio> int main(){ int l[11],v1,v2;for(;~scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",&l[0],&l[1],&l[2],&l[3],&l[4],&l[5],&l[6],&l[7],&l[8],&l[9],&v1,&v2);printf("%d\n",i+1))for(int i=0;i<10;i++){l[i]+=l[i-1];if(l[i]>=l[9]*(v1/((double)v1+v2)))break;}}}
a.cc: In function 'int main()': a.cc:3:150: error: 'i' was not declared in this scope 3 | int l[11],v1,v2;for(;~scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",&l[0],&l[1],&l[2],&l[3],&l[4],&l[5],&l[6],&l[7],&l[8],&l[9],&v1,&v2);printf("%d\n",i+1))for(int i=0;i<10;i++){l[i]+=l[i-1];if(l[i]>=l[9]*(v1/((double)v1+v2)))br...
s994702804
p00034
C++
#include <cstdio> using namespace std; int main(){ int l[12], v1, v2; double sum,sum2; while( scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d", &l[1],&l[2],&l[3],&l[4],&l[5],&l[6],&l[7],&l[8],&l[9],&l[10],&v1,&v2) != EOF ){ sum = 0; for(int i=1 ; i<=10 ; i++){ sum += l[i]; } sum2 = ((double)sum)/(do...
a.cc: In function 'int main()': a.cc:18:32: error: 'k' was not declared in this scope 18 | sum += k[i]; | ^
s421223733
p00034
C++
#include<iostream> using namespace std; int main(){ int km[10],v1,v2; char a; &#160; &#160; double leng; while(1){ &#160; for(int i = 0; i < 10; i++) &#160; &#160; &#160; &#160; { &#160; &#160; &#160; &#160; &#160; &#160; cin >> km[i] >> a; &#160; &#160; &#160; &#160; } &#160; &#160; &#160; &#160; if(!cin) &#160...
a.cc:6:2: error: stray '#' in program 6 | &#160; &#160; double leng; | ^ a.cc:6:9: error: stray '#' in program 6 | &#160; &#160; double leng; | ^ a.cc:8:11: error: stray '#' in program 8 | &#160; for(int i = 0; i < 10; i++) | ^ a.cc:9:2: error: stray '#' in prog...
s166841740
p00034
C++
cout << " v1 " << v1 << endl;
a.cc:1:5: error: 'cout' does not name a type 1 | cout << " v1 " << v1 << endl; | ^~~~
s378638082
p00034
C++
#include <stdio.h> int main(){ double v1,v2,t,x; int a[10],i; while(scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%lf,%lf",&a[0],&a[1],&a[2],&a[3],&a[4],&a[5],&a[6],&a[7],&a[8],&a[9],&v1,&v2)!=EOF){ x=0; for(i=0,i<10;i++){ x+=a[i]; } t=(v1)/(v1+v2); x=x*t; for(i=0;x>0;i++){ x-=a[i]; } printf("%d\n",i+1); } return 0; }
a.cc: In function 'int main()': a.cc:8:17: error: expected ';' before ')' token 8 | for(i=0,i<10;i++){ | ^ | ;
s434614745
p00034
C++
#include<iostream> #include<vector> int main(){ int first; while(std::cin>>first){ std::vector<int> distance(10); distance[0]=first; int sum=0; char dummy; sum+=first; for(int i=1;i<10;++i){ std::cin>>dummy; int s; std::cin>>s; sum+=s; a+=s; distance[i]=a; } double v1,v2; std::cin...
a.cc: In function 'int main()': a.cc:17:25: error: 'a' was not declared in this scope 17 | a+=s; | ^
s057892451
p00035
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); while(sc.hasNext()){ String[] s = sc.nextLine().split(","); double[] a = new double[8]; for(int i=0;i < 8;i++) a[i] = Double.parseDouble(s[i]); ...
Main.java:17: error: unnamed classes are a preview feature and are disabled by default. private static double isCross(double p1_x,double p1_y,double p2_x,double p2_y,double p3_x,double p3_y,double p4_x,double p4_y){ ^ (use --enable-preview to enable unnamed classes) Main.java:24: error: class...
s164878664
p00035
Java
import java.io.*; class Main{ public static void main(String[] args){ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); String line; while((line=br.readLine())!=null){ String[] value=line.split(","); xa=Integer.parseInt(value[0]); ya=Integer.parseInt(value[1]); xb=Integer.parseInt(value[2]); yb=I...
Main.java:9: error: cannot find symbol xa=Integer.parseInt(value[0]); ^ symbol: variable xa location: class Main Main.java:10: error: cannot find symbol ya=Integer.parseInt(value[1]); ^ symbol: variable ya location: class Main Main.java:11: error: cannot find symbol xb=Integer.parseInt(value[2]); ^ symbol...
s261492456
p00035
Java
import java.io.*; class Main{ public static void main(String[] args){ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); String line; while((line=br.readLine())!=null){ String[] value=line.split(","); double xa=Double.parseDouble(value[0]); double ya=Double.parseDouble(value[1]); double xb=Double....
Main.java:7: error: unreported exception IOException; must be caught or declared to be thrown while((line=br.readLine())!=null){ ^ 1 error
s485463068
p00035
Java
import java.util.*; public class Main{ private static final Scanner scan = new Scanner(System.in) .useDelimiter("[,\\s]+"); public static void main(String[] args){ while(scan.hasNext()){ double[] x = new double[4]; double[] y = new double[4]; for(int i = 0; i < 4; i++){ x[i] = scan.nextDo...
Main.java:26: error: non-static method cross(double,double,double,double) cannot be referenced from a static context dirs[i] = cross(x[j]-x[i], y[j]-y[i], x[k]-x[i], y[k]-y[i]); ^ 1 error
s597359707
p00035
Java
import java.util.*; public class A{ private static final Scanner scan = new Scanner(System.in) .useDelimiter("[,\\s]+"); static boolean dirs[] = new boolean[4]; public static void main(String[] args){ while(scan.hasNext()){ double[] x = new double[4]; double[] y = new double[4]; for(int i = ...
Main.java:3: error: class A is public, should be declared in a file named A.java public class A{ ^ Main.java:26: error: non-static method cross(double,double,double,double) cannot be referenced from a static context dirs[i] = cross(x[j]-x[i], y[j]-y[i], x[k]-x[i], y[k]-y[i]); ^ 2 errors
s460737670
p00035
Java
import java.util.*; public class Main{ private static final Scanner scan = new Scanner(System.in) .useDelimiter("[,\\s]+"); static boolean dirs[] = new boolean[4]; public static void main(String[] args){ while(scan.hasNext()){ double[] x = new double[4]; double[] y = new double[4]; for(int i...
Main.java:35: error: missing return statement } ^ 1 error
s332010137
p00035
Java
import java.util.*; public class Main{ private static final Scanner scan = new Scanner(System.in) .useDelimiter("[,\\s]+"); public static void main(String[] args){ while(scan.hasNext()){ double[] x = new double[4]; double[] y = new double[4]; for(int i = 0; i < 4; i++){ x[i] = scan.nextDoub...
Main.java:27: error: ';' expected double td = (x1-x2)*(y4-y1)+(y1-y2)*(x1-x4) ^ 1 error
s590385388
p00035
Java
import java.io.*;class Main{ public static void main(String[]_)throws Exception{ int i,j; boolean f; float l[]=new float[8]; BufferedReader B=new BufferedReader(new InputStreamReader(System.in)); for(String s;(s=B.readLine())!=null;System.out.println(f?"NO":"YES")){ _=s.split(","); f=false; for(j=0;j<2;j++){ for(i=0;i<...
Main.java:2: error: as of release 9, '_' is a keyword, and may not be used as an identifier public static void main(String[]_)throws Exception{ ^ Main.java:8: error: as of release 9, '_' is a keyword, and may not be used as an identifier _=s.split(","); ^ Main.java:11: error: as of relea...
s780894286
p00035
Java
import java.io.*;class Main{ public static void main(String _[])throws Exception{ int i,j; boolean f; float l[]=new float[8]; BufferedReader B=new BufferedReader(new InputStreamReader(System.in)); for(String s;(s=B.readLine())!=null;System.out.println(f?"NO":"YES")){ _=s.split(","); f=false; for(j=0;j<2;j++){ for(i=0;i...
Main.java:2: error: as of release 9, '_' is a keyword, and may not be used as an identifier public static void main(String _[])throws Exception{ ^ Main.java:8: error: as of release 9, '_' is a keyword, and may not be used as an identifier _=s.split(","); ^ Main.java:11: error: as of relea...
s443591260
p00035
Java
import java.io.*;class Main{public static void main(String[]_)throws Exception{int i,j,k;float l[]=new float[8];BufferedReader B=new BufferedReader(new InputStreamReader(System.in));for(String s;s=B.readLine())!=null;System.out.println(k>0?"NO":"YES")){_=s.split(",");for(k=j=0;j<2;j++){for(i=0;i<8;i++)l[i]=Float.valueO...
Main.java:1: error: as of release 9, '_' is a keyword, and may not be used as an identifier import java.io.*;class Main{public static void main(String[]_)throws Exception{int i,j,k;float l[]=new float[8];BufferedReader B=new BufferedReader(new InputStreamReader(System.in));for(String s;s=B.readLine())!=null;System.out....
s751785525
p00035
Java
import java.util.Scanner; public class A0035 { public static double[] equation(double a,double b,double c,double d,double e,double f){ double det = a*e-b*d; double[] ans = new double[2]; double x = (c*e-b*f)/det; double y = (a*f-c*d)/det; if(x==-0) x = 0; if(y==-0) y = 0; ans[0] = x; ans[1] = ...
Main.java:3: error: class A0035 is public, should be declared in a file named A0035.java public class A0035 { ^ 1 error
s096016743
p00035
Java
import java.util.Scanner; public class Main { // ヘロンの公式(3つの辺から求めるver) public static double getArea (double a, double b, double c) { double s = (a + b + c) / 2; return Math.sqrt(s * (s - a) * (s - b) * (s - c)); } // 2点間の距離 public static double getDistance (double x1, double y1, double x2, double y2) { ret...
Main.java:3: error: illegal character: '\u3000' public class?Main { ^ 1 error
s650601133
p00035
C
#include <stdio.h> #include <string.h> #include <stdlib.h> using namespace std; int main () { double xa, ya, xb, yb, xc, yc, xd, yd, xe, ye; double tac, tbd, sac, sbd; char c[10000]; int i; while(scanf("%s",&c)!=EOF) { xa=atof(strtok ( c, "," )); ya = atof ( strtok ( NULL, "," ) ); xb = atof ( strtok ( NU...
main.c:5:1: error: unknown type name 'using' 5 | using namespace std; | ^~~~~ main.c:5:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std' 5 | using namespace std; | ^~~
s287684538
p00035
C
#include <stdio.h> double gaiseki(double x0,double y0,double x1,double y1,double x2,double y2){ return(x0-x1)*(y2-y0)-(y0-y1)*(x2-x0) } int main(){ double x0,y0,x1,y1,x2,y2,x3,y3; while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&x0,&y0,&x1,&y1,&x2,&y2,&x3,&y3)!=EOF){ printf("%f\n",gaiseki(x0,y0,x1,y1,x3,y3));...
main.c: In function 'gaiseki': main.c:4:40: error: expected ';' before '}' token 4 | return(x0-x1)*(y2-y0)-(y0-y1)*(x2-x0) | ^ | ; 5 | } | ~ main.c: In function 'main': main.c...
s002388311
p00035
C
#include <stdio.h> double gaiseki(double x0,double y0,double x1,double y1,double x2,double y2){ return(x0-x1)*(y2-y0)-(y0-y1)*(x2-x0) } int main(){ double x0,y0,x1,y1,x2,y2,x3,y3; while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&x0,&y0,&x1,&y1,&x2,&y2,&x3,&y3)!=EOF){ printf("%f\n",gaiseki(x0,y0,x1,y1,x3,y3));...
main.c: In function 'gaiseki': main.c:4:40: error: expected ';' before '}' token 4 | return(x0-x1)*(y2-y0)-(y0-y1)*(x2-x0) | ^ | ; 5 | } | ~
s179236136
p00035
C
#include <stdio.h> ?? double gaiseki(double x0,double y0,double x1,double y1,double x2,double y2){ ????return(x0-x1)*(y0-y1)-(x0-x2)*(y0-y2); } int main(){ ????double x0,y0,x1,y1,x2,y2,x3,y3; ????while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&x0,&y0,&x1,&y1,&x2,&y2,&x3,&y3)!=EOF){ ????????if (gaiseki(x0,y0,x1,y1,x3,y3...
main.c:2:1: error: expected identifier or '(' before '?' token 2 | ?? | ^ main.c: In function 'main': main.c:7:1: error: expected expression before '?' token 7 | ????double x0,y0,x1,y1,x2,y2,x3,y3; | ^ main.c:8:1: error: expected expression before '?' token 8 | ????while (scanf("%lf,%lf,%lf,%lf,...
s343021667
p00035
C
double gaiseki(double x0,double y0,double x1,double y1,double x2,double y2){ return(x1-x0)*(y2-y0)-(x2-x0)*(y1-y0); } int main(){ double x0,y0,x1,y1,x2,y2,x3,y3; while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&x0,&y0,&x1,&y1,&x2,&y2,&x3,&y3)!=EOF){ if((x1-x0)*(y3-y0)-(x3-x0)*(y1-y0)>0){ if((x1-x0)*(y3-y...
main.c: In function 'main': main.c:6:10: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 6 | while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&x0,&y0,&x1,&y1,&x2,&y2,&x3,&y3)!=EOF){ | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +...
s754253005
p00035
C
double gaiseki(double x0,double y0,double x1,double y1,double x2,double y2){ return(x1-x0)*(y2-y0)-(x2-x0)*(y1-y0); } int main(){ double x0,y0,x1,y1,x2,y2,x3,y3; while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&x0,&y0,&x1,&y1,&x2,&y2,&x3,&y3)!=EOF){ if((x1-x0)*(y3-y0)-(x3-x0)*(y1-y0)>0){ if((x1-x0)*(y3-y...
main.c: In function 'main': main.c:6:10: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 6 | while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&x0,&y0,&x1,&y1,&x2,&y2,&x3,&y3)!=EOF){ | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +...
s138696422
p00035
C
#include<math.h> int main(){ double xa,ya,xb,yb,xc,yc,xd,yd; while(0<=scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&xa,&ya,&xb,&yb,&xc,&yb,&xd,&yd)){ if(xc==xa){ if((xd-xc)*(xa-xc)>0){ printf("NO\n"); continue; }else{ printf("YES\n"); continue; } if(xb==xd){ if((xa-xb)*(xc-xb)>0){ printf("N...
main.c: In function 'main': main.c:6:18: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 6 | while(0<=scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&xa,&ya,&xb,&yb,&xc,&yb,&xd,&yd)){ | ^~~~~ main.c:2:1: note: include '<stdio.h>' or provide a declaration of ...
s859412279
p00035
C
#define P(b,c)(x[b]*x[1+c]-x[1+b]*x[c]) float x[9],s,t;main(i){for(;~scanf("%f,",&s);i-9||memset(x,0,36,puts((s=P(3,5))*(t=P(5,7))>0&&P(1,3)*s>0&t*P(7,1)>0?"YES":"NO",i=1)))x[i]+=s,x[++i%8+1]-=s;}
main.c:2:16: error: return type defaults to 'int' [-Wimplicit-int] 2 | float x[9],s,t;main(i){for(;~scanf("%f,",&s);i-9||memset(x,0,36,puts((s=P(3,5))*(t=P(5,7))>0&&P(1,3)*s>0&t*P(7,1)>0?"YES":"NO",i=1)))x[i]+=s,x[++i%8+1]-=s;} | ^~~~ main.c: In function 'main': main.c:2:16: error: type of 'i' ...
s840864784
p00035
C
#include<stdio.h> #include<math.h> #include<string.h> /* 三辺a,b,c s=(a+b+c)/2 S={s(s-a)(s-b)(s-c)}^(1/2) */ double check(double a,double b,double c){ double s,S; s=(a+b+c)/2; S=sqrt(s*(s-a)*(s-b)*(s-c)); return S; } int main(void){ double x[4],y[4],s,t,a,b,c,s1,s2; int i,l,f,c1[20],c2[20]; while(1){ ...
main.c: In function 'main': main.c:29:30: error: assignment to 'int' from 'void *' makes integer from pointer without a cast [-Wint-conversion] 29 | c1[i]=NULL; | ^ main.c:30:30: error: assignment to 'int' from 'void *' makes integer from pointer without a c...
s484440004
p00035
C
#include<stdio.h> #include<stdlib.h> #include<math.h> #include<string.h> /* 三辺a,b,c s=(a+b+c)/2 S={s(s-a)(s-b)(s-c)}^(1/2) */ double check(double a,double b,double c){ double s,S; s=(a+b+c)/2; S=sqrt(s*(s-a)*(s-b)*(s-c)); return S; } int main(void){ double x[4],y[4],s,t,a,b,c,s1,s2; int i,l,f; char c1...
main.c: In function 'main': main.c:31:30: error: assignment to 'char' from 'void *' makes integer from pointer without a cast [-Wint-conversion] 31 | c1[i]=NULL; | ^ main.c:32:30: error: assignment to 'char' from 'void *' makes integer from pointer without a...
s224561848
p00035
C
#include<stdio.h> #include<stdlib.h> #include<math.h> #include<string.h> /* 三辺a,b,c s=(a+b+c)/2 S={s(s-a)(s-b)(s-c)}^(1/2) */ double check(double a,double b,double c){ double s,S; s=(a+b+c)/2; S=sqrt(s*(s-a)*(s-b)*(s-c)); return S; } int main(void){ double x[4],y[4],s,t,a,b,c,s1,s2; int i,l,f; char c1...
main.c: In function 'main': main.c:31:30: error: assignment to 'char' from 'void *' makes integer from pointer without a cast [-Wint-conversion] 31 | c1[i]=NULL; | ^ main.c:32:30: error: assignment to 'char' from 'void *' makes integer from pointer without a...
s868655619
p00035
C
#include<stdio.h> #include<stdlib.h> #include<math.h> #include<string.h> /* 三辺a,b,c s=(a+b+c)/2 S={s(s-a)(s-b)(s-c)}^(1/2) */ double check(double a,double b,double c){ double s,S; s=(a+b+c)/2; S=sqrt(s*(s-a)*(s-b)*(s-c)); return S; } int main(void){ double x[4],y[4],s,t,a,b,c,s1,s2; int i,l,f; char c1...
main.c: In function 'main': main.c:31:30: error: assignment to 'char' from 'void *' makes integer from pointer without a cast [-Wint-conversion] 31 | c1[i]=NULL; | ^ main.c:32:30: error: assignment to 'char' from 'void *' makes integer from pointer without a...
s219536145
p00035
C
#include<stdio.h> #include<stdlib.h> #include<math.h> #include<string.h> /* 三辺a,b,c s=(a+b+c)/2 S={s(s-a)(s-b)(s-c)}^(1/2) */ double check(double a,double b,double c){ double s,S; s=(a+b+c)/2; S=sqrt(s*(s-a)*(s-b)*(s-c)); return S; } int main(void){ double x[4],y[4],s,t,a,b,c,s1,s2; int i,l,f; char c1...
main.c: In function 'main': main.c:31:31: warning: multi-character character constant [-Wmultichar] 31 | c1[i]='NULL'; | ^~~~~~ main.c:31:31: warning: overflow in conversion from 'int' to 'char' changes value from '1314212940' to '76' [-Woverflow] main.c:32...
s567939504
p00035
C++
#include <iostream> #include <string> #include <cstdio> using namespace std; int main () { double xa, ya, xb, yb, xc, yc, xd, yd, xe, ye; double tac, tbd, sac, sbd; char c[10000]; int i; while(scanf("%s",&c)!=EOF) { xa=atof(strtok ( c, "," )); ya = atof ( strtok ( NULL, "," ) ); xb = atof ( strtok ( NULL...
a.cc: In function 'int main()': a.cc:14:25: error: 'strtok' was not declared in this scope; did you mean 'strtoq'? 14 | xa=atof(strtok ( c, "," )); | ^~~~~~ | strtoq
s156289683
p00035
C++
&#65279;&#65279;&#65279;&#65279;#include<bits/stdc++.h> using namespace std; const double EPS = 1e-8; const double INF = 1e12; typedef complex<double> P; namespace std { bool operator < (const P& a, const P& b) { return real(a) != real(b) ? real(a) < real(b) : imag(a) < imag(b); } } double cross(cons...
a.cc:1:2: error: stray '#' in program 1 | &#65279;&#65279;&#65279;&#65279;#include<bits/stdc++.h> | ^ a.cc:1:10: error: stray '#' in program 1 | &#65279;&#65279;&#65279;&#65279;#include<bits/stdc++.h> | ^ a.cc:1:18: error: stray '#' in program 1 | &#65279;&#65279;&#65279;&#65279;#inclu...
s327168867
p00035
C++
&#65279;&#65279;&#65279;&#65279;#include<bits/stdc++.h> using namespace std; const double EPS = 1e-8; const double INF = 1e12; typedef complex<double> P; namespace std { bool operator < (const P& a, const P& b) { return real(a) != real(b) ? real(a) < real(b) : imag(a) < imag(b); } } double cross(cons...
a.cc:1:2: error: stray '#' in program 1 | &#65279;&#65279;&#65279;&#65279;#include<bits/stdc++.h> | ^ a.cc:1:10: error: stray '#' in program 1 | &#65279;&#65279;&#65279;&#65279;#include<bits/stdc++.h> | ^ a.cc:1:18: error: stray '#' in program 1 | &#65279;&#65279;&#65279;&#65279;#inclu...
s585636240
p00035
C++
using namespace std; typedef long long int ll; typedef pair<int, int> pii; typedef vector<int> vi; typedef vector<pair<int, int> > vii; #define rrep(i, m, n) for(int (i)=(m); (i)<(n); (i)++) #define erep(i, m, n) for(int (i)=(m); (i)<=(n); (i)++) #define rep(i, n) for(int (i)=0; (i)<(n); (i)++) #define rrev(i, m...
a.cc:4:9: error: 'pair' does not name a type 4 | typedef pair<int, int> pii; | ^~~~ a.cc:5:9: error: 'vector' does not name a type 5 | typedef vector<int> vi; | ^~~~~~ a.cc:6:9: error: 'vector' does not name a type 6 | typedef vector<pair<int, int> > vii; | ^~~~~~ a...
s755242667
p00035
C++
type point = Pt of float * float let sub_vector (Pt (x1, y1)) (Pt (x2, y2)) = Pt (x2 -. x1, y2 -. y1) let cross_sign v1 v2 v3 = let Pt (xv, yv), Pt (xu, yu) = (sub_vector v1 v2), (sub_vector v2 v3) in compare 0. (xv *. yu -. yv *. xu) let rec loop () = try let line = read_line () in Scanf.sscanf ...
a.cc:21:23: error: stray '@' in program 21 | print_endline @@ if is_convex then "YES" else "NO" | ^ a.cc:21:24: error: stray '@' in program 21 | print_endline @@ if is_convex then "YES" else "NO" | ^ a.cc:1:1: error: 'type' does not name a t...
s508960219
p00035
C++
???????????????????????????????????????????????§??£??????????????????????????§?????? #include <complex> #include <cstdio> #include <cmath> using namespace std; // ?????§?¨?????????¨?????? typedef complex<double> P; //XY??§?¨? #define X real() #define Y imag() // ??´???p1,p2??¨??????p3,p4??????????????? // (n < 0)<=...
a.cc:1:48: error: extended character § is not valid in an identifier 1 | ???????????????????????????????????????????????§??£??????????????????????????§?????? | ^ a.cc:1:51: error: extended character £ is not valid in an identifier 1 | ????????????????????????...
s574706140
p00035
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<ll> vl; typedef complex<double> P; typedef pair<int,int> pii; #define REP(i,n) for(ll i=0;i<n;++i) #define REPR(i,n) for(ll i=1;i<n;++i) #define FOR(i,a,b) for(ll i=a;i<b;++i) #define DEBUG(x) cout<<#x<<"...
a.cc: In function 'int main()': a.cc:36:5: error: expected ',' or ';' before 'bool' 36 | bool flag = true; | ^~~~ a.cc:40:9: error: 'flag' was not declared in this scope 40 | flag = false; | ^~~~ a.cc:44:8: error: 'flag' was not declared in this scope 44 | if(flag){ ...
s833646091
p00035
C++
#include <cmath> #include <iostream> #include <algorithm> using namespace std; // ------ Classes ------ // class Point { public: long double px, py; Point(long double px_, long double py_) : px(px_), py(py_) {}; friend bool operator==(const Point& p1, const Point& p2) { return p1.px == p2.px && p1.py == p2.py; } fr...
a.cc:52:7: error: no matching function for call to 'Point::Point()' 52 | Point p1, p2, p3, p4; int r1, r2, r3, r4; | ^~ a.cc:9:9: note: candidate: 'Point::Point(long double, long double)' 9 | Point(long double px_, long double py_) : px(px_), py(py_) {}; | ^~~~~ a.cc:9:9: note: ...
s135861626
p00035
C++
#include <cstdio> #include <iostream> using namespace std; #define scanf scanf_s struct p { double x; double y; }; int check(p a, p b, p c, p d) { if (((a.x-b.x)*(c.y-a.y)+(a.y-b.y)*(a.x-c.x)) * ((a.x-b.x)*(d.y-a.y)+(a.y-b.y)+(a.x-d.x))) { return 1; } return 0; } int main() { double x1, x2, x3, x4, y1, y2...
a.cc: In function 'int main()': a.cc:5:15: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 5 | #define scanf scanf_s | ^~~~~~~ a.cc:22:16: note: in expansion of macro 'scanf' 22 | while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4) !=...
s436711058
p00035
C++
#include <cstdio> #include <iostream> using namespace std; #define scanf scanf_s struct p { double x; double y; }; int check(struct p a,struct p b,struct p c,struct p d) { if (((a.x-b.x)*(c.y-a.y)+(a.y-b.y)*(a.x-c.x)) * ((a.x-b.x)*(d.y-a.y)+(a.y-b.y)+(a.x-d.x))) { return 1; } return 0; } int main() { doub...
a.cc: In function 'int main()': a.cc:5:15: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 5 | #define scanf scanf_s | ^~~~~~~ a.cc:22:16: note: in expansion of macro 'scanf' 22 | while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4) !=...
s882924512
p00035
C++
#include <cstdio> #include <iostream> using namespace std; #define scanf scanf_s struct p { double x; double y; }; int check(struct p a,struct p b,struct p c,struct p d) { if (((a.x-b.x)*(c.y-a.y)+(a.y-b.y)*(a.x-c.x)) * ((a.x-b.x)*(d.y-a.y)+(a.y-b.y)+(a.x-d.x))) { return 1; } return 0; } int main() { doub...
a.cc: In function 'int main()': a.cc:5:15: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 5 | #define scanf scanf_s | ^~~~~~~ a.cc:22:16: note: in expansion of macro 'scanf' 22 | while (scanf("%f,%f,%f,%f,%f,%f,%f,%f",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4) != EOF) { ...
s827871598
p00035
C++
#include <cstdio> #include <complex> #include <iostream> using namespace std; #define scanf scanf_s double cross(complex<double> z1, complex<double> z2) { return z1.real() * z2.imag() - z1.imag() * z2.real(); } int main() { double x1, y1, x2, y2, x3, y3, x4, y4; while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &x1...
a.cc: In function 'int main()': a.cc:6:15: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 6 | #define scanf scanf_s | ^~~~~~~ a.cc:14:16: note: in expansion of macro 'scanf' 14 | while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &x1, &y1, &x2, &y2, &x3, &y3, &x4,...
s296894608
p00035
C++
import java.util.*; public class Main{ private static final Scanner scan = new Scanner(System.in) .useDelimiter("[,\\s]+"); public static void main(String[] args){ while(scan.hasNext()){ double[] x = new double[4]; double[] y = new double[4]; for(int i = 0; i < 4; i++){ x[i] = scan.nextDoub...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Main{ | ^~~~~~
s866544767
p00035
C++
#include<bits/stdc++.h> using namespace std; int main(){ double a,b,c,d,e,f,g,h; while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&a,&b,&c,&d,&e,&f,&g,&h)!=EOF){ if((a==c&&g==e&&d==f&&b==h)||(a==g&&c==e&&b==d&&h==f)cout<<"YES"<<endl; else cout<<"NO"<<endl; } }
a.cc: In function 'int main()': a.cc:6:70: error: expected ';' before 'cout' 6 | if((a==c&&g==e&&d==f&&b==h)||(a==g&&c==e&&b==d&&h==f)cout<<"YES"<<endl; | ^~~~ | ...
s447890464
p00035
C++
#include <bits/stdc++.h> #define r(i,n) for(int i=0;i<n;i++) using namespace std; #define EPS (1e-10) #define equals(a,b) (fabs((a)-(b))<EPS) //CCW??¨/////////////////////////////////// static const int COUNTER_CLOCKWISE = 1; static const int CLOCKWISE = -1; static const int ONLINE_BACK = 2; static const int ONLINE_FR...
a.cc: In function 'int main()': a.cc:166:27: error: invalid operands of types 'int' and 'void*' to binary 'operator-' 166 | else{if(q1==-1&&q2==-1-&&q3==-1&&q4==-1)cout<<"YES"<<endl; | ~~^~~~~ | | | | | void* | ...
s747946604
p00035
C++
#include <bits/stdc++.h> using namespace std; #include "../..//library/unfinished/convex_hull.cpp" #define fs first #define sc second #define all(v) v.begin(), v.end() #define rall(v) v.rbegin(), v.rend() #define rep(i, n) for (int i = 0; i < n; ++i) #define pb emplace_back using pii = pair<int, int>; using vi = vect...
a.cc:3:10: fatal error: ../..//library/unfinished/convex_hull.cpp: No such file or directory 3 | #include "../..//library/unfinished/convex_hull.cpp" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
s381069903
p00035
C++
#include <bits/stdc++.h> using namespace std; #include "../..//library/unfinished/convex_hull.cpp" #define fs first #define sc second #define all(v) v.begin(), v.end() #define rall(v) v.rbegin(), v.rend() #define rep(i, n) for (int i = 0; i < n; ++i) #define pb emplace_back using pii = pair<int, int>; using vi = vect...
a.cc:3:10: fatal error: ../..//library/unfinished/convex_hull.cpp: No such file or directory 3 | #include "../..//library/unfinished/convex_hull.cpp" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
s290401196
p00035
C++
import Data.List.Split import Control.Applicative data YesNo = YES | NO deriving(Show) type Coord = (Double, Double) reshape :: [Double] -> [Coord] reshape [] = [] reshape [_] = [] reshape (x:y:xs) = (x, y) : reshape xs normalForm :: [Coord] -> [Coord] normalForm xs = let minY = minimum (map snd xs) mins = f...
a.cc:15:22: error: stray '\' in program 15 | mins = filter (\c -> snd c == minY) xs | ^ a.cc:24:7: warning: missing terminating ' character 24 | solver' :: [Double] -> YesNo | ^ a.cc:24:7: error: missing terminating ' character 24 | solver' :: [Double] -> YesNo ...
s133526926
p00035
C++
#include<iostream> int main() { while (true) { double xa, ya, xb, yb, xc, yc, xd, yd; char foo; std::cin >> xa >> foo >> ya >> foo >> xb >> foo >> yb >> foo >> xc >> foo >> yc >> foo >> xd >> foo >> yd; if (std::cin.eof()) { break; } const double A_C = hypot(xa - xc, ya - yc); const double B_D = hy...
a.cc: In function 'int main()': a.cc:13:36: error: 'hypot' was not declared in this scope 13 | const double A_C = hypot(xa - xc, ya - yc); | ^~~~~
s006904831
p00035
C++
#include<iostream> int main() { while (true) { double xa, ya, xb, yb, xc, yc, xd, yd; char foo; std::cin >> xa >> foo >> ya >> foo >> xb >> foo >> yb >> foo >> xc >> foo >> yc >> foo >> xd >> foo >> yd; if (std::cin.eof()) { break; } const double A_C = std::hypot(xa - xc, ya - yc); const double B_D...
a.cc: In function 'int main()': a.cc:13:41: error: 'hypot' is not a member of 'std' 13 | const double A_C = std::hypot(xa - xc, ya - yc); | ^~~~~ a.cc:14:41: error: 'hypot' is not a member of 'std' 14 | const double B_D = std::hypot(xb ...
s023939594
p00035
C++
#include<vector> #include<algorithm> #define EPS 1e-9 #define pb(a) push_back(a); #define ID_CCW 0 #define ID_CW 1 #define ID_GO 2 #define ID_BACK 3 using namespace std; class Point{ public: double x,y; Point(){} Point(double xx,double yy) : x(xx),y(yy){} }; Point &operator -=(Point &a,const Point &b) { a.x-=...
a.cc: In function 'int main()': a.cc:53:20: error: 'scanf' was not declared in this scope 53 | if(scanf("%lf,%lf",&p[0].x,&p[0].y)==EOF) break; | ^~~~~ a.cc:53:54: error: 'EOF' was not declared in this scope 53 | if(scanf("%lf,%lf",&p[0].x,&p[0].y)==E...
s131267162
p00035
C++
#include<iostream> #include<complex> #define EPS 1.0e-10 using namespace std; typedef complex<double> P; P a[4]; double cross(P a, P b) { return (a.real() * b.imag() - a.imag() * b.real()); } int is_intersected_ls(P a1, P a2, P b1, P b2) { return ( cross(a2-a1, b1-a1) * cross(a2-a1, b2-a1) < EPS ) && ( cro...
a.cc:28:2: error: extended character   is not valid in an identifier 28 | }ツ  | ^ a.cc:28:2: error: '\U000030c4\U00003000' does not name a type 28 | }ツ  | ^~~~
s424694644
p00035
C++
#include <iostream> #include <cmath> using namespace std; double tri2s(double xa, double ya, double xb, double yb, double xc, double yc){ double a, b, c, s; a = sqrt((xb - xc) * (xb - xc) + (yb - yc) * (yb - yc)); b = sqrt((xa - xc) * (xa - xc) + (ya - yc) * (ya - yc)); c = sqrt((xb - xa) * (...
a.cc: In function 'int main()': a.cc:46:24: error: expected ';' before '}' token 46 | isok = true;0 | ^ | ; 47 | } | ~
s813208194
p00035
C++
#include <iostream> #include <cmath> typedef complex<double> P; using namespace std; double tri2s(double xa, double ya, double xb, double yb, double xc, double yc){ double a, b, c, s; a = sqrt((xb - xc) * (xb - xc) + (yb - yc) * (yb - yc)); b = sqrt((xa - xc) * (xa - xc) + (ya - yc) * (ya - yc));...
a.cc:4:9: error: 'complex' does not name a type 4 | typedef complex<double> P; | ^~~~~~~ a.cc:37:20: error: 'P' was not declared in this scope 37 | double isIntersect(P p1, P p2, P p3, P p4){ | ^ a.cc:37:26: error: 'P' was not declared in this scope 37 | double isInterse...
s555701766
p00035
C++
#include <cmath> #include <complex> #include <vector> #include <cfloat> #include <algorithm> using namespace std; class point; class line; point vec_add(point vec1,point vec2);//ベクトルの足し算 point vec_sub(point vec1,point vec2);//ベクトルの引き算 double inner_product(point a,point b);//内積 double outer_product(point a,point b);//外積...
a.cc: In function 'int main()': a.cc:99:25: error: 'cout' was not declared in this scope 99 | cout<<"YES"<<endl; | ^~~~ a.cc:6:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 5 | #include <algor...
s621925788
p00035
C++
#include<iostream> #include<stdio.h> using namespace std; int main() { double ax,ay,bx,by,cx,cy,dx,dy; while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&ax,&ay,&bx,&by,&cx,&cy,&dx,&dy)) { if(((ax-cx)*(by-ay)+(ay-cy)*(ax-bx))*((ax-cx)*(dy-ay)+(ay-cy)*(ax-dx))<=0&& ((bx-dx)*(ay-by)+(by-dy)*(bx-ax))*((bx-dx...
a.cc: In function 'int main()': a.cc:12:30: error: expected ';' before '}' token 12 | else cout<<"No"<<endl | ^ | ; 13 | } | ~
s008245332
p00035
C++
#include<iostream> #include<complex> #define eps 10e-9 using namespace std; typedef complex<double> p; double cross(p x,p y) { return x.real()*y.imag()-x.imag()*y.real(); } int main() { p a,b,c,d; while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&a.real(),&a.imag(),&b.real(),&b.imag(),&c.real(),&c.imag(),&d.real(),&...
a.cc: In function 'int main()': a.cc:15:63: error: lvalue required as unary '&' operand 15 | while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&a.real(),&a.imag(),&b.real(),&b.imag(),&c.real(),&c.imag(),&d.real(),&d.imag())!=EOF) | ~~~~~~^~ a.cc:15:7...
s492037206
p00035
C++
#include <iostream> #include <cmath> #include <vector> #include <string> #include <algorithm> #include <climits> using namespace std; double EPS = 1e-12; //誤差を考慮して足し算を行う double add(double a, double b) { if( abs(a + b) < EPS * (abs(a) + abs(b))) { return 0; } return a + b; } //二次元ベクトル構造体 struct P { double x, ...
a.cc: In function 'int main()': a.cc:74:29: error: variable 'std::stringstream buf' has initializer but incomplete type 74 | stringstream buf(str); | ^ a.cc: At global scope: a.cc:90:1: error: expected declaration before '}' token 90 | } | ^
s851657582
p00035
C++
#include <iostream> #include <cmath> #include <vector> #include <string> #include <algorithm> #include <climits> #include <sstream> using namespace std; double EPS = 1e-12; //誤差を考慮して足し算を行う double add(double a, double b) { if( abs(a + b) < EPS * (abs(a) + abs(b))) { return 0; } return a + b; } //二次元ベクトル構造体 str...
a.cc:91:1: error: expected declaration before '}' token 91 | } | ^
s773737380
p00035
C++
#include <iostream> #include <cmath> #include <complex> using namespace std; typedef complex<double> P; #define x real() #define y imag() double isIntersect(P p1, P p2,P p3,P p4 ){ return (((p1.x - p2.x)*(p3.y - p1.y)+(p1.y-p2.y)*(p1.x-p3.x))*((p1.x - p2.x)*(p4.y - p1.y)+(p1.y-p2.y)*(p1.x-p4.x))); } int main(){ ...
a.cc: In function 'int main()': a.cc:16:34: error: expected '}' at end of input 16 | double xa,ya,xb,yb,xc,yc,xd,yd; | ^ a.cc:15:11: note: to match this '{' 15 | int main(){ | ^
s749328703
p00035
C++
#include <iostream> using namespace std; int main(){ char trash; double x[4], y[4]; while(cin >> x[0] >> trash >> y[0]){ double p, q, r; for(int i = 1; i < 4; i++){ cin >> trash >> x[i] >> trash >> y[i]; } p = ((y[1]-y[0])*(x[3]-x[0])/(x[1]-x[0]))+y[0]; q = ((y[2]-y[1])*(x[3]-x[1])/(x[2]-x[1]))+y[1]; ...
a.cc: In function 'int main()': a.cc:126:18: error: expected '}' at end of input 126 | } | ^ a.cc:7:44: note: to match this '{' 7 | while(cin >> x[0] >> trash >> y[0]){ | ^ a.cc:126:18: error: expected '}' at end of in...
s251436260
p00035
C++
#include <iostream> #include <algorithm> using namespace std; int main(){ char trash; double x[4], y[4]; while(cin >> x[0] >> trash >> y[0]){ double a,b,c,d,e,f,t; for(int i = 1; i < 4; i++){ cin >> trash >> x[i] >> trash >> y[i]; } a = y[2]-y[0]; b = -x[2]+x[0]; e = -1*(y[0]*(x[2]-x[0])-x[0]*(y[2]-y...
a.cc: In function 'int main()': a.cc:26:24: error: expected primary-expression before '>' token 26 | if((t => x[0] && t <= x[2]) && (t => x[1] && t <= x[3])){ | ^ a.cc:26:52: error: expected primary-expression before '>' token 26 | if((t => x[0] && t <=...
s103562036
p00035
C++
#include <iostream> #include <algorithm> using namespace std; int main(){ char trash; double x[4], y[4]; while(cin >> x[0] >> trash >> y[0]){ double a,b,c,d,e,f,t; for(int i = 1; i < 4; i++){ cin >> trash >> x[i] >> trash >> y[i]; } a = y[2]-y[0]; b = -x[2]+x[0]; e = -1*(y[0]*(x[2]-x[0])-x[0]*(y[2]-y...
a.cc: In function 'int main()': a.cc:26:24: error: expected primary-expression before '>' token 26 | if((t => x[0] && t <= x[2]) && (t => x[1] && t <= x[3])){ | ^ a.cc:26:52: error: expected primary-expression before '>' token 26 | if((t => x[0] && t <=...
s489807468
p00035
C++
#include <iostream> #include <algorithm> using namespace std; int main(){ char trash; double x[4], y[4]; while(cin >> x[0] >> trash >> y[0]){ double a,b,c,d,e,f,t; for(int i = 1; i < 4; i++){ cin >> trash >> x[i] >> trash >> y[i]; } a = y[2]-y[0]; b = -x[2]+x[0]; e = -1*(y[0]*(x[2]-x[0])-x[0]*(y[2]-y...
a.cc: In function 'int main()': a.cc:32:10: error: expected '}' at end of input 32 | } | ^ a.cc:5:11: note: to match this '{' 5 | int main(){ | ^
s168684336
p00035
C++
#include<iostream> #include<cfloat> #include<cassert> #include<cmath> #include<vector> using namespace std; #define EPS (1e-10) #define equals(a, b) (fabs((a) - (b)) < EPS ) #define dle(a, b) (equals(a, b) || a < b ) static const double PI = acos(-1); class Point{ public: double x, y; Point ( double x = 0, ...
a.cc: In function 'Polygon andrewScan(Polygon)': a.cc:147:3: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 147 | sort(s.begin(),s.end()); | ^~~~ | sqrt a.cc:168:3: error: 'reverse' was not declared in this scope 168 | reverse(l.begin(),l.end()); | ^~~~~~~
s911637169
p00035
C++
#include<cfloat> #include<cassert> #include<cmath> #include<vector> #include<algorithm> #include<stdio.h> using namespace std; #define EPS (1e-10) #define equals(a, b) (fabs((a) - (b)) < EPS ) #define dle(a, b) (equals(a, b) || a < b ) static const double PI = acos(-1); class Point{ public: double x, y; Point...
a.cc: In function 'int main()': a.cc:184:9: error: 'cin' was not declared in this scope 184 | while(cin>>in[0].x>>ch>>in[0].y>>ch>>in[1].x>>ch>>in[1].y>>ch>>in[2].x>>ch>>in[2].y>>ch>>in[3].x>>ch>>in[3].y){ | ^~~ a.cc:7:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by ...
s047729644
p00036
Java
import java.util.Scanner; public class AOJ_Volume0036 { private static int[][] a = new int[8][8]; public static void main(String[] args){ Scanner sc = new Scanner(System.in); while(sc.hasNext()){ String[] s = new String[8]; for(int i=0;i<8;i++){ s[i] = sc.nextLine(); String[] temp = s[i].split("")...
Main.java:4: error: class AOJ_Volume0036 is public, should be declared in a file named AOJ_Volume0036.java public class AOJ_Volume0036 { ^ 1 error
s874834225
p00036
Java
import java.util.Scanner; public class Main2 { public static void main(String[] args){ Scanner sc=new Scanner(System.in); while(sc.hasNext()){ int[] a=new int[8]; for(int i=0;i<8;i++){ a[i]=Integer.parseInt(sc.next(),2); } for(int i=0;i<8;...
Main.java:2: error: class Main2 is public, should be declared in a file named Main2.java public class Main2 { ^ 1 error
s911475583
p00036
Java
import java.io.*; class Main{ public static void main(String[] args) throws IOException{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); String line; char[][] map=new char[8][8]; int[] ax={1,0,1}; int[] ay={0,1,1}; int[] bx={1,2,3}; int[] by={0,0,0}; int[] cx={0,0,0}; int[] cy={1,2,3}; int[] dx...
Main.java:22: error: ')' expected while((line=br.readLine()!=null){ ^ Main.java:55: error: ';' expected System.out.println("A") ^ Main.java:65: error: ';' expected System.out.println("B") ^ Main.java:76: error: ';' expected System.out.println...
s569670564
p00036
Java
import java.io.*; class Main{ public static void main(String[] args) throws IOException{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); String line; char[][] map=new char[8][8]; int[] ax={1,0,1}; int[] ay={0,1,1}; int[] bx={1,2,3}; int[] by={0,0,0}; int[] cx={0,0,0}; int[] cy={1,2,3}; int[] dx...
Main.java:127: error: reached end of file while parsing } ^ 1 error
s049601544
p00036
Java
import java.io.*; class Main{ public static void main(String[] args) throws IOException{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); String line; char[][] map=new char[8][8]; int[] ax={1,0,1}; int[] ay={0,1,1}; int[] bx={1,2,3}; int[] by={0,0,0}; int[] cx={0,0,0}; int[] cy={1,2,3}; int[] dx...
Main.java:127: error: reached end of file while parsing } ^ 1 error
s407214838
p00036
Java
import java.io.*; class Main{ public static void main(String[] args) throws IOException{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); String line; char[][] map=new char[8][8]; int[] ax={1,0,1}; int[] ay={0,1,1}; int[] bx={1,2,3}; int[] by={0,0,0}; int[] cx={0,0,0}; int[] cy={1,2,3}; int[] dx...
Main.java:127: error: reached end of file while parsing } ^ 1 error
s494273500
p00036
Java
import java.io.*; class Main{ public static void main(String[] args) throws IOException{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); String line; char[][] map=new char[8][8]; int[] ax={1,0,1}; int[] ay={0,1,1}; int[] bx={1,2,3}; int[] by={0,0,0}; int[] cx={0,0,0}; int[] cy={1,2,3}; int[] dx...
Main.java:126: error: reached end of file while parsing } ^ 1 error
s299560951
p00036
Java
import java.io.*; import java.util.*; import java.lang.Math.*; public class Main{ public static void main(String[] args)throws IOException{ try{ InputStreamReader isr = new InputStreamReader(System.in); BufferedReader br=new BufferedReader(isr); String line; int[][] f=new int[8][8]; ...
Main.java:33: error: reached end of file while parsing } ^ 1 error
s486167894
p00036
Java
import java.util.*; public class Main{ private static final Scanner scan = new Scanner(System.in); public static void main(String[] args){ while(scan.hasNext()){ int[][] mas = new int[8][8]; for(int i = 0; i < 8; i++){ for(int j = 0; j < 8; j++){ mas[i][j] = scan.nextInt(); } } String ty...
Main.java:56: error: illegal start of expression && mas[i+2][[j+1] == 1){ ^ 1 error
s179540924
p00036
Java
import java.util.*; public class Main{ private static final Scanner scan = new Scanner(System.in); public static void main(String[] args){ while(scan.hasNext()){ int[][] mas = new int[8][8]; for(int i = 0; i < 8; i++){ for(int j = 0; j < 8; j++){ mas[i][j] = scan.nextInt(); } } String ty...
Main.java:50: error: illegal start of expression if(mas[i+1][j] == 1 && mas[i+1][j+1] == 1 && mas[i+2][[j+1] == 1){ ^ 1 error
s992595575
p00036
Java
import java.util.*; public class Main{ private static final Scanner scan = new Scanner(System.in); public static void main(String[] args){ while(scan.hasNext()){ int[][] mas = new int[8][8]; for(int i = 0; i < 8; i++){ for(int j = 0; j < 8; j++){ mas[i][j] = scan.nextInt(); } } String ty...
Main.java:50: error: illegal start of expression if(mas[i+1][j] == 1 && mas[i+1][j+1] == 1 && mas[i+2][[j+1] == 1){ ^ 1 error
s924891695
p00036
Java
import java.util.*; public class Main{ private static final Scanner scan = new Scanner(System.in); static String A = "1100000011"; static String B = "10000000100000001"; static String C = "1111"; static String D = "1000000110000001"; static String E = "11000000011"; static String F = "100000001100000001"; stat...
Main.java:27: error: not a statement Loop;for(int i = 0; i < 8 * 8; i++){ ^ 1 error
s920010043
p00036
Java
import java.util.Scanner; public class Main { private Scanner sc; public static void main(String[] args) { new Main_format(); } public Main() { sc = new Scanner(System.in); while (sc.hasNext() == true) { int[][] map = new int[8][8]; for (int i = 0; i < 8; i++) { String line = sc.nextLine();...
Main.java:7: error: cannot find symbol new Main_format(); ^ symbol: class Main_format location: class Main 1 error
s599434713
p00036
Java
import java.util.Scanner; public class Main { private Scanner sc; public static void main(String[] args) { new Main_format(); } public Main() { sc = new Scanner(System.in); while (sc.hasNext() == true) { int[][] map = new int[8][8]; for (int i = 0; i < 8; i++) { String line = sc.nextLine();...
Main.java:7: error: cannot find symbol new Main_format(); ^ symbol: class Main_format location: class Main 1 error
s157484970
p00036
Java
import java.util.Scanner; public class Main { private Scanner sc; public static void main(String[] args) { new Main_format(); } public Main() { sc = new Scanner(System.in); while (sc.hasNext() == true) { int[][] map = new int[8][8]; for (int i = 0; i < 8; i++) { String line = sc.nextLine();...
Main.java:7: error: cannot find symbol new Main_format(); ^ symbol: class Main_format location: class Main 1 error
s376549484
p00036
Java
import java.util.Scanner; public class Main { static Scanner sc = new java.util.Scanner(System.in); // static int[][] num =new int [8][8]; public static void main(String[] args) { int[][] num = new int[15][15]; String str = ""; while (sc.hasNextLine()) { // num[][]???????????? syokika(num); // ?...
Main.java:60: error: reached end of file while parsing } ^ 1 error
s472349716
p00036
Java
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.*; public class Main { public static void main(String[] args) throws Exception { // Your code here! String[] inputPlane = new String[8]; //入力を受付、計算しやすいようにintに変換 List<int[][]> planeList = new A...
Main.java:50: error: 'try' without 'catch', 'finally' or resource declarations try{ ^ Main.java:60: error: ';' expected }}chatch(IndexOutOfBoundsException){} ^ 2 errors
s109338833
p00036
Java
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.*; public class Main { public static void main(String[] args) throws Exception { // Your code here! String[] inputPlane = new String[8]; //入力を受付、計算しやすいようにintに変換 List<int[][]> planeList = new A...
Main.java:64: error: 'catch' without 'try' catch(IndexOutOfBoundsException e){} ^ Main.java:52: error: 'try' without 'catch', 'finally' or resource declarations try{ ^ Main.java:67: error: illegal start of expression static boolean blockJudgeA(int[][] plane){ ^ 3 errors
s888602639
p00036
Java
import java.util.*;   class Main{     public static void main(String args[]){         Scanner s=new Scanner(System.in);         while(s.hasNext()){             char [][] a=new char[20][20];             for(int i=0;i<20;i++)                 for(int j=0;j<20;j++)                     a[i][j]='0';             for(int i=0;i...
Main.java:2: error: illegal character: '\u00a0' ? ^ Main.java:3: error: class, interface, enum, or record expected class Main{ ^ Main.java:4: error: illegal character: '\u00a0' ????public static void main(String args[]){ ^ Main.java:4: error: illegal character: '\u00a0' ????public static void main(String args[]){...