submission_id
stringlengths 10
10
| problem_id
stringlengths 6
6
| language
stringclasses 3
values | code
stringlengths 1
522k
| compiler_output
stringlengths 43
10.2k
|
|---|---|---|---|---|
s954603767
|
p00020
|
C++
|
#include <iostream>
#include <ctype.h>
using namespace std;
void str_toupper(char *str)
{
do{
*str = toupper(*str);
}while(*str++);
}
int main(void)
{
char str[100];
gets(str);
str_toupper(str);
cout << str << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:13:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
13 | gets(str);
| ^~~~
| getw
|
s335103321
|
p00020
|
C++
|
#include<iostream>
#include<ctype>
using namespace std;
int main()
{
char a;
for(;cin.get(a);)
{
if(a=='\n')
break;
a=toupper(a);
cout << a ;
}
}
|
a.cc:2:9: fatal error: ctype: No such file or directory
2 | #include<ctype>
| ^~~~~~~
compilation terminated.
|
s304169698
|
p00020
|
C++
|
#include <iostream>
using namespace std;
int main() {
char ch[200];
gets(ch);
for (int i=0; i<200; i++)
{
if (ch[i] >= 'a' && ch[i] <= 'z')
{
ch[i]-=32;
}
}
printf("%s",ch);
}
|
a.cc: In function 'int main()':
a.cc:6:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
6 | gets(ch);
| ^~~~
| getw
|
s036477173
|
p00020
|
C++
|
#include <stdio.h>
int main() {
char ch[200];
gets(ch);
for (int i=0; i<200; i++)
{
if (ch[i] >= 'a' && ch[i] <= 'z')
{
ch[i]-=32;
}
}
printf("%s",ch);
}
|
a.cc: In function 'int main()':
a.cc:5:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
5 | gets(ch);
| ^~~~
| getw
|
s436900140
|
p00020
|
C++
|
#include<stdio.h>
int main(){
char str[200];
while(1){
gets(str);
}
}
|
a.cc: In function 'int main()':
a.cc:6:17: error: 'gets' was not declared in this scope; did you mean 'getw'?
6 | gets(str);
| ^~~~
| getw
|
s611780522
|
p00020
|
C++
|
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int i=0,n=1;
char s[1005];
int main(){
gets(s);
for(i=0;i<strlen(s);i++){
if(s[i]>96 && s[i]<123)s[i]=s[i]-32;
}
printf("%s\n",s);
return 0;
}
|
a.cc: In function 'int main()':
a.cc:9:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
9 | gets(s);
| ^~~~
| getw
|
s617892937
|
p00020
|
C++
|
void main(){
char s[999];
int i;
for(;~scanf("%s",s);printf("%s ",s))
for(i=0;s[i];i++)
s[i]>='a'&&s[i]<='z'?s[i]-=32:0;
for(i=0;s[i];i++)
s[i]>='a'&&s[i]<='z'?s[i]-=32:0;
puts(s);
}
|
a.cc:1:1: error: '::main' must return 'int'
1 | void main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:4:15: error: 'scanf' was not declared in this scope
4 | for(;~scanf("%s",s);printf("%s ",s))
| ^~~~~
a.cc:4:29: error: 'printf' was not declared in this scope
4 | for(;~scanf("%s",s);printf("%s ",s))
| ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
+++ |+#include <cstdio>
1 | void main(){
a.cc:9:9: error: 'puts' was not declared in this scope
9 | puts(s);
| ^~~~
|
s977821246
|
p00020
|
C++
|
void main(){
char s[999];
int i;
for(;~scanf("%s",s);printf("%s ",s))
for(i=0;s[i];i++)
s[i]>='a'&&s[i]<='z'?s[i]-=32:0;
for(i=0;s[i];i++)
s[i]>='a'&&s[i]<='z'?s[i]-=32:0;
puts(s);
}
|
a.cc:1:1: error: '::main' must return 'int'
1 | void main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:4:15: error: 'scanf' was not declared in this scope
4 | for(;~scanf("%s",s);printf("%s ",s))
| ^~~~~
a.cc:4:29: error: 'printf' was not declared in this scope
4 | for(;~scanf("%s",s);printf("%s ",s))
| ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
+++ |+#include <cstdio>
1 | void main(){
a.cc:9:9: error: 'puts' was not declared in this scope
9 | puts(s);
| ^~~~
|
s305434639
|
p00020
|
C++
|
void main(){
char s[999];
int i,j=0;
for(;~scanf("%s",s);printf(" %s",s))
for(i=0;s[i];i++)
s[i]>='a'&&s[i]<='z'?s[i]-=32:0;
puts("");
}
|
a.cc:1:1: error: '::main' must return 'int'
1 | void main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:4:15: error: 'scanf' was not declared in this scope
4 | for(;~scanf("%s",s);printf(" %s",s))
| ^~~~~
a.cc:4:29: error: 'printf' was not declared in this scope
4 | for(;~scanf("%s",s);printf(" %s",s))
| ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
+++ |+#include <cstdio>
1 | void main(){
a.cc:7:9: error: 'puts' was not declared in this scope
7 | puts("");
| ^~~~
|
s126211072
|
p00020
|
C++
|
#include<stdio.h>
void main(){
char c;
for(;~(c=getchar());printf("%c",c))
c>='a'&&c<='z'?c-=32:0;
}
|
a.cc:2:1: error: '::main' must return 'int'
2 | void main(){
| ^~~~
|
s521479224
|
p00020
|
C++
|
#include <iostream>
#include <string>
#include <algorithm>
#include <cctype>
#include <cstdio>
using namespace std;
int main() {
string str;
getline(cin, str);
transform(str.begin(), str.end(), str.begin(), toupper);
cout<<str.c_str()<<endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:12:18: error: no matching function for call to 'transform(std::__cxx11::basic_string<char>::iterator, std::__cxx11::basic_string<char>::iterator, std::__cxx11::basic_string<char>::iterator, <unresolved overloaded function type>)'
12 | transform(str.begin(), str.end(), str.begin(), toupper);
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
from a.cc:3:
/usr/include/c++/14/bits/stl_algo.h:4209:5: note: candidate: 'template<class _IIter, class _OIter, class _UnaryOperation> _OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation)'
4209 | transform(_InputIterator __first, _InputIterator __last,
| ^~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4209:5: note: template argument deduction/substitution failed:
a.cc:12:18: note: couldn't deduce template parameter '_UnaryOperation'
12 | transform(str.begin(), str.end(), str.begin(), toupper);
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4247:5: note: candidate: 'template<class _IIter1, class _IIter2, class _OIter, class _BinaryOperation> _OIter std::transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation)'
4247 | transform(_InputIterator1 __first1, _InputIterator1 __last1,
| ^~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4247:5: note: candidate expects 5 arguments, 4 provided
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:156:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _UnaryOperation> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> std::transform(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _UnaryOperation)'
156 | transform(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result,
| ^~~~~~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:156:1: note: candidate expects 5 arguments, 4 provided
/usr/include/c++/14/pstl/glue_algorithm_defs.h:162:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator, class _BinaryOperation> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> std::transform(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator, _BinaryOperation)'
162 | transform(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
| ^~~~~~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:162:1: note: candidate expects 6 arguments, 4 provided
|
s484097171
|
p00020
|
C++
|
a;main(){a=puts("THIS IS A PEN.");}
|
a.cc:1:1: error: 'a' does not name a type
1 | a;main(){a=puts("THIS IS A PEN.");}
| ^
a.cc:1:3: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
1 | a;main(){a=puts("THIS IS A PEN.");}
| ^~~~
a.cc: In function 'int main()':
a.cc:1:10: error: 'a' was not declared in this scope
1 | a;main(){a=puts("THIS IS A PEN.");}
| ^
a.cc:1:12: error: 'puts' was not declared in this scope
1 | a;main(){a=puts("THIS IS A PEN.");}
| ^~~~
|
s685594052
|
p00020
|
C++
|
main(a){for(;~scanf("%c",&a);printf("%c",a>96?a-32:a);}
|
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token
1 | main(a){for(;~scanf("%c",&a);printf("%c",a>96?a-32:a);}
| ^
|
s376895616
|
p00020
|
C++
|
include <stdio.h>
#include <ctype.h>
#include <string.h>
int main(void){
char in[256];
fgets(in, 255, stdin);
int len = strlen(in) - 1;
in[len] = '\0';
for(int i=0; i<len; ++i){
in[i] = toupper(in[i]);
}
puts(in);
return 0;
}
|
a.cc:1:1: error: 'include' does not name a type
1 | include <stdio.h>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:24: error: 'stdin' was not declared in this scope
7 | fgets(in, 255, stdin);
| ^~~~~
a.cc:4:1: note: 'stdin' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
3 | #include <string.h>
+++ |+#include <cstdio>
4 |
a.cc:7:9: error: 'fgets' was not declared in this scope
7 | fgets(in, 255, stdin);
| ^~~~~
a.cc:13:9: error: 'puts' was not declared in this scope
13 | puts(in);
| ^~~~
|
s495321909
|
p00020
|
C++
|
#include<iostream>
#include<algorithm>
#include<string>
#include <cstdlib>
using namespace std;
int main(){
string s;
cin>>s;
transform (s.begin (), s.end (), s.begin (), toupper);
cout<<s;
}
|
a.cc: In function 'int main()':
a.cc:9:19: error: no matching function for call to 'transform(std::__cxx11::basic_string<char>::iterator, std::__cxx11::basic_string<char>::iterator, std::__cxx11::basic_string<char>::iterator, <unresolved overloaded function type>)'
9 | transform (s.begin (), s.end (), s.begin (), toupper);
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
from a.cc:2:
/usr/include/c++/14/bits/stl_algo.h:4209:5: note: candidate: 'template<class _IIter, class _OIter, class _UnaryOperation> _OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation)'
4209 | transform(_InputIterator __first, _InputIterator __last,
| ^~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4209:5: note: template argument deduction/substitution failed:
a.cc:9:19: note: couldn't deduce template parameter '_UnaryOperation'
9 | transform (s.begin (), s.end (), s.begin (), toupper);
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4247:5: note: candidate: 'template<class _IIter1, class _IIter2, class _OIter, class _BinaryOperation> _OIter std::transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation)'
4247 | transform(_InputIterator1 __first1, _InputIterator1 __last1,
| ^~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4247:5: note: candidate expects 5 arguments, 4 provided
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:156:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _UnaryOperation> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> std::transform(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _UnaryOperation)'
156 | transform(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result,
| ^~~~~~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:156:1: note: candidate expects 5 arguments, 4 provided
/usr/include/c++/14/pstl/glue_algorithm_defs.h:162:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator, class _BinaryOperation> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> std::transform(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator, _BinaryOperation)'
162 | transform(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
| ^~~~~~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:162:1: note: candidate expects 6 arguments, 4 provided
|
s342375611
|
p00020
|
C++
|
#include <cstdio>
#include <iostream>
using namespace std;
int main(void) {
char in[1024];
int i;
gets(in);
for(i=0;in[i]!='\0';i++) {
if(in[i]>='a') { printf("%c", in[i] - ('a'-'A')); }
else { printf("%c", in[i]); }
}
printf("\n");
return 0;
}
|
a.cc: In function 'int main()':
a.cc:10:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
10 | gets(in);
| ^~~~
| getw
|
s798023654
|
p00020
|
C++
|
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
#include <cassert>
#include <iostream>
#include <sstream>
#include <string>
#include <list>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <utility>
#include <numeric>
#include <algorithm>
#include <bitset>
#include <complex>
#include <fstream>
using namespace std;
typedef long long ll;
typedef vector<int> vint;
typedef pair<int, int> pint;
#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for(int i = x; i < n; i++)
template<class T> T RoundOff(T a){ return int(a+.5-(a<0)); }
template<class T, class C> void chmax(T& a, C b){ if(a < b) a = b; }
template<class T, class C> void chmin(T& a, C b){ if(b < a) a = b; }
template<class T, class C> pair<T, C> mp(T a, C b){ return make_pair(a, b); }
int main()
{
string str;
getline(cin, str);
transform(ALL(str), str.begin(), toupper);
cout << str << endl;
}
|
a.cc: In function 'int main()':
a.cc:40:18: error: no matching function for call to 'transform(std::__cxx11::basic_string<char>::iterator, std::__cxx11::basic_string<char>::iterator, std::__cxx11::basic_string<char>::iterator, <unresolved overloaded function type>)'
40 | transform(ALL(str), str.begin(), toupper);
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
from a.cc:17:
/usr/include/c++/14/bits/stl_algo.h:4209:5: note: candidate: 'template<class _IIter, class _OIter, class _UnaryOperation> _OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation)'
4209 | transform(_InputIterator __first, _InputIterator __last,
| ^~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4209:5: note: template argument deduction/substitution failed:
a.cc:40:18: note: couldn't deduce template parameter '_UnaryOperation'
40 | transform(ALL(str), str.begin(), toupper);
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4247:5: note: candidate: 'template<class _IIter1, class _IIter2, class _OIter, class _BinaryOperation> _OIter std::transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation)'
4247 | transform(_InputIterator1 __first1, _InputIterator1 __last1,
| ^~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4247:5: note: candidate expects 5 arguments, 4 provided
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:156:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _UnaryOperation> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _Tp> std::transform(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _UnaryOperation)'
156 | transform(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result,
| ^~~~~~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:156:1: note: candidate expects 5 arguments, 4 provided
/usr/include/c++/14/pstl/glue_algorithm_defs.h:162:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator, class _BinaryOperation> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _Tp> std::transform(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator, _BinaryOperation)'
162 | transform(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
| ^~~~~~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:162:1: note: candidate expects 6 arguments, 4 provided
|
s943210671
|
p00020
|
C++
|
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
#include <cctype>
#include <cassert>
#include <iostream>
#include <sstream>
#include <string>
#include <list>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <utility>
#include <numeric>
#include <algorithm>
#include <bitset>
#include <complex>
#include <fstream>
using namespace std;
typedef long long ll;
typedef vector<int> vint;
typedef pair<int, int> pint;
#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for(int i = x; i < n; i++)
template<class T> T RoundOff(T a){ return int(a+.5-(a<0)); }
template<class T, class C> void chmax(T& a, C b){ if(a < b) a = b; }
template<class T, class C> void chmin(T& a, C b){ if(b < a) a = b; }
template<class T, class C> pair<T, C> mp(T a, C b){ return make_pair(a, b); }
int main()
{
string str;
getline(cin, str);
transform(ALL(str), str.begin(), toupper);
cout << str << endl;
}
|
a.cc: In function 'int main()':
a.cc:41:18: error: no matching function for call to 'transform(std::__cxx11::basic_string<char>::iterator, std::__cxx11::basic_string<char>::iterator, std::__cxx11::basic_string<char>::iterator, <unresolved overloaded function type>)'
41 | transform(ALL(str), str.begin(), toupper);
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
from a.cc:18:
/usr/include/c++/14/bits/stl_algo.h:4209:5: note: candidate: 'template<class _IIter, class _OIter, class _UnaryOperation> _OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation)'
4209 | transform(_InputIterator __first, _InputIterator __last,
| ^~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4209:5: note: template argument deduction/substitution failed:
a.cc:41:18: note: couldn't deduce template parameter '_UnaryOperation'
41 | transform(ALL(str), str.begin(), toupper);
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4247:5: note: candidate: 'template<class _IIter1, class _IIter2, class _OIter, class _BinaryOperation> _OIter std::transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation)'
4247 | transform(_InputIterator1 __first1, _InputIterator1 __last1,
| ^~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4247:5: note: candidate expects 5 arguments, 4 provided
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:156:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _UnaryOperation> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _Tp> std::transform(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _UnaryOperation)'
156 | transform(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result,
| ^~~~~~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:156:1: note: candidate expects 5 arguments, 4 provided
/usr/include/c++/14/pstl/glue_algorithm_defs.h:162:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator, class _BinaryOperation> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _Tp> std::transform(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator, _BinaryOperation)'
162 | transform(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
| ^~~~~~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:162:1: note: candidate expects 6 arguments, 4 provided
|
s208750074
|
p00020
|
C++
|
#include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
transform(s.begin(), s.end(), s.begin(), toupper);
cout << s << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:12:18: error: no matching function for call to 'transform(std::__cxx11::basic_string<char>::iterator, std::__cxx11::basic_string<char>::iterator, std::__cxx11::basic_string<char>::iterator, <unresolved overloaded function type>)'
12 | transform(s.begin(), s.end(), s.begin(), toupper);
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:4209:5: note: candidate: 'template<class _IIter, class _OIter, class _UnaryOperation> _OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation)'
4209 | transform(_InputIterator __first, _InputIterator __last,
| ^~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4209:5: note: template argument deduction/substitution failed:
a.cc:12:18: note: couldn't deduce template parameter '_UnaryOperation'
12 | transform(s.begin(), s.end(), s.begin(), toupper);
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4247:5: note: candidate: 'template<class _IIter1, class _IIter2, class _OIter, class _BinaryOperation> _OIter std::transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation)'
4247 | transform(_InputIterator1 __first1, _InputIterator1 __last1,
| ^~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4247:5: note: candidate expects 5 arguments, 4 provided
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:156:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _UnaryOperation> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> std::transform(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _UnaryOperation)'
156 | transform(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result,
| ^~~~~~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:156:1: note: candidate expects 5 arguments, 4 provided
/usr/include/c++/14/pstl/glue_algorithm_defs.h:162:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator, class _BinaryOperation> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> std::transform(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator, _BinaryOperation)'
162 | transform(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
| ^~~~~~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:162:1: note: candidate expects 6 arguments, 4 provided
|
s092663255
|
p00020
|
C++
|
#include<cstdio>
using namespace std;
int main(){
char str[1024], *s;
gets(str);
int i=0;
while(str[i++]!='\0');
s = new char[i];
for( int j=0; j<i; j++ ){
s[j] = str[j];
if( ('a'<=s[j])&&(s[j]<='z') ){
s[j] -= 32;
}
}
printf("%s", s);
delete[] s;
s=0;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:6:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
6 | gets(str);
| ^~~~
| getw
|
s610569986
|
p00020
|
C++
|
#include <iostream>
#include <string>
#include <algorithm>
#include <cctype>
int main()
{
std::string input_text;
std::getline(std::cin, input_text);
std::transform(
input_text.begin(), input_text.end(),
std::ostream_iterator<char>(std::cout, ""),
static_cast<int(*)(int)>(&std::toupper));
std::cout << std::endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:12:30: error: 'ostream_iterator' is not a member of 'std'
12 | std::ostream_iterator<char>(std::cout, ""),
| ^~~~~~~~~~~~~~~~
a.cc:5:1: note: 'std::ostream_iterator' is defined in header '<iterator>'; this is probably fixable by adding '#include <iterator>'
4 | #include <cctype>
+++ |+#include <iterator>
5 |
a.cc:12:47: error: expected primary-expression before 'char'
12 | std::ostream_iterator<char>(std::cout, ""),
| ^~~~
|
s001952097
|
p00020
|
C++
|
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
const int N = 1000005;
char text[N];
int main() {
while (gets(text)) {
int len = strlen(text);
for (int i=0; i<len; ++i) {
if (text[i] >= 'a' && text[i] <= 'z') text[i] = text[i] - 'a' + 'A';
}
printf ("%s\n", text);
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:12:16: error: 'gets' was not declared in this scope; did you mean 'getw'?
12 | while (gets(text)) {
| ^~~~
| getw
|
s590261798
|
p00020
|
C++
|
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
const int N = 1000005;
char text[N];
int main() {
while (gets(text)) {
int len = strlen(text);
for (int i=0; i<len; ++i) {
if (text[i] >= 'a' && text[i] <= 'z') text[i] = text[i] - 'a' + 'A';
}
printf ("%s\n", text);
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:12:16: error: 'gets' was not declared in this scope; did you mean 'getw'?
12 | while (gets(text)) {
| ^~~~
| getw
|
s243298265
|
p00020
|
C++
|
#import<cstdio>
int main(c){for(;~(c=getchar());putchar(c>96?c-32:c));}
|
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
1 | #import<cstdio>
| ^~~~~~
a.cc:2:5: error: cannot declare '::main' to be a global variable
2 | int main(c){for(;~(c=getchar());putchar(c>96?c-32:c));}
| ^~~~
a.cc:2:10: error: 'c' was not declared in this scope
2 | int main(c){for(;~(c=getchar());putchar(c>96?c-32:c));}
| ^
|
s037034364
|
p00020
|
C++
|
#include<cstdio>
int main(c){for(;~(c=getchar());putchar(c>96?c-32:c));}
|
a.cc:2:5: error: cannot declare '::main' to be a global variable
2 | int main(c){for(;~(c=getchar());putchar(c>96?c-32:c));}
| ^~~~
a.cc:2:10: error: 'c' was not declared in this scope
2 | int main(c){for(;~(c=getchar());putchar(c>96?c-32:c));}
| ^
|
s947164743
|
p00020
|
C++
|
#include <iostream>
#include <string>
#include <algorithm>
char ToUpper (char cX) { return toupper(cX); }
using namespace std;
int main() {
string in;
getline(cin, in);
transform(in.begin(), in.end(), in.begin(), ToUpper);
cout<<in<<;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:11:19: error: expected primary-expression before ';' token
11 | cout<<in<<;
| ^
|
s882232588
|
p00020
|
C++
|
#include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main(void)
{
string a;
getline(cin,a);
transform(a.begin(),a.end(),a.begin(),toupper);
cout<<a<<endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:10:18: error: no matching function for call to 'transform(std::__cxx11::basic_string<char>::iterator, std::__cxx11::basic_string<char>::iterator, std::__cxx11::basic_string<char>::iterator, <unresolved overloaded function type>)'
10 | transform(a.begin(),a.end(),a.begin(),toupper);
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:4209:5: note: candidate: 'template<class _IIter, class _OIter, class _UnaryOperation> _OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation)'
4209 | transform(_InputIterator __first, _InputIterator __last,
| ^~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4209:5: note: template argument deduction/substitution failed:
a.cc:10:18: note: couldn't deduce template parameter '_UnaryOperation'
10 | transform(a.begin(),a.end(),a.begin(),toupper);
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4247:5: note: candidate: 'template<class _IIter1, class _IIter2, class _OIter, class _BinaryOperation> _OIter std::transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation)'
4247 | transform(_InputIterator1 __first1, _InputIterator1 __last1,
| ^~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4247:5: note: candidate expects 5 arguments, 4 provided
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:156:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _UnaryOperation> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> std::transform(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _UnaryOperation)'
156 | transform(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result,
| ^~~~~~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:156:1: note: candidate expects 5 arguments, 4 provided
/usr/include/c++/14/pstl/glue_algorithm_defs.h:162:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator, class _BinaryOperation> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> std::transform(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator, _BinaryOperation)'
162 | transform(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
| ^~~~~~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:162:1: note: candidate expects 6 arguments, 4 provided
|
s665206750
|
p00020
|
C++
|
#include <iostream>
#include <algorithm>
#include <cctype>
#include <cstdio>
#include <math.h>
using namespace std;
 
int main(){
 
char ch;
 
while(1){
    scanf("%c", &ch);
    if ( ch == '\n' ) break;
    char d=toupper(ch);
    cout<<d;
}
    cout<<endl;
}
|
a.cc:7:2: error: stray '#' in program
7 |  
| ^
a.cc:9:2: error: stray '#' in program
9 |  
| ^
a.cc:11:2: error: stray '#' in program
11 |  
| ^
a.cc:13:2: error: stray '#' in program
13 |     scanf("%c", &ch);
| ^
a.cc:13:8: error: stray '#' in program
13 |     scanf("%c", &ch);
| ^
a.cc:13:14: error: stray '#' in program
13 |     scanf("%c", &ch);
| ^
a.cc:13:20: error: stray '#' in program
13 |     scanf("%c", &ch);
| ^
a.cc:14:2: error: stray '#' in program
14 |     if ( ch == '\n' ) break;
| ^
a.cc:14:8: error: stray '#' in program
14 |     if ( ch == '\n' ) break;
| ^
a.cc:14:14: error: stray '#' in program
14 |     if ( ch == '\n' ) break;
| ^
a.cc:14:20: error: stray '#' in program
14 |     if ( ch == '\n' ) break;
| ^
a.cc:15:2: error: stray '#' in program
15 |     char d=toupper(ch);
| ^
a.cc:15:8: error: stray '#' in program
15 |     char d=toupper(ch);
| ^
a.cc:15:14: error: stray '#' in program
15 |     char d=toupper(ch);
| ^
a.cc:15:20: error: stray '#' in program
15 |     char d=toupper(ch);
| ^
a.cc:16:2: error: stray '#' in program
16 |     cout<<d;
| ^
a.cc:16:8: error: stray '#' in program
16 |     cout<<d;
| ^
a.cc:16:14: error: stray '#' in program
16 |     cout<<d;
| ^
a.cc:16:20: error: stray '#' in program
16 |     cout<<d;
| ^
a.cc:18:2: error: stray '#' in program
18 |     cout<<endl;
| ^
a.cc:18:8: error: stray '#' in program
18 |     cout<<endl;
| ^
a.cc:18:14: error: stray '#' in program
18 |     cout<<endl;
| ^
a.cc:18:20: error: stray '#' in program
18 |     cout<<endl;
| ^
a.cc:7:3: error: expected unqualified-id before numeric constant
7 |  
| ^~~
a.cc: In function 'int main()':
a.cc:9:3: error: lvalue required as unary '&' operand
9 |  
| ^~~
a.cc:11:3: error: lvalue required as unary '&' operand
11 |  
| ^~~
a.cc:13:3: error: lvalue required as unary '&' operand
13 |     scanf("%c", &ch);
| ^~~
a.cc:13:9: error: lvalue required as unary '&' operand
13 |     scanf("%c", &ch);
| ^~~
a.cc:13:15: error: lvalue required as unary '&' operand
13 |     scanf("%c", &ch);
| ^~~
a.cc:13:21: error: lvalue required as unary '&' operand
13 |     scanf("%c", &ch);
| ^~~
a.cc:14:3: error: lvalue required as unary '&' operand
14 |     if ( ch == '\n' ) break;
| ^~~
a.cc:14:9: error: lvalue required as unary '&' operand
14 |     if ( ch == '\n' ) break;
| ^~~
a.cc:14:15: error: lvalue required as unary '&' operand
14 |     if ( ch == '\n' ) break;
| ^~~
a.cc:14:21: error: lvalue required as unary '&' operand
14 |     if ( ch == '\n' ) break;
| ^~~
a.cc:15:3: error: lvalue required as unary '&' operand
15 |     char d=toupper(ch);
| ^~~
a.cc:15:9: error: lvalue required as unary '&' operand
15 |     char d=toupper(ch);
| ^~~
a.cc:15:15: error: lvalue required as unary '&' operand
15 |     char d=toupper(ch);
| ^~~
a.cc:15:21: error: lvalue required as unary '&' operand
15 |     char d=toupper(ch);
| ^~~
a.cc:16:3: error: lvalue required as unary '&' operand
16 |     cout<<d;
| ^~~
a.cc:16:9: error: lvalue required as unary '&' operand
16 |     cout<<d;
| ^~~
a.cc:16:15: error: lvalue required as unary '&' operand
16 |     cout<<d;
| ^~~
a.cc:16:21: error: lvalue required as unary '&' operand
16 |     cout<<d;
| ^~~
a.cc:18:3: error: lvalue required as unary '&' operand
18 |     cout<<endl;
| ^~~
a.cc:18:9: error: lvalue required as unary '&' operand
18 |     cout<<endl;
| ^~~
a.cc:18:15: error: lvalue required as unary '&' operand
18 |     cout<<endl;
| ^~~
a.cc:18:21: error: lvalue required as unary '&' operand
18 |     cout<<endl;
| ^~~
|
s047980138
|
p00020
|
C++
|
#include <iostream>
#include <algorithm>
#include <cctype>
#include <cstdio>
#include <math.h>
using namespace std;
 
int main(){
 
char ch;
 
while(1){
    scanf("%c", &ch);
    if ( ch == '\n' ) break;
    char d=toupper(ch);
    cout<<d;
}
    cout<<endl;
}
|
a.cc:7:2: error: stray '#' in program
7 |  
| ^
a.cc:9:2: error: stray '#' in program
9 |  
| ^
a.cc:11:2: error: stray '#' in program
11 |  
| ^
a.cc:13:2: error: stray '#' in program
13 |     scanf("%c", &ch);
| ^
a.cc:13:8: error: stray '#' in program
13 |     scanf("%c", &ch);
| ^
a.cc:13:14: error: stray '#' in program
13 |     scanf("%c", &ch);
| ^
a.cc:13:20: error: stray '#' in program
13 |     scanf("%c", &ch);
| ^
a.cc:14:2: error: stray '#' in program
14 |     if ( ch == '\n' ) break;
| ^
a.cc:14:8: error: stray '#' in program
14 |     if ( ch == '\n' ) break;
| ^
a.cc:14:14: error: stray '#' in program
14 |     if ( ch == '\n' ) break;
| ^
a.cc:14:20: error: stray '#' in program
14 |     if ( ch == '\n' ) break;
| ^
a.cc:15:2: error: stray '#' in program
15 |     char d=toupper(ch);
| ^
a.cc:15:8: error: stray '#' in program
15 |     char d=toupper(ch);
| ^
a.cc:15:14: error: stray '#' in program
15 |     char d=toupper(ch);
| ^
a.cc:15:20: error: stray '#' in program
15 |     char d=toupper(ch);
| ^
a.cc:16:2: error: stray '#' in program
16 |     cout<<d;
| ^
a.cc:16:8: error: stray '#' in program
16 |     cout<<d;
| ^
a.cc:16:14: error: stray '#' in program
16 |     cout<<d;
| ^
a.cc:16:20: error: stray '#' in program
16 |     cout<<d;
| ^
a.cc:18:2: error: stray '#' in program
18 |     cout<<endl;
| ^
a.cc:18:8: error: stray '#' in program
18 |     cout<<endl;
| ^
a.cc:18:14: error: stray '#' in program
18 |     cout<<endl;
| ^
a.cc:18:20: error: stray '#' in program
18 |     cout<<endl;
| ^
a.cc:7:3: error: expected unqualified-id before numeric constant
7 |  
| ^~~
a.cc: In function 'int main()':
a.cc:9:3: error: lvalue required as unary '&' operand
9 |  
| ^~~
a.cc:11:3: error: lvalue required as unary '&' operand
11 |  
| ^~~
a.cc:13:3: error: lvalue required as unary '&' operand
13 |     scanf("%c", &ch);
| ^~~
a.cc:13:9: error: lvalue required as unary '&' operand
13 |     scanf("%c", &ch);
| ^~~
a.cc:13:15: error: lvalue required as unary '&' operand
13 |     scanf("%c", &ch);
| ^~~
a.cc:13:21: error: lvalue required as unary '&' operand
13 |     scanf("%c", &ch);
| ^~~
a.cc:14:3: error: lvalue required as unary '&' operand
14 |     if ( ch == '\n' ) break;
| ^~~
a.cc:14:9: error: lvalue required as unary '&' operand
14 |     if ( ch == '\n' ) break;
| ^~~
a.cc:14:15: error: lvalue required as unary '&' operand
14 |     if ( ch == '\n' ) break;
| ^~~
a.cc:14:21: error: lvalue required as unary '&' operand
14 |     if ( ch == '\n' ) break;
| ^~~
a.cc:15:3: error: lvalue required as unary '&' operand
15 |     char d=toupper(ch);
| ^~~
a.cc:15:9: error: lvalue required as unary '&' operand
15 |     char d=toupper(ch);
| ^~~
a.cc:15:15: error: lvalue required as unary '&' operand
15 |     char d=toupper(ch);
| ^~~
a.cc:15:21: error: lvalue required as unary '&' operand
15 |     char d=toupper(ch);
| ^~~
a.cc:16:3: error: lvalue required as unary '&' operand
16 |     cout<<d;
| ^~~
a.cc:16:9: error: lvalue required as unary '&' operand
16 |     cout<<d;
| ^~~
a.cc:16:15: error: lvalue required as unary '&' operand
16 |     cout<<d;
| ^~~
a.cc:16:21: error: lvalue required as unary '&' operand
16 |     cout<<d;
| ^~~
a.cc:18:3: error: lvalue required as unary '&' operand
18 |     cout<<endl;
| ^~~
a.cc:18:9: error: lvalue required as unary '&' operand
18 |     cout<<endl;
| ^~~
a.cc:18:15: error: lvalue required as unary '&' operand
18 |     cout<<endl;
| ^~~
a.cc:18:21: error: lvalue required as unary '&' operand
18 |     cout<<endl;
| ^~~
|
s624835449
|
p00020
|
C++
|
print raw_input().upper()
|
a.cc:1:1: error: 'print' does not name a type; did you mean 'int'?
1 | print raw_input().upper()
| ^~~~~
| int
|
s252182752
|
p00020
|
C++
|
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main(void){
string s;
cin >> s;
transform(s.begin(),s.end(),s.begin(),toupper);
cout << s << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:11:18: error: no matching function for call to 'transform(std::__cxx11::basic_string<char>::iterator, std::__cxx11::basic_string<char>::iterator, std::__cxx11::basic_string<char>::iterator, <unresolved overloaded function type>)'
11 | transform(s.begin(),s.end(),s.begin(),toupper);
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
from a.cc:3:
/usr/include/c++/14/bits/stl_algo.h:4209:5: note: candidate: 'template<class _IIter, class _OIter, class _UnaryOperation> _OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation)'
4209 | transform(_InputIterator __first, _InputIterator __last,
| ^~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4209:5: note: template argument deduction/substitution failed:
a.cc:11:18: note: couldn't deduce template parameter '_UnaryOperation'
11 | transform(s.begin(),s.end(),s.begin(),toupper);
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4247:5: note: candidate: 'template<class _IIter1, class _IIter2, class _OIter, class _BinaryOperation> _OIter std::transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation)'
4247 | transform(_InputIterator1 __first1, _InputIterator1 __last1,
| ^~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4247:5: note: candidate expects 5 arguments, 4 provided
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:156:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _UnaryOperation> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> std::transform(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _UnaryOperation)'
156 | transform(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result,
| ^~~~~~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:156:1: note: candidate expects 5 arguments, 4 provided
/usr/include/c++/14/pstl/glue_algorithm_defs.h:162:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator, class _BinaryOperation> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> std::transform(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator, _BinaryOperation)'
162 | transform(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
| ^~~~~~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:162:1: note: candidate expects 6 arguments, 4 provided
|
s325488773
|
p00020
|
C++
|
#include <iostream>
using namespace std;
int main() {
string s;
getline(cin,s);
for(int i=0;i<=s.size();i++){
if(0x61<=(int)s[i]&&(int)s[i]<=0x7A)a{
s[i]-=0x20;
}cout<<s[i];
}
}
|
a.cc: In function 'int main()':
a.cc:8:53: error: 'a' was not declared in this scope
8 | if(0x61<=(int)s[i]&&(int)s[i]<=0x7A)a{
| ^
|
s684983900
|
p00020
|
C++
|
#include <iostream>
#include <string>
#include <stdlib.h>
using namespace std;
int main() {
string s;
getline(cin,s);
for(int i=0;i<=s.size();i++){
if(isalpha(s[i]))
cout<toupper(s[i]);
else cout<<s[i];
}cout<<endl;
}
|
a.cc: In function 'int main()':
a.cc:11:29: error: no match for 'operator<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
11 | cout<toupper(s[i]);
| ~~~~^~~~~~~~~~~~~~
| | |
| | int
| std::ostream {aka std::basic_ostream<char>}
a.cc:11:29: note: candidate: 'operator<(int, int)' (built-in)
11 | cout<toupper(s[i]);
| ~~~~^~~~~~~~~~~~~~
a.cc:11:29: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int'
In file included from /usr/include/c++/14/string:48,
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:1:
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
448 | operator<(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed:
a.cc:11:42: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
11 | cout<toupper(s[i]);
| ^
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
493 | operator<(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed:
a.cc:11:42: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
11 | cout<toupper(s[i]);
| ^
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1694 | operator<(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed:
a.cc:11:42: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
11 | cout<toupper(s[i]);
| ^
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1760 | operator<(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed:
a.cc:11:42: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
11 | cout<toupper(s[i]);
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/string:51:
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed:
a.cc:11:42: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::pair<_T1, _T2>'
11 | cout<toupper(s[i]);
| ^
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54:
/usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
673 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed:
a.cc:11:42: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
11 | cout<toupper(s[i]);
| ^
/usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
680 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed:
a.cc:11:42: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
11 | cout<toupper(s[i]);
| ^
/usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)'
688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed:
a.cc:11:42: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int'
11 | cout<toupper(s[i]);
| ^
/usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed:
a.cc:11:42: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
11 | cout<toupper(s[i]);
| ^
/usr/include/c++/14/bits/basic_string.h:3888:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3888 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3888:5: note: template argument deduction/substitution failed:
a.cc:11:42: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
11 | cout<toupper(s[i]);
| ^
/usr/include/c++/14/bits/basic_string.h:3901:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3901 | operator<(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3901:5: note: template argument deduction/substitution failed:
a.cc:11:42: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>'
11 | cout<toupper(s[i]);
| ^
In file included from /usr/include/c++/14/bits/memory_resource.h:47,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/tuple:2600:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator<(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)'
2600 | operator<(const tuple<_TElements...>& __t,
| ^~~~~~~~
/usr/include/c++/14/tuple:2600:5: note: template argument deduction/substitution failed:
a.cc:11:42: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::tuple<_UTypes ...>'
11 | cout<toupper(s[i]);
| ^
In file included from /usr/include/c++/14/bits/ios_base.h:46:
/usr/include/c++/14/system_error:324:3: note: candidate: 'bool std::operator<(const error_code&, const error_code&)'
324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept
| ^~~~~~~~
/usr/include/c++/14/system_error:324:31: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'const std::error_code&'
324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept
| ~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/system_error:507:3: note: candidate: 'bool std::operator<(const error_condition&, const error_condition&)'
507 | operator<(const error_condition& __lhs,
| ^~~~~~~~
/usr/include/c++/14/system_error:507:36: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'const std::error_condition&'
507 | operator<(const error_condition& __lhs,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
|
s800338021
|
p00020
|
C++
|
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int
main ()
{
string str;
string table[2] =
{ "abcdefghijklmnopqrstuvwxyz",
"ABCDEFGHIJKLMNOPQRSTUVWXYZ" };
getline (cin, str);
for (auto & e:str)
{
int buf =
find (table[0].begin (), table[0].end (), e) - table[0].begin ();
if (buf != table[0].size ())
e = table[1][buf];
}
cout << str << endl;
}
|
a.cc:13:1: error: extended character is not valid in an identifier
13 | "ABCDEFGHIJKLMNOPQRSTUVWXYZ" };
| ^
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: In function 'int main()':
a.cc:13:1: error: '\U00003000\U00003000\U00003000\U00003000' was not declared in this scope
13 | "ABCDEFGHIJKLMNOPQRSTUVWXYZ" };
| ^~~~~~~~
a.cc:13:9: error: expected '}' before string constant
13 | "ABCDEFGHIJKLMNOPQRSTUVWXYZ" };
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:12:5: note: to match this '{'
12 | { "abcdefghijklmnopqrstuvwxyz",
| ^
a.cc:13:9: error: expected ',' or ';' before string constant
13 | "ABCDEFGHIJKLMNOPQRSTUVWXYZ" };
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc: At global scope:
a.cc:14:11: error: expected constructor, destructor, or type conversion before '(' token
14 | getline (cin, str);
| ^
a.cc:15:1: error: expected unqualified-id before 'for'
15 | for (auto & e:str)
| ^~~
a.cc:22:3: error: 'cout' does not name a type
22 | cout << str << endl;
| ^~~~
a.cc:23:1: error: expected declaration before '}' token
23 | }
| ^
|
s020329075
|
p00021
|
Java
|
import java.util.Scanner;
/**
* AOJ id=0021
* Parallelism
* @author scache
*
*/
public class Main0021 {
public static void main(String[] args) {
Main0021 p = new Main0021();
}
public Main0021() {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
for(int a=0;a<n;a++){
double[] x =new double[2];
double[] y =new double[2];
for(int i=0;i<4;i++){
int sign = i%2==0 ? 1:-1;
x[i/2] += sc.nextDouble() *sign;
y[i/2] += sc.nextDouble() *sign;
}
solve(x, y);
}
}
public void solve(double[] x, double[] y) {
System.out.println(x[0]*y[1]==x[1]*y[0] ? "YES" : "NO");
}
}
|
Main.java:10: error: class Main0021 is public, should be declared in a file named Main0021.java
public class Main0021 {
^
1 error
|
s741970872
|
p00021
|
Java
|
import java.util.Scanner;
public class P0021 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
for (int i = 0; i < n; i++) {
double[] p = new double[8];
// 座標入力
for (int j = 0; j < 8; j++) {
p[j] = sc.nextDouble();
}
// 傾き
double a1 = (p[3] - p[1]) / (p[2] - p[0]);
double a2 = (p[7] - p[5]) / (p[6] - p[4]);
// 判定
if (a1 == a2) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
}
}
|
Main.java:3: error: class P0021 is public, should be declared in a file named P0021.java
public class P0021 {
^
1 error
|
s587969820
|
p00021
|
Java
|
import java.util.Scanner;
public class P0021 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
for (int i = 0; i < n; i++) {
double[] p = new double[8];
// 座標入力
for (int j = 0; j < 8; j++) {
p[j] = sc.nextDouble();
}
// 傾き
double a1 = (p[3] - p[1]) / (p[2] - p[0]);
double a2 = (p[7] - p[5]) / (p[6] - p[4]);
// 判定
if (a1 == a2) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
}
|
Main.java:26: error: reached end of file while parsing
}
^
1 error
|
s388652375
|
p00021
|
Java
|
import java.util.Scanner;
import java.util.Vector;
class Main{
public static void main(String[] av){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
Vector<Double> vec = new Vector<Double>();
while(sc.hasNextDouble()){
double x1 = sc.nextDouble();
double y1 = sc.nextDouble();
double x2 = sc.nextDouble();
double y2 = sc.nextDouble();
double x3 = sc.nextDouble();
double y3 = sc.nextDouble();
double x4 = sc.nextDouble();
double y4 = sc.nextDouble();
if ( y1 = y2 && y3 == y4 ){
System.out.println("YES");
continue;
}
if ( x1 = x2 && x3 == x4 ){
System.out.println("YES");
continue;
}
double coefAB = (Math.max(y1,y2)-Math.min(y1,y2))/(Math.max(x1,x2)-Math.min(x1,x2));
double coefCD = (Math.max(y3,y4)-Math.min(y3,y4))/(Math.max(x3,x4)-Math.min(x3,x4));
if ( coefAB == coefCD ){
System.out.println("YES");
}else{
System.out.println("NO");
}
}
}
}
|
Main.java:24: error: bad operand types for binary operator '&&'
if ( y1 = y2 && y3 == y4 ){
^
first type: double
second type: boolean
Main.java:24: error: incompatible types: double cannot be converted to boolean
if ( y1 = y2 && y3 == y4 ){
^
Main.java:28: error: bad operand types for binary operator '&&'
if ( x1 = x2 && x3 == x4 ){
^
first type: double
second type: boolean
Main.java:28: error: incompatible types: double cannot be converted to boolean
if ( x1 = x2 && x3 == x4 ){
^
4 errors
|
s152523816
|
p00021
|
Java
|
public static void main(String[] args) {
Scanner sc = null;
int dataSet = 0;
double x1 = 0.0;
double y1 = 0.0;
double x2 = 0.0;
double y2 = 0.0;
double x3 = 0.0;
double y3 = 0.0;
double x4 = 0.0;
double y4 = 0.0;
try {
sc = new Scanner(System.in);
while (sc.hasNextInt()) {
dataSet = sc.nextInt();
for (int i = 0; i < dataSet; i++) {
x1 = sc.nextDouble();
y1 = sc.nextDouble();
x2 = sc.nextDouble();
y2 = sc.nextDouble();
x3 = sc.nextDouble();
y3 = sc.nextDouble();
x4 = sc.nextDouble();
y4 = sc.nextDouble();
if (((y2 - y1) / (x2 - x1)) == ((y4 - y3) / (x4 - x3))) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
}
} finally {
sc.close();
}
}
}
|
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) {
^
(use --enable-preview to enable unnamed classes)
Main.java:37: error: class, interface, enum, or record expected
}
^
2 errors
|
s931290932
|
p00021
|
Java
|
class Main {
public static void main(String[] args) {
Scanner sc = null;
try {
sc = new Scanner(System.in);
while (sc.hasNextInt()) {
int dataSet = sc.nextInt();
for (int i = 0; i < dataSet; i++) {
double x1 = sc.nextDouble();
double y1 = sc.nextDouble();
double x2 = sc.nextDouble();
double y2 = sc.nextDouble();
double x3 = sc.nextDouble();
double y3 = sc.nextDouble();
double x4 = sc.nextDouble();
double y4 = sc.nextDouble();
if (((y1 - y2) / (x1 - x2)) == ((y3 - y4) / (x3 - x4))) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
}
} finally {
sc.close();
}
}
}
|
Main.java:5: error: cannot find symbol
Scanner sc = null;
^
symbol: class Scanner
location: class Main
Main.java:7: error: cannot find symbol
sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s795737238
|
p00021
|
Java
|
class Main {
public static void main(String[] args) {
Scanner sc = null;
try {
sc = new Scanner(System.in);
while (sc.hasNextInt()) {
int dataset = sc.nextInt();
double[] numbers = new double[8];
for (int i = 0; i < dataset; i++) {
while (sc.hasNextDouble()) {
numbers[i] = sc.nextDouble();
if ((numbers[0] == numbers[2])
&& (numbers[4] == numbers[6])) {
System.out.println("YES");
} else if ((numbers[1] == numbers[3])
&& (numbers[5] == numbers[7])) {
System.out.println("YES");
} else if ((numbers[3] - numbers[1])
/ (numbers[2] - numbers[0]) == (numbers[7]
- numbers[5] / numbers[6] - numbers[4])) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
}
}
} finally {
sc.close();
}
}
}
|
Main.java:5: error: cannot find symbol
Scanner sc = null;
^
symbol: class Scanner
location: class Main
Main.java:7: error: cannot find symbol
sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s405141869
|
p00021
|
Java
|
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String str;
int n=Integer.parseInt(br.readLine());
for(int i=0;i<n;i++){
str=br.readLine();
String[] s=str.split(" ");
double x1=Double.parseDouble(s[0]);
double y1=Double.parseDouble(s[1]);
double x2=Double.parseDouble(s[2]);
double y2=Double.parseDouble(s[3]);
double x3=Double.parseDouble(s[4]);
double y3=Double.parseDouble(s[5]);
double x4=Double.parseDouble(s[6]);
double y4=Double.parseDouble(s[7]);
if((x1-x2)*(y3-y4)==(y1-y2)*(x3-x4)){
System.out.println("YES");
}
else{
System.out.println("NO")
}
}
}
}
|
Main.java:25: error: ';' expected
System.out.println("NO")
^
1 error
|
s013029003
|
p00021
|
Java
|
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
int n=Integer.parseInt(br.readLine());
for(int i=0;i<n;i++){
String line = reader.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]);
double det = (x2 - x1) * (y4 - y3) - (y2 - y1) * (x4 - x3);
System.out.println(det == 0.0 ? "YES" : "NO");
}
}
}
|
Main.java:10: error: cannot find symbol
String line = reader.readLine();
^
symbol: variable reader
location: class Main
1 error
|
s444071848
|
p00021
|
Java
|
import java.io.*;
class Main{
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine());
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]);
double det = (x2 - x1) * (y4 - y3) - (y2 - y1) * (x4 - x3);
Systemout.println(det == 0.0 ? "YES" : "NO"); }
}
}
|
Main.java:20: error: cannot find symbol
Systemout.println(det == 0.0 ? "YES" : "NO"); }
^
symbol: variable Systemout
location: class Main
1 error
|
s741599808
|
p00021
|
Java
|
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");
}
}
}
|
Main.java:9: error: variable line is already defined in method main(String[])
String line = br.readLine();
^
1 error
|
s266499998
|
p00021
|
Java
|
import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = sc.nextInt();
double x[] = new double[4];
double y[] = new double[4];
for(int j=0; j<n; j++){
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");
}
}
}
|
Main.java:6: error: cannot find symbol
int n = sc.nextInt();
^
symbol: variable sc
location: class Main
Main.java:11: error: cannot find symbol
x[i] = sc.nextDouble();
^
symbol: variable sc
location: class Main
Main.java:12: error: cannot find symbol
y[i] = sc.nextDouble();
^
symbol: variable sc
location: class Main
3 errors
|
s799233304
|
p00021
|
Java
|
public class Main{
public void run(java.io.InputStream in, java.io.PrintStream out){
java.util.Scanner sc = new java.util.Scanner(in);
int n, i;
double x1, y1, x2, y2, x3, y3, x4, y4;
n = sc.nextInt();
for(i = 0;i < n;i++){
x1 = sc.nextDouble(); y1 = sc.nextDouble();
x2 = sc.nextDouble(); y2 = sc.nextDouble();
x3 = sc.nextDouble(); y3 = sc.nextDouble();
x4 = sc.nextDouble(); y4 = sc.nextDouble();
l1x = x2 - x1; l1y = y2 - y1;
l2x = x4 - x3; l2y = y4 - y3;
if(l1y * l2x == l2y * l1x)out.println("YES");
else out.println("NO");
}
sc.close();
}
public static void main(String[] args){
(new Main()).run(System.in, System.out);
}
}
|
Main.java:14: error: cannot find symbol
l1x = x2 - x1; l1y = y2 - y1;
^
symbol: variable l1x
location: class Main
Main.java:14: error: cannot find symbol
l1x = x2 - x1; l1y = y2 - y1;
^
symbol: variable l1y
location: class Main
Main.java:15: error: cannot find symbol
l2x = x4 - x3; l2y = y4 - y3;
^
symbol: variable l2x
location: class Main
Main.java:15: error: cannot find symbol
l2x = x4 - x3; l2y = y4 - y3;
^
symbol: variable l2y
location: class Main
Main.java:17: error: cannot find symbol
if(l1y * l2x == l2y * l1x)out.println("YES");
^
symbol: variable l1y
location: class Main
Main.java:17: error: cannot find symbol
if(l1y * l2x == l2y * l1x)out.println("YES");
^
symbol: variable l2x
location: class Main
Main.java:17: error: cannot find symbol
if(l1y * l2x == l2y * l1x)out.println("YES");
^
symbol: variable l2y
location: class Main
Main.java:17: error: cannot find symbol
if(l1y * l2x == l2y * l1x)out.println("YES");
^
symbol: variable l1x
location: class Main
8 errors
|
s728075798
|
p00021
|
Java
|
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
while(n--!=0){
double[] a = new double[8];
for(int i=0;i<8;i++)a[i]=sc.nextDouble();
double e = (a[2]-a[0])*(a[7]-a[5])-(a[3]-a[1])*(a[6]-a[4]);
System.out.println(e==0?"YES":"NO");
}
}
}
|
Main.java:4: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:4: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s036564546
|
p00021
|
Java
|
import java.util.Scanner;
public class Parallelism {
public static void main(String[] args) {
@SuppressWarnings("resource")
Scanner sc = new Scanner(System.in);
int inputNum = sc.nextInt();
for (int i = 0; i < inputNum; i++) {
double x1 = sc.nextDouble();
double y1 = sc.nextDouble();
double x2 = sc.nextDouble();
double y2 = sc.nextDouble();
double x3 = sc.nextDouble();
double y3 = sc.nextDouble();
double x4 = sc.nextDouble();
double y4 = sc.nextDouble();
double slopeA = (y2 - y1) / (x2 - x1);
double slopeB = (y4 - y3) / (x4 - x3);
if (slopeA == slopeB) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
}
}
|
Main.java:3: error: class Parallelism is public, should be declared in a file named Parallelism.java
public class Parallelism {
^
1 error
|
s429026508
|
p00021
|
Java
|
import java.util.Scanner;
public class Ma {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
for(int i = 0; i < n; i++){
double x1 = sc.nextDouble();
double y1 = sc.nextDouble();
double x2 = sc.nextDouble();
double y2 = sc.nextDouble();
double x3 = sc.nextDouble();
double y3 = sc.nextDouble();
double x4 = sc.nextDouble();
double y4 = sc.nextDouble();
if(x2-x1 == x4 - x3)
if(y2 - y1 == y4 - y3)
System.out.println("Yes");
else
System.out.println("No");
else
System.out.println("No");
}
}
}
|
Main.java:2: error: class Ma is public, should be declared in a file named Ma.java
public class Ma {
^
1 error
|
s171075632
|
p00021
|
Java
|
import java.util.Scanner;
public class Ma {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
for(int i = 0; i < n; i++){
double x1 = sc.nextDouble();
double y1 = sc.nextDouble();
double x2 = sc.nextDouble();
double y2 = sc.nextDouble();
double x3 = sc.nextDouble();
double y3 = sc.nextDouble();
double x4 = sc.nextDouble();
double y4 = sc.nextDouble();
if(x2-x1 == x4 - x3){
if(y2 - y1 == y4 - y3){
System.out.println("Yes");
}else{
System.out.println("No");
}
}else{
System.out.println("No");
}
}
}
}
|
Main.java:2: error: class Ma is public, should be declared in a file named Ma.java
public class Ma {
^
1 error
|
s741032263
|
p00021
|
Java
|
public class Main {
public static void main(String[] args) {
print();
}
public static void print() {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int amountOfDataset = Integer.parseInt(br.readLine());
String str = br.readLine();
for (int i = 0; i < amountOfDataset; i++) {
String[] nums = str.split(" ", 0);
double x1 = Double.parseDouble(nums[0]);
double y1 = Double.parseDouble(nums[1]);
double x2 = Double.parseDouble(nums[2]);
double y2 = Double.parseDouble(nums[3]);
double x3 = Double.parseDouble(nums[4]);
double y3 = Double.parseDouble(nums[5]);
double x4 = Double.parseDouble(nums[6]);
double y4 = Double.parseDouble(nums[7]);
double slopeAB = (y2 - y1) / (x2 - x1);
double slopeCD = (y4 - y3) / (x4 - x3);
if (slopeAB == slopeCD) {
System.out.println("YES");
} else {
System.out.println("NO");
}
str = br.readLine();
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
|
Main.java:8: error: cannot find symbol
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
symbol: class BufferedReader
location: class Main
Main.java:8: error: cannot find symbol
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
symbol: class BufferedReader
location: class Main
Main.java:8: error: cannot find symbol
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
symbol: class InputStreamReader
location: class Main
Main.java:33: error: cannot find symbol
} catch (IOException e) {
^
symbol: class IOException
location: class Main
4 errors
|
s524985057
|
p00021
|
Java
|
public class Main {
public static void main(String[] args) {
print();
}
public static void print() {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int amountOfDataset = Integer.parseInt(br.readLine());
for (int i = 0; i < amountOfDataset; i++) {
String str = br.readLine();
String[] nums = str.split(" ", 0);
double x1 = Double.parseDouble(nums[0]);
double y1 = Double.parseDouble(nums[1]);
double x2 = Double.parseDouble(nums[2]);
double y2 = Double.parseDouble(nums[3]);
double x3 = Double.parseDouble(nums[4]);
double y3 = Double.parseDouble(nums[5]);
double x4 = Double.parseDouble(nums[6]);
double y4 = Double.parseDouble(nums[7]);
double slopeAB = (y2 - y1) / (x2 - x1);
double slopeCD = (y4 - y3) / (x4 - x3);
if (slopeAB == slopeCD) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
|
Main.java:8: error: cannot find symbol
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
symbol: class BufferedReader
location: class Main
Main.java:8: error: cannot find symbol
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
symbol: class BufferedReader
location: class Main
Main.java:8: error: cannot find symbol
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
symbol: class InputStreamReader
location: class Main
Main.java:33: error: cannot find symbol
} catch (IOException e) {
^
symbol: class IOException
location: class Main
4 errors
|
s834754239
|
p00021
|
Java
|
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.math.BigDecimal;
import java.math.MathContext;
import java.util.StringTokenizer;
public class Math{
public static void main(String[] args) {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringBuilder sb = new StringBuilder();
StringTokenizer st;
try {
String line;
int n = Integer.parseInt(br.readLine());
for (int i = 0; i < n; i++) {
line = br.readLine();
st = new StringTokenizer(line);
MathContext mc = new MathContext(10);
BigDecimal x1 = new BigDecimal(st.nextToken());
BigDecimal y1 = new BigDecimal(st.nextToken());
BigDecimal x2 = new BigDecimal(st.nextToken());
BigDecimal y2 = new BigDecimal(st.nextToken());
BigDecimal x3 = new BigDecimal(st.nextToken());
BigDecimal y3 = new BigDecimal(st.nextToken());
BigDecimal x4 = new BigDecimal(st.nextToken());
BigDecimal y4 = new BigDecimal(st.nextToken());
BigDecimal a1 = y2.subtract(y1);
BigDecimal b1 = x1.subtract(x2);
BigDecimal a2 = y4.subtract(y3);
BigDecimal b2 = x3.subtract(x4);
if (a1.multiply(b2, mc) == a2.multiply(b1, mc)) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
|
Main.java:7: error: class Math is public, should be declared in a file named Math.java
public class Math{
^
1 error
|
s961468837
|
p00021
|
Java
|
import java.util.Scanner;
public class Main {
private Scanner sc;
public static void main(String[] args) {
new Main();
}
public Main() {
sc = new Scanner(System.in);
int nico = Integer.parseInt(sc.nextLine());
for (int i = 0; i < nico; i++) {
String[] params = sc.nextLine().split(" ");
double[] points = new double[8];
for (int j = 0; j < points.length; j++) {
points[j] = Double.parseDouble(params[j]);
}
double dx0 = points[2] - points[0];
double dy0 = points[3] - points[1];
double dx1 = points[6] - points[4];
double dy1 = points[7] - points[5];
double d = (dx0 * dy1 - dy0 * dx1) * 10000000000;
if (d == 0.0) System.out.println("YES");
else System.out.println("NO");
}
}
}
|
Main.java:27: error: integer number too large
double d = (dx0 * dy1 - dy0 * dx1) * 10000000000;
^
1 error
|
s458499760
|
p00021
|
Java
|
import java.util.*;
import java.math.*;
public class Main{
private static final Scanner scan = new Scanner(System.in);
public static void main(String[] args){
List<String> list = new ArrayList<String>();
int n = scan.nextInt();
for(int i = 0; i < n; i++){
BigDecimal x1 = scan.nextBigDecimal();
BigDecimal y1 = scan.nextBigDecimal();
BigDecimal x2 = scan.nextBigDecimal();
BigDecimal y2 = scan.nextBigDecimal();
BigDecimal x3 = scan.nextBigDecimal();
BigDecimal y3 = scan.nextBigDecimal();
BigDecimal x4 = scan.nextBigDecimal();
BigDecimal y4 = scan.nextBigDecimal();
BigDecimal ax = x2.subtract(x1);
BigDecimal ay = y2.subtract(y1);
BigDecimal bx = x4.subtract(x3);
BigDecimal by = y4.subtract(y3);
BigDecimal thetaA = Math.abs(ax) * Math.tan(Math.abs(ay)
/ Math.abs(ax));
BigDecimal thetaB = Math.abs(bx) * Math.tan(Math.abs(by)
/ Math.abs(bx));
if(thetaA == thetaB){
list.add("YES");
} else{
list.add("NO");
}
}
for(String s : list){
System.out.printf("%s\n", s);
}
}
}
|
Main.java:27: error: no suitable method found for abs(BigDecimal)
BigDecimal thetaA = Math.abs(ax) * Math.tan(Math.abs(ay)
^
method Math.abs(int) is not applicable
(argument mismatch; BigDecimal cannot be converted to int)
method Math.abs(long) is not applicable
(argument mismatch; BigDecimal cannot be converted to long)
method Math.abs(float) is not applicable
(argument mismatch; BigDecimal cannot be converted to float)
method Math.abs(double) is not applicable
(argument mismatch; BigDecimal cannot be converted to double)
Main.java:27: error: no suitable method found for abs(BigDecimal)
BigDecimal thetaA = Math.abs(ax) * Math.tan(Math.abs(ay)
^
method Math.abs(int) is not applicable
(argument mismatch; BigDecimal cannot be converted to int)
method Math.abs(long) is not applicable
(argument mismatch; BigDecimal cannot be converted to long)
method Math.abs(float) is not applicable
(argument mismatch; BigDecimal cannot be converted to float)
method Math.abs(double) is not applicable
(argument mismatch; BigDecimal cannot be converted to double)
Main.java:28: error: no suitable method found for abs(BigDecimal)
/ Math.abs(ax));
^
method Math.abs(int) is not applicable
(argument mismatch; BigDecimal cannot be converted to int)
method Math.abs(long) is not applicable
(argument mismatch; BigDecimal cannot be converted to long)
method Math.abs(float) is not applicable
(argument mismatch; BigDecimal cannot be converted to float)
method Math.abs(double) is not applicable
(argument mismatch; BigDecimal cannot be converted to double)
Main.java:29: error: no suitable method found for abs(BigDecimal)
BigDecimal thetaB = Math.abs(bx) * Math.tan(Math.abs(by)
^
method Math.abs(int) is not applicable
(argument mismatch; BigDecimal cannot be converted to int)
method Math.abs(long) is not applicable
(argument mismatch; BigDecimal cannot be converted to long)
method Math.abs(float) is not applicable
(argument mismatch; BigDecimal cannot be converted to float)
method Math.abs(double) is not applicable
(argument mismatch; BigDecimal cannot be converted to double)
Main.java:29: error: no suitable method found for abs(BigDecimal)
BigDecimal thetaB = Math.abs(bx) * Math.tan(Math.abs(by)
^
method Math.abs(int) is not applicable
(argument mismatch; BigDecimal cannot be converted to int)
method Math.abs(long) is not applicable
(argument mismatch; BigDecimal cannot be converted to long)
method Math.abs(float) is not applicable
(argument mismatch; BigDecimal cannot be converted to float)
method Math.abs(double) is not applicable
(argument mismatch; BigDecimal cannot be converted to double)
Main.java:30: error: no suitable method found for abs(BigDecimal)
/ Math.abs(bx));
^
method Math.abs(int) is not applicable
(argument mismatch; BigDecimal cannot be converted to int)
method Math.abs(long) is not applicable
(argument mismatch; BigDecimal cannot be converted to long)
method Math.abs(float) is not applicable
(argument mismatch; BigDecimal cannot be converted to float)
method Math.abs(double) is not applicable
(argument mismatch; BigDecimal cannot be converted to double)
6 errors
|
s742721208
|
p00021
|
Java
|
import java.util.*;
import java.math.*;
public class Main{
private static final Scanner scan = new Scanner(System.in);
public static void main(String[] args){
List<String> list = new ArrayList<String>();
int n = scan.nextInt();
for(int i = 0; i < n; i++){
BigDecimal x1 = scan.nextBigDecimal();
BigDecimal y1 = scan.nextBigDecimal();
BigDecimal x2 = scan.nextBigDecimal();
BigDecimal y2 = scan.nextBigDecimal();
BigDecimal x3 = scan.nextBigDecimal();
BigDecimal y3 = scan.nextBigDecimal();
BigDecimal x4 = scan.nextBigDecimal();
BigDecimal y4 = scan.nextBigDecimal();
BigDecimal ax = x2.subtract(x1);
BigDecimal ay = y2.subtract(y1);
BigDecimal bx = x4.subtract(x3);
BigDecimal by = y4.subtract(y3);
BigDecimal thetaA = ax * Math.tan(ay / ax);
BigDecimal thetaB = bx * Math.tan(by / bx);
if(thetaA == thetaB){
list.add("YES");
} else{
list.add("NO");
}
}
for(String s : list){
System.out.printf("%s\n", s);
}
}
}
|
Main.java:27: error: bad operand types for binary operator '/'
BigDecimal thetaA = ax * Math.tan(ay / ax);
^
first type: BigDecimal
second type: BigDecimal
Main.java:28: error: bad operand types for binary operator '/'
BigDecimal thetaB = bx * Math.tan(by / bx);
^
first type: BigDecimal
second type: BigDecimal
2 errors
|
s296160144
|
p00021
|
Java
|
import java.util.*;
import java.math.*;
public class Main{
private static final Scanner scan = new Scanner(System.in);
public static void main(String[] args){
List<String> list = new ArrayList<String>();
int n = scan.nextInt();
for(int i = 0; i < n; i++){
BigDecimal x1 = scan.nextBigDecimal();
BigDecimal y1 = scan.nextBigDecimal();
BigDecimal x2 = scan.nextBigDecimal();
BigDecimal y2 = scan.nextBigDecimal();
BigDecimal x3 = scan.nextBigDecimal();
BigDecimal y3 = scan.nextBigDecimal();
BigDecimal x4 = scan.nextBigDecimal();
BigDecimal y4 = scan.nextBigDecimal();
BigDecimal ax = x2.subtract(x1);
BigDecimal ay = y2.subtract(y1);
BigDecimal bx = x4.subtract(x3);
BigDecimal by = y4.subtract(y3);
BigDecimal thetaA = ax * Math.tan(ay.divide(ax));
BigDecimal thetaB = bx * Math.tan(by.divide(bx));
if(thetaA == thetaB){
list.add("YES");
} else{
list.add("NO");
}
}
for(String s : list){
System.out.printf("%s\n", s);
}
}
}
|
Main.java:27: error: incompatible types: BigDecimal cannot be converted to double
BigDecimal thetaA = ax * Math.tan(ay.divide(ax));
^
Main.java:28: error: incompatible types: BigDecimal cannot be converted to double
BigDecimal thetaB = bx * Math.tan(by.divide(bx));
^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
2 errors
|
s417154647
|
p00021
|
Java
|
import java.util.*;
import java.math.*;
public class Main{
private static final Scanner scan = new Scanner(System.in);
public static void main(String[] args){
List<String> list = new ArrayList<String>();
int n = scan.nextInt();
for(int i = 0; i < n; i++){
BigDecimal x1 = scan.nextBigDecimal();
BigDecimal y1 = scan.nextBigDecimal();
BigDecimal x2 = scan.nextBigDecimal();
BigDecimal y2 = scan.nextBigDecimal();
BigDecimal x3 = scan.nextBigDecimal();
BigDecimal y3 = scan.nextBigDecimal();
BigDecimal x4 = scan.nextBigDecimal();
BigDecimal y4 = scan.nextBigDecimal();
BigDecimal ax = x2.subtract(x1);
BigDecimal ay = y2.subtract(y1);
BigDecimal bx = x4.subtract(x3);
BigDecimal by = y4.subtract(y3);
BigDecimal thetaA = ax.multiply(Math.tan(ay.divide(ax)));
BigDecimal thetaB = bx.multiply(Math.tan(by.divide(bx)));
if(thetaA == thetaB){
list.add("YES");
} else{
list.add("NO");
}
}
for(String s : list){
System.out.printf("%s\n", s);
}
}
}
|
Main.java:27: error: incompatible types: BigDecimal cannot be converted to double
BigDecimal thetaA = ax.multiply(Math.tan(ay.divide(ax)));
^
Main.java:28: error: incompatible types: BigDecimal cannot be converted to double
BigDecimal thetaB = bx.multiply(Math.tan(by.divide(bx)));
^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
2 errors
|
s578412264
|
p00021
|
Java
|
import java.util.*;
import java.math.*;
public class Main{
private static final Scanner scan = new Scanner(System.in);
public static void main(String[] args){
List<String> list = new ArrayList<String>();
int n = scan.nextInt();
for(int i = 0; i < n; i++){
BigDecimal x1 = scan.nextBigDecimal();
BigDecimal y1 = scan.nextBigDecimal();
BigDecimal x2 = scan.nextBigDecimal();
BigDecimal y2 = scan.nextBigDecimal();
BigDecimal x3 = scan.nextBigDecimal();
BigDecimal y3 = scan.nextBigDecimal();
BigDecimal x4 = scan.nextBigDecimal();
BigDecimal y4 = scan.nextBigDecimal();
BigDecimal ax = x2.subtract(x1);
BigDecimal ay = y2.subtract(y1);
BigDecimal bx = x4.subtract(x3);
BigDecimal by = y4.subtract(y3);
BigDecimal t = ax.multiply(by);
BigDecimal tB = ay.multiply(bx);
boolean flag = t.compareTo(tB);
list.add(flag? "YES" : "NO");
}
for(String s : list){
System.out.printf("%s\n", s);
}
}
}
|
Main.java:30: error: incompatible types: int cannot be converted to boolean
boolean flag = t.compareTo(tB);
^
1 error
|
s311607007
|
p00021
|
Java
|
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = Integer.parseInt(sc.nextLine());
for (int i = 0; i < n; i++) {
String input = sc.nextLine();
String[] values = input.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]);
double det = (x2 - x1) * (y4 - y3) - (y2 - y1) * (x4 - x3);
System.out.println(det == 0.0 ? "YES" : "NO");
}
}
}
|
Main.java:3: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:3: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s319462121
|
p00021
|
Java
|
public class Main{
public static void main(String args[]) {
Scanner scn = new Scanner(System.in);
double x1, y1, x2, y2, x3, y3, x4, y4;
int n = scn.nextInt();
for (int i = 0; i < n; i++) {
x1 = scn.nextDouble();
y1 = scn.nextDouble();
x2 = scn.nextDouble();
y2 = scn.nextDouble();
x3 = scn.nextDouble();
y3 = scn.nextDouble();
x4 = scn.nextDouble();
y4 = scn.nextDouble();
if ((x1 - x2) * (y3 - y4) == (x3 - x4) * (y1 - y2)) {
System.out.println("Yes");
} else {
System.out.println("No");
}
}
scn.close();
}
}
|
Main.java:4: error: cannot find symbol
Scanner scn = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:4: error: cannot find symbol
Scanner scn = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s435456665
|
p00021
|
Java
|
import java.io.*;
public class Main {
public static void main(String[] args) throws IOException {
int n = ReadString.readInt();
for(int i = 0; i < n; i++){
double[] arr = ReadString.readDoubleArray(8);
Point p1 = new Point(arr[0], arr[1]);
Point p2 = new Point(arr[2], arr[3]);
Point p3 = new Point(arr[4], arr[5]);
Point p4 = new Point(arr[6], arr[7]);
System.out.println(katamuki(p1, p2) +" "+ katamuki(p3, p4));
if(parallel(katamuki(p1, p2) , katamuki(p3, p4)))
System.out.println("YES");
else
System.out.println("NO");
}
}
static double katamuki(Point p1, Point p2){
double k = (p2.y-p1.y) / (p2.x-p1.x);
return k;
}
static boolean parallel(double a, double b){
if(a == b)
return true;
else
return false;
}
}
class ReadString {
static int readInt() throws IOException{
InputStreamReader is = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(is);
return Integer.parseInt(br.readLine());
}
static double[] readDoubleArray(int n) throws IOException{
InputStreamReader is = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(is);
String c = br.readLine();
double[] arr = new double[n];
for(int i = 0; i < n; i++){
if(c.indexOf(" ") != -1){
String str = c.substring(0, c.indexOf(" "));
arr[i] = Double.parseDouble(str);
c = c.substring(c.indexOf(" ")+1);
}
else{
arr[i] = Double.parseDouble(c);
}
}
return arr.clone();
}
}
|
Main.java:20: error: cannot find symbol
static double katamuki(Point p1, Point p2){
^
symbol: class Point
location: class Main
Main.java:20: error: cannot find symbol
static double katamuki(Point p1, Point p2){
^
symbol: class Point
location: class Main
Main.java:9: error: cannot find symbol
Point p1 = new Point(arr[0], arr[1]);
^
symbol: class Point
location: class Main
Main.java:9: error: cannot find symbol
Point p1 = new Point(arr[0], arr[1]);
^
symbol: class Point
location: class Main
Main.java:10: error: cannot find symbol
Point p2 = new Point(arr[2], arr[3]);
^
symbol: class Point
location: class Main
Main.java:10: error: cannot find symbol
Point p2 = new Point(arr[2], arr[3]);
^
symbol: class Point
location: class Main
Main.java:11: error: cannot find symbol
Point p3 = new Point(arr[4], arr[5]);
^
symbol: class Point
location: class Main
Main.java:11: error: cannot find symbol
Point p3 = new Point(arr[4], arr[5]);
^
symbol: class Point
location: class Main
Main.java:12: error: cannot find symbol
Point p4 = new Point(arr[6], arr[7]);
^
symbol: class Point
location: class Main
Main.java:12: error: cannot find symbol
Point p4 = new Point(arr[6], arr[7]);
^
symbol: class Point
location: class Main
10 errors
|
s263883312
|
p00021
|
Java
|
import java.util.Scanner;
//Parallelism
public class l{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
while(n--!=0){
double[] a = new double[8];
for(int i=0;i<8;i++)a[i]=sc.nextDouble();
double e = (a[2]-a[0])*(a[7]-a[5])-(a[3]-a[1])*(a[6]-a[4]);
System.out.println(e==0?"YES":"NO");
}
}
}
|
Main.java:4: error: illegal character: '\u0082'
public class ?l??????{
^
1 error
|
s484378999
|
p00021
|
Java
|
import java.util.Scanner;
import java.lang.Double;
class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int num = s.nextInt();
for(int i=0 ; i<num ; i++){
Double a[] = new Double[8];
Double b,c;
for(int j=0 ; j<8 ; j++)
a[j] = s.nextDouble();
if((a[2]-a[0])!=0)
b = (a[3]-a[1])/(a[2]-a[0]);
else
b = null;
if((a[6]-a[4])!=0)
c = (a[7]-a[5])/(a[6]-a[4]);
else
c = null;
if(b.compareTo(c)==0 || b.compareTo(-c)==0)
System.out.println("YES");
else
System.out.println("NO");
System.out.println(b+" "+c);
}
}
|
Main.java:27: error: reached end of file while parsing
}
^
1 error
|
s445211253
|
p00021
|
Java
|
import java.util.ArrayList;
import java.util.NoSuchElementException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
ArrayList<Point> points = new ArrayList<Point>(4);
ArrayList<String> results = new ArrayList<String>(1);
try{
while(true){
//4ÂÌÀWf[^ðüÍ©çæ¾·é
points.add(new Point(sc.nextDouble(), sc.nextDouble()));
points.add(new Point(sc.nextDouble(), sc.nextDouble()));
points.add(new Point(sc.nextDouble(), sc.nextDouble()));
points.add(new Point(sc.nextDouble(), sc.nextDouble()));
if(getSlope(points.get(0), points.get(1)) == getSlope(points.get(2), points.get(3))){
results.add("YES");
}
else{
results.add("NO");
}
}
}catch(NoSuchElementException e){
//hüÍÌIíèhªüͳê½êA½à¹¸ÉÌsÌðs¤
}
for(int i = 0; i < results.size(); i++){
System.out.println(results.get(i));
}
}
public static double getSlope(Point a, Point b){
boolean aHasBiggerX;
if(a.x > b.x){
aHasBiggerX = true;
}
else{
aHasBiggerX = false;
}
double valiationX;
if(aHasBiggerX){
valiationX = a.x - b.x;
}
else{
valiationX = b.x - a.x;
}
double valiationY;
if(aHasBiggerX){
valiationY = a.y - b.y;
}
else{
valiationY = b.y - a.y;
}
double slope = valiationY / valiationX;
if(slope == Double.NEGATIVE_INFINITY){
slope = Double.POSITIVE_INFINITY;
}
return slope;
}
}
|
Main.java:37: error: cannot find symbol
public static double getSlope(Point a, Point b){
^
symbol: class Point
location: class Main
Main.java:37: error: cannot find symbol
public static double getSlope(Point a, Point b){
^
symbol: class Point
location: class Main
Main.java:10: error: cannot find symbol
ArrayList<Point> points = new ArrayList<Point>(4);
^
symbol: class Point
location: class Main
Main.java:10: error: cannot find symbol
ArrayList<Point> points = new ArrayList<Point>(4);
^
symbol: class Point
location: class Main
Main.java:16: error: cannot find symbol
points.add(new Point(sc.nextDouble(), sc.nextDouble()));
^
symbol: class Point
location: class Main
Main.java:17: error: cannot find symbol
points.add(new Point(sc.nextDouble(), sc.nextDouble()));
^
symbol: class Point
location: class Main
Main.java:18: error: cannot find symbol
points.add(new Point(sc.nextDouble(), sc.nextDouble()));
^
symbol: class Point
location: class Main
Main.java:19: error: cannot find symbol
points.add(new Point(sc.nextDouble(), sc.nextDouble()));
^
symbol: class Point
location: class Main
8 errors
|
s699586216
|
p00021
|
Java
|
import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int number = sc.nextInt();
for(int i = 0;i < number ;i++){
double[] x = new double[4];
double[] y = new double[4];
x[0] = sc.nextDouble();
y[0] = sc.nextDouble();
x[1] = sc.nextDouble();
y[1] = sc.nextDouble();
x[2] = sc.nextDouble();
y[2] = sc.nextDouble();
x[3] = sc.nextDouble();
y[3] = sc.nextDouble();
double det = (x[1] - x[0]) * (y[3] - y[2]) - (y[1] - y[0]) * (x[3] - x[2]);
System.out.println(det == 0.0 ? "YES" : "NO");
}
}
|
Main.java:28: error: reached end of file while parsing
}
^
1 error
|
s733709287
|
p00021
|
Java
|
import java.util.Scanner;
public class Parallelism {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
double x1, y1, x2, y2, x3, y3, x4, y4;
double d12, d34;
for (int i = 0; i < n; i++) {
x1 = scan.nextDouble();
y1 = scan.nextDouble();
x2 = scan.nextDouble();
y2 = scan.nextDouble();
x3 = scan.nextDouble();
y3 = scan.nextDouble();
x4 = scan.nextDouble();
y4 = scan.nextDouble();
d12 = (y1 - y2) * (x3 - x4);
d34 = (y3 - y4) * (x1 - x2);
if (d12 - d34 ==0) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
}
}
|
Main.java:3: error: class Parallelism is public, should be declared in a file named Parallelism.java
public class Parallelism {
^
1 error
|
s523074647
|
p00021
|
C
|
#include<stdio.h>
int main(void){
float x1, y1, x2, y2, x3, y3, x4, y4, a, b;
int i, n;
scanf("%d", &n);
for(i=0;i<n;i++){
scanf("%f %f %f %f %f %f %f %f", &x1, &y1, &x2, &y2, &x3, &y3, &x4, &y4);
AB=(y1-y2)/(x1-x2);
CD=(y3-y4)/(x3-x4);
if(a==b)
printf("YES");
else
printf("NO");
}
return 0;
}
|
main.c: In function 'main':
main.c:13:3: error: 'AB' undeclared (first use in this function)
13 | AB=(y1-y2)/(x1-x2);
| ^~
main.c:13:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:3: error: 'CD' undeclared (first use in this function)
15 | CD=(y3-y4)/(x3-x4);
| ^~
|
s428271759
|
p00021
|
C
|
#include<stdio.h>
int main(void){
float x1, y1, x2, y2, x3, y3, x4, y4, a, b;
int i, n;
scanf("%d", &n);
for(i=0;i<n;i++){
scanf("%lf %lf %lf %lf %lf %lf %lf %lf", &x1, &y1, &x2, &y2, &x3, &y3, &x4, &y4);
AB=(y1-y2)/(x1-x2);
CD=(y3-y4)/(x3-x4);
if(a==b)
printf("YES\n");
else
printf("NO\n");
}
return 0;
}
|
main.c: In function 'main':
main.c:13:3: error: 'AB' undeclared (first use in this function)
13 | AB=(y1-y2)/(x1-x2);
| ^~
main.c:13:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:3: error: 'CD' undeclared (first use in this function)
15 | CD=(y3-y4)/(x3-x4);
| ^~
|
s521130180
|
p00021
|
C
|
#include<stdio.h>
int main(void){
float x1, y1, x2, y2, x3, y3, x4, y4, a, b;
int i, n;
scanf("%d", &n);
for(i=0;i<n;i+1){
scanf("%f %f %f %f %f %f %f %f", &x1, &y1, &x2, &y2, &x3, &y3, &x4, &y4);
AB=(y1-y2)/(x1-x2);
CD=(y3-y4)/(x3-x4);
if(a==b)
printf("YES\n");
else
printf("NO\n");
}
return 0;
}
|
main.c: In function 'main':
main.c:13:3: error: 'AB' undeclared (first use in this function)
13 | AB=(y1-y2)/(x1-x2);
| ^~
main.c:13:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:3: error: 'CD' undeclared (first use in this function)
15 | CD=(y3-y4)/(x3-x4);
| ^~
|
s194130288
|
p00021
|
C
|
#include<stdio.h>
int main(){
float x1, y1, x2, y2, x3, y3, x4, y4, a, b;
int i, n;
scanf("%d", &n);
for(i=0;i<n;i+1){
scanf("%f %f %f %f %f %f %f %f", &x1, &y1, &x2, &y2, &x3, &y3, &x4, &y4);
AB=(y1-y2)/(x1-x2);
CD=(y3-y4)/(x3-x4);
if(a==b)
printf("YES\n");
else
printf("NO\n");
}
return 0;
}
|
main.c: In function 'main':
main.c:13:3: error: 'AB' undeclared (first use in this function)
13 | AB=(y1-y2)/(x1-x2);
| ^~
main.c:13:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:3: error: 'CD' undeclared (first use in this function)
15 | CD=(y3-y4)/(x3-x4);
| ^~
|
s689452617
|
p00021
|
C
|
#include<stdio.h>
int main(){
float x1, y1, x2, y2, x3, y3, x4, y4, a, b;
int i, n;
scanf("%d", &n);
for(i=0;i<n;i++){
scanf("%f %f %f %f %f %f %f %f", &x1, &y1, &x2, &y2, &x3, &y3, &x4, &y4);
AB=(y1-y2)/(x1-x2);
CD=(y3-y4)/(x3-x4);
if(a==b)
printf("YES\n");
else
printf("NO\n");
}
return 0;
}
|
main.c: In function 'main':
main.c:10:3: error: 'AB' undeclared (first use in this function)
10 | AB=(y1-y2)/(x1-x2);
| ^~
main.c:10:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:3: error: 'CD' undeclared (first use in this function)
12 | CD=(y3-y4)/(x3-x4);
| ^~
|
s265819868
|
p00021
|
C
|
#include <stdio.h>
 
int main(){
  int i,n;
  double x1,y1,x2,y2,x3,y3,x4,y4,sl1,sl2;
  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);
    sl1=(y2-y1)/(x2-x1);
    sl2=(y4-y3)/(x4-x3);
    if (sl1==sl2){
      puts("YES");
    }else{
      puts("NO");
    }
  }
  return 0;
}
|
main.c:2:1: error: expected identifier or '(' before '&' token
2 |  
| ^
main.c:2:2: error: stray '#' in program
2 |  
| ^
main.c: In function 'main':
main.c:4:2: error: stray '#' in program
4 |   int i,n;
| ^
main.c:4:1: error: lvalue required as unary '&' operand
4 |   int i,n;
| ^
main.c:4:8: error: stray '#' in program
4 |   int i,n;
| ^
main.c:4:7: error: lvalue required as unary '&' operand
4 |   int i,n;
| ^
main.c:5:2: error: stray '#' in program
5 |   double x1,y1,x2,y2,x3,y3,x4,y4,sl1,sl2;
| ^
main.c:5:1: error: lvalue required as unary '&' operand
5 |   double x1,y1,x2,y2,x3,y3,x4,y4,sl1,sl2;
| ^
main.c:5:8: error: stray '#' in program
5 |   double x1,y1,x2,y2,x3,y3,x4,y4,sl1,sl2;
| ^
main.c:5:7: error: lvalue required as unary '&' operand
5 |   double x1,y1,x2,y2,x3,y3,x4,y4,sl1,sl2;
| ^
main.c:6:2: error: stray '#' in program
6 |   scanf("%d",&n);
| ^
main.c:6:1: error: lvalue required as unary '&' operand
6 |   scanf("%d",&n);
| ^
main.c:6:8: error: stray '#' in program
6 |   scanf("%d",&n);
| ^
main.c:6:7: error: lvalue required as unary '&' operand
6 |   scanf("%d",&n);
| ^
main.c:7:2: error: stray '#' in program
7 |   for (i=0;i<n;i++){
| ^
main.c:7:1: error: lvalue required as unary '&' operand
7 |   for (i=0;i<n;i++){
| ^
main.c:7:8: error: stray '#' in program
7 |   for (i=0;i<n;i++){
| ^
main.c:7:7: error: lvalue required as unary '&' operand
7 |   for (i=0;i<n;i++){
| ^
main.c:8:2: error: stray '#' in program
8 |     scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
| ^
main.c:8:1: error: lvalue required as unary '&' operand
8 |     scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
| ^
main.c:8:8: error: stray '#' in program
8 |     scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
| ^
main.c:8:7: error: lvalue required as unary '&' operand
8 |     scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
| ^
main.c:8:14: error: stray '#' in program
8 |     scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
| ^
main.c:8:13: error: lvalue required as unary '&' operand
8 |     scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
| ^
main.c:8:20: error: stray '#' in program
8 |     scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
| ^
main.c:8:19: error: lvalue required as unary '&' operand
8 |     scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
| ^
main.c:9:2: error: stray '#' in program
9 |     sl1=(y2-y1)/(x2-x1);
| ^
main.c:9:1: error: lvalue required as unary '&' operand
9 |     sl1=(y2-y1)/(x2-x1);
| ^
main.c:9:8: error: stray '#' in program
9 |     sl1=(y2-y1)/(x2-x1);
| ^
main.c:9:7: error: lvalue required as unary '&' operand
9 |     sl1=(y2-y1)/(x2-x1);
| ^
main.c:9:14: error: stray '#' in program
9 |     sl1=(y2-y1)/(x2-x1);
| ^
main.c:9:13: error: lvalue required as unary '&' operand
9 |     sl1=(y2-y1)/(x2-x1);
| ^
main.c:9:20: error: stray '#' in program
9 |     sl1=(y2-y1)/(x2-x1);
| ^
main.c:9:19: error: lvalue required as unary '&' operand
9 |     sl1=(y2-y1)/(x2-x1);
| ^
main.c:10:2: error: stray '#' in program
10 |     sl2=(y4-y3)/(x4-x3);
| ^
main.c:10:1: error: lvalue required as unary '&' operand
10 |     sl2=(y4-y3)/(x4-x3);
| ^
main.c:10:8: error: stray '#' in program
10 |     sl2=(y4-y3)/(x4-x3);
| ^
main.c:10:7: error: lvalue required as unary '&' operand
10 |     sl2=(y4-y3)/(x4-x3);
| ^
main.c:10:14: error: stray '#' in program
10 |     sl2=(y4-y3)/(x4-x3);
| ^
main.c:10:13: error: lvalue required as unary '&' operand
10 |     sl2=(y4-y3)/(x4-x3);
| ^
main.c:10:20: error: stray '#' in program
10 |     sl2=(y4-y3)/(x4-x3);
| ^
main.c:10:19: error: lvalue required as unary '&' operand
10 |     sl2=(y4-y3)/(x4-x3);
| ^
main.c:11:2: error: stray '#' in program
11 |     if (sl1==sl2){
| ^
main.c:11:1: error: lvalue required as unary '&' operand
11 |     if (sl1==sl2){
| ^
main.c:11:8: error: stray '#' in program
11 |     if (sl1==sl2){
| ^
main.c:11:7: error: lvalue required as unary '&' operand
11 |     if (sl1==sl2){
| ^
main.c:11:14: error: stray '#' in program
11 |     if (sl1==sl2){
| ^
main.c:11:13: error: lvalue required as unary '&' operand
11 |     if (sl1==sl2){
| ^
main.c:11:20: error: stray '#' in program
11 |     if (sl1==sl2){
| ^
main.c:11:19: error: lvalue required as unary '&' operand
11 |     if (sl1==sl2){
| ^
main.c:12:2: error: stray '#' in program
12 |       puts("YES");
| ^
main.c:12:1: error: lvalue required as unary '&' operand
12 |       puts("YES");
| ^
main.c:12:8: error: stray '#' in program
12 |       puts("YES");
| ^
main.c:12:7: error: lvalue required as unary '&' operand
12 |       puts("YES");
| ^
main.c:12:14: error: stray '#' in program
12 |       puts("YES");
| ^
main.c:12:13: error: lvalue required as unary '&' operand
12 |       puts("YES");
| ^
main.c:12:20: error: stray '#' in program
12 |       puts("YES");
| ^
main.c:12:19: error: lvalue required as unary '&' operand
12 |       puts("YES");
| ^
main.c:12:26: error: stray '#' in program
12 |       puts("YES");
| ^
main.c:12:25: error: lvalue required as unary '&' operand
12 |       puts("YES");
| ^
main.c:12:32: error: stray '#' in program
12 |       puts("YES");
| ^
main.c:12:31: error: lvalue required as unary '&' operand
12 |       puts("YES");
| ^
main.c:13:2: error: stray '#' in program
13 |     }else{
| ^
main.c:13:1: error: lvalue required as unary '&' operand
13 |     }else{
| ^
main.c:13:8: error: stray '#' in program
13 |     }else{
| ^
main.c:13:7: error: lvalue required as unary '&' operand
13 |     }else{
| ^
main.c:13:14: error: stray '#' in program
13 |     }else{
| ^
main.c:13:13: error: lvalue required as unary '&' operand
13 |     }else{
| ^
main.c:13:20: error: stray '#' in program
13 |     }else{
| ^
main.c:13:19: error: lvalue required as unary '&' operand
13 |     }else{
| ^
main.c:14:2: error: stray '#' in program
14 |       puts("NO");
| ^
main.c:14:1: error: lvalue required as unary '&' operand
14 |       puts("NO");
| ^
main.c:14:8: error: stray '#' in program
14 |       puts("NO");
| ^
main.c:14:7: error: lvalue required as unary '&' operand
14 |       puts("NO");
| ^
main.c:14:14: error: stray '#' in program
14 |       puts("NO");
| ^
main.c:14:13: error: lvalue required as unary '&' operand
14 |       puts("NO");
| ^
main.c:14:20: error: stray '#' in program
14 |       puts("NO");
| ^
main.c:14:19: error: lvalue required as unary '&' operand
14 |       puts("NO");
| ^
main.c:14:26: error: stray '#' in program
14 |       puts("NO");
| ^
main.c:14:25: error: lvalue required as unary '&' operand
14 |       puts("NO");
| ^
main.c:14:32: error: stray '#' in program
14 |       puts("NO");
| ^
main.c:14:31: error: lvalue required as unary '&' operand
14 |       puts("NO");
| ^
main.c:15:2: error: stray '#' in program
15 |     }
| ^
main.c:15:1: error: lvalue required as unary
|
s987400650
|
p00021
|
C
|
#include <stdio.h>
int main() {
double x1,x2,y1,y2,x3,y3,x4,y4;
  int i,n;
  while(EOF!=scanf("%d",&n) && n) {
      for(i=0;i<n;i++) {
      scanf(" %lf %lf %lf %lf %lf %lf %lf %lf",
        &x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
      if((x1 == x2) && (x3 == x4))
        printf("YES\n");
      else if((x1 == x2) || (x3 == x4))
        printf("NO\n");
      else if(((y1-y2)/(x1-x2)-(y3-y4)/(x3-x4))==0.0)
        printf("YES\n");
      else
        printf("NO\n");
    }
    }
  return 0;
}
|
main.c: In function 'main':
main.c:5:2: error: stray '#' in program
5 |   int i,n;
| ^
main.c:5:1: error: lvalue required as unary '&' operand
5 |   int i,n;
| ^
main.c:5:8: error: stray '#' in program
5 |   int i,n;
| ^
main.c:5:7: error: lvalue required as unary '&' operand
5 |   int i,n;
| ^
main.c:7:2: error: stray '#' in program
7 |   while(EOF!=scanf("%d",&n) && n) {
| ^
main.c:7:1: error: lvalue required as unary '&' operand
7 |   while(EOF!=scanf("%d",&n) && n) {
| ^
main.c:7:8: error: stray '#' in program
7 |   while(EOF!=scanf("%d",&n) && n) {
| ^
main.c:7:7: error: lvalue required as unary '&' operand
7 |   while(EOF!=scanf("%d",&n) && n) {
| ^
main.c:8:2: error: stray '#' in program
8 |       for(i=0;i<n;i++) {
| ^
main.c:8:1: error: lvalue required as unary '&' operand
8 |       for(i=0;i<n;i++) {
| ^
main.c:8:8: error: stray '#' in program
8 |       for(i=0;i<n;i++) {
| ^
main.c:8:7: error: lvalue required as unary '&' operand
8 |       for(i=0;i<n;i++) {
| ^
main.c:8:14: error: stray '#' in program
8 |       for(i=0;i<n;i++) {
| ^
main.c:8:13: error: lvalue required as unary '&' operand
8 |       for(i=0;i<n;i++) {
| ^
main.c:8:20: error: stray '#' in program
8 |       for(i=0;i<n;i++) {
| ^
main.c:8:19: error: lvalue required as unary '&' operand
8 |       for(i=0;i<n;i++) {
| ^
main.c:8:26: error: stray '#' in program
8 |       for(i=0;i<n;i++) {
| ^
main.c:8:25: error: lvalue required as unary '&' operand
8 |       for(i=0;i<n;i++) {
| ^
main.c:8:32: error: stray '#' in program
8 |       for(i=0;i<n;i++) {
| ^
main.c:8:31: error: lvalue required as unary '&' operand
8 |       for(i=0;i<n;i++) {
| ^
main.c:9:2: error: stray '#' in program
9 |       scanf(" %lf %lf %lf %lf %lf %lf %lf %lf",
| ^
main.c:9:1: error: lvalue required as unary '&' operand
9 |       scanf(" %lf %lf %lf %lf %lf %lf %lf %lf",
| ^
main.c:9:8: error: stray '#' in program
9 |       scanf(" %lf %lf %lf %lf %lf %lf %lf %lf",
| ^
main.c:9:7: error: lvalue required as unary '&' operand
9 |       scanf(" %lf %lf %lf %lf %lf %lf %lf %lf",
| ^
main.c:9:14: error: stray '#' in program
9 |       scanf(" %lf %lf %lf %lf %lf %lf %lf %lf",
| ^
main.c:9:13: error: lvalue required as unary '&' operand
9 |       scanf(" %lf %lf %lf %lf %lf %lf %lf %lf",
| ^
main.c:9:20: error: stray '#' in program
9 |       scanf(" %lf %lf %lf %lf %lf %lf %lf %lf",
| ^
main.c:9:19: error: lvalue required as unary '&' operand
9 |       scanf(" %lf %lf %lf %lf %lf %lf %lf %lf",
| ^
main.c:9:26: error: stray '#' in program
9 |       scanf(" %lf %lf %lf %lf %lf %lf %lf %lf",
| ^
main.c:9:25: error: lvalue required as unary '&' operand
9 |       scanf(" %lf %lf %lf %lf %lf %lf %lf %lf",
| ^
main.c:9:32: error: stray '#' in program
9 |       scanf(" %lf %lf %lf %lf %lf %lf %lf %lf",
| ^
main.c:9:31: error: lvalue required as unary '&' operand
9 |       scanf(" %lf %lf %lf %lf %lf %lf %lf %lf",
| ^
main.c:10:2: error: stray '#' in program
10 |         &x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
| ^
main.c:10:1: error: lvalue required as unary '&' operand
10 |         &x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
| ^
main.c:10:6: error: expected ')' before ';' token
10 |         &x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
| ^
| )
main.c:9:42: note: to match this '('
9 |       scanf(" %lf %lf %lf %lf %lf %lf %lf %lf",
| ^
main.c:10:8: error: stray '#' in program
10 |         &x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
| ^
main.c:10:14: error: stray '#' in program
10 |         &x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
| ^
main.c:10:20: error: stray '#' in program
10 |         &x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
| ^
main.c:10:26: error: stray '#' in program
10 |         &x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
| ^
main.c:10:32: error: stray '#' in program
10 |         &x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
| ^
main.c:10:38: error: stray '#' in program
10 |         &x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
| ^
main.c:10:44: error: stray '#' in program
10 |         &x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
| ^
main.c:11:2: error: stray '#' in program
11 |       if((x1 == x2) && (x3 == x4))
| ^
main.c:11:1: error: lvalue required as unary '&' operand
11 |       if((x1 == x2) && (x3 == x4))
| ^
main.c:11:8: error: stray '#' in program
11 |       if((x1 == x2) && (x3 == x4))
| ^
main.c:11:7: error: lvalue required as unary '&' operand
11 |       if((x1 == x2) && (x3 == x4))
| ^
main.c:11:14: error: stray '#' in program
11 |       if((x1 == x2) && (x3 == x4))
| ^
main.c:11:13: error: lvalue required as unary '&' operand
11 |       if((x1 == x2) && (x3 == x4))
| ^
main.c:11:20: error: stray '#' in program
11 |       if((x1 == x2) && (x3 == x4))
| ^
main.c:11:19: error: lvalue required as unary '&' operand
11 |       if((x1 == x2) && (x3 == x4))
| ^
main.c:11:26: error: stray '#' in program
11 |       if((x1 == x2) && (x3 == x4))
| ^
main.c:11:25: error: lvalue required as unary '&' operand
11 |       if((x1 == x2) && (x3 == x4))
| ^
main.c:11:32: error: stray '#' in program
11 |       if((x1 == x2) && (x3 == x4))
| ^
main.c:11:31: error: lvalue required as unary '&' operand
11 |       if((x1 == x2) && (x3 == x4))
| ^
main.c:12:2: error: stray '#' in program
12 |         printf("YES\n");
| ^
main.c:12:1: error: lvalue required as unary '&' operand
12 |         printf("YES\n");
| ^
main.c:12:8: error: stray '#' in program
12 |         printf("YES\n");
| ^
main.c:12:7: error: lvalue required as unary '&' operand
12 |         printf("YES\n");
| ^
main.c:12:14: error: stray '#' in program
12 |         printf("YES\n");
| ^
main.c:12:13: error: lvalue required as unary '&' operand
12 |         printf("YES\n");
| ^
main.c:12:20: error: stray '#' in program
12 |         printf("YES\n");
| ^
main.c:12:19: error: lvalue required as unary '&' operand
12 |         printf("YES\n");
| ^
main.c:12:26: error: stray '#' in program
12 |         printf("YES\n");
| ^
main.c:12:25: error: lvalue required as unary '&' operand
12 |         printf("YES\n");
| ^
main.c:12:32: error: stray '#' in program
12 |         printf("YES\n");
| ^
main.c:12:31: error: lvalue required as unary '&' operand
12 |         printf("YES\n");
| ^
main.c:12:38: error: stray '#' in program
12 |         printf("YES\n");
| ^
main.c:12:37: error: lvalue required as unary '&' operand
12 |         printf("YES\n");
| ^
main.c:12:44: error: stray '#' in program
12 |         printf("YES\n");
|
s912519056
|
p00021
|
C
|
#include <stdio.h>
int main() {
double x1,x2,y1,y2,x3,y3,x4,y4;
  int i,n;
  while(scanf("%d", &n) != EOF) {
      for(i=0;i<n;i++) {
      scanf(" %lf %lf %lf %lf %lf %lf %lf %lf",
        &x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
      if((x1 == x2) && (x3 == x4))
        printf("YES\n");
      else if((x1 == x2) || (x3 == x4))
        printf("NO\n");
      else if(((y1-y2)/(x1-x2)-(y3-y4)/(x3-x4))==0.0)
        printf("YES\n");
      else
        printf("NO\n");
    }
    }
  return 0;
}
|
main.c: In function 'main':
main.c:5:2: error: stray '#' in program
5 |   int i,n;
| ^
main.c:5:1: error: lvalue required as unary '&' operand
5 |   int i,n;
| ^
main.c:5:8: error: stray '#' in program
5 |   int i,n;
| ^
main.c:5:7: error: lvalue required as unary '&' operand
5 |   int i,n;
| ^
main.c:7:2: error: stray '#' in program
7 |   while(scanf("%d", &n) != EOF) {
| ^
main.c:7:1: error: lvalue required as unary '&' operand
7 |   while(scanf("%d", &n) != EOF) {
| ^
main.c:7:8: error: stray '#' in program
7 |   while(scanf("%d", &n) != EOF) {
| ^
main.c:7:7: error: lvalue required as unary '&' operand
7 |   while(scanf("%d", &n) != EOF) {
| ^
main.c:8:2: error: stray '#' in program
8 |       for(i=0;i<n;i++) {
| ^
main.c:8:1: error: lvalue required as unary '&' operand
8 |       for(i=0;i<n;i++) {
| ^
main.c:8:8: error: stray '#' in program
8 |       for(i=0;i<n;i++) {
| ^
main.c:8:7: error: lvalue required as unary '&' operand
8 |       for(i=0;i<n;i++) {
| ^
main.c:8:14: error: stray '#' in program
8 |       for(i=0;i<n;i++) {
| ^
main.c:8:13: error: lvalue required as unary '&' operand
8 |       for(i=0;i<n;i++) {
| ^
main.c:8:20: error: stray '#' in program
8 |       for(i=0;i<n;i++) {
| ^
main.c:8:19: error: lvalue required as unary '&' operand
8 |       for(i=0;i<n;i++) {
| ^
main.c:8:26: error: stray '#' in program
8 |       for(i=0;i<n;i++) {
| ^
main.c:8:25: error: lvalue required as unary '&' operand
8 |       for(i=0;i<n;i++) {
| ^
main.c:8:32: error: stray '#' in program
8 |       for(i=0;i<n;i++) {
| ^
main.c:8:31: error: lvalue required as unary '&' operand
8 |       for(i=0;i<n;i++) {
| ^
main.c:9:2: error: stray '#' in program
9 |       scanf(" %lf %lf %lf %lf %lf %lf %lf %lf",
| ^
main.c:9:1: error: lvalue required as unary '&' operand
9 |       scanf(" %lf %lf %lf %lf %lf %lf %lf %lf",
| ^
main.c:9:8: error: stray '#' in program
9 |       scanf(" %lf %lf %lf %lf %lf %lf %lf %lf",
| ^
main.c:9:7: error: lvalue required as unary '&' operand
9 |       scanf(" %lf %lf %lf %lf %lf %lf %lf %lf",
| ^
main.c:9:14: error: stray '#' in program
9 |       scanf(" %lf %lf %lf %lf %lf %lf %lf %lf",
| ^
main.c:9:13: error: lvalue required as unary '&' operand
9 |       scanf(" %lf %lf %lf %lf %lf %lf %lf %lf",
| ^
main.c:9:20: error: stray '#' in program
9 |       scanf(" %lf %lf %lf %lf %lf %lf %lf %lf",
| ^
main.c:9:19: error: lvalue required as unary '&' operand
9 |       scanf(" %lf %lf %lf %lf %lf %lf %lf %lf",
| ^
main.c:9:26: error: stray '#' in program
9 |       scanf(" %lf %lf %lf %lf %lf %lf %lf %lf",
| ^
main.c:9:25: error: lvalue required as unary '&' operand
9 |       scanf(" %lf %lf %lf %lf %lf %lf %lf %lf",
| ^
main.c:9:32: error: stray '#' in program
9 |       scanf(" %lf %lf %lf %lf %lf %lf %lf %lf",
| ^
main.c:9:31: error: lvalue required as unary '&' operand
9 |       scanf(" %lf %lf %lf %lf %lf %lf %lf %lf",
| ^
main.c:10:2: error: stray '#' in program
10 |         &x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
| ^
main.c:10:1: error: lvalue required as unary '&' operand
10 |         &x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
| ^
main.c:10:6: error: expected ')' before ';' token
10 |         &x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
| ^
| )
main.c:9:42: note: to match this '('
9 |       scanf(" %lf %lf %lf %lf %lf %lf %lf %lf",
| ^
main.c:10:8: error: stray '#' in program
10 |         &x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
| ^
main.c:10:14: error: stray '#' in program
10 |         &x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
| ^
main.c:10:20: error: stray '#' in program
10 |         &x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
| ^
main.c:10:26: error: stray '#' in program
10 |         &x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
| ^
main.c:10:32: error: stray '#' in program
10 |         &x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
| ^
main.c:10:38: error: stray '#' in program
10 |         &x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
| ^
main.c:10:44: error: stray '#' in program
10 |         &x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
| ^
main.c:11:2: error: stray '#' in program
11 |       if((x1 == x2) && (x3 == x4))
| ^
main.c:11:1: error: lvalue required as unary '&' operand
11 |       if((x1 == x2) && (x3 == x4))
| ^
main.c:11:8: error: stray '#' in program
11 |       if((x1 == x2) && (x3 == x4))
| ^
main.c:11:7: error: lvalue required as unary '&' operand
11 |       if((x1 == x2) && (x3 == x4))
| ^
main.c:11:14: error: stray '#' in program
11 |       if((x1 == x2) && (x3 == x4))
| ^
main.c:11:13: error: lvalue required as unary '&' operand
11 |       if((x1 == x2) && (x3 == x4))
| ^
main.c:11:20: error: stray '#' in program
11 |       if((x1 == x2) && (x3 == x4))
| ^
main.c:11:19: error: lvalue required as unary '&' operand
11 |       if((x1 == x2) && (x3 == x4))
| ^
main.c:11:26: error: stray '#' in program
11 |       if((x1 == x2) && (x3 == x4))
| ^
main.c:11:25: error: lvalue required as unary '&' operand
11 |       if((x1 == x2) && (x3 == x4))
| ^
main.c:11:32: error: stray '#' in program
11 |       if((x1 == x2) && (x3 == x4))
| ^
main.c:11:31: error: lvalue required as unary '&' operand
11 |       if((x1 == x2) && (x3 == x4))
| ^
main.c:12:2: error: stray '#' in program
12 |         printf("YES\n");
| ^
main.c:12:1: error: lvalue required as unary '&' operand
12 |         printf("YES\n");
| ^
main.c:12:8: error: stray '#' in program
12 |         printf("YES\n");
| ^
main.c:12:7: error: lvalue required as unary '&' operand
12 |         printf("YES\n");
| ^
main.c:12:14: error: stray '#' in program
12 |         printf("YES\n");
| ^
main.c:12:13: error: lvalue required as unary '&' operand
12 |         printf("YES\n");
| ^
main.c:12:20: error: stray '#' in program
12 |         printf("YES\n");
| ^
main.c:12:19: error: lvalue required as unary '&' operand
12 |         printf("YES\n");
| ^
main.c:12:26: error: stray '#' in program
12 |         printf("YES\n");
| ^
main.c:12:25: error: lvalue required as unary '&' operand
12 |         printf("YES\n");
| ^
main.c:12:32: error: stray '#' in program
12 |         printf("YES\n");
| ^
main.c:12:31: error: lvalue required as unary '&' operand
12 |         printf("YES\n");
| ^
main.c:12:38: error: stray '#' in program
12 |         printf("YES\n");
| ^
main.c:12:37: error: lvalue required as unary '&' operand
12 |         printf("YES\n");
| ^
main.c:12:44: error: stray '#' in program
12 |         printf("YES\n");
|
|
s835592412
|
p00021
|
C
|
#include <stdio.h>
int main(){
    int data,i=0;
    double x1,y1,x2,y2,m1,m2;
    scanf("%d",&data);
    while(i<data){
        scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2);
        m1 = (y2-y1)/(x2-x1);
        scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2);
        m2 = (y2-y1)/(x2-x1);
        if(m1==m2) printf("YES\n");
        else printf("NO\n");
        i++;
    }
    return 0;
}
|
main.c: In function 'main':
main.c:3:2: error: stray '#' in program
3 |     int data,i=0;
| ^
main.c:3:1: error: lvalue required as unary '&' operand
3 |     int data,i=0;
| ^
main.c:3:8: error: stray '#' in program
3 |     int data,i=0;
| ^
main.c:3:7: error: lvalue required as unary '&' operand
3 |     int data,i=0;
| ^
main.c:3:14: error: stray '#' in program
3 |     int data,i=0;
| ^
main.c:3:13: error: lvalue required as unary '&' operand
3 |     int data,i=0;
| ^
main.c:3:20: error: stray '#' in program
3 |     int data,i=0;
| ^
main.c:3:19: error: lvalue required as unary '&' operand
3 |     int data,i=0;
| ^
main.c:4:2: error: stray '#' in program
4 |     double x1,y1,x2,y2,m1,m2;
| ^
main.c:4:1: error: lvalue required as unary '&' operand
4 |     double x1,y1,x2,y2,m1,m2;
| ^
main.c:4:8: error: stray '#' in program
4 |     double x1,y1,x2,y2,m1,m2;
| ^
main.c:4:7: error: lvalue required as unary '&' operand
4 |     double x1,y1,x2,y2,m1,m2;
| ^
main.c:4:14: error: stray '#' in program
4 |     double x1,y1,x2,y2,m1,m2;
| ^
main.c:4:13: error: lvalue required as unary '&' operand
4 |     double x1,y1,x2,y2,m1,m2;
| ^
main.c:4:20: error: stray '#' in program
4 |     double x1,y1,x2,y2,m1,m2;
| ^
main.c:4:19: error: lvalue required as unary '&' operand
4 |     double x1,y1,x2,y2,m1,m2;
| ^
main.c:5:2: error: stray '#' in program
5 |     scanf("%d",&data);
| ^
main.c:5:1: error: lvalue required as unary '&' operand
5 |     scanf("%d",&data);
| ^
main.c:5:8: error: stray '#' in program
5 |     scanf("%d",&data);
| ^
main.c:5:7: error: lvalue required as unary '&' operand
5 |     scanf("%d",&data);
| ^
main.c:5:14: error: stray '#' in program
5 |     scanf("%d",&data);
| ^
main.c:5:13: error: lvalue required as unary '&' operand
5 |     scanf("%d",&data);
| ^
main.c:5:20: error: stray '#' in program
5 |     scanf("%d",&data);
| ^
main.c:5:19: error: lvalue required as unary '&' operand
5 |     scanf("%d",&data);
| ^
main.c:6:2: error: stray '#' in program
6 |     while(i<data){
| ^
main.c:6:1: error: lvalue required as unary '&' operand
6 |     while(i<data){
| ^
main.c:6:8: error: stray '#' in program
6 |     while(i<data){
| ^
main.c:6:7: error: lvalue required as unary '&' operand
6 |     while(i<data){
| ^
main.c:6:14: error: stray '#' in program
6 |     while(i<data){
| ^
main.c:6:13: error: lvalue required as unary '&' operand
6 |     while(i<data){
| ^
main.c:6:20: error: stray '#' in program
6 |     while(i<data){
| ^
main.c:6:19: error: lvalue required as unary '&' operand
6 |     while(i<data){
| ^
main.c:7:2: error: stray '#' in program
7 |         scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2);
| ^
main.c:7:1: error: lvalue required as unary '&' operand
7 |         scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2);
| ^
main.c:7:8: error: stray '#' in program
7 |         scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2);
| ^
main.c:7:7: error: lvalue required as unary '&' operand
7 |         scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2);
| ^
main.c:7:14: error: stray '#' in program
7 |         scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2);
| ^
main.c:7:13: error: lvalue required as unary '&' operand
7 |         scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2);
| ^
main.c:7:20: error: stray '#' in program
7 |         scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2);
| ^
main.c:7:19: error: lvalue required as unary '&' operand
7 |         scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2);
| ^
main.c:7:26: error: stray '#' in program
7 |         scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2);
| ^
main.c:7:25: error: lvalue required as unary '&' operand
7 |         scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2);
| ^
main.c:7:32: error: stray '#' in program
7 |         scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2);
| ^
main.c:7:31: error: lvalue required as unary '&' operand
7 |         scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2);
| ^
main.c:7:38: error: stray '#' in program
7 |         scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2);
| ^
main.c:7:37: error: lvalue required as unary '&' operand
7 |         scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2);
| ^
main.c:7:44: error: stray '#' in program
7 |         scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2);
| ^
main.c:7:43: error: lvalue required as unary '&' operand
7 |         scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2);
| ^
main.c:8:2: error: stray '#' in program
8 |         m1 = (y2-y1)/(x2-x1);
| ^
main.c:8:1: error: lvalue required as unary '&' operand
8 |         m1 = (y2-y1)/(x2-x1);
| ^
main.c:8:8: error: stray '#' in program
8 |         m1 = (y2-y1)/(x2-x1);
| ^
main.c:8:7: error: lvalue required as unary '&' operand
8 |         m1 = (y2-y1)/(x2-x1);
| ^
main.c:8:14: error: stray '#' in program
8 |         m1 = (y2-y1)/(x2-x1);
| ^
main.c:8:13: error: lvalue required as unary '&' operand
8 |         m1 = (y2-y1)/(x2-x1);
| ^
main.c:8:20: error: stray '#' in program
8 |         m1 = (y2-y1)/(x2-x1);
| ^
main.c:8:19: error: lvalue required as unary '&' operand
8 |         m1 = (y2-y1)/(x2-x1);
| ^
main.c:8:26: error: stray '#' in program
8 |         m1 = (y2-y1)/(x2-x1);
| ^
main.c:8:25: error: lvalue required as unary '&' operand
8 |         m1 = (y2-y1)/(x2-x1);
| ^
main.c:8:32: error: stray '#' in program
8 |         m1 = (y2-y1)/(x2-x1);
| ^
main.c:8:31: error: lvalue required as unary '&' operand
8 |         m1 = (y2-y1)/(x2-x1);
| ^
main.c:8:38: error: stray '#' in program
8 |         m1 = (y2-y1)/(x2-x1);
| ^
main.c:8:37: error: lvalue required as unary '&' operand
8 |         m1 = (y2-y1)/(x2-x1);
| ^
main.c:8:44: error: stray '#' in program
8 |         m1 = (y2-y1)/(x2-x1);
| ^
main.c:8:43: error: lvalue required as unary '&' operand
8 |         m1 = (y2-y1)/(x2-x1);
| ^
main.c:9:2: error: stray '#' in program
9 |         scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2);
| ^
main.c:9:1: error: lvalue required as unary '&' operand
9 |         scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2);
| ^
main.c:9:8: error: stray '#' in program
9 |         scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2);
| ^
main.c:9:7: error: lvalue required as unary '&' operand
9 |         scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2);
| ^
main.c:9:14: error: stray '#' in program
9 |         scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2);
| ^
main.c:9:13: error: lvalue required as unary '&' operand
9 |         scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2);
| ^
main.c:9:20: error: stray '#' in program
9 |         scanf("%lf%lf%lf%lf",&x1,&y1,
|
s094301369
|
p00021
|
C
|
#include<stdio.h>
int main(){
double x[4],y[4];
int n,i,j,ans1,ans2;
scanf("%d",&n);
for(i=0;i<n;i++){
for(j=0;j<4;j++){
scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
}
for(j=0;j<4;j+=2){
if(x[j]<x[j+1]){
if(j == 0){
ans1 = x[j+1] - x[j];
}
else{
ans2 = x[j+1] - x[j];
}
}
else{
if(j == 2){
ans1 = x[j] - x[j+1];
}
else{
ans2 = x[j] - x[j+1];
}
}
}
if(ans1 == ans2){
printf("YES\n");
}
else{
printf("NO\n");
}
}
return 0;
}
|
main.c: In function 'main':
main.c:8:48: error: 'x1' undeclared (first use in this function); did you mean 'x'?
8 | scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
| ^~
| x
main.c:8:48: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:52: error: 'y1' undeclared (first use in this function); did you mean 'y'?
8 | scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
| ^~
| y
main.c:8:56: error: 'x2' undeclared (first use in this function); did you mean 'x'?
8 | scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
| ^~
| x
main.c:8:60: error: 'y2' undeclared (first use in this function); did you mean 'y'?
8 | scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
| ^~
| y
main.c:8:64: error: 'x3' undeclared (first use in this function); did you mean 'x'?
8 | scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
| ^~
| x
main.c:8:68: error: 'y3' undeclared (first use in this function); did you mean 'y'?
8 | scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
| ^~
| y
main.c:8:72: error: 'x4' undeclared (first use in this function); did you mean 'x'?
8 | scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
| ^~
| x
main.c:8:76: error: 'y4' undeclared (first use in this function); did you mean 'y'?
8 | scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
| ^~
| y
|
s201845687
|
p00021
|
C
|
#include<stdio.h>
int main(){
double x1,x2,x3,x4,y1,y2,y3,y4;
int n,i,j,ans1,ans2;
scanf("%d",&n);
for(i=0;i<n;i++){
for(j=0;j<4;j++){
scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
}
for(j=0;j<4;j+=2){
if(x[j]<x[j+1]){
if(j == 0){
ans1 = x[j+1] - x[j];
}
else{
ans2 = x[j+1] - x[j];
}
}
else{
if(j == 2){
ans1 = x[j] - x[j+1];
}
else{
ans2 = x[j] - x[j+1];
}
}
}
if(ans1 == ans2){
printf("YES\n");
}
else{
printf("NO\n");
}
}
return 0;
}
|
main.c: In function 'main':
main.c:11:10: error: 'x' undeclared (first use in this function)
11 | if(x[j]<x[j+1]){
| ^
main.c:11:10: note: each undeclared identifier is reported only once for each function it appears in
|
s272936660
|
p00021
|
C
|
#include<stdio.h>
int main() {
int n, s;
double x[4], y[4], z;
scanf("%d", &n);
for (s = 0; s < n; s ++) {
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]);
z = (y[0] - y[1]) * (x[2] - x[3]) - (x[0] - x[1]) * (y[2] - y[3]);
if (-0.000005 < z && x < 0.000005) printf("YES\n");
else printf("NO\n");
}
return 0;
}
|
main.c: In function 'main':
main.c:9:28: error: invalid operands to binary < (have 'double *' and 'double')
9 | if (-0.000005 < z && x < 0.000005) printf("YES\n");
| ~~ ^
| |
| double *
|
s614808247
|
p00021
|
C
|
#include <stdio.h>
#include <math.h>
int main(void)
{
double x[4];
double y[4];
double num1, num2, num3, num4;
int n;
scanf("%d", &n);
while (n > 0){
flag = 0;
n--;
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]);
num1 = (x[0] - x[1]) * (x[0] - x[1]) + (y[0] - y[1]) * (y[0] - y[1]);
num2 = (x[2] - x[3]) * (x[2] - x[3]) + (y[2] - y[3]) * (y[2] - y[3]);
num1 = sqrt(num1);
num2 = sqrt(num2);
if (num1 == num2){
num3 = (x[0] - x[2]) * (x[0] - x[2]) + (y[0] - y[2]) * (y[0] - y[2]);
num4 = (x[1] - x[3]) * (x[1] - x[3]) + (y[1] - y[3]) * (y[1] - y[3]);
if (num3 != num4){
printf("YES\n");
}
else {
printf("NO\n");
}
}
else {
printf("NO\n");
}
}
return 0;
}
|
main.c: In function 'main':
main.c:13:9: error: 'flag' undeclared (first use in this function)
13 | flag = 0;
| ^~~~
main.c:13:9: note: each undeclared identifier is reported only once for each function it appears in
|
s279207051
|
p00021
|
C
|
#include <stdio.h>
#include <math.h>
int main(void)
{
double x[4];
double y[4];
double num1, num2, num3, num4;
int n;
scanf("%d", &n);
while (n > 0){
flag = 0;
n--;
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]);
num1 = (x[0] - x[1]) * (x[0] - x[1]) + (y[0] - y[1]) * (y[0] - y[1]);
num2 = (x[2] - x[3]) * (x[2] - x[3]) + (y[2] - y[3]) * (y[2] - y[3]);
num1 = sqrt(num1);
num2 = sqrt(num2);
if (num1 == num2){
num3 = (x[0] - x[2]) * (x[0] - x[2]) + (y[0] - y[2]) * (y[0] - y[2]);
num4 = (x[1] - x[3]) * (x[1] - x[3]) + (y[1] - y[3]) * (y[1] - y[3]);
num3 = sqrt(num3)
num4 = sqrt(num4)
if (num3 != num4){
printf("YES\n");
}
else {
printf("NO\n");
}
}
else {
printf("NO\n");
}
}
return 0;
}
|
main.c: In function 'main':
main.c:13:9: error: 'flag' undeclared (first use in this function)
13 | flag = 0;
| ^~~~
main.c:13:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:25:34: error: expected ';' before 'num4'
25 | num3 = sqrt(num3)
| ^
| ;
26 | num4 = sqrt(num4)
| ~~~~
|
s203039715
|
p00021
|
C
|
#include <stdio.h>
#include <math.h>
int main(void)
{
double x[4];
double y[4];
double num1, num2, num3, num4;
int n;
scanf("%d", &n);
while (n > 0){
n--;
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]);
num1 = (x[0] - x[1]) * (x[0] - x[1]) + (y[0] - y[1]) * (y[0] - y[1]);
num2 = (x[2] - x[3]) * (x[2] - x[3]) + (y[2] - y[3]) * (y[2] - y[3]);
num1 = sqrt(num1);
num2 = sqrt(num2);
if (num1 == num2){
num3 = (x[0] - x[2]) * (x[0] - x[2]) + (y[0] - y[2]) * (y[0] - y[2]);
num4 = (x[1] - x[3]) * (x[1] - x[3]) + (y[1] - y[3]) * (y[1] - y[3]);
num3 = sqrt(num3)
num4 = sqrt(num4)
if (num3 != num4){
printf("YES\n");
}
else {
printf("NO\n");
}
}
else {
printf("NO\n");
}
}
return 0;
}
|
main.c: In function 'main':
main.c:24:34: error: expected ';' before 'num4'
24 | num3 = sqrt(num3)
| ^
| ;
25 | num4 = sqrt(num4)
| ~~~~
|
s127538577
|
p00021
|
C
|
#include<stdio.h>
int main(void){
double x1,y1 , x2,y2 , x3,y3 , x4,y4;
int n,i;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1 , &x2,&y2 , &x3,&y3 , &x4,&y4);
if( fabs( (y2-y1)/(x2-x1) ) == fabs( (y4-y3)/(x4-x3) ) )
puts("YES");
else
puts("NO");
}
return 0;
}
double fabs(double a){
if(a>=0)
return a;
else
return -a;
}#include<stdio.h>
int main(void){
double x1,y1 , x2,y2 , x3,y3 , x4,y4;
int n,i;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1 , &x2,&y2 , &x3,&y3 , &x4,&y4);
if( fabs( (y2-y1)/(x2-x1) ) == fabs( (y4-y3)/(x4-x3) ) )
puts("YES");
else
puts("NO");
}
return 0;
}
double fabs(double a){
if(a>=0)
return a;
else
return -a;
}
|
main.c: In function 'main':
main.c:16:21: error: implicit declaration of function 'fabs' [-Wimplicit-function-declaration]
16 | if( fabs( (y2-y1)/(x2-x1) ) == fabs( (y4-y3)/(x4-x3) ) )
| ^~~~
main.c:2:1: note: include '<math.h>' or provide a declaration of 'fabs'
1 | #include<stdio.h>
+++ |+#include <math.h>
2 |
main.c:16:21: warning: incompatible implicit declaration of built-in function 'fabs' [-Wbuiltin-declaration-mismatch]
16 | if( fabs( (y2-y1)/(x2-x1) ) == fabs( (y4-y3)/(x4-x3) ) )
| ^~~~
main.c:16:21: note: include '<math.h>' or provide a declaration of 'fabs'
main.c: At top level:
main.c:35:2: error: stray '#' in program
35 | }#include<stdio.h>
| ^
main.c:35:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
35 | }#include<stdio.h>
| ^
main.c:63:8: error: redefinition of 'fabs'
63 | double fabs(double a){
| ^~~~
main.c:29:8: note: previous definition of 'fabs' with type 'double(double)'
29 | double fabs(double a){
| ^~~~
|
s967025059
|
p00021
|
C
|
#include<stdio.h>
int main(void){
double x1,x2,x3,x4,y1,y2,y3,y4;
int n,i;
scanf("%d",&n);
fo(i=0;i<n;i++){
scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
if((x2-x1)*(y4-y3)-(y2-y1)*(x4-x3)==0){
printf("YES\n");
}else{
printf("NO\n");
}
}
return 0;
}
|
main.c: In function 'main':
main.c:9:9: error: implicit declaration of function 'fo'; did you mean 'feof'? [-Wimplicit-function-declaration]
9 | fo(i=0;i<n;i++){
| ^~
| feof
main.c:9:15: error: expected ')' before ';' token
9 | fo(i=0;i<n;i++){
| ~ ^
| )
main.c:9:24: error: expected ';' before '{' token
9 | fo(i=0;i<n;i++){
| ^
| ;
|
s479861174
|
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;
}
|
main.c:17:9: error: expected identifier or '(' before 'return'
17 | return 0;
| ^~~~~~
main.c:18:1: error: expected identifier or '(' before '}' token
18 | }
| ^
|
s916374784
|
p00021
|
C
|
//AOJ 0021
#include <stdio.h>
int main(){
double x1,y1,x2,y2,x3,y3,x4,y4;
double m1,m2,n1,n2;
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);
n1=(x2-x1);
m2=(y4-y3);
n2=(x4-x3);
if(n1==0){
if(n2==0){
if(n1==n2)puts("YES");
else puts("NO");
}else puts("NO");
}else if(n2==0){
puts("NO");
else{if(m1/n1==m2/n2)puts("YES");
else puts("NO");
}
return 0;
}
|
main.c: In function 'main':
main.c:21:1: error: expected '}' before 'else'
21 | else{if(m1/n1==m2/n2)puts("YES");
| ^~~~
main.c:25:1: error: expected declaration or statement at end of input
25 | }
| ^
|
s568751599
|
p00021
|
C
|
//AOJ 0021
#include <stdio.h>
int main(){
double x1,y1,x2,y2,x3,y3,x4,y4;
double m1,m2,n1,n2;
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);
n1=(x2-x1);
m2=(y4-y3);
n2=(x4-x3);
if(n1==0){
if(n2==0){
if(n1==n2)puts("YES");
else puts("NO");
}else puts("NO");
}else if(n2==0){
puts("NO");}
else{if(m1/n1==m2/n2)puts("YES");
else puts("NO");
}
return 0;
}
|
main.c: In function 'main':
main.c:25:1: error: expected declaration or statement at end of input
25 | }
| ^
|
s057732557
|
p00021
|
C
|
//AOJ 0021
#include <stdio.h>
int main(){
double x1,y1,x2,y2,x3,y3,x4,y4;
double m1,m2,n1,n2;
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);
n1=(x2-x1);
m2=(y4-y3);
n2=(x4-x3);
if(n1==0){
if(n2==0){
if(n1==n2)puts("YES");
else puts("NO");
}else puts("NO");
}else if(n2==0){
puts("NO");}
else{if(m1/n1==m2/n2)puts("YES");
else puts("NO");
return 0;
}
|
main.c: In function 'main':
main.c:25:1: error: expected declaration or statement at end of input
25 | }
| ^
main.c:25:1: error: expected declaration or statement at end of input
|
s361471507
|
p00021
|
C
|
//AOJ 0021
#include <stdio.h>
int main(){
double x1,y1,x2,y2,x3,y3,x4,y4;
double m1,m2,n1,n2;
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);
n1=(x2-x1);
m2=(y4-y3);
n2=(x4-x3);
if(n1==0){
if(n2==0){
if(n1==n2)puts("YES");
else puts("NO");
}else puts("NO");
}else if(n2==0){
puts("NO");}
else{if(m1/n1==m2/n2)puts("YES");
else puts("NO");
}
return 0;
}
|
main.c: In function 'main':
main.c:25:1: error: expected declaration or statement at end of input
25 | }
| ^
|
s057133120
|
p00021
|
C
|
#include <stdio.h>
int main(void){
double x1,y1,x2,y2,x3,y3,x4,y4;
double dm,dn;
int i,n;
scanf("%d",&n);
for(i=0;i<n;i++){
dm=dn=0;
scanf("%lf%lf%lf%lf%lf%lf%lf%lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
if(x1==x2&&)
dm=(y1-y2)/(x1-x2);
dn=(y3-y4)/(x3-y4);
if(dm == dn){
printf("YES\n");
} else {
printf("NO\n");
}
}
return 0;
}
|
main.c: In function 'main':
main.c:13:16: error: expected expression before ')' token
13 | if(x1==x2&&)
| ^
|
s934938593
|
p00021
|
C
|
#include <stdio.h>
int main(void){
double x1,y1,x2,y2,x3,y3,x4,y4;
double dm,dn;
int i,n;
scanf("%d",&n);
for(i=0;i<n;i++){
dm=dn=0;
scanf("%lf%lf%lf%lf%lf%lf%lf%lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
if(x1==x2&&)
dm=(y1-y2)/(x1-x2);
dn=(y3-y4)/(x3-y4);
if(dm == dn){
printf("YES\n");
} else {
printf("NO\n");
}
}
return 0;
}
|
main.c: In function 'main':
main.c:13:16: error: expected expression before ')' token
13 | if(x1==x2&&)
| ^
|
s850685198
|
p00021
|
C
|
#include <stdio.h>
int main(void){
double x1,y1,x2,y2,x3,y3,x4,y4;
double dm,dn;
int i,n;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%lf%lf%lf%lf%lf%lf%lf%lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
if(x1 == x2 && x3 == x4){
printf("YES\n");
continue;
}
if(x1 != x2 && x3 == x4){
printf("NO\n");
continue;
}
if(x1 == x2 && x3 != x4){
prtinf("NO\n");
continue;
}
dm=(y1-y2)/(x1-x2);
dn=(y3-y4)/(x3-y4);
if(dm == dn){
printf("YES\n");
} else {
printf("NO\n");
}
}
return 0;
}
|
main.c: In function 'main':
main.c:21:7: error: implicit declaration of function 'prtinf'; did you mean 'printf'? [-Wimplicit-function-declaration]
21 | prtinf("NO\n");
| ^~~~~~
| printf
|
s866301498
|
p00021
|
C
|
#include<stdio.h>
??
int main(void){
?? int n;
?? int i = 0;
?? float x1,y1,x2,y2,x3,y3,x4,y4;
?? double a,b;
??
?? scanf("%d",&n);
??
?? while(scanf("%f %f %f %f %f %f %f %f",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4) != EOF){
??
?? ?? if( i >= n )break;
??
?? ?? a = (y2 - y1) / (x2 - x1);
?? ?? b = (y4 - y3) / (x4 - x3);
??
?? ?? if( a == b ){
?? ?? ?? printf("YES\n");
?? ?? }else{
?? ?? ?? printf("NO\n");
?? ?? }
??
?? ?? i++;
??
?? }
??
?? return 0;
}
|
main.c:2:1: error: expected identifier or '(' before '?' token
2 | ??
| ^
|
s562239864
|
p00021
|
C
|
int main(void)
{
double x1, y1, x2, y2, x3, y3, x4, y4;
getchar();getchar();
while( scanf("%lf %lf %lf %lf %lf %lf %lf %lf", &x1, &y1, &x2, &y2, &x3, &y3, &x4, &y4) != EOF )
{
if( (y2-y1)/(x2-x1) == (y4-y3)/(x4-x3) ){ puts("YES"); }
else{ puts("NO"); }
}
return 0;
}
|
main.c: In function 'main':
main.c:5:5: error: implicit declaration of function 'getchar' [-Wimplicit-function-declaration]
5 | getchar();getchar();
| ^~~~~~~
main.c:1:1: note: 'getchar' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
+++ |+#include <stdio.h>
1 | int main(void)
main.c:6:12: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
6 | while( scanf("%lf %lf %lf %lf %lf %lf %lf %lf", &x1, &y1, &x2, &y2, &x3, &y3, &x4, &y4) != EOF )
| ^~~~~
main.c:6:12: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:6:12: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
main.c:6:12: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:6:96: error: 'EOF' undeclared (first use in this function)
6 | while( scanf("%lf %lf %lf %lf %lf %lf %lf %lf", &x1, &y1, &x2, &y2, &x3, &y3, &x4, &y4) != EOF )
| ^~~
main.c:6:96: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:6:96: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:51: error: implicit declaration of function 'puts' [-Wimplicit-function-declaration]
8 | if( (y2-y1)/(x2-x1) == (y4-y3)/(x4-x3) ){ puts("YES"); }
| ^~~~
main.c:8:51: note: include '<stdio.h>' or provide a declaration of 'puts'
|
s444466623
|
p00021
|
C
|
#include <stdio.h>
#include <math.h>
int main(void) {
int n, i;
double x1, x2, x3, x4, y1, y2, y3, y4;
for(i=0, i<n, i++){
scanf("%d %d %d %d %d %d %d %d", &x1, &y1, &x2, &y2, &x3, &y3, &x4, &y4);
if(fabs((y1-y2)/(x1-x2))==fabs((y3-y4)/(x3-x4)))
printf("YES\n");
else printf("NO\n");
}
return 0;
}
|
main.c: In function 'main':
main.c:8:26: error: expected ';' before ')' token
8 | for(i=0, i<n, i++){
| ^
| ;
main.c:8:26: error: expected expression before ')' token
|
s362687543
|
p00021
|
C
|
#include <stdio.h>
int main(void) {
double x0, x1;
double y0, y1;
double x2, x3;
double y2, y3;
int dataset, i;
scanf("%d", &dataset);
for(i = 0; i < dataset; i++) {
while(scanf("%lf %lf %lf %lf %lf %lf %lf %lf", &x0, &x1, &y0, &y1, &x2, &x3, &y2, &y3) != EOF) {
if(y1 - y0)/(x1 - x0) == (y3 - y2)/(x3 - x2)){
printf("YES\n");
}
else{
printf("NO\n");
}
}
}
}
|
main.c: In function 'main':
main.c:17:28: error: expected expression before '/' token
17 | if(y1 - y0)/(x1 - x0) == (y3 - y2)/(x3 - x2)){
| ^
main.c:17:61: error: expected statement before ')' token
17 | if(y1 - y0)/(x1 - x0) == (y3 - y2)/(x3 - x2)){
| ^
main.c:20:18: error: 'else' without a previous 'if'
20 | else{
| ^~~~
|
s641221624
|
p00021
|
C
|
#include <stdio.h>
int main(void){
double x1,y1,x2,y2,x3,y3,x4,y4;
double t_x1,t_y1,t_x2,t_y2;
double result;
int dataset;
int i;
scanf("%d",&n);
for(i = 0;i < dataset; ++i){
scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
t_x1 = x1 - x2;
t_y1 = y1 - y2;
t_x2 = x3 - x4;
t_y2 = y3 - y4;
result= t_x1 * t_y2 - t_y1 * t_x2;
if(result <= 1e-10 && result >= -1e-10){
printf("YES\n");
}
else{
printf("NO\n");
}
}
}
|
main.c: In function 'main':
main.c:11:15: error: 'n' undeclared (first use in this function)
11 | scanf("%d",&n);
| ^
main.c:11:15: note: each undeclared identifier is reported only once for each function it appears in
|
s343566110
|
p00021
|
C
|
#include<stdio.h>
int main(void) {
float x0, x1;
float y0, y1;
float x2, x3;
float y2, y3;
int dataset;
scanf("%d", &dataset);
int i
for(int i = 0; i < dataset; i++) {
while(scanf("%f %f %f %f %f %f %f %f", &x0, &x1, &y0, &y1, &x2, &x3, &y2, &y3) != EOF) {
(y1 - y0)/(x1 - x0) == (y3 - y2)/(x3 - x2) ? printf("YES\n") : printf("NO\n");
}
}
}
|
main.c: In function 'main':
main.c:15:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'for'
15 | for(int i = 0; i < dataset; i++) {
| ^~~
|
s452935882
|
p00021
|
C
|
#include<stdio.h>
int main(void) {
float x0, x1;
float y0, y1;
float x2, x3;
float y2, y3;
int dataset;
scanf("%d", &dataset);
int i
for(i = 0; i < dataset; i++) {
while(scanf("%f %f %f %f %f %f %f %f", &x0, &x1, &y0, &y1, &x2, &x3, &y2, &y3) != EOF) {
(y1 - y0)/(x1 - x0) == (y3 - y2)/(x3 - x2) ? printf("YES\n") : printf("NO\n");
}
}
}
|
main.c: In function 'main':
main.c:15:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'for'
15 | for(i = 0; i < dataset; i++) {
| ^~~
main.c:15:9: error: 'i' undeclared (first use in this function)
15 | for(i = 0; i < dataset; i++) {
| ^
main.c:15:9: note: each undeclared identifier is reported only once for each function it appears in
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.