submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s582791003 | p00021 | 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")... | 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 ... |
s443207044 | p00021 | 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] *... | 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 b... |
s583442209 | p00021 | 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{
... | 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(){
| ^
|
s017120138 | p00021 | 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 |... | 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;
| ... |
s957084216 | p00021 | 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;
} | 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];
| ^
| ;
|
s015052742 | p00021 | 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(" ");
dou... | 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: erro... |
s035361730 | p00021 | 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;... | 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 | ... |
s936803539 | p00021 | C++ | include <iostream>
#include <complex>
using namespace std;
typedef complex<double> xy_t;
double cross_product(xy_t a, xy_t b) { return (conj(a)*b).imag(); }
const double eps = 1e-11;
double x[4],y[4];
int N;
int main(int argc, const char * argv[]) {
cin >> N;
for(int t=0; t<N; ++t){
for(int i=0; i<4; ++... | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
In file included from /usr/include/c++/14/complex:43,
from a.cc:2:
/usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cxx::__is_null_pointer' redeclared as different kind of entity
... |
s056913857 | p00021 | C++ | include <iostream>
#include <complex>
using namespace std;
typedef complex<double> xy_t;
double cross_product(xy_t a, xy_t b) { return (conj(a)*b).imag(); }
const double eps = 1e-11;
double x[4],y[4];
int N;
int main(int argc, const char * argv[]) {
cin >> N;
for(int t=0; t<N; ++t){
for(int i=0; i<4; ++... | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
In file included from /usr/include/c++/14/complex:43,
from a.cc:2:
/usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cxx::__is_null_pointer' redeclared as different kind of entity
... |
s126391082 | p00021 | 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... | 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{
| ^~~~~~
|
s926184488 | p00021 | 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... | 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(){
| ^~~~
|
s451976596 | p00021 | 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();
} | a.cc:1:10: fatal error: geometry/intersect.hpp: No such file or directory
1 | #include "geometry/intersect.hpp"
| ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s714092558 | p00021 | 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... | a.cc:17:9: error: expected unqualified-id before 'return'
17 | return 0;
| ^~~~~~
a.cc:18:1: error: expected declaration before '}' token
18 | }
| ^
|
s411219810 | p00021 | 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;
#defi... | 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
|
s404358741 | p00021 | 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"} | 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"}... |
s130249046 | p00021 | 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] ... | 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){
| ^
|
s744344236 | p00021 | 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] ... | a.cc: In function 'int main()':
a.cc:25:9: error: 'm' was not declared in this scope
25 | if( m < eps){
| ^
|
s011989257 | p00021 | 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]... | 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){
| ^~~
|
s120685870 | p00021 | 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 >... | 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){
| ^~~
|
s477784610 | p00021 | 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 >... | a.cc: In function 'int main()':
a.cc:30:9: error: 'm' was not declared in this scope
30 | if( m < EPS){
| ^
|
s074470889 | p00021 | 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 >... | a.cc: In function 'int main()':
a.cc:30:9: error: 'm' was not declared in this scope
30 | if( m < EPS){
| ^
|
s527217766 | p00021 | 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){
ci... | a.cc: In function 'int main()':
a.cc:30:9: error: 'm' was not declared in this scope
30 | if( m < EPS){
| ^
|
s996252214 | p00021 | 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) {
... | a.cc: In function 'int main()':
a.cc:37:9: error: 'm' was not declared in this scope
37 | if( m < EPS){
| ^
|
s241680319 | p00021 | 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) {
... | a.cc: In function 'int main()':
a.cc:37:9: error: 'm' was not declared in this scope
37 | if( m < EPS){
| ^
|
s947646531 | p00021 | 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) {
... | a.cc: In function 'int main()':
a.cc:37:9: error: 'm' was not declared in this scope
37 | if( m < EPS){
| ^
|
s203161640 | p00021 | 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) {
... | a.cc: In function 'int main()':
a.cc:37:8: error: 'm' was not declared in this scope
37 | if(m<e){
| ^
|
s381458354 | p00021 | 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)/(... | 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(
| ~^
| )
... |
s961480357 | p00021 | 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)/(... | 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(
| ~^
| )
... |
s969925395 | p00021 | 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... | 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){
| ~ ^
| ... |
s414282990 | p00021 | 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" <<... | 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-expres... |
s935427608 | p00021 | 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;
... | 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... |
s511897641 | p00021 | 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);... | 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
|
s069555955 | p00021 | 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);... | 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
|
s256583411 | p00021 | 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);... | 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
|
s472741442 | p00021 | 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>>... | 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'
|
s476830930 | p00021 | 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>>... | 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'
|
s635479978 | p00021 | 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.cc: In function 'int main()':
a.cc:16:21: error: expected primary-expression before ';' token
16 | long double a=0,b=;
| ^
|
s936966416 | p00021 | 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.cc: In function 'int main()':
a.cc:16:21: error: expected primary-expression before ';' token
16 | long double a=0,b=;
| ^
|
s489271037 | p00021 | 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... | 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 {
| ^~~~~~
|
s654181341 | p00021 | 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 ) ) *... | 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() {
| ^
|
s410974421 | p00021 | 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... | 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 |... |
s007021430 | p00021 | 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:v... | 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;
| ~~~~~^~~~~~~
|
s087870107 | p00021 | 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) {... | 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
|
s773211001 | p00021 | 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;
ty... | a.cc: In function 'int main()':
a.cc:109:15: error: expected ';' before ']' token
109 | cin>>n];
| ^
| ;
|
s158861963 | p00021 | 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;
}
} | 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){
| ^
|
s267381937 | p00021 | 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])/([7]-c[5])==(c[2]-c[0])/(c[3]-c[1]))printf("YES\n");
else printf("NO\n");s
}
} | a.cc: In function 'int main()':
a.cc:11:27: error: expected identifier before numeric constant
11 | else if((c[6]-c[4])/([7]-c[5])==(c[2]-c[0])/(c[3]-c[1]))printf("YES\n");
| ^
a.cc: In lambda function:
a.cc:11:29: error: expected '{' before '-' token
11 | else if((c[6]-c[4... |
s025321351 | p00021 | 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
}
} | a.cc: In function 'int main()':
a.cc:12:25: error: 's' was not declared in this scope
12 | else printf("NO\n");s
| ^
|
s179221057 | p00021 | 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
}
} | a.cc: In function 'int main()':
a.cc:12:25: error: 's' was not declared in this scope
12 | else printf("NO\n");s
| ^
|
s391331025 | p00021 | C++ | #include<algorithm>
using namespace std;
int main() {
int n,i;
double x1, y1, x2, y2, x3, y3, x4, y4,a,b;
cin >> n;
for (i = 0; i < n; i++) {
cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4;
if (x1 - x2 == 0 && x3 - x4 == 0) {
cout << "YES" << endl;
}
else if (x1 - x2 == 0 || x3 - x4 == 0) {
cout ... | a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope
6 | cin >> n;
| ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
1 | #include<algorithm>
+++ |+#include <iostream>
2 | using... |
s416693147 | p00021 | 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(... | 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'
... |
s076218767 | p00021 | 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(... | 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'
... |
s409174605 | p00021 | 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(... | 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'
... |
s295992088 | p00021 | 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(... | 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'
... |
s994711523 | p00021 | 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(... | 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'
... |
s043552131 | p00021 | 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(... | 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'
... |
s919447223 | p00021 | 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(... | 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'
... |
s390171857 | p00021 | 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(... | 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'
... |
s497119807 | p00021 | 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(... | 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'
... |
s914442302 | p00021 | 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(... | 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'
... |
s537749963 | p00021 | 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(... | 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'
... |
s547340240 | p00021 | 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(... | 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'
... |
s955745256 | p00021 | 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(... | 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'
... |
s793165354 | p00021 | 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(... | 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'
... |
s452320738 | p00021 | 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(... | 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'
... |
s826267486 | p00021 | 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(... | 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'
... |
s606885854 | p00021 | 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(... | 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'
... |
s685050857 | p00021 | 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(... | 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'
... |
s434569099 | p00021 | 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(... | 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'
... |
s842579056 | p00021 | 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(... | 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'
... |
s368311099 | p00021 | 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,... | 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'
... |
s100895551 | p00021 | 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,... | 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'
... |
s540536933 | p00021 | 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,... | 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'
... |
s836817112 | p00021 | 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,... | 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'
... |
s443240282 | p00021 | 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 ((... | 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'
... |
s370275569 | p00021 | 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 ((... | 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'
... |
s115004331 | p00021 | 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"
... | a.cc:1:1: error: 'ans' does not name a type
1 | ans :: [Double] -> String
| ^~~
|
s783607926 | p00021 | 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 vec... | 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;
| ^
|
s975345395 | p00021 | C++ | v#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 ve... | a.cc:1:2: error: stray '#' in program
1 | v#include<iostream>
| ^
a.cc:1:1: error: 'v' does not name a type; did you mean 'vb'?
1 | v#include<iostream>
| ^
| vb
In file included from /usr/include/c++/14/bits/char_traits.h:42,
from /usr/include/c++/14/string:42,
... |
s429526794 | p00021 | C++ |
#include<iostream>
#include<stdio.h>
#include<string>
#include<math.h>
#include<iomanip>
#include<algorithm>
#include<string.h>
#include<cctype>
#include<map>
#include<set>
#include<vector>
#include<sstream>
#include<stack>
using namespace std;
double abs(double x)
{
if(x<0) return -x;
else ... | a.cc:18:21: error: 'double abs(double)' conflicts with a previous declaration
18 | double abs(double x)
| ^
In file included from /usr/include/c++/14/cstdlib:81,
from /usr/include/c++/14/ext/string_conversions.h:43,
from /usr/include/c++/14/bits/basic_stri... |
s877706492 | p00021 | 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") | a.cc:1:1: error: expected unqualified-id before 'for'
1 | for i in range(int(input())):
| ^~~
|
s398377063 | p00021 | 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") | a.cc:1:1: error: expected unqualified-id before 'for'
1 | for i in range(int(input())):
| ^~~
|
s222434739 | p00021 | 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):
... | a.cc:1:1: error: 'from' does not name a type
1 | from fractions import Fraction
| ^~~~
|
s708481766 | p00021 | 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" | a.cc:1:1: error: expected unqualified-id before 'for'
1 | for i in range(input()):
| ^~~
|
s250430968 | p00021 | C++ | using System;
class AIDU0021
{
public static void Main(){
double[] facets = new double[8], VAB = new double[2],VCD = new double[2];
string[] facetstr = new string[8];
int N=int.Parse(Console.ReadLine()),i=0;
bool[] result=new bool[N];
for (int l = ... | a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:4:15: error: expected ':' before 'static'
4 | public static void Main(){
| ^~~~~~~
| :
a.cc:21:6: error: expected ';' after class definition
21 | }
... |
s466724915 | p00021 | 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()
{
i... | 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 <... |
s111007123 | p00021 | 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()
{
i... | 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
|
s486570098 | p00021 | 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"<<en... | a.cc: In function 'int main()':
a.cc:14:13: error: expected ';' before string constant
14 | cout"YES"<<endl;
| ^~~~~
| ;
|
s369502502 | p00021 | 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 <... | 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 dec... |
s426203066 | p00021 | 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... | a.cc:7:22: error: '_TCHAR' has not been declared
7 | int _tmain(int argc, _TCHAR* argv[])
| ^~~~~~
|
s129405209 | p00021 | 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;
}
}
re... | 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)){
| ~ ^
| ... |
s490914567 | p00021 | 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;
}
}
re... | 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)){
| ~ ^
| ... |
s311908035 | p00021 | 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){
... | 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
|
s369382137 | p00021 | 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... | 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){
| ^~~~~~~~~
|
s437340350 | p00021 | 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... | 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){
| ^~~~~~~~~
|
s790608760 | p00021 | 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")
| a.cc:1:1: error: 'def' does not name a type
1 | def naiseki(x1,y1,z1,x2,y2,z2)
| ^~~
|
s704601430 | p00021 | 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;
}
... | 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;
| ... |
s835916706 | p00021 | 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;
}
| 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)... |
s037108457 | p00021 | C++ | #include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#include <cmath>
#include <stack>
#include <vector>
#include <iostream>
using namespace std;
int main()
{
int n;
scanf("%d", &n);
for (int i = 0; i < n; ++i)
{
double x[4], y[4];
for (int j = 0; j < 4; ++j)... | a.cc:9:1: error: extended character is not valid in an identifier
9 |
| ^
a.cc:10:1: error: extended character is not valid in an identifier
10 |
| ^
a.cc:12:1: error: extended character is not valid in an identifier
12 |
| ^
a.cc:15:1: error: extended character is not valid in... |
s709131110 | p00021 | C++ | #include <iostream>
using namespace std;
int main()
{
int n;
scanf("%d", &n);
for (int i = 0; i < n; ++i)
{
double x[4], y[4];
for (int j = 0; j < 4; ++j)
scanf("%lf %lf", x+j, y+j);
double dx1 = x[1] - x[0];
double dy1 = y[1] - y[0];
double dx... | a.cc:2:1: error: extended character is not valid in an identifier
2 |
| ^
a.cc:3:1: error: extended character is not valid in an identifier
3 |
| ^
a.cc:5:1: error: extended character is not valid in an identifier
5 |
| ^
a.cc:8:1: error: extended character is not valid in an... |
s949178343 | p00021 | C++ | #include <stdio.h>
#include <math.h>
const double eps = 1e-10;
int n;
//math.hライブラリでy1, y2...とかって変数名が使われてるらしい
double ix1, ix2, ix3, ix4;
double iy1, iy2, iy3, iy4;
//増加率を見る方法
int solve1() {
double r1 = (iy2-y1)/(ix2-ix1);
double r2 = (iy4-y3)/(ix4-ix3);
return (fabs(r1-r2) < eps)
}
int main() {
scan... | 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
| ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.