submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s749941389 | p00057 | C++ | #include<cstdio>
main(n,s){for(;~scanf("%d",&n);printf("%d\n",1+(n+1)*n/2));} | a.cc:2:5: error: expected constructor, destructor, or type conversion before '(' token
2 | main(n,s){for(;~scanf("%d",&n);printf("%d\n",1+(n+1)*n/2));}
| ^
|
s499813546 | p00057 | C++ | #include<iostream>
int main(){
int n;
while(cin>>n)
std::cout<<n*(n+1)/2+1<<endl;
} | a.cc: In function 'int main()':
a.cc:4:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
4 | while(cin>>n)
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; //... |
s928081796 | p00057 | C++ | main(n){for(;~scanf("%d",&n);)printf("%d\n",(n+1)*n/2+1);} | a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token
1 | main(n){for(;~scanf("%d",&n);)printf("%d\n",(n+1)*n/2+1);}
| ^
|
s762583538 | p00057 | C++ | main(N){while(~scanf("%d",&N))printf("%d\n",N*(N+1)/2+1);} | a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token
1 | main(N){while(~scanf("%d",&N))printf("%d\n",N*(N+1)/2+1);}
| ^
|
s756038345 | p00057 | C++ | #include <iostream>
using namespace std;
int main() {
int n;
while(cin>>n) {
int res=0;
for (int i=0; i<n; i++) res += 2;
}
cout << res << endl;
} | a.cc: In function 'int main()':
a.cc:9:17: error: 'res' was not declared in this scope
9 | cout << res << endl;
| ^~~
|
s207227199 | p00057 | C++ | main(n){for(;~scanf("%d",&n);)printf("%d\n",n*-~n/2+1);} | a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token
1 | main(n){for(;~scanf("%d",&n);)printf("%d\n",n*-~n/2+1);}
| ^
|
s085289543 | p00057 | C++ | main(n){for(;~scanf("%d",&n);)printf("%d\n",1-n*~n/2);} | a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token
1 | main(n){for(;~scanf("%d",&n);)printf("%d\n",1-n*~n/2);}
| ^
|
s199176698 | p00057 | C++ | #include<iostream>
using namespace std;
int ans(int a){
if(a==1) return 2;
return a+ans(a-1);
}
int main(){
int n;
while(){
cout<<ans(n)<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:9:15: error: expected primary-expression before ')' token
9 | while(){
| ^
|
s973938443 | p00057 | C++ | i,a;main(n){for(;i=~scanf("%d",&n);printf("%d\n",a))for(i=a=1;i<=n;)a+=i++;} | a.cc:1:1: error: 'i' does not name a type
1 | i,a;main(n){for(;i=~scanf("%d",&n);printf("%d\n",a))for(i=a=1;i<=n;)a+=i++;}
| ^
a.cc:1:9: error: expected constructor, destructor, or type conversion before '(' token
1 | i,a;main(n){for(;i=~scanf("%d",&n);printf("%d\n",a))for(i=a=1;i<=n;)a+=i++;}
| ... |
s471801189 | p00057 | C++ | #include<cstdio>
#include<iostream>
#include<algorithm>
#include<string>
#include<windows.h>
using namespace std;
int main(){
int n;
while(scanf("%d",&n) != EOF){
int sum = 1;
for(int i = 1; i <= n; i++)
sum += i;
cout << sum << endl;
}
return 0;
} | a.cc:5:9: fatal error: windows.h: No such file or directory
5 | #include<windows.h>
| ^~~~~~~~~~~
compilation terminated.
|
s738727051 | p00057 | C++ | import sys
N=10000+1
d=[0]*N
d[0]=1
for i in xrange(1,N):
d[i]=d[i-1]+i
for line in sys.stdin.readlines():
print d[int(line.strip())] | a.cc:1:1: error: 'import' does not name a type
1 | import sys
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
|
s165680185 | p00057 | C++ | #include<iostream>
using namespace std;
int main()
{
int x, m ,count;
while(cin>>n)
{
if(n>2)
{
for(int i=0; i<n-2; i++)
{
m+=count;
count++;
}
cout<<n*2+m<<endl;
}
else
{
cout<<n*2<<endl;
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:13: error: 'n' was not declared in this scope
7 | while(cin>>n)
| ^
|
s623508706 | p00057 | C++ | #include<iostream>
using namespace std;
int main()
{
int n;
while(cin>>n)
{
if(n>2)
{
int m=1, count=0;
for(int i=0; i<n-2; i++)
{
m+=count;
count++;
}
cout<<n*m+count<<endl;
}
else
{
cout<<n*m<<endl;
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:21:13: error: 'm' was not declared in this scope
21 | cout<<n*m<<endl;
| ^
|
s585168786 | p00057 | C++ | #include<iostream>
using namespace std;
int main()
{
int n;
while(cin>>n)
{
if(n>2)
{
static_int m=1, count=0;
for(int i=0; i<n-2; i++)
{
m+=count;
count++;
}
cout<<n*m+count<<endl;
}
else
{
cout<<n*2<<endl;
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:11:4: error: 'static_int' was not declared in this scope; did you mean 'static'?
11 | static_int m=1, count=0;
| ^~~~~~~~~~
| static
a.cc:14:9: error: 'm' was not declared in this scope
14 | m+=count;
| ^
a.cc:14:12: error: 'count' wa... |
s925784269 | p00058 | Java | import java.io.*;
class Main{
public static void main(String[] args) throws IOExcetion{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line="";
while((line=br.readLine())!=null){
String[] values=line.split(" ");
double xa=Double.parseDouble(values[0]);
double ya=Double.parseDouble(value... | Main.java:4: error: cannot find symbol
public static void main(String[] args) throws IOExcetion{
^
symbol: class IOExcetion
location: class Main
1 error
|
s457492095 | p00058 | Java | import java.io.*;
????
class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line="";
while((line=br.readLine())!=null){
String[] values=line.split(" ");
double xa=Double.parseDouble(values[0]);
double ya=Double.parseDouble(... | Main.java:2: error: class, interface, enum, or record expected
????
^
Main.java:25: error: 'else' without 'if'
else if(mx==my*-1){
^
2 errors
|
s802202582 | p00058 | Java | import java.io.*;
class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line="";
while((line=br.readLine())!=null){
String[] values=line.split(" ");
double ax=Double.parseDouble(values[0]);
double ay=Double.parseDouble(valu... | Main.java:18: error: ';' expected
System.out.println("YES")
^
Main.java:21: error: ';' expected
System.out.println("YES")
^
2 errors
|
s698178173 | p00058 | Java | import java.io.*;
class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line="";
while((line=br.readLine())!=null){
String[] values=line.split(" ");
double ax=Double.parseDouble(values[0]);
double ay=Double.parseDouble(valu... | Main.java:17: error: ')' expected
double det1=(ay-by)*(dx--cx);
^
Main.java:17: error: ';' expected
double det1=(ay-by)*(dx--cx);
^
2 errors
|
s698780734 | p00058 | Java | #include<stdio.h>
int main(){
double ax,ay,bx,by,cx,cy,dx,dy;
double abx,aby,cdx,cdy;
for(;scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&ax,&ay,&bx,&by,&cx,&cy,&dx,&dy)!=EOF;){
abx=bx-ax;aby=by-ay;
cdx=dx-cx;cdy=dy-cy;
if(abx*cdx+aby*cdy==0)printf("YES\n");
else printf("NO\n");
... | Main.java:1: error: illegal character: '#'
#include<stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include<stdio.h>
^
Main.java:4: error: class, interface, enum, or record expected
double abx,aby,cdx,cdy;
^
Main.java:5: error: class, interface, enum, or record expected
fo... |
s841387556 | p00058 | Java | import java.util.Scanner;
//Orthogonal
public class AOJ0058 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(sc.hasNext()){
double[][] p = new double[4][2];
for(int i=0;i<4;i++){
p[i][0] = sc.nextDouble();
p[i][1] = sc.nextDouble();
}
double vx1 = p[1][0]-... | Main.java:4: error: class AOJ0058 is public, should be declared in a file named AOJ0058.java
public class AOJ0058 {
^
1 error
|
s846295267 | p00058 | Java | #include <iostream>
#include <cmath>
#include<cstdio>
#include <algorithm>
using namespace std;
int main(){
double xA,yA,xB,yB,xC,yC,xD,yD;
while(~scanf("%lf %lf %lf %lf %lf %lf %lf %lf",
&xA,&yA,&xB,&yB,&xC,&yC,&xD,&yD)){
if((xB-xA)*(xD-xC)+(yB-yA)*(yD-yC) == 0){
cout <... | Main.java:1: error: illegal character: '#'
#include <iostream>
^
Main.java:2: error: illegal character: '#'
#include <cmath>
^
Main.java:3: error: illegal character: '#'
#include<cstdio>
^
Main.java:4: error: illegal character: '#'
#include <algorithm>
^
Main.java:14: error: not a statement
cout << "YES... |
s151992503 | p00058 | Java | import java.util.Scanner;
public class Main{
public static final double EPS = 1e-8;
public static class P implements Comparable<P>{
public double x;
public double y;
public P(double x, double y) {
this.x = x;
this.y = y;
}
//ÀWª¶ºÉ éÙÇ\[gñɨ¢ÄOÉé
public int compareTo(P o) {... | Main.java:74: error: cannot find symbol
if(v1==null||v2==null)System.out.println("WRONG");else
^
symbol: variable v1
location: class Vec
Main.java:74: error: cannot find symbol
if(v1==null||v2==null)System.out.println("WRONG");else
^
symbol: variable v2
location: class Vec
Ma... |
s343196996 | p00058 | Java | import java.util.Scanner;
public class Orthogonal {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
double x[]=new double[4];
double y[]=new double[4];
double xab,yab,xcd,ycd,ns;
int i;
while(sc.hasNext()){
for(i=0;i<4;i++){
x[i]=sc.nextDouble();
y[i]=sc.nextDouble()... | Main.java:3: error: class Orthogonal is public, should be declared in a file named Orthogonal.java
public class Orthogonal {
^
1 error
|
s301676425 | p00058 | Java | public class Main {
static Scanner in = new Scanner(System.in);
public static void main(String[] args) {
double x1, y1, x2, y2;
while (in.hasNext()) {
x1 = -in.nextDouble();
y1 = -in.nextDouble();
x1 += in.nextDouble();
y1 += in.nextDouble();
x2 = -in.nextDouble();
y2 = -in.nextDouble();
x2 ... | Main.java:2: error: cannot find symbol
static Scanner in = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:2: error: cannot find symbol
static Scanner in = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s366676471 | p00058 | Java | import java.util.*;
class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
double ep = 0.0;
while(s.hasNext()) {
double[] d = new double[8];
for(int i=0 ; i<8 ; i++)
d[i] = s.nextDouble();
double a = (d[3]-d[1])*(d[7]-d[5]) + (d[2]-d[0])*(d[6]-d[4]);
Stri... | Main.java:21: error: class, interface, enum, or record expected
}
^
1 error
|
s659959150 | p00058 | C | #include<stdio.h>
int main(void){
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(scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f,&g,&h) = EOF){
break;
}
if(c-a==0&&h-f==0){
printf("YES\n");
}
else if(d-b==0&&g-e==0){
printf("YES\n");
}
else if(c-a=... | main.c: In function 'main':
main.c:7:69: error: lvalue required as left operand of assignment
7 | if(scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f,&g,&h) = EOF){
| ^
|
s034552595 | p00058 | C | #include<cstdio>
#include<cmath>
#include<algorithm>
#include<iostream>
#include<string>
#include <vector>
#include <map>
#include<cstdlib>
using namespace std;
void Solution()
{
double xA, yA;
double xB, yB;
double xC, yC;
double xD, yD;
while(cin>>xA>>yA>xB>>yB>>xC>>yC>>xD>>yD)
{
... | main.c:1:9: fatal error: cstdio: No such file or directory
1 | #include<cstdio>
| ^~~~~~~~
compilation terminated.
|
s106791526 | p00058 | C | #include<cstdio>
#include<cmath>
#include<algorithm>
#include<iostream>
#include<string>
#include <vector>
#include <map>
#include<cstdlib>
using namespace std;
void Solution()
{
double xA, yA;
double xB, yB;
double xC, yC;
double xD, yD;
while(cin>>xA>>yA>>xB>>yB>>xC>>yC>>xD>>yD)
{
... | main.c:1:9: fatal error: cstdio: No such file or directory
1 | #include<cstdio>
| ^~~~~~~~
compilation terminated.
|
s040032971 | p00058 | C | #include<iostream>
#include<iomanip>
#include<vector>
#include<queue>
#include<list>
#include<stack>
#include<algorithm>
#include<cmath>
#include<memory>
using namespace std;
class Vector{
public:
double x;
double y;
Vector(){}
Vector( double x, double y ) : x(x), y(y) {}
Vector operator + ( const Vecto... | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s402254799 | p00058 | C | #include<iostream>
#include<iomanip>
#include<vector>
#include<queue>
#include<list>
#include<stack>
#include<algorithm>
#include<cmath>
#include<memory>
using namespace std;
class Vector
{
public:
double x;
double y;
Vector(){}
Vector( double x, double y ) : x(x), y(y) {}
Vector operator + ( const Ve... | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s349525201 | p00058 | C | #include<stdio.h>
int main(){
double x0,x1,x2,x3,y0,y1,y2,y3;
while(scanf("%lf%lf%lf%lf%lf%lf%lf%lf",&x0,&y0,&x1,&y1,&x2,&y2,&x3,&y3)!=-1){
while((x1-x0)*(x3-x2)+(y1-y0)*(y3-y2)==0)
puts("YES");{
}else{
puts("NO");
}
}
return 0;
} | main.c: In function 'main':
main.c:7:6: error: 'else' without a previous 'if'
7 | }else{
| ^~~~
|
s882125498 | p00058 | C |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include<stdio.h>
int main(){
int i/*,flag*/;
float x[4],y[4],a;
while(1){
for(i = 0/*,flag = 0*/;i < 4;i++){
if(scanf("%f%f",&x[i],&y[i]) == EOF){
... | main.c:2:1: error: expected identifier or '(' before numeric constant
2 | 1
| ^
In file included from /usr/include/stdio.h:47,
from main.c:45:
/usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h:28:43: error: unknown type name 'size_t'
28 | ... |
s262239994 | p00058 | C |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include<stdio.h>
int main(){
int i/*,flag*/;
float x[4],y[4],a;
while(1){
for(i = 0/*,flag = 0*/;i < 4;i++){
if(scanf("%f%f",&x[i],&y[i]) == EOF){
... | main.c:2:1: error: expected identifier or '(' before numeric constant
2 | 1
| ^
In file included from /usr/include/stdio.h:47,
from main.c:45:
/usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h:28:43: error: unknown type name 'size_t'
28 | ... |
s699583594 | p00058 | C | #include <stdio.h>
typedef struct Point {
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);}
Point operator *(double t) { return Point(x*t, y*t);}
} Point;
typedef Point Vector;
int na... | main.c:5:3: error: expected specifier-qualifier-list before 'Point'
5 | Point(double x = 0, double y = 0):x(x), y(y){}
| ^~~~~
main.c: In function 'isTyokko':
main.c:16:14: error: expected expression before 'Vector'
16 | if(naiseki(Vector(a1.x-a2.x, a1.y-a2.y), Vector(b1.x-b2.x, b1.y-b2.y)) == 0) {
... |
s996636383 | p00058 | C | double p[9],i;main(){for(;~scanf("%lf",p+i++%8);)i%8||puts(fabs((p[2]-*p)*(p[6]-p[4])+(p[3]-p[1])*(p[7]-p[5]))<1e-7?"YES":"NO");} | main.c:1:15: error: return type defaults to 'int' [-Wimplicit-int]
1 | double p[9],i;main(){for(;~scanf("%lf",p+i++%8);)i%8||puts(fabs((p[2]-*p)*(p[6]-p[4])+(p[3]-p[1])*(p[7]-p[5]))<1e-7?"YES":"NO");}
| ^~~~
main.c: In function 'main':
main.c:1:28: error: implicit declaration of function 'scanf'... |
s580384415 | p00058 | C | #include<iostream>
#include<cmath>
#include<complex>
#define EPS (1e-10)
#define EQ(a,b) (abs((a)-(b)) < EPS)
using namespace std;
typedef complex<double> P;
double dot(P,P);
int is_orthogonal(P,P,P,P);
int main(void){
P a,b,c,d;
while(~scanf("%lf %lf %lf %lf %lf %lf %lf %lf"
,&a.real(),&a.imag(),&b... | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s995959437 | p00058 | C++ | #include <cstdio>
using namespace std;
int main(){
double x1,x2,x3,x4,y1,y2,y3,y4,slope1,slope2;
while(scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4) != EOF){
if(x1 == x2){
if(y3 == y4)printf("YES\n");
else{
printf("NO\n");
}
}else{ //x1 != x2
if(x3 == x4){
if(y1 =... | a.cc: In function 'int main()':
a.cc:23:36: error: 'fabs' was not declared in this scope
23 | if(fabs(slope1*slope2 + 1) < EPS){
| ^~~~
a.cc:23:62: error: 'EPS' was not declared in this scope
23 | if(fabs(slop... |
s898224844 | p00058 | C++ | #include
<cstdio>
double
xA,yA,xB,yB,xC,yC,xD,yD;
int
main()
{
while
(~scanf(
"%lf%lf%lf%lf%lf%lf%lf%lf"
,&xA,&yA,&xB,&yB,&xC,&yC,&xD,&yD))
{
if
((xB-xA)*(xD-xC)+(yB-yA)*(yD-yC)==0)printf(
"YES\n"
);
else
printf(
"NO\n"
);
}
} | a.cc:1:9: error: #include expects "FILENAME" or <FILENAME>
1 | #include
| ^
a.cc:3:1: error: expected unqualified-id before '<' token
3 | <cstdio>
| ^
a.cc: In function 'int main()':
a.cc:19:3: error: 'xA' was not declared in this scope
19 | ,&xA,&yA,&xB,&yB,&xC,&yC,&xD,&yD))
| ^~... |
s925864762 | p00058 | C++ | #include
<cstdio>
using namespace std;
double
xA,yA,xB,yB,xC,yC,xD,yD;
int
main()
{
while
(~scanf(
"%lf%lf%lf%lf%lf%lf%lf%lf"
,&xA,&yA,&xB,&yB,&xC,&yC,&xD,&yD))
{
if
((xB-xA)*(xD-xC)+(yB-yA)*(yD-yC)==0)printf(
"YES\n"
);
else
printf(
"NO\n"
);
}
} | a.cc:1:9: error: #include expects "FILENAME" or <FILENAME>
1 | #include
| ^
a.cc:3:1: error: expected unqualified-id before '<' token
3 | <cstdio>
| ^
a.cc: In function 'int main()':
a.cc:18:3: error: 'scanf' was not declared in this scope
18 | (~scanf(
| ^~~~~
a.cc:30:37: error: ... |
s584367015 | p00058 | C++ | #include <iostream>
2.#include <cstdio>
3.using namespace std;
4.
5.struct point
6.{
7. double x, y;
8.};
9.
10.int main() {
11. point p[4];
12. while (true){
13. for (int i = 0; i < 4; i++){
14. if (scanf("%lf%lf", &p[i].x, &p[i].y) == EOF) return 0;
15. }
16. //cout << (p[1].x - p[0].x) * (p[3].... | a.cc:3:3: error: stray '#' in program
3 | 2.#include <cstdio>
| ^
a.cc:3:1: error: expected unqualified-id before numeric constant
3 | 2.#include <cstdio>
| ^~
a.cc:7:1: error: expected unqualified-id before numeric constant
7 | 4.
| ^~
a.cc:17:1: error: expected unqualified-id before nu... |
s076999103 | p00058 | C++ | 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#include <iostream>
using namespace std;
typedef struct Point{
double x,y;
};
int main(){
Point p[4];
double x[2],y[2];
while(cin>>p[0].x){
cin>>p[0].y;
for(int i=1;i<4... | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 9
| ^
In file included from /usr/include/c++/14/iosfwd:42,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a... |
s508681750 | p00058 | C++ | #include<cstdio>
#include<cmath>
#include<algorithm>
#include<iostream>
#include<string>
#include <vector>
#include <map>
#include<cstdlib>
using namespace std;
void Solution()
{
double xA, yA;
double xB, yB;
double xC, yC;
double xD, yD;
while(cin>>xA>>yA>xB>>yB>>xC>>yC>>xD>>yD)
{
... | a.cc: In function 'void Solution()':
a.cc:20:25: error: invalid operands of types 'double' and 'double' to binary 'operator>>'
20 | while(cin>>xA>>yA>xB>>yB>>xC>>yC>>xD>>yD)
| ~~^~~~
| | |
| | double
| ... |
s299038745 | p00058 | C++ | #include<iostream>
#include<cmath>
using namespace std;
 
int main(){
    double xa,ya,xb,yb,xc,yc,xd,yd;
    while(cin>>xa>>ya>>xb>>yb>>xc>>yc>>xd>>yd){
        double dot = (xa-xb)*(xc-xd) + (ya-yb)*(yc-yd);
    &... | a.cc:4:2: error: stray '#' in program
4 |  
| ^
a.cc:6:2: error: stray '#' in program
6 |     double xa,ya,xb,yb,xc,yc,xd,yd;
| ^
a.cc:6:8: error: stray '#' in program
6 |     double xa,ya,xb,yb,xc,yc,xd,yd;
| ^
a.cc:6:14: error: stray ... |
s250262916 | p00058 | C++ | main(){float a,b,c,d,e,f,g,h;while(~scanf("%f%f%f%f%f%f%f%f",&a,&b,&c,&d,&e,&f,&g,&h)){puts((c-a)*(g-e)+(d-b)*(h-f)?"NO":"YES");}exit(0);} | a.cc:1:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
1 | main(){float a,b,c,d,e,f,g,h;while(~scanf("%f%f%f%f%f%f%f%f",&a,&b,&c,&d,&e,&f,&g,&h)){puts((c-a)*(g-e)+(d-b)*(h-f)?"NO":"YES");}exit(0);}
| ^~~~
a.cc: In function 'int main()':
a.cc:1:37: error: 'scanf' was not declared... |
s174291554 | p00058 | C++ | #include <iostream>
using namespace std;
int main(){
double xa,ya,xb,yb,xc,yc,xd,yd;
while(cin>>xa>>ya>>xb>>yb>>xc>>yc>>xd>>yd){
if((yb-ya)*(yd-yc)+(xb-xa)*(xd-xc)==0) cout<<"YES"<<endl;;
else cout<<"NO"<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:9:5: error: 'else' without a previous 'if'
9 | else cout<<"NO"<<endl;
| ^~~~
|
s122656694 | p00058 | C++ | #include <iostream>
using namespace std;
int main()
{
double x[4];
double y[4];
while (true)
{
for (int i = 0; i < 4; i++)
{
if (!(cin >> x[i] >> y[i])) break;
}
double dx1 = x[1] - x[0];
double dy1 = y[1] - y[0];
double dx2 = x[3] - x[2];
double dy2 = y[3] - y[2];
double innerProduct = (dx1 * ... | a.cc: In function 'int main()':
a.cc:21:21: error: 'fabs' was not declared in this scope; did you mean 'labs'?
21 | if (fabs(innerProduct) < 0.0000001) cout << "YES" << endl;
| ^~~~
| labs
|
s527519433 | p00058 | C++ | #include<iostream>
using namespace std;
double ESP = 1e-10
struct point {
double x, y;
};
int main() {
point P[4];
while(true){
for(int i = 0; i < 4; i++){
cin >> P[i].x >> P[i].y;
}
if(cin.eof()) break;
if((P[1].y - P[0].y)*(P[3].y - P[2].y) + (P[3].x - P[2].x)*(P[1].x - P[0].x) < ESP... | a.cc:7:1: error: expected ',' or ';' before 'struct'
7 | struct point {
| ^~~~~~
a.cc: In function 'int main()':
a.cc:12:3: error: 'point' was not declared in this scope
12 | point P[4];
| ^~~~~
a.cc:16:14: error: 'P' was not declared in this scope
16 | cin >> P[i].x >> P[i].y;
| ... |
s915202975 | p00058 | C++ | #include<iostream>
#include<algorithm>
#include<math>
using namespace std;
double ESP = 1e-10;
struct point {
double x, y;
};
int main() {
point P[4];
while(true){
for(int i = 0; i < 4; i++){
cin >> P[i].x >> P[i].y;
}
if(cin.eof()) break;
if(abs((P[1].y - P[0].y)*(P[3].y - P[2].y) + (P... | a.cc:3:9: fatal error: math: No such file or directory
3 | #include<math>
| ^~~~~~
compilation terminated.
|
s714734301 | p00058 | C++ | 1.0 1.0 2.0 2.0 0.0 0.0 1.0 -1.0
0.0 0.0 2.0 0.0 -1.0 2.0 2.0 2.0
10.0 6.0 3.4 5.2 6.8 9.5 4.3 2.1
2.5 3.5 2.5 4.5 -3.3 -2.3 6.8 -2.3 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 1.0 1.0 2.0 2.0 0.0 0.0 1.0 -1.0
| ^~~
|
s029000490 | p00058 | C++ | #include<stdio.h>
#include<cstudio>
#include<iostream>
double abs(double a){return a<0?-a:a;}
int main(){
double xa,xb,xc,xd,ya,yb,yc,yd;
while(~scanf("%lf%lf%lf%lf%lf%lf%lf%lf",&xa,&ya,&xb,&yb,&xc,&yc,&xd,&yd)){
double t=(xa-xb)*(xc-xd)+(ya-yb)*(yc-yd);
if(abs(t)<0.00001)printf("YES\n");
... | a.cc:2:9: fatal error: cstudio: No such file or directory
2 | #include<cstudio>
| ^~~~~~~~~
compilation terminated.
|
s588760372 | p00058 | C++ | include <iostream>
using namespace std;
struct Point {
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);}
Point operator *(double t) { return Point(x*t, y*t);}
};
typedef Point Vector;
... | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:30:9: error: 'scanf' was not declared in this scope
30 | while(scanf("%lf %lf %lf %lf %lf %lf %lf %lf", &a.x, &a.y, &b.x, &b.y, &c.x, &c.y, &d.x, &d.y) != EOF) {
| ^~~~~
a.c... |
s146290450 | p00058 | C++ |
main(){
double xa, ya, xb, yb, xc, yc, xd, yd;
double A,B;//AAB
while((scanf("%lf%lf%lf%lf%lf%lf%lf%lf",&xa,&ya,&xb,&yb,&xc,&yc,&xd,&yd))!=EOF){
// cout << xa << " "<<ya << " " << yd<< endl;
if((xa-xb) != 0){A=(ya-yb)/(xa-xb);}
if((xc-xd) != 0){B=(yc-yd)/(xc-xd);}
if(A*B==-1){cout ... | a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:5:10: error: 'scanf' was not declared in this scope
5 | while((scanf("%lf%lf%lf%lf%lf%lf%lf%lf",&xa,&ya,&xb,&yb,&xc,&yc,&xd,&yd))!=EOF){
| ^~~~~
a.... |
s377844940 | p00058 | C++ | #include <cmath>
#include <complex>
#include <vector>
#include <cfloat>
#include <algorithm>
using namespace std;
///////////////////////
//二次元幾何テンプレート
//点クラス point->x,y
//直線クラス line->s,v
//
class point;
class line;
point vec_add(point vec1,point vec2);//ベクトルの足し算
point vec_sub(point vec1,point vec2);//ベクトルの引き算
double... | a.cc: In function 'int main()':
a.cc:52:15: error: 'cin' was not declared in this scope
52 | while(cin>>a[0].x>>a[0].y){
| ^~~
a.cc:6:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
5 | #include <algorithm>
+++ |+#inclu... |
s474911201 | p00058 | C++ | #include <cmath>
#include <complex>
#include <vector>
#include <cfloat>
#include <algorithm>
using namespace std;
///////////////////////
//二次元幾何テンプレート
//点クラス point->x,y
//直線クラス line->s,v
//
class point;
class line;
point vec_add(point vec1,point vec2);//ベクトルの足し算
point vec_sub(point vec1,point vec2);//ベクトルの引き算
double... | a.cc: In function 'int main()':
a.cc:52:20: error: 'cin' is not a member of 'std'
52 | while(std::cin>>a[0].x>>a[0].y){
| ^~~
a.cc:6:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
5 | #include <algorithm>
+++ |+#i... |
s741526641 | p00058 | C++ | #include <iostream>
using namespace std;
/** Problem0058 : Orthogonal **/
int main()
{
double xA, yA, xB, yB, xC, yC, xD, yD, EPS=1e-12;
while (cin >> xA >> yA >>xB >> yB >> xC >> yC >> xD >> yD) {
if (fabs((xB-xA)*(xD-xC)+(yB-yA)*(yD-yC))<EPS)
cout << "YES" << endl;
else
cout << "NO" << endl;
}
retur... | a.cc: In function 'int main()':
a.cc:11:21: error: 'fabs' was not declared in this scope; did you mean 'labs'?
11 | if (fabs((xB-xA)*(xD-xC)+(yB-yA)*(yD-yC))<EPS)
| ^~~~
| labs
|
s605338636 | p00059 | Java | package aoj;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
public class aoj037 {
public static void main(String[] args){
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String tmp = null;
int i = 0;
int co... | Main.java:8: error: class aoj037 is public, should be declared in a file named aoj037.java
public class aoj037 {
^
1 error
|
s571439335 | p00059 | Java | import java.util.*;
import java.io.*;
import static java.lang.Math.*;
class Main {
static final eps = 1.0e-8;
static final int X = 0;
static final int Y = 1;
public static void main( String[] args ) {
final Scanner stdin = new Scanner( System.in );
while ( stdin.hasNextDouble() ) {
final... | Main.java:7: error: <identifier> expected
static final eps = 1.0e-8;
^
1 error
|
s672049518 | p00059 | C | #include <stdio.h>
#include <math.h>
??
int main(void) {
????????double xa1, ya1, xa2, ya2, xb1, yb1, xb2, yb2;
????????while (scanf("%lf %lf %lf %lf %lf %lf %lf %lf", &xa1, &ya1, &xa2, &ya2, &xb1, &yb1, &xb2, &yb2) != EOF) {
????????????????if (fabs((xa1+xa2)-(xb1+xb2))/2.0 <= (fabs(xa2-xa1)+fabs(xb2-xb1))/2.0 || fabs... | main.c:3:1: error: expected identifier or '(' before '?' token
3 | ??
| ^
|
s915981903 | p00059 | C | #include<stdio.h>
int main(void){
int xa1, xa2, xb1, xb2, ya1, ya2, yb1, yb2, key;
scanf("%d %d %d %d %d %d %d %d %d", &xa1, &ya1, &xa2, &ya2, &xb1, &yb1, &xb2, &yb2);
if ( xa1 > xa2 ) { xa1 = key; xa1 = xa2; xa2 = key; }
if ( ya1 > ya2 ) { ya1 = key; ya1 = ya2; ya2 = key; }
if ( xb1 > xb2 ) { xb1 = key;... | main.c: In function 'main':
main.c:19:4: error: expected '}' before 'else'
19 | else printf("NO");
| ^~~~
|
s570075289 | p00059 | C | include <stdio.h>
int main(){
double xa1,ya1,xa2,ya2,xb1,yb1,xb2,yb2;
while(scanf("%lf %lf %lf %lf %lf %lf %lf %lf",
&xa1,&ya1,&xa2,&ya2,&xb1,&yb1,&xb2,&yb2)!=EOF){
if (((xb1<=xa1 && xa1<=xb2) && (yb1<=ya2 && ya2<=yb2)) ||
((xb1<=xa1 && xa1<=xb2) && (yb1<=ya1 && ya1<=yb2)) ||
((xb... | main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
|
s381926172 | p00059 | C | #include <stdio.h>
int main(){
double xa1,ya1,xa2,ya2,xb1,yb1,xb2,yb2;
while(scanf("%lf %lf %lf %lf %lf %lf %lf %lf",
&xa1,&ya1,&xa2,&ya2,&xb1,&yb1,&xb2,&yb2)!=EOF){
if (((xb1<=xa1 && xa1<=xb2) && (yb1<=ya2 && ya2<=yb2)) ||
((xb1<=xa1 && xa1<=xb2) && (yb1<=ya1 && ya1<=yb2)) ||
)
put... | main.c: In function 'main':
main.c:9:1: error: expected expression before ')' token
9 | )
| ^
|
s093368531 | p00059 | C++ | import sys
for s in sys.stdin:
a,b,c,d,e,f,g,h=map(float,s.split())
print ["YES","NO"][any([c<e,g<a,d<f,h<b])] | a.cc:1:1: error: 'import' does not name a type
1 | import sys
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
|
s495469644 | p00059 | C++ | #include <iostream>
using namespace std;
int function(double xa1,double ya1,double xb1,double yb1,double xa2,double ya2,double xb2,double yb2){
if( (xa1<=xa2&&xa2<=xb1) && (ya1<=yb2&&yb2<=yb1)||
(xa1<=xa2&&xb1<=xb2)&&(ya1<=ya2&&ya2<=yb1)||
(xa1<=xb2&&xb2<=xb1)&&(ya1<=yb2&&yb2<=yb1)||
(xa1<=xb2&&xb2<=xb1)&&(... | a.cc: In function 'int function(double, double, double, double, double, double, double, double)':
a.cc:11:25: error: expression cannot be used as a function
10 | (xa2<=xa1&&xb1<=xb2)&&(ya2<=ya1)&&(yb1<=yb2)
| ~~~~~~~~~~
11 | ... |
s778875469 | p00059 | C++ | [13t4047y@hcs]~/prokon/aoj/volume0% cat 59k.cc
#include<bits/stdc++.h>
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)++)
... | a.cc:1:10: error: stray '@' in program
1 | [13t4047y@hcs]~/prokon/aoj/volume0% cat 59k.cc
| ^
a.cc:1:1: error: expected unqualified-id before '[' token
1 | [13t4047y@hcs]~/prokon/aoj/volume0% cat 59k.cc
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
f... |
s671602369 | p00059 | C++ | #include "bits/stdc++.h"
using namespace std;
typedef vector<double> vi;
typedef pair<double,double> pii;
typedef long long ll;
#define dump(x) cerr << #x << " = " << (x) << endl
#define rep(i,n) for(int i=0;i<(n);i++)
#define all(a) (a).begin(),(a).end()
#define pb push_back
bool in(double xa1,double ya1,double... | a.cc: In function 'bool solve(double, double, double, double, double, double, double, double)':
a.cc:21:40: error: redeclaration of 'double yb4'
21 | double xb3=xb1,yb3=yb2,yb4=yb2,yb4=yb1;
| ^~~
a.cc:21:32: note: 'double yb4' previously declared here
21 | ... |
s161104958 | p00059 | C++ | import java.awt.Point;
import java.awt.geom.*;
import java.awt.geom.Point2D.Double;
import java.util.*;
public class Main {
Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
new Main();
}
public Main() {
new aoj0059().doIt();
}
class aoj0059{
... | a.cc:1:1: error: 'import' does not name a type
1 | import java.awt.Point;
| ^~~~~~
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.awt.geom.*;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a... |
s602698560 | p00059 | C++ | #include<iostream>
using namespace std;
int main() {
double x[4], x_r[4];
double y[4], y_r[4];
while(cin >> x[0] >> y[0]){
x_r[0] = x[0];
y_r[0] = y[0];
for(int i = 1; i < 4; i++) {
cin >> x[i] >> y[i];
x_r[i] = x[i];
y_r[i] = y[i];
}
sort(x, x + 4);
sort(y, y + 4);
... | a.cc: In function 'int main()':
a.cc:18:5: error: 'sort' was not declared in this scope; did you mean 'short'?
18 | sort(x, x + 4);
| ^~~~
| short
|
s113488739 | p00059 | C++ | #include<iostream>
using namespace std;
int main() {
double x[4], x_r[4];
double y[4], y_r[4];
while(cin >> x[0] >> y[0]){
x_r[0] = x[0];
y_r[0] = y[0];
for(int i = 1; i < 4; i++) {
cin >> x[i] >> y[i];
x_r[i] = x[i];
y_r[i] = y[i];
}
sort(x, x + 4);
sort(y, y + 4);
... | a.cc: In function 'int main()':
a.cc:18:5: error: 'sort' was not declared in this scope; did you mean 'short'?
18 | sort(x, x + 4);
| ^~~~
| short
|
s619796279 | p00059 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
struct rect {
double leftX, leftY;
double rightX, rightY;
};
int main() {
rect a, b;
while(cin >> a.leftX >> a.leftY >> a.rightX >> a.rightY >> b.leftX >> b.leftY >> b.rightX >> b.rightY) {
if(b.rightX < a.leftX || a.rightX < b.leftX || b.right... | a.cc: In function 'int main()':
a.cc:18:20: error: invalid operands of types 'const char [4]' and '<unresolved overloaded function type>' to binary 'operator<<'
18 | cout < "YES" << endl;
| ~~~~~~^~~~~~~
|
s528832934 | p00059 | C++ | using System;
public class _0059 {
public _0059() {
}
public void Run() {
string str;
float[] vals;
while((str = Console.ReadLine()) != null) {
vals = Array.ConvertAll(str.Split(), s => float.Parse(s));
Console.WriteLine((vals[0] <= vals[6] && vals[4] <= vals[2] && vals[1] <= vals[7] && vals[5] <= vals... | a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class _0059 {
| ^~~~~~
|
s116667544 | p00059 | C++ | using Systeml
using System.Linq;
public static void Main() {
string str;
double[] vals;
while((str = Console.ReadLine()) != null) {
vals = str.Split().Take(8).Select(s => double.Parse(s)).ToArray();
Console.WriteLine((vals[0] <= vals[6] && vals[4] <= vals[2] && vals[1] <= vals[7] && vals[5] <= vals[3]) ? "YES" :... | a.cc:1:7: error: expected nested-name-specifier before 'Systeml'
1 | using Systeml
| ^~~~~~~
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public static void Main() {
| ^~~~~~
|
s989802574 | p00059 | C++ | #include<iostream>
m(double a,double b){return a>b?a:b}
main(){for(double a,b,c,d,e,f,g,h;std::cin>>a>>b>>c>>d>>e>>f>>g>>h;){if((m(e,g)+m(-a,-c))*(m(a,c)+m(-e,-g))>=0&&(m(f,g)+m(-b,-d))*(m(b,d)-min(f,g))>=0)std::cout<<"YES\n";else std::cout<<"NO\n";}} | a.cc:2:1: error: ISO C++ forbids declaration of 'm' with no type [-fpermissive]
2 | m(double a,double b){return a>b?a:b}
| ^
a.cc: In function 'int m(double, double)':
a.cc:2:36: error: expected ';' before '}' token
2 | m(double a,double b){return a>b?a:b}
| ^
... |
s125210431 | p00059 | C++ | #include<iostream>
double m(double a,double b){return a>b?a:b;}
main(){for(double a,b,c,d,e,f,g,h;std::cin>>a>>b>>c>>d>>e>>f>>g>>h;){if(((m(e,g)+m(-a,-c))*(m(a,c)+m(-e,-g))>=0)&&((m(f,h)+m(-b,-d))*(m(b,d)+m(-f,-))>=0))std::cout<<"YES\n";else std::cout<<"NO\n";}} | a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
3 | main(){for(double a,b,c,d,e,f,g,h;std::cin>>a>>b>>c>>d>>e>>f>>g>>h;){if(((m(e,g)+m(-a,-c))*(m(a,c)+m(-e,-g))>=0)&&((m(f,h)+m(-b,-d))*(m(b,d)+m(-f,-))>=0))std::cout<<"YES\n";else std::cout<<"NO\n";}}
| ^~~~
a.cc: In funct... |
s855474250 | p00059 | C++ | #include <iostream>
#include <cstdio>
#include <algorithm>
#include <complex>
#include <utility>
#include <vector>
#include <set>
#include <bitset>
#include <map>
using namespace std;
int main()
{
double x, y;
complex<double> coor[4], _coor[4];
while (scanf("%lf %lf ", &x, &y) == 2) {
coor[0] = complex<doub... | a.cc: In function 'int main()':
a.cc:26:30: error: expected primary-expression before '(' token
26 | coor[3] = complex<double>(coor[2].real(), coor.[0].imag());
| ^
a.cc:26:52: error: expected unqualified-id before '[' token
26 | coor[3] = complex<double>(coor[2].real(),... |
s563151651 | p00059 | C++ | #include <iostream>
#include <algorithm>
#include <cassert>
#include <cctype>
#include <cstdio>
#include <math.h>
#include <map>
#include <queue>
#include <string>
using namespace std;
double x1,y1,x2,y2,x3,y3,x4,y4;
int main(){
while(cin>>x1>>y1>>x2>>y2>>x3>>y3>>x4>>y4){
if((x1<=x3&&x2>=x3||x1>=x3&&x1<=x4)&&(y1<=... | a.cc:12:11: error: 'double y1' redeclared as different kind of entity
12 | double x1,y1,x2,y2,x3,y3,x4,y4;
| ^~
In file included from /usr/include/features.h:523,
from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
from /usr/include/x86_64-linux-gnu/c++/1... |
s642655982 | p00059 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <complex>
#include <iostream>
#include <vector>
#include <algorithm>
#include <complex>
using namespace std;
#define EPS (1e-8)
#define EQ(a,b) (abs((a)-(b))<EPS)
typedef complex<double> P;
struct Rect{
double minx;
double miny;
double maxx;
do... | a.cc:74:9: warning: "EQ" redefined
74 | #define EQ(a,b) (abs(a-b)<EPS)
| ^~
a.cc:13:9: note: this is the location of the previous definition
13 | #define EQ(a,b) (abs((a)-(b))<EPS)
| ^~
a.cc:78:8: error: redefinition of 'struct Rect'
78 | struct Rect{
| ^~~~
a.cc:17:8: ... |
s165610882 | p00059 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <complex>
#include <iostream>
#include <vector>
#include <algorithm>
#include <complex>
#include <cmath>
using namespace std;
#define EPS (1e-8)
#define EQ(a,b) (abs((a)-(b))<EPS)
typedef complex<double> P;
struct Rect{
double minx;
double miny;
... | a.cc:75:9: warning: "EQ" redefined
75 | #define EQ(a,b) (abs(a-b)<EPS)
| ^~
a.cc:14:9: note: this is the location of the previous definition
14 | #define EQ(a,b) (abs((a)-(b))<EPS)
| ^~
a.cc:79:8: error: redefinition of 'struct Rect'
79 | struct Rect{
| ^~~~
a.cc:18:8: ... |
s036209281 | p00059 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <complex>
#include <iostream>
#include <vector>
#include <algorithm>
#include <complex>
#include <cmath>
using namespace std;
#define EPS (1e-8)
#define EQ(a,b) (abs(a-b)<EPS)
typedef complex<double> P;
struct Rect{
double minx;
double miny;
dou... | a.cc:79:8: error: redefinition of 'struct Rect'
79 | struct Rect{
| ^~~~
a.cc:18:8: note: previous definition of 'struct Rect'
18 | struct Rect{
| ^~~~
a.cc:86:5: error: redefinition of 'int main()'
86 | int main(){
| ^~~~
a.cc:25:5: note: 'int main()' previously defined her... |
s841062152 | p00059 | C++ | include<iostream>
using namespace std;
int main(void){
double xa[3],ya[3],xb[3],yb[3];
while(true){
for(int i=1;i<3;i++)
if(scanf("%lf %lf",&xa[i],&ya[i])==EOF)return 0;
for(int i=1;i<3;i++)
scanf("%lf %lf",&xb[i],&yb[i]);
if((((xb[1]<=xa[1]&&xa[1]<=xb[2])||(xb[1]<=xa[2]&&xa[2]<=xb[... | a.cc:1:1: error: 'include' does not name a type
1 | include<iostream>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:10:10: error: 'scanf' was not declared in this scope
10 | if(scanf("%lf %lf",&xa[i],&ya[i])==EOF)return 0;
| ^~~~~
a.cc:10:42: error: 'EOF' was not declared in this scop... |
s807475125 | p00059 | C++ | #define _USE_MATH_DEFINES
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <cfloat>
#include <ctime>
#include <cassert>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#inc... | a.cc:44:24: error: 'double __y1' redeclared as different kind of entity
44 | double _x1,_x2,_x3,_x4,__y1,__y2,__y3,__y4;
| ^~~~
In file included from /usr/include/features.h:523,
from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
from /usr/i... |
s880871609 | p00059 | C++ | #define _USE_MATH_DEFINES
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <cfloat>
#include <ctime>
#include <cassert>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#inc... | a.cc:44:24: error: 'double y1' redeclared as different kind of entity
44 | double _x1,_x2,_x3,_x4,y1,y2,y3,y4;
| ^~
In file included from /usr/include/features.h:523,
from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
from /usr/include/x86_6... |
s130494469 | p00059 | C++ | void toRectangle(P p1, P p2, Rectangle &r){
r.ps[0] = {p1.x, p2.y};
r.ps[1] = p2;
r.ps[2] = p1;
r.ps[3] = {p2.x, p1.y};
}
const double EPS = 1e-8;
double abs(double d){
return (d>0)?d:-d;
}
// r1の各4点がr2の中にいくつあるか
int intersectionOfPoints(Rectangle r1, Rectangle r2){
double ub_x = r2.ps[1].x, lb_x = r2.ps[0].x,
... | a.cc:1:6: error: variable or field 'toRectangle' declared void
1 | void toRectangle(P p1, P p2, Rectangle &r){
| ^~~~~~~~~~~
a.cc:1:18: error: 'P' was not declared in this scope
1 | void toRectangle(P p1, P p2, Rectangle &r){
| ^
a.cc:1:24: error: 'P' was not declared in this s... |
s875139222 | p00059 | C++ | #include <iostream>
using namespace std;
int main(){
double xa1,ya1,xa2,ya2,xb1,yb1,xb2,yb2;
while( cin >>xa1>>ya1>>xa2>>ya2>>xb1>>yb1>>xb2>>yb2d ){
if(!(xb2 < xa1 || xa2 < xb1 || ya1 > yb2 || ya2 < yb1 ))cout << "YES"<<endl;
else cout << "NO" << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:5:51: error: 'yb2d' was not declared in this scope; did you mean 'yb2'?
5 | while( cin >>xa1>>ya1>>xa2>>ya2>>xb1>>yb1>>xb2>>yb2d ){
| ^~~~
| yb2
|
s897660095 | p00059 | C++ | #include <cstdio>
#include <vector>
#include <utility>
#include <complex>
using namespace std;
typedef std::pair<float, float> P;
float f[10];
namespace layer0 {
struct Bound {
float mnX, mnY, mxX, mxY;
};
Bound createLhsBound() {
const float mnX = f[0], mnY = f[1], mxX = f[2], mxY = f[3];
return (Bound){mnX... | a.cc: In function 'layer0::Bound layer0::createRhsBound()':
a.cc:29:21: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
29 | Bound createLhsBound() {
| ^~
a.cc:29:21: note: remove parentheses to default-initialize a variable
29 | Bound createLhsBo... |
s343215710 | p00060 | Java | import java.io.*;
public class V0060{
public static void main (String[] args) throws java.lang.Exception
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
while(true){
String s=br.readLine();
String[] str = s.split(" ");
int c1=Integer.parseInt(str[0]);
int c2=Integer.parse... | Main.java:4: error: class V0060 is public, should be declared in a file named V0060.java
public class V0060{
^
1 error
|
s222395365 | p00060 | Java | import java.util.Arrays;
import java.util.Scanner;
public class Main{
Scanner sc;
void solve(){
sc = new Scanner(System.in);
while(sc.hasNext()){
boolean list = new boolean[11];
Arrays.fill(list, true);
int sum = 0;
for(int i=0; i<3; ++i){
int v = ni();
if(i+1 < 3){
sum += v;
... | Main.java:12: error: incompatible types: boolean[] cannot be converted to boolean
boolean list = new boolean[11];
^
Main.java:13: error: no suitable method found for fill(boolean,boolean)
Arrays.fill(list, true);
^
method Arrays.fill(long[],long) is not applicable
(argument mi... |
s903899439 | p00060 | C | #include<cstdio>
#include<iostream>
using namespace std;
int main(){
int a,b,c;
while(scanf("%d %d %d",&a,&b,&c)!=EOF){
int sum=a+b,cnt=0;
for(int i=1;i<=10;i++){
if(sum + i<=20 && i!=a && i!=b && i!=c) cnt++;
}
printf("%s\n",cnt>=4?"YES":"NO");
}
} | main.c:1:9: fatal error: cstdio: No such file or directory
1 | #include<cstdio>
| ^~~~~~~~
compilation terminated.
|
s693922429 | p00060 | C++ | import java.io.*;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.NoSuchElementException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
FastScanner sc = new FastScann... | a.cc:1:1: error: 'import' does not name a type
1 | import java.io.*;
| ^~~~~~
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.util.ArrayDeque;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a... |
s876365930 | p00060 | C++ | #include<stdio.h>
int main(){
int x,y,z;
int S=0,W=0;
while(scanf("%d %d %d",&x,%y,&z)!=0)){
for(int i=1;i<11;i++)
{
if(i!=z&&x+y+i>20)W++;
else if(i!=z&&x+y+i<=20)S++;
}
if(S>=4)printf("Yes\n");
else if(S<4)printf("No\n");
S=0,W=0;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:27: error: expected primary-expression before '%' token
7 | while(scanf("%d %d %d",&x,%y,&z)!=0)){
| ^
a.cc:7:37: error: expected primary-expression before ')' token
7 | while(scanf("%d %d %d",&x,%y,&z)!=0)){
| ... |
s984673096 | p00060 | C++ | #include<stdio.h>
int main(){
int x,y,z;
int c=0;
bool f[12];
while(scanf("%d %d %d",&x,&y,&z)!=EOF){
for(int i=0;i<11;i++)
f[i]=true;
f[x]=false;f[y]=false;f[z]=false;
for(int i=i;i<11;i++)
{if(f[i]==true){if(x+y+i<=20)c++}}
if(c>=4)printf("YES\n");
printf("NO\n");
}
return 0;
} | a.cc: In function 'int main()':
a.cc:16:33: error: expected ';' before '}' token
16 | {if(f[i]==true){if(x+y+i<=20)c++}}
| ^
| ;
|
s830806568 | p00060 | C++ | #include<stdio.h>
int main(){
int x,y,z;
int c=0;
bool f[12];
while(scanf("%d %d %d",&x,&y,&z)!=EOF){
for(int i=0;i<11;i++)
f[i]=true;
f[x]=false;f[y]=false;f[z]=false;
for(int i=i;i<11;i++)
{if(f[i]==true){if(x+y+i<=20)c++}}
if(c>=4)printf("YES\n");
c=0;
printf("NO\n");
}
return 0;
} | a.cc: In function 'int main()':
a.cc:16:33: error: expected ';' before '}' token
16 | {if(f[i]==true){if(x+y+i<=20)c++}}
| ^
| ;
|
s568437159 | p00060 | C++ | #include<iostream>
using namespace std;
int main(){
int c[3];
while(cin>>c[0]){
for(int i=1;i<3;i++)
cin>>c[i];
int s=0;
double p=0;
for(int i=0;i<=10;i++){
if(i!=c[0]||i!=c[1]||i!=c[2]){
if(i+c[1]+c[2]<=20)
s++;
}
if(f!=0)
p=s*100/7;
else
p=100;
cout<<p<<endl;
if(p>=50)
cout<<"YE... | a.cc: In function 'int main()':
a.cc:17:20: error: 'f' was not declared in this scope
17 | if(f!=0)
| ^
a.cc:30:2: error: expected '}' at end of input
30 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s143193624 | p00060 | C++ | #include<iostream>
using namespace std;
int main(){
int c[3];
while(cin>>c[0]){
for(int i=1;i<3;i++)
cin>>c[i];
int s=0;
double p=0;
for(int i=0;i<=10;i++){
if(i!=c[0]||i!=c[1]||i!=c[2]){
if(i+c[1]+c[2]<=20)
s++;
}
p=s*100/7;
if(p>=50)
cout<<"YES"<<endl;
else
cout<<"NO"<<endl;
}
... | a.cc: In function 'int main()':
a.cc:26:2: error: expected '}' at end of input
26 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s147980062 | p00060 | C++ |
using System;
class aoj
{
static void Main()
{
while (true)
{
string a = Console.ReadLine();
if (String.IsNullOrEmpty(a)) break;
string[] b = a.Split(' ');
int c = int.Parse(b[0]), d = int.Parse(b[1]), e = int.Parse(b[2]),f=c+d,g=20-f;
... | a.cc:2:7: error: expected nested-name-specifier before 'System'
2 | using System;
| ^~~~~~
a.cc:36:2: error: expected ';' after class definition
36 | }
| ^
| ;
a.cc: In static member function 'static void aoj::Main()':
a.cc:9:13: error: 'string' was not declared in this scope
9 | ... |
s797747724 | p00060 | C++ | #include <iostream>
using namespace std;
int main(){
int a,b,c;
while(cin>>a>>b>>c){
int k=0;
for(int i=1;i<11;i++){
if(i+a+b>=c&&i+<21)k++;
}
if(k>=5&&a>=c)cout<<"YES"<<endl;
else cout<<"NO"<<endl;
}
} | a.cc: In function 'int main()':
a.cc:8:22: error: expected primary-expression before '<' token
8 | if(i+a+b>=c&&i+<21)k++;
| ^
|
s046931424 | p00060 | C++ | #include<cstdio>
#include<math>
using namespace std;
int main(void){
int C[3];
while(scanf("%d %d %d" ,&C[0], &C[1], &C[2]) != EOF){
int card[16]={0};
int my;
int out = 0;
for(int i = 0; i < 3; i++)card[C[i]] = 1;
my = C[0] + C[1];
for(int i = 1; i < 11; i++){
if(card[i] == 0 && my + i >... | a.cc:2:9: fatal error: math: No such file or directory
2 | #include<math>
| ^~~~~~
compilation terminated.
|
s201954622 | p00060 | C++ | g#include <iostream>
#include <vector>
#include <set>
using namespace std;
int main() {
int p, q, r;
while (cin >> p >> q >> r) {
set<int> possible;
for (int i = 1; i <= 10; i++) possible.insert(i);
possible.erase(p);
possible.erase(q);
possible.erase(r);
int und... | 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/vector:62,
from a.cc:2:
/usr/include... |
s930727012 | p00060 | C++ | #include<iostream>
using namespace std;
int main(){
int C[3],ans,a,b;
while(cin>>c[0]>>c[1]>>c[2]){
b=c[0]+c[1];
ans=0;
for(int i=1;i<11;i++){
if(i!=c[0]&&i!=c[1]&&i!=c[2]){
c=b;
c+=i;
if(c<=20)ans++;}}
if(ans>=4)cout<<"YES"<<endl;
else cout<<"NO"<<endl;}} | a.cc: In function 'int main()':
a.cc:6:12: error: 'c' was not declared in this scope
6 | while(cin>>c[0]>>c[1]>>c[2]){
| ^
|
s327972420 | p00060 | C++ | #include <iostream>
#include <queue>
using namespace std;
int main(){
int c[3];
queue <int> ans;
while(cin>>c[0]){
if(c[0]==0){
break;
}
for(int i=1;i<3;i++){
cin>>c[i];
}
int data[10+1];
int sum;
for(int i=1;i<=10;i++){
data[i]=1;
}
for(int i=0;i<3;i++){
data[c[i]]=0;
}
sum=(c[0... | a.cc: In function 'int main()':
a.cc:36:42: error: expected ';' before ':' token
36 | cout<<"YES"<<endl:
| ^
| ;
|
s658056576 | p00060 | C++ | #include <iostream>
#include <queue>
using namespace std;
int main(){
int c[3];
queue <int> ans;
while(cin>>c[0]){
if(c[0]==0){
break;
}
for(int i=1;i<3;i++){
cin>>c[i];
}
int data[10+1];
int sum;
for(int i=1;i<=10;i++){
data[i]=1;
}
for(int i=0;i<3;i++){
data[c[i]]=0;
}
sum=(c[0... | a.cc: In function 'int main()':
a.cc:36:42: error: expected ';' before ':' token
36 | cout<<"YES"<<endl:
| ^
| ;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.