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] - x[0]);
slope2 = (y[3] - y[2]) / (x[3] - x[2]);
if (slope1 == slope2){
printf("YES\n");
}
else {
printf("NO\n");
}
}
return 0;
}
|
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 (first use in this function)
18 | slope2 = (y[3] - y[2]) / (x[3] - x[2]);
| ^~~~~~
|
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[1] - x[0]);
slope2 = (y[3] - y[2]) / (x[3] - x[2]);
if (slope1 == slope2){
printf("YES\n");
}
else {
printf("NO\n");
}
|
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");
}else if((y2-y1)/(x2-x1)==(y4-y3)/(x4-x3)){
printf("YES\n");
}else printf("NO\n");
}
return 0;
}
|
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;
double slope1, slope2;
scanf_s("%d",&n);
while (i < n) {
scanf("%lf%lf%lf%lf%lf%lf%lf%lf",&x1[i],&y1[i],&x2[i],&y2[i],&x3[i],&y3[i],&x4[i],&y4[i]);
i++;
}
for (i = 0; i < n; i++) {
slope1 = slope(x1[i],x2[i],y1[i],y2[i]);
slope2 = slope(x3[i], x4[i], y3[i], y4[i]);
printf("slope1 = %lf\n",slope1);
printf("slope2 = %lf\n", slope2);
if (slope1 == slope2) {
printf("YES\n");
}
else {
printf("NO\n");
}
}
return 0;
}
|
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]) / (x[3][i] - x[2][i]);
}
}
for (i = 0; i < n; i++) {
if (slope1[i] == slope2[i]) {
printf("YES\n");
}
else {
printf("NO\n");
}
}
return 0;
}
|
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 = x4 - x3;
by = y4 - y3;
cross = ax * by - ay * bx;
printf("%lf\n", cross);
if (cross == 0)
printf("YES\n");
else
printf("NO\n");
}
return 0;
}
|
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(" ");
double[] a = new double[8];
for(int j=0; j<8; j++)
a[j] = Double.valueOf(pt[j]);
if((a[3]-a[1])/(a[2]-a[0]) == (a[7]-a[5])/(a[6]-a[4]))
System.out.println("YES");
else
System.out.println("NO");
}
}catch(Exception e){
System.out.println("Error");
}
}
}
|
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: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
3 | class Main{
| ^
|
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 - x1 == 0|| x3 - x4 == 0){
prinf("NO");
continue;
}
k1 = (y2 - y1) / (x2 - x1);
k2 = (y4 - y3) / (x4 - x3);
if(k1 == k2)
printf("YES\n");
else
printf("NO\n");
}
return 0;
}
|
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 - x1 == 0|| x3 - x4 == 0){
printf("NO\n");
continue;
}
k1 = (y2 - y1) / (x2 - x1);
k2 = (y4 - y3) / (x4 - x3);
if(k1 == k2){
if((y3 - y1) - k(x3 - x1) == 0)
print("NO\n");
else
printf("YES\n");
else
printf("NO\n");
}
return 0;
}
|
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]
21 | print("NO\n");
| ^~~~~
| printf
main.c:24:5: error: expected '}' before 'else'
24 | else
| ^~~~
|
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 - x1 == 0|| x3 - x4 == 0){
printf("NO\n");
continue;
}
k1 = (y2 - y1) / (x2 - x1);
k2 = (y4 - y3) / (x4 - x3);
if(k1 == k2){
if((y3 - y1) - k(x3 - x1) == 0)
print("NO\n");
else
printf("YES\n");
}
else
printf("NO\n");
}
return 0;
}
|
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]
21 | print("NO\n");
| ^~~~~
| printf
|
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 == 0 && x3 - x4 == 0){
if(x2 == x4)
printf("NO\n");
else
printf("YES\n");
continue;
}
else if(x2 - x1 == 0|| x3 - x4 == 0){
printf("NO\n");
continue;
}
k1 = (y2 - y1) / (x2 - x1);
k1 = (int) (k1*10000 +0.5) / 10000;
k2 = (y4 - y3) / (x4 - x3);
k2 = (int) (k2*10000 +0.5) / 10000;
if(k1 == k2){
if((y3 - y1) - k1*(x3 - x1) == 0)
printf("NO\n");
else
printf("YES\n");
}
else
printf("NO\n");
}
return 0;
}
|
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] ) ) {
printf("YES\n");
} else {
printf("NO\n");
}
}
return 0;
}
|
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++){
double x,y;
cin>>x>>y;
xy[i]=Point(x,y);
}
Point dir1=xy[1]-xy[0];
Point dir2=xy[2]-xy[3];
cout<<(abs(cross(dir1,dir2))<EPS ? "YES" : "NO")<<endl;
}
return 0;
}
|
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, &y2, &x3, &y3, &x4, &y4);
if( ( (x1-x2)/(y1-y2) ) == ( (x3-x4)/(y3-y4) ) )
{
printf("YES\n");
}
else
{
printf("NO\n");
}
}
return 0;
}
|
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: stray '\343' in program
30 | <U+3000><U+3000><U+3000>
| ^~~~~~~~
main.c:30:5: error: stray '\343' in program
30 | <U+3000><U+3000><U+3000>
| ^~~~~~~~
main.c:31:1: error: stray '\343' in program
31 | <U+3000><U+3000>return 0;
| ^~~~~~~~
main.c:31:3: error: stray '\343' in program
31 | <U+3000><U+3000>return 0;
| ^~~~~~~~
|
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, &y2, &x3, &y3, &x4, &y4);
if( ( (x1-x2)/(y1-y2) ) == ( (x3-x4)/(y3-y4) ) )
{
printf("YES\n");
}
else
{
printf("NO\n");
}
}
return 0;
}
|
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: error: stray '\343' in program
30 | <U+3000><U+3000>return 0;
| ^~~~~~~~
|
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)/(C.x-D.x);
if(m1==m2)printf("YES\n");
else printf("NO\n");
}
return 0;
}
|
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-y4)/(x3-x4);
if(a == b)
printf("YES\n");
/* if((y1-y2)/(x1-x2) == (y3-y4)/(x3-x4))
printf("YES\n");
else if((y2-y1)/(x2-x1) == (y4-y3)/(x4-x3)){
printf("YES\n");
}else if((x1==x2) && (x3==x4)){
printf("YES\n");
}else if((x1==x2) || (x3==x4)){
printf("NO\n");
}else if((y1-y2)/(x1-x2) != (y3-y4)/(x3-x4))
printf("NO\n");*/
else if(a != b)
printf("NO\n");
}
return 0;
}
|
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))
printf("YES\n");
else if((y2-y1)/(x2-x1) != (y4-y3)/(x4-x3)){
printf("YES\n");
else
printf("NO\n");
}
return 0;
}
|
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))
printf("YES\n");
else if((y2-y1)/(x2-x1) != (y4-y3)/(x4-x3))
printf("YES\n");
return 0;
}
|
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))
printf("YES\n");
else if((y2-y1)/(x2-x1) == (y4-y3)/(x4-x3))
printf("YES\n");
else if((y1-y2)/(x1-x2) ==0 || (y3-y4)/(x3-x4) ==0)
printf("NO\n");
else
printf("NO\n");
}
return 0;
}
|
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))
printf("YES\n");
else if((y2-y1)/(x2-x1) == (y4-y3)/(x4-x3))
printf("YES\n");
else if((y1-y2)/(x1-x2) ==0 || (y3-y4)/(x3-x4) ==0)
printf("NO\n");
// else
// printf("NO\n");
}
return 0;
}
|
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))
printf("YES\n");
else if((y2-y1)/(x2-x1) == (y4-y3)/(x4-x3))
printf("YES\n");
else if((y1-y2)/(x1-x2) ==0 || (y3-y4)/(x3-x4) ==0)
printf("NO\n");
else
printf("NO\n");
}
return 0;
}
|
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-y4)/(x3-x4);
if(a == b)
printf("YES\n");
else if(a != b)
printf("NO\n");
else if(a == 0 && b == 0)
printf("YES\n");
}
return 0;
}
|
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("%lf %lf %lf %lf %lf %lf %lf %lf", &x1, &y1, &x2, &y2, &x3, &y3, &x4, &y4);
if(solve1()) {
printf("YES\n");
} else {
printf("NO\n");
}
}
}
|
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,
from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
from /usr/include/stdio.h:28,
from main.c:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:257:1: note: previous declaration of 'y1' with type 'double(double)'
257 | __MATHCALL (y1,, (_Mdouble_));
| ^~~~~~~~~~
main.c: In function 'solve1':
main.c:14:27: error: 'eps' undeclared (first use in this function)
14 | return (fabs(r1-r2) < eps)
| ^~~
main.c:14:27: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:31: error: expected ';' before '}' token
14 | return (fabs(r1-r2) < eps)
| ^
| ;
15 | }
| ~
|
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) {
scanf("%lf %lf %lf %lf %lf %lf %lf %lf", &x1, &y1, &x2, &y2, &x3, &y3, &x4, &y4);
if(solve1()) {
printf("YES\n");
} else {
printf("NO\n");
}
}
}
|
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:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:257:1: note: previous declaration of 'y1' with type 'double(double)'
257 | __MATHCALL (y1,, (_Mdouble_));
| ^~~~~~~~~~
|
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) {
scanf("%lf %lf %lf %lf %lf %lf %lf %lf", &x1, &y1, &x2, &y2, &x3, &y3, &x4, &y4);
if(solve1()) {
printf("YES\n");
} else {
printf("NO\n");
}
}
}
|
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:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:257:1: note: previous declaration of 'y1' with type 'double(double)'
257 | __MATHCALL (y1,, (_Mdouble_));
| ^~~~~~~~~~
|
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("%d", &n);
for(int i=0; i<n; ++i) {
scanf("%lf %lf %lf %lf %lf %lf %lf %lf", &ix1, &iy1, &ix2, &iy2, &ix3, &iy3, &ix4, &iy4);
if(solve1()) {
printf("YES\n");
} else {
printf("NO\n");
}
}
}
|
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);
| ^
| |
| double (*)(double)
main.c:13:31: error: 'x1' undeclared (first use in this function); did you mean 'r1'?
13 | double r1 = (iy2-y1)/(ix2-x1);
| ^~
| r1
main.c:13:31: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:22: error: 'y3' undeclared (first use in this function); did you mean 'iy3'?
14 | double r2 = (iy4-y3)/(ix4-x3);
| ^~
| iy3
main.c:14:31: error: 'x3' undeclared (first use in this function); did you mean 'ix3'?
14 | double r2 = (iy4-y3)/(ix4-x3);
| ^~
| ix3
main.c:15:27: error: 'eps' undeclared (first use in this function)
15 | return (fabs(r1-r2) < eps)
| ^~~
main.c:15:31: error: expected ';' before '}' token
15 | return (fabs(r1-r2) < eps)
| ^
| ;
16 | }
| ~
|
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("%d", &n);
for(int i=0; i<n; ++i) {
scanf("%lf %lf %lf %lf %lf %lf %lf %lf", &ix1, &iy1, &ix2, &iy2, &ix3, &iy3, &ix4, &iy4);
if(solve1()) {
printf("YES\n");
} else {
printf("NO\n");
}
}
}
|
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 in this function); did you mean 'r1'?
13 | double r1 = (iy2-y1)/(ix2-x1);
| ^~
| r1
main.c:13:31: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:22: error: 'y3' undeclared (first use in this function); did you mean 'iy3'?
14 | double r2 = (iy4-y3)/(ix4-x3);
| ^~
| iy3
main.c:14:31: error: 'x3' undeclared (first use in this function); did you mean 'ix3'?
14 | double r2 = (iy4-y3)/(ix4-x3);
| ^~
| ix3
main.c:15:31: error: expected ';' before '}' token
15 | return (fabs(r1-r2) < eps)
| ^
| ;
16 | }
| ~
|
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++){
if(b[i] == c[i]){
printf("YES\n");
}
else{
printf("NO\n");
}
}
return 0;
}
|
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
printf("NO\n");
}
return 0;
|
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{
printf("NO\n");
}
}
return 0;
}
|
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 use in this function)
11 | cd = (y4 - y3) / (x4 - x3);
| ^~
|
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), (ax2-ax1)*(by2-by1)): f = True
print('YES' if f else 'NO')
|
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:1: error: type defaults to 'int' in declaration of 'EPS' [-Wimplicit-int]
main.c:6:1: error: expected ',' or ';' before 'def'
6 | def EQ(a, b):
| ^~~
main.c:15:15: warning: multi-character character constant [-Wmultichar]
15 | print('YES' if f else 'NO')
| ^~~~~
main.c:15:31: warning: multi-character character constant [-Wmultichar]
15 | print('YES' if f else 'NO')
| ^~~~
|
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
puts("NO")
}
return 0;
}
|
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/a1;
c2=b2/a2;
if(c1==c2){
printf("YES\n");
}else{
printf("NO\n");
}
}
|
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)
printf("NO\n");
else
printf("YES\n");
}
return 0;
}
|
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;
}
for(i=0;i<a;i++)
{
if(j[i]==0)
printf("NO\n");
else
printf("YES\n");
}
return 0;
}
|
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((x1-x2)/(x3-x4))!=((x1-x3)/(y1-y3))&&((x1-x2)/(x3-x4))==((y1-y2)/(y3-y4)))
| ^
|
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("YES\n");
else printf("NO\n");
}
return 0;
}
|
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, &x4, &y4);
| ^
main.c:11:34: error: missing terminating " character
11 | scanf(%f %f %f %f %f %f %f %f", &x1, &y1, &x2, &y2, &x3, &y3, &x4, &y4);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:15:25: error: expected ';' before '}' token
15 | else printf("NO\n");
| ^
| ;
16 | }
| ~
|
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]);
}
if ((i + 2) % 2 == 1){
for (j = 0; j < 2; j++){
hj[hj_count][j] = d[i - 1].data[j] - d[i].data[j];
}
hj_count++;
}
}
if (hj[0][0] == hj[1][0] && hj[0][1] == hj[1][1]){
flag = 1;
}
if (flag == 1){
printf("YES\n");
}
else {
printf("NO\n");
}
no--;
}
return (0);
}
|
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]);
}
if ((i + 2) % 2 == 1){
for (j = 0; j < 2; j++){
hj[hj_count][j] = d[i - 1].data[j] - d[i].data[j];
}
hj_count++;
}
}
if (hj[0][0] == hj[1][0] && hj[0][1] == hj[1][1]){
flag = 1;
}
if (flag == 1){
printf("YES\n");
}
else {
printf("NO\n");
}
no--;
}
return (0);
}
|
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
{
puts("NO");
}
}
return 0;
}
|
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 identifier is reported only once for each function it appears in
main.c:12:78: error: 'y4' undeclared (first use in this function); did you mean 'x4'?
12 | scanf("%f %f %f %f %f %f %f %f",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
| ^~
| x4
|
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[1])*(a[6]-a[4]);
System.out.println(e==0?"YES":"NO");
}
}
}
//by Tuvshee 12.05.2012
//Parallelism
|
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:2:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Main'
2 | public class Main {
| ^~~~
|
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.nextFloat();
x2= scan.nextFloat();
y2= scan.nextFloat();
x3= scan.nextFloat();
y3= scan.nextFloat();
x4= scan.nextFloat();
y4= scan.nextFloat();
if((y2-y1)/(x2-x1)==(y4-y3)/(x4-x3)) System.out.println("YES");
else System.out.println("NO");
}
}
}
|
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: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
2 | import java.util.*;
| ^
main.c:4:1: error: unknown type name 'public'
4 | public class Main {
| ^~~~~~
main.c:4:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Main'
4 | public class Main {
| ^~~~
|
s911106573
|
p00021
|
C
|
#include <stdio.h>
#include <ctype.h>int main(void) {
double x1, y1, x2, y2, x3, y3, x4, y4;
int n;
scanf("%d", &n); while (n-- > 0) { scanf("%lf%lf%lf%lf%lf%lf%lf%lf", &x1, &y1, &x2, &y2, &x3, &y3, &x4, &y\
4);
if (x2 - x1 == 0) if (x4 - x3 == 0) printf("YES\n");
else
printf("NO\n");
else if (((y2 - y1) / (x2 - x1)) == ((y4 - y3) / (x4 - x3)))
printf("YES\n");
else printf("NO\n"); }
return 0; }
|
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;
| ^~
main.c:5:91: error: expected declaration specifiers or '...' before string constant
5 | scanf("%d", &n); while (n-- > 0) { scanf("%lf%lf%lf%lf%lf%lf%lf%lf", &x1, &y1, &x2, &y2, &x3, &y3, &x4, &y\
| ^~~~
main.c:5:97: error: expected declaration specifiers or '...' before '&' token
5 | scanf("%d", &n); while (n-- > 0) { scanf("%lf%lf%lf%lf%lf%lf%lf%lf", &x1, &y1, &x2, &y2, &x3, &y3, &x4, &y\
| ^
main.c:5:165: error: expected identifier or '(' before 'while'
5 | scanf("%d", &n); while (n-- > 0) { scanf("%lf%lf%lf%lf%lf%lf%lf%lf", &x1, &y1, &x2, &y2, &x3, &y3, &x4, &y\
| ^~~~~
main.c:14:5: error: expected identifier or '(' before 'return'
14 | return 0; }
| ^~~~~~
main.c:14:81: error: expected identifier or '(' before '}' token
14 | return 0; }
| ^
|
s914439672
|
p00021
|
C
|
#include <stdio.h>
#include <ctype.h>int main(void) {
double x1, y1, x2, y2, x3, y3, x4, y4;
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);
if (x2 - x1 == 0) if (x4 - x3 == 0) printf("YES\n");
else
printf("NO\n");
else if (((y2 - y1) / (x2 - x1)) == ((y4 - y3) / (x4 - x3)))
printf("YES\n");
else printf("NO\n"); }
return 0; }
|
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;
| ^~
main.c:5:91: error: expected declaration specifiers or '...' before string constant
5 | scanf("%d", &n); while (n-- > 0) { scanf("%lf%lf%lf%lf%lf%lf%lf%lf", &x1, &y1, &x2, &y2, &x3, &y3, &x4, &y4);
| ^~~~
main.c:5:97: error: expected declaration specifiers or '...' before '&' token
5 | scanf("%d", &n); while (n-- > 0) { scanf("%lf%lf%lf%lf%lf%lf%lf%lf", &x1, &y1, &x2, &y2, &x3, &y3, &x4, &y4);
| ^
main.c:5:165: error: expected identifier or '(' before 'while'
5 | scanf("%d", &n); while (n-- > 0) { scanf("%lf%lf%lf%lf%lf%lf%lf%lf", &x1, &y1, &x2, &y2, &x3, &y3, &x4, &y4);
| ^~~~~
main.c:13:5: error: expected identifier or '(' before 'return'
13 | return 0; }
| ^~~~~~
main.c:13:81: error: expected identifier or '(' before '}' token
13 | return 0; }
| ^
|
s628882346
|
p00021
|
C
|
#include <stdio.h>
#include <ctype.h>int main(void) { double x1, y1, x2, y2, x3, y3, x4, y4;
int n;
scanf("%d", &n); while (n-- > 0) {
scanf("%lf%lf%lf%lf%lf%lf%lf%lf", &x1, &y1, &x2, &y2, &x3, &y3, &x4, &y\
4);
if (x2 - x1 == 0)
if (x4 - x3 == 0)
printf("YES\n"); else printf("NO\n");
else if (((y2 - y1) / (x2 - x1)) == ((y4 - y3) / (x4 - x3)))
printf("YES\n"); else printf("NO\n");
}
return 0;
}
|
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 constant
4 | scanf("%d", &n); while (n-- > 0) {
| ^~~~
main.c:4:97: error: expected declaration specifiers or '...' before '&' token
4 | scanf("%d", &n); while (n-- > 0) {
| ^
main.c:4:165: error: expected identifier or '(' before 'while'
4 | scanf("%d", &n); while (n-- > 0) {
| ^~~~~
main.c:13:5: error: expected identifier or '(' before 'return'
13 | return 0;
| ^~~~~~
main.c:14:1: error: expected identifier or '(' before '}' token
14 | }
| ^
|
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[0]=1;
a[0]=NULL;
}
else if(y[0]-y[1]==0){
flagX[0]=1;
a[0]=NULL;
}
else{
a[0]=(y[0]-y[1])/(x[0]-x[1]);
}
if(x[2]-x[3]==0){
flagY[1]=1;
a[1]=NULL;
}
else if(y[2]-y[3]==0){
flagX[1]=1;
a[1]=NULL;
}
else{
a[1]=(y[2]-y[3])/(x[2]-x[3]);
}
if((flagX[0]==1 && flagX[1]==1) || (flagY[0]==1 && flagY[1]==1) || (a[0]==a[1])){
printf("YES\n");
}
else{
printf("NO\n");
}
}
return 0;
}
|
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 types when assigning to type 'double' from type 'void *'
25 | a[0]=NULL;
| ^~~~
main.c:33:30: error: incompatible types when assigning to type 'double' from type 'void *'
33 | a[1]=NULL;
| ^~~~
main.c:37:30: error: incompatible types when assigning to type 'double' from type 'void *'
37 | a[1]=NULL;
| ^~~~
|
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");
}else{
printf("NO\n");
}
}
return 0;
|
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) swap(&x3,&x4);
if(y3<y4) swap(&y3,&y4);
if((y1-y2)/(x1-x2)==(y3-y4)/(x3-x4)) printf("YES\n");
else printf("NO\n");
}
return 0;
}
|
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;
}
if(cd<0){
cd*=-1;
}
if(ab==cd){
printf("YES\n");
}else{
printf("NO\n");
}
}
return 0;
}
|
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){
printf("YES\n");
else printf("NO\n");
}
return 0;
}
|
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 | if(a == b){
| ^
| ;
13 | printf("YES\n");
| ~~~~~~
|
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 == b){
printf("YES\n");
}else {
printf("NO\n");
}
return 0;
}
|
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("YES\n");
else
printf("NO\n");
return 0;
}
|
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("YES\n");
else
printf("NO\n");
return 0;
}
|
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( (y2-y1)/(x2-x1) == (y4-y3)/(x4-x3) ) printf("YES\n");
else printf("NO\n");
}
}
return 0;
}
|
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)
| ^
| ;
12 |
13 | if(x1==x2 || x3) {
| ~~
|
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");
continue;
}
double ab=(y1-y2)/(x1-x2);
double cd=(y3-y4)/(x3-x4);
if(ab==cd){
printf("YES\n");
}else{
printf("NO\n");
}
continue;
}
return 0;
}
|
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 <=> cross(a, b) = 0
int is_parallel(P a1, P a2, P b1, P b2) {
return EQ( cross(a1-a2, b1-b2), 0.0 );
}
int main(){
int n;
double x1,x2,x3,x4,y1,y2,y3,y4;
cin >> n;
for(int i=0 ; i<n ; i++){
cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4;
P a(x1,y1), b(x2,y2), c(x3,y3), d(x4,y4);
if( is_parallel(a,b,c,d) ){
cout << "YES" << endl;
}else{
cout << "NO" << endl;
}
}
}
|
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"<<endl;
else
cout<<"NO"<<endl;
}
}
int judge(double a1,double a2,double b1,double b2,double c1,double c2,double d1,double d2){
double aa,bb;
aa=(b2-a2)/(b1-a1);
bb=(d2-c2)/(d1-c1);
// cout<<aa<<" "<<bb<<endl;
if(aa==bb)return 1; else return 0;
}
|
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];
p = x[1]*y[0]-x[0]*y[1];
//(x3,y3)(x4,y4)を結ぶcx+dy=q の係数
c = y[2]-y[3]; d = x[3]-x[2];
q = x[3]*y[2]-x[2]*y[3];
//係数についての行列式
det = a*d-c*b;
//det=0で解は存在しない(この問題については2線分は同一直線上にないから)
if(fabs(det) < 0.00001) puts("YES");
//逆行列を用いて解を導出
else {
/*
ansx = (d*p - b*q)/det;
ansy = (-c*p + a*q)/det;
//ansxがどちらの線分のx座標範囲にも含まれるかを判定
if((x[0] - ansx)*(x[1] - ansx) <= 0.00001 && (x[2] - ansx)*(x[3] - ansx) <= 0.00001 ) {
printf("YES (%lf, %lf)\n",ansx,ansy);
} else puts("NO");
*/
puts("NO");
}
}
|
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 mean 'frexp'?
7 | rep(i,n) {
| ^~~
| frexp
a.cc:38:2: error: expected '}' at end of input
38 | }
| ^
a.cc:4:15: note: to match this '{'
4 | int main(void){
| ^
|
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];
p = x[1]*y[0]-x[0]*y[1];
//(x3,y3)(x4,y4)を結ぶcx+dy=q の係数
c = y[2]-y[3]; d = x[3]-x[2];
q = x[3]*y[2]-x[2]*y[3];
//係数についての行列式
det = a*d-c*b;
if(a*d == b*c) puts("YES");
else puts("NO");
/*
//det=0で解は存在しない(この問題については2線分は同一直線上にないから)
if(fabs(det) < 0.00001) puts("YES");
//逆行列を用いて解を導出
else {
/*
ansx = (d*p - b*q)/det;
ansy = (-c*p + a*q)/det;
//ansxがどちらの線分のx座標範囲にも含まれるかを判定
if((x[0] - ansx)*(x[1] - ansx) <= 0.00001 && (x[2] - ansx)*(x[3] - ansx) <= 0.00001 ) {
printf("YES (%lf, %lf)\n",ansx,ansy);
} else puts("NO");
puts("NO");
}
*/
}
|
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 mean 'frexp'?
7 | rep(i,n) {
| ^~~
| frexp
a.cc:42:2: error: expected '}' at end of input
42 | }
| ^
a.cc:4:15: note: to match this '{'
4 | int main(void){
| ^
|
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];
p = x[1]*y[0]-x[0]*y[1];
//(x3,y3)(x4,y4)を結ぶcx+dy=q の係数
c = y[2]-y[3]; d = x[3]-x[2];
q = x[3]*y[2]-x[2]*y[3];
//係数についての行列式
det = a*d-c*b;
if(a*d == b*c) puts("YES");
else puts("NO");
/*
//det=0で解は存在しない(この問題については2線分は同一直線上にないから)
if(fabs(det) < 0.00001) puts("YES");
//逆行列を用いて解を導出
else {
/*
ansx = (d*p - b*q)/det;
ansy = (-c*p + a*q)/det;
//ansxがどちらの線分のx座標範囲にも含まれるかを判定
if((x[0] - ansx)*(x[1] - ansx) <= 0.00001 && (x[2] - ansx)*(x[3] - ansx) <= 0.00001 ) {
printf("YES (%lf, %lf)\n",ansx,ansy);
} else puts("NO");
puts("NO");
}
*/
}
|
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 mean 'frexp'?
7 | rep(i,n) {
| ^~~
| frexp
a.cc:42:2: error: expected '}' at end of input
42 | }
| ^
a.cc:4:15: note: to match this '{'
4 | int main(void){
| ^
|
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];
p = x[1]*y[0]-x[0]*y[1];
//(x3,y3)(x4,y4)を結ぶcx+dy=q の係数
c = y[2]-y[3]; d = x[3]-x[2];
q = x[3]*y[2]-x[2]*y[3];
//係数についての行列式
det = a*d-c*b;
if(a*d == b*c) puts("YES");
else puts("NO");
/*
//det=0で解は存在しない(この問題については2線分は同一直線上にないから)
if(fabs(det) < 0.00001) puts("YES");
//逆行列を用いて解を導出
else {
/*
ansx = (d*p - b*q)/det;
ansy = (-c*p + a*q)/det;
//ansxがどちらの線分のx座標範囲にも含まれるかを判定
if((x[0] - ansx)*(x[1] - ansx) <= 0.00001 && (x[2] - ansx)*(x[3] - ansx) <= 0.00001 ) {
printf("YES (%lf, %lf)\n",ansx,ansy);
} else puts("NO");
puts("NO");
}
*/
}
|
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 mean 'frexp'?
7 | rep(i,n) {
| ^~~
| frexp
a.cc:42:2: error: expected '}' at end of input
42 | }
| ^
a.cc:4:15: note: to match this '{'
4 | int main(void){
| ^
|
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];
p = x[1]*y[0]-x[0]*y[1];
//(x3,y3)(x4,y4)を結ぶcx+dy=q の係数
c = y[2]-y[3]; d = x[3]-x[2];
q = x[3]*y[2]-x[2]*y[3];
//係数についての行列式
det = a*d-c*b;
if(det == 0) puts("YES");
else puts("NO");
/*
//det=0で解は存在しない(この問題については2線分は同一直線上にないから)
if(fabs(det) < 0.00001) puts("YES");
//逆行列を用いて解を導出
else {
/*
ansx = (d*p - b*q)/det;
ansy = (-c*p + a*q)/det;
//ansxがどちらの線分のx座標範囲にも含まれるかを判定
if((x[0] - ansx)*(x[1] - ansx) <= 0.00001 && (x[2] - ansx)*(x[3] - ansx) <= 0.00001 ) {
printf("YES (%lf, %lf)\n",ansx,ansy);
} else puts("NO");
puts("NO");
}
*/
}
}
|
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 mean 'frexp'?
7 | rep(i,n) {
| ^~~
| frexp
|
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 = x[1]-x[0];
//(x3,y3)(x4,y4)を結ぶcx+dy=q の係数
c = y[2]-y[3]; d = x[3]-x[2];
//係数についての行列式
det = a*d-c*b;
if(det == 0) puts("YES");
else puts("NO");
/*
//det=0で解は存在しない(この問題については2線分は同一直線上にないから)
if(fabs(det) < 0.00001) puts("YES");
//逆行列を用いて解を導出
else {
/*
ansx = (d*p - b*q)/det;
ansy = (-c*p + a*q)/det;
//ansxがどちらの線分のx座標範囲にも含まれるかを判定
if((x[0] - ansx)*(x[1] - ansx) <= 0.00001 && (x[2] - ansx)*(x[3] - ansx) <= 0.00001 ) {
printf("YES (%lf, %lf)\n",ansx,ansy);
} else puts("NO");
puts("NO");
}
*/
}
}
|
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: expected primary-expression before '<' token
a.cc:7:24: error: expected ';' before ')' token
7 | for(int i=0,i<n,i++) {
| ^
| ;
|
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 = x[1]-x[0];
p = x[1]*y[0]-x[0]*y[1];
//(x3,y3)(x4,y4)を結ぶcx+dy=q の係数
c = y[2]-y[3]; d = x[3]-x[2];
q = x[3]*y[2]-x[2]*y[3];
//係数についての行列式
det = a*d-c*b;
if(det == 0) puts("YES");
else puts("NO");
/*
//det=0で解は存在しない(この問題については2線分は同一直線上にないから)
if(fabs(det) < 0.00001) puts("YES");
//逆行列を用いて解を導出
else {
/*
ansx = (d*p - b*q)/det;
ansy = (-c*p + a*q)/det;
//ansxがどちらの線分のx座標範囲にも含まれるかを判定
if((x[0] - ansx)*(x[1] - ansx) <= 0.00001 && (x[2] - ansx)*(x[3] - ansx) <= 0.00001 ) {
printf("YES (%lf, %lf)\n",ansx,ansy);
} else puts("NO");
puts("NO");
}
*/
}
}
|
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:19: error: 'j' was not declared in this scope
7 | rep(itn j = 0,j< n,j++) {
| ^
a.cc:7:5: error: 'rep' was not declared in this scope; did you mean 'frexp'?
7 | rep(itn j = 0,j< n,j++) {
| ^~~
| frexp
|
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(void){
int n;
double x[4],y[4],a,b,c,d,det;
cin >> n;
rep(j,n) {
//入力を多少簡略化
for(int i=0;i<4;i++) {
cin >> x[i];
cin >> y[i];
}
//(x1,y1)(x2,y2)を結ぶax+by=p の係数
a = y[0]-y[1]; b = x[1]-x[0];
//(x3,y3)(x4,y4)を結ぶcx+dy=q の係数
c = y[2]-y[3]; d = x[3]-x[2];
//係数についての行列式
det = a*d-c*b;
if(fabs(det) < 0.00001) cout << "YES" << endl;
else cout << "NO" << endl;
}
}
#define rep(i,n) for (int i = 0; (i) < (n); ++ (i))
using namespace std;
int main(void){
int n;
double x[4],y[4],a,b,c,d,det;
cin >> n;
rep(j,n) {
//入力を多少簡略化
for(int i=0;i<4;i++) {
cin >> x[i];
cin >> y[i];
}
//(x1,y1)(x2,y2)を結ぶax+by=p の係数
a = y[0]-y[1]; b = x[1]-x[0];
//(x3,y3)(x4,y4)を結ぶcx+dy=q の係数
c = y[2]-y[3]; d = x[3]-x[2];
//係数についての行列式
det = a*d-c*b;
if(absf(det) < 0.00001) cout << "YES" << endl;
else cout << "NO" << endl;
}
}
|
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) < 0.00001) cout << "YES" << endl;
| ^~~~
| fabsf
|
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.__class__,self.__dict__)
for _ in range(args[0]):
if _ == 0:
pass
else:
A,B,C,D = ([Point(i,i+1) for i in range(0,8,2)])
tmp = B - A
tmp2 = C - D
tmp3 = (tmp.x * tmp2.y) - (tmp.y * tmp2.x)
if int(tmp3) == 0:
print("YES")
else:
print("NO")
|
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 << "YES" << endl;
else cout << "NO" << endl;
}
}
|
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 << endl;
}
}
}
|
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 ++)cin>>x[i]>>y[i];
cout<<(vabs(det())<CPS?"YES":"NO")<<endl;
}
return 0;
}
|
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())<CPS?"YES":"NO")<<endl;
| ^~~
| EPS
|
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' was not declared in this scope
56 | puts((y[1]-y[0])/(x[1]-x[0]) == (y[3]-y[2])/(x[3]-x[2])?
| ^~~~
|
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 in an identifier
7 | double x[4], y[4];
| ^
a.cc:7:14: error: extended character is not valid in an identifier
7 | double x[4], y[4];
| ^
a.cc:9:1: error: extended character is not valid in an identifier
9 | int main()
| ^
a.cc:13:5: error: extended character is not valid in an identifier
13 | for(int c = 0; c < n; c++)
| ^
a.cc:3:1: error: 'using\U00003000namespace\U00003000std' does not name a type
3 | using namespace std;
| ^~~~~~~~~~~~~~~~~~~~~
a.cc:5:1: error: 'int\U00003000n' does not name a type
5 | int n;
| ^~~~~~
a.cc:7:1: error: 'double\U00003000x' does not name a type; did you mean 'double'?
7 | double x[4], y[4];
| ^~~~~~~~~
| double
a.cc:9:1: error: ISO C++ forbids declaration of 'int\U00003000main' with no type [-fpermissive]
9 | int main()
| ^~~~~~~~~
a.cc: In function 'int int\U00003000main()':
a.cc:11:13: error: 'n' was not declared in this scope
11 | scanf("%d",&n);
| ^
a.cc:13:5: error: 'int\U00003000c' was not declared in this scope; did you mean 'int main'?
13 | for(int c = 0; c < n; c++)
| ^~~~~~
| int main
a.cc:13:17: error: 'c' was not declared in this scope
13 | for(int c = 0; c < n; c++)
| ^
a.cc:16:17: error: 'x' was not declared in this scope
16 | scanf("%lf%lf",&x[i],&y[i]);
| ^
a.cc:16:23: error: 'y' was not declared in this scope
16 | scanf("%lf%lf",&x[i],&y[i]);
| ^
a.cc:18:7: error: 'y' was not declared in this scope
18 | puts((y[1]-y[0])/(x[1]-x[0])==(y[3]-y[2])/(x[3]-x[2])?"YES":"NO");
| ^
a.cc:18:19: error: 'x' was not declared in this scope
18 | puts((y[1]-y[0])/(x[1]-x[0])==(y[3]-y[2])/(x[3]-x[2])?"YES":"NO");
| ^
a.cc:20:1: error: 'reurn' was not declared in this scope
20 | reurn 0;
| ^~~~~
a.cc:22:1: warning: no return statement in function returning non-void [-Wreturn-type]
22 | }
| ^
|
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: 'puts' was not declared in this scope
33 | puts((y[1]-y[0])/(x[1]-x[0]) == (y[3]-y[2])/(x[3]-x[2])?"YES"
| ^~~~
|
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\n");
}
else {
printf("NO\n");
}
n--;
}
return 0;
}
|
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++){
cin >> t[i][j];
}
}
for(int i = 0; i < n; i++){
ab = (t[i][1]-t[i][3])*(t[i][4]-t[i][6]);
cd = (t[i][5]-t[i][7])*(t[i][0]-t[i][2]);
if(t[i][0] == t[i][2]){
if(t[i][4] == t[i][6]){
cout << "YES" << endl;
}
else{
cout << "NO" << endl;
}
}
else if(t[i][1] == t[i][3]){
if(t[i][5] == t[i][7]){
cout << "YES" << endl;
}
else{
cout << "NO" << endl;
}
}
else if(ab == cd){
cout << "YES" << endl;
}
else{
cout << "NO" << endl;
}
}
}
|
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.cc:40:
/usr/include/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a type
68 | typedef ptrdiff_t streamsize; // Signed integral type
| ^~~~~~~~~
/usr/include/c++/14/bits/postypes.h:41:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
40 | #include <cwchar> // For mbstate_t
+++ |+#include <cstddef>
41 |
In file included from /usr/include/c++/14/bits/exception_ptr.h:38,
from /usr/include/c++/14/exception:166,
from /usr/include/c++/14/ios:41:
/usr/include/c++/14/new:131:26: error: declaration of 'operator new' as non-function
131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~~~
/usr/include/c++/14/new:131:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~
In file included from /usr/include/wchar.h:35,
from /usr/include/c++/14/cwchar:44,
from /usr/include/c++/14/bits/postypes.h:40:
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:132:41: error: attributes after parenthesized initializer ignored [-fpermissive]
132 | __attribute__((__externally_visible__));
| ^
/usr/include/c++/14/new:133:26: error: declaration of 'operator new []' as non-function
133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~~~
/usr/include/c++/14/new:133:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:134:41: error: attributes after parenthesized initializer ignored [-fpermissive]
134 | __attribute__((__externally_visible__));
| ^
/usr/include/c++/14/new:140:29: error: 'std::size_t' has not been declared
140 | void operator delete(void*, std::size_t) _GLIBCXX_USE_NOEXCEPT
| ^~~
/usr/include/c++/14/new:142:31: error: 'std::size_t' has not been declared
142 | void operator delete[](void*, std::size_t) _GLIBCXX_USE_NOEXCEPT
| ^~~
/usr/include/c++/14/new:145:26: error: declaration of 'operator new' as non-function
145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/14/new:145:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:145:52: error: expected primary-expression before 'const'
145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~
/usr/include/c++/14/new:147:26: error: declaration of 'operator new []' as non-function
147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/14/new:147:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:147:54: error: expected primary-expression before 'const'
147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~
/usr/include/c++/14/new:154:26: error: declaration of 'operator new' as non-function
154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t)
| ^~~~~~~~
/usr/include/c++/14/new:154:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:154:68: error: expected primary-expression before ')' token
154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t)
| ^
/usr/include/c++/14/new:155:73: error: attributes after parenthesized initializer ignored [-fpermissive]
155 | __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__));
| ^
/usr/include/c++/14/new:156:26: error: declaration of 'operator new' as non-function
156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~~~~
/usr/include/c++/14/new:156:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:156:68: error: expected primary-expression before ',' token
156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
| ^
/usr/include/c++/14/new:156:70: error: expected primary-expression before 'const'
156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~
/usr/include/c++/14/new:162:26: error: declaration of 'operator new []' as non-function
162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t)
| ^~~~~~~~
/usr/include/c++/14/new:162:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:162:70: error: expected primary-expression before ')' token
162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t)
| ^
/usr/include/c++/14/new:163:73: error: attributes after parenthesized initializer ignored [-fpermissive]
163 | __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__));
| ^
/usr/include/c++/14/new:164:26: error: declaration of 'operator new []' as non-function
164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~~~~
/usr/include/c++/14/new:164:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:164:70: error: expected primary-expression before ',' token
164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&)
| ^
/usr/include/c++/14/new:164:72: error: expected primary-expression before 'const'
164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~
/usr/include/c++/14/new:171:29: error: 'std::size_t' has not been declared
171 | void operator delete(void*, std::size_t, std::align_val_t)
| ^~~
/usr/include/c++/14/new:173:31: error: 'std::size_t' has not been declared
173 | void operator delete[](void*, std::size_t, std::align_val_t)
| ^~~
/usr/include/c++/14/new:179:33: error: declaration of 'operator new' as non-function
179 | _GLIBCXX_NODISCARD inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/14/new:179:51: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
179 | _GLIBCXX_NODI
|
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;
cin >> n;
for(int i = 0; i < n; i++){
Vector A, B, C, D;
cin >> A.x >> A.y >> B.x >> B.y >> C.x >> C.y >> D.x >> D.y;
Vector AB = sub_vector(A, B);
Vector CD = sub_vector(C, D);
if((cross_product(AB, CD) * 10000 == 0)
cout << "YES" << endl;
else
cout << "NO" << endl;
}
}
|
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;
| ~~~~
a.cc:34:5: error: expected primary-expression before 'else'
34 | else
| ^~~~
a.cc:33:29: error: expected ')' before 'else'
33 | cout << "YES" << endl;
| ^
| )
34 | else
| ~~~~
a.cc:32:7: note: to match this '('
32 | if((cross_product(AB, CD) * 10000 == 0)
| ^
|
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;
cin >> n;
for(int i = 0; i < n; i++){
Vector A, B, C, D;
cin >> A.x >> A.y >> B.x >> B.y >> C.x >> C.y >> D.x >> D.y;
Vector AB = sub_vector(A, B);
Vector CD = sub_vector(C, D);
if((cross_product(AB, CD) * 10000.0 == 0)
cout << "YES" << endl;
else
cout << "NO" << endl;
}
}
|
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;
| ~~~~
a.cc:34:5: error: expected primary-expression before 'else'
34 | else
| ^~~~
a.cc:33:29: error: expected ')' before 'else'
33 | cout << "YES" << endl;
| ^
| )
34 | else
| ~~~~
a.cc:32:7: note: to match this '('
32 | if((cross_product(AB, CD) * 10000.0 == 0)
| ^
|
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))?"YES":"NO");
}
return 0;
}
Compile Error Logs:
Status
Judge: 1/1 C CPU: 00.00 sec Memory: 620 KB Length: 335 B 2013-01-20 11:56 2013-01-20 11:56
Results for testcases
Case # Verdict CPU Time Memory In Out Case Name
Case #1: : Accepted 00.00 sec 620 KB
< prev | 1 / 1 | next > : Accepted 00.00 sec 620 KB
Judge Input #1 ( in1.txt | 16 B) Judge Output #1 ( out1.txt | 16 B)
In preparation.
In preparation.
Comments
Under Construction.
Categories
Free Tags
|
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 | 16 B)
| ^
a.cc:46:48: error: stray '#' in program
46 | Judge Input #1 ( in1.txt | 16 B) Judge Output #1 ( out1.txt | 16 B)
| ^
a.cc:2:1: error: expected unqualified-id before numeric constant
2 | 4
| ^
a.cc: In function 'int main()':
a.cc:18:9: error: 'scanf' was not declared in this scope
18 | scanf("%d\n", &n);
| ^~~~~
a.cc:22:17: error: 'printf' was not declared in this scope
22 | printf("%s\n",((y1-y2)/(x1-x2))==((y3-y4)/(x3-x4))?"YES":"NO");
| ^~~~~~
a.cc:14:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
13 | #include <stdio.h>
+++ |+#include <cstdio>
14 |
a.cc: At global scope:
a.cc:29:1: error: 'Compile' does not name a type
29 | Compile Error Logs:
| ^~~~~~~
|
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 pair<int,int> pii;
#define all(c) (c).begin(), (c).end()
#define loop(i,a,b) for(ll i=a; i<ll(b); i++)
#define rep(i,b) loop(i,0,b)
#define each(e,c) for(auto&e:c)
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define mt make_tuple
#define lb lower_bound
#define ub upper_bound
#ifdef DEBUG
#define dump(...) (cerr<<#__VA_ARGS__<<" = "<<(DUMP(),__VA_ARGS__).str()<<" ["<<__LINE__<<"]"<<endl)
struct DUMP:ostringstream{template<class T>DUMP &operator,(const T&t){if(this->tellp())*this<<", ";*this<<t;return *this;}};
#else
#define dump(...)
#endif
ll stoll(string const& s){
ll res = 0;
rep(i,s.size()){
res*=10;
res+=s[i]-'0';
}
return res;
}
ll input(){
string s; cin>>s;
size_t p=0;
int sign = s[0]=='-' ? -1 : 1;
if(sign==-1) s.erase(s.begin());
while(p<s.size() && s[p]!='.') p++;
while(s.size()-p < 6) s += '0';
s.erase(s.begin()+p);
dump(s);
return sign*stoll(s);
}
int main(){
int n; cin>>n;
rep(_,n){
ll x[2][2], y[2][2];
rep(i,2){
rep(j,2){
x[i][j] = input();
y[i][j] = input();
}
}
ll dx1=x[0][0]-x[0][1], dy1=y[0][0]-y[0][1];
ll dx2=x[1][0]-x[1][1], dy2=y[1][0]-y[1][1];
dump(dx1,dx2,dy1,dy2);
puts(dx1*dy2==dx2*dy1 ? "YES" : "NO");
}
}
|
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++/14/string:54,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:2:
/usr/include/c++/14/bits/basic_string.h:4180:3: note: candidate: 'long long int std::__cxx11::stoll(const std::string&, std::size_t*, int)'
4180 | stoll(const string& __str, size_t* __idx = 0, int __base = 10)
| ^~~~~
|
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 pair<int,int> pii;
#define all(c) (c).begin(), (c).end()
#define loop(i,a,b) for(ll i=a; i<ll(b); i++)
#define rep(i,b) loop(i,0,b)
#define each(e,c) for(auto&e:c)
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define mt make_tuple
#define lb lower_bound
#define ub upper_bound
#ifdef DEBUG
#define dump(...) (cerr<<#__VA_ARGS__<<" = "<<(DUMP(),__VA_ARGS__).str()<<" ["<<__LINE__<<"]"<<endl)
struct DUMP:ostringstream{template<class T>DUMP &operator,(const T&t){if(this->tellp())*this<<", ";*this<<t;return *this;}};
#else
#define dump(...)
#endif
ll stoll(string const& s){
ll res = 0;
rep(i,s.size()){
res*=10;
res+=s[i]-'0';
}
return res;
}
ll input(){
string s; cin>>s;
size_t p=0;
int sign = s[0]=='-' ? -1 : 1;
if(sign==-1) s.erase(s.begin());
while(p<s.size() && s[p]!='.') p++;
while(s.size()-p < 6) s += '0';
s.erase(s.begin()+p);
dump(s);
return sign*stoll(s);
}
int main(){
int n; cin>>n;
rep(_,n){
ll x[2][2], y[2][2];
rep(i,2){
rep(j,2){
x[i][j] = input();
y[i][j] = input();
}
}
ll dx1=x[0][0]-x[0][1], dy1=y[0][0]-y[0][1];
ll dx2=x[1][0]-x[1][1], dy2=y[1][0]-y[1][1];
dump(dx1,dx2,dy1,dy2);
puts(dx1*dy2==dx2*dy1 ? "YES" : "NO");
}
}
|
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++/14/string:54,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:2:
/usr/include/c++/14/bits/basic_string.h:4180:3: note: candidate: 'long long int std::__cxx11::stoll(const std::string&, std::size_t*, int)'
4180 | stoll(const string& __str, size_t* __idx = 0, int __base = 10)
| ^~~~~
|
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 RALL(a) (a).rbegin(), (a).rend()
#define MP make_pair
#define EACH(i, n) for (__typeof((n).begin()) i = (n).begin(); i != (n).end(); ++i)
#define SZ(a) int((a).size())
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define CLR(a) memset((a), 0 ,sizeof(a))
#define dump(x) cout << #x << " = " << (x) << "\n";
#define debug(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << "\n";
#define sq(n) (n) * (n)
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef vector<LL> VLL;
typedef vector<VLL> VVLL;
typedef unsigned int uint;
typedef unsigned long long ull;
typedef priority_queue<int> maxpq;
typedef priority_queue< int, vector<int>, greater<int> > minpq;
static const double EPS = 1e-10;
static const double PI = acos( -1.0 );
static const int mod = 10007;
static const int INF = 1 << 25;
static const LL LL_INF = 1152921504606846976;
static const int dx[] = { -1, 0, 1, 0, 1, -1, 1, -1 };
static const int dy[] = { 0, -1, 0, 1 , 1, 1, -1, -1 };
int n;
double x1, x2, x3, x4, y1, y2, y3, y4;
int main() {
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 ( fabs( ( x2 - x1 ) * ( y4 - y3 ) - ( x4 - x3 ) * ( y2 - y1 ) ) < EPS ) {
printf( "YES\n" );
}
else {
printf( "NO\n" );
}
}
return 0;
}
|
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/x86_64-linux-gnu/c++/14/bits/c++config.h:683,
from /usr/include/c++/14/cassert:43,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:33,
from a.cc:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:257:1: note: previous declaration 'double y1(double)'
257 | __MATHCALL (y1,, (_Mdouble_));
| ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:45:75: error: invalid operands of types 'double' and 'double(double) noexcept' to binary 'operator-'
45 | if ( fabs( ( x2 - x1 ) * ( y4 - y3 ) - ( x4 - x3 ) * ( y2 - y1 ) ) < EPS ) {
| ~~ ^ ~~
| | |
| | double(double) noexcept
| double
|
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 pair<int,int> pii;
#define all(c) (c).begin(), (c).end()
#define loop(i,a,b) for(ll i=a; i<ll(b); i++)
#define rep(i,b) loop(i,0,b)
#define each(e,c) for(auto&e:c)
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define mt make_tuple
#define lb lower_bound
#define ub upper_bound
#ifdef DEBUG
#define dump(...) (cerr<<#__VA_ARGS__<<" = "<<(DUMP(),__VA_ARGS__).str()<<" ["<<__LINE__<<"]"<<endl)
struct DUMP:ostringstream{template<class T>DUMP &operator,(const T&t){if(this->tellp())*this<<", ";*this<<t;return *this;}};
#else
#define dump(...)
#endif
int main(){
int n; cin>>n;
rep(_,n){
double x[2][2], y[2][2];
rep(i,2){
rep(j,2){
double x_,y_;
cin >> x_ >> y_;
x[i][j] = x_;
y[i][j] = y_;
}
}
double dx1=x[0][0]-x[0][1], dy1=y[0][0]-y[0][1];
double dx2=x[1][0]-x[1][1], dy2=y[1][0]-y[1][1];
//dump(dx1,dx2,dy1,dy2);
puts(dx1*dy2==dx2*dy1 ? "YES" : "NO");
}
}
|
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: note: in expansion of macro 'rep'
36 | rep(_,n){
| ^~~
a.cc:36:9: error: '_' was not declared in this scope
36 | rep(_,n){
| ^
a.cc:18:33: note: in definition of macro 'loop'
18 | #define loop(i,a,b) for(ll i=a; i<ll(b); i++)
| ^
a.cc:36:5: note: in expansion of macro 'rep'
36 | rep(_,n){
| ^~~
a.cc:38:13: error: expected ';' before 'i'
38 | rep(i,2){
| ^
a.cc:18:28: note: in definition of macro 'loop'
18 | #define loop(i,a,b) for(ll i=a; i<ll(b); i++)
| ^
a.cc:38:9: note: in expansion of macro 'rep'
38 | rep(i,2){
| ^~~
a.cc:38:13: error: 'i' was not declared in this scope
38 | rep(i,2){
| ^
a.cc:18:33: note: in definition of macro 'loop'
18 | #define loop(i,a,b) for(ll i=a; i<ll(b); i++)
| ^
a.cc:38:9: note: in expansion of macro 'rep'
38 | rep(i,2){
| ^~~
a.cc:39:17: error: expected ';' before 'j'
39 | rep(j,2){
| ^
a.cc:18:28: note: in definition of macro 'loop'
18 | #define loop(i,a,b) for(ll i=a; i<ll(b); i++)
| ^
a.cc:39:13: note: in expansion of macro 'rep'
39 | rep(j,2){
| ^~~
a.cc:39:17: error: 'j' was not declared in this scope
39 | rep(j,2){
| ^
a.cc:18:33: note: in definition of macro 'loop'
18 | #define loop(i,a,b) for(ll i=a; i<ll(b); i++)
| ^
a.cc:39:13: note: in expansion of macro 'rep'
39 | rep(j,2){
| ^~~
|
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])-xy_t(x[1],y[1]), xy_t(x[2],y[2])-xy_t(x[3],y[3])};
xy_t x=a[0],y=a[1];
bool p = abs(x.real()*y.imag()-x.imag()*y.real()) < eps;
cout << ( p ? ”YES” : ”NO” ) << endl ;
}
}
|
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 identifier
a.cc:19:27: error: extended character ” is not valid in an identifier
19 | cout << ( p ? ”YES” : ”NO” ) << endl ;
| ^
a.cc:19:27: error: extended character ” is not valid in an identifier
a.cc:9:19: error: 'a1e' was not declared in this scope
9 | const double eps= a1e−11;
| ^~~
a.cc:9:29: error: expected unqualified-id before numeric constant
9 | const double eps= a1e−11;
| ^~
a.cc: In function 'int main()':
a.cc:14:24: error: 'i' was not declared in this scope
14 | for(int t= 0; t<N; ++i){
| ^
a.cc:19:19: error: '\U0000201dYES\U0000201d' was not declared in this scope
19 | cout << ( p ? ”YES” : ”NO” ) << endl ;
| ^~~~~
a.cc:19:27: error: '\U0000201dNO\U0000201d' was not declared in this scope
19 | cout << ( p ? ”YES” : ”NO” ) << endl ;
| ^~~~
|
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(int i=k;i<(int)n;i++)
#define F first
#define S second
using namespace std;
const int dx[4] = { 0, 1, 0, -1 }, dy[4] = { 1, 0, -1, 0 };
const int dX[8] = { 0, 1, 1, 1, 0, -1, -1, -1 }, dY[8] = { 1, 1, 0, -1, -1, -1, 0, 1 };
struct XY
{
int x;
int y;
};
int in()
{
int x;
cin >> x;
return x;
}
/*
(char)'1' - (int)48 = (int)1;
1111181
*/
////////////////////////////////////////////////////
int main()
{
int n;
cin >> n;
rep(EEE, n)
{
double x1, x2, x3, x4, y1, y2, y3, y4;
cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4;
if (x1 == x2 || x3 == x4)
{
if (x1 == x2&&x3 == x4)cout << "YES<" < endl;
else cout << "NO" << endl;
}
else if ((x1 - x2)*(y3-y4) == (x3 - x4)*(y1 - y2))cout << "YES" << endl;
else cout << "NO" << endl;
}
}
|
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;
| ~~~~~~~~~~~~~~~^~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/bits/specfun.h:43,
from /usr/include/c++/14/cmath:3906,
from a.cc:3:
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed:
a.cc:49:65: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>'
49 | if (x1 == x2&&x3 == x4)cout << "YES<" < endl;
| ^~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
448 | operator<(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed:
a.cc:49:65: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
49 | if (x1 == x2&&x3 == x4)cout << "YES<" < endl;
| ^~~~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
493 | operator<(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed:
a.cc:49:65: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
49 | if (x1 == x2&&x3 == x4)cout << "YES<" < endl;
| ^~~~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1694 | operator<(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed:
a.cc:49:65: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
49 | if (x1 == x2&&x3 == x4)cout << "YES<" < endl;
| ^~~~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1760 | operator<(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed:
a.cc:49:65: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
49 | if (x1 == x2&&x3 == x4)cout << "YES<" < endl;
| ^~~~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:5:
/usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
673 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed:
a.cc:49:65: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
49 | if (x1 == x2&&x3 == x4)cout << "YES<" < endl;
| ^~~~
/usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
680 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed:
a.cc:49:65: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
49 | if (x1 == x2&&x3 == x4)cout << "YES<" < endl;
| ^~~~
/usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)'
688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed:
a.cc:49:65: note: couldn't deduce template parameter '_CharT'
49 | if (x1 == x2&&x3 == x4)cout << "YES<" < endl;
| ^~~~
/usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed:
a.cc:49:65: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
49 | if (x1 == x2&&x3 == x4)cout << "YES<" < endl;
| ^~~~
/usr/include/c++/14/bits/basic_string.h:3888:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3888 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3888:5: note: template argument deduction/substitution failed:
a.cc:49:65: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
49 | if (x1 == x2&&x3 == x4)cout << "YES<" < endl;
| ^~~~
/usr/include/c++/14/bits/basic_string.h:3901:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3901 | operator<(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3901:5: note: template argument deduction/substitution failed:
a.cc:49:65: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>'
49 | if (x1 == x2&&x3 == x4)cout << "YES<" < endl;
| ^~~~
In file included from /usr/include/c++/14/bits/memory_resource.h:47,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/tuple:2600:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator<(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)'
2600 | operator<(const tuple<_TElements...>& __t,
| ^~~~~~~~
/usr/include/c++/14/tuple:2600:5: note: template argument deduction/substitution failed:
a.cc:49:65: note: 'std::basic_ostream<char>' is not derived from 'const std::tuple<_UTypes ...>'
49 | if (x1 == x2&&x3 == x4)cout << "YES<" < endl;
| ^~~~
In file included from /usr/include/c++/14/vector:66,
from a.cc:9:
/usr/include/c++/14/bits/stl_vector.h:2089:5: note: candidate: 'template<class _Tp, class _Alloc> bool std::operator<(const vector<_Tp, _Alloc>&, const vector<_Tp, _Alloc>&)'
2089 | operator<(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:2089:5: note: template argument deduction/substitution failed:
a.cc:49:65: note: 'std::basic_ostream<char>' is not derived from 'const std::vector<_Tp, _Alloc>'
49 | if (x1 == x2&&x3 == x4)cout << "YES<" < endl;
| ^~~~
In file included from /usr/include/c++/14/deque:66,
from /usr/include/c++/14/queue:62,
from a.cc:11:
/usr/include/c++/14/bits/stl_deque.h:2334:5: note: candidate: 'template<class _Tp, class _Alloc> bool std::operator<(const deque<_Tp, _Alloc>&, const deque<_Tp, _Alloc>&)'
2334 | operator<(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_deque.h:2334:5: note: template argument deduction/substitution failed:
a.cc:49:
|
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 <cstdlib>
??
using namespace std;
??
inline int to_int(string s) {int v; istringstream sin(s); sin >> v; return v;}
template<class T> inline string to_str(T x) {ostringstream sout; sout << x; return sout.str();}
??
typedef long long ll;
??
int main()
{
????????int num;
????????double sx1, sy1, sx2, sy2;
????????double ex1, ey1, ex2, ey2;
??
????????cin >> num;
??
????????for(int i = 0; i < num; i++)
????????{
????????????????cin >> sx1 >> sy1 >> sx2 >> sy2 >> ex1 >> ey1 >> ex2 >> ey2;
??
????????????????if( (sy2-sy1)/(sx2 - sx1) == (ey2-ey1)/(ex2-ex1))
????????????????{
????????????????????????cout << "YES" << endl;
????????????????}
????????????????else
????????????????{
????????????????????????cout << "NO" << endl;
????????????????}
????????}
}
|
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; return sout.str();}
| ^~~~~~
| stdin
a.cc:24:1: error: expected unqualified-id before '?' token
24 | ??
| ^
a.cc:26:1: error: expected unqualified-id before '?' token
26 | ??
| ^
|
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 <cstdlib>
??
using namespace std;
??
??
int main()
{
????????int num;
????????double sx1, sy1, sx2, sy2;
????????double ex1, ey1, ex2, ey2;
??
????????cin >> num;
??
????????for(int i = 0; i < num; i++)
????????{
????????????????cin >> sx1 >> sy1 >> sx2 >> sy2 >> ex1 >> ey1 >> ex2 >> ey2;
??
????????????????if( (sy2-sy1)/(sx2 - sx1) == (ey2-ey1)/(ex2-ex1))
????????????????{
????????????????????????cout << "YES" << endl;
????????????????}
????????????????else
????????????????{
????????????????????????cout << "NO" << endl;
????????????????}
????????}
}
|
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){
cout << "YES" << endl;
}else{
cout << "NO" << endl;
}
}
}
|
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:20: error: 'a2' was not declared in this scope; did you mean 'y2'?
14 | a1=(y1-y2)/(x2-x1);a2=(y3-y4)/(x3-x4);
| ^~
| y2
a.cc:15:17: error: 'YES' was not declared in this scope
15 | if(a1==a2)cout<<YES<<endl;
| ^~~
a.cc:16:12: error: 'NO' was not declared in this scope
16 | else cout<<NO<<endl;
| ^~
|
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)))==((y4-y3)*(x2-x1))){flag=true;}
if(flag) cout<<"YES"<<endl;
else cout<<"NO"<<endl;
}
return 0;
}
|
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++)
#define FORI(i,k,n) for(int i=k;i<(int)n;i++)
using namespace std;
int main() {
int n;
cin >> n;
for (int l = 0; l < n; l++) {
double x[4], y[4];
for (int i = 0; i < 4; i++)cin >> x[i] >> y[i];
if (x[0] == x[1] && x[2] == x[3]) {
cout << "YES" << endl;
continue;
} else if ((y[1] - y[0]) / (x[1] - x[0]) == (y[3] - y[2]) / (x[3] - x[2])) {
cout << "YES" << endl;
continue;
}
cout << "NO" << endl;
continue;
}
}
#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++)
#define FORI(i,k,n) for(int i=k;i<(int)n;i++)
using namespace std;
int main() {
int n;
cin >> n;
for (int l = 0; l < n; l++) {
double x[4], y[4];
for (int i = 0; i < 4; i++)cin >> x[i] >> y[i];
if (x[0] == x[1] && x[2] == x[3]) {
cout << "YES" << endl;
continue;
} else if ((y[1] - y[0]) / (x[1] - x[0]) == (y[3] - y[2]) / (x[3] - x[2])) {
cout << "YES" << endl;
continue;
}
cout << "NO" << endl;
continue;
}
}
|
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 )
{
for ( auto i = 0; i < 4; ++i )
{
cin >> x[i];
cin >> y[i];
}
double abx = x[1] - x[0];
double aby = y[1] - y[0];
double cdx = x[3] - x[2];
double cdy = y[3] - y[2];
if ( abx * cdy - aby * cdx == 0 )
cout << "YES" << endl;
else
cout << "NO" << endl;
}
return 0;
}
|
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/postypes.h:68:11: error: 'ptrdiff_t' does not name a type
68 | typedef ptrdiff_t streamsize; // Signed integral type
| ^~~~~~~~~
/usr/include/c++/14/bits/postypes.h:41:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
40 | #include <cwchar> // For mbstate_t
+++ |+#include <cstddef>
41 |
In file included from /usr/include/c++/14/bits/char_traits.h:50,
from /usr/include/c++/14/string:42,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/iomanip:42:
/usr/include/c++/14/type_traits:666:33: error: 'nullptr_t' is not a member of 'std'
666 | struct is_null_pointer<std::nullptr_t>
| ^~~~~~~~~
/usr/include/c++/14/type_traits:666:42: error: template argument 1 is invalid
666 | struct is_null_pointer<std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:670:48: error: template argument 1 is invalid
670 | struct is_null_pointer<const std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:674:51: error: template argument 1 is invalid
674 | struct is_null_pointer<volatile std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:678:57: error: template argument 1 is invalid
678 | struct is_null_pointer<const volatile std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:1429:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1429 | : public integral_constant<std::size_t, alignof(_Tp)>
| ^~~~~~
In file included from /usr/include/wchar.h:35,
from /usr/include/c++/14/cwchar:44,
from /usr/include/c++/14/bits/postypes.h:40:
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/type_traits:1429:57: error: template argument 1 is invalid
1429 | : public integral_constant<std::size_t, alignof(_Tp)>
| ^
/usr/include/c++/14/type_traits:1429:57: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1438:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1438 | : public integral_constant<std::size_t, 0> { };
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/type_traits:1438:46: error: template argument 1 is invalid
1438 | : public integral_constant<std::size_t, 0> { };
| ^
/usr/include/c++/14/type_traits:1438:46: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1440:26: error: 'std::size_t' has not been declared
1440 | template<typename _Tp, std::size_t _Size>
| ^~~
/usr/include/c++/14/type_traits:1441:21: error: '_Size' was not declared in this scope
1441 | struct rank<_Tp[_Size]>
| ^~~~~
/usr/include/c++/14/type_traits:1441:27: error: template argument 1 is invalid
1441 | struct rank<_Tp[_Size]>
| ^
/usr/include/c++/14/type_traits:1442:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/type_traits:1442:65: error: template argument 1 is invalid
1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^
/usr/include/c++/14/type_traits:1442:65: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1446:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/type_traits:1446:65: error: template argument 1 is invalid
1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^
/usr/include/c++/14/type_traits:1446:65: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:2086:26: error: 'std::size_t' has not been declared
2086 | template<typename _Tp, std::size_t _Size>
| ^~~
/usr/include/c++/14/type_traits:2087:30: error: '_Size' was not declared in this scope
2087 | struct remove_extent<_Tp[_Size]>
| ^~~~~
/usr/include/c++/14/type_traits:2087:36: error: template argument 1 is invalid
2087 | struct remove_extent<_Tp[_Size]>
| ^
/usr/include/c++/14/type_traits:2099:26: error: 'std::size_t' has not been declared
2099 | template<typename _Tp, std::size_t _Size>
| ^~~
/usr/include/c++/14/type_traits:2100:35: error: '_Size' was not declared in this scope
2100 | struct remove_all_extents<_Tp[_Size]>
| ^~~~~
/usr/include/c++/14/type_traits:2100:41: error: template argument 1 is invalid
2100 | struct remove_all_extents<_Tp[_Size]>
| ^
/usr/include/c++/14/type_traits:2171:12: error: 'std::size_t' has not been declared
2171 | template<std::size_t _Len>
| ^~~
/usr/include/c++/14/type_traits:2176:30: error: '_Len' was not declared in this scope
2176 | unsigned char __data[_Len];
| ^~~~
/usr/include/c++/14/type_traits:2194:12: error: 'std::size_t' has not been declared
2194 | template<std::size_t _Len, std::size_t _Align =
| ^~~
/usr/include/c++/14/type_traits:2194:30: error: 'std::size_t' has not been declared
2194 | template<std::size_t _Len, std::size_t _Align =
| ^~~
/usr/include/c++/14/type_traits:2195:55: error: '_Len' was not declared in this scope
2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)>
| ^~~~
/usr/include/c++/14/type_traits:2195:59: error: template argument 1 is invalid
2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)>
| ^
/usr/include/c++/14/type_traits:2202:30: error: '_Len' was not declared in this scope
2202 | unsigned char __data[_Len];
| ^~~~
/usr/include/c++/14/type_traits:2203:44: error: '_Align' was not declared in this scope
2203 | struct __attribute__((__aligned__((_Align)))) { } __align;
| ^~~~~~
/usr/include/c++/14/bits/char_traits.h:144:61: error: 'std::size_t' has not been declared
144 | compare(const char_type* __s1, const char_type* __s2, std::size_t __n);
| ^~~
/usr/include/c++/14/bits/char_traits.h:146:40: error: 'size_t' in namespace 'std' does not name a type
146 | static _GLIBCXX14_CONSTEXPR std::size_t
| ^~~~~~
/usr/include/c++/14/bits/char_traits.h:150:34: error: 'std::size_t' has not been declared
150 | find(const char_type* __s, std::size_t __n, const char_type& __a);
| ^~~
/usr/include/c++/14/bits/char_traits.h:153:52: error: 'std::size_t' has not been declared
153 | move(char_type* __s1, const char_type* __s2, std::size_t __n);
| ^~~
/usr/include/c++/14/bits/char_traits.h:156:52: error: 'std::size_t' has not been declared
156 | copy(char_type* __s1, const char_type* __s2, std::size_t __n);
| ^~~
/usr/include/c++/14/bits/char_traits.h:159:30: error: 'std::size_t' has not been declared
159 | assign(char_type* __s, std::size_t __n, char_type __a);
| ^~~
/usr/include/c++/14/bits/char_traits.h:187:59: error: 'std::size_t' has not been declared
187 | compare(const char_type* __s1, const char_type* __s2, std::size_t __n)
| ^~~
/usr/include/c++/14/bits/char_traits.h: In static member function 'static constexpr int __gnu_cxx::char_traits<_CharT>::compare(const char_type*, const char_type*, int)':
/usr/include/c++/14/bits/char_traits.h:189:17: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
189 | for (std::size_t __i = 0; __i < __n; ++__i)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/bits/char_traits.h:189:33: error: '__i' was not declared in this scope; did you mean '__n'?
189 | for (std::size_t __i = 0; __i < __n; ++__i)
|
|
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')})
| ^~~~~
a.cc:1:193: 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')})
| ^~~~
a.cc:1:8: error: expected constructor, destructor, or type conversion before '(' token
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')})
| ^
a.cc:1:199: error: expected unqualified-id before ')' token
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.