criyle/codenet-compile-errors huggingface dataset:
Language: 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;
????????????????}
????????}
}

Compiler output:
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 | ??
      | ^
Language: 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;
????????????????}
????????}
}

Compiler output:
a.cc:19:1: error: expected unqualified-id before '?' token
   19 | ??
      | ^
a.cc:21:1: error: expected unqualified-id before '?' token
   21 | ??
      | ^
Language: 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;
        }
    }
}

Compiler output:
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
Language: 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;
}

Compiler output:
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;
      |            ^~
Language: 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;
}

Compiler output:
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;}
      |                               ^~
Language: 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;
	}

}

Compiler output:
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() {
      |     ^~~~
Language: 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')})

Compiler output:
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')})
      |                                                                                                                                                                                                       ^
Language: C++

#include <stdio.h>

int
main(void)
{
	int n;

	scanf("%d", &n);

	double x1, y1, x2, y2, x3, y3, x4, y4;

	while (n--) {
		scanf("%lf %lf %lf %lf %lf %lf %lf %lf",
				   &x1, &y1, &x2, &y2, &x3, &y3, &x4, &y4);

		(y2-y1)/(x2-x1) == (y4-y3)/(x4-x3)
		if ((y2 - y1)/(x2 - x1) == (y4 - y3)/(x4 - x3)) {
			printf("YES\n");
		} else {
			printf("NO\n");
		}
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:51: error: expected ';' before 'if'
   16 |                 (y2-y1)/(x2-x1) == (y4-y3)/(x4-x3)
      |                                                   ^
      |                                                   ;
   17 |                 if ((y2 - y1)/(x2 - x1) == (y4 - y3)/(x4 - x3)) {
      |                 ~~                                 
a.cc:19:19: error: 'else' without a previous 'if'
   19 |                 } else {
      |                   ^~~~
Language: C++

#include<cstdio>
#include<cmath>

int main(){
	int n;
	double x[4], y[4];
	int xi[4], yi[4];
	scanf("%d", &n);
	for(int 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]);

		for(int i = 0; i < 4; i++){
			xi[i] = (int)(x[i] * 100000);
			yi[i] = (int)(y[i] * 100000);
		}

		if(xi[0] - xi[1] == 0){
			if(xi[2] - xi[3] == 0){
				printf("YES\n");
			}else{
				printf("NO\n");
			}
		}else{
			if((yi[0] - yi[1])*(xi[2] - xi[3])) == (xi[0] - xi[1])*(yi[2] - yi[3]){
				printf("YES\n");
			}else if((yi[0] - yi[1])*(xi[2] - xi[3])) == - (xi[0] - xi[1])*(yi[2] - yi[3]){
				printf("YES\n");
			}else{
				printf("NO\n");
			}
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:61: error: expected primary-expression before '==' token
   24 |                         if((yi[0] - yi[1])*(xi[2] - xi[3])) == (xi[0] - xi[1])*(yi[2] - yi[3]){
      |                                                             ^~
a.cc:26:67: error: expected primary-expression before '==' token
   26 |                         }else if((yi[0] - yi[1])*(xi[2] - xi[3])) == - (xi[0] - xi[1])*(yi[2] - yi[3]){
      |                                                                   ^~
Language: C++

#include<iostream>
using namespace std;
 
int main(){
    int n;
    double x[4],y[4];
    cin>>n;
    for(;n--;){
        for(int i=0;i<4;i++){
            cin>>x[i];
            cin>>y[i];
        }
        if((x[0]-x[1])*(y[2]-y[3])==(x[2]-x[3])*(y[0]-y[1])){
            cout<<"YES"<<endl;
        }else{
            cout<<"NO"<<endl;
        }
    }
    return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:19:14: error: expected '}' at end of input
   19 |     return 0;
      |              ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include <iostream>

int main(){
	double x1,y1,x2,y2,x3,y3,x4,y4
	double a,b;
	int n;
	std::cin >> n;
	for(int i=0 ; i<n ; ++i){
		std::cin >>x1>>y1>>x2>>y2>>x3>>y3>>x4>>y4;
		bool parallel=false;
		a=(y2-y1)/(x2-x1);
		b=(y4-y3)/(x4-x3);
		if(x1==x2 && x3==x4) {
			parallel=true;
			goto result;
		}
		else if(x1==x2 || x3==x4) {
			goto result;
		}
		else if (a==b) {
			parallel=true;
		}
		result:
		std::cout << ( parallel ? "YES" : "NO") << std::endl;
	}
	return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: expected initializer before 'double'
    5 |         double a,b;
      |         ^~~~~~
a.cc:9:56: error: 'y4' was not declared in this scope; did you mean 'x4'?
    9 |                 std::cin >>x1>>y1>>x2>>y2>>x3>>y3>>x4>>y4;
      |                                                        ^~
      |                                                        x4
a.cc:11:17: error: 'a' was not declared in this scope
   11 |                 a=(y2-y1)/(x2-x1);
      |                 ^
a.cc:12:17: error: 'b' was not declared in this scope
   12 |                 b=(y4-y3)/(x4-x3);
      |                 ^
Language: C++

#include <iostream>
using namespace std;
int main(){
	int n;
	cin >> n;
	while(n--){
		double x[4], y[4], o;
		for(int i = 0; i < 4) cin >> x[i] >> y[i];
		o = (x[1]-x[0])*(y[3]-y[2]) - (y[1]-y[0])*(x[3]-x[2]);
		if(o < 0.000001) cout << "YES" << endl;
		else cout << "NO" << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:37: error: expected ';' before ')' token
    8 |                 for(int i = 0; i < 4) cin >> x[i] >> y[i];
      |                                     ^
      |                                     ;
Language: C++

import java.io.*;

class Main{
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line=br.readLine();
int n = Integer.parseInt(line);
for (int i = 0; i < n; i++) {
String line = br.readLine();
String[] values = line.split(" ");
double x1 = Double.parseDouble(values[0]);
double y1 = Double.parseDouble(values[1]);
double x2 = Double.parseDouble(values[2]);
double y2 = Double.parseDouble(values[3]);
double x3 = Double.parseDouble(values[4]);
double y3 = Double.parseDouble(values[5]);
double x4 = Double.parseDouble(values[6]);
double y4 = Double.parseDouble(values[7]);
System.out.println((x2 - x1) * (y4 - y3) == (y2 - y1) * (x4 - x3) ? "YES" : "NO");
}
}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:7: error: expected ':' before 'static'
    4 | public static void main(String[] args) throws IOException{
      |       ^~~~~~~
      |       :
a.cc:4:25: error: 'String' has not been declared
    4 | public static void main(String[] args) throws IOException{
      |                         ^~~~~~
a.cc:4:34: error: expected ',' or '...' before 'args'
    4 | public static void main(String[] args) throws IOException{
      |                                  ^~~~
a.cc:4:38: error: expected ';' at end of member declaration
    4 | public static void main(String[] args) throws IOException{
      |                                      ^
      |                                       ;
a.cc:4:40: error: 'throws' does not name a type
    4 | public static void main(String[] args) throws IOException{
      |                                        ^~~~~~
a.cc:22:2: error: expected ';' after class definition
   22 | }
      |  ^
      |  ;
Language: C++

#include <bits/stdc++.h>
#define rep(i,l,n) for(int i=l;i<n;i++)
using namespace std;

int main(){
	int n;
	cin>>n;
	rep(i,0,n){
		double x1,y1,x2,y2,x3,y3,x4,y4,m1,m2;
		cin>>x1>>y1>>x2>>y2>>x3>>y3>>x4>>y4;
		m1=(y2-y1)/(x2-x1);
		m2=(y4-y3)/(x4-x3);
		if(fabs(m1-m2)<(1e-10) cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:39: error: expected ';' before 'cout'
   13 |                 if(fabs(m1-m2)<(1e-10) cout<<"YES"<<endl;
      |                                       ^~~~~
      |                                       ;
a.cc:14:17: error: expected primary-expression before 'else'
   14 |                 else cout<<"NO"<<endl;
      |                 ^~~~
a.cc:13:58: error: expected ')' before 'else'
   13 |                 if(fabs(m1-m2)<(1e-10) cout<<"YES"<<endl;
      |                   ~                                      ^
      |                                                          )
   14 |                 else cout<<"NO"<<endl;
      |                 ~~~~
Language: C++

import java.util.Scanner;

public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        double x[] = new double[4];
        double y[] = new double[4];
      for(;n>0;n--){
            for(int i=0; i<4; i++){
                x[i] = sc.nextDouble();
                y[i] = sc.nextDouble();
            }
            double ab = (y[1]-y[0])/(x[1]-x[0]);
            double cd = (y[3]-y[2])/(x[3]-x[2]);
            System.out.println(ab==cd ? "YES" : "NO");
        }
    }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main{
      | ^~~~~~
Language: C++

//0021
#include <bits/stdc++.h>
using namespace std;

int main(){
	double x1,y1,x2,y2,x3,y3,x4,y4;
	double 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(AB == CD)
			cout<<"YES"<<endl;

		else
			cout<<"NO"<<endl;
	}
	return 0;
}
//0021
#include <bits/stdc++.h>
using namespace std;

int main(){
	double x1,y1,x2,y2,x3,y3,x4,y4;
	double 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(AB == CD)
			cout<<"YES"<<endl;

		else
			cout<<"NO"<<endl;
	}
	return 0;
}

Compiler output:
a.cc:27:5: error: redefinition of 'int main()'
   27 | int main(){
      |     ^~~~
a.cc:5:5: note: 'int main()' previously defined here
    5 | int main(){
      |     ^~~~
Language: C++

#include "geometry/intersect.hpp"

void solve() {
  Line p, q;
  cin >> p >> q;
  cout << (intersect<true>(p, q) ? "NO" : "YES") << endl;
}

int main() {
  int t;
  cin >> t;
  for (int i = 0; i < t; ++i) solve();
}

Compiler output:
a.cc:1:10: fatal error: geometry/intersect.hpp: No such file or directory
    1 | #include "geometry/intersect.hpp"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

//AOJ 0021
#include <stdio.h>
//x???y?????????????????????????????????????????????
int main(){
    double x1,y1,x2,y2,x3,y3,x4,y4;
    double m1,m2;
    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);
    	m1=(y2-y1)/(x2-x1);
    	m2=(y4-y3)/(x4-x3);
    	if(m1==m2)puts("YES");
    	else puts("NO");
    	}
	}
	return 0;
}

Compiler output:
a.cc:17:9: error: expected unqualified-id before 'return'
   17 |         return 0;
      |         ^~~~~~
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
Language: C++

#include <iostream>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <functional>
#include <string>
#include <algorithm>
#include <climits>
#include <utility>

#define PRINT(STR) cout << STR << endl;
#define REP(i, n) for (int (i) = 0; (i) < (int)(n); (i)++)
#define REG(i, a, b) for (int (i) = ((int)(a)); (i) < ((int)(b)); i++)
#define ALL(V) (V).begin(), (V).end()

typedef long long ll;

using namespace std;

int nextInt() { int n = -1; cin >> n; return n; }
double nextDouble() { double d = -1; cin >> d; return d; }
ll nextll() { ll n = -1; cin >> n; return n; }
string nextString() { string str; cin >> str; return str; }

int INF = 9999999;

// BEGIN //////////////////////////////////////////////////////////////


int main() {
	int N = nextInt();
	REP(i, N) {
		double x1 = nextDouble();
		double y1 = nextDouble();
		double x2 = nextDouble();
		double y2 = nextDouble();
		double x3 = nextDouble();
		double y3 = nextDouble();
		double x4 = nextDouble();
		double y4 = nextDouble();
		if (x1 > x2) {
			double t = x2;
			x2 = x1; x1 = t;
			t = y2; y2 = y1; y1 = t;
		}
		if (x3 > x4) {
			double t = x4;
			x4 = x3; x3 = t;
			t = y4; y4 = y3; y3 = t;
		}
		if (x2 - x1 == 0 && x4 - x3 == 0) {
			if (y2 - y1 == 0 || y4 - y3 == 0) {
				PRINT("NO");
			} else {
				print("YES");
			}
		} else if (x2 - x1 == 0 || x4 - x3 == 0) {
			PRINT("NO");
		} else {
			if ((y2 - y1) / (x2 - x1) - (y4 - y3) / (x4 - x3) < 0.000006) {
				PRINT("YES");
			} else {
				PRINT("NO");
			}
		}
	}

	return 0;
}

// END   //////////////////////////////////////////////////////////////

Compiler output:
a.cc: In function 'int main()':
a.cc:61:33: error: 'print' was not declared in this scope; did you mean 'rint'?
   61 |                                 print("YES");
      |                                 ^~~~~
      |                                 rint
Language: C++

n=gets.to_i;n.times{a,b,c,d,e,f,g,h=gets.split.map &:to_f;puts (c-a)*(h-f)-(d-b)*(g-e)==0.0 ?"YES":"NO"}

Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n=gets.to_i;n.times{a,b,c,d,e,f,g,h=gets.split.map &:to_f;puts (c-a)*(h-f)-(d-b)*(g-e)==0.0 ?"YES":"NO"}
      | ^
a.cc:1:13: error: 'n' does not name a type
    1 | n=gets.to_i;n.times{a,b,c,d,e,f,g,h=gets.split.map &:to_f;puts (c-a)*(h-f)-(d-b)*(g-e)==0.0 ?"YES":"NO"}
      |             ^
Language: C++

#include<iostream>
using namespace std;

int main(){
    const double eps = 1e-11;
    double x[4], y[4];
    int s,t,u,v;
    int n;
    cin >> n;
    for (int t = 0;t < N;++t) {
        for (int i = 0;i < 4;++i){
            cin >> x[i] >> y[i]; 
        }
    }
    s = x[1] - x[0];
    t = y[1] - y[0];
    u = x[3] - x[2];
    v = y[3] - y[2];
    if(s * v - t * u > 0){
        int m = s * v - t * u;
    }
    else{
        int m = t * u - s * v;
    }
    if( m < eps){
        cout << "YES" << endl;
    }
    else{
        cout << "NO" << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:24: error: 'N' was not declared in this scope
   10 |     for (int t = 0;t < N;++t) {
      |                        ^
a.cc:25:9: error: 'm' was not declared in this scope
   25 |     if( m < eps){
      |         ^
Language: C++

#include<iostream>
using namespace std;

int main(){
    const double eps = 1e-11;
    double x[4], y[4];
    int s,t,u,v;
    int n;
    cin >> n;
    for (int t = 0;t < n;++t) {
        for (int i = 0;i < 4;++i){
            cin >> x[i] >> y[i]; 
        }
    }
    s = x[1] - x[0];
    t = y[1] - y[0];
    u = x[3] - x[2];
    v = y[3] - y[2];
    if(s * v - t * u > 0){
        int m = s * v - t * u;
    }
    else{
        int m = t * u - s * v;
    }
    if( m < eps){
        cout << "YES" << endl;
    }
    else{
        cout << "NO" << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:9: error: 'm' was not declared in this scope
   25 |     if( m < eps){
      |         ^
Language: C++

#include<iostream>
using namespace std;

int main(){
    double EPS = 1e-12;
    double x[4], y[4];
    int s,t,u,v;
    int n;
    cin >> n;
    for (int t = 0;t < n;++t) {
        for (int i = 0;i < 4;++i){
            cin >> x[i] >> y[i]; 
        }
    }
    s = x[1] - x[0];
    t = y[1] - y[0];
    u = x[3] - x[2];
    v = y[3] - y[2];
    if(s * v - t * u > 0){
        int m = s * v - t * u;
    }
    else{
        int m = t * u - s * v;
    }
    if( m < eps){
        cout << "YES" << endl;
    }
    else{
        cout << "NO" << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:9: error: 'm' was not declared in this scope
   25 |     if( m < eps){
      |         ^
a.cc:25:13: error: 'eps' was not declared in this scope
   25 |     if( m < eps){
      |             ^~~
Language: C++

#include <iostream>
#include <cmath>
#include <vector>
#include <string>
#include <algorithm>
#include <climits>
using namespace std;

int main(){
    double EPS = 1e-12;
    double x[4], y[4];
    int s,t,u,v;
    int n;
    cin >> n;
    for (int t = 0;t < n;++t) {
        for (int i = 0;i < 4;++i){
            cin >> x[i] >> y[i]; 
        }
    }
    s = x[1] - x[0];
    t = y[1] - y[0];
    u = x[3] - x[2];
    v = y[3] - y[2];
    if(s * v - t * u > 0){
        int m = s * v - t * u;
    }
    else{
        int m = t * u - s * v;
    }
    if( m < eps){
        cout << "YES" << endl;
    }
    else{
        cout << "NO" << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:9: error: 'm' was not declared in this scope
   30 |     if( m < eps){
      |         ^
a.cc:30:13: error: 'eps' was not declared in this scope
   30 |     if( m < eps){
      |             ^~~
Language: C++

#include <iostream>
#include <cmath>
#include <vector>
#include <string>
#include <algorithm>
#include <climits>
using namespace std;

int main(){
    double EPS = 1e-12;
    double x[4], y[4];
    int s,t,u,v;
    int n;
    cin >> n;
    for (int t = 0;t < n;++t) {
        for (int i = 0;i < 4;++i){
            cin >> x[i] >> y[i]; 
        }
    }
    s = x[1] - x[0];
    t = y[1] - y[0];
    u = x[3] - x[2];
    v = y[3] - y[2];
    if(s * v - t * u > 0){
        int m = s * v - t * u;
    }
    else{
        int m = t * u - s * v;
    }
    if( m < EPS){
        cout << "YES" << endl;
    }
    else{
        cout << "NO" << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:9: error: 'm' was not declared in this scope
   30 |     if( m < EPS){
      |         ^
Language: C++

#include <iostream>
#include <cmath>
#include <vector>
#include <string>
#include <algorithm>
#include <climits>
using namespace std;

int main(){
    double EPS = 1e-12;
    double x[4], y[4];
    int s,t,u,v;
    int n;
    cin >> n;
    for (int t = 0;t < n;++t) {
        for (int i = 0;i < 4;++i){
            cin >> x[i] >> y[i]; 
        }
    }
    s = x[1] - x[0];
    t = y[1] - y[0];
    u = x[3] - x[2];
    v = y[3] - y[2];
    if(s * v - t * u > 0){
        double m = s * v - t * u;
    }
    else{
        double m = t * u - s * v;
    }
    if( m < EPS){
        cout << "YES" << endl;
    }
    else{
        cout << "NO" << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:9: error: 'm' was not declared in this scope
   30 |     if( m < EPS){
      |         ^
Language: C++

#include <iostream>
#include <cmath>
#include <vector>
#include <string>
#include <algorithm>
#include <climits>
using namespace std;

int main(){
    double EPS = 1e-12;
    double x[4], y[4];
    double s,t,u,v;
    int n;
    cin >> n;
    for (int t = 0;t < n;++t) {
        for (int i = 0;i < 4;++i){
            cin >> x[i] >> y[i]; 
        }
    }
    s = x[1] - x[0];
    t = y[1] - y[0];
    u = x[3] - x[2];
    v = y[3] - y[2];
    if(s * v - t * u > 0){
        double m = s * v - t * u;
    }
    else{
        double m = t * u - s * v;
    }
    if( m < EPS){
        cout << "YES" << endl;
    }
    else{
        cout << "NO" << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:9: error: 'm' was not declared in this scope
   30 |     if( m < EPS){
      |         ^
Language: C++

#include <iostream>
#include <cmath>
#include <vector>
#include <string>
#include <algorithm>
#include <climits>
using namespace std;

int main(){
    double EPS = 1e-12;
    double x[4];
    double y[4];
    double s;
    double t;
    double u;
    double v;
    int n;
    cin >> n;

    for (int t = 0;t < n;++t) {
        for (int i = 0;i < 4;++i){
            cin >> x[i] >> y[i]; 
        }
    }
    s = x[1] - x[0];
    t = y[1] - y[0];
    u = x[3] - x[2];
    v = y[3] - y[2];

    if(s * v - t * u > 0){
        double m = s * v - t * u;
    }
    else{
        double m = t * u - s * v;
    }

    if( m < EPS){
//        cout << "YES" << endl;
    }
    else{
//        cout << "NO" << endl;
    }
//    return 0;



    cout << "NO" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:9: error: 'm' was not declared in this scope
   37 |     if( m < EPS){
      |         ^
Language: C++

#include <iostream>
#include <cmath>
#include <vector>
#include <string>
#include <algorithm>
#include <climits>
using namespace std;

int main(){
    double EPS = 1e-12;
    double x[4];
    double y[4];
    double s;
    double t;
    double u;
    double v;
    int n;
    cin >> n;

    for (int t = 0;t < n;++t) {
        for (int i = 0;i < 4;++i){
            cin >> x[i] >> y[i]; 
        }
    }
    s = x[1] - x[0];
    t = y[1] - y[0];
    u = x[3] - x[2];
    v = y[3] - y[2];

    if(s * v - t * u > 0){
        double m = s * v - t * u;
    }
    else{
        double m = t * u - s * v;
    }

    if( m < EPS){
//        cout << "YES" << endl;
    }
//    else{
//        cout << "NO" << endl;
//    }
//    return 0;


    cout << "NO" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:9: error: 'm' was not declared in this scope
   37 |     if( m < EPS){
      |         ^
Language: C++

#include <iostream>
#include <cmath>
#include <vector>
#include <string>
#include <algorithm>
#include <climits>
using namespace std;

int main(){
    double EPS = 1e-8;
    double x[4];
    double y[4];
    double s;
    double t;
    double u;
    double v;
    int n;
    cin >> n;

    for (int t = 0;t < n;++t) {
        for (int i = 0;i < 4;++i){
            cin >> x[i] >> y[i]; 
        }
    }
    s = x[1] - x[0];
    t = y[1] - y[0];
    u = x[3] - x[2];
    v = y[3] - y[2];

    if(s * v - t * u > 0){
        double m = s * v - t * u;
    }
    else{
        double m = t * u - s * v;
    }

    if( m < EPS){
//        cout << "YES" << endl;
    }
//    else{
//        cout << "NO" << endl;
//    }
//    return 0;


    cout << "NO" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:9: error: 'm' was not declared in this scope
   37 |     if( m < EPS){
      |         ^
Language: C++

#include <iostream>
#include <cmath>
#include <vector>
#include <string>
#include <algorithm>
#include <climits>
using namespace std;

int main(){
    double e = 1e-8;
    double x[4];
    double y[4];
    double s;
    double t;
    double u;
    double v;
    int n;
    cin >> n;

    for (int t = 0;t < n;++t) {
        for (int i = 0;i < 4;++i){
            cin >> x[i] >> y[i]; 
        }
    }
    s = x[1] - x[0];
    t = y[1] - y[0];
    u = x[3] - x[2];
    v = y[3] - y[2];

    if(s * v - t * u > 0){
        double m = s * v - t * u;
    }
    else{
        double m = t * u - s * v;
    }

    if(m<e){
        cout << "YES" << endl;
    }
//    else{
//        cout << "NO" << endl;
//    }
//    return 0;


    cout << "NO" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:8: error: 'm' was not declared in this scope
   37 |     if(m<e){
      |        ^
Language: C++

#include <cstdio>
#include <algorithm>
#include <iostream>
#include <vector>
#include <string>
#include <cmath>
using namespace std;

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 ;
		if(
		if( ((y1-y2)/(x1-x2)) == ((y3-y4)/(x3-x4)) ){
			cout << "YES" << "\n" ;
		}
		else{
			cout << "NO" << "\n" ;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:17: error: expected primary-expression before 'if'
   16 |                 if( ((y1-y2)/(x1-x2)) == ((y3-y4)/(x3-x4)) ){
      |                 ^~
a.cc:15:20: error: expected ')' before 'if'
   15 |                 if(
      |                   ~^
      |                    )
   16 |                 if( ((y1-y2)/(x1-x2)) == ((y3-y4)/(x3-x4)) ){
      |                 ~~  
a.cc:22:9: error: expected primary-expression before '}' token
   22 |         }
      |         ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef complex<double> P;
typedef pair<int,int> pii;
#define REP(i,n) for(ll i=0;i<n;++i)
#define REPR(i,n) for(ll i=1;i<n;++i)
#define FOR(i,a,b) for(ll i=a;i<b;++i)

#define DEBUG(x) cout<<#x<<": "<<x<<endl
#define DEBUG_VEC(v) cout<<#v<<":";REP(i,v.size())cout<<" "<<v[i];cout<<endl
#define ALL(a) (a).begin(),(a).end()

#define MOD (ll)(1e9+7)
#define ADD(a,b) a=((a)+(b))%MOD
#define FIX(a) ((a)%MOD+MOD)%MOD

int main(){
double x1,y1,x2,y2,x3,y3,x4,y4;
while(~scanf("%lf%lf%lf%lf%lf%lf%lf%lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4){
P a(x2-x1,y2-y1);
P b(x4-x3,y4-y3);
double cr = imag(conj(a)*b);
if(abs(cr)<1e-9){
  cout<<"YES"<<endl;
}else{
  cout<<"NO"<<endl;
}
}
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:73: error: expected ')' before '{' token
   24 | while(~scanf("%lf%lf%lf%lf%lf%lf%lf%lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4){
      |      ~                                                                  ^
      |                                                                         )
Language: C++

#include <iostream>
#include <cmath>
using namespace std;
int main(){
  

  int dataSets;
  cin >> dataSets;
  for(int i=0;i<dataSets;i++){
    double x1, y1, x2, y2, x3, y3, x4, y4;
    cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4;
    if((abs((y2-y1)*(x4-x3) - (x2-x1)*(y4-y3)) < 0.0001){
      cout << "YES" << endl;
    }else{
      cout << "NO" << endl;
    }
    
  }

  return 0;

}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:12:57: error: expected ')' before '{' token
   12 |     if((abs((y2-y1)*(x4-x3) - (x2-x1)*(y4-y3)) < 0.0001){
      |       ~                                                 ^
      |                                                         )
a.cc:18:3: error: expected primary-expression before '}' token
   18 |   }
      |   ^
Language: C++

//parallelism
#include<iostream>
#include<cmath>
using namespace std;

//EPS ??? 10???-10?????????
#define EPS (1e - 10)
//fabs??¢??°??????????°???°?????°?????¶???????????????
//EPS??????????????????true?????????
#define equal(a,b) (fabs((a) - (b)) < EPS)

//Point class

class Point {
    public:
    double x, y;
    
    Point(double x = 0, double y = 0): x(x), y(y) {}
    
    //???????????????????????????
    Point operator + (Point p) {return Point(x + p.x, y + p.y);}
    Point operator - (Point p) {return Point(x - p.x, y + p.y);}
    Point operator * (double a) {return Point(a * x. a * y);}
    Point operator / (double a) {return Point(x / a, y / a);}
    
    double abs() {return sqrt(norm());}
    double norm() {return x * x + y * y;}
    
    bool operator < (const Point &p) const {
        return x != p.x ? x < p.x: y < p.y;
    }
    
    bool operator == (const Point &p) const {
        return fabs(x - p.x) < EPS && fabs(y - p.y) < EPS;
    }
     
};

typedef Point Vector;

int main(void){
    Vector a, b,c,d;
    int n;
    
    cin >> n;
    for(int i = 0; i < n; i++){
        cin >> a.x >> a.y >> b.x >> b.y;
        cin >> c.x >> c.y >> d.x >> d.y;
        
        //p????????????
        Vector p = a - b;
        //q????????????
        Vector q = c - d;
        
        //??????????????¨??£????????¨????????????????????§??????
        if(1 == (p.x* q.x + p.y * q.y)) cout << "YES" << endl;
        else cout << "NO" << endl;
    }
    
    return 0;
}

Compiler output:
a.cc:7:14: error: exponent has no digits
    7 | #define EPS (1e - 10)
      |              ^~
a.cc:34:32: note: in expansion of macro 'EPS'
   34 |         return fabs(x - p.x) < EPS && fabs(y - p.y) < EPS;
      |                                ^~~
a.cc:7:14: error: exponent has no digits
    7 | #define EPS (1e - 10)
      |              ^~
a.cc:34:55: note: in expansion of macro 'EPS'
   34 |         return fabs(x - p.x) < EPS && fabs(y - p.y) < EPS;
      |                                                       ^~~
a.cc: In member function 'Point Point::operator*(double)':
a.cc:23:54: error: request for member 'a' in '((Point*)this)->Point::x', which is of non-class type 'double'
   23 |     Point operator * (double a) {return Point(a * x. a * y);}
      |                                                      ^
Language: C++

#include<iostream>
#include<vector>
using namespace std;

int main() {
	int n;
	double x1, x2, x3, x4, y1, y2, y3, y4;
	vector<double> X1, Y1, X2, Y2;
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4;
		X1.push_back(x2 - x1); Y1.push_back(y2 - y1);
		X2.push_back(x4 - x3); Y2.push_back(y4 - y3);
	}
	for (int i = 0; i < n; i++) {
		if (fabs(X1[i]*Y2[i]-X2[i]*Y1[i]<1e-10))cout << "YES" << endl;
		else cout << "NO" << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:21: error: 'fabs' was not declared in this scope; did you mean 'labs'?
   16 |                 if (fabs(X1[i]*Y2[i]-X2[i]*Y1[i]<1e-10))cout << "YES" << endl;
      |                     ^~~~
      |                     labs
Language: C++

#include<iostream>
#include<vector>
using namespace std;

int main() {
	int n;
	double x1, x2, x3, x4, y1, y2, y3, y4;
	vector<double> X1, Y1, X2, Y2;
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4;
		X1.push_back(x2 - x1); Y1.push_back(y2 - y1);
		X2.push_back(x4 - x3); Y2.push_back(y4 - y3);
	}
	for (int i = 0; i < n; i++) {
		double det = fabs(X1[i] * Y2[i] - X2[i] * Y1[i]);
		if (fabs(det)<1e-10)cout << "YES" << endl;
		else cout << "NO" << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:30: error: 'fabs' was not declared in this scope; did you mean 'labs'?
   16 |                 double det = fabs(X1[i] * Y2[i] - X2[i] * Y1[i]);
      |                              ^~~~
      |                              labs
Language: C++

#include<iostream>
#include<queue>
#include<string>
#include<stack>
#include<cstdio>
#include<algorithm>

using namespace std;

int main(void)
{
  double x,y;
  double x1,y1;
  int n;
  int i;
  long long double a,b;

  cin>>n;

  for(i=0;i<n;i++)
    {
      cin>>x>>y>>x1>>y1;
      a=(y1-y)/(x1-x);

      cin>>x>>y>>x1>>y1;
      b=(y1-y)/(x1-x);
	
      if(a==b)
        puts("YES");
      else
        puts("NO");
    }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:8: error: 'long long' specified with 'double'
   16 |   long long double a,b;
      |        ^~~~
a.cc:16:8: error: 'long long' specified with 'double'
Language: C++

#include<iostream>
#include<queue>
#include<string>
#include<stack>
#include<cstdio>
#include<algorithm>

using namespace std;

int main(void)
{
  double x,y;
  double x1,y1;
  int n;
  int i;
  long double a=0,b=;
  int k1=0,k2=2;

  cin>>n;

  for(i=0;i<n;i++)
    {
      cin>>x>>y>>x1>>y1;
      if(x1-x!=0)
        a=(y1-y)/(x1-x);
      else
        a=1000;

      cin>>x>>y>>x1>>y1;
      if(x1-x!=0)
        b=(y1-y)/(x1-x);
      else
        b=1000;

      if(a==b)
        puts("YES");
      else
        puts("NO");
    }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:21: error: expected primary-expression before ';' token
   16 |   long double a=0,b=;
      |                     ^
Language: C++

#include<iostream>
#include<queue>
#include<string>
#include<stack>
#include<cstdio>
#include<algorithm>

using namespace std;

int main(void)
{
  double x,y;
  double x1,y1;
  int n;
  int i;
  long double a=0,b=;
  int k1=0,k2=2;

  cin>>n;

  for(i=0;i<n;i++)
    {
      cin>>x>>y>>x1>>y1;
      if(x1-x!=0)
        a=(y1-y)/(x1-x);
      else
        a=100;

      cin>>x>>y>>x1>>y1;
      if(x1-x!=0)
        b=(y1-y)/(x1-x);
      else
        b=100;

      if(a==b)
        puts("YES");
      else
        puts("NO");
    }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:21: error: expected primary-expression before ';' token
   16 |   long double a=0,b=;
      |                     ^
Language: C++

import java.util.*;
public class Main {
	public static void main(String[] args) {
		Scanner in=new Scanner(System.in);
		double x1,x2,x3,x4,y1,y2,y3,y4;
		int T=in.nextInt();
		for(int t=1;t<=T;t++){
			x1=in.nextDouble();
			x2=in.nextDouble();
			x3=in.nextDouble();
			x4=in.nextDouble();
			y1=in.nextDouble();
			y2=in.nextDouble();
			y3=in.nextDouble();
			y4=in.nextDouble();
			if(Math.abs((x1-x2)*(y3-y4)-(y1-y2)*(x3-x4))<0.000000000001)
				System.out.println("YES");
			else
				System.out.println("NO");
		}
		in.close();
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: expected unqualified-id before 'public'
    2 | public class Main {
      | ^~~~~~
Language: C++

#include <iostream>
#include <complex>
#include <cmath>
using namespace std;

int main() {
	typedef complex<double> com;
	int n;
	double x1, y1, x2, y2, x3, y3, x4, y4;
	cin >> n;
	for ( int i = 0; i < n; i++ ) {
		cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4;
		if ( - 1e-10 < ( conj( com( x2 - x1, y2 - y1 ) ) * com( x4 - x3, y4 - y3 ) ).imag() < 1e-10 )
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:2: error: expected '}' at end of input
   17 | }
      |  ^
a.cc:6:12: note: to match this '{'
    6 | int main() {
      |            ^
Language: C++

#include <iostream>
using namespace std;

int main(){
	int n;cin>>n;
	while(n--){
		cout<< solve()?"YES":"NO" << endl;
	}	
	return 0;
}

bool solve(){
	double x1,x2,y1,y2;
	double vx1,vx2,vy1,vy2;
	
	cin>>x1>>y1>>x2>>y2;
	vx1=x2-x1;vy1=y2-y1;
	cin>>x1>>y1>>x2>>y2;
	vx2=x2-x1;vy2=y2-y1;
	
	//vx1:vy1=vx2:vy2
	return (vx1*vy2==vy1*vx2);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:24: error: 'solve' was not declared in this scope
    7 |                 cout<< solve()?"YES":"NO" << endl;
      |                        ^~~~~
a.cc:7:43: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<'
    7 |                 cout<< solve()?"YES":"NO" << endl;
      |                                      ~~~~~^~~~~~~
Language: C++

#include <iostream>
using namespace std;

bool solve();

int main(){
	int n;cin>>n;
	while(n--){
		cout<< solve()?"YES":"NO" << endl;
	}	
	return 0;
}

bool solve(){
	double x1,x2,y1,y2;
	double vx1,vx2,vy1,vy2;
	
	cin>>x1>>y1>>x2>>y2;
	vx1=x2-x1;vy1=y2-y1;
	cin>>x1>>y1>>x2>>y2;
	vx2=x2-x1;vy2=y2-y1;
	
	//vx1:vy1=vx2:vy2
	return (vx1*vy2==vy1*vx2);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:43: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<'
    9 |                 cout<< solve()?"YES":"NO" << endl;
      |                                      ~~~~~^~~~~~~
Language: C++

#include <iostream>
#include <cstdio>
#include <cstdlib>
using namespace std;

const double EPS = 1e-9;

signed main() {
  int n;

  cin >> n;
  while (n--) {
    double x[4], y[4];
    for (int i = 0; i < 4; cin >> x[i] >> y[i], i++);
    if (fabs((y[1] - y[0]) / (x[1] - x[0]) - (y[3] - y[2]) / (x[3] - x[2])) < EPS) {
      puts("YES");
    } else {
      puts("NO");
    }
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: 'fabs' was not declared in this scope; did you mean 'labs'?
   15 |     if (fabs((y[1] - y[0]) / (x[1] - x[0]) - (y[3] - y[2]) / (x[3] - x[2])) < EPS) {
      |         ^~~~
      |         labs
Language: C++

#include <iostream>
#include <fstream>
#include <typeinfo>
#include <vector>
#include <cmath>
#include <set>
#include <map>
#include <string>
#include <algorithm>
#include <cstdio>
#include <queue>
#include <iomanip>
#include <cctype>
#define syosu(x) fixed<<setprecision(x)
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef pair<double,double> pdd;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<char> vc;
typedef vector<vc> vvc;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef vector<P> vp;
typedef vector<vp> vvp;
typedef pair<int,P> pip;
typedef vector<pip> vip;
const int inf=1<<25;
const double pi=acos(-1);
const double eps=1e-6;
const vi emp;

double add_double(double a,double b){
	if(abs(a+b)<eps*(abs(a)+abs(b))) return 0;
	return a+b;
}

struct point{
	double x,y;
	point operator+(point p){
		return point{add_double(x,p.x),add_double(y,p.y)};
	}
	point operator-(point p){
		return point{add_double(x,-p.x),add_double(y,-p.y)};
	}
	point operator*(double p){
		return point{x*p,y*p};
	}
	point operator/(double p){
		if(!p) return point{0,0}; 
		return point{x/p,y/p};
	}
	bool operator==(point p){
		return fabs(add_double(x,-p.x))<eps&&fabs(add_double(y,-p.y))<eps;
	}
	bool operator<(point p){
		if(fabs(x-p.x)>eps) return x<p.x;
		return y<p.y;
	}
};

typedef pair<point,point> pp;
typedef vector<point> VP;
const point O{0,0};

class Geom{
	public:
	double Length(point x,point y){
		point z=y-x;
		return sqrt(z.x*z.x+z.y*z.y);
	}
	double IP(point p,point q){
		return p.x*q.x+p.y*q.y;
	}
	double CP(point p,point q){
		return p.x*q.y-q.x*p.y;
	}
	string Counter_Clockwise(pp a,point x){
		point A=a.second-a.first;
		point X=x-a.first;
		double ip=IP(A,X),cp=CP(A,X),Al=Length(O,A),Xl=Length(O,X);
		if(cp>eps) return "Counter_Clockwise";
		if(cp<-eps) return "Clockwise";
		if(ip<-eps) return "Online_Back";
		if(Xl<Al||fabs(Xl-Al)<eps) return "On_Segment";
		return "Online_Front";
	}
	string Parallel_Orthogonal(pp a,pp b){
		point A=a.second-a.first,B=b.second-b.first;
		double ip=IP(A,B),cp=CP(A,B);
		string f=Counter_Clockwise(pp(a.first,a.second),b.first),s=Counter_Clockwise(pp(a.first,a.second),b.second);
		if(f[0]!='C'&&s[0]!='C') return "Agreement";
		if(cp<eps&&cp>-eps) return "Parallel";
		if(ip<eps&&ip>-eps) return "Orthogonal";
		else return "Commonly";
	}
	void Point_in(point& p){
		cin>>p.x>>p.y;
	}
};

int n;
VP p(4);
string s;

int main(){
	Geom geo;
	cin>>n];
	for(int i=0;i<n;i++){
		for(VP::iterator i=p.begin();i!=p.end();i++) geo.Point_in(*i);
		s=geo.Parallel_Orthogonal(pp(p[0],p[1]),pp(p[2],p[3]));
		if(s[0]=='P'||s[0]=='A') cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:109:15: error: expected ';' before ']' token
  109 |         cin>>n];
      |               ^
      |               ;
Language: C++

#include<iostream>
#include<cmath>
using namespace std;
int main(){
  int n;
  cin >> n;
  while(n--){
    double x[4],y[4];
    for(int i=0;i<4;i++) cin >> x[i] >> y[i]; 
    if(abs((x[3]-x[2])*(y[1]-y[0])-(x[1]-x[0])*(y[3]-y[2])) < 1e-10){
      cout<<"YES"<<endl;
    else
      cout<<"NO"<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: expected '}' before 'else'
   12 |     else
      |     ^~~~
a.cc:10:69: note: to match this '{'
   10 |     if(abs((x[3]-x[2])*(y[1]-y[0])-(x[1]-x[0])*(y[3]-y[2])) < 1e-10){
      |                                                                     ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
 
signed main(){
int a;
cin>>a;
double c[8];
for(int b=0;b<a;b++){
    for(int d=0;d<8;d++)cin>>c[d];
    if(c[0]==c[2]&&c[4]==c[6])printf("YES\n");
    else if((c[6]-c[4])/(c[7]-c[5])==(c[2]-c[0])/(c[3]-c[1]))printf("YES\n");
    else printf("NO\n");s
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:25: error: 's' was not declared in this scope
   12 |     else printf("NO\n");s
      |                         ^
Language: C++

#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int main() {
	int n;
	cin >> n;
	for (int z = 0; z < n; z++) {
		long float x1, x2, x3,y1, y2, y3, y4, x4 ;
		cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4;
		if (y1 > y2) {
			swap(y1, y2);
			swap(x1, x2);
		}
		if (y3 > y4) {
			swap(y3, y4);
			swap(x3, x4);
		}
		if ((x1 > x2&&x3 > x4 && ((y2 - y1) / (x1 - x2) == (y4 - y3) / (x3 - x4))) || (x2 > x1&&x4 > x3 && ((y1 - y2) / (x2 - x1) == (y3 - y4) / (x4 - x3)))) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: 'long' specified with 'float'
    9 |                 long float x1, x2, x3,y1, y2, y3, y4, x4 ;
      |                 ^~~~
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'