submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s205013303 | p00021 | C | #include <stdio.h>
int main(void)
{
float x[4];
float y[4];
float num1, num2;
int dataset, i;
scanf("%d", &dataset);
while (dataset > 0){
dataset--;
for (i = 0; i < 4; i++){
scanf("%f %f", &x[i], &y[i]);
}
slope1 = (y[1] - y[0]) / (x[1] -... | main.c: In function 'main':
main.c:17:9: error: 'slope1' undeclared (first use in this function)
17 | slope1 = (y[1] - y[0]) / (x[1] - x[0]);
| ^~~~~~
main.c:17:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:9: error: 'slope2' undeclared (fir... |
s272428788 | p00021 | C | #include <stdio.h>
int main(void)
{
float x[4];
float y[4];
float slope1, slope2;
int dataset, i;
scanf("%d", &dataset);
while (dataset > 0){
dataset--;
for (i = 0; i < 4; i++){
scanf("%f %f", &x[i], &y[i]);
}
slope1 = (y[1] - y[0]) / (x[... | main.c: In function 'main':
main.c:25:9: error: expected declaration or statement at end of input
25 | }
| ^
main.c:25:9: error: expected declaration or statement at end of input
|
s284203812 | p00021 | C | #include<stdio.h>
#include<string.h>
int main(){
int i,n;
double x1,y1,x2,y2,x3,y3,x4,y4;
scanf_s("%d",&n);
for(i=0;i<n;i++){
scanf_s("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
if(x1-x2==0.0 && x3-x4==0.0){
printf("YES\n");
}else if(y1-y2==0.0 && y3-y4==0.0){
printf("YES\n");
... | main.c: In function 'main':
main.c:7:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
7 | scanf_s("%d",&n);
| ^~~~~~~
| scanf
|
s332170464 | p00021 | C | #include <stdio.h>
double slope(double x1, double x2, double y1, double y2) {
printf("x1-x2 = %lf\n",x1-x2);
printf("y1-y2 = %lf\n", y1 - y2);
double slp = (x1 - x2) / (y1 - y2);
return slp;
}
int main(void)
{
int n;
double x1[100], x2[100], x3[100], x4[100], y1[100], y2[100], y3[100], y4[100];
int i = 0;
do... | main.c: In function 'main':
main.c:18:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
18 | scanf_s("%d",&n);
| ^~~~~~~
| scanf
|
s854522289 | p00021 | C | #include <cstdio>
int main( ) {
int i, n;
double x[4][100], y[4][100];
double slope1[100], slope2[100];
scanf("%d", &n);
for (i = 0; i < n; i++) {
for (int j = 0; j < 4; j++) {
scanf("%lf %lf", &x[j][i], &y[j][i]);
slope1[i] = (y[1][i] - y[0][i]) / (x[1][i] - x[0][i]);
slope2[i] = (y[3][i] - y[2][i]) ... | main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s242444010 | p00021 | C | #include <stdio.h>
int main(void)
{
int n;
double x1, y1, x2, y2, x3, y3, x4, y4;
double ax, ay, bx, by;
double cross;
scanf_s("%d", &n);
while (n) {
scanf_s("%lf%lf%lf%lf%lf%lf%lf%lf", &x1, &y1, &x2, &y2, &x3, &y3, &x4, &y4);
ax = x2 - x1;
ay = y2 - y1;
bx = ... | main.c: In function 'main':
main.c:10:5: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
10 | scanf_s("%d", &n);
| ^~~~~~~
| scanf
|
s957340241 | p00021 | C | import java.io.*;
class Main{
public static void main(String[] args){
try{
BufferedReader sc = new BufferedReader(new InputStreamReader(System.in));
String st = sc.readLine();
int n = Integer.valueOf(st);
for(int i=0; i<n; i++){
String[] pt = sc.readLine().split(" ");
... | main.c:1:1: error: unknown type name 'import'
1 | import java.io.*;
| ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
1 | import java.io.*;
| ^
main.c:3:1: error: unknown type name 'class'
3 | class Main{
| ^~~~~
main.c:3:11: error: e... |
s851845017 | p00021 | C | #include <stdio.h>
int main(void){
int n, i;
double x1, y1, x2, y2, x3, y3, x4, y4, k1, k2;
scanf("%d", &n);
for(i = 0; i < n; i ++){
scanf("%lf%lf%lf%lf%lf%lf%lf%lf", &x1, &y1, &x2, &y2, &x3, &y3, &x4, &y4);
if(x2 - x1 == 0 && x3 - x4 == 0){
printf("YES");
continue;
}
else if(x2 - ... | main.c: In function 'main':
main.c:14:7: error: implicit declaration of function 'prinf'; did you mean 'printf'? [-Wimplicit-function-declaration]
14 | prinf("NO");
| ^~~~~
| printf
|
s282877570 | p00021 | C | #include <stdio.h>
int main(void){
int n, i;
double x1, y1, x2, y2, x3, y3, x4, y4, k1, k2;
scanf("%d", &n);
for(i = 0; i < n; i ++){
scanf("%lf%lf%lf%lf%lf%lf%lf%lf", &x1, &y1, &x2, &y2, &x3, &y3, &x4, &y4);
if(x2 - x1 == 0 && x3 - x4 == 0){
printf("YES\n");
continue;
}
else if(x2 ... | main.c: In function 'main':
main.c:20:22: error: implicit declaration of function 'k' [-Wimplicit-function-declaration]
20 | if((y3 - y1) - k(x3 - x1) == 0)
| ^
main.c:21:9: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
2... |
s387654138 | p00021 | C | #include <stdio.h>
int main(void){
int n, i;
double x1, y1, x2, y2, x3, y3, x4, y4, k1, k2;
scanf("%d", &n);
for(i = 0; i < n; i ++){
scanf("%lf%lf%lf%lf%lf%lf%lf%lf", &x1, &y1, &x2, &y2, &x3, &y3, &x4, &y4);
if(x2 - x1 == 0 && x3 - x4 == 0){
printf("YES\n");
continue;
}
else if(x2 ... | main.c: In function 'main':
main.c:20:22: error: implicit declaration of function 'k' [-Wimplicit-function-declaration]
20 | if((y3 - y1) - k(x3 - x1) == 0)
| ^
main.c:21:9: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
2... |
s462690002 | p00021 | C | #include <stdio.h>
int main(void){
int n, i;
double x1, y1, x2, y2, x3, y3, x4, y4, k1, k2;
scanf("%d", &n);
for(i = 0; i < n; i ++){
scanf("%lf%lf%lf%lf%lf%lf%lf%lf", &x1, &y1, &x2, &y2, &x3, &y3, &x4, &y4);
if(x1 == x2 && y1 == y2 || x3 == x4 && y3 = y4)
printf("NO\n");
else if(x2 - x1 =... | main.c: In function 'main':
main.c:9:47: error: lvalue required as left operand of assignment
9 | if(x1 == x2 && y1 == y2 || x3 == x4 && y3 = y4)
| ^
|
s137465536 | p00021 | C | #include <stdio.h>
int main(void){
int n, i;
double x[10], y[10], xy;
scanf("%d" &n);
for ( i = 0; i < n; i++) {
scanf("%lf %lf %lf %lf %lf %lf %lf %lf", &x[1], &y[1], &x[2], &y[2], &x[3], &y[3], &x[4], &y[4]);
if ( ( y[2] - y[1] ) / ( x[2] - x[1] ) == ( y[4] - y[3] ) / ( x[4] - x[3] ) ... | main.c: In function 'main':
main.c:5:16: error: invalid operands to binary & (have 'char *' and 'int')
5 | scanf("%d" &n);
| ~~~~ ^
| |
| char *
|
s837842026 | p00021 | C | #include<bits/stdc++.h>
using namespace std;
using ld=double;
const ld EPS=1e-6;
using Point=complex<ld>;
ld cross(Point a,Point b){
return a.real()*b.imag()-a.imag()*b.real();
}
int main(){
int n;
cin>>n;
for(int i=0;i<n;i++){
vector<Point> xy(4);
for(int i=0;i<4;i++){
dou... | main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
1 | #include<bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s442159387 | p00021 | C | #include <stdio.h>
#include <stdlib.h>
int main( void )
{
unsigned char i = 0;
unsigned char num = 0;
float x1,y1 = 0;
float x2,y2 = 0;
float x3,y3 = 0;
float x4,y4 = 0;
scanf("%d",&num);
for(i=0; i<num; i++)
{
scanf("%f %f %f %f %f %f %f %f", &x1, &y1, &x2, &... | main.c: In function 'main':
main.c:29:1: error: stray '\343' in program
29 | <U+3000><U+3000>
| ^~~~~~~~
main.c:29:3: error: stray '\343' in program
29 | <U+3000><U+3000>
| ^~~~~~~~
main.c:30:1: error: stray '\343' in program
30 | <U+3000><U+3000><U+3000>
| ^~~~~~~~
main.c:30:3: error... |
s723234806 | p00021 | C | #include <stdio.h>
#include <stdlib.h>
int main( void )
{
unsigned char i = 0;
unsigned char num = 0;
float x1,y1 = 0;
float x2,y2 = 0;
float x3,y3 = 0;
float x4,y4 = 0;
scanf("%d",&num);
for(i=0; i<num; i++)
{
scanf("%f %f %f %f %f %f %f %f", &x1, &y1, &x2, &... | main.c: In function 'main':
main.c:29:1: error: stray '\343' in program
29 | <U+3000><U+3000>
| ^~~~~~~~
main.c:29:3: error: stray '\343' in program
29 | <U+3000><U+3000>
| ^~~~~~~~
main.c:30:1: error: stray '\343' in program
30 | <U+3000><U+3000>return 0;
| ^~~~~~~~
main.c:30:3: erro... |
s824494627 | p00021 | C | #include<stdio.h>
typedef struct point{
double x;
double y;
}point;
int main(){
int n;
point A,B,C,D;
double m1,m2;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%lf %lf",&A.x,&A.y);
scanf("%lf %lf",&B.x,&B.y);
scanf("%lf %lf",&C.x,&C.y);
scanf("%lf %lf",&D.x,&D.y);
m1=(A.y-B.y)/(A.x-B.x);
m2=(C.y-D.y... | main.c: In function 'main':
main.c:13:6: error: 'i' undeclared (first use in this function)
13 | for(i=0;i<n;i++){
| ^
main.c:13:6: note: each undeclared identifier is reported only once for each function it appears in
|
s371467771 | p00021 | C | #include <stdio.h>
int main(void){
int i,j;
double a,b;
double x1,y1;//A
double x2,y2;//B
double x3,y3;//C
double x4,y4;//D
scanf("%d",&j);
for(I=0;i<=j;i++){
scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
a = (y1-y2)/(x1-x2);
b = (y3-y... | main.c: In function 'main':
main.c:11:9: error: 'I' undeclared (first use in this function)
11 | for(I=0;i<=j;i++){
| ^
main.c:11:9: note: each undeclared identifier is reported only once for each function it appears in
|
s873972526 | p00021 | C | #include <stdio.h>
int main(void){
int i,j;
int a,b;
double x1,y1;//A
double x2,y2;//B
double x3,y3;//C
double x4,y4;//D
scanf("%d",&j);
for(i=1;i<=j;i++){
scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
if((y1-y2)/(x1-x2) == (y3-y4)/(x3-x4))
... | main.c: In function 'main':
main.c:17:9: error: expected '}' before 'else'
17 | else
| ^~~~
|
s944998579 | p00021 | C | #include <stdio.h>
int main(void){
int i,j;
int a,b;
double x1,y1;//A
double x2,y2;//B
double x3,y3;//C
double x4,y4;//D
scanf("%d",&j);
for(i=1;i<=j;i++){
scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
if((y1-y2)/(x1-x2) == (y3-y4)/(x3-x4))
... | main.c: In function 'main':
main.c:19:1: error: expected declaration or statement at end of input
19 | }
| ^
|
s051758821 | p00021 | C | #include <stdio.h>
int main(void){
int i,j;
int a,b;
double x1,y1;//A
double x2,y2;//B
double x3,y3;//C
double x4,y4;//D
scanf("%d",&j);
for(I=0;i<=j;i++){
scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
if((y1-y2)/(x1-x2) == (y3-y4)/(x3-x4))
... | main.c: In function 'main':
main.c:11:9: error: 'I' undeclared (first use in this function)
11 | for(I=0;i<=j;i++){
| ^
main.c:11:9: note: each undeclared identifier is reported only once for each function it appears in
|
s364727927 | p00021 | C | #include <stdio.h>
int main(void){
int i,j;
int a,b;
double x1,y1;//A
double x2,y2;//B
double x3,y3;//C
double x4,y4;//D
scanf("%d",&j);
for(I=1;i<=j;i++){
scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
if((y1-y2)/(x1-x2) == (y3-y4)/(x3-x4))
... | main.c: In function 'main':
main.c:11:9: error: 'I' undeclared (first use in this function)
11 | for(I=1;i<=j;i++){
| ^
main.c:11:9: note: each undeclared identifier is reported only once for each function it appears in
|
s879072207 | p00021 | C | #include <stdio.h>
int main(void){
int i,j;
int a,b;
double x1,y1;//A
double x2,y2;//B
double x3,y3;//C
double x4,y4;//D
scanf("%d",&j);
for(I=1;i<=j;i++){
scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
if((y1-y2)/(x1-x2) == (y3-y4)/(x3-x4))
... | main.c: In function 'main':
main.c:11:9: error: 'I' undeclared (first use in this function)
11 | for(I=1;i<=j;i++){
| ^
main.c:11:9: note: each undeclared identifier is reported only once for each function it appears in
|
s144408759 | p00021 | C | #include <stdio.h>
int main(void){
int i,j;
double a,b;
double x1,y1;//A
double x2,y2;//B
double x3,y3;//C
double x4,y4;//D
scanf("%d",&j);
for(I=0;i<=j;i++){
scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
a = (y1-y2)/(x1-x2);
b = (y3-y... | main.c: In function 'main':
main.c:11:9: error: 'I' undeclared (first use in this function)
11 | for(I=0;i<=j;i++){
| ^
main.c:11:9: note: each undeclared identifier is reported only once for each function it appears in
|
s835345825 | p00021 | C | #include <stdio.h>
#include <math.h>
const double eps 1e-10;
int n;
double x1, x2, x3, x4;
double y1, y2, y3, y4;
//増加率を見る方法
int solve1() {
double r1 = (y2-y1)/(x2-x1);
double r2 = (y4-y3)/(x4-x3);
return (fabs(r1-r2) < eps)
}
int main() {
scanf("%d", &n);
for(int i=0; i<n; ++i) {
scanf(... | main.c:4:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before numeric constant
4 | const double eps 1e-10;
| ^~~~~
main.c:8:8: error: 'y1' redeclared as different kind of symbol
8 | double y1, y2, y3, y4;
| ^~
In file included from /usr/include/features.h:523,
... |
s399049512 | p00021 | C | #include <stdio.h>
#include <math.h>
const double eps = 1e-10;
int n;
double x1, x2, x3, x4;
double y1, y2, y3, y4;
//増加率を見る方法
int solve1() {
double r1 = (y2-y1)/(x2-x1);
double r2 = (y4-y3)/(x4-x3);
return (fabs(r1-r2) < eps);
}
int main() {
scanf("%d", &n);
for(int i=0; i<n; ++i) {
sca... | main.c:8:8: error: 'y1' redeclared as different kind of symbol
8 | double y1, y2, y3, y4;
| ^~
In file included from /usr/include/features.h:523,
from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
from /usr/include/stdio.h:28,
from main.c:... |
s001816992 | p00021 | C | #include <stdio.h>
#include <math.h>
const double eps = 1e-10;
int n;
double x1, x2, x3, x4;
double y1, y2, y3, y4;
//増加率を見る方法
int solve1() {
double r1 = (y2-y1)/(x2-x1);
double r2 = (y4-y3)/(x4-x3);
return (fabs(r1-r2) < eps);
}
int main() {
scanf("%d", &n);
for(int i=0; i<n; ++i) {
sca... | main.c:8:8: error: 'y1' redeclared as different kind of symbol
8 | double y1, y2, y3, y4;
| ^~
In file included from /usr/include/features.h:523,
from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
from /usr/include/stdio.h:28,
from main.c:... |
s288437186 | p00021 | C | #include <stdio.h>
#include <math.h>
const double eps 1e-10;
int n;
//math.hライブラリでy1, y2...とかって変数名が使われてるらしい
double ix1, ix2, ix3, ix4;
double iy1, iy2, iy3, iy4;
//増加率を見る方法
int solve1() {
double r1 = (iy2-y1)/(ix2-x1);
double r2 = (iy4-y3)/(ix4-x3);
return (fabs(r1-r2) < eps)
}
int main() {
scanf("%... | main.c:4:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before numeric constant
4 | const double eps 1e-10;
| ^~~~~
main.c: In function 'solve1':
main.c:13:21: error: invalid operands to binary - (have 'double' and 'double (*)(double)')
13 | double r1 = (iy2-y1)/(ix2-x1);
... |
s569264017 | p00021 | C | #include <stdio.h>
#include <math.h>
const double eps = 1e-10;
int n;
//math.hライブラリでy1, y2...とかって変数名が使われてるらしい
double ix1, ix2, ix3, ix4;
double iy1, iy2, iy3, iy4;
//増加率を見る方法
int solve1() {
double r1 = (iy2-y1)/(ix2-x1);
double r2 = (iy4-y3)/(ix4-x3);
return (fabs(r1-r2) < eps)
}
int main() {
scanf(... | main.c: In function 'solve1':
main.c:13:21: error: invalid operands to binary - (have 'double' and 'double (*)(double)')
13 | double r1 = (iy2-y1)/(ix2-x1);
| ^
| |
| double (*)(double)
main.c:13:31: error: 'x1' undeclared (first use i... |
s935715377 | p00021 | C | #include<stdio.h>
int main(){
int n;
double x1,x2,x3,x4,y1,y2,y3,y4,m1,m2;
scanf("%d",&n);
while(n-- > 0){
scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
m1 = (y2-y1)/(x2-x1);
m2 = (y4-y3)/(x4-x3);
if(m1 == m2)printf("YES\n"):printf("NO\n");
}
}
| main.c: In function 'main':
main.c:13:32: error: expected ';' before ':' token
13 | if(m1 == m2)printf("YES\n"):printf("NO\n");
| ^
| ;
|
s163609695 | p00021 | C | #include<stdio.h>
int main(void){
int a,i;
double x[4],y[4];
double b[100],c[100];
scanf("%d",&a);
for(i = 1; i <= a; i++){
scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x[0],&[0]1,&x[1],&y[1],&x[2],&y[2],&x[3],&y[3]);
}
b[i] = (y[1] - y[0])/(x[1] - x[0]);
c[i] = (y[3] - y[2])/(x[3] - x[2]);
for(i = 1; i <= a; i++){
... | main.c: In function 'main':
main.c:11:50: error: expected expression before '[' token
11 | scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x[0],&[0]1,&x[1],&y[1],&x[2],&y[2],&x[3],&y[3]);
| ^
|
s438511515 | p00021 | C | #include<stdio.h>
int main(void){
int a,i;
double x[4],y[4],b,c;
scanf("%d",&a);
for(i = 1; i <= a; i++){
scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x[0],&y[0],&x[1],&y[1],&x[2],&y[2],&x[3],&y[3]);
b = (y[1] - y[0])/(x[1] - x[0]);
c = (y[3] - y[2])/(x[3] - x[2]);
if(b == c)
printf("YES\n");
else
print... | main.c: In function 'main':
main.c:23:1: error: expected declaration or statement at end of input
23 | return 0;
| ^~~~~~
|
s518751766 | p00021 | C | #include<stdio.h>
int main(void){
int n, i;
double x1, x2, x3, x4, y1, y2, y3, y4;
scanf("%d",n);
for(i=0; i<n; i++){
scanf("%lf %lf %lf %lf %lf %lf %lf %lf %lf %lf",x1, y1, x2, y2, x3, y3, x4, y4);
ab = (y2 - y1) / (x2 - x1);
cd = (y4 - y3) / (x4 - x3);
if( ab == cd ){
printf("YES\n");
}else{
... | main.c: In function 'main':
main.c:10:17: error: 'ab' undeclared (first use in this function)
10 | ab = (y2 - y1) / (x2 - x1);
| ^~
main.c:10:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:17: error: 'cd' undeclared (first us... |
s584381108 | p00021 | C | # AOJ 0021: Parallelism
# Python3 2018.6.15 bal4u
EPS = 1e-7
def EQ(a, b):
return True if abs(a - b) < EPS else False
n = int(input())
for i in range(n):
ax1, ay1, ax2, ay2, bx1, by1, bx2, by2 = list(map(float, input().split()))
f = False
if EQ(ax1, ax2) and EQ(bx1, bx2): f = True
elif EQ((ay2-ay1)*(bx2-bx1), ... | main.c:1:3: error: invalid preprocessing directive #AOJ
1 | # AOJ 0021: Parallelism
| ^~~
main.c:2:3: error: invalid preprocessing directive #Python3
2 | # Python3 2018.6.15 bal4u
| ^~~~~~~
main.c:4:1: warning: data definition has no type or storage class
4 | EPS = 1e-7
| ^~~
main.c:4:... |
s315447001 | p00021 | C | #include <stdio.h>
int main(void){
int i,n;
double x1,x2,x3,x4,y1,y2,y3,y4,AB,CD;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d %d %d %d %d %d %d",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
AB=(x2-x1)/(y2-y1);
CD=(x4-x3)/(y4-y3);
if(AB==CD)
puts("YES");
else
... | main.c: In function 'main':
main.c:13:19: error: expected ';' before '}' token
13 | puts("NO")
| ^
| ;
14 | }
| ~
|
s543482053 | p00021 | C | #include <stdio.h>
int main(void){
double x1, y1, x2, y2, x3, y3, x4, y4;
double a1,a2,b1,b2;
double c1,c2;
int n;
int i;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1, &y1, &x2, &y2, &x3, &y3, &x4, &y4);
a1=x2-x1;
a2=x4-x3;
b1=y2-y1;
b2=y4-y3;
c1=b1/... | main.c: In function 'main':
main.c:24:1: error: expected declaration or statement at end of input
24 | }
| ^
|
s113401510 | p00021 | C | #include<stdio.h>
int main(){
int i,n;
double a[2],b[2],c[2],d[2];
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%lf%lf%lf%lf%lf%lf%lf%lf",&a[0],&a[1],&b[0],&b[1],&c[0],&c[1],&d[0],&d[1]);
if((b[1]-a[1])*(d[0]-c[0])==(b[0]-a[0])(d[1]-c[1]))
printf("YES\n");
else
printf("NO\n");
}
return 0;
} | main.c: In function 'main':
main.c:8:34: error: called object is not a function or function pointer
8 | if((b[1]-a[1])*(d[0]-c[0])==(b[0]-a[0])(d[1]-c[1]))
| ~~~~~^~~~~~
|
s048735860 | p00021 | C | #include<stdio.h>
int main()
{
int a,i,j[100000];
float x1,y1,x2,y2,x3,y3,x4,y4;
for(a=0;a<100;a++)
{
j[a]=0;
}
scanf("%d",&a);
for(i=0;i<a;i++)
{
scanf("%f%f%f%f%f%f%f%f",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
if(((x1-x2)/(x3-x4))--((y1-y2)/(y3-y4)))
j[i]=1;
}
for(i=0;i<a;i++)
{
if(j[i]==0)
pr... | main.c: In function 'main':
main.c:14:37: error: lvalue required as decrement operand
14 | if(((x1-x2)/(x3-x4))--((y1-y2)/(y3-y4)))
| ^~
|
s797582430 | p00021 | C | #include<stdio.h>
int main()
{
int a,i,j[100000];
float x1,y1,x2,y2,x3,y3,x4,y4;
for(a=0;a<100;a++)
{
j[a]=0;
}
scanf("%d",&a);
for(i=0;i<a;i++)
{
scanf("%f%f%f%f%f%f%f%f",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
if((x1-x2)/(x3-x4))!=((x1-x3)/(y1-y3))&&((x1-x2)/(x3-x4))==((y1-y2)/(y3-y4)))
j[i]=1;
}
fo... | main.c: In function 'main':
main.c:14:36: error: expected expression before '!=' token
14 | if((x1-x2)/(x3-x4))!=((x1-x3)/(y1-y3))&&((x1-x2)/(x3-x4))==((y1-y2)/(y3-y4)))
| ^~
main.c:14:93: error: expected statement before ')' token
14 | if((... |
s412974921 | p00021 | C | #include <stdio.h>
int main(){
int setcount;
double x1, y1, x2, y2, x3, y3, x4, y4;
double r1, r2;
int i;
scanf("%d", &setcount);
for(i=0; i<setcount; i++){
scanf(%f %f %f %f %f %f %f %f", &x1, &y1, &x2, &y2, &x3, &y3, &x4, &y4);
r1=(y2-y1)/(x2-x1);
r2=(y4-y3)/(x4-x3);
if(r1==r2) printf("Y... | main.c: In function 'main':
main.c:11:11: error: expected expression before '%' token
11 | scanf(%f %f %f %f %f %f %f %f", &x1, &y1, &x2, &y2, &x3, &y3, &x4, &y4);
| ^
main.c:11:34: warning: missing terminating " character
11 | scanf(%f %f %f %f %f %f %f %f", &x1, &y1, &x2, &y2, &x3, &y3, ... |
s113521379 | p00021 | C | #include <stdio.h>
typedef struct {
double data[2];
} D_SET;
int main(void)
{
D_SET d[4];
int i, j;
int no;
double hj[2][2];
double hj_count;
int flag;
scanf("%d", &no);
while (no > 0){
hj_count = 0;
flag = 0;
for (i = 0; i < 4; i++){
for (j = 0; j < 2; j++){
scanf("%f", &d[i].data[j]);
}... | main.c: In function 'main':
main.c:27:43: error: array subscript is not an integer
27 | hj[hj_count][j] = d[i - 1].data[j] - d[i].data[j];
| ^
|
s888184109 | p00021 | C | #include <stdio.h>
typedef struct {
double data[2];
} D_SET;
int main(void)
{
D_SET d[4];
int i, j;
int no;
double hj[2][2];
double hj_count;
int flag;
scanf("%d", &no);
while (no > 0){
hj_count = 0;
flag = 0;
for (i = 0; i < 4; i++){
for (j = 0; j < 2; j++){
scanf("%f", &d[i].data[j]);
}... | main.c: In function 'main':
main.c:27:43: error: array subscript is not an integer
27 | hj[hj_count][j] = d[i - 1].data[j] - d[i].data[j];
| ^
|
s017245276 | p00021 | C | #include<stdio.h>
int main()
{
float x1,y1,x2,y2,x3,y3,x4,y4
int flg;
int datanum,i;
scanf("%d",&datanum);
for(i=0;i<datanum;i++)
{
flg=0;
scanf("%f %f %f %f %f %f %f %f",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
if((y2-y1)/(x2-x1)==(y4-y3)/(x4-x3))
{
flg=1;
}
if(flg)
{
puts("YES");
}
else
{
... | main.c: In function 'main':
main.c:6:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
6 | int flg;
| ^~~
main.c:11:17: error: 'flg' undeclared (first use in this function)
11 | flg=0;
| ^~~
main.c:11:17: note: each undeclared iden... |
s375954181 | p00021 | C | #include <iostream>
int main(){int n,i,j;double x[4],y[4];std::cin>>n;for(i=0;i<n;i++){for(j=0;j<4;j++)std::cin>>x[j]>>y[j];if(((y[0]-y[1])/(x[0]-x[1]))==((y[2]-y[3])/(x[2]-x[3])))std::cout<<"YES\n";else std::cout<<"NO\n";}} | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s378230271 | p00021 | C | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
while(n--!=0){
double[] a=new double[8];
for(int i=0;i<8;i++)a[i]=sc.nextDouble();
double e=(a[2]-a[0])*(a[7]-a[5])-(a[3]-a... | main.c:1:1: error: unknown type name 'import'
1 | import java.util.*;
| ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
1 | import java.util.*;
| ^
main.c:2:1: error: unknown type name 'public'
2 | public class Main {
| ^~~~~~
main.c:... |
s543369151 | p00021 | C | import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args)
throws java.io.IOException{
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
for(int i=0;i<n;i++){
//scan.nextLine();
float x1,y1,x2,y2,x3,y3,x4,y4;
x1= scan.nextFloat();
y1= scan.nextF... | main.c:1:1: error: unknown type name 'import'
1 | import java.io.*;
| ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
1 | import java.io.*;
| ^
main.c:2:1: error: unknown type name 'import'
2 | import java.util.*;
| ^~~~~~
main.c:2:12... |
s911106573 | p00021 | C | #include <stdio.h>
#include <ctype.h>int main(void) {
double x1, y1, x2, y2, x3, y3, x4, y4;
int n;
... | main.c:2:19: warning: extra tokens at end of #include directive
2 | #include <ctype.h>int main(void) {
| ^~~
main.c:3:16: warning: built-in function 'y1' declared as non-function [-Wbuiltin-declaration-mismatch]
3 | double x1, y1, x2, y2, x3, y3, x4, y4;
| ^~
mai... |
s914439672 | p00021 | C | #include <stdio.h>
#include <ctype.h>int main(void) {
double x1, y1, x2, y2, x3, y3, x4, y4;
int n;
... | main.c:2:19: warning: extra tokens at end of #include directive
2 | #include <ctype.h>int main(void) {
| ^~~
main.c:3:16: warning: built-in function 'y1' declared as non-function [-Wbuiltin-declaration-mismatch]
3 | double x1, y1, x2, y2, x3, y3, x4, y4;
| ^~
mai... |
s628882346 | p00021 | C | #include <stdio.h>
#include <ctype.h>int main(void) { double x1, y1, x2, y2, x3, y3, x4, y4;
int n;
... | main.c:2:19: warning: extra tokens at end of #include directive
2 | #include <ctype.h>int main(void) { double x1, y1, x2, y2, x3, y3, x4, y4;
| ^~~
main.c:4:91: error: expected declaration specifiers or '...' before string co... |
s496248299 | p00021 | C | #include<stdio.h>
int main(){
int i,n,flagX[2],flagY[2];
double x[4],y[4],a[2];
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x[0],&y[0],&x[1],&y[1],&x[2],&y[2],&x[3],&y[3]);
flagY[0]=0;
flagX[0]=0;
flagY[1]=0;
flagX[1]=0;
a[0]=0;
a[1]=0;
if(x[0]-x[1]==0){
flagY[... | In file included from /usr/include/stdio.h:34,
from main.c:1:
main.c: In function 'main':
main.c:21:30: error: incompatible types when assigning to type 'double' from type 'void *'
21 | a[0]=NULL;
| ^~~~
main.c:25:30: error: incompatible typ... |
s386937751 | p00021 | C | #include<stdio.h>
main(){
double x[100],y[100];
double a,b,c,d;
int n,j;
scanf("%d",&n);
for(j=0;j<n;j++){
scanf("%lf%lf%lf%lf%lf%lf%lf%lf",&x[j],&y[j],&x[j+1],&y[j+1],&x[j+2],&y[j+2],&x[j+3],&y[j+3]);
a=x[j]-x[j+1];
b=y[j]-y[j+1];
c=x[j+2]-x[j+3];
d=y[j+2]-y[j+3];
if((a*d-b*c)==0){
printf("YES\n");... | main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
2 | main(){
| ^~~~
main.c: In function 'main':
main.c:19:9: error: expected declaration or statement at end of input
19 | return 0;
| ^~~~~~
|
s349494975 | p00021 | C | #include <stdio.h>
void swap(double *x,double *y){
double t;
t=*x;*x=*y;*y=t;
}
int main()
{
double x1,y1,x2,y2,x3,y3,x4,y4;
int n,i;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,%x4,&y4);
if(x1<x2) swap(&x1,&x2);
if(y1<y2) swap(&y1,&y2);
if(x3<x4) ... | main.c: In function 'main':
main.c:15:81: error: expected expression before '%' token
15 | scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,%x4,&y4);
| ^
|
s876559344 | p00021 | C | #include<stdio.h>
int main(void){
int i,n;
double x[4],y[4],ab,cd;
for("%d",&n);
for(i=0; i<n; i++){
scanf("%lf%lf%lf%lf%lf%lf%lf%lf",&x[0],&y[0],&x[1],&y[1],&x[2],&y[2],&x[3],&y[3]);
ab=(y[0]-y[1])/(x[0]-x[1]);
cd=(y[2]-y[3])/(x[2]-x[3]);
if(ab<0){
ab*=-1;
... | main.c: In function 'main':
main.c:5:16: error: expected ';' before ')' token
5 | for("%d",&n);
| ^
| ;
main.c:5:16: error: expected expression before ')' token
|
s127479242 | p00021 | C | #include<stdio.h>
int main(){
int n,i;
double a,b,x1,y1,x2,y2,x3,y3,x4,y4;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
a = (y2 - y1)/(x2 - x1);
b = (y4 - y3)/(x4 - x3);
if(a==b) printr("YES\n");
else printf("NO\n");
}
return 0;
} | main.c: In function 'main':
main.c:10:18: error: implicit declaration of function 'printr'; did you mean 'printf'? [-Wimplicit-function-declaration]
10 | if(a==b) printr("YES\n");
| ^~~~~~
| printf
|
s209940520 | p00021 | C | #include<stdio.h>
int main(void){
double x1,x2,x3,x4,y1,y2,y3,y4;
double a,b;
int n,i;
scanf("%d",&n);
for(i = 0; i < n; i++){
scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
a = (y2 - y1)/(x2 - x1);
b = (y4 - y3)/(x4 - x3);
if(a == b){
pri... | main.c: In function 'main':
main.c:12:19: error: '\U0000ff5b' undeclared (first use in this function)
12 | if(a == b){
| ^~
main.c:12:19: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:21: error: expected ';' before 'printf'
12 | ... |
s313895842 | p00021 | C | #include<stdio.h>
int main(void){
double x1,x2,x3,x4,y1,y2,y3,y4;
double a,b;
int i, n;
scanf("%d",&n);
for(i = 0; i < n; i++){
scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
a = (y2 - y1) / (x2 - x1);
b = (y4 - y3) / (x4 - x3);
if(a == ... | main.c: In function 'main':
main.c:20:1: error: expected declaration or statement at end of input
20 | }
| ^
|
s417794456 | p00021 | C | #include<stdio.h>
#include<string.h>
#include<stdlib.h>
int main(void)
{
double a[4][2],i;
for(i=0;i<4;i++)
scanf("%lf %lf",&a[i][0],&a[i][1]);
if(a[0][0]==a[1][0] && a[2][0]==a[3][0])
printf("YES\n");
else if( (a[1][1]-a[0][1])/(a[1][0]-a[0][0])==(a[3][1]-a[2][1])/(a[3][0]-a[2][0]) )
printf("Y... | main.c: In function 'main':
main.c:10:23: error: array subscript is not an integer
10 | scanf("%lf %lf",&a[i][0],&a[i][1]);
| ^
main.c:10:32: error: array subscript is not an integer
10 | scanf("%lf %lf",&a[i][0],&a[i][1]);
| ^
|
s978431266 | p00021 | C | #include<stdio.h>
#include<string.h>
#include<stdlib.h>
int main(void)
{
double a[4][2],i;
for(i=0;i<4;i++)
scanf("%lf %lf",&a[i][0],&a[i][1]);
if(a[0][0]==a[1][0] && a[2][0]==a[3][0])
printf("YES\n");
else if( (a[1][1]-a[0][1])/(a[1][0]-a[0][0])==(a[3][1]-a[2][1])/(a[3][0]-a[2][0]) )
printf("Y... | main.c: In function 'main':
main.c:10:23: error: array subscript is not an integer
10 | scanf("%lf %lf",&a[i][0],&a[i][1]);
| ^
main.c:10:32: error: array subscript is not an integer
10 | scanf("%lf %lf",&a[i][0],&a[i][1]);
| ^
|
s740747312 | p00021 | C | include<stdio.h>
int main(void){
int i,j,n;
double x[4],y[4];
scanf("%d", &n);
for (i = 0; i < n; i++){
for (j = 0; j < 4; j++){
scanf("%lf%lf", &x[j], &y[j]);
}
if ((y[0] - y[1]) / (x[0] - x[1])
== (y[2] - y[3]) / (x[2] - x[3])){
printf("YES");
}
else{
printf("NO");
}
}
return 0;... | main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
|
s874457694 | p00021 | C | #include <stdio.h>
int main(void) {
double x1,x2,x3,x4,y1,y2,y3,y4;
int n;
scanf("%d", &n);
for(int i=0; i<n; i++) {
scanf("%lf %lf %lf %lf %lf %lf %lf %lf", &x1, &y1, &x2, &y2, &x3, &y3, &x4, &y4)
if(x1==x2 || x3) {
if(x3==x4) printf("YES\n");
else printf("NO\n");
}
else {
if( (y... | main.c: In function 'main':
main.c:11:97: error: expected ';' before 'if'
11 | scanf("%lf %lf %lf %lf %lf %lf %lf %lf", &x1, &y1, &x2, &y2, &x3, &y3, &x4, &y4)
| ^
| ... |
s250258764 | p00021 | C | include <stdio.h>
int main(){
int n;
scanf("%d",&n);
while(n--){
double x1,x2,x3,x4,y1,y2,y3,y4;
scanf("%lf%lf%lf%lf%lf%lf%lf%lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
if((x1-x2)==0 && (x3-x4)==0){
printf("YES\n");
continue;
}
if((x1-x2)==0){
printf("NO\n");
continue;
}
if((x3-x4)==0){
printf("NO\n");
cont... | main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
|
s747295347 | p00021 | C | #include <cstdio>
int main()
{
int n;
scanf("%d\n", &n);
for(int i = 0; i < n; i++){
double x1, y1, x2, y2, x3, y3, x4, y4;
scanf("%lf %lf %lf %lf %lf %lf %lf %lf\n", &x1, &y1, &x2, &y2, &x3, &y3, &x4, &y4);
puts(((y1 - y2) / (x1 - x2)) == ((y3 - y4) / (x3 - x4)) ? "YES" : "NO");
}
return 0;
} | main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s260122398 | p00021 | C | #include <complex>
#include <iostream>
using namespace std;
typedef complex<double> P;
// 許容する誤差ε
#define EPS (1e-10)
// 2つのスカラーが等しいかどうか
#define EQ(a,b) (abs((a)-(b)) < EPS)
// 外積 (cross product) : a×b = |a||b|sinΘ
double cross(P a, P b) {
return (a.real() * b.imag() - a.imag() * b.real());
}
// 2直線の平行判定 : a//b <... | main.c:1:10: fatal error: complex: No such file or directory
1 | #include <complex>
| ^~~~~~~~~
compilation terminated.
|
s609935256 | p00021 | C | #include<iostream>
using namespace std;
int judge(double a1,double a2,double b1,double b2,double c1,double c2,double d1,double d2);
int main(){
int n;
double a1,a2,b1,b2;
double c1,c2,d1,d2;
cin>>n;
for(int i=0;i<n;i++){
cin>>a1>>a2>>b1>>b2>>c1>>c2>>d1>>d2;
if(judge(a1,a2,b1,b2,c1,c2,d1,d2))
cout<<"YES"... | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s816521345 | p00021 | C++ | #include <stdio.h>
#include <math.h>
int main(void){
int n;
cin >> n;
rep(i,n) {
double x[4],y[4],a,b,c,d,p,q,det,ansx,ansy;
//入力を多少簡略化
for(int i=0;i<4;i++) {
scanf("%lf" ,&x[i]);
scanf("%lf" ,&y[i]);
}
//(x1,y1)(x2,y2)を結ぶax+by=p の係数
a = y[0]-y[1]; b = x[1]-x[0];
... | a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope; did you mean 'sin'?
6 | cin >> n;
| ^~~
| sin
a.cc:7:9: error: 'i' was not declared in this scope
7 | rep(i,n) {
| ^
a.cc:7:5: error: 'rep' was not declared in this scope; did you mea... |
s927252149 | p00021 | C++ | #include <stdio.h>
#include <math.h>
int main(void){
int n;
cin >> n;
rep(i,n) {
double x[4],y[4],a,b,c,d,p,q,det,ansx,ansy;
//入力を多少簡略化
for(int i=0;i<4;i++) {
scanf("%lf" ,&x[i]);
scanf("%lf" ,&y[i]);
}
//(x1,y1)(x2,y2)を結ぶax+by=p の係数
a = y[0]-y[1]; b = x[1]-x[0];
... | a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope; did you mean 'sin'?
6 | cin >> n;
| ^~~
| sin
a.cc:7:9: error: 'i' was not declared in this scope
7 | rep(i,n) {
| ^
a.cc:7:5: error: 'rep' was not declared in this scope; did you mea... |
s144691007 | p00021 | C++ | #include <stdio.h>
#include <math.h>
int main(void){
int n;
cin >> n;
rep(i,n) {
double x[4],y[4],a,b,c,d,p,q,det,ansx,ansy;
//入力を多少簡略化
for(int i=0;i<4;i++) {
scanf("%lf" ,&x[i]);
scanf("%lf" ,&y[i]);
}
//(x1,y1)(x2,y2)を結ぶax+by=p の係数
a = y[0]-y[1]; b = x[1]-x[0];
... | a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope; did you mean 'sin'?
6 | cin >> n;
| ^~~
| sin
a.cc:7:9: error: 'i' was not declared in this scope
7 | rep(i,n) {
| ^
a.cc:7:5: error: 'rep' was not declared in this scope; did you mea... |
s127306043 | p00021 | C++ | #include <stdio.h>
#include <math.h>
int main(void){
int n;
cin >> n;
rep(i,n) {
double x[4],y[4],a,b,c,d,p,q,det,ansx,ansy;
//入力を多少簡略化
for(int i=0;i<4;i++) {
scanf("%lf" ,&x[i]);
scanf("%lf" ,&y[i]);
}
//(x1,y1)(x2,y2)を結ぶax+by=p の係数
a = y[0]-y[1]; b = x[1]-x[0];
... | a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope; did you mean 'sin'?
6 | cin >> n;
| ^~~
| sin
a.cc:7:9: error: 'i' was not declared in this scope
7 | rep(i,n) {
| ^
a.cc:7:5: error: 'rep' was not declared in this scope; did you mea... |
s978123785 | p00021 | C++ | #include <stdio.h>
#include <math.h>
int main(void){
int n;
cin >> n;
rep(i,n) {
double x[4],y[4],a,b,c,d,p,q,det,ansx,ansy;
//入力を多少簡略化
for(int i=0;i<4;i++) {
scanf("%lf" ,&x[i]);
scanf("%lf" ,&y[i]);
}
//(x1,y1)(x2,y2)を結ぶax+by=p の係数
a = y[0]-y[1]; b = x[1]-x[0];
... | a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope; did you mean 'sin'?
6 | cin >> n;
| ^~~
| sin
a.cc:7:9: error: 'i' was not declared in this scope
7 | rep(i,n) {
| ^
a.cc:7:5: error: 'rep' was not declared in this scope; did you mea... |
s898404170 | p00021 | C++ | #include <stdio.h>
#include <math.h>
int main(void){
int n;
cin >> n;
for(int i=0,i<n,i++) {
double x[4],y[4],a,b,c,d,p,q,det,ansx,ansy;
//入力を多少簡略化
for(int i=0;i<4;i++) {
scanf("%lf" ,&x[i]);
scanf("%lf" ,&y[i]);
}
//(x1,y1)(x2,y2)を結ぶax+by=p の係数
a = y[0]-y[1]; b = ... | a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope; did you mean 'sin'?
6 | cin >> n;
| ^~~
| sin
a.cc:7:18: error: expected ';' before '<' token
7 | for(int i=0,i<n,i++) {
| ^
| ;
a.cc:7:18: error: expe... |
s071646408 | p00021 | C++ | #include <stdio.h>
#include <math.h>
int main(void){
int n;
cin >> n;
rep(itn j = 0,j< n,j++) {
double x[4],y[4],a,b,c,d,p,q,det,ansx,ansy;
//入力を多少簡略化
for(int i=0;i<4;i++) {
scanf("%lf" ,&x[i]);
scanf("%lf" ,&y[i]);
}
//(x1,y1)(x2,y2)を結ぶax+by=p の係数
a = y[0]-y[1]; b... | a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope; did you mean 'sin'?
6 | cin >> n;
| ^~~
| sin
a.cc:7:9: error: 'itn' was not declared in this scope; did you mean 'int'?
7 | rep(itn j = 0,j< n,j++) {
| ^~~
| int
a.cc:7... |
s424258705 | p00021 | C++ |
#include <iostream>
#include <stdio.h>
#include <fstream>
#include <algorithm>
#include <string>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <vector>
#include <limits.h>
#include <math.h>
#define rep(i,n) for (int i = 0; (i) < (n); ++ (i))
using namespace std;
int main(voi... | a.cc:43:5: error: redefinition of 'int main()'
43 | int main(void){
| ^~~~
a.cc:18:5: note: 'int main()' previously defined here
18 | int main(void){
| ^~~~
a.cc: In function 'int main()':
a.cc:61:8: error: 'absf' was not declared in this scope; did you mean 'fabsf'?
61 | if(absf(det) <... |
s764356294 | p00021 | C++ | import sys
# args = sys.argv
args = [int(float(a)) for line in sys.stdin]
class Point():
def __init__(self,x,y):
self.x = x
self.y = y
def __sub__(self,oth):
self.x = self.x - oth.x
self.y = self.y - oth.y
return Point(self.x,self.y)
def __str__(self):
return "%s(%r)" %(self.__cl... | a.cc:3:3: error: invalid preprocessing directive #args
3 | # args = sys.argv
| ^~~~
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'
|
s963900576 | p00021 | C++ | #include <iostream>
#include <algorithm>
#include <string>
#include <cmath>
#include <stack>
using namespace std;
int main(){
int n;
cin >> n;
long double x1,y1,x2,y2,x3,y3,x4,y4;
while(cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4){
if(abs((y1 - y2)/(x1 - x2) -- (x3 - x4)/(y3 - y4)) < 0.0000000001)cout <<... | a.cc: In function 'int main()':
a.cc:13:38: error: lvalue required as decrement operand
13 | if(abs((y1 - y2)/(x1 - x2) -- (x3 - x4)/(y3 - y4)) < 0.0000000001)cout << "YES" << endl;
| ~~~~^~~~~
|
s714945434 | p00021 | C++ | #include<iostream>
using namespace std;
int main() {
double n,xx[4],yy[4],x,y;
cin >> n;
for(int i=0;i<n;i++){
for(int j=0;j<4;j++) cin>>xx[j]>>yy[j];
x=(yy[1]-yy[0])/(xx[1]-xx[0]),y=(yy[3]-yy[2])/(xx[3]-xx[2]);
if(x==y)cout << "YES";
else cout << "NO";
cout << endl;... | a.cc:15:1: error: expected declaration before '}' token
15 | }
| ^
|
s375530940 | p00021 | C++ | #include<iostream>
using namespace std;
int main() {
double n,xx[4],yy[4],x,y;
cin >> n;
for(int i=0;i<n;i++){
for(int j=0;j<4;j++) cin>>xx[j]>>yy[j];
x=(yy[1]-yy[0])/(xx[1]-xx[0]);
y=(yy[3]-yy[2])/(xx[3]-xx[2]);
if(x==y)cout << "YES";
else cout << "NO";
cout... | a.cc:16:1: error: expected declaration before '}' token
16 | }
| ^
|
s575490466 | p00021 | C++ | #include<iostream>
#include<cmath>
using namespace std;
#define EPS 1e-10
double x[4],y[4];
double det(){
double x1,x2,y1,y2;
x1 = x[0] - x[1];
y1 = y[0] - y[1];
x2 = x[2] - x[3];
y2 = y[2] - y[3];
return x1 * y2 - y1 * x2;
}
int main(void){
int n;
cin >> n;
while(n--){
for(int i = 0 ; i < 4 ; i ... | a.cc: In function 'int main()':
a.cc:20:12: error: 'vabs' was not declared in this scope; did you mean 'labs'?
20 | cout<<(vabs(det())<CPS?"YES":"NO")<<endl;
| ^~~~
| labs
a.cc:20:24: error: 'CPS' was not declared in this scope; did you mean 'EPS'?
20 | cout<<(vabs(det())... |
s829263900 | p00021 | C++ | #include
<cstdio>
using
namespace
std;
int
n;
double
x[4],y[4];
int
main()
{
scanf(
"%d"
,&n);
for
(
int
c = 0; c < n; c++)
{
for
(
int
i = 0; i < 4; i++)
scanf(
"%lf%lf"
,&x[i],&y[i]);
puts((y[1]-y[0])/(x[1]-x[0]) == (y[3]-y[2])/(x[3]-x[2])?
"YES"
:
"NO"
);
}
} | 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:22:1: error: 'scanf' was not declared in this scope
22 | scanf(
| ^~~~~
a.cc:56:1: error: 'puts... |
s001123956 | p00021 | C++ | #include<cstdio>
using namespace std;
int n;
double x[4], y[4];
int main()
{
scanf("%d",&n);
for(int c = 0; c < n; c++)
{
for(int i = 0; i < 4; i++)
scanf("%lf%lf",&x[i],&y[i]);
puts((y[1]-y[0])/(x[1]-x[0])==(y[3]-y[2])/(x[3]-x[2])?"YES":"NO");
reurn 0;
}
} | a.cc:3:1: error: extended character is not valid in an identifier
3 | using namespace std;
| ^
a.cc:3:1: error: extended character is not valid in an identifier
a.cc:5:1: error: extended character is not valid in an identifier
5 | int n;
| ^
a.cc:7:1: error: extended character is not valid i... |
s545770063 | p00021 | C++ | #include
<cstdio>
using
namespace
std;
int
n;
double
x[4],y[4];
int
main()
{
scanf("%d"
,&n);
for
(int
c = 0; c < n; c++)
{
for
(int
i = 0; i < 4; i++)
scanf("%lf%lf"
,&x[i],&y[i]);
puts((y[1]-y[0])/(x[1]-x[0]) == (y[3]-y[2])/(x[3]-x[2])?"YES"
:"NO"
);
}
} | a.cc:1:9: error: #include expects "FILENAME" or <FILENAME>
1 | #include
| ^
a.cc:2:2: error: expected unqualified-id before '<' token
2 | <cstdio>
| ^
a.cc: In function 'int main()':
a.cc:17:1: error: 'scanf' was not declared in this scope
17 | scanf("%d"
| ^~~~~
a.cc:33:1: error:... |
s887445591 | p00021 | C++ | #include <cstdio>
using namespace std;
int n;
double x[4],y[4];
int main()
{
scanf("%d",&n);
for (int c = 0; c < n; c++)
{
for(inti = 0; i < 4; i++)scanf("%lf%lf",&x[i],&y[i]);
puts((y[1]-y[0])/(x[1]-x[0]) == (y[3]-y[2])/(x[3]-x[2])?"YES":"NO");
}
} | a.cc: In function 'int main()':
a.cc:16:5: error: 'inti' was not declared in this scope; did you mean 'int'?
16 | for(inti = 0; i < 4; i++)scanf("%lf%lf",&x[i],&y[i]);
| ^~~~
| int
a.cc:16:15: error: 'i' was not declared in this scope
16 | for(inti = 0; i < 4; i++)scanf("%lf%lf",&x[i],&y[i]);
... |
s809822032 | p00021 | C++ | #include <iostream.h>
int main(void)
{
double x1, x2, x3, x4, y1, y2, y3, y4;
double m1, m2;
int n;
scanf("%d", &n);
while (n > 0){
scanf("%lf %lf %lf %lf %lf %lf %lf %lf", &x1, &y1, &x2, &y2, &x3, &y3, &x4, &y4);
m1 = (y2 - y1) / (x2 - x1);
m2 = (y4 - y3) / (x4 - x3);
if (m1 == m2){
printf("YES\... | a.cc:1:10: fatal error: iostream.h: No such file or directory
1 | #include <iostream.h>
| ^~~~~~~~~~~~
compilation terminated.
|
s814875587 | p00021 | C++ |
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
#include <iostream>
using namespace std;
int main(){
int n;
long double t[100][8];
long double ab, cd;
cin >> n;
for(int i = 0; i < n; i++){
for(int j = 0; j < 8; j++){
c... | a.cc:2:1: error: expected unqualified-id before numeric constant
2 | 3
| ^
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... |
s018200520 | p00021 | C++ | #include <iostream>
using namespace std;
typedef struct myvector{
double x;
double y;
}Vector;
Vector sub_vector(Vector& a, Vector& b)
{
Vector ret;
ret.x = b.x - a.x;
ret.y = b.y - a.y;
return ret;
}
double cross_product(Vector& a, Vector& b)
{
return a.x * b.y - b.x * a.y;
}
int main()
{
int n;
... | a.cc: In function 'int main()':
a.cc:32:44: error: expected ';' before 'cout'
32 | if((cross_product(AB, CD) * 10000 == 0)
| ^
| ;
33 | cout << "YES" << endl;
| ~~~~ ... |
s583807152 | p00021 | C++ | #include <iostream>
using namespace std;
typedef struct myvector{
double x;
double y;
}Vector;
Vector sub_vector(Vector& a, Vector& b)
{
Vector ret;
ret.x = b.x - a.x;
ret.y = b.y - a.y;
return ret;
}
double cross_product(Vector& a, Vector& b)
{
return a.x * b.y - b.x * a.y;
}
int main()
{
int n;
... | a.cc: In function 'int main()':
a.cc:32:46: error: expected ';' before 'cout'
32 | if((cross_product(AB, CD) * 10000.0 == 0)
| ^
| ;
33 | cout << "YES" << endl;
| ~~~~ ... |
s108763660 | p00021 | C++ |
4
5
6
7
8
9
10
11
12
13
#include <stdio.h>
int main()
{
int n;
scanf("%d\n", &n);
while(n--){
double x1,y1,x2,y2,x3,y3,x4,y4;
scanf("%lf%lf%lf%lf%lf%lf%lf%lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
printf("%s\n",((y1-y2)/(x1-x2))==((y3-y4)/(x3-x4))... | a.cc:37:6: error: stray '#' in program
37 | Case # Verdict CPU Time Memory In Out Case Name
| ^
a.cc:38:7: error: stray '#' in program
38 | Case #1: : Accepted 00.00 sec 620 KB
| ^
a.cc:46:13: error: stray '#' in program
46 | Judge Input #1 ( in1.txt | 16 B) Judge Output #1 ( out1.txt... |
s029719075 | p00021 | C++ | #define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <sstream>
#include <utility>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pai... | a.cc: In function 'll input()':
a.cc:52:22: error: call of overloaded 'stoll(std::string&)' is ambiguous
52 | return sign*stoll(s);
| ~~~~~^~~
a.cc:34:4: note: candidate: 'll stoll(const std::string&)'
34 | ll stoll(string const& s){
| ^~~~~
In file included from /usr/include/c+... |
s201224109 | p00021 | C++ | #define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <sstream>
#include <utility>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pai... | a.cc: In function 'll input()':
a.cc:52:22: error: call of overloaded 'stoll(std::string&)' is ambiguous
52 | return sign*stoll(s);
| ~~~~~^~~
a.cc:34:4: note: candidate: 'll stoll(const std::string&)'
34 | ll stoll(string const& s){
| ^~~~~
In file included from /usr/include/c+... |
s674948617 | p00021 | C++ | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, s, n) for(int i = s; i < (int)n; i++)
#define per(i, n) for(int i = n; i >= 0; i--)
#define ROF(i, s, n) for(int i = s; i >= (int)n; i--)
#define FORIT(i, A) for (auto i : A)
#define PRINT(x) cout << (x) << "\n"
#define ALL(a) (a).begin(),(a).end()
#define RA... | a.cc:39:24: error: 'double y1' redeclared as different kind of entity
39 | 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/x8... |
s165271184 | p00021 | C++ | #define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <sstream>
#include <utility>
using namespace std;
//typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef p... | a.cc: In function 'int main()':
a.cc:18:25: error: 'll' was not declared in this scope; did you mean 'all'?
18 | #define loop(i,a,b) for(ll i=a; i<ll(b); i++)
| ^~
a.cc:19:18: note: in expansion of macro 'loop'
19 | #define rep(i,b) loop(i,0,b)
| ^~~~
a.cc:36:5... |
s978847601 | p00021 | C++ | #include<iostream>
using namespace std;
int main () {
double x[4],y[4];
for(i=0;i<4;i++) {
cin >> x[i] >> y[i];
}
if((y[1]-y[2])/(x[1]-x[2]) == (y[3]-y[4])/(x[3]-x[4])) cout << "YES" << endl;
else cout << "NO" << endl;
} | a.cc: In function 'int main()':
a.cc:6:9: error: 'i' was not declared in this scope
6 | for(i=0;i<4;i++) {
| ^
|
s301027665 | p00021 | C++ | #include <complex>
#include <cmath>
#include <iostream>
#include <stdio.h>
using namespace std;
typedef complex<double> xy_t;
const double eps= a1e−11;
double x[4], y[4];
int N;
int main(){
cin >> N;
for(int t= 0; t<N; ++i){
for (int i = 0; i < 4; ++i) cin >> x[i] >> y[i];
xy_t a[2]={xy_t(x[0],y[0])... | a.cc:9:23: error: stray '#' in program
9 | const double eps= a1e−11;
| ^
a.cc:19:19: error: extended character ” is not valid in an identifier
19 | cout << ( p ? ”YES” : ”NO” ) << endl ;
| ^
a.cc:19:19: error: extended character ” is not valid in an i... |
s900035958 | p00021 | C++ | #define _CRT_SECURE_NO_WARNINGS
#include<cstdio>
#include<cmath>
#include<cstring>
#include<iostream>
#include<algorithm>
#include<utility>
#include<iomanip>
#include<vector>
#include<string>
#include<queue>
#include<stack>
#include<map>
#include<list>
#define rep(i,n) for(int i=0;i<(int)n;i++)
#define repp(i,k,n) for(... | a.cc: In function 'int main()':
a.cc:49:63: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
49 | if (x1 == x2&&x3 == x4)cout << "YES<" < endl;
| ~~~~~~~~~~~~~~~^~~~~... |
s869784690 | p00021 | C++ | #include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <algorithm>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <string>
#include <cstring>
#include <complex>
#include <ctime>
#include <cst... | a.cc:19:1: error: expected unqualified-id before '?' token
19 | ??
| ^
a.cc:21:1: error: expected unqualified-id before '?' token
21 | ??
| ^
a.cc:23:26: error: 'string' does not name a type; did you mean 'stdin'?
23 | template<class T> inline string to_str(T x) {ostringstream sout; sout << x; retu... |
s412292042 | p00021 | C++ | #include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <algorithm>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <string>
#include <cstring>
#include <complex>
#include <ctime>
#include <cst... | a.cc:19:1: error: expected unqualified-id before '?' token
19 | ??
| ^
a.cc:21:1: error: expected unqualified-id before '?' token
21 | ??
| ^
|
s269532623 | p00021 | C++ | #include <iostream>
using namespace std;
int main(){
double x1, y1, x2, y2, x3, y3, x4, y4, ab, cd;
int n;
cin >> n;
while(n--){
cin >>x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4;
ab = (y1 - y2) / (x1 - x2);
cd = (y3 - y4) / (x3 - x4);
if ((int)ad == (int)cd){
... | a.cc: In function 'int main()':
a.cc:15:18: error: 'ad' was not declared in this scope; did you mean 'cd'?
15 | if ((int)ad == (int)cd){
| ^~
| cd
|
s191353551 | p00021 | C++ | #include<stdio.h>
#include<iostream>
using namespace std;
int main(){
int n;
double x1,x2,x3,x4,y1,y2,y3,y4;
doubl1 a1=0,a2=0;
scanf("%d",&n);
for(int i=0;i<n;i++)
{
cin>>x1>>y1>>x2>>y2>>x3>>y3>>x4>>y4;
a1=(y1-y2)/(x2-x1);a2=(y3-y4)/(x3-x4);
if(a1==a2)cout<<YES<<endl;
else cout<<NO<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:8:1: error: 'doubl1' was not declared in this scope; did you mean 'double'?
8 | doubl1 a1=0,a2=0;
| ^~~~~~
| double
a.cc:14:1: error: 'a1' was not declared in this scope; did you mean 'y1'?
14 | a1=(y1-y2)/(x2-x1);a2=(y3-y4)/(x3-x4);
| ^~
| y1
a.cc:14:... |
s901527919 | p00021 | C++ | //Parallelism
#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
double x1, y1, x2, y2, x3, y3, x4, y4;
cin>>n;
for(int i=0; i<n; i++){
bool flag=false;
cin>>x1>>y1>>x2>>y2>>x3>>y3>>x4>>y4;
if(x1==x2 && x3==x4){flag=true;}
else if(x1==x2 || x3==x4){}
else if(((y2-y1)*(x4-x3)))=... | a.cc: In function 'int main()':
a.cc:14:31: error: expected primary-expression before '==' token
14 | else if(((y2-y1)*(x4-x3)))==((y4-y3)*(x2-x1))){flag=true;}
| ^~
|
s313552797 | p00021 | C++ | #include <iostream>
#include <fstream>
#include <cstring>
#include <cstdlib>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <queue>
#include <stack>
#include <list>
#include <utility>
#include <cmath>
#include <sstream>
#define F first
#define S second
#define FOR(i,n) for(int i=0;i<(int)n;i++)
#defi... | a.cc:56:5: error: redefinition of 'int main()'
56 | int main() {
| ^~~~
a.cc:19:5: note: 'int main()' previously defined here
19 | int main() {
| ^~~~
|
s467565658 | p00021 | C++ | w#include<iostream>
#include<iomanip>
#include<vector>
#include<queue>
#include<list>
#include<stack>
#include<algorithm>
#include<cmath>
#include<memory>
#include<array>
using namespace std;
int main()
{
array<double, 4> x;
array<double, 4> y;
int n;
cin >> n;
for ( auto j = 0; j < n; ++j )
{
f... | a.cc:1:2: error: stray '#' in program
1 | w#include<iostream>
| ^
a.cc:1:1: error: 'w' does not name a type
1 | w#include<iostream>
| ^
In file included from /usr/include/c++/14/iosfwd:42,
from /usr/include/c++/14/iomanip:41,
from a.cc:2:
/usr/include/c++/14/bits/p... |
s411906076 | p00021 | C++ | require("fs").readFileSync("/dev/stdin","utf8").trim().split('\n').some(function(i){c=i.split(' ');console.log(((c[3]-c[1])/(c[2]-c[0])).toFixed(6)==((c[7]-c[5])/(c[6]-c[4])).toFixed(6)?'YES':'NO')}) | a.cc:1:187: warning: multi-character character constant [-Wmultichar]
1 | require("fs").readFileSync("/dev/stdin","utf8").trim().split('\n').some(function(i){c=i.split(' ');console.log(((c[3]-c[1])/(c[2]-c[0])).toFixed(6)==((c[7]-c[5])/(c[6]-c[4])).toFixed(6)?'YES':'NO')})
| ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.