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");
} else {
printf("NO\n");
}
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:16:51: error: expected ';' before 'if'
16 | (y2-y1)/(x2-x1) == (y4-y3)/(x4-x3)
| ^
| ;
17 | if ((y2 - y1)/(x2 - x1) == (y4 - y3)/(x4 - x3)) {
| ~~
a.cc:19:19: error: 'else' without a previous 'if'
19 | } else {
| ^~~~
|
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] * 100000);
}
if(xi[0] - xi[1] == 0){
if(xi[2] - xi[3] == 0){
printf("YES\n");
}else{
printf("NO\n");
}
}else{
if((yi[0] - yi[1])*(xi[2] - xi[3])) == (xi[0] - xi[1])*(yi[2] - yi[3]){
printf("YES\n");
}else if((yi[0] - yi[1])*(xi[2] - xi[3])) == - (xi[0] - xi[1])*(yi[2] - yi[3]){
printf("YES\n");
}else{
printf("NO\n");
}
}
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:24:61: error: expected primary-expression before '==' token
24 | if((yi[0] - yi[1])*(xi[2] - xi[3])) == (xi[0] - xi[1])*(yi[2] - yi[3]){
| ^~
a.cc:26:67: error: expected primary-expression before '==' token
26 | }else if((yi[0] - yi[1])*(xi[2] - xi[3])) == - (xi[0] - xi[1])*(yi[2] - yi[3]){
| ^~
|
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{
cout<<"NO"<<endl;
}
}
return 0;
|
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 || x3==x4) {
goto result;
}
else if (a==b) {
parallel=true;
}
result:
std::cout << ( parallel ? "YES" : "NO") << std::endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:5:9: error: expected initializer before 'double'
5 | double a,b;
| ^~~~~~
a.cc:9:56: error: 'y4' was not declared in this scope; did you mean 'x4'?
9 | std::cin >>x1>>y1>>x2>>y2>>x3>>y3>>x4>>y4;
| ^~
| x4
a.cc:11:17: error: 'a' was not declared in this scope
11 | a=(y2-y1)/(x2-x1);
| ^
a.cc:12:17: error: 'b' was not declared in this scope
12 | b=(y4-y3)/(x4-x3);
| ^
|
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(" ");
double x1 = Double.parseDouble(values[0]);
double y1 = Double.parseDouble(values[1]);
double x2 = Double.parseDouble(values[2]);
double y2 = Double.parseDouble(values[3]);
double x3 = Double.parseDouble(values[4]);
double y3 = Double.parseDouble(values[5]);
double x4 = Double.parseDouble(values[6]);
double y4 = Double.parseDouble(values[7]);
System.out.println((x2 - x1) * (y4 - y3) == (y2 - y1) * (x4 - x3) ? "YES" : "NO");
}
}
}
|
a.cc:1:1: error: 'import' does not name a type
1 | import java.io.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:7: error: expected ':' before 'static'
4 | public static void main(String[] args) throws IOException{
| ^~~~~~~
| :
a.cc:4:25: error: 'String' has not been declared
4 | public static void main(String[] args) throws IOException{
| ^~~~~~
a.cc:4:34: error: expected ',' or '...' before 'args'
4 | public static void main(String[] args) throws IOException{
| ^~~~
a.cc:4:38: error: expected ';' at end of member declaration
4 | public static void main(String[] args) throws IOException{
| ^
| ;
a.cc:4:40: error: 'throws' does not name a type
4 | public static void main(String[] args) throws IOException{
| ^~~~~~
a.cc:22:2: error: expected ';' after class definition
22 | }
| ^
| ;
|
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 | else cout<<"NO"<<endl;
| ^~~~
a.cc:13:58: error: expected ')' before 'else'
13 | if(fabs(m1-m2)<(1e-10) cout<<"YES"<<endl;
| ~ ^
| )
14 | else cout<<"NO"<<endl;
| ~~~~
|
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; ++i){
cin >> x[i] >> y[i];
}
xy_t a[2] ={
xy_t(x[0],y[0]) - xy_t(x[1],y[1]),
xy_t(x[2],y[2]) - xy_t(x[3],y[3])
};
bool p = abs(cross_product(a[0], a[1])) < eps;
cout << (p ? "YES" : "NO") << endl;
}
return 0;
}
|
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
164 | __is_null_pointer(std::nullptr_t)
| ^
/usr/include/c++/14/ext/type_traits.h:159:5: note: previous declaration 'template<class _Type> constexpr bool __gnu_cxx::__is_null_pointer(_Type)'
159 | __is_null_pointer(_Type)
| ^~~~~~~~~~~~~~~~~
/usr/include/c++/14/ext/type_traits.h:164:26: error: 'nullptr_t' is not a member of 'std'
164 | __is_null_pointer(std::nullptr_t)
| ^~~~~~~~~
In file included from /usr/include/c++/14/bits/stl_pair.h:60,
from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/bits/specfun.h:43,
from /usr/include/c++/14/cmath:3906,
from /usr/include/c++/14/complex:44:
/usr/include/c++/14/type_traits:666:33: error: 'nullptr_t' is not a member of 'std'
666 | struct is_null_pointer<std::nullptr_t>
| ^~~~~~~~~
/usr/include/c++/14/type_traits:666:42: error: template argument 1 is invalid
666 | struct is_null_pointer<std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:670:48: error: template argument 1 is invalid
670 | struct is_null_pointer<const std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:674:51: error: template argument 1 is invalid
674 | struct is_null_pointer<volatile std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:678:57: error: template argument 1 is invalid
678 | struct is_null_pointer<const volatile std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:1429:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1429 | : public integral_constant<std::size_t, alignof(_Tp)>
| ^~~~~~
In file included from /usr/include/stdlib.h:32,
from /usr/include/c++/14/bits/std_abs.h:38,
from /usr/include/c++/14/cmath:49:
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/type_traits:1429:57: error: template argument 1 is invalid
1429 | : public integral_constant<std::size_t, alignof(_Tp)>
| ^
/usr/include/c++/14/type_traits:1429:57: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1438:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1438 | : public integral_constant<std::size_t, 0> { };
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/type_traits:1438:46: error: template argument 1 is invalid
1438 | : public integral_constant<std::size_t, 0> { };
| ^
/usr/include/c++/14/type_traits:1438:46: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1440:26: error: 'std::size_t' has not been declared
1440 | template<typename _Tp, std::size_t _Size>
| ^~~
/usr/include/c++/14/type_traits:1441:21: error: '_Size' was not declared in this scope
1441 | struct rank<_Tp[_Size]>
| ^~~~~
/usr/include/c++/14/type_traits:1441:27: error: template argument 1 is invalid
1441 | struct rank<_Tp[_Size]>
| ^
/usr/include/c++/14/type_traits:1442:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/type_traits:1442:65: error: template argument 1 is invalid
1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^
/usr/include/c++/14/type_traits:1442:65: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1446:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/type_traits:1446:65: error: template argument 1 is invalid
1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^
/usr/include/c++/14/type_traits:1446:65: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:2086:26: error: 'std::size_t' has not been declared
2086 | template<typename _Tp, std::size_t _Size>
| ^~~
/usr/include/c++/14/type_traits:2087:30: error: '_Size' was not declared in this scope
2087 | struct remove_extent<_Tp[_Size]>
| ^~~~~
/usr/include/c++/14/type_traits:2087:36: error: template argument 1 is invalid
2087 | struct remove_extent<_Tp[_Size]>
| ^
/usr/include/c++/14/type_traits:2099:26: error: 'std::size_t' has not been declared
2099 | template<typename _Tp, std::size_t _Size>
| ^~~
/usr/include/c++/14/type_traits:2100:35: error: '_Size' was not declared in this scope
2100 | struct remove_all_extents<_Tp[_Size]>
| ^~~~~
/usr/include/c++/14/type_traits:2100:41: error: template argument 1 is invalid
2100 | struct remove_all_extents<_Tp[_Size]>
| ^
/usr/include/c++/14/type_traits:2171:12: error: 'std::size_t' has not been declared
2171 | template<std::size_t _Len>
| ^~~
/usr/include/c++/14/type_traits:2176:30: error: '_Len' was not declared in this scope
2176 | unsigned char __data[_Len];
| ^~~~
/usr/include/c++/14/type_traits:2194:12: error: 'std::size_t' has not been declared
2194 | template<std::size_t _Len, std::size_t _Align =
| ^~~
/usr/include/c++/14/type_traits:2194:30: error: 'std::size_t' has not been declared
2194 | template<std::size_t _Len, std::size_t _Align =
| ^~~
/usr/include/c++/14/type_traits:2195:55: error: '_Len' was not declared in this scope
2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)>
| ^~~~
/usr/include/c++/14/type_traits:2195:59: error: template argument 1 is invalid
2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)>
| ^
/usr/include/c++/14/type_traits:2202:30: error: '_Len' was not declared in this scope
2202 | unsigned char __data[_Len];
| ^~~~
/usr/include/c++/14/type_traits:2203:44: error: '_Align' was not declared in this scope
2203 | struct __attribute__((__aligned__((_Align)))) { } __align;
| ^~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:65:
/usr/include/c++/14/bits/stl_iterator_base_types.h:125:67: error: 'ptrdiff_t' does not name a type
125 | template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t,
| ^~~~~~~~~
/usr/include/c++/14/bits/stl_iterator_base_types.h:1:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
+++ |+#include <cstddef>
1 | // Types used in iterator implementation -*- C++ -*-
/usr/include/c++/14/bits/stl_iterator_base_types.h:214:15: error: 'ptrdiff_t' does not name a type
214 | typedef ptrdiff_t difference_type;
| ^~~~~~~~~
/usr/include/c++/14/bits/stl_iterator_base_types.h:214:15: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
/usr/include/c++/14/bits/stl_iterator_base_types.h:225:15: error: 'ptrdiff_t' does not name a type
225 | typedef ptrdiff_t difference_type;
| ^~~~~~~~~
/usr/include/c++/14/bits/stl_iterator_base_types.h:225:15: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
In file included from /usr/include/c++/14/bits/stl_algobase.h:66:
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:112:5: error: 'ptrdiff_t' does not name a type
112 | ptrdiff_t
| ^~~~~~~~~
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:66:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
65 | #include <debug/assertions.h>
+++ |+#include <cstddef>
66 | #include <bits/stl_iterator_base_types.h>
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:118:5: error: 'ptrdiff_t' does not name a type
118 | ptrdiff_t
| ^~~~~~~~~
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:118:5: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
In file included from /usr/include/c++/14/bits/stl_iterator.h:67,
from /usr/includ
|
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; ++i){
cin >> x[i] >> y[i];
}
xy_t a[2] ={
xy_t(x[0],y[0]) - xy_t(x[1],y[1]),
xy_t(x[2],y[2]) - xy_t(x[3],y[3])
};
bool p = abs(cross_product(a[0], a[1])) < eps;
cout << (p ? "YES" : "NO") << endl;
}
return 0;
}
|
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
164 | __is_null_pointer(std::nullptr_t)
| ^
/usr/include/c++/14/ext/type_traits.h:159:5: note: previous declaration 'template<class _Type> constexpr bool __gnu_cxx::__is_null_pointer(_Type)'
159 | __is_null_pointer(_Type)
| ^~~~~~~~~~~~~~~~~
/usr/include/c++/14/ext/type_traits.h:164:26: error: 'nullptr_t' is not a member of 'std'
164 | __is_null_pointer(std::nullptr_t)
| ^~~~~~~~~
In file included from /usr/include/c++/14/bits/stl_pair.h:60,
from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/bits/specfun.h:43,
from /usr/include/c++/14/cmath:3906,
from /usr/include/c++/14/complex:44:
/usr/include/c++/14/type_traits:666:33: error: 'nullptr_t' is not a member of 'std'
666 | struct is_null_pointer<std::nullptr_t>
| ^~~~~~~~~
/usr/include/c++/14/type_traits:666:42: error: template argument 1 is invalid
666 | struct is_null_pointer<std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:670:48: error: template argument 1 is invalid
670 | struct is_null_pointer<const std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:674:51: error: template argument 1 is invalid
674 | struct is_null_pointer<volatile std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:678:57: error: template argument 1 is invalid
678 | struct is_null_pointer<const volatile std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:1429:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1429 | : public integral_constant<std::size_t, alignof(_Tp)>
| ^~~~~~
In file included from /usr/include/stdlib.h:32,
from /usr/include/c++/14/bits/std_abs.h:38,
from /usr/include/c++/14/cmath:49:
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/type_traits:1429:57: error: template argument 1 is invalid
1429 | : public integral_constant<std::size_t, alignof(_Tp)>
| ^
/usr/include/c++/14/type_traits:1429:57: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1438:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1438 | : public integral_constant<std::size_t, 0> { };
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/type_traits:1438:46: error: template argument 1 is invalid
1438 | : public integral_constant<std::size_t, 0> { };
| ^
/usr/include/c++/14/type_traits:1438:46: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1440:26: error: 'std::size_t' has not been declared
1440 | template<typename _Tp, std::size_t _Size>
| ^~~
/usr/include/c++/14/type_traits:1441:21: error: '_Size' was not declared in this scope
1441 | struct rank<_Tp[_Size]>
| ^~~~~
/usr/include/c++/14/type_traits:1441:27: error: template argument 1 is invalid
1441 | struct rank<_Tp[_Size]>
| ^
/usr/include/c++/14/type_traits:1442:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/type_traits:1442:65: error: template argument 1 is invalid
1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^
/usr/include/c++/14/type_traits:1442:65: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1446:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/type_traits:1446:65: error: template argument 1 is invalid
1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^
/usr/include/c++/14/type_traits:1446:65: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:2086:26: error: 'std::size_t' has not been declared
2086 | template<typename _Tp, std::size_t _Size>
| ^~~
/usr/include/c++/14/type_traits:2087:30: error: '_Size' was not declared in this scope
2087 | struct remove_extent<_Tp[_Size]>
| ^~~~~
/usr/include/c++/14/type_traits:2087:36: error: template argument 1 is invalid
2087 | struct remove_extent<_Tp[_Size]>
| ^
/usr/include/c++/14/type_traits:2099:26: error: 'std::size_t' has not been declared
2099 | template<typename _Tp, std::size_t _Size>
| ^~~
/usr/include/c++/14/type_traits:2100:35: error: '_Size' was not declared in this scope
2100 | struct remove_all_extents<_Tp[_Size]>
| ^~~~~
/usr/include/c++/14/type_traits:2100:41: error: template argument 1 is invalid
2100 | struct remove_all_extents<_Tp[_Size]>
| ^
/usr/include/c++/14/type_traits:2171:12: error: 'std::size_t' has not been declared
2171 | template<std::size_t _Len>
| ^~~
/usr/include/c++/14/type_traits:2176:30: error: '_Len' was not declared in this scope
2176 | unsigned char __data[_Len];
| ^~~~
/usr/include/c++/14/type_traits:2194:12: error: 'std::size_t' has not been declared
2194 | template<std::size_t _Len, std::size_t _Align =
| ^~~
/usr/include/c++/14/type_traits:2194:30: error: 'std::size_t' has not been declared
2194 | template<std::size_t _Len, std::size_t _Align =
| ^~~
/usr/include/c++/14/type_traits:2195:55: error: '_Len' was not declared in this scope
2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)>
| ^~~~
/usr/include/c++/14/type_traits:2195:59: error: template argument 1 is invalid
2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)>
| ^
/usr/include/c++/14/type_traits:2202:30: error: '_Len' was not declared in this scope
2202 | unsigned char __data[_Len];
| ^~~~
/usr/include/c++/14/type_traits:2203:44: error: '_Align' was not declared in this scope
2203 | struct __attribute__((__aligned__((_Align)))) { } __align;
| ^~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:65:
/usr/include/c++/14/bits/stl_iterator_base_types.h:125:67: error: 'ptrdiff_t' does not name a type
125 | template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t,
| ^~~~~~~~~
/usr/include/c++/14/bits/stl_iterator_base_types.h:1:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
+++ |+#include <cstddef>
1 | // Types used in iterator implementation -*- C++ -*-
/usr/include/c++/14/bits/stl_iterator_base_types.h:214:15: error: 'ptrdiff_t' does not name a type
214 | typedef ptrdiff_t difference_type;
| ^~~~~~~~~
/usr/include/c++/14/bits/stl_iterator_base_types.h:214:15: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
/usr/include/c++/14/bits/stl_iterator_base_types.h:225:15: error: 'ptrdiff_t' does not name a type
225 | typedef ptrdiff_t difference_type;
| ^~~~~~~~~
/usr/include/c++/14/bits/stl_iterator_base_types.h:225:15: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
In file included from /usr/include/c++/14/bits/stl_algobase.h:66:
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:112:5: error: 'ptrdiff_t' does not name a type
112 | ptrdiff_t
| ^~~~~~~~~
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:66:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
65 | #include <debug/assertions.h>
+++ |+#include <cstddef>
66 | #include <bits/stl_iterator_base_types.h>
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:118:5: error: 'ptrdiff_t' does not name a type
118 | ptrdiff_t
| ^~~~~~~~~
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:118:5: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
In file included from /usr/include/c++/14/bits/stl_iterator.h:67,
from /usr/includ
|
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.nextDouble();
y[i] = sc.nextDouble();
}
double ab = (y[1]-y[0])/(x[1]-x[0]);
double cd = (y[3]-y[2])/(x[3]-x[2]);
System.out.println(ab==cd ? "YES" : "NO");
}
}
}
|
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
#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;
}
|
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-x3);
if(m1==m2)puts("YES");
else puts("NO");
}
}
return 0;
}
|
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;
#define REP(i, n) for (int (i) = 0; (i) < (int)(n); (i)++)
#define REG(i, a, b) for (int (i) = ((int)(a)); (i) < ((int)(b)); i++)
#define ALL(V) (V).begin(), (V).end()
typedef long long ll;
using namespace std;
int nextInt() { int n = -1; cin >> n; return n; }
double nextDouble() { double d = -1; cin >> d; return d; }
ll nextll() { ll n = -1; cin >> n; return n; }
string nextString() { string str; cin >> str; return str; }
int INF = 9999999;
// BEGIN //////////////////////////////////////////////////////////////
int main() {
int N = nextInt();
REP(i, N) {
double x1 = nextDouble();
double y1 = nextDouble();
double x2 = nextDouble();
double y2 = nextDouble();
double x3 = nextDouble();
double y3 = nextDouble();
double x4 = nextDouble();
double y4 = nextDouble();
if (x1 > x2) {
double t = x2;
x2 = x1; x1 = t;
t = y2; y2 = y1; y1 = t;
}
if (x3 > x4) {
double t = x4;
x4 = x3; x3 = t;
t = y4; y4 = y3; y3 = t;
}
if (x2 - x1 == 0 && x4 - x3 == 0) {
if (y2 - y1 == 0 || y4 - y3 == 0) {
PRINT("NO");
} else {
print("YES");
}
} else if (x2 - x1 == 0 || x4 - x3 == 0) {
PRINT("NO");
} else {
if ((y2 - y1) / (x2 - x1) - (y4 - y3) / (x4 - x3) < 0.000006) {
PRINT("YES");
} else {
PRINT("NO");
}
}
}
return 0;
}
// END //////////////////////////////////////////////////////////////
|
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] - x[2];
v = y[3] - y[2];
if(s * v - t * u > 0){
int m = s * v - t * u;
}
else{
int m = t * u - s * v;
}
if( m < eps){
cout << "YES" << endl;
}
else{
cout << "NO" << endl;
}
return 0;
}
|
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] - x[2];
v = y[3] - y[2];
if(s * v - t * u > 0){
int m = s * v - t * u;
}
else{
int m = t * u - s * v;
}
if( m < eps){
cout << "YES" << endl;
}
else{
cout << "NO" << endl;
}
return 0;
}
|
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];
v = y[3] - y[2];
if(s * v - t * u > 0){
int m = s * v - t * u;
}
else{
int m = t * u - s * v;
}
if( m < eps){
cout << "YES" << endl;
}
else{
cout << "NO" << endl;
}
return 0;
}
|
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 >> x[i] >> y[i];
}
}
s = x[1] - x[0];
t = y[1] - y[0];
u = x[3] - x[2];
v = y[3] - y[2];
if(s * v - t * u > 0){
int m = s * v - t * u;
}
else{
int m = t * u - s * v;
}
if( m < eps){
cout << "YES" << endl;
}
else{
cout << "NO" << endl;
}
return 0;
}
|
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 >> x[i] >> y[i];
}
}
s = x[1] - x[0];
t = y[1] - y[0];
u = x[3] - x[2];
v = y[3] - y[2];
if(s * v - t * u > 0){
int m = s * v - t * u;
}
else{
int m = t * u - s * v;
}
if( m < EPS){
cout << "YES" << endl;
}
else{
cout << "NO" << endl;
}
return 0;
}
|
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 >> x[i] >> y[i];
}
}
s = x[1] - x[0];
t = y[1] - y[0];
u = x[3] - x[2];
v = y[3] - y[2];
if(s * v - t * u > 0){
double m = s * v - t * u;
}
else{
double m = t * u - s * v;
}
if( m < EPS){
cout << "YES" << endl;
}
else{
cout << "NO" << endl;
}
return 0;
}
|
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){
cin >> x[i] >> y[i];
}
}
s = x[1] - x[0];
t = y[1] - y[0];
u = x[3] - x[2];
v = y[3] - y[2];
if(s * v - t * u > 0){
double m = s * v - t * u;
}
else{
double m = t * u - s * v;
}
if( m < EPS){
cout << "YES" << endl;
}
else{
cout << "NO" << endl;
}
return 0;
}
|
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) {
for (int i = 0;i < 4;++i){
cin >> x[i] >> y[i];
}
}
s = x[1] - x[0];
t = y[1] - y[0];
u = x[3] - x[2];
v = y[3] - y[2];
if(s * v - t * u > 0){
double m = s * v - t * u;
}
else{
double m = t * u - s * v;
}
if( m < EPS){
// cout << "YES" << endl;
}
else{
// cout << "NO" << endl;
}
// return 0;
cout << "NO" << endl;
}
|
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) {
for (int i = 0;i < 4;++i){
cin >> x[i] >> y[i];
}
}
s = x[1] - x[0];
t = y[1] - y[0];
u = x[3] - x[2];
v = y[3] - y[2];
if(s * v - t * u > 0){
double m = s * v - t * u;
}
else{
double m = t * u - s * v;
}
if( m < EPS){
// cout << "YES" << endl;
}
// else{
// cout << "NO" << endl;
// }
// return 0;
cout << "NO" << endl;
}
|
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) {
for (int i = 0;i < 4;++i){
cin >> x[i] >> y[i];
}
}
s = x[1] - x[0];
t = y[1] - y[0];
u = x[3] - x[2];
v = y[3] - y[2];
if(s * v - t * u > 0){
double m = s * v - t * u;
}
else{
double m = t * u - s * v;
}
if( m < EPS){
// cout << "YES" << endl;
}
// else{
// cout << "NO" << endl;
// }
// return 0;
cout << "NO" << endl;
}
|
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) {
for (int i = 0;i < 4;++i){
cin >> x[i] >> y[i];
}
}
s = x[1] - x[0];
t = y[1] - y[0];
u = x[3] - x[2];
v = y[3] - y[2];
if(s * v - t * u > 0){
double m = s * v - t * u;
}
else{
double m = t * u - s * v;
}
if(m<e){
cout << "YES" << endl;
}
// else{
// cout << "NO" << endl;
// }
// return 0;
cout << "NO" << endl;
}
|
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)/(x3-x4)) ){
cout << "YES" << "\n" ;
}
else{
cout << "NO" << "\n" ;
}
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:16:17: error: expected primary-expression before 'if'
16 | if( ((y1-y2)/(x1-x2)) == ((y3-y4)/(x3-x4)) ){
| ^~
a.cc:15:20: error: expected ')' before 'if'
15 | if(
| ~^
| )
16 | if( ((y1-y2)/(x1-x2)) == ((y3-y4)/(x3-x4)) ){
| ~~
a.cc:22:9: error: expected primary-expression before '}' token
22 | }
| ^
|
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)/(x3-x4)) ){
cout << "YES" << "\n" ;
}
else{
cout << "NO" << "\n" ;
}
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:16:17: error: expected primary-expression before 'if'
16 | if( ((y1-y2)/(x1-x2)) == ((y3-y4)/(x3-x4)) ){
| ^~
a.cc:15:20: error: expected ')' before 'if'
15 | if(
| ~^
| )
16 | if( ((y1-y2)/(x1-x2)) == ((y3-y4)/(x3-x4)) ){
| ~~
a.cc:22:9: error: expected primary-expression before '}' token
22 | }
| ^
|
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<<endl
#define DEBUG_VEC(v) cout<<#v<<":";REP(i,v.size())cout<<" "<<v[i];cout<<endl
#define ALL(a) (a).begin(),(a).end()
#define MOD (ll)(1e9+7)
#define ADD(a,b) a=((a)+(b))%MOD
#define FIX(a) ((a)%MOD+MOD)%MOD
int main(){
double x1,y1,x2,y2,x3,y3,x4,y4;
while(~scanf("%lf%lf%lf%lf%lf%lf%lf%lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4){
P a(x2-x1,y2-y1);
P b(x4-x3,y4-y3);
double cr = imag(conj(a)*b);
if(abs(cr)<1e-9){
cout<<"YES"<<endl;
}else{
cout<<"NO"<<endl;
}
}
return 0;
}
|
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" << endl;
}else{
cout << "NO" << endl;
}
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:12:57: error: expected ')' before '{' token
12 | if((abs((y2-y1)*(x4-x3) - (x2-x1)*(y4-y3)) < 0.0001){
| ~ ^
| )
a.cc:18:3: error: expected primary-expression before '}' token
18 | }
| ^
|
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;
Point(double x = 0, double y = 0): x(x), y(y) {}
//???????????????????????????
Point operator + (Point p) {return Point(x + p.x, y + p.y);}
Point operator - (Point p) {return Point(x - p.x, y + p.y);}
Point operator * (double a) {return Point(a * x. a * y);}
Point operator / (double a) {return Point(x / a, y / a);}
double abs() {return sqrt(norm());}
double norm() {return x * x + y * y;}
bool operator < (const Point &p) const {
return x != p.x ? x < p.x: y < p.y;
}
bool operator == (const Point &p) const {
return fabs(x - p.x) < EPS && fabs(y - p.y) < EPS;
}
};
typedef Point Vector;
int main(void){
Vector a, b,c,d;
int n;
cin >> n;
for(int i = 0; i < n; i++){
cin >> a.x >> a.y >> b.x >> b.y;
cin >> c.x >> c.y >> d.x >> d.y;
//p????????????
Vector p = a - b;
//q????????????
Vector q = c - d;
//??????????????¨??£????????¨????????????????????§??????
if(1 == (p.x* q.x + p.y * q.y)) cout << "YES" << endl;
else cout << "NO" << endl;
}
return 0;
}
|
a.cc:7:14: error: exponent has no digits
7 | #define EPS (1e - 10)
| ^~
a.cc:34:32: note: in expansion of macro 'EPS'
34 | return fabs(x - p.x) < EPS && fabs(y - p.y) < EPS;
| ^~~
a.cc:7:14: error: exponent has no digits
7 | #define EPS (1e - 10)
| ^~
a.cc:34:55: note: in expansion of macro 'EPS'
34 | return fabs(x - p.x) < EPS && fabs(y - p.y) < EPS;
| ^~~
a.cc: In member function 'Point Point::operator*(double)':
a.cc:23:54: error: request for member 'a' in '((Point*)this)->Point::x', which is of non-class type 'double'
23 | Point operator * (double a) {return Point(a * x. a * y);}
| ^
|
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); Y2.push_back(y4 - y3);
}
for (int i = 0; i < n; i++) {
if (fabs(X1[i]*Y2[i]-X2[i]*Y1[i]<1e-10))cout << "YES" << endl;
else cout << "NO" << endl;
}
return 0;
}
|
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); Y2.push_back(y4 - y3);
}
for (int i = 0; i < n; i++) {
double det = fabs(X1[i] * Y2[i] - X2[i] * Y1[i]);
if (fabs(det)<1e-10)cout << "YES" << endl;
else cout << "NO" << endl;
}
return 0;
}
|
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); Y2.push_back(y4 - y3);
}
for (int i = 0; i < n; i++) {
double det = fabs(X1[i] * Y2[i] - X2[i] * Y1[i]);
if (fabs(det)<1e-10)cout << "YES" << endl;
else cout << "NO" << endl;
}
return 0;
}
|
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>>x1>>y1;
b=(y1-y)/(x1-x);
if(a==b)
puts("YES");
else
puts("NO");
}
}
|
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>>x1>>y1;
b=(y1-y)/(x1-x);
if(a==b)
puts("YES");
else
puts("NO");
}
}
|
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=(y1-y)/(x1-x);
else
a=1000;
cin>>x>>y>>x1>>y1;
if(x1-x!=0)
b=(y1-y)/(x1-x);
else
b=1000;
if(a==b)
puts("YES");
else
puts("NO");
}
}
|
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=(y1-y)/(x1-x);
else
a=100;
cin>>x>>y>>x1>>y1;
if(x1-x!=0)
b=(y1-y)/(x1-x);
else
b=100;
if(a==b)
puts("YES");
else
puts("NO");
}
}
|
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=in.nextDouble();
y3=in.nextDouble();
y4=in.nextDouble();
if(Math.abs((x1-x2)*(y3-y4)-(y1-y2)*(x3-x4))<0.000000000001)
System.out.println("YES");
else
System.out.println("NO");
}
in.close();
}
}
|
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 ) ) * com( x4 - x3, y4 - y3 ) ).imag() < 1e-10 )
cout << "YES" << endl;
else
cout << "NO" << endl;
}
|
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*vy2==vy1*vx2);
}
|
a.cc: In function 'int main()':
a.cc:7:24: error: 'solve' was not declared in this scope
7 | cout<< solve()?"YES":"NO" << endl;
| ^~~~~
a.cc:7:43: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<'
7 | cout<< solve()?"YES":"NO" << endl;
| ~~~~~^~~~~~~
|
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:vy2
return (vx1*vy2==vy1*vx2);
}
|
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) {
puts("YES");
} else {
puts("NO");
}
}
return 0;
}
|
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;
typedef pair<int,int> P;
typedef pair<double,double> pdd;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<char> vc;
typedef vector<vc> vvc;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef vector<P> vp;
typedef vector<vp> vvp;
typedef pair<int,P> pip;
typedef vector<pip> vip;
const int inf=1<<25;
const double pi=acos(-1);
const double eps=1e-6;
const vi emp;
double add_double(double a,double b){
if(abs(a+b)<eps*(abs(a)+abs(b))) return 0;
return a+b;
}
struct point{
double x,y;
point operator+(point p){
return point{add_double(x,p.x),add_double(y,p.y)};
}
point operator-(point p){
return point{add_double(x,-p.x),add_double(y,-p.y)};
}
point operator*(double p){
return point{x*p,y*p};
}
point operator/(double p){
if(!p) return point{0,0};
return point{x/p,y/p};
}
bool operator==(point p){
return fabs(add_double(x,-p.x))<eps&&fabs(add_double(y,-p.y))<eps;
}
bool operator<(point p){
if(fabs(x-p.x)>eps) return x<p.x;
return y<p.y;
}
};
typedef pair<point,point> pp;
typedef vector<point> VP;
const point O{0,0};
class Geom{
public:
double Length(point x,point y){
point z=y-x;
return sqrt(z.x*z.x+z.y*z.y);
}
double IP(point p,point q){
return p.x*q.x+p.y*q.y;
}
double CP(point p,point q){
return p.x*q.y-q.x*p.y;
}
string Counter_Clockwise(pp a,point x){
point A=a.second-a.first;
point X=x-a.first;
double ip=IP(A,X),cp=CP(A,X),Al=Length(O,A),Xl=Length(O,X);
if(cp>eps) return "Counter_Clockwise";
if(cp<-eps) return "Clockwise";
if(ip<-eps) return "Online_Back";
if(Xl<Al||fabs(Xl-Al)<eps) return "On_Segment";
return "Online_Front";
}
string Parallel_Orthogonal(pp a,pp b){
point A=a.second-a.first,B=b.second-b.first;
double ip=IP(A,B),cp=CP(A,B);
string f=Counter_Clockwise(pp(a.first,a.second),b.first),s=Counter_Clockwise(pp(a.first,a.second),b.second);
if(f[0]!='C'&&s[0]!='C') return "Agreement";
if(cp<eps&&cp>-eps) return "Parallel";
if(ip<eps&&ip>-eps) return "Orthogonal";
else return "Commonly";
}
void Point_in(point& p){
cin>>p.x>>p.y;
}
};
int n;
VP p(4);
string s;
int main(){
Geom geo;
cin>>n];
for(int i=0;i<n;i++){
for(VP::iterator i=p.begin();i!=p.end();i++) geo.Point_in(*i);
s=geo.Parallel_Orthogonal(pp(p[0],p[1]),pp(p[2],p[3]));
if(s[0]=='P'||s[0]=='A') cout<<"YES"<<endl;
else cout<<"NO"<<endl;
}
}
|
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])/([7]-c[5])==(c[2]-c[0])/(c[3]-c[1]))printf("YES\n");
| ^
a.cc: In function 'int main()':
a.cc:11:29: error: no match for 'operator-' (operand types are 'main()::<lambda()>' and 'double')
11 | else if((c[6]-c[4])/([7]-c[5])==(c[2]-c[0])/(c[3]-c[1]))printf("YES\n");
| ~~~^~~~~
| | |
| | double
| main()::<lambda()>
In file included from /usr/include/c++/14/bits/stl_algobase.h:67,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/include/c++/14/bits/stl_iterator.h:618:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
618 | operator-(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:618:5: note: template argument deduction/substitution failed:
a.cc:11:33: note: 'main()::<lambda()>' is not derived from 'const std::reverse_iterator<_Iterator>'
11 | else if((c[6]-c[4])/([7]-c[5])==(c[2]-c[0])/(c[3]-c[1]))printf("YES\n");
| ^
/usr/include/c++/14/bits/stl_iterator.h:1790:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__x.base() - __y.base())) std::operator-(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1790 | operator-(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1790:5: note: template argument deduction/substitution failed:
a.cc:11:33: note: 'main()::<lambda()>' is not derived from 'const std::move_iterator<_IteratorL>'
11 | else if((c[6]-c[4])/([7]-c[5])==(c[2]-c[0])/(c[3]-c[1]))printf("YES\n");
| ^
In file included from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/complex:370:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator-(const complex<_Tp>&, const complex<_Tp>&)'
370 | operator-(const complex<_Tp>& __x, const complex<_Tp>& __y)
| ^~~~~~~~
/usr/include/c++/14/complex:370:5: note: template argument deduction/substitution failed:
a.cc:11:33: note: 'main()::<lambda()>' is not derived from 'const std::complex<_Tp>'
11 | else if((c[6]-c[4])/([7]-c[5])==(c[2]-c[0])/(c[3]-c[1]))printf("YES\n");
| ^
/usr/include/c++/14/complex:379:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator-(const complex<_Tp>&, const _Tp&)'
379 | operator-(const complex<_Tp>& __x, const _Tp& __y)
| ^~~~~~~~
/usr/include/c++/14/complex:379:5: note: template argument deduction/substitution failed:
a.cc:11:33: note: 'main()::<lambda()>' is not derived from 'const std::complex<_Tp>'
11 | else if((c[6]-c[4])/([7]-c[5])==(c[2]-c[0])/(c[3]-c[1]))printf("YES\n");
| ^
/usr/include/c++/14/complex:388:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator-(const _Tp&, const complex<_Tp>&)'
388 | operator-(const _Tp& __x, const complex<_Tp>& __y)
| ^~~~~~~~
/usr/include/c++/14/complex:388:5: note: template argument deduction/substitution failed:
a.cc:11:33: note: mismatched types 'const std::complex<_Tp>' and 'double'
11 | else if((c[6]-c[4])/([7]-c[5])==(c[2]-c[0])/(c[3]-c[1]))printf("YES\n");
| ^
/usr/include/c++/14/complex:465:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator-(const complex<_Tp>&)'
465 | operator-(const complex<_Tp>& __x)
| ^~~~~~~~
/usr/include/c++/14/complex:465:5: note: candidate expects 1 argument, 2 provided
In file included from /usr/include/c++/14/valarray:605,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166:
/usr/include/c++/14/bits/valarray_after.h:406:5: note: candidate: 'template<class _Dom1, class _Dom2> std::_Expr<std::__detail::_BinClos<std::__minus, std::_Expr, std::_Expr, _Dom1, _Dom2>, typename std::__fun<std::__minus, typename _Dom1::value_type>::result_type> std::operator-(const _Expr<_Dom1, typename _Dom1::value_type>&, const _Expr<_Dom2, typename _Dom2::value_type>&)'
406 | _DEFINE_EXPR_BINARY_OPERATOR(-, struct std::__minus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:406:5: note: template argument deduction/substitution failed:
a.cc:11:33: note: 'main()::<lambda()>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
11 | else if((c[6]-c[4])/([7]-c[5])==(c[2]-c[0])/(c[3]-c[1]))printf("YES\n");
| ^
/usr/include/c++/14/bits/valarray_after.h:406:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__minus, std::_Expr, std::_Constant, _Dom, typename _Dom::value_type>, typename std::__fun<std::__minus, typename _Dom1::value_type>::result_type> std::operator-(const _Expr<_Dom1, typename _Dom1::value_type>&, const typename _Dom::value_type&)'
406 | _DEFINE_EXPR_BINARY_OPERATOR(-, struct std::__minus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:406:5: note: template argument deduction/substitution failed:
a.cc:11:33: note: 'main()::<lambda()>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
11 | else if((c[6]-c[4])/([7]-c[5])==(c[2]-c[0])/(c[3]-c[1]))printf("YES\n");
| ^
/usr/include/c++/14/bits/valarray_after.h:406:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__minus, std::_Constant, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__minus, typename _Dom1::value_type>::result_type> std::operator-(const typename _Dom::value_type&, const _Expr<_Dom1, typename _Dom1::value_type>&)'
406 | _DEFINE_EXPR_BINARY_OPERATOR(-, struct std::__minus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:406:5: note: template argument deduction/substitution failed:
a.cc:11:33: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'double'
11 | else if((c[6]-c[4])/([7]-c[5])==(c[2]-c[0])/(c[3]-c[1]))printf("YES\n");
| ^
/usr/include/c++/14/bits/valarray_after.h:406:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__minus, std::_Expr, std::_ValArray, _Dom, typename _Dom::value_type>, typename std::__fun<std::__minus, typename _Dom1::value_type>::result_type> std::operator-(const _Expr<_Dom1, typename _Dom1::value_type>&, const valarray<typename _Dom::value_type>&)'
406 | _DEFINE_EXPR_BINARY_OPERATOR(-, struct std::__minus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:406:5: note: template argument deduction/substitution failed:
a.cc:11:33: note: 'main()::<lambda()>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
11 | else if((c[6]-c[4])/([7]-c[5])==(c[2]-c[0])/(c[3]-c[1]))printf("YES\n");
| ^
/usr/include/c++/14/bits/valarray_after.h:406:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__minus, std::_ValArray, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__minus, typename _Dom1::value_type>::result_type> std::operator-(const valarray<typename _Dom::value_type>&, const _Expr<_Dom1, typename _Dom1::value_type>&)'
406 | _DEFINE_EXPR_BINARY_OPERATOR(-, struct std::__minus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:406:5: note: template argument deduction/substitution failed:
a.cc:11:33: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'double'
11 | else if((c[6]-c[4])/([7]-c[5])==(c[2]-c[0])/(c[3]-c[1]))printf("YES\n");
| ^
/usr/include/c++/14/valarray:1197:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__minus, std::_ValArray, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__minus, _Tp>::result_type> std::operator-(const valarray<_Tp>&, const valarray<_Tp>&)'
1197 | _DEFINE_BINARY_OPERATOR(-, __minus)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1197:1: note: template argument deduction/substitution failed:
a.cc:11:33: note: 'main()::<lambda()>' is not derived from 'const std::valarray<_Tp>'
11 | else if((c[6]-c[4])/([7]-c[5])==(c[2]-c[0])/(c[3]-c[1]))printf("YES\n");
| ^
/usr/include/c++/14/valarray:1197:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__minus, std::_ValArray, std::_Constant, _Tp, _Tp>, typename std::__fun<std::__minus, _Tp>::result_type> std::operator-(const valarray<_Tp>&, const typename valarray<_Tp>::value_type&)'
1197 | _DEFINE_BINARY_OPERATOR(-, __minus)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1197:1: note: template argument deduction/substitution failed:
a.cc:11:33: note: 'main()::<lambda()>' is not derived from 'const std::valarray<_Tp>'
11 | else if((c[6]-c[4])/([7]-c[5])==(c[2]-c[0])/(c[3]-c[1]))printf("YES\n");
| ^
/usr/include/c++/14/valarray:1197:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__minus, std::_Constant, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__minus, _Tp>::result_type> std::operator-(const ty
|
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 << "NO" << endl;
}
else {
a = (x3 - x4)*(y1 - y2);
b = (x1 - x2)*(y3 - y4);
if (a == b) {
cout << "YES" << endl;
}
else if (a != b) {
cout << "NO" << endl;
}
}
}
return 0;
}
|
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 namespace std;
a.cc:10:25: error: 'cout' was not declared in this scope
10 | cout << "YES" << endl;
| ^~~~
a.cc:10:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:10:42: error: 'endl' was not declared in this scope
10 | cout << "YES" << endl;
| ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
1 | #include<algorithm>
+++ |+#include <ostream>
2 | using namespace std;
a.cc:13:25: error: 'cout' was not declared in this scope
13 | cout << "NO" << endl;
| ^~~~
a.cc:13:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:13:41: error: 'endl' was not declared in this scope
13 | cout << "NO" << endl;
| ^~~~
a.cc:13:41: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:19:33: error: 'cout' was not declared in this scope
19 | cout << "YES" << endl;
| ^~~~
a.cc:19:33: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:19:50: error: 'endl' was not declared in this scope
19 | cout << "YES" << endl;
| ^~~~
a.cc:19:50: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:22:33: error: 'cout' was not declared in this scope
22 | cout << "NO" << endl;
| ^~~~
a.cc:22:33: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:22:49: error: 'endl' was not declared in this scope
22 | cout << "NO" << endl;
| ^~~~
a.cc:22:49: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
|
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(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;
}
}
}
|
a.cc: In function 'int main()':
a.cc:9:17: error: 'long' specified with 'float'
9 | long float x1, x2, x3,y1, y2, y3, y4, x4 ;
| ^~~~
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
|
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(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;
}
}
}
|
a.cc: In function 'int main()':
a.cc:9:17: error: 'long' specified with 'float'
9 | long float x1, x2, x3,y1, y2, y3, y4, x4 ;
| ^~~~
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
|
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(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;
}
}
}
|
a.cc: In function 'int main()':
a.cc:9:17: error: 'long' specified with 'float'
9 | long float x1, x2, x3,y1, y2, y3, y4, x4 ;
| ^~~~
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
|
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(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;
}
}
}
|
a.cc: In function 'int main()':
a.cc:9:17: error: 'long' specified with 'float'
9 | long float x1, x2, x3,y1, y2, y3, y4, x4 ;
| ^~~~
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
|
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(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;
}
}
}
|
a.cc: In function 'int main()':
a.cc:9:17: error: 'long' specified with 'float'
9 | long float x1, x2, x3,y1, y2, y3, y4, x4 ;
| ^~~~
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
|
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(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;
}
}
}
|
a.cc: In function 'int main()':
a.cc:9:17: error: 'long' specified with 'float'
9 | long float x1, x2, x3,y1, y2, y3, y4, x4 ;
| ^~~~
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
|
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(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;
}
}
}
|
a.cc: In function 'int main()':
a.cc:9:17: error: 'long' specified with 'float'
9 | long float x1, x2, x3,y1, y2, y3, y4, x4 ;
| ^~~~
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
|
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(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;
}
}
}
|
a.cc: In function 'int main()':
a.cc:9:17: error: 'long' specified with 'float'
9 | long float x1, x2, x3,y1, y2, y3, y4, x4 ;
| ^~~~
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
|
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(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;
}
}
}
|
a.cc: In function 'int main()':
a.cc:9:17: error: 'long' specified with 'float'
9 | long float x1, x2, x3,y1, y2, y3, y4, x4 ;
| ^~~~
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
|
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(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;
}
}
}
|
a.cc: In function 'int main()':
a.cc:9:17: error: 'long' specified with 'float'
9 | long float x1, x2, x3,y1, y2, y3, y4, x4 ;
| ^~~~
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
|
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(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;
}
}
}
|
a.cc: In function 'int main()':
a.cc:9:17: error: 'long' specified with 'float'
9 | long float x1, x2, x3,y1, y2, y3, y4, x4 ;
| ^~~~
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
|
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(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;
}
}
}
|
a.cc: In function 'int main()':
a.cc:9:17: error: 'long' specified with 'float'
9 | long float x1, x2, x3,y1, y2, y3, y4, x4 ;
| ^~~~
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
|
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(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;
}
}
}
|
a.cc: In function 'int main()':
a.cc:9:17: error: 'long' specified with 'float'
9 | long float x1, x2, x3,y1, y2, y3, y4, x4 ;
| ^~~~
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
|
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(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;
}
}
}
|
a.cc: In function 'int main()':
a.cc:9:17: error: 'long' specified with 'float'
9 | long float x1, x2, x3,y1, y2, y3, y4, x4 ;
| ^~~~
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
|
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(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;
}
}
}
|
a.cc: In function 'int main()':
a.cc:9:17: error: 'long' specified with 'float'
9 | long float x1, x2, x3,y1, y2, y3, y4, x4 ;
| ^~~~
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
|
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(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;
}
}
}
|
a.cc: In function 'int main()':
a.cc:9:17: error: 'long' specified with 'float'
9 | long float x1, x2, x3,y1, y2, y3, y4, x4 ;
| ^~~~
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
|
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(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;
}
}
}
|
a.cc: In function 'int main()':
a.cc:9:17: error: 'long' specified with 'float'
9 | long float x1, x2, x3,y1, y2, y3, y4, x4 ;
| ^~~~
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
|
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(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;
}
}
}
|
a.cc: In function 'int main()':
a.cc:9:17: error: 'long' specified with 'float'
9 | long float x1, x2, x3,y1, y2, y3, y4, x4 ;
| ^~~~
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
|
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(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;
}
}
}
|
a.cc: In function 'int main()':
a.cc:9:17: error: 'long' specified with 'float'
9 | long float x1, x2, x3,y1, y2, y3, y4, x4 ;
| ^~~~
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
|
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(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;
}
}
}
|
a.cc: In function 'int main()':
a.cc:9:17: error: 'long' specified with 'float'
9 | long float x1, x2, x3,y1, y2, y3, y4, x4 ;
| ^~~~
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
a.cc:9:17: error: 'long' specified with 'float'
|
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, 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;
}
}
}
|
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'
|
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, 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;
}
}
}
|
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'
|
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, 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;
}
}
|
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'
|
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, 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;
}
}
|
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'
|
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 ((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;
}
}
|
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'
|
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 ((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;
}
}
|
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'
|
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"
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
|
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 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;
}
}
|
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 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
int main(){
typedef pair<double, double>pdd;
vector<pdd>v(5);
int n;cin>>n;
rep(i,n){
rep(i,4)cin>>v[i].first>>v[i].second;
if(v[0].first<v[1].first)swap(v[0],v[1]);
if(v[2].first<v[3].first)swap(v[2],v[3]);
double d1=(v[0].second-v[1].second)/(v[0].first-v[1].first);
double d2=(v[2].second-v[3].second)/(v[2].first-v[3].first);
if(d1==d2&&(v[0].first-v[1].first!=0))cout<<"YES"<<endl;
else cout<<"NO"<<endl;
}
}
|
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,
from a.cc:2:
/usr/include/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a type
68 | typedef ptrdiff_t streamsize; // Signed integral type
| ^~~~~~~~~
/usr/include/c++/14/bits/postypes.h:41:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
40 | #include <cwchar> // For mbstate_t
+++ |+#include <cstddef>
41 |
In file included from /usr/include/c++/14/bits/char_traits.h:50:
/usr/include/c++/14/type_traits:666:33: error: 'nullptr_t' is not a member of 'std'
666 | struct is_null_pointer<std::nullptr_t>
| ^~~~~~~~~
/usr/include/c++/14/type_traits:666:42: error: template argument 1 is invalid
666 | struct is_null_pointer<std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:670:48: error: template argument 1 is invalid
670 | struct is_null_pointer<const std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:674:51: error: template argument 1 is invalid
674 | struct is_null_pointer<volatile std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:678:57: error: template argument 1 is invalid
678 | struct is_null_pointer<const volatile std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:1429:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1429 | : public integral_constant<std::size_t, alignof(_Tp)>
| ^~~~~~
In file included from /usr/include/wchar.h:35,
from /usr/include/c++/14/cwchar:44,
from /usr/include/c++/14/bits/postypes.h:40:
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/type_traits:1429:57: error: template argument 1 is invalid
1429 | : public integral_constant<std::size_t, alignof(_Tp)>
| ^
/usr/include/c++/14/type_traits:1429:57: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1438:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1438 | : public integral_constant<std::size_t, 0> { };
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/type_traits:1438:46: error: template argument 1 is invalid
1438 | : public integral_constant<std::size_t, 0> { };
| ^
/usr/include/c++/14/type_traits:1438:46: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1440:26: error: 'std::size_t' has not been declared
1440 | template<typename _Tp, std::size_t _Size>
| ^~~
/usr/include/c++/14/type_traits:1441:21: error: '_Size' was not declared in this scope
1441 | struct rank<_Tp[_Size]>
| ^~~~~
/usr/include/c++/14/type_traits:1441:27: error: template argument 1 is invalid
1441 | struct rank<_Tp[_Size]>
| ^
/usr/include/c++/14/type_traits:1442:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/type_traits:1442:65: error: template argument 1 is invalid
1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^
/usr/include/c++/14/type_traits:1442:65: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1446:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/type_traits:1446:65: error: template argument 1 is invalid
1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^
/usr/include/c++/14/type_traits:1446:65: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:2086:26: error: 'std::size_t' has not been declared
2086 | template<typename _Tp, std::size_t _Size>
| ^~~
/usr/include/c++/14/type_traits:2087:30: error: '_Size' was not declared in this scope
2087 | struct remove_extent<_Tp[_Size]>
| ^~~~~
/usr/include/c++/14/type_traits:2087:36: error: template argument 1 is invalid
2087 | struct remove_extent<_Tp[_Size]>
| ^
/usr/include/c++/14/type_traits:2099:26: error: 'std::size_t' has not been declared
2099 | template<typename _Tp, std::size_t _Size>
| ^~~
/usr/include/c++/14/type_traits:2100:35: error: '_Size' was not declared in this scope
2100 | struct remove_all_extents<_Tp[_Size]>
| ^~~~~
/usr/include/c++/14/type_traits:2100:41: error: template argument 1 is invalid
2100 | struct remove_all_extents<_Tp[_Size]>
| ^
/usr/include/c++/14/type_traits:2171:12: error: 'std::size_t' has not been declared
2171 | template<std::size_t _Len>
| ^~~
/usr/include/c++/14/type_traits:2176:30: error: '_Len' was not declared in this scope
2176 | unsigned char __data[_Len];
| ^~~~
/usr/include/c++/14/type_traits:2194:12: error: 'std::size_t' has not been declared
2194 | template<std::size_t _Len, std::size_t _Align =
| ^~~
/usr/include/c++/14/type_traits:2194:30: error: 'std::size_t' has not been declared
2194 | template<std::size_t _Len, std::size_t _Align =
| ^~~
/usr/include/c++/14/type_traits:2195:55: error: '_Len' was not declared in this scope
2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)>
| ^~~~
/usr/include/c++/14/type_traits:2195:59: error: template argument 1 is invalid
2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)>
| ^
/usr/include/c++/14/type_traits:2202:30: error: '_Len' was not declared in this scope
2202 | unsigned char __data[_Len];
| ^~~~
/usr/include/c++/14/type_traits:2203:44: error: '_Align' was not declared in this scope
2203 | struct __attribute__((__aligned__((_Align)))) { } __align;
| ^~~~~~
/usr/include/c++/14/bits/char_traits.h:144:61: error: 'std::size_t' has not been declared
144 | compare(const char_type* __s1, const char_type* __s2, std::size_t __n);
| ^~~
/usr/include/c++/14/bits/char_traits.h:146:40: error: 'size_t' in namespace 'std' does not name a type
146 | static _GLIBCXX14_CONSTEXPR std::size_t
| ^~~~~~
/usr/include/c++/14/bits/char_traits.h:150:34: error: 'std::size_t' has not been declared
150 | find(const char_type* __s, std::size_t __n, const char_type& __a);
| ^~~
/usr/include/c++/14/bits/char_traits.h:153:52: error: 'std::size_t' has not been declared
153 | move(char_type* __s1, const char_type* __s2, std::size_t __n);
| ^~~
/usr/include/c++/14/bits/char_traits.h:156:52: error: 'std::size_t' has not been declared
156 | copy(char_type* __s1, const char_type* __s2, std::size_t __n);
| ^~~
/usr/include/c++/14/bits/char_traits.h:159:30: error: 'std::size_t' has not been declared
159 | assign(char_type* __s, std::size_t __n, char_type __a);
| ^~~
/usr/include/c++/14/bits/char_traits.h:187:59: error: 'std::size_t' has not been declared
187 | compare(const char_type* __s1, const char_type* __s2, std::size_t __n)
| ^~~
/usr/include/c++/14/bits/char_traits.h: In static member function 'static constexpr int __gnu_cxx::char_traits<_CharT>::compare(const char_type*, const char_type*, int)':
/usr/include/c++/14/bits/char_traits.h:189:17: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
189 | for (std::size_t __i = 0; __i < __n; ++__i)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/bits/char_traits.h:189:33: error: '__i' was not declared in this scope; did you mean '__n'?
189 | for (std::size_t __i = 0; __i < __n; ++__i)
| ^~~
| __n
/usr/include/c++/14/bits/char_traits.h: At global scope:
/usr/include/c++/14/bits/char_traits.h:198:31: error: 'size_t' in na
|
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 return x;
}
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 k1=(y2-y1)/(x2-x1);
double k2=(y4-y3)/(x4-x3);
double judge=(x2-x1)*(y4-y3)-(y2-y1)*(x4-x3);
if((abs(judge)<0.000000000001) cout<<"YES"<<endl;
else cout<<"NO"<<endl;
}
//while(1);
return 0;
}
|
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_string.h:4154,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:2:
/usr/include/c++/14/bits/std_abs.h:71:3: note: previous declaration 'constexpr double std::abs(double)'
71 | abs(double __x)
| ^~~
a.cc: In function 'int main()':
a.cc:36:15: error: call of overloaded 'abs(double&)' is ambiguous
36 | if((abs(judge)<0.000000000001) cout<<"YES"<<endl;
| ~~~^~~~~~~
In file included from /usr/include/c++/14/cstdlib:79:
/usr/include/stdlib.h:980:12: note: candidate: 'int abs(int)'
980 | extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
| ^~~
/usr/include/c++/14/bits/std_abs.h:137:3: note: candidate: 'constexpr __float128 std::abs(__float128)'
137 | abs(__float128 __x)
| ^~~
/usr/include/c++/14/bits/std_abs.h:85:3: note: candidate: 'constexpr __int128 std::abs(__int128)'
85 | abs(__GLIBCXX_TYPE_INT_N_0 __x) { return __x >= 0 ? __x : -__x; }
| ^~~
/usr/include/c++/14/bits/std_abs.h:79:3: note: candidate: 'constexpr long double std::abs(long double)'
79 | abs(long double __x)
| ^~~
/usr/include/c++/14/bits/std_abs.h:75:3: note: candidate: 'constexpr float std::abs(float)'
75 | abs(float __x)
| ^~~
/usr/include/c++/14/bits/std_abs.h:71:3: note: candidate: 'constexpr double std::abs(double)'
71 | abs(double __x)
| ^~~
/usr/include/c++/14/bits/std_abs.h:61:3: note: candidate: 'long long int std::abs(long long int)'
61 | abs(long long __x) { return __builtin_llabs (__x); }
| ^~~
/usr/include/c++/14/bits/std_abs.h:56:3: note: candidate: 'long int std::abs(long int)'
56 | abs(long __i) { return __builtin_labs(__i); }
| ^~~
a.cc:18:9: note: candidate: 'double abs(double)'
18 | double abs(double x)
| ^~~
a.cc:37:8: error: expected primary-expression before 'else'
37 | else cout<<"NO"<<endl;
| ^~~~
a.cc:36:57: error: expected ')' before 'else'
36 | if((abs(judge)<0.000000000001) cout<<"YES"<<endl;
| ~ ^
| )
37 | else cout<<"NO"<<endl;
| ~~~~
|
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):
????????????print("YES")
else:
print("NO")
|
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 = 0; l<N; l++) {
facetstr=Console.ReadLine().Split();
for (i = 0; i<8; i++)
facets[i]=double.Parse(facetstr[i]);
for (i = 0; i<2; i++) {
VAB[i]=facets[i+2]-facets[i];
VCD[i]=facets[i+6]-facets[i+4];
}
result[l]= VAB[0]*VCD[1]-VAB[1]*VCD[0]==0.0;
}
for (int l = 0; l<N; l++) Console.WriteLine(result[l] ? "YES" : "NO");
}
}
|
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 | }
| ^
| ;
a.cc: In static member function 'static void AIDU0021::Main()':
a.cc:5:19: error: structured binding declaration cannot have type 'double'
5 | double[] facets = new double[8], VAB = new double[2],VCD = new double[2];
| ^~
a.cc:5:19: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:5:19: error: empty structured binding declaration
a.cc:5:22: error: expected initializer before 'facets'
5 | double[] facets = new double[8], VAB = new double[2],VCD = new double[2];
| ^~~~~~
a.cc:6:13: error: 'string' was not declared in this scope
6 | string[] facetstr = new string[8];
| ^~~~~~
a.cc:6:20: error: expected primary-expression before ']' token
6 | string[] facetstr = new string[8];
| ^
a.cc:7:19: error: expected primary-expression before 'int'
7 | int N=int.Parse(Console.ReadLine()),i=0;
| ^~~
a.cc:8:17: error: structured binding declaration cannot have type 'bool'
8 | bool[] result=new bool[N];
| ^~
a.cc:8:17: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:8:17: error: empty structured binding declaration
a.cc:8:20: error: expected initializer before 'result'
8 | bool[] result=new bool[N];
| ^~~~~~
a.cc:10:17: error: 'facetstr' was not declared in this scope
10 | facetstr=Console.ReadLine().Split();
| ^~~~~~~~
a.cc:10:26: error: 'Console' was not declared in this scope
10 | facetstr=Console.ReadLine().Split();
| ^~~~~~~
a.cc:11:22: error: 'i' was not declared in this scope
11 | for (i = 0; i<8; i++)
| ^
a.cc:12:21: error: 'facets' was not declared in this scope
12 | facets[i]=double.Parse(facetstr[i]);
| ^~~~~~
a.cc:12:31: error: expected primary-expression before 'double'
12 | facets[i]=double.Parse(facetstr[i]);
| ^~~~~~
a.cc:13:22: error: 'i' was not declared in this scope
13 | for (i = 0; i<2; i++) {
| ^
a.cc:14:21: error: 'VAB' was not declared in this scope
14 | VAB[i]=facets[i+2]-facets[i];
| ^~~
a.cc:14:28: error: 'facets' was not declared in this scope
14 | VAB[i]=facets[i+2]-facets[i];
| ^~~~~~
a.cc:15:21: error: 'VCD' was not declared in this scope
15 | VCD[i]=facets[i+6]-facets[i+4];
| ^~~
a.cc:17:17: error: 'result' was not declared in this scope
17 | result[l]= VAB[0]*VCD[1]-VAB[1]*VCD[0]==0.0;
| ^~~~~~
a.cc:17:28: error: 'VAB' was not declared in this scope
17 | result[l]= VAB[0]*VCD[1]-VAB[1]*VCD[0]==0.0;
| ^~~
a.cc:17:35: error: 'VCD' was not declared in this scope
17 | result[l]= VAB[0]*VCD[1]-VAB[1]*VCD[0]==0.0;
| ^~~
a.cc:19:39: error: 'Console' was not declared in this scope
19 | for (int l = 0; l<N; l++) Console.WriteLine(result[l] ? "YES" : "NO");
| ^~~~~~~
a.cc:19:57: error: 'result' was not declared in this scope
19 | for (int l = 0; l<N; l++) Console.WriteLine(result[l] ? "YES" : "NO");
| ^~~~~~
|
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()
{
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;
}
|
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>
|
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()
{
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;
}
|
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"<<endl;
}else{
cout<<"NO"<<endl;
}
}
return 0;
}
|
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 << "NO" << endl;
}
return 0;
}
|
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;
| ^~~~
|
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[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;
}
|
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;
}
}
return 0;
}
|
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 | }
| ^
|
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;
}
}
return 0;
}
|
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 | }
| ^
|
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){
std::cout << "YES" << std::endl;
}else{
std::cout << "NO" << std::endl;
}
}
}
|
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_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;
}
|
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_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;
}
|
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;
}
return 0;
}
|
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) scanf("%lf", &a[i]);
| ^
|
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)
scanf("%lf %lf", x+j, y+j);
double dx1 = x[1] - x[0];
double dy1 = y[1] - y[0];
double dx2 = x[3] - x[2];
double dy2 = y[3] - y[2];
if (dy1/dx1 == dy2/dx2)
puts("YES");
else
puts("NO");
}
return 0;
}
|
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 an identifier
15 | int n;
| ^
a.cc:15:1: error: extended character is not valid in an identifier
a.cc:15:1: error: extended character is not valid in an identifier
a.cc:15:1: error: extended character is not valid in an identifier
a.cc:16:1: error: extended character is not valid in an identifier
16 | scanf("%d", &n);
| ^
a.cc:16:1: error: extended character is not valid in an identifier
a.cc:16:1: error: extended character is not valid in an identifier
a.cc:16:1: error: extended character is not valid in an identifier
a.cc:17:1: error: extended character is not valid in an identifier
17 | for (int i = 0; i < n; ++i)
| ^
a.cc:17:1: error: extended character is not valid in an identifier
a.cc:17:1: error: extended character is not valid in an identifier
a.cc:17:1: error: extended character is not valid in an identifier
a.cc:18:1: error: extended character is not valid in an identifier
18 | {
| ^
a.cc:18:1: error: extended character is not valid in an identifier
a.cc:18:1: error: extended character is not valid in an identifier
a.cc:18:1: error: extended character is not valid in an identifier
a.cc:19:1: error: extended character is not valid in an identifier
19 | double x[4], y[4];
| ^
a.cc:19:1: error: extended character is not valid in an identifier
a.cc:19:1: error: extended character is not valid in an identifier
a.cc:19:1: error: extended character is not valid in an identifier
a.cc:19:1: error: extended character is not valid in an identifier
a.cc:19:1: error: extended character is not valid in an identifier
a.cc:19:1: error: extended character is not valid in an identifier
a.cc:19:1: error: extended character is not valid in an identifier
a.cc:20:1: error: extended character is not valid in an identifier
20 | for (int j = 0; j < 4; ++j)
| ^
a.cc:20:1: error: extended character is not valid in an identifier
a.cc:20:1: error: extended character is not valid in an identifier
a.cc:20:1: error: extended character is not valid in an identifier
a.cc:20:1: error: extended character is not valid in an identifier
a.cc:20:1: error: extended character is not valid in an identifier
a.cc:20:1: error: extended character is not valid in an identifier
a.cc:20:1: error: extended character is not valid in an identifier
a.cc:21:1: error: extended character is not valid in an identifier
21 | scanf("%lf %lf", x+j, y+j);
| ^
a.cc:21:1: error: extended character is not valid in an identifier
a.cc:21:1: error: extended character is not valid in an identifier
a.cc:21:1: error: extended character is not valid in an identifier
a.cc:21:1: error: extended character is not valid in an identifier
a.cc:21:1: error: extended character is not valid in an identifier
a.cc:21:1: error: extended character is not valid in an identifier
a.cc:21:1: error: extended character is not valid in an identifier
a.cc:21:1: error: extended character is not valid in an identifier
a.cc:21:1: error: extended character is not valid in an identifier
a.cc:21:1: error: extended character is not valid in an identifier
a.cc:21:1: error: extended character is not valid in an identifier
a.cc:22:1: error: extended character is not valid in an identifier
22 |
| ^
a.cc:23:1: error: extended character is not valid in an identifier
23 | double dx1 = x[1] - x[0];
| ^
a.cc:23:1: error: extended character is not valid in an identifier
a.cc:23:1: error: extended character is not valid in an identifier
a.cc:23:1: error: extended character is not valid in an identifier
a.cc:23:1: error: extended character is not valid in an identifier
a.cc:23:1: error: extended character is not valid in an identifier
a.cc:23:1: error: extended character is not valid in an identifier
a.cc:23:1: error: extended character is not valid in an identifier
a.cc:24:1: error: extended character is not valid in an identifier
24 | double dy1 = y[1] - y[0];
| ^
a.cc:24:1: error: extended character is not valid in an identifier
a.cc:24:1: error: extended character is not valid in an identifier
a.cc:24:1: error: extended character is not valid in an identifier
a.cc:24:1: error: extended character is not valid in an identifier
a.cc:24:1: error: extended character is not valid in an identifier
a.cc:24:1: error: extended character is not valid in an identifier
a.cc:24:1: error: extended character is not valid in an identifier
a.cc:25:1: error: extended character is not valid in an identifier
25 | double dx2 = x[3] - x[2];
| ^
a.cc:25:1: error: extended character is not valid in an identifier
a.cc:25:1: error: extended character is not valid in an identifier
a.cc:25:1: error: extended character is not valid in an identifier
a.cc:25:1: error: extended character is not valid in an identifier
a.cc:25:1: error: extended character is not valid in an identifier
a.cc:25:1: error: extended character is not valid in an identifier
a.cc:25:1: error: extended character is not valid in an identifier
a.cc:26:1: error: extended character is not valid in an identifier
26 | double dy2 = y[3] - y[2];
| ^
a.cc:26:1: error: extended character is not valid in an identifier
a.cc:26:1: error: extended character is not valid in an identifier
a.cc:26:1: error: extended character is not valid in an identifier
a.cc:26:1: error: extended character is not valid in an identifier
a.cc:26:1: error: extended character is not valid in an identifier
a.cc:26:1: error: extended character is not valid in an identifier
a.cc:26:1: error: extended character is not valid in an identifier
a.cc:27:1: error: extended character is not valid in an identifier
27 | if (dy1/dx1 == dy2/dx2)
| ^
a.cc:27:1: error: extended character is not valid in an identifier
a.cc:27:1: error: extended character is not valid in an identifier
a.cc:27:1: error: extended character is not valid in an identifier
a.cc:27:1: error: extended character is not valid in an identifier
a.cc:27:1: error: extended character is not valid in an identifier
a.cc:27:1: error: extended character is not valid in an identifier
a.cc:27:1: error: extended character is not valid in an identifier
a.cc:28:1: error: extended character is not valid in an identifier
28 | puts("YES");
| ^
a.cc:28:1: error: extended character is not valid in an identifier
a.cc:28:1: error: extended character is not valid in an identifier
a.cc:28:1: error: extended character is not valid in an identifier
a.cc:28:1: error: extended character is not valid in an identifier
a.cc:28:1: error: extended character is not valid in an identifier
a.cc:28:1: error: extended character is not valid in an identifier
a.cc:28:1: error: extended character is not valid in an identifier
a.cc:28:1: error: extended character is not valid in an identifier
a.cc:28:1: error: extended character is not valid in an identifier
a.cc:28:1: error: extended character is not valid in an identifier
a.cc:28:1: error: extended character is not valid in an identifier
a.cc:29:1: error: extended character is not valid in an identifier
29 | else
| ^
a.cc:29:1: error: extended character is not valid in an identifier
a.cc:29:1: error: extended character is not valid in an identifier
a.cc:29:1: error: extended character is not valid in an identifier
a.cc:29:1: error: extended character is not valid in an identifier
a.cc:29:1: error: extended character is not valid in an identifier
a.cc:29:1: error: extended character is not valid in an identifier
a.cc:29:1: error: extended character is not valid in an identifier
a.cc:30:1: error: extended character is not valid in an identifier
30 | puts("NO");
| ^
a.cc:30:1: error: extended character is not valid in an identifier
a.cc:30:1: error: extended character is not valid in an identifier
a.cc:30:1: error: extended character is not valid in an identifier
a.cc:30:1: error: extended character is not valid in an identifier
a.cc:30:1: error: extended character is not valid in an identifier
a.cc:30:1: error: extended character is not valid in an identifier
a.cc:30:1: error: extended character is not valid in an identifier
a.cc:30:1: error: extended character is not valid in an identifier
a.cc:30:1: error: extended character is not valid in an identifier
a.cc:30:1: error: extended character is not valid in an identifier
a.cc:30:1: error: extended character is not valid in an identifier
a.cc:31:1: error: extended character is not valid in an identifier
31 | }
| ^
a.cc:31:1: error: extended character is not valid in an identifier
a.cc:31:1: error: extended character is not valid in an identifier
a.cc:31:1: error: extended character is not valid in an identifier
a.cc:32:1: error: extended character is not valid in an identifier
32 |
| ^
a.cc:33:1: error: extended character is not valid in an identifier
33 | return 0;
| ^
a.cc:33:1: error: extended character is not valid in an identifier
a.cc:33:1: error: extended character is not valid in an identifier
a.cc:33:1: error: extended character is not valid in an identifier
a.cc:9:1: error: '\U000000a0' does not name a type
9 |
| ^
a.cc:12:1: error: '\U000000a0' does not name a type
12 |
| ^
|
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 dx2 = x[3] - x[2];
double dy2 = y[3] - y[2];
if (dy1/dx1 == dy2/dx2)
puts("YES");
else
puts("NO");
}
return 0;
}
|
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 identifier
8 | int n;
| ^
a.cc:8:1: error: extended character is not valid in an identifier
a.cc:8:1: error: extended character is not valid in an identifier
a.cc:8:1: error: extended character is not valid in an identifier
a.cc:9:1: error: extended character is not valid in an identifier
9 | scanf("%d", &n);
| ^
a.cc:9:1: error: extended character is not valid in an identifier
a.cc:9:1: error: extended character is not valid in an identifier
a.cc:9:1: error: extended character is not valid in an identifier
a.cc:10:1: error: extended character is not valid in an identifier
10 | for (int i = 0; i < n; ++i)
| ^
a.cc:10:1: error: extended character is not valid in an identifier
a.cc:10:1: error: extended character is not valid in an identifier
a.cc:10:1: error: extended character is not valid in an identifier
a.cc:11:1: error: extended character is not valid in an identifier
11 | {
| ^
a.cc:11:1: error: extended character is not valid in an identifier
a.cc:11:1: error: extended character is not valid in an identifier
a.cc:11:1: error: extended character is not valid in an identifier
a.cc:12:1: error: extended character is not valid in an identifier
12 | double x[4], y[4];
| ^
a.cc:12:1: error: extended character is not valid in an identifier
a.cc:12:1: error: extended character is not valid in an identifier
a.cc:12:1: error: extended character is not valid in an identifier
a.cc:12:1: error: extended character is not valid in an identifier
a.cc:12:1: error: extended character is not valid in an identifier
a.cc:12:1: error: extended character is not valid in an identifier
a.cc:12:1: error: extended character is not valid in an identifier
a.cc:13:1: error: extended character is not valid in an identifier
13 | for (int j = 0; j < 4; ++j)
| ^
a.cc:13:1: error: extended character is not valid in an identifier
a.cc:13:1: error: extended character is not valid in an identifier
a.cc:13:1: error: extended character is not valid in an identifier
a.cc:13:1: error: extended character is not valid in an identifier
a.cc:13:1: error: extended character is not valid in an identifier
a.cc:13:1: error: extended character is not valid in an identifier
a.cc:13:1: error: extended character is not valid in an identifier
a.cc:14:1: error: extended character is not valid in an identifier
14 | scanf("%lf %lf", x+j, y+j);
| ^
a.cc:14:1: error: extended character is not valid in an identifier
a.cc:14:1: error: extended character is not valid in an identifier
a.cc:14:1: error: extended character is not valid in an identifier
a.cc:14:1: error: extended character is not valid in an identifier
a.cc:14:1: error: extended character is not valid in an identifier
a.cc:14:1: error: extended character is not valid in an identifier
a.cc:14:1: error: extended character is not valid in an identifier
a.cc:14:1: error: extended character is not valid in an identifier
a.cc:14:1: error: extended character is not valid in an identifier
a.cc:14:1: error: extended character is not valid in an identifier
a.cc:14:1: error: extended character is not valid in an identifier
a.cc:15:1: error: extended character is not valid in an identifier
15 |
| ^
a.cc:16:1: error: extended character is not valid in an identifier
16 | double dx1 = x[1] - x[0];
| ^
a.cc:16:1: error: extended character is not valid in an identifier
a.cc:16:1: error: extended character is not valid in an identifier
a.cc:16:1: error: extended character is not valid in an identifier
a.cc:16:1: error: extended character is not valid in an identifier
a.cc:16:1: error: extended character is not valid in an identifier
a.cc:16:1: error: extended character is not valid in an identifier
a.cc:16:1: error: extended character is not valid in an identifier
a.cc:17:1: error: extended character is not valid in an identifier
17 | double dy1 = y[1] - y[0];
| ^
a.cc:17:1: error: extended character is not valid in an identifier
a.cc:17:1: error: extended character is not valid in an identifier
a.cc:17:1: error: extended character is not valid in an identifier
a.cc:17:1: error: extended character is not valid in an identifier
a.cc:17:1: error: extended character is not valid in an identifier
a.cc:17:1: error: extended character is not valid in an identifier
a.cc:17:1: error: extended character is not valid in an identifier
a.cc:18:1: error: extended character is not valid in an identifier
18 | double dx2 = x[3] - x[2];
| ^
a.cc:18:1: error: extended character is not valid in an identifier
a.cc:18:1: error: extended character is not valid in an identifier
a.cc:18:1: error: extended character is not valid in an identifier
a.cc:18:1: error: extended character is not valid in an identifier
a.cc:18:1: error: extended character is not valid in an identifier
a.cc:18:1: error: extended character is not valid in an identifier
a.cc:18:1: error: extended character is not valid in an identifier
a.cc:19:1: error: extended character is not valid in an identifier
19 | double dy2 = y[3] - y[2];
| ^
a.cc:19:1: error: extended character is not valid in an identifier
a.cc:19:1: error: extended character is not valid in an identifier
a.cc:19:1: error: extended character is not valid in an identifier
a.cc:19:1: error: extended character is not valid in an identifier
a.cc:19:1: error: extended character is not valid in an identifier
a.cc:19:1: error: extended character is not valid in an identifier
a.cc:19:1: error: extended character is not valid in an identifier
a.cc:20:1: error: extended character is not valid in an identifier
20 | if (dy1/dx1 == dy2/dx2)
| ^
a.cc:20:1: error: extended character is not valid in an identifier
a.cc:20:1: error: extended character is not valid in an identifier
a.cc:20:1: error: extended character is not valid in an identifier
a.cc:20:1: error: extended character is not valid in an identifier
a.cc:20:1: error: extended character is not valid in an identifier
a.cc:20:1: error: extended character is not valid in an identifier
a.cc:20:1: error: extended character is not valid in an identifier
a.cc:21:1: error: extended character is not valid in an identifier
21 | puts("YES");
| ^
a.cc:21:1: error: extended character is not valid in an identifier
a.cc:21:1: error: extended character is not valid in an identifier
a.cc:21:1: error: extended character is not valid in an identifier
a.cc:21:1: error: extended character is not valid in an identifier
a.cc:21:1: error: extended character is not valid in an identifier
a.cc:21:1: error: extended character is not valid in an identifier
a.cc:21:1: error: extended character is not valid in an identifier
a.cc:21:1: error: extended character is not valid in an identifier
a.cc:21:1: error: extended character is not valid in an identifier
a.cc:21:1: error: extended character is not valid in an identifier
a.cc:21:1: error: extended character is not valid in an identifier
a.cc:22:1: error: extended character is not valid in an identifier
22 | else
| ^
a.cc:22:1: error: extended character is not valid in an identifier
a.cc:22:1: error: extended character is not valid in an identifier
a.cc:22:1: error: extended character is not valid in an identifier
a.cc:22:1: error: extended character is not valid in an identifier
a.cc:22:1: error: extended character is not valid in an identifier
a.cc:22:1: error: extended character is not valid in an identifier
a.cc:22:1: error: extended character is not valid in an identifier
a.cc:23:1: error: extended character is not valid in an identifier
23 | puts("NO");
| ^
a.cc:23:1: error: extended character is not valid in an identifier
a.cc:23:1: error: extended character is not valid in an identifier
a.cc:23:1: error: extended character is not valid in an identifier
a.cc:23:1: error: extended character is not valid in an identifier
a.cc:23:1: error: extended character is not valid in an identifier
a.cc:23:1: error: extended character is not valid in an identifier
a.cc:23:1: error: extended character is not valid in an identifier
a.cc:23:1: error: extended character is not valid in an identifier
a.cc:23:1: error: extended character is not valid in an identifier
a.cc:23:1: error: extended character is not valid in an identifier
a.cc:23:1: error: extended character is not valid in an identifier
a.cc:24:1: error: extended character is not valid in an identifier
24 | }
| ^
a.cc:24:1: error: extended character is not valid in an identifier
a.cc:24:1: error: extended character is not valid in an identifier
a.cc:24:1: error: extended character is not valid in an identifier
a.cc:25:1: error: extended character is not valid in an identifier
25 |
| ^
a.cc:26:1: error: extended character is not valid in an identifier
26 | return 0;
| ^
a.cc:26:1: error: extended character is not valid in an identifier
a.cc:26:1: error: extended character is not valid in an identifier
a.cc:26:1: error: extended character is not valid in an identifier
a.cc:2:1: error: '\U000000a0' does not name a type
2 |
| ^
a.cc:5:1: error: '\U000000a0' does not name a type
5 |
| ^
|
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() {
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");
}
}
}
|
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 | }
| ~
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.