submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s962850168
p03759
C++
#include <iostream> using namespace std; int main() { long a[3]; cin>>a[0]>>a[1]>>a[2]; sort(a,a+3); if(a[1]-a[0]==[2]-a[1]) cout<<"YES\n"; else cout<<"NO\n"; // your code goes here return 0; }
a.cc: In function 'int main()': a.cc:7:9: error: 'sort' was not declared in this scope; did you mean 'short'? 7 | sort(a,a+3); | ^~~~ | short a.cc:8:24: error: expected identifier before numeric constant 8 | if(a[1]-a[0]==[2]-a[1]) cout<<"YES\n"; | ^ a.cc: In lambda function: a.cc:8:26: error: expected '{' before '-' token 8 | if(a[1]-a[0]==[2]-a[1]) cout<<"YES\n"; | ^ a.cc: In function 'int main()': a.cc:8:26: error: no match for 'operator-' (operand types are 'main()::<lambda()>' and 'long int') 8 | if(a[1]-a[0]==[2]-a[1]) cout<<"YES\n"; | ~~~^~~~~ | | | | | long int | main()::<lambda()> 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:618:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 618 | operator-(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:618:5: note: template argument deduction/substitution failed: a.cc:8:30: note: 'main()::<lambda()>' is not derived from 'const std::reverse_iterator<_Iterator>' 8 | if(a[1]-a[0]==[2]-a[1]) cout<<"YES\n"; | ^ /usr/include/c++/14/bits/stl_iterator.h:1790:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__x.base() - __y.base())) std::operator-(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1790 | operator-(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1790:5: note: template argument deduction/substitution failed: a.cc:8:30: note: 'main()::<lambda()>' is not derived from 'const std::move_iterator<_IteratorL>' 8 | if(a[1]-a[0]==[2]-a[1]) cout<<"YES\n"; | ^
s583217582
p03759
C++
#include <stdio.h> using namespace std; int main() { int main() { cin >> odd >> even; int e, o; e = even.size(); o = odd.size(); for(int i = 0; i < e + o; i++) { if(i % 2 == 0){ cout << odd[i / 2]; } else{ cout << even[(i - 1) / 2]; } return 0; } }
a.cc: In function 'int main()': a.cc:9:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 9 | int main() | ^~ a.cc:9:9: note: remove parentheses to default-initialize a variable 9 | int main() | ^~ | -- a.cc:9:9: note: or replace parentheses with braces to value-initialize a variable a.cc:11:2: error: a function-definition is not allowed here before '{' token 11 | { | ^ a.cc:26:2: error: expected '}' at end of input 26 | } | ^ a.cc:5:1: note: to match this '{' 5 | { | ^
s491717684
p03759
C++
#include <stdio.h> using namespace std; int main() { int main() cin >> odd >> even; int e, o; e = even.size(); o = odd.size(); for(int i = 0; i < e + o; i++) { if(i % 2 == 0){ cout << odd[i / 2]; } else{ cout << even[(i - 1) / 2]; } } return 0;
a.cc: In function 'int main()': a.cc:9:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 9 | int main() | ^~ a.cc:9:9: note: remove parentheses to default-initialize a variable 9 | int main() | ^~ | -- a.cc:9:9: note: or replace parentheses with braces to value-initialize a variable a.cc:11:3: error: expected initializer before 'cin' 11 | cin >> odd >> even; | ^~~ a.cc:13:7: error: 'even' was not declared in this scope 13 | e = even.size(); | ^~~~ a.cc:14:7: error: 'odd' was not declared in this scope 14 | o = odd.size(); | ^~~ a.cc:18:7: error: 'cout' was not declared in this scope 18 | cout << odd[i / 2]; | ^~~~ a.cc:2:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 1 | #include <stdio.h> +++ |+#include <iostream> 2 | using namespace std; a.cc:21:7: error: 'cout' was not declared in this scope 21 | cout << even[(i - 1) / 2]; | ^~~~ a.cc:21:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:24:12: error: expected '}' at end of input 24 | return 0; | ^ a.cc:5:1: note: to match this '{' 5 | { | ^
s529021527
p03759
C++
#include <stdio.h> using namespace std; int main() { string even, odd; int main() { cin >> odd >> even; int e, o; e = even.size(); o = odd.size(); for(int i = 0; i < e + o; i++) { if(i % 2 == 0){ cout << odd[i / 2]; } else{ cout << even[(i - 1) / 2]; } } return 0; }
a.cc: In function 'int main()': a.cc:7:1: error: 'string' was not declared in this scope 7 | string even, odd; | ^~~~~~ a.cc:2:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>' 1 | #include <stdio.h> +++ |+#include <string> 2 | using namespace std; a.cc:9:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 9 | int main() | ^~ a.cc:9:9: note: remove parentheses to default-initialize a variable 9 | int main() | ^~ | -- a.cc:9:9: note: or replace parentheses with braces to value-initialize a variable a.cc:10:1: error: a function-definition is not allowed here before '{' token 10 | { | ^ a.cc:25:2: error: expected '}' at end of input 25 | } | ^ a.cc:5:1: note: to match this '{' 5 | { | ^
s820452860
p03759
C++
#include <stdio.h> using namespace std; int main(){ cin >> odd >> even; int e, o; a = even.size(); b = odd.size(); for(int a = 0; a < b + a; a++){ if(a % 2 == 0){ cout << odd[i / 2]; } else{ cout << even[(a - 1) / 2]; } } return 0 }
a.cc: In function 'int main()': a.cc:5:3: error: 'cin' was not declared in this scope 5 | cin >> odd >> even; | ^~~ a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 1 | #include <stdio.h> +++ |+#include <iostream> 2 | using namespace std; a.cc:5:10: error: 'odd' was not declared in this scope 5 | cin >> odd >> even; | ^~~ a.cc:5:17: error: 'even' was not declared in this scope 5 | cin >> odd >> even; | ^~~~ a.cc:7:3: error: 'a' was not declared in this scope 7 | a = even.size(); | ^ a.cc:8:3: error: 'b' was not declared in this scope 8 | b = odd.size(); | ^ a.cc:11:7: error: 'cout' was not declared in this scope 11 | cout << odd[i / 2]; | ^~~~ a.cc:11:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:11:19: error: 'i' was not declared in this scope 11 | cout << odd[i / 2]; | ^ a.cc:14:7: error: 'cout' was not declared in this scope 14 | cout << even[(a - 1) / 2]; | ^~~~ a.cc:14:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:17:11: error: expected ';' before '}' token 17 | return 0 | ^ | ; 18 | } | ~
s135662337
p03759
C++
#include <stdio.h> using namespace std; { int main(){ cin >> odd >> even; int e, o; a = even.size(); b = odd.size(); for(int a = 0; a < b + a; a++){ if(a % 2 == 0){ cout << odd[i / 2]; } else{ cout << even[(a - 1) / 2]; } } return 0 }
a.cc:3:1: error: expected unqualified-id before '{' token 3 | { | ^
s446083270
p03759
C++
#include <stdio.h> using namespace std; int main() { int a,b,c; scanf("%d %d %d",&a,&b,&c); if(b-a=c-b) { printf("YES\n"); } else{ printf("NO\n"); } return 0; }
a.cc: In function 'int main()': a.cc:8:13: error: lvalue required as left operand of assignment 8 | if(b-a=c-b) | ~^~
s226989712
p03759
C++
#include <stdio.h> using namespace std; int main() { int a,b,c; scanf("%d %d %d",&a,&b,&c); if(b-a=c-b) { printf("YES\n"); } else{ printf("NO\n"); } return0; }
a.cc: In function 'int main()': a.cc:8:13: error: lvalue required as left operand of assignment 8 | if(b-a=c-b) | ~^~ a.cc:15:9: error: 'return0' was not declared in this scope 15 | return0; | ^~~~~~~
s476809479
p03759
C++
#include <stdio.h> using namespace std; int main() { int a,b,c; scanf("%d %d %d",&a,&b,&c); if(b-a=c-b) { printf("YES\n"); } {else printf("NO\n"); } return0; }
a.cc: In function 'int main()': a.cc:8:13: error: lvalue required as left operand of assignment 8 | if(b-a=c-b) | ~^~ a.cc:12:10: error: 'else' without a previous 'if' 12 | {else | ^~~~ a.cc:15:9: error: 'return0' was not declared in this scope 15 | return0; | ^~~~~~~
s765136398
p03759
C++
#include <iostream> using namespace std; int main() { int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a-b=b-c) { printf("YES\n"); } {else printf("NO\n");} return0; }
a.cc: In function 'int main()': a.cc:8:13: error: lvalue required as left operand of assignment 8 | if(a-b=b-c) | ~^~ a.cc:12:10: error: 'else' without a previous 'if' 12 | {else | ^~~~ a.cc:14:9: error: 'return0' was not declared in this scope 14 | return0; | ^~~~~~~
s551648616
p03759
C++
#include <iostream> using namespace std; int main() { int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a-b=b-c) { printf("YES\n"); } {else printf("NO\n");} }
a.cc: In function 'int main()': a.cc:8:13: error: lvalue required as left operand of assignment 8 | if(a-b=b-c) | ~^~ a.cc:12:10: error: 'else' without a previous 'if' 12 | {else | ^~~~
s243276961
p03759
C++
#include <iostream> using namespace std; int main() { if(a-b=b-c) yes else no }
a.cc: In function 'int main()': a.cc:6:12: error: 'a' was not declared in this scope 6 | if(a-b=b-c) | ^ a.cc:6:14: error: 'b' was not declared in this scope 6 | if(a-b=b-c) | ^ a.cc:6:18: error: 'c' was not declared in this scope 6 | if(a-b=b-c) | ^ a.cc:7:9: error: 'yes' was not declared in this scope 7 | yes | ^~~
s361865530
p03759
C++
a,b,c = gets.split.map{|n| n.to_i} puts (b-a === c-b) ? 'YES' : 'NO'
a.cc:3:22: warning: multi-character character constant [-Wmultichar] 3 | puts (b-a === c-b) ? 'YES' : 'NO' | ^~~~~ a.cc:3:30: warning: multi-character character constant [-Wmultichar] 3 | puts (b-a === c-b) ? 'YES' : 'NO' | ^~~~ a.cc:1:1: error: 'a' does not name a type 1 | a,b,c = gets.split.map{|n| n.to_i} | ^ a.cc:3:6: error: expected constructor, destructor, or type conversion before '(' token 3 | puts (b-a === c-b) ? 'YES' : 'NO' | ^
s706138093
p03759
C++
#include <iostream> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; if (b - a == c - b){ cout << "YES" << endl; } else cout << "NO" << endl; return (0); }
a.cc:10:13: error: extended character   is not valid in an identifier 10 | cout << "YES" << endl; | ^ a.cc: In function 'int main()': a.cc:10:13: error: unable to find string literal operator 'operator""\U00003000' with 'const char [4]', 'long unsigned int' arguments 10 | cout << "YES" << endl; | ^~~~~~~
s549447510
p03759
C++
#include <iostream> #include <string> using namespace std; int main(){ int a, b, c; cin >> a >> b >> c; if(b - a == c - b) cout << "YES" << endl; else cout << "NO" << endl; return = 0; };
a.cc: In function 'int main()': a.cc:15:10: error: expected primary-expression before '=' token 15 | return = 0; | ^
s960992785
p03759
C++
#include <iostream> #include <string> using namespace std; int main(){ int a, b, c; cin >> a >> b >> c; if(b - a == c - b) cout >> "YES" >> endl; else cout >> "NO" >> endl; return = 0; };
a.cc: In function 'int main()': a.cc:10:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [4]') 10 | cout >> "YES" >> endl; | ~~~~ ^~ ~~~~~ | | | | | const char [4] | std::ostream {aka std::basic_ostream<char>} In file included from /usr/include/c++/14/string:55, 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/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 835 | operator>>(basic_istream<_CharT, _Traits>& __in, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed: a.cc:10:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 10 | cout >> "YES" >> endl; | ^~~~~ In file included from /usr/include/c++/14/bits/memory_resource.h:38, from /usr/include/c++/14/string:68: /usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)' 131 | operator>>(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed: a.cc:10:5: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte' 10 | cout >> "YES" >> endl; | ^~~~ In file included from /usr/include/c++/14/istream:1109, from /usr/include/c++/14/iostream:42: /usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)' 978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) | ^~~~~~~~ /usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed: a.cc:10:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 10 | cout >> "YES" >> endl; | ^~~~~ /usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)' 849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed: a.cc:10:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 10 | cout >> "YES" >> endl; | ^~~~~ /usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)' 854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed: a.cc:10:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 10 | cout >> "YES" >> endl; | ^~~~~ /usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)' 896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed: a.cc:10:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 10 | cout >> "YES" >> endl; | ^~~~~ /usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)' 939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed: a.cc:10:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 10 | cout >> "YES" >> endl; | ^~~~~ /usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)' 945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed: a.cc:10:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 10 | cout >> "YES" >> endl; | ^~~~~ /usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ /usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed: /usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = const char (&)[4]]': a.cc:10:13: required from here 10 | cout >> "YES" >> endl; | ^~~~~ /usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ a.cc:13:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [3]') 13 | cout >> "NO" >> endl; | ~~~~ ^~ ~~~~ | | | | | const char [3] | std::ostream {aka std::basic_ostream<char>} /usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 835 | operator>>(basic_istream<_CharT, _Traits>& __in, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed: a.cc:13:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 13 | cout >> "NO" >> endl; | ^~~~ /usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)' 131 | operator>>(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed: a.cc:13:5: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte' 13 | cout >> "NO" >> endl; | ^~~~ /usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)' 978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) | ^~~~~~~~ /usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed: a.cc:13:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 13 | cout >> "NO" >> endl; | ^~~~ /usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)' 849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed: a.cc:13:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 13 | cout >> "NO" >> endl; | ^~~~ /usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)' 854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed: a.cc:13:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 13 | cout >> "NO" >> endl; | ^~~~ /usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)' 896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed: a.cc:13:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 13 | cout >> "NO" >> endl; | ^~~~ /usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)' 939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:939:5: note: template argument deduction/substi
s015693204
p03759
C++
#include <iostream> #include <string> using namespace std; int a, b, c; cin >> a >> b >> c; if(b - a == c - b) cout >> "YES" >> endl; else cout >> "NO" >> endl;
a.cc:7:1: error: 'cin' does not name a type 7 | cin >> a >> b >> c; | ^~~ a.cc:8:1: error: expected unqualified-id before 'if' 8 | if(b - a == c - b) | ^~ a.cc:11:1: error: expected unqualified-id before 'else' 11 | else | ^~~~
s301700265
p03759
C++
#include <iostream> #include <string> using namespace std; int main(){ int a, b, c; cin >> a >> b >> c; if(b - a == c - b) cout >> "YES" >> endl; else cout >> "NO" >> endl; };
a.cc: In function 'int main()': a.cc:9:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [4]') 9 | cout >> "YES" >> endl; | ~~~~ ^~ ~~~~~ | | | | | const char [4] | std::ostream {aka std::basic_ostream<char>} In file included from /usr/include/c++/14/string:55, 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/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 835 | operator>>(basic_istream<_CharT, _Traits>& __in, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed: a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 9 | cout >> "YES" >> endl; | ^~~~~ In file included from /usr/include/c++/14/bits/memory_resource.h:38, from /usr/include/c++/14/string:68: /usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)' 131 | operator>>(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed: a.cc:9:5: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte' 9 | cout >> "YES" >> endl; | ^~~~ In file included from /usr/include/c++/14/istream:1109, from /usr/include/c++/14/iostream:42: /usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)' 978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) | ^~~~~~~~ /usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed: a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 9 | cout >> "YES" >> endl; | ^~~~~ /usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)' 849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed: a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 9 | cout >> "YES" >> endl; | ^~~~~ /usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)' 854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed: a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 9 | cout >> "YES" >> endl; | ^~~~~ /usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)' 896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed: a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 9 | cout >> "YES" >> endl; | ^~~~~ /usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)' 939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed: a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 9 | cout >> "YES" >> endl; | ^~~~~ /usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)' 945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed: a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 9 | cout >> "YES" >> endl; | ^~~~~ /usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ /usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed: /usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = const char (&)[4]]': a.cc:9:13: required from here 9 | cout >> "YES" >> endl; | ^~~~~ /usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ a.cc:12:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [3]') 12 | cout >> "NO" >> endl; | ~~~~ ^~ ~~~~ | | | | | const char [3] | std::ostream {aka std::basic_ostream<char>} /usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 835 | operator>>(basic_istream<_CharT, _Traits>& __in, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed: a.cc:12:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 12 | cout >> "NO" >> endl; | ^~~~ /usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)' 131 | operator>>(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed: a.cc:12:5: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte' 12 | cout >> "NO" >> endl; | ^~~~ /usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)' 978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) | ^~~~~~~~ /usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed: a.cc:12:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 12 | cout >> "NO" >> endl; | ^~~~ /usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)' 849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed: a.cc:12:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 12 | cout >> "NO" >> endl; | ^~~~ /usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)' 854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed: a.cc:12:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 12 | cout >> "NO" >> endl; | ^~~~ /usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)' 896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed: a.cc:12:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 12 | cout >> "NO" >> endl; | ^~~~ /usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)' 939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:939:5: note: template argument deduction/substitution fai
s098089348
p03759
C++
#include <iostream> #include <string> int a, b, c; cin >> a >> b >> c; if(b - a == c - b) cout >> "YES" >> endl; else cout >> "NO" >> endl;
a.cc:5:1: error: 'cin' does not name a type 5 | cin >> a >> b >> c; | ^~~ a.cc:6:1: error: expected unqualified-id before 'if' 6 | if(b - a == c - b) | ^~ a.cc:9:1: error: expected unqualified-id before 'else' 9 | else | ^~~~
s909972083
p03759
C++
#include <iostream> #include <string> int a, b, c; cin << a << b << c; if(b - a == c - b){ cout >> "YES" >> endl; } else{ cout >> "NO" >> endl; }
a.cc:5:1: error: 'cin' does not name a type 5 | cin << a << b << c; | ^~~ a.cc:6:1: error: expected unqualified-id before 'if' 6 | if(b - a == c - b){ | ^~ a.cc:9:1: error: expected unqualified-id before 'else' 9 | else{ | ^~~~
s479051484
p03759
Java
package gaja; import java.util.Scanner; public class Cihiro33 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int A = sc.nextInt(); int B = sc.nextInt(); int C = sc.nextInt(); if(B-A == C-B){ System.out.print("Yes"); } else { System.out.print("No"); // TODO 自動生成されたメソッド・スタブ } } }
Main.java:5: error: class Cihiro33 is public, should be declared in a file named Cihiro33.java public class Cihiro33 ^ 1 error
s470356968
p03759
C++
1.#include<stdio.h> 2.int main(void){ 3. 4.int a,b,c,d,e; 5.scanf("%d",&a); 6.scanf("%d",&b); 7.scanf("%d",&c); 8. 9.d=b-a; e=c-b; 10. 11.if(d==e){ 12.printf("YES\n"); 13.}else{ 14.printf("NO\n"); 15.} 16. 17.return 0; 18.} 19.
a.cc:2:3: error: stray '#' in program 2 | 1.#include<stdio.h> | ^ a.cc:2:1: error: expected unqualified-id before numeric constant 2 | 1.#include<stdio.h> | ^~ a.cc:20:1: error: expected unqualified-id before numeric constant 20 | 19. | ^~~
s505405498
p03759
C++
#include<stdio.h> int main(void){ double a,b,c,d,e; scanf("%d",&a); scanf("%d",&b); scanf("%d",&c); d=b-a; e=c-b; if(d==e){ printf("YES\n"); }else{ printd("NO\n"); } return 0; }
a.cc: In function 'int main()': a.cc:14:1: error: 'printd' was not declared in this scope; did you mean 'printf'? 14 | printd("NO\n"); | ^~~~~~ | printf
s047889391
p03759
C++
#include <iostream> using namespace std ; int main () { string E, O; cin >> E >> O; for (int i=0; i < E. size () - 1 ; i++) { cout << E[i]; cout << O[i]; } cout << E[E.size() - 1] if(E.size() == O. size () ) cout << O[O.size() - 1]; return 0; }
a.cc: In function 'int main()': a.cc:10:24: error: expected ';' before 'if' 10 | cout << E[E.size() - 1] | ^ | ; 11 | if(E.size() == O. size () ) cout << O[O.size() - 1]; | ~~
s557213673
p03759
C++
int main(){ return; }
a.cc: In function 'int main()': a.cc:2:6: error: return-statement with no value, in function returning 'int' [-fpermissive] 2 | return; | ^~~~~~
s032175334
p03759
C++
#include < iostream > using namespace std ; int main () { int a, b, c; cin >> a >> b >> c; cout << ( b-a == c-b ? "YES " : "NO" ) << endl ; }
a.cc:1:10: fatal error: iostream : No such file or directory 1 | #include < iostream > | ^~~~~~~~~~~~ compilation terminated.
s625941424
p03759
C++
#include <boost/lexical_cast.hpp> #include <iostream> #include <string> #include <typeinfo> int main() { const std::string str; std::cin >> str; long a = boost::lexical_cast<int>(str[0]); long b = boost::lexical_cast<int>(str[2]); long c = boost::lexical_cast<int>(str[4]); return b - a == c - a; }
a.cc:1:10: fatal error: boost/lexical_cast.hpp: No such file or directory 1 | #include <boost/lexical_cast.hpp> | ^~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
s573578407
p03759
C++
a, b, c = map(int, raw_input().split()) print 'YES' if b - a = c - b else 'NO'
a.cc:2:7: warning: multi-character character constant [-Wmultichar] 2 | print 'YES' if b - a = c - b else 'NO' | ^~~~~ a.cc:2:35: warning: multi-character character constant [-Wmultichar] 2 | print 'YES' if b - a = c - b else 'NO' | ^~~~ a.cc:1:1: error: 'a' does not name a type 1 | a, b, c = map(int, raw_input().split()) | ^
s702791868
p03759
C
#include<stdio.h> int main() { int a, b, c; scanf_s("%d", &a); scanf_s("%d", &b); scanf_s("%d", &c); if (b-a == c-b) { printf("YES"); } else { printf("NO"); } return 0; }
main.c: In function 'main': main.c:5:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 5 | scanf_s("%d", &a); | ^~~~~~~ | scanf
s324575230
p03759
C
int a, b, c; scanf("%d", &a); scanf("%d", &b); scanf("%d", &c); if (b-a == c-b) { printf("YES"); } else { printf("NO"); }
main.c:2:15: error: expected declaration specifiers or '...' before string constant 2 | scanf("%d", &a); | ^~~~ main.c:2:21: error: expected declaration specifiers or '...' before '&' token 2 | scanf("%d", &a); | ^ main.c:3:15: error: expected declaration specifiers or '...' before string constant 3 | scanf("%d", &b); | ^~~~ main.c:3:21: error: expected declaration specifiers or '...' before '&' token 3 | scanf("%d", &b); | ^ main.c:4:15: error: expected declaration specifiers or '...' before string constant 4 | scanf("%d", &c); | ^~~~ main.c:4:21: error: expected declaration specifiers or '...' before '&' token 4 | scanf("%d", &c); | ^ main.c:7:9: error: expected identifier or '(' before 'if' 7 | if (b-a == c-b) { printf("YES"); } | ^~ main.c:9:9: error: expected identifier or '(' before 'else' 9 | else { printf("NO"); } | ^~~~
s216828895
p03759
C
#include<stdio.h> int main() { int a, b, c; scanf_s("%d", &a); scanf_s("%d", &b); scanf_s("%d", &c); if (b-a == c-b) { printf("YES"); } else { printf("NO"); } return 0; }
main.c: In function 'main': main.c:5:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 5 | scanf_s("%d", &a); | ^~~~~~~ | scanf
s885473567
p03759
C
#include <stdio.h> int main() { int a, b, c, d; scanf_s("%d", &a); scanf_s("%d", &b); scanf_s("%d", &c); d = 2 * b -(a + c); if (d == 0) { printf("YES"); } else { printf("NO"); } return 0; }
main.c: In function 'main': main.c:7:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 7 | scanf_s("%d", &a); | ^~~~~~~ | scanf
s275749394
p03759
C++
#include "stdafx.h" int main() { int a, b, c, d; scanf_s("%d", &a); scanf_s("%d", &b); scanf_s("%d", &c); d = 2 * b -(a + c); if (d == 0) { printf("YES"); } else { printf("NO"); } return 0; }
a.cc:1:10: fatal error: stdafx.h: No such file or directory 1 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s070980723
p03759
Java
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); if (b - a == c - b) { System.out.println("YES"); } else { System.out.println("NO"); } System.out.println((a+b+c) + " " + s); } }
Main.java:13: error: cannot find symbol System.out.println((a+b+c) + " " + s); ^ symbol: variable s location: class Main 1 error
s317944348
p03759
Java
import java.util; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); if (b - a == c - b) { System.out.println("YES"); } else { System.out.println("NO"); } } }
Main.java:1: error: cannot find symbol import java.util; ^ symbol: class util location: package java Main.java:5: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:5: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 3 errors
s263601881
p03759
C
#include<stdio.h> void main(){ int a,b,c,jd1,jd2; scanf("%d %d %d", &a, &b, &c); if(a<1 || a>101 || b<1 || b>101 || c<1 || c>101) { exit(0); } jd1 = b - a; jd2 = c - b; if(jd1 == jd2){ puts("YES"); } else { puts("NO"); } return 0; }
main.c: In function 'main': main.c:9:17: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration] 9 | exit(0); | ^~~~ main.c:2:1: note: include '<stdlib.h>' or provide a declaration of 'exit' 1 | #include<stdio.h> +++ |+#include <stdlib.h> 2 | main.c:9:17: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch] 9 | exit(0); | ^~~~ main.c:9:17: note: include '<stdlib.h>' or provide a declaration of 'exit' main.c:19:16: error: 'return' with a value, in function returning void [-Wreturn-mismatch] 19 | return 0; | ^ main.c:3:6: note: declared here 3 | void main(){ | ^~~~
s115833799
p03759
C++
#include<stdio.h> int main(){ int a,b,c,jd1,jd2; scanf("%d %d %d", &a, &b, &c); if(a<1 || a>101 || b<1 || b>101 || c<1 || c>101) exit(0); jd1 = b - a; jd2 = c - b; if(jd1 == jd2){ puts("YES"); } else { puts("NO"); } return 0; }
a.cc: In function 'int main()': a.cc:8:58: error: 'exit' was not declared in this scope 8 | if(a<1 || a>101 || b<1 || b>101 || c<1 || c>101) exit(0); | ^~~~ a.cc:2:1: note: 'exit' is defined in header '<cstdlib>'; this is probably fixable by adding '#include <cstdlib>' 1 | #include<stdio.h> +++ |+#include <cstdlib> 2 |
s838464466
p03759
C++
import java.lang.*; import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws java.lang.Exception { InputStream inputStream = System.in; OutputStream outputStream = System.out; InputReader in = new InputReader(inputStream); PrintWriter out = new PrintWriter(outputStream); TaskA solver = new TaskA(); solver.solve(in, out); out.close(); } } class TaskA { public void solve(InputReader in, PrintWriter out) { int[] a = new int[3]; for (int i=0; i<3; ++i) a[i] = in.nextInt(); Arrays.sort(a); if (a[1]-a[0] == a[2]-a[1]) out.println("YES"); else out.println("NO"); } } class InputReader { public BufferedReader reader; public StringTokenizer tokenizer; public InputReader(InputStream stream) { reader = new BufferedReader(new InputStreamReader(stream), 32768); tokenizer = null; } public String next() { while (tokenizer==null || !tokenizer.hasMoreTokens()) { try { tokenizer = new StringTokenizer(reader.readLine()); } catch (IOException e) { throw new RuntimeException(e); } } return tokenizer.nextToken(); } public int nextInt() { return Integer.parseInt(next()); } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.lang.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.io.*; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: 'import' does not name a type 3 | import java.util.*; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:6:1: error: expected unqualified-id before 'public' 6 | public class Main { | ^~~~~~ a.cc:21:15: error: expected ':' before 'void' 21 | public void solve(InputReader in, PrintWriter out) { | ^~~~~ | : a.cc:21:27: error: 'InputReader' has not been declared 21 | public void solve(InputReader in, PrintWriter out) { | ^~~~~~~~~~~ a.cc:21:43: error: 'PrintWriter' has not been declared 21 | public void solve(InputReader in, PrintWriter out) { | ^~~~~~~~~~~ a.cc:33:2: error: expected ';' after class definition 33 | } | ^ | ; a.cc: In member function 'void TaskA::solve(int, int)': a.cc:22:20: error: structured binding declaration cannot have type 'int' 22 | int[] a = new int[3]; | ^~ a.cc:22:20: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto' a.cc:22:20: error: empty structured binding declaration a.cc:22:23: error: expected initializer before 'a' 22 | int[] a = new int[3]; | ^ a.cc:25:25: error: 'a' was not declared in this scope 25 | a[i] = in.nextInt(); | ^ a.cc:25:35: error: request for member 'nextInt' in 'in', which is of non-class type 'int' 25 | a[i] = in.nextInt(); | ^~~~~~~ a.cc:26:17: error: 'Arrays' was not declared in this scope 26 | Arrays.sort(a); | ^~~~~~ a.cc:26:29: error: 'a' was not declared in this scope 26 | Arrays.sort(a); | ^ a.cc:29:29: error: request for member 'println' in 'out', which is of non-class type 'int' 29 | out.println("YES"); | ^~~~~~~ a.cc:31:29: error: request for member 'println' in 'out', which is of non-class type 'int' 31 | out.println("NO"); | ^~~~~~~ a.cc: At global scope: a.cc:36:15: error: expected ':' before 'BufferedReader' 36 | public BufferedReader reader; | ^~~~~~~~~~~~~~~ | : a.cc:36:16: error: 'BufferedReader' does not name a type 36 | public BufferedReader reader; | ^~~~~~~~~~~~~~ a.cc:37:15: error: expected ':' before 'StringTokenizer' 37 | public StringTokenizer tokenizer; | ^~~~~~~~~~~~~~~~ | : a.cc:37:16: error: 'StringTokenizer' does not name a type 37 | public StringTokenizer tokenizer; | ^~~~~~~~~~~~~~~ a.cc:39:15: error: expected ':' before 'InputReader' 39 | public InputReader(InputStream stream) { | ^~~~~~~~~~~~ | : a.cc:39:39: error: expected ')' before 'stream' 39 | public InputReader(InputStream stream) { | ~ ^~~~~~~ | ) a.cc:44:15: error: expected ':' before 'String' 44 | public String next() { | ^~~~~~~ | : a.cc:44:16: error: 'String' does not name a type 44 | public String next() { | ^~~~~~ a.cc:55:15: error: expected ':' before 'int' 55 | public int nextInt() { | ^~~~ | : a.cc:58:2: error: expected ';' after class definition 58 | } | ^ | ; a.cc: In member function 'int InputReader::nextInt()': a.cc:56:24: error: 'Integer' was not declared in this scope 56 | return Integer.parseInt(next()); | ^~~~~~~ a.cc:56:41: error: 'next' was not declared in this scope; did you mean 'nextInt'? 56 | return Integer.parseInt(next()); | ^~~~ | nextInt
s137874904
p03759
C++
if a-b=c-b: print("YES") else: print("NO")
a.cc:1:1: error: expected unqualified-id before 'if' 1 | if a-b=c-b: | ^~
s247046606
p03759
C++
# -*- coding: utf-8 -*- # スペース区切りの整数の入力 a, b, c = map(int, input().split()) if a-b == b-c : print("YES") else: print("NO")
a.cc:1:3: error: invalid preprocessing directive #- 1 | # -*- coding: utf-8 -*- | ^ a.cc:2:3: error: invalid preprocessing directive #\U000030b9\U000030da\U000030fc\U000030b9\U0000533a\U00005207\U0000308a\U0000306e\U00006574\U00006570\U0000306e\U00005165\U0000529b 2 | # スペース区切りの整数の入力 | ^~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:3:1: error: 'a' does not name a type 3 | a, b, c = map(int, input().split()) | ^
s077616618
p03759
C++
a, b, c = map(int, input().split().split()) if b−a=c−b: print ("YES") elif print("NO")
a.cc:2:5: error: extended character − is not valid in an identifier 2 | if b−a=c−b: | ^ a.cc:2:9: error: extended character − is not valid in an identifier 2 | if b−a=c−b: | ^ a.cc:1:1: error: 'a' does not name a type 1 | a, b, c = map(int, input().split().split()) | ^
s163579415
p03759
C++
#include<iostream> using namespace std; int main() { // 整数の入力 int a,b,c; cin >> a >> b >> c; if (c-b) == (b-a) cout << "YES" << endl; else cout << "NO" << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:14: error: expected primary-expression before '==' token 8 | if (c-b) == (b-a) | ^~
s762345518
p03759
C
#include<stdio.h> int main(void){ int a,b,c; if ( scanf("%d %d %d",&a,&b,&c); if (b-a == c-b) printf("YES"); else printf("NO"); return 0; }
main.c: In function 'main': main.c:7:29: error: expected ')' before ';' token 7 | scanf("%d %d %d",&a,&b,&c); | ^ | ) main.c:6:6: note: to match this '(' 6 | if ( | ^ main.c:13:1: error: expected expression before '}' token 13 | } | ^
s390214598
p03759
C
#include<stdio.h> int main(void){ int a,b,c; if ( scanf("%d %d %d",&a,&b,&c); if (b-a == c-b) printf("YES"); else printf("NO"); return 0; }
main.c: In function 'main': main.c:7:29: error: expected ')' before ';' token 7 | scanf("%d %d %d",&a,&b,&c); | ^ | ) main.c:6:6: note: to match this '(' 6 | if ( | ^ main.c:13:1: error: expected expression before '}' token 13 | } | ^
s053583238
p03759
C
#include <stdio.h> int main (void) { int a,b,c; scanf("%d%d%d",&a,&b,&c); int e=b-a; int f=c-b; if(e==f){ printf("YES"); else printf("NO"); } return 0; }
main.c: In function 'main': main.c:10:14: error: expected '}' before 'else' 10 | else | ^~~~ main.c: At top level: main.c:14:4: error: expected identifier or '(' before 'return' 14 | return 0; | ^~~~~~ main.c:16:9: error: expected identifier or '(' before '}' token 16 | } | ^
s872498074
p03759
C
#include <stdio.h> int main (void) { int a,b,c; scanf("%d%d%d",&a,&b,&c); if(b-a==c-b){ printf("YES"); else printf("NO"); } return 0; }
main.c: In function 'main': main.c:8:14: error: expected '}' before 'else' 8 | else | ^~~~ main.c: At top level: main.c:12:4: error: expected identifier or '(' before 'return' 12 | return 0; | ^~~~~~ main.c:14:9: error: expected identifier or '(' before '}' token 14 | } | ^
s056366003
p03759
C
#include <stdio.h> int main (void) { int a,b,c; scanf("%d%d%d",&a,&b,&c); if(b-a=c-b){ printf("YES"); else printf("NO"); } return 0; }
main.c: In function 'main': main.c:6:20: error: lvalue required as left operand of assignment 6 | if(b-a=c-b){ | ^ main.c:8:14: error: expected '}' before 'else' 8 | else | ^~~~ main.c: At top level: main.c:12:4: error: expected identifier or '(' before 'return' 12 | return 0; | ^~~~~~ main.c:14:9: error: expected identifier or '(' before '}' token 14 | } | ^
s074322711
p03759
Java
import java.util.*; public class Poles{ // static void equal(){ // } public static void main(String[] args) { int input; ArrayList<Integer> tempList; tempList = new ArrayList<Integer>(); Scanner s = new Scanner(System.in); for (int i=0; i<3; i++){ input = s.nextInt(); tempList.add(input); } Collections.sort(tempList); int a,b,c; a = tempList.get(0); b = tempList.get(1); c = tempList.get(2); if ((b-a) == (c-b)){ System.out.println("YES"); } else{ System.out.println("NO"); } } }
Main.java:5: error: class Poles is public, should be declared in a file named Poles.java public class Poles{ ^ 1 error
s716692322
p03759
Java
import java.util.*; public class Poles{ static void equal(){ int input; ArrayList<Integer> tempList; tempList = new ArrayList<Integer>(); Scanner s = new Scanner(System.in); for (int i=0; i<3; i++){ input = s.nextInt(); tempList.add(input); } Collections.sort(tempList); int a,b,c; a = tempList.get(0); b = tempList.get(1); c = tempList.get(2); if ((b-a) == (c-b)){ System.out.println("YES"); } else{ System.out.println("NO"); } } public static void main(String[] args) { Poles.equal(); } }
Main.java:5: error: class Poles is public, should be declared in a file named Poles.java public class Poles{ ^ 1 error
s235655538
p03759
C++
#include <iostream> int main(){ int a, b, c; std::cin >> a >> b >> c; if (b-a == c-b){ std::cout << "YES" << std::endl } else { std::cout << "NO" << std::endl; } return 0; }
a.cc: In function 'int main()': a.cc:9:32: error: expected ';' before '}' token 9 | std::cout << "YES" << std::endl | ^ | ; 10 | } | ~
s883798308
p03759
C++
#include <iostream> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; if(b−a==c−b){ cout<<"Yes"<<endl; } else{ cout<<"No"<<endl; } return 0; }
a.cc:7:12: error: extended character − is not valid in an identifier 7 | if(b−a==c−b){ | ^ a.cc:7:17: error: extended character − is not valid in an identifier 7 | if(b−a==c−b){ | ^ a.cc: In function 'int main()': a.cc:7:12: error: 'b\U00002212a' was not declared in this scope 7 | if(b−a==c−b){ | ^~~ a.cc:7:17: error: 'c\U00002212b' was not declared in this scope 7 | if(b−a==c−b){ | ^~~
s173947565
p03759
C++
#include <iostream> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; if ((a - b) == (c - b)) { cout >> "YES" >> endl; } else { cout >> "NO" >> endl; } return 0; }
a.cc: In function 'int main()': a.cc:8:22: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [4]') 8 | cout >> "YES" >> endl; | ~~~~ ^~ ~~~~~ | | | | | const char [4] | std::ostream {aka std::basic_ostream<char>} In file included from /usr/include/c++/14/string:55, 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/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 835 | operator>>(basic_istream<_CharT, _Traits>& __in, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed: a.cc:8:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 8 | cout >> "YES" >> endl; | ^~~~~ In file included from /usr/include/c++/14/bits/memory_resource.h:38, from /usr/include/c++/14/string:68: /usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)' 131 | operator>>(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed: a.cc:8:17: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte' 8 | cout >> "YES" >> endl; | ^~~~ In file included from /usr/include/c++/14/istream:1109, from /usr/include/c++/14/iostream:42: /usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)' 978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) | ^~~~~~~~ /usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed: a.cc:8:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 8 | cout >> "YES" >> endl; | ^~~~~ /usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)' 849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed: a.cc:8:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 8 | cout >> "YES" >> endl; | ^~~~~ /usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)' 854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed: a.cc:8:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 8 | cout >> "YES" >> endl; | ^~~~~ /usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)' 896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed: a.cc:8:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 8 | cout >> "YES" >> endl; | ^~~~~ /usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)' 939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed: a.cc:8:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 8 | cout >> "YES" >> endl; | ^~~~~ /usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)' 945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed: a.cc:8:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 8 | cout >> "YES" >> endl; | ^~~~~ /usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ /usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed: /usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = const char (&)[4]]': a.cc:8:11: required from here 8 | cout >> "YES" >> endl; | ^~~~~ /usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ a.cc:12:22: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [3]') 12 | cout >> "NO" >> endl; | ~~~~ ^~ ~~~~ | | | | | const char [3] | std::ostream {aka std::basic_ostream<char>} /usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 835 | operator>>(basic_istream<_CharT, _Traits>& __in, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed: a.cc:12:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 12 | cout >> "NO" >> endl; | ^~~~ /usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)' 131 | operator>>(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed: a.cc:12:17: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte' 12 | cout >> "NO" >> endl; | ^~~~ /usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)' 978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) | ^~~~~~~~ /usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed: a.cc:12:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 12 | cout >> "NO" >> endl; | ^~~~ /usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)' 849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed: a.cc:12:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 12 | cout >> "NO" >> endl; | ^~~~ /usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)' 854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed: a.cc:12:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 12 | cout >> "NO" >> endl; | ^~~~ /usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)' 896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed: a.cc:12:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 's
s627529445
p03759
C++
#include<stdio.h> #include <vector> #include <list> #include <map> #include <set> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cstdlib> #include <cctype> #include <string> #include <cstring> #include <ctime> using namespace std; //conversion //------------------------------------------ inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;} template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();} //math //------------------------------------------- template<class T> inline T sqr(T x) {return x*x;} //typedef //------------------------------------------ typedef vector<int> VI; typedef vector<VI> VVI; typedef vector<string> VS; typedef pair<int, int> PII; typedef long long LL; //container util //------------------------------------------ #define ALL(a) (a).begin(),(a).end() #define RALL(a) (a).rbegin(), (a).rend() #define PB push_back #define MP make_pair #define SZ(a) int((a).size()) #define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i) #define EXIST(s,e) ((s).find(e)!=(s).end()) #define SORT(c) sort((c).begin(),(c).end()) //repetition //------------------------------------------ #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define REP(i,n) FOR(i,0,n) //constant //-------------------------------------------- const double EPS = 1e-10; const double PI = acos(-1.0); //clear memory #define CLR(a) memset((a), 0 ,sizeof(a)) //debug #define dump(x) cerr << #x << " = " << (x) << endl; #define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl; int main(void){ cin >> a >> b >> c; if (b-a == c-b) cout << "YES" << endl; else cout << "NO" << endl; return 0; }
a.cc: In function 'int main()': a.cc:72:10: error: 'a' was not declared in this scope 72 | cin >> a >> b >> c; | ^ a.cc:72:15: error: 'b' was not declared in this scope 72 | cin >> a >> b >> c; | ^ a.cc:72:20: error: 'c' was not declared in this scope 72 | cin >> a >> b >> c; | ^
s809640227
p03759
C++
#include <cstdlib> #include <iostream> int main() { std::cin.tie(0); std::ios::sync_with_stdio(false); int a, b, c; std::cin >> a >> b >> c if(c-b==b-a) std::cout << "YES" << std::endl; else std::cout << "NO" << std::endl; return EXIT_SUCCESS; }
a.cc: In function 'int main()': a.cc:12:26: error: expected ';' before 'if' 12 | std::cin >> a >> b >> c | ^ | ; 13 | 14 | if(c-b==b-a) | ~~ a.cc:16:3: error: 'else' without a previous 'if' 16 | else | ^~~~
s020528965
p03759
C++
#include <iostream> using namespace std; int a,b,c; void read_input(){ cin >> a >> b >> c; } int main(void){ read_input(); if (b-a == c-b{ cout << "YES" << endl; }else{ cout << "NO" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:12:19: error: expected ';' before '{' token 12 | if (b-a == c-b{ | ^ | ; a.cc:14:6: error: expected primary-expression before 'else' 14 | }else{ | ^~~~ a.cc:14:6: error: expected ')' before 'else' 14 | }else{ | ^~~~ | ) a.cc:12:8: note: to match this '(' 12 | if (b-a == c-b{ | ^
s553137465
p03759
C
#include <stdio.h> int main(void) { int a,b,c; scanf ("%d %d %d",&a,&b,&c); if (b-a=c-b) { printf ("YES¥n"); } else { printf ("NO¥n"); } return 0; }
main.c: In function 'main': main.c:6:10: error: lvalue required as left operand of assignment 6 | if (b-a=c-b) { | ^
s279229157
p03759
Java
import java.util.*; public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); if ((b - a) == (c - b)){ System.out.print("YES"); } else System.out.print("NO"); }
Main.java:3: 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) 1 error
s253944140
p03759
Java
import java.util.*; public class MAIN { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); if ((b - a) == (c - b)){ System.out.print("YES"); } else System.out.print("NO"); } }
Main.java:3: error: class MAIN is public, should be declared in a file named MAIN.java public class MAIN { ^ 1 error
s915217538
p03759
Java
import java.util.*; public class BeginnerTest058_1 { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); if ((b - a) == (c - b)){ System.out.print("YES"); } else System.out.print("NO"); } }
Main.java:3: error: class BeginnerTest058_1 is public, should be declared in a file named BeginnerTest058_1.java public class BeginnerTest058_1 { ^ 1 error
s313035131
p03759
Java
import java.util.*; public class BeginnerTest058_1 { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); if ((b - a) == (c - b)){ System.out.print("YES"); } else System.out.print("NO"); } } } else System.out.print("NO"); }
Main.java:16: error: class, interface, enum, or record expected } ^ Main.java:18: error: class, interface, enum, or record expected } ^ 2 errors
s509502425
p03759
Java
public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); if ((b - a) == (c - b)){ System.out.print("YES"); } else System.out.print("NO"); }
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) 1 error
s739870145
p03759
C++
#include <stdio.h> void main(void) { char O[999],E[999]; int i; scanf("%s%s", O,E); for(i = 0 ; O[i] ; i++) { if(O[i]>10) putchar(O[i]); if(E[i]>10) putchar(E[i]); } puts(""); return 0;}
a.cc:2:1: error: '::main' must return 'int' 2 | void main(void) | ^~~~
s414444845
p03759
C++
#include <stdio.h> int main() { int a,b,c; scanf("%d%d%d",&a,&b,&c); puts(a+c==b+b?"YES","NO"); return 0; }
a.cc: In function 'int main()': a.cc:6:25: error: expected ':' before ')' token 6 | puts(a+c==b+b?"YES","NO"); | ^ | : a.cc:6:25: error: expected primary-expression before ')' token
s791710237
p03759
C++
using System; using System.Collections.Generic; using System.Collections; class p { static void Main(string[] args) { string[] input = Console.ReadLine().Split(); long a = long.Parse(input[0]), b = long.Parse(input[1]), c = long.Parse(input[2]); if (a + c == 2 * b) Console.WriteLine("YES"); else Console.WriteLine("NO"); } }
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Collections.Generic; | ^~~~~~ a.cc:3:7: error: expected nested-name-specifier before 'System' 3 | using System.Collections; | ^~~~~~ a.cc:9:22: error: 'string' has not been declared 9 | static void Main(string[] args) | ^~~~~~ a.cc:9:31: error: expected ',' or '...' before 'args' 9 | static void Main(string[] args) | ^~~~ a.cc:17:2: error: expected ';' after class definition 17 | } | ^ | ; a.cc: In static member function 'static void p::Main(int*)': a.cc:11:9: error: 'string' was not declared in this scope 11 | string[] input = Console.ReadLine().Split(); | ^~~~~~ a.cc:11:16: error: expected primary-expression before ']' token 11 | string[] input = Console.ReadLine().Split(); | ^ a.cc:12:18: error: expected primary-expression before 'long' 12 | long a = long.Parse(input[0]), b = long.Parse(input[1]), c = long.Parse(input[2]); | ^~~~ a.cc:14:17: error: 'c' was not declared in this scope 14 | if (a + c == 2 * b) Console.WriteLine("YES"); | ^ a.cc:14:26: error: 'b' was not declared in this scope 14 | if (a + c == 2 * b) Console.WriteLine("YES"); | ^ a.cc:14:29: error: 'Console' was not declared in this scope 14 | if (a + c == 2 * b) Console.WriteLine("YES"); | ^~~~~~~ a.cc:15:14: error: 'Console' was not declared in this scope 15 | else Console.WriteLine("NO"); | ^~~~~~~
s347373501
p03759
Java
public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); if ((b-a)==(c-b)){ System.out.println("YES"); } else{ System.out.println("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
s978830320
p03759
C++
#include <iostream> using namespace std; int main(void){ // Here your code ! int a,b,c; cin >> a >> b >> c; if( b−a==c−b){ cout << "YES" << endl; }else{ cout << "NO" << endl; } }
a.cc:7:9: error: extended character − is not valid in an identifier 7 | if( b−a==c−b){ | ^ a.cc:7:14: error: extended character − is not valid in an identifier 7 | if( b−a==c−b){ | ^ a.cc: In function 'int main()': a.cc:7:9: error: 'b\U00002212a' was not declared in this scope 7 | if( b−a==c−b){ | ^~~ a.cc:7:14: error: 'c\U00002212b' was not declared in this scope 7 | if( b−a==c−b){ | ^~~
s725687499
p03759
Java
public class A { public static void main(String[] args) { Scanner in = new Scanner(System.in); int[] poles = new int[3]; for (int i = 0; i < 3; i++) { poles[i] = in.nextInt(); } List<Integer> arrangement = new ArrayList<>(); for (int i = 0; i < poles.length; i++) { for (int j = 0; j < poles.length; j++) { if (i < j) { arrangement.add(Math.abs(poles[i]-poles[j])); } } } boolean isBeautiful = false; for (int i = 0; i < arrangement.size(); i++) { for (int j = 1; j < arrangement.size(); j++) { if (arrangement.get(i).compareTo(arrangement.get(j)) == 0 && i != j) { isBeautiful = true; } } } System.out.println(isBeautiful); } }
Main.java:1: error: class A is public, should be declared in a file named A.java public class A { ^ Main.java:4: error: cannot find symbol Scanner in = new Scanner(System.in); ^ symbol: class Scanner location: class A Main.java:4: error: cannot find symbol Scanner in = new Scanner(System.in); ^ symbol: class Scanner location: class A Main.java:9: error: cannot find symbol List<Integer> arrangement = new ArrayList<>(); ^ symbol: class List location: class A Main.java:9: error: cannot find symbol List<Integer> arrangement = new ArrayList<>(); ^ symbol: class ArrayList location: class A 5 errors
s817021324
p03759
Java
// Scanner in = new Scanner(System.in); int[] poles = new int[3]; for (int i = 0; i < 3; i++) { poles[i] = in.nextInt(); } List<Integer> arrangement = new ArrayList<>(); for (int i = 0; i < poles.length; i++) { for (int j = 0; j < poles.length; j++) { if (i < j) { arrangement.add(Math.abs(poles[i]-poles[j])); } } } boolean isBeautiful = false; for (int i = 0; i < arrangement.size(); i++) { for (int j = 1; j < arrangement.size(); j++) { if (arrangement.get(i).compareTo(arrangement.get(j)) == 0 && i != j) { isBeautiful = true; } } } System.out.println(isBeautiful);
Main.java:2: error: unnamed classes are a preview feature and are disabled by default. int[] poles = new int[3]; ^ (use --enable-preview to enable unnamed classes) Main.java:3: error: class, interface, enum, or record expected for (int i = 0; i < 3; i++) { ^ Main.java:3: error: class, interface, enum, or record expected for (int i = 0; i < 3; i++) { ^ Main.java:3: error: class, interface, enum, or record expected for (int i = 0; i < 3; i++) { ^ Main.java:5: error: class, interface, enum, or record expected } ^ Main.java:7: error: class, interface, enum, or record expected for (int i = 0; i < poles.length; i++) { ^ Main.java:7: error: class, interface, enum, or record expected for (int i = 0; i < poles.length; i++) { ^ Main.java:7: error: class, interface, enum, or record expected for (int i = 0; i < poles.length; i++) { ^ Main.java:8: error: class, interface, enum, or record expected for (int j = 0; j < poles.length; j++) { ^ Main.java:8: error: class, interface, enum, or record expected for (int j = 0; j < poles.length; j++) { ^ Main.java:11: error: class, interface, enum, or record expected } ^ Main.java:15: error: class, interface, enum, or record expected for (int i = 0; i < arrangement.size(); i++) { ^ Main.java:15: error: class, interface, enum, or record expected for (int i = 0; i < arrangement.size(); i++) { ^ Main.java:15: error: class, interface, enum, or record expected for (int i = 0; i < arrangement.size(); i++) { ^ Main.java:16: error: class, interface, enum, or record expected for (int j = 1; j < arrangement.size(); j++) { ^ Main.java:16: error: class, interface, enum, or record expected for (int j = 1; j < arrangement.size(); j++) { ^ Main.java:19: error: class, interface, enum, or record expected } ^ 17 errors
s065039467
p03759
C++
using System; using System.Collections.Generic; using System.Linq; class Program { static void Main(string[] args) { new Magatro().Solve(); } } public class Magatro { public void Solve() { int a, b, c; string[] s = Console.ReadLine().Split(' '); a = int.Parse(s[0]); b = int.Parse(s[1]); c = int.Parse(s[2]); if (b - a == c - b) { Console.WriteLine("YES"); } else { Console.WriteLine("NO"); } } }
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Collections.Generic; | ^~~~~~ a.cc:3:7: error: expected nested-name-specifier before 'System' 3 | using System.Linq; | ^~~~~~ a.cc:7:22: error: 'string' has not been declared 7 | static void Main(string[] args) | ^~~~~~ a.cc:7:31: error: expected ',' or '...' before 'args' 7 | static void Main(string[] args) | ^~~~ a.cc:11:2: error: expected ';' after class definition 11 | } | ^ | ; a.cc: In static member function 'static void Program::Main(int*)': a.cc:9:13: error: expected type-specifier before 'Magatro' 9 | new Magatro().Solve(); | ^~~~~~~ a.cc: At global scope: a.cc:13:1: error: expected unqualified-id before 'public' 13 | public class Magatro | ^~~~~~
s353235862
p03759
C++
import java.io.OutputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.Scanner; /** * Built using CHelper plug-in * Actual solution is at the top */ public class Main { public static void main(String[] args) { InputStream inputStream = System.in; OutputStream outputStream = System.out; Scanner in = new Scanner(inputStream); PrintWriter out = new PrintWriter(outputStream); ABC058_A solver = new ABC058_A(); solver.solve(1, in, out); out.close(); } static class ABC058_A { public void solve(int testNumber, Scanner in, PrintWriter out) { int a = in.nextInt(); int b = in.nextInt(); int c = in.nextInt(); out.println((b - a == c - b) ? "YES" : "NO"); } } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.OutputStream; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.io.IOException; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: 'import' does not name a type 3 | import java.io.InputStream; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:1: error: 'import' does not name a type 4 | import java.io.PrintWriter; | ^~~~~~ a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:5:1: error: 'import' does not name a type 5 | import java.util.Scanner; | ^~~~~~ a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:11:1: error: expected unqualified-id before 'public' 11 | public class Main { | ^~~~~~
s860214466
p03759
C++
#include <iostream > using namespace std; int main() { int a, b, c; cin>>a>>b>>c; cout<< (b-a==c-b?"YES":"NO") <<endl; }
a.cc:1:10: fatal error: iostream : No such file or directory 1 | #include <iostream > | ^~~~~~~~~~~ compilation terminated.
s330383645
p03759
C++
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); if(b-a==c-b)System.out.println("YES"); else System.out.println("NO"); } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Main { | ^~~~~~
s814926328
p03759
C++
#include <algorithm> #include <bitset> #include <cassert> #include <deque> #include <fstream> #include <iostream> #include <map> #include <math.h> #include <memory> #include <queue> #include <sstream> #include <stdio.h> #include <string> #include <vector> #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define REP(i, n) FOR(i, 0, n) #define POW(n) ((n) * (n)) #define ALL(a) (a).begin(), (a).end() #define dump(v) (cerr << #v << ": " << v << endl) #define cerr \ if (true) \ cerr using namespace std; typedef long long ll; typedef unsigned long long ull; typedef vector<int> vi; typedef vector<double> vd; typedef vector<string> vs; typedef vector<unsigned long long> vull; // ll n = to_T<ll>("114514") template <class T> T to_T(const string &s) { istringstream is(s); T res; is >> res; return res; } template <class T> string to_s(const T &a) { ostringstream os; os << a; return os.str(); } void solve(long long N, long long M) { ll ret = min(N, M / 2); M -= ret * 2; ret += M / 4; cout << ret << endl; } int main() { ios::sync_with_stdio(false); int a; int b; int c; cin >> a; cin >> b; cin >> c; int x; int y; x = abs(b - a); y = abs(c - b); if(x == y){ cout << "YES" << endl; }else{ cout << "NO" << endl; } solve(N, M); return 0; }
a.cc: In function 'int main()': a.cc:78:9: error: 'N' was not declared in this scope 78 | solve(N, M); | ^ a.cc:78:12: error: 'M' was not declared in this scope 78 | solve(N, M); | ^
s346588936
p03759
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; if(b-a==c-b){cout << "YES" << endl;} else{cout << "NO" << endl;} return 0;
a.cc: In function 'int main()': a.cc:9:12: error: expected '}' at end of input 9 | return 0; | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s806427118
p03759
C++
#include <bits/stdc++.h> using namespace std; int mian(){ int a,b,c; cin >> a >> b >> c; if(b-a==c-b){cout << "YES" << endl;} else{cout << "NO" << endl;} return 0; }
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s151119514
p03759
C++
a, b, c = map(int(input().split())) if b-a == c-b: print('YES') else: print('NO')
a.cc:3:15: warning: multi-character character constant [-Wmultichar] 3 | print('YES') | ^~~~~ a.cc:5:15: warning: multi-character character constant [-Wmultichar] 5 | print('NO') | ^~~~ a.cc:1:1: error: 'a' does not name a type 1 | a, b, c = map(int(input().split())) | ^
s043221839
p03759
C++
<?php list($a, $b, $c) = explode(' ', trim(fgets(STDIN))); if ($b - $a == $c - $b) { echo "YES\n"; } else { echo "NO\n"; }
a.cc:1:1: error: expected unqualified-id before '<' token 1 | <?php | ^ a.cc:3:1: error: expected unqualified-id before 'if' 3 | if ($b - $a == $c - $b) { | ^~ a.cc:5:3: error: expected unqualified-id before 'else' 5 | } else { | ^~~~
s584892840
p03759
C++
#include<stdio.h> int main() { int m,n,k; int x[100000],y[100000]; scanf("%d %d",&n,&m); for(k=0;k<n;k++) scanf("%d",&x[k]); for(k=0;k<m;k++) scanf("%d",&y[k]); int sum=0; int a,b,c,d; for(a=0;a<n-1;a++) for(b=a+1;b<n,b++) for(c=0;c<m-1;c++) for(d=c+1;d<m;d++) sum=(b-a)*(c-d); printf("%d",sum/1000000007);   return 0; }
a.cc:20:1: error: extended character   is not valid in an identifier 20 |   | ^ a.cc: In function 'int main()': a.cc:15:18: error: expected ';' before ')' token 15 | for(b=a+1;b<n,b++) | ^ | ; a.cc:20:1: error: '\U000000a0' was not declared in this scope 20 |   | ^
s403856479
p03759
C++
#include <iostream> #include <math.h> #include <algorithm> #include <vector> using namespace std; int main() { int a,b,c,d,e; string f,g; cin>>a>>b>>c; d=b-a; e=c-b; if(d=e){ printf(''YES'',f); } else{ printf(''NO'',g); } }
a.cc:13:13: error: empty character constant 13 | printf(''YES'',f); | ^~~~~ a.cc:13:18: error: empty character constant 13 | printf(''YES'',f); | ^~ a.cc:17:13: error: empty character constant 17 | printf(''NO'',g); | ^~~~ a.cc:17:17: error: empty character constant 17 | printf(''NO'',g); | ^~ a.cc: In function 'int main()': a.cc:13:13: error: unable to find character literal operator 'operator""YES' with 'char' argument 13 | printf(''YES'',f); | ^~~~~ a.cc:17:13: error: unable to find character literal operator 'operator""NO' with 'char' argument 17 | printf(''NO'',g); | ^~~~
s978315328
p03759
C++
#include<stdio.h> int main(){ int a,b,c while(scanf("%d%d%d",&a,&b,&c)!=EOF){ if(a<1||b<1||c<1||a>100||b>100||c>100) continue; if(a-b==b-c) printf("YES") else printf("NO") } }
a.cc: In function 'int main()': a.cc:4:9: error: expected initializer before 'while' 4 | while(scanf("%d%d%d",&a,&b,&c)!=EOF){ | ^~~~~
s021915624
p03759
C++
#include<stdio.h> int main(){ int a,b,c while(scanf("%d%d%d",&a,&b,&c)!=EOF){ if(a<1||b<1||c<1||a>100||b>100||c>100) continue; if(a-b==b-c) printf("YES") else printf("NO") } }
a.cc: In function 'int main()': a.cc:4:9: error: expected initializer before 'while' 4 | while(scanf("%d%d%d",&a,&b,&c)!=EOF){ | ^~~~~
s486279769
p03759
C++
#include <iostream> #include <math.h> #include <algorithm> #include <vector> using namespace std; int main() { int a,b,c,d,e; string YES; string NO; cin>>a>>b>>c; d=b-a; e=c-b; if(d=e){ printf('YES'); } else{ printf('NO'); } }
a.cc:14:13: warning: multi-character character constant [-Wmultichar] 14 | printf('YES'); | ^~~~~ a.cc:18:13: warning: multi-character character constant [-Wmultichar] 18 | printf('NO'); | ^~~~ a.cc: In function 'int main()': a.cc:14:13: error: invalid conversion from 'int' to 'const char*' [-fpermissive] 14 | printf('YES'); | ^~~~~ | | | int In file included from /usr/include/c++/14/cstdio:42, from /usr/include/c++/14/ext/string_conversions.h:45, from /usr/include/c++/14/bits/basic_string.h:4154, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/stdio.h:363:43: note: initializing argument 1 of 'int printf(const char*, ...)' 363 | extern int printf (const char *__restrict __format, ...); | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ a.cc:18:13: error: invalid conversion from 'int' to 'const char*' [-fpermissive] 18 | printf('NO'); | ^~~~ | | | int /usr/include/stdio.h:363:43: note: initializing argument 1 of 'int printf(const char*, ...)' 363 | extern int printf (const char *__restrict __format, ...); | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
s042986853
p03759
C++
a,b,c = map(int, raw_input().split()) if b-a == c-b: print 'YES' else: print 'NO'
a.cc:4:11: warning: multi-character character constant [-Wmultichar] 4 | print 'YES' | ^~~~~ a.cc:6:11: warning: multi-character character constant [-Wmultichar] 6 | print 'NO' | ^~~~ a.cc:1:1: error: 'a' does not name a type 1 | a,b,c = map(int, raw_input().split()) | ^
s415211274
p03759
C++
#include <iostream> #include <math.h> #include <algorithm> #include <vector> using namespace std; int main() { int a,b,c,d,e; string YES; string NO; cin>>a>>b>>c; d=b-a; e=c-b; if(d=e){ printf(YES) } else{ printf(NO) } }
a.cc: In function 'int main()': a.cc:14:13: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*' 14 | printf(YES) | ^~~ | | | std::string {aka std::__cxx11::basic_string<char>} In file included from /usr/include/c++/14/cstdio:42, from /usr/include/c++/14/ext/string_conversions.h:45, from /usr/include/c++/14/bits/basic_string.h:4154, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/stdio.h:363:43: note: initializing argument 1 of 'int printf(const char*, ...)' 363 | extern int printf (const char *__restrict __format, ...); | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ a.cc:18:13: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*' 18 | printf(NO) | ^~ | | | std::string {aka std::__cxx11::basic_string<char>} /usr/include/stdio.h:363:43: note: initializing argument 1 of 'int printf(const char*, ...)' 363 | extern int printf (const char *__restrict __format, ...); | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
s241024016
p03759
Java
import java.util.Scanner; public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner stdIn=new Scanner(System.in); int a=stdIn.nextInt(); int b=stdIn.nextInt(); int c=stdIn.nextInt(); if(a-b==b-c) System.out.println("YES"); else System.out.println("NO"); }
Main.java:4: 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) 1 error
s513384765
p03759
C
#include <stdio.h> int main(void) { int a=0,b=0,c=0,d=0,e=0; scanf_s("%d",&a); scanf_s("%d",&b); scanf_s("%d",&c); d=b-a; e=c-b; if(d<0){ d=d*-1; } if(e<0){ e=e*-1; } if(d==e){ printf("YES\n"); }else{ printf("NO\n"); } return 0; }
main.c: In function 'main': main.c:7:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 7 | scanf_s("%d",&a); | ^~~~~~~ | scanf
s730371420
p03759
Java
import java.util.Scanner; public class Question2 { public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner stdIn=new Scanner(System.in); int a=stdIn.nextInt(); int b=stdIn.nextInt(); int c=stdIn.nextInt(); if(a-b==b-c) System.out.println("YES"); else System.out.println("NO"); } }
Main.java:2: error: class Question2 is public, should be declared in a file named Question2.java public class Question2 { ^ 1 error
s028514468
p03759
C++
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; class Program { static void Main(string[] args) { string[] temp = Console.ReadLine().Split(' '); int cou = 0; int[] colle = new int[3]; foreach (string s in temp) { colle[cou] = int.Parse(s); cou++; } if (colle[0] - colle[1] * 2 + colle[2] == 0) { Console.WriteLine("YES"); } else { Console.WriteLine("NO"); } } }
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Collections.Generic; | ^~~~~~ a.cc:3:7: error: expected nested-name-specifier before 'System' 3 | using System.Linq; | ^~~~~~ a.cc:4:7: error: expected nested-name-specifier before 'System' 4 | using System.Text; | ^~~~~~ a.cc:5:7: error: expected nested-name-specifier before 'System' 5 | using System.Threading.Tasks; | ^~~~~~ a.cc:9:26: error: 'string' has not been declared 9 | static void Main(string[] args) | ^~~~~~ a.cc:9:35: error: expected ',' or '...' before 'args' 9 | static void Main(string[] args) | ^~~~ a.cc:27:6: error: expected ';' after class definition 27 | } | ^ | ; a.cc: In static member function 'static void Program::Main(int*)': a.cc:11:13: error: 'string' was not declared in this scope 11 | string[] temp = Console.ReadLine().Split(' '); | ^~~~~~ a.cc:11:20: error: expected primary-expression before ']' token 11 | string[] temp = Console.ReadLine().Split(' '); | ^ a.cc:13:16: error: structured binding declaration cannot have type 'int' 13 | int[] colle = new int[3]; | ^~ a.cc:13:16: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto' a.cc:13:16: error: empty structured binding declaration a.cc:13:19: error: expected initializer before 'colle' 13 | int[] colle = new int[3]; | ^~~~~ a.cc:14:29: error: expected ')' before 's' 14 | foreach (string s in temp) { | ^ a.cc:14:21: note: to match this '(' 14 | foreach (string s in temp) { | ^ a.cc:14:13: error: 'foreach' was not declared in this scope 14 | foreach (string s in temp) { | ^~~~~~~ a.cc:18:17: error: 'colle' was not declared in this scope 18 | if (colle[0] - colle[1] * 2 + colle[2] == 0) { | ^~~~~ a.cc:19:17: error: 'Console' was not declared in this scope 19 | Console.WriteLine("YES"); | ^~~~~~~ a.cc:23:17: error: 'Console' was not declared in this scope 23 | Console.WriteLine("NO"); | ^~~~~~~
s365167122
p03759
C++
#include<iostream> using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; if( b−a == c−b ){ cout << "YES" << endl; } else{ cout << "NO" << endl; } return 0; }
a.cc:7:9: error: extended character − is not valid in an identifier 7 | if( b−a == c−b ){ | ^ a.cc:7:16: error: extended character − is not valid in an identifier 7 | if( b−a == c−b ){ | ^ a.cc: In function 'int main()': a.cc:7:9: error: 'b\U00002212a' was not declared in this scope 7 | if( b−a == c−b ){ | ^~~ a.cc:7:16: error: 'c\U00002212b' was not declared in this scope 7 | if( b−a == c−b ){ | ^~~
s856910603
p03759
C++
#include <iostream> using namespace std; int main() { int A,B,C; cin >> A >> B>> C; cout << (B-A==C-B : "YES" ? "NO"); return 0; }
a.cc: In function 'int main()': a.cc:9:21: error: expected ')' before ':' token 9 | cout << (B-A==C-B : "YES" ? "NO"); | ~ ^~ | )
s211949132
p03759
C++
#include <iostream> #include <string> #define rep(i,n) for(int i = 0; i < n;++i) using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; if(b-a == c- b) cout << "YES"<<endl; else cout <<< "NO" <<endl; return 0; }
a.cc: In function 'int main()': a.cc:13:24: error: expected primary-expression before '<' token 13 | cout <<< "NO" <<endl; | ^ a.cc:13:31: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<' 13 | cout <<< "NO" <<endl; | ~~~~~^~~~~~
s844180184
p03759
C++
#include <iostream> using namespace std; int main() { int A,B,C; cin >> A >> B>> C; cout << (b-a==c-b : "YES" ? "NO"); return 0; }
a.cc: In function 'int main()': a.cc:9:13: error: 'b' was not declared in this scope 9 | cout << (b-a==c-b : "YES" ? "NO"); | ^ a.cc:9:15: error: 'a' was not declared in this scope 9 | cout << (b-a==c-b : "YES" ? "NO"); | ^ a.cc:9:18: error: 'c' was not declared in this scope 9 | cout << (b-a==c-b : "YES" ? "NO"); | ^ a.cc:9:21: error: expected ')' before ':' token 9 | cout << (b-a==c-b : "YES" ? "NO"); | ~ ^~ | )
s659830735
p03759
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; if(b-a==c-b) cout << YES << endl; else cout << NO << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:26: error: 'YES' was not declared in this scope 7 | if(b-a==c-b) cout << YES << endl; | ^~~ a.cc:8:18: error: 'NO' was not declared in this scope 8 | else cout << NO << endl; | ^~
s011716544
p03759
C++
#include<stdio.h> int main() { int a,b,c; scanf(("%d %d %d",&a,&b,&c); if(b-a==c-b) printf("YES"); else printf("NO"); return 0; }
a.cc: In function 'int main()': a.cc:5:28: error: expected ')' before ';' token 5 | scanf(("%d %d %d",&a,&b,&c); | ~ ^ | )
s322882056
p03759
C
include <stdio.h> int main(void){ int a,b,c; scanf("%d %d %d",&a,&b,&c); if(b-a==c-b){ printf("YES\n"); }else{ printf("NO\n"); } return 0; }
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <stdio.h> | ^
s135937720
p03759
C++
#include <bits/stdc++.h> using namespace std; //int main( int argc, char *argv[] ) { int A; int B; int C; // 入力 cin >> A; cin >> B; cin >> C; // 出力 if( A-B==B-C ) cout << "YES" << endl; else cout << "NO" << endl; return 0; }
a.cc:5:1: error: expected unqualified-id before '{' token 5 | { | ^
s573387358
p03759
C++
#incldue<iostream> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; if(b-a==c-b) cout<<"YES"<<endl; else cout<<"NO"<<endl; return 0; }
a.cc:1:2: error: invalid preprocessing directive #incldue; did you mean #include? 1 | #incldue<iostream> | ^~~~~~~ | include a.cc: In function 'int main()': a.cc:6:1: error: 'cin' was not declared in this scope 6 | cin>>a>>b>>c; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | #incldue<iostream> a.cc:8:1: error: 'cout' was not declared in this scope 8 | cout<<"YES"<<endl; | ^~~~ a.cc:8:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:8:14: error: 'endl' was not declared in this scope 8 | cout<<"YES"<<endl; | ^~~~ a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' +++ |+#include <ostream> 1 | #incldue<iostream> a.cc:10:1: error: 'cout' was not declared in this scope 10 | cout<<"NO"<<endl; | ^~~~ a.cc:10:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:10:13: error: 'endl' was not declared in this scope 10 | cout<<"NO"<<endl; | ^~~~ a.cc:10:13: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
s907920136
p03759
C++
int main(void){ int a,b,c; cin >> a >> b >> c; if (b-a == c-b) cout << "YES"; else cout << "NO"; cout << endl; }
a.cc: In function 'int main()': a.cc:3:5: error: 'cin' was not declared in this scope 3 | cin >> a >> b >> c; | ^~~ a.cc:5:9: error: 'cout' was not declared in this scope 5 | cout << "YES"; | ^~~~ a.cc:7:9: error: 'cout' was not declared in this scope 7 | cout << "NO"; | ^~~~ a.cc:8:5: error: 'cout' was not declared in this scope 8 | cout << endl; | ^~~~ a.cc:8:13: error: 'endl' was not declared in this scope 8 | cout << endl; | ^~~~
s512742393
p03759
C++
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); if (b−a=c−b) { System.out.println("YES"); } else { System.out.println("NO"); } } }
a.cc:11:21: error: extended character − is not valid in an identifier 11 | if (b−a=c−b) { | ^ a.cc:11:25: error: extended character − is not valid in an identifier 11 | if (b−a=c−b) { | ^ a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Main { | ^~~~~~
s602444112
p03759
C++
a,b,c=gets.split.map &:to_i puts b-a==c-b ? :YES : :NO
a.cc:1:1: error: 'a' does not name a type 1 | a,b,c=gets.split.map &:to_i | ^