criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include<iostream>
#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:8:17: error: 'long' specified with 'float'
    8 |                 long float x1, x2, x3,y1, y2, y3, y4, x4 ;
      |                 ^~~~
a.cc:8:17: error: 'long' specified with 'float'
a.cc:8:17: error: 'long' specified with 'float'
a.cc:8:17: error: 'long' specified with 'float'
a.cc:8:17: error: 'long' specified with 'float'
a.cc:8:17: error: 'long' specified with 'float'
a.cc:8:17: error: 'long' specified with 'float'
a.cc:8:17: error: 'long' specified with 'float'
Language: C++

#include<iostream>
#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)))) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
		if (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:8:17: error: 'long' specified with 'float'
    8 |                 long float x1, x2, x3, y1, y2, y3, y4, x4;
      |                 ^~~~
a.cc:8:17: error: 'long' specified with 'float'
a.cc:8:17: error: 'long' specified with 'float'
a.cc:8:17: error: 'long' specified with 'float'
a.cc:8:17: error: 'long' specified with 'float'
a.cc:8:17: error: 'long' specified with 'float'
a.cc:8:17: error: 'long' specified with 'float'
a.cc:8:17: error: 'long' specified with 'float'
Language: C++

#include<iostream>
#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))))
		{
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
		if (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:8:17: error: 'long' specified with 'float'
    8 |                 long float x1, x2, x3, y1, y2, y3, y4, x4;
      |                 ^~~~
a.cc:8:17: error: 'long' specified with 'float'
a.cc:8:17: error: 'long' specified with 'float'
a.cc:8:17: error: 'long' specified with 'float'
a.cc:8:17: error: 'long' specified with 'float'
a.cc:8:17: error: 'long' specified with 'float'
a.cc:8:17: error: 'long' specified with 'float'
a.cc:8:17: error: 'long' specified with 'float'
Language: C++

#include<iostream>
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))))
			cout << "YES" << endl;
		else 
			cout << "NO" << endl;
		if (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:7:17: error: 'long' specified with 'float'
    7 |                 long float x1, x2, x3, y1, y2, y3, y4, x4;
      |                 ^~~~
a.cc:7:17: error: 'long' specified with 'float'
a.cc:7:17: error: 'long' specified with 'float'
a.cc:7:17: error: 'long' specified with 'float'
a.cc:7:17: error: 'long' specified with 'float'
a.cc:7:17: error: 'long' specified with 'float'
a.cc:7:17: error: 'long' specified with 'float'
a.cc:7:17: error: 'long' specified with 'float'
Language: C++

#include<iostream>
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))))
			cout << "YES" << endl;
		if (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:7:17: error: 'long' specified with 'float'
    7 |                 long float x1, x2, x3, y1, y2, y3, y4, x4;
      |                 ^~~~
a.cc:7:17: error: 'long' specified with 'float'
a.cc:7:17: error: 'long' specified with 'float'
a.cc:7:17: error: 'long' specified with 'float'
a.cc:7:17: error: 'long' specified with 'float'
a.cc:7:17: error: 'long' specified with 'float'
a.cc:7:17: error: 'long' specified with 'float'
a.cc:7:17: error: 'long' specified with 'float'
Language: C++

ans :: [Double] -> String
ans (x1:y1:x2:y2:x3:y3:x4:y4:_)
  | (y2 == y1) && (x2 == x1) = "NO"
  | (y4 == y3) && (x4 == x3) = "NO"
  | y2 == y1  = if y4 == y3 then "YES" else "NO"
  | x4 == x3  = if x2 == x1 then "YES" else "NO"
  | otherwise = if (y2-y1) * (x4-x3) == (y4-y3) * (x2-x1)
                then "YES"
                else "NO"

main = do
  c <- getContents
  let i = map (map read) $ map words $ drop 1 $ lines c :: [[Double]]
      o = map ans i
  mapM_ putStrLn o

Compiler output:
a.cc:1:1: error: 'ans' does not name a type
    1 | ans :: [Double] -> String
      | ^~~
Language: C++

#include<iostream>
#include<string>
#include<cstdio>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<cmath>
#include<utility>
#include<set>
#include<complex>
#include<map>
#define vi vector<int>
#define vvi vector<vector<int> >
#define ll long long int
#define vl vector<ll>
#define vvl vector<vector<ll>>
#define vb vector<bool>
#define vc vector<char>
#define vs vector<string>
#define ld long double
#define INF 1e9
#define EPS 0.0000000001
#define rep(i,n) for(int i=0;i<n;i++)
#define loop(i,s,n) for(int i=s;i<n;i++)
#define CC puts("-------ok--------");
#define all(in) in.begin(), in.end()
using namespace std;
typedef pair<int, int> pii;
#define MAX 99999999
typedef pair<double,double> pdd;
int main(){
    pdd no1,no2,no3,no4;
    int n;cin>>n;
    rep(i,n){
        cin>>no1.first>>no1.second>>no2.first>>no2.second>>no3.first>>no3.second>>no4.first>>no4.second;
        double d1=(no2.second-no1.second)/(no2.first-no1.first);
        double d2=(no4.second-no3.second)/(no4.first-no3.first);
        if(d1==d2&&d1!=0))cout<<"YES"<<endl;
        else cout<<"NO"<<endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:39:26: error: expected primary-expression before ')' token
   39 |         if(d1==d2&&d1!=0))cout<<"YES"<<endl;
      |                          ^
Language: C++

for i in range(int(input())):
    x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
    det = abs((y1-y2) * (x3-x4) - (x1-x2) * (y3-y4))
    if det<1e-12 :
        print("YES")
    else:
        print("NO")

Compiler output:
a.cc:1:1: error: expected unqualified-id before 'for'
    1 | for i in range(int(input())):
      | ^~~
Language: C++

from fractions import Fraction
def sroap(x1,y1,x2,y2):
	if x2 - x1 == 0:
		return float("inf")
	else:
		return Fraction(y2 - y1,x2 - x1)
		
N = int(input())
for n in range(N):
	Ax,Ay,Bx,By,Cx,Cy,Dx,Dy = map(lambda x: round(x * 10 ** 5),(map(float,input().split())))
	if sroap(Ax,Ay,Bx,By) == sroap(Cx,Cy,Dx,Dy):
        ????????????print("YES")
	else:
		print("NO")

Compiler output:
a.cc:1:1: error: 'from' does not name a type
    1 | from fractions import Fraction
      | ^~~~
Language: C++

for i in range(input()):
	a,b,c,d,e,f,g,h=map(float,raw_input().split())
	print "YES" if abs((d-b)*(g-e)-(c-a)*(h-f))<1e-9 else "NO"

Compiler output:
a.cc:1:1: error: expected unqualified-id before 'for'
    1 | for i in range(input()):
      | ^~~
Language: C++

#include <iostream>
#include <string>

class Point
{
public:
	double m_X;
	double m_Y;
	Point(double x, double y)
		: m_X( x )
		, m_Y( y )
	{}
};

class LineSegment
{
private:
	Point m_Start;
	Point m_End;
public:
	LineSegment(Point start, Point end)
		: m_Start( start )
		, m_End( end )
	{}
	double CalcSlope()
	{
		if ( m_End.m_Y == m_Start.m_Y)
		{
			return 0.0;
		}

		if (m_End.m_X == m_Start.m_X)
		{
			return DBL_MAX;
		}
	
		return((m_End.m_Y - m_Start.m_Y) / (m_End.m_X - m_Start.m_X));
	}
};

int main()
{
	int n = 0;
	double x1 = 0;
	double y1 = 0;
	double x2 = 0;
	double y2 = 0;
	double x3 = 0;
	double y3 = 0;
	double x4 = 0;
	double y4 = 0;

	std::cin >> n;

	for (int data_no = 0; data_no < n; ++data_no)
	{
		std::cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4;

		Point start1{ x1, y1 };
		Point end1{ x2, y2 };
		Point start2{ x3, y3 };
		Point end2{ x4, y4 };

		LineSegment line1{ start1, end1 };
		double line1_slope = line1.CalcSlope();

		LineSegment line2{ start2, end2 };
		double line2_slope = line2.CalcSlope();

		if (line1_slope == line2_slope)
		{
			std::cout << "YES" << std::endl;
		}
		else
		{
			std::cout << "NO" << std::endl;
		}
	}

	return 0;
}

Compiler output:
a.cc: In member function 'double LineSegment::CalcSlope()':
a.cc:34:32: error: 'DBL_MAX' was not declared in this scope
   34 |                         return DBL_MAX;
      |                                ^~~~~~~
a.cc:2:1: note: 'DBL_MAX' is defined in header '<cfloat>'; this is probably fixable by adding '#include <cfloat>'
    1 | #include <iostream>
  +++ |+#include <cfloat>
    2 | #include <string>
Language: C++

#include <iostream>
#include <string>

class Point
{
public:
	double m_X;
	double m_Y;
	Point(double x, double y)
		: m_X( x )
		, m_Y( y )
	{}
};

class LineSegment
{
private:
	Point m_Start;
	Point m_End;
public:
	LineSegment(Point start, Point end)
		: m_Start( start )
		, m_End( end )
	{}
	double CalcSlope()
	{
		if ( m_End.m_Y == m_Start.m_Y)
		{
			return 0.0;
		}

		if (m_End.m_X == m_Start.m_X)
		{
			return 9999999999.0;
		}
	
		return((m_End.m_Y - m_Start.m_Y) / (m_End.m_X - m_Start.m_X));
	}
};

const double EPS = 1e-10;


int main()
{
	int n = 0;
	double x1 = 0;
	double y1 = 0;
	double x2 = 0;
	double y2 = 0;
	double x3 = 0;
	double y3 = 0;
	double x4 = 0;
	double y4 = 0;

	std::cin >> n;

	for (int data_no = 0; data_no < n; ++data_no)
	{
		std::cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4;

		Point start1{ x1, y1 };
		Point end1{ x2, y2 };
		Point start2{ x3, y3 };
		Point end2{ x4, y4 };

		LineSegment line1{ start1, end1 };
		double line1_slope = line1.CalcSlope();

		LineSegment line2{ start2, end2 };
		double line2_slope = line2.CalcSlope();

		if ( std::fabs(line1_slope - line2_slope) < EPS )
		{
			std::cout << "YES" << std::endl;
		}
		else
		{
			std::cout << "NO" << std::endl;
		}
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:73:27: error: 'fabs' is not a member of 'std'; did you mean 'labs'?
   73 |                 if ( std::fabs(line1_slope - line2_slope) < EPS )
      |                           ^~~~
      |                           labs
Language: C++

#include<iostream>
#include<iomanip>
#include<string>
#include<algorithm>
#include<cmath>
using namespace std;
int main(){
    int n;
    cin>>n;
    double x1,y1,x2,y2,x3,y3,x4,y4;
    for(int i=0;i<n;i++){
        cin>>x1>>y1>>x2>>y2>>x3>>y3>>x4>>y4;
        if((y2-y1)/(x2-x1)==(y4-y3)/(x4-x3)){
        cout"YES"<<endl;
        }else{
            cout<<"NO"<<endl;
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:13: error: expected ';' before string constant
   14 |         cout"YES"<<endl;
      |             ^~~~~
      |             ;
Language: C++

int main()
{

    float line1;
    float line2;
    float x1,x2,x3,x4;
    float y1,y2,y3,y4;

    cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4;

    line1 = (y2-y1)/(x2-x1);
    line2 = (y4-y3)/(x4-x3);

    if (line1 == line2)
        {
        cout << "YES" << endl;
        }
    else
        {
        cout << "NO" << endl;
        }



    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'cin' was not declared in this scope
    9 |     cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4;
      |     ^~~
a.cc:16:9: error: 'cout' was not declared in this scope
   16 |         cout << "YES" << endl;
      |         ^~~~
a.cc:16:26: error: 'endl' was not declared in this scope
   16 |         cout << "YES" << endl;
      |                          ^~~~
a.cc:20:9: error: 'cout' was not declared in this scope
   20 |         cout << "NO" << endl;
      |         ^~~~
a.cc:20:25: error: 'endl' was not declared in this scope
   20 |         cout << "NO" << endl;
      |                         ^~~~
Language: C++

#include<iostream>
#include <string>
#include<stdio.h>

using namespace std;

int _tmain(int argc, _TCHAR* argv[])
{
	double x1[100], y1[100], x2[100], y2[100], x3[100], y3[100], x4[100], y4[100];
	double tendAB, tendCD;
	int num;
	int pos = 0;

	cin >> num;
	while (num--) {
		cin >> x1[pos] >> y1[pos] >> x2[pos] >> y2[pos] >> x3[pos] >> y3[pos] >> x4[pos] >> y4[pos];
		pos++;
	}
	for (int i = 0; i < pos; i++) {
		tendAB = (y1[i] == y2[1]) ? 0 : (x2[i] - x1[i]) / (y2[i] - y1[i]);
		tendCD = (y3[i] == y4[1]) ? 0 : (x4[i] - x3[i]) / (y4[i] - y3[i]);
		if (tendAB == tendCD) cout << "YES" << endl; else cout << "NO" << endl;
	}

	return 0;
}

Compiler output:
a.cc:7:22: error: '_TCHAR' has not been declared
    7 | int _tmain(int argc, _TCHAR* argv[])
      |                      ^~~~~~
Language: C++

#include <iostream>

int main(){
	
	double a,x1,y1,x2,y2,x3,y3,x4,y4;
	std::cin>>a;
	for(int s=0;s<a;s++){
		std::cin>>x1>>y1>>x2>>y2>>x3>>y3>>x4>>y4;
		if((y2-y1)/(x2-x1)==(y4-y3)/(x4-x3)||(y2-y1)/(x2-x1)==-1/((y4-y3)/(x4-x3)){
			std::cout<<"YES"<<std::endl;
		}else{
			std::cout<<"NO"<<std::endl;
		}
		
    }
    return 0;
}

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

#include<iostream>

int main(){
  int n;
  double x1,y1,x2,y2,x3,y3,x4,y4;
  const double e = 1e-10;

  std::cin >> n;

  for(int i=0;i<n;i++){
    std::cin >> x1 >> y1
             >> x2 >> y2
             >> x3 >> y3
             >> x4 >> y4;

    if(fabs((x1*y3+x2*y4+y2*x3+y1*x4)-(x2*y3+x1*y4+y1*x3+y2*x4))<e){
      std::cout << "YES" << std::endl;
    }else{
      std::cout << "NO" << std::endl;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:8: error: 'fabs' was not declared in this scope; did you mean 'labs'?
   16 |     if(fabs((x1*y3+x2*y4+y2*x3+y1*x4)-(x2*y3+x1*y4+y1*x3+y2*x4))<e){
      |        ^~~~
      |        labs
Language: C++

#include <bits/stdc++.h>
#include <vector>
using namespace std;
double x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4, a, b, x;
double gradien(double x_1, double y_1, double x_2, double_y2){
	double m = 0;
	m = (y_1 - y_2)/(x_1 - x_2);
	
	return m;
}
int main(){
	cin >> x;
	for(int i = 1; i <= x; i++){
		cin >> x_1 >> y_1 >> x_2 >> y_2 >> x_3 >> y_3 >> x_4 >> y_4;
		a = gradien(x_1, y_1, x_2, y_2);
		b = gradien(x_3, y_3, x_4, y_4);
		if(a == b){
			cout << "YES\n";
		}
		else{
			cout << "NO\n";
		}
	}
	return 0;
}

Compiler output:
a.cc:5:52: error: 'double_y2' has not been declared
    5 | double gradien(double x_1, double y_1, double x_2, double_y2){
      |                                                    ^~~~~~~~~
Language: C++

def naiseki(x1,y1,z1,x2,y2,z2)
    if x1-x2+y1-y2+z1-z2 == 0:
        print("YES")
    else:
        print("NO")
f = input().split()
try:
    x1=f[0]
    y1=f[1]
    z1=f[2]
    x2=f[3]
    y2=f[4]
    z2=[f5]
    naiseki(x1,y1,z1,x2,y2,z2)
except:
    print("NO")

    

Compiler output:
a.cc:1:1: error: 'def' does not name a type
    1 | def naiseki(x1,y1,z1,x2,y2,z2)
      | ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
const eps = 1e-7;

int main() {
    int n;
    double x1, y1, x2, y2, x3, y3, x4, y4;
    cin >> n;
    while(n--) {
        cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4;
        cout << (abs((x2-x1)*(y4-y3) - (x4-x3)*(y2-y1)) < eps ? "YES" : "NO") << endl;
    }
    return 0;
}


Compiler output:
a.cc:3:7: error: 'eps' does not name a type
    3 | const eps = 1e-7;
      |       ^~~
a.cc: In function 'int main()':
a.cc:11:59: error: 'eps' was not declared in this scope
   11 |         cout << (abs((x2-x1)*(y4-y3) - (x4-x3)*(y2-y1)) < eps ? "YES" : "NO") << endl;
      |                                                           ^~~
Language: C++

#include <stdio.h>

int main(void) {
  int n, i. j;
  scanf("%d",&n);
  for(i = 0; i < n; ++i) {
    double a[8];
    for(j = 0; j < 8; ++j) scanf("%lf", &a[i]);
    a[3] -= a[1], a[2] -= a[0], a[6] -= a[4], a[7] -= a[5];
    if(a[3] / a[2] == a[7] / a[6]) printf("YES\n");
    else printf("NO\n");
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:11: error: expected initializer before '.' token
    4 |   int n, i. j;
      |           ^
a.cc:6:7: error: 'i' was not declared in this scope
    6 |   for(i = 0; i < n; ++i) {
      |       ^
a.cc:8:9: error: 'j' was not declared in this scope
    8 |     for(j = 0; j < 8; ++j) scanf("%lf", &a[i]);
      |         ^
Language: 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-ix1);
    double r2 = (iy4-y3)/(ix4-ix3);
    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");
        }
    }
}


Compiler output:
a.cc: In function 'int solve1()':
a.cc:13:21: error: invalid operands of types 'double' and 'double(double) noexcept' to binary 'operator-'
   13 |     double r1 = (iy2-y1)/(ix2-ix1);
      |                  ~~~^~~
      |                  |   |
      |                  |   double(double) noexcept
      |                  double
a.cc:14:22: error: 'y3' was not declared in this scope; did you mean 'yn'?
   14 |     double r2 = (iy4-y3)/(ix4-ix3);
      |                      ^~
      |                      yn
a.cc:15:31: error: expected ';' before '}' token
   15 |     return (fabs(r1-r2) < eps)
      |                               ^
      |                               ;
   16 | }
      | ~
Language: 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-iy1)/(ix2-ix1);
    double r2 = (iy4-iy3)/(ix4-ix3);
    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");
        }
    }
}


Compiler output:
a.cc: In function 'int solve1()':
a.cc:15:31: error: expected ';' before '}' token
   15 |     return (fabs(r1-r2) < eps)
      |                               ^
      |                               ;
   16 | }
      | ~
Language: C++

#!/usr/bin/env python
n = input()

for loop in range(n):
	S = raw_input().split()
	x1, y1, x2, y2, x3, y3, x4, y4 = map(float, S)

	v1 = [x2 - x1, y2 - y1]
	v2 = [x4 - x3, y4 - y3]

	norm = (v1[0] * v1[0] + v1[1] * v1[1]) * (v2[0] * v2[0] + v2[1] * v2[1])
	inn = v1[0] * v2[0] + v1[1] * v2[1]

	if abs(norm) - inn * inn < 1e-10:
		print "YES"
	else:
		print "NO"


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #!
    1 | #!/usr/bin/env python
      |  ^
a.cc:2:1: error: 'n' does not name a type
    2 | n = input()
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int n;
  double x1,x2,x3,x4,y1,y2,y3,y4;
  cin >> n;
  string ans[n];
  for(int i=0;i<n;i++){
    cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4;
    if((y1-y2)/(x1-x2)==(y3-y4)/(x3-x4) and (y1-y3)/(x1-x3)!=(y1-y2)/(x1-x2) and (y1-y4)/(x1-x4)!=(y1-y2)/(x1-x2) x1-x2!=0 and x3-x4!=0 and y1-y2!=0 and y3-y4!=0){
      ans[i]="YES";
    }else{
      ans[i]="NO";
    }
  }
  for(int i=0;i<n;i++){
    cout << ans[i] << endl;
  }
  return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:114: error: expected ')' before 'x1'
   10 |     if((y1-y2)/(x1-x2)==(y3-y4)/(x3-x4) and (y1-y3)/(x1-x3)!=(y1-y2)/(x1-x2) and (y1-y4)/(x1-x4)!=(y1-y2)/(x1-x2) x1-x2!=0 and x3-x4!=0 and y1-y2!=0 and y3-y4!=0){
      |       ~                                                                                                          ^~~
      |                                                                                                                  )
Language: C++

a#include <iostream>

using namespace std;



struct pt {

	double x;

	double y;

};



int main() {

	int num;

	cin >> num;

	while(num--) {

		pt p1, p2, p3, p4;

		cin >> p1.x >> p1.y;

		cin >> p2.x >> p2.y;

		cin >> p3.x >> p3.y;

		cin >> p4.x >> p4.y;

		pt v1 = {p1.x-p2.x, p1.y-p2.y};

		pt v2 = {p3.x-p4.x, p3.y-p4.y};

		if (v1.y==0 && v2.y==0) cout << "YES\n";

		else if (v1.x/v1.y == v2.x/v2.y) cout << "YES\n";

		else cout << "NO\n";

	}

	return 0;

}

Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | a#include <iostream>
      |  ^
a.cc:1:1: error: 'a' does not name a type
    1 | a#include <iostream>
      | ^
a.cc: In function 'int main()':
a.cc:21:9: error: 'cin' was not declared in this scope
   21 |         cin >> num;
      |         ^~~
a.cc:39:41: error: 'cout' was not declared in this scope
   39 |                 if (v1.y==0 && v2.y==0) cout << "YES\n";
      |                                         ^~~~
a.cc:41:50: error: 'cout' was not declared in this scope
   41 |                 else if (v1.x/v1.y == v2.x/v2.y) cout << "YES\n";
      |                                                  ^~~~
a.cc:43:22: error: 'cout' was not declared in this scope
   43 |                 else cout << "NO\n";
      |                      ^~~~
Language: C++

#include<complex>
#include<iostream>
using namespace std;
int main(){const double E=1e-10;int n;double x1,y1,x2,y2,x3,y3,x4,y4;cin>>n;while(n--{cin>>x1>>y1>>x2>>y2>>x3>>y3>>x4>>y4;cout<<((abs((y2-y1)*(x4-x3)-(y4-y3)*(x2-x1))<E)?"YES":"NO")<<endl;}}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:86: error: expected ')' before '{' token
    4 | int main(){const double E=1e-10;int n;double x1,y1,x2,y2,x3,y3,x4,y4;cin>>n;while(n--{cin>>x1>>y1>>x2>>y2>>x3>>y3>>x4>>y4;cout<<((abs((y2-y1)*(x4-x3)-(y4-y3)*(x2-x1))<E)?"YES":"NO")<<endl;}}
      |                                                                                  ~   ^
      |                                                                                      )
Language: C++

import java.util.*;
import java.lang.*;
import java.math.*;
import java.io.*;

import static java.lang.Math.*;
import static java.util.Arrays.*;

public class Main{

	Scanner sc;

	static final int INF=1<<28;
	static final double EPS=1e-9;

	void run(){
		sc=new Scanner(System.in);
		int n=sc.nextInt();
		for(int i=0; i<n; i++){
			double x1=sc.nextDouble();
			double y1=sc.nextDouble();
			double x2=sc.nextDouble();
			double y2=sc.nextDouble();
			double x3=sc.nextDouble();
			double y3=sc.nextDouble();
			double x4=sc.nextDouble();
			double y4=sc.nextDouble();

			double vx1=x2-x1;
			double vy1=y2-y1;
			double vx2=x4-x3;
			double vy2=y4-y3;

			double ip=vx1*vx2+vy1*vy2;
			ip*=ip;
			double n1=vx1*vx1+vy1*vy1;
			double n2=vx2*vx2+vy2*vy2;
			println(abs(ip-abs(n1*n2))<EPS?"YES":"NO");
		}
		sc.close();
	}

	void print(String s){
		System.out.print(s);
	}

	void println(String s){
		System.out.println(s);
	}

	public static void main(String[] args){
		new Main().run();
	}
}

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: 'import' does not name a type
    2 | import java.lang.*;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.math.*;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import java.io.*;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: 'import' does not name a type
    6 | import static java.lang.Math.*;
      | ^~~~~~
a.cc:6:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:7:1: error: 'import' does not name a type
    7 | import static java.util.Arrays.*;
      | ^~~~~~
a.cc:7:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:9:1: error: expected unqualified-id before 'public'
    9 | public class Main{
      | ^~~~~~
Language: C++

int main(){
	int n,i,j;
	double x[4],y[4];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		for(j=0;j<4;j++)scanf("%d %d",&x[j],&y[j]);
		if(((y[0]-y[1])/(x[0]-x[1]))==((y[2]-y[3])/(x[2]-x[3])))printf("YES\n");
		else printf("NO\n");
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'scanf' was not declared in this scope
    4 |         scanf("%d",&n);
      |         ^~~~~
a.cc:7:73: error: 'printf' was not declared in this scope
    7 |                 if(((y[0]-y[1])/(x[0]-x[1]))==((y[2]-y[3])/(x[2]-x[3])))printf("YES\n");
      |                                                                         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(){
a.cc:8:22: error: 'printf' was not declared in this scope
    8 |                 else printf("NO\n");
      |                      ^~~~~~
a.cc:8:22: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include <iostream>
n,i,j;main(){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";}}

Compiler output:
a.cc:2:1: error: 'n' does not name a type
    2 | n,i,j;main(){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";}}
      | ^
a.cc:2:7: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | n,i,j;main(){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";}}
      |       ^~~~
a.cc: In function 'int main()':
a.cc:2:41: error: 'n' was not declared in this scope
    2 | n,i,j;main(){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";}}
      |                                         ^
a.cc:2:47: error: 'i' was not declared in this scope
    2 | n,i,j;main(){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";}}
      |                                               ^
a.cc:2:64: error: 'j' was not declared in this scope
    2 | n,i,j;main(){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";}}
      |                                                                ^
Language: C++

import java.io.*;
class Main{
	public static void main(String[] args)throws IOException{
		BufferedReader br
		= new BufferedReader(new InputStreamReader(System.in));
		String buf;
		double[][] data=new double[4][2];
		int n=Integer.parseInt(br.readLine());
		for(int k=0;k<n;k++){
			if((buf=br.readLine())==null)break;
			if(buf.length()==0)break;
			
			String[] buf2=buf.split(" ");
			for(int i=0;i<4;i++){
				for(int j=0;j<2;j++){
					data[i][j]=Double.parseDouble(buf2[i*2+j]);
				}
			}
			if((data[0][1]-data[1][1]/data[0][0]-data[1][0])==(data[2][1]-data[3][1]/data[2][0]-data[3][0]))
					System.out.println("YES");
			else
				System.out.println("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:3:15: error: expected ':' before 'static'
    3 |         public static void main(String[] args)throws IOException{
      |               ^~~~~~~
      |               :
a.cc:3:33: error: 'String' has not been declared
    3 |         public static void main(String[] args)throws IOException{
      |                                 ^~~~~~
a.cc:3:42: error: expected ',' or '...' before 'args'
    3 |         public static void main(String[] args)throws IOException{
      |                                          ^~~~
a.cc:3:46: error: expected ';' at end of member declaration
    3 |         public static void main(String[] args)throws IOException{
      |                                              ^
      |                                               ;
a.cc:3:47: error: 'throws' does not name a type
    3 |         public static void main(String[] args)throws IOException{
      |                                               ^~~~~~
a.cc:25:2: error: expected ';' after class definition
   25 | }
      |  ^
      |  ;
Language: C++

#include <cmath>
#include <complex>
#include <vector>
#include <cfloat>
#include <algorithm>
using namespace std;


//二次元幾何テンプレート
//点クラス point->x,y
//直線クラス line->s,v
//
class point;
class line;
point vec_add(point vec1,point vec2);//ベクトルの足し算
point vec_sub(point vec1,point vec2);//ベクトルの引き算
double inner_product(point a,point b);//内積
double outer_product(point a,point b);//外積
bool vec_parallel(point vec1,point vec2);//ベクトルの並行判定(交差判定falseとしても使える)
bool vec_angle_right(point vec1,point vec2);//ベクトルの直行判定
bool cross_line_segment(line a,point p1,point p2);//直線と線分の交差判定
//


class point{
public:
	double x,y;
	point(){
		x=0;
		y=0;
	}
	point(double a,double b){
		x=a;
		y=b;
	}
};

//直線クラス
class line{
public:
	point s,v;
public:
	line(point a,point b){
		s=a;
		v=vec_sub(a,b);
	}
};

//多角形(頂点を保持する)
typedef vector<point> polygon;

//ベクトルの足し算
point vec_add(point vec1,point vec2){
	point res(vec1.x+vec2.x,vec1.y+vec2.y);
	return res;
}
//ベクトルの引き算
point vec_sub(point vec1,point vec2){
	point res(vec1.x-vec2.x,vec1.y-vec2.y);
	return res;
}
//内積
double inner_product(point a,point b){
	return a.x * b.x + a.y * b.y;
}
//外積
double outer_product(point a,point b){
	return a.x * b.y - a.y * b.x;
}


//ベクトルの並行判定
bool vec_parallel(point vec1,point vec2){
	if(outer_product(vec1,vec2)==0){
		return true;
	}else{
		return false;
	}
}
//ベクトルの直交判定
bool vec_angle_right(point vec1,point vec2){
	if(inner_product(vec1,vec2)==0){
		return true;
	}else{
		return false;
	}
}

bool cross_line_segment(line l,point p1,point p2){
	p1=vec_sub(p1,l.s);
	p2=vec_sub(p2,l.s);
	if(outer_product(p1,l.v)*outer_product(p2,l.v)<0){
		return true;
	}else{
		return false;
	}
}



//
int main(){
	int n;
	point p[4];
	cin>>n;
	for(;n--;){
		for(int i=0;i<4;i++){
			cin>>p[i].x;
			cin>>p[i].y;
		}
		p[0]=vec_sub(p[0],p[1]);
		p[2]=vec_sub(p[2],p[3]);
		if(vec_parallel(p[0],p[2])){
			cout<<"YES"<<endl;
		}else{
			cout<<"NO"<<endl;
		}
		
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:105:9: error: 'cin' was not declared in this scope
  105 |         cin>>n;
      |         ^~~
a.cc:6:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    5 | #include <algorithm>
  +++ |+#include <iostream>
    6 | using namespace std;
a.cc:114:25: error: 'cout' was not declared in this scope
  114 |                         cout<<"YES"<<endl;
      |                         ^~~~
a.cc:114:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:116:25: error: 'cout' was not declared in this scope
  116 |                         cout<<"NO"<<endl;
      |                         ^~~~
a.cc:116:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include<iostream>
#include<cstdlib>
using namespace std;
#define EPS 1e-10
double x1,y1,x2,y2,x3,y3,x4,y4;
int det(){
	double dx1,dy1,dx2,dy2;
	dx1 = x1-x2;
	dy1 = y1-y2;
	dx2 = x3-x4;
	dy2 = y3-y4;
	return dx1*dy2 - dy1*dx2;
}
int main(){
	int n;
	cin>>n;
	while(n--){
		cin>>x1>>y1>>x2>>y2>>x3>>y3>>x4>>y4;
		cout<<(fabs(det())<EPS?"YES":"NO")<<endl;
	}
	return 0;
}

Compiler output:
a.cc:5:11: warning: built-in function 'y1' declared as non-function [-Wbuiltin-declaration-mismatch]
    5 | double x1,y1,x2,y2,x3,y3,x4,y4;
      |           ^~
a.cc: In function 'int main()':
a.cc:19:24: error: 'fabs' was not declared in this scope; did you mean 'labs'?
   19 |                 cout<<(fabs(det())<EPS?"YES":"NO")<<endl;
      |                        ^~~~
      |                        labs
Language: C++

#include<iostream>
using namespace std;
int main(){
  int n;
  cin >> n;
  double ax,ay,bx,by,cx,cy,dx,dy,ans1,ans2,x,y;
   for(int i=0;i<n;i++){
     cin >> ax >> ay >> bx >> by >> cx >> cy >> dx >> dy;
     x = ax - bx;
     y = ay - by;
     ans1 = y / x;
     x = cx - dx;
     y = cy - dy;
     ans2 = y / x;
     if(ans1==ans2) cout << "YES" << endl;
     if(ans1!=ans2) cout << "NO" << endl;
   }
  

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

#include <iostream>
#include <cmath>

using namespace std;

int main (void) {
  double x1, y1, x2, y2, x3, y3, x4, y4;
  int n;
   
  cin >> n;
  
  for(int i = 0; i < n; i++) {
    cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4;
    double t1 = (y1-y2)/(x1-x2));
    double t2 = (y3-y4)/(x3-x4));
    //cout << t1 << " " << t2 << endl;
    if ( t1 == t2 ) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:32: error: expected ',' or ';' before ')' token
   14 |     double t1 = (y1-y2)/(x1-x2));
      |                                ^
a.cc:15:32: error: expected ',' or ';' before ')' token
   15 |     double t2 = (y3-y4)/(x3-x4));
      |                                ^
Language: C++

#include <iostream>
using namespace std;

int main(){
	int n;
	cin >> n;
	for(int i = 0; i < n; i++){
		float x[4], y[4];
		for(int j = 0; j < 4; j++){
			cin >> x[j] >> y[j];
		}
		//float ab = 999999, cd = 999999;
		ab = (y[0]-y[1]) / (x[0]-x[1]);
		cd = (y[2]-y[3]) / (x[2]-x[3]);
		if(ab == cd) cout << "YES"<< endl;
		else cout << "NO" << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:17: error: 'ab' was not declared in this scope; did you mean 'abs'?
   13 |                 ab = (y[0]-y[1]) / (x[0]-x[1]);
      |                 ^~
      |                 abs
a.cc:14:17: error: 'cd' was not declared in this scope
   14 |                 cd = (y[2]-y[3]) / (x[2]-x[3]);
      |                 ^~
Language: C++

#include <iostream>
using namespace std;

int main(){
  double x1,y1,x2,y2,x3,y3,x4,y4;
  int n;
  cin>>n;
  while(n--){
    cin>>x1>>y1>>x2>>y2>>x3>>y3>>x4>>y4;
    double a,b,c,d;
    a=y2-y1;
    b=y4-y3;
    c=x2-x1;
    d=x4-x3;
    if()
      if(a/c==d/b)cout<<"YES"<<endl;
    else cout<<"NO"<<endl;
}
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:8: error: expected primary-expression before ')' token
   15 |     if()
      |        ^
Language: C++

#include <iostream>
using namespace std;

int main(){
  double x1,y1,x2,y2,x3,y3,x4,y4;
  int n;
  cin>>n;
  while(n--){
    cin>>x1>>y1>>x2>>y2>>x3>>y3>>x4>>y4;
    double a,b,c,d;
    a=y2-y1;
    b=y4-y3;
    c=x2-x1;
    d=x4-x3;
    
      if(a/c==d/b)cout<<"YES"<<endl;
    else cout<<"NO"<<endl;
}
  return 0;

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

#include<cstdio>
int main(){
    int n;
    scanf("%d",&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",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
        if((y2-y1)/(x2-x1)==(y4-y3)/(x4-x3)) printf("YES\n");
        else printf("NO\n");
    }

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

#include <stdio.h>
int main(void){
    int b[100],n;
    double a[100],c[100];
        scanf("%d",&n);
        for(b[2]=1;b[2]<=n;b[2]++){
            for(b[3]=1;b[3]<=8;b[3]++){
                scanf("%lf",&a[b[3]+10*n]);
            }
        }


for(b[2]=1;b[2]<=n;b[2]++){
        c[0]*1.0=a[6+10*n]/a[7+10*n]*1.0;
        c[1]*1.0=a[2+10*n]/a[3+10*n]*1.0;
        if(c[0]==c[1]){
            printf("YES\n");
        }
        else printf("NO\n");
            }




    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:13: error: lvalue required as left operand of assignment
   14 |         c[0]*1.0=a[6+10*n]/a[7+10*n]*1.0;
      |         ~~~~^~~~
a.cc:15:13: error: lvalue required as left operand of assignment
   15 |         c[1]*1.0=a[2+10*n]/a[3+10*n]*1.0;
      |         ~~~~^~~~
Language: C++

#include<iostream>
 
using namespace std;

#define EPS 1e-5
 
struct point{
	double x;
	double y;
};

struct line{
	double a;
	double b;
};

bool get_line( const point& a , const point& b , line *a_b );
istream& operator >> ( istream& s , point& p );
 
int main(void)
{
	point a, b, c, d;
 
    line a_b, c_d;
 
    bool result1 , result2;
 
    int num;
 
    cin >> num;
 
    for( int i = 0 ; i < num ; i++ )
    {
        cin >> a >> b >> c >> d;
 
        result1 = get_line( a , b , &a_b );
        result2 = get_line( c , d , &c_d );
 
        if( result1 == false && result2 == false )
        {
            cout << "YES" << endl;
        }
        else
        {
            if( fabs(a_b.a - c_d.a) < EPS ) cout << "YES" << endl;
            else cout << "NO" << endl;
        }
    }
 
    return 0;
}

istream& operator >> ( istream& s , point& p )
{
	return s >> p.x >> p.y;
}

bool get_line( const point& a , const point& b , line *a_b )
{
	if( fabs(a.x - b.x) < EPS ) return false;
	else{
		a_b->a = (a.y - b.y)/(a.x - b.x);
		a_b->b = a.y - (a.x * a_b->a);
		return true;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:45:17: error: 'fabs' was not declared in this scope; did you mean 'labs'?
   45 |             if( fabs(a_b.a - c_d.a) < EPS ) cout << "YES" << endl;
      |                 ^~~~
      |                 labs
a.cc: In function 'bool get_line(const point&, const point&, line*)':
a.cc:60:13: error: 'fabs' was not declared in this scope; did you mean 'labs'?
   60 |         if( fabs(a.x - b.x) < EPS ) return false;
      |             ^~~~
      |             labs
a.cc:66:1: warning: control reaches end of non-void function [-Wreturn-type]
   66 | }
      | ^
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:1:21: warning: extra tokens at end of #include directive
    1 |  #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; }
      |                     ^~~~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

n = input()+1
for v in range(1,n):
        (x1,y1,x2,y2,x3,y3,x4,y4)=map(int,raw_input().split())
        if x2-x1=0 or x4-x3=0:
                if x2-x1=0 and x4-x3=0:
                        print "YES"
                else:
                        print "NO"
        elif y2-y1=0 or y4-y3=0:
                if y2-y1=0 and y4-y3=0:
                        print "YES"
                else:
                        print "NO"
        else:
                a = (y2-y1)/(x2-x1)

Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n = input()+1
      | ^
Language: C++

n = input()+1
for v in range(1,n):
        (x1,y1,x2,y2,x3,y3,x4,y4)=map(int,raw_input().split())
        if x2-x1==0 or x4-x3==0:
                if x2-x1==0 and x4-x3==0:
                        print "YES"
                else:
                        print "NO"
        elif y2-y1==0 or y4-y3==0:
                if y2-y1==0 and y4-y3==0:
                        print "YES"
                else:
                        print "NO"
        else:
                a = (y2-y1)/(x2-x1)
                b = (y4-y3)/(x4-x3)
                if a == b:
                        print "YES"
                else:
                        print "NO"

Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n = input()+1
      | ^
Language: C++

#!/usr/bin/python
# -*- coding:utf-8 -*-

def main():
	numData = int(raw_input())
	count = 0
	while count < numData:
		line = raw_input()
		coords = map(float, line.strip().split())
		result = isParallel(coords[0], coords[1], coords[2], coords[3], coords[4], coords[5], coords[6], coords[7])

		if result :
			print "YES"
		else:
			print "NO"

		count += 1

def isParallel(x1, y1, x2, y2, x3, y3, x4, y4):
	# 小数点以下最大５桁までの精度で計算すればよい
	x1 = int(x1 * 100000)
	y1 = int(y1 * 100000)
	x2 = int(x2 * 100000)
	y2 = int(y2 * 100000)
	x3 = int(x3 * 100000)
	y3 = int(y3 * 100000)
	x4 = int(x4 * 100000)
	y4 = int(y4 * 100000)
	# 直線ABの傾きが無限大かどうか
	if (x2 == x1):
		# 傾き無限大ならば、CDもそうなら平行
		return x4 == x3
	else:
		# 有限の傾きならば傾きが等しければOK
		return (y2 - y1)/(x2 - x1) == (y4 - y3)/(x4 - x3)

main()

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #!
    1 | #!/usr/bin/python
      |  ^
a.cc:2:3: error: invalid preprocessing directive #-
    2 | # -*- coding:utf-8 -*-
      |   ^
a.cc:20:11: error: invalid preprocessing directive #\U00005c0f\U00006570\U000070b9\U00004ee5\U00004e0b\U00006700\U00005927\U0000ff15\U00006841\U0000307e\U00003067\U0000306e\U00007cbe\U00005ea6\U00003067\U00008a08\U00007b97\U00003059\U0000308c\U00003070\U00003088\U00003044
   20 |         # 小数点以下最大５桁までの精度で計算すればよい
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:29:11: error: invalid preprocessing directive #\U000076f4\U00007ddaAB\U0000306e\U000050be\U0000304d\U0000304c\U00007121\U00009650\U00005927\U0000304b\U00003069\U00003046\U0000304b
   29 |         # 直線ABの傾きが無限大かどうか
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:31:19: error: extended character 、 is not valid in an identifier
   31 |                 # 傾き無限大ならば、CDもそうなら平行
      |                   ^
a.cc:31:19: error: invalid preprocessing directive #\U000050be\U0000304d\U00007121\U00009650\U00005927\U0000306a\U00003089\U00003070\U00003001CD\U00003082\U0000305d\U00003046\U0000306a\U00003089\U00005e73\U0000884c
   31 |                 # 傾き無限大ならば、CDもそうなら平行
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:34:19: error: invalid preprocessing directive #\U00006709\U00009650\U0000306e\U000050be\U0000304d\U0000306a\U00003089\U00003070\U000050be\U0000304d\U0000304c\U00007b49\U00003057\U00003051\U0000308c\U00003070OK
   34 |                 # 有限の傾きならば傾きが等しければOK
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:4:1: error: 'def' does not name a type
    4 | def main():
      | ^~~
Language: C++

#include <stdio.h>
 
int main(void) {
    int kaisu,i,j;
    double x[4],y[4];

    scanf("%d",&kaisu);
    for(i=0;i<kaisu;i++)
	{
        for(j=0;j<4;j++)
		{
			scanf("%lf %lf",&x[j],&y[j]);
			if(-100 > x[j] || 100 < x[j] || -100 > x[j] || 100 < x[j])break;
        if(x[0]==x[1]) 
		{
            if(x[2] == x[3])
				printf("YES\n");
            else 
				printf("NO\n");
        } 
		else if(x[2] == x[3])
			printf("NO\n");
        else 
		{
            if((y[1]-y[0]) / (x[1]-x[0]) == (y[3]-y[2]) / (x[3]-x[2]))
                printf("YES\n");
            else 
				printf("NO\n");
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:2: error: expected '}' at end of input
   32 | }
      |  ^
a.cc:3:16: note: to match this '{'
    3 | int main(void) {
      |                ^