submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s885259776
p03759
C++
#include<iostream> #include<string> #include<vector> using namespace std; int main() { int c, a, b; cin >> a >> b >> c; if ((b - a) == (c - b)) { cout << "YES" << "\n"; } else { cout << "NO" << "\n"; }
a.cc: In function 'int main()': a.cc:17:10: error: expected '}' at end of input 17 | } | ^ a.cc:7:1: note: to match this '{' 7 | { | ^
s504364587
p03759
C++
#include <iostream> using namespace std; int main(){ int A,B,C; cin >> A >> B >> C; if (A - B == B - C){ cout << "YES" << endl;} else if {cout << "NO" << endl;} }
a.cc: In function 'int main()': a.cc:8:11: error: expected '(' before '{' token 8 | else if {cout << "NO" << endl;} | ^ | (
s066880360
p03759
C++
#include<bits/stdc++.h> using namespace std; int a,b,c; int main() { scanf("%d%d%d",&a,&b,&c); if(b-a==c-b) puts("YES); else puts("NO"); return 0; }
a.cc:8:22: warning: missing terminating " character 8 | puts("YES); | ^ a.cc:8:22: error: missing terminating " character 8 | puts("YES); | ^~~~~~ a.cc: In function 'int main()': a.cc:9:9: error: expected primary-expression before 'else' 9 | else | ^~~~
s932332896
p03759
C++
#include<bits/stdc++.h> using namespace std; int main() { cin>>a>>b>>c; if (b-a==c-b) cout<<"Yes"; else cout<<"No"; return 0; }
a.cc: In function 'int main()': a.cc:5:10: error: 'a' was not declared in this scope 5 | cin>>a>>b>>c; | ^ a.cc:5:13: error: 'b' was not declared in this scope 5 | cin>>a>>b>>c; | ^ a.cc:5:16: error: 'c' was not declared in this scope 5 | cin>>a>>b>>c; | ^
s616037900
p03759
C++
#include <cstdio> 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:7:10: error: extended character − is not valid in an identifier 7 | if(b − a == c − b){ | ^ a.cc:7:19: 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: expected ')' before '\U00002212' 7 | if(b − a == c − b){ | ~ ^~ | )
s076234705
p03759
C++
#include <stdio.h> int main(void) { int a,b,c,d; scanf("%d%d%d",&a,&b,&c); if(a<b){ if(b+b-a=c){ printf("YES\n"); return 0; } }if(a>b){ if(b+b-c=a){ printf("YES\n"); return 0; } } printf("NO\n"); return 0; }
a.cc: In function 'int main()': a.cc:7:23: error: lvalue required as left operand of assignment 7 | if(b+b-a=c){ | ~~~^~ a.cc:12:23: error: lvalue required as left operand of assignment 12 | if(b+b-c=a){ | ~~~^~
s327927126
p03759
C++
#include<bits/stdc++.h> using namespace std; int a,b,c; int main(){ cin>>a>>b>>c; sort(a+1,a+4); if(a+c==b*2) cout<<"YES"<<endl; else cout<<"NO"<<endl; return 0; }
In file included from /usr/include/c++/14/algorithm:61, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]': /usr/include/c++/14/bits/stl_algo.h:1817:25: required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1817 | std::__insertion_sort(__first, __first + int(_S_threshold), __comp); | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1908:31: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1908 | std::__final_insertion_sort(__first, __last, __comp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:4772:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = int]' 4772 | std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:6:9: required from here 6 | sort(a+1,a+4); | ~~~~^~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1780:17: error: no type named 'value_type' in 'struct std::iterator_traits<int>' 1780 | __val = _GLIBCXX_MOVE(*__i); | ^~~~~ In file included from /usr/include/c++/14/bits/stl_pair.h:61, from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60: /usr/include/c++/14/bits/stl_algo.h:1780:25: error: invalid type argument of unary '*' (have 'int') 1780 | __val = _GLIBCXX_MOVE(*__i); | ^~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1782:15: error: invalid type argument of unary '*' (have 'int') 1782 | *__first = _GLIBCXX_MOVE(__val); | ^~~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:71: /usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::__ops::_Iter_less_iter::operator()(_Iterator1, _Iterator2) const [with _Iterator1 = int; _Iterator2 = int]': /usr/include/c++/14/bits/stl_algo.h:1777:14: required from 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1777 | if (__comp(__i, __first)) | ~~~~~~^~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1817:25: required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1817 | std::__insertion_sort(__first, __first + int(_S_threshold), __comp); | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1908:31: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1908 | std::__final_insertion_sort(__first, __last, __comp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:4772:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = int]' 4772 | std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:6:9: required from here 6 | sort(a+1,a+4); | ~~~~^~~~~~~~~ /usr/include/c++/14/bits/predefined_ops.h:45:16: error: invalid type argument of unary '*' (have 'int') 45 | { return *__it1 < *__it2; } | ^~~~~~ /usr/include/c++/14/bits/predefined_ops.h:45:25: error: invalid type argument of unary '*' (have 'int') 45 | { return *__it1 < *__it2; } | ^~~~~~ In file included from /usr/include/c++/14/bits/stl_algo.h:61: /usr/include/c++/14/bits/stl_heap.h: In instantiation of 'void std::__make_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare&) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]': /usr/include/c++/14/bits/stl_algo.h:1593:23: required from 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1593 | std::__make_heap(__first, __middle, __comp); | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1868:25: required from 'void std::__partial_sort(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1868 | std::__heap_select(__first, __middle, __last, __comp); | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1884:27: required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = int; _Size = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1884 | std::__partial_sort(__first, __last, __last, __comp); | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1905:25: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1905 | std::__introsort_loop(__first, __last, | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ 1906 | std::__lg(__last - __first) * 2, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1907 | __comp); | ~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:4772:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = int]' 4772 | std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:6:9: required from here 6 | sort(a+1,a+4); | ~~~~^~~~~~~~~ /usr/include/c++/14/bits/stl_heap.h:344:11: error: no type named 'value_type' in 'struct std::iterator_traits<int>' 344 | _ValueType; | ^~~~~~~~~~ /usr/include/c++/14/bits/stl_heap.h:346:11: error: no type named 'difference_type' in 'struct std::iterator_traits<int>' 346 | _DistanceType; | ^~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_heap.h: In instantiation of 'void std::__pop_heap(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare&) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]': /usr/include/c++/14/bits/stl_algo.h:1596:19: required from 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1596 | std::__pop_heap(__first, __middle, __i, __comp); | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1868:25: required from 'void std::__partial_sort(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1868 | std::__heap_select(__first, __middle, __last, __comp); | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1884:27: required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = int; _Size = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1884 | std::__partial_sort(__first, __last, __last, __comp); | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1905:25: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1905 | std::__introsort_loop(__first, __last, | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ 1906 | std::__lg(__last - __first) * 2, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1907 | __comp); | ~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:4772:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = int]' 4772 | std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:6:9: required from here 6 | sort(a+1,a+4); | ~~~~^~~~~~~~~ /usr/include/c++/14/bits/stl_heap.h:258:9: error: no type named 'value_type' in 'struct std::iterator_traits<int>' 258 | _ValueType; | ^~~~~~~~~~ /usr/include/c++/14/bits/stl_heap.h:260:9: error: no type named 'difference_type' in 'struct std::iterator_traits<int>' 260 | _DistanceType; | ^~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_heap.h:262:28: error: invalid type argument of unary '*' (have 'int') 262 | _ValueType __value = _GLIBCXX_MOVE(*__result); | ^~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_heap.h:263:7: error: invalid type argument of unary '*' (have 'int') 263 | *__result = _GLIBCXX_MOVE(*__first); | ^~~~~~~~~ /usr/include/c++/14/bits/stl_heap.h:263:19: error: invalid type argument of unary
s440771411
p03759
C++
#include<bits/stdc++.h> using namespace std; int a[10000],b; int main() { cin>>a[1]>>a[2]>>a[3]; sort(a+1,a+4); if(a[2]-a[1]==a[3]-a[2]) { cout<<"YES"<<endl; } else { cout<<"NO"<<endl; } } return 0; }
a.cc:17:5: error: expected unqualified-id before 'return' 17 | return 0; | ^~~~~~ a.cc:18:1: error: expected declaration before '}' token 18 | } | ^
s343827110
p03759
C++
#include<iostream> #include<cstdio> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; if(b-a==c-b) cout<<"Yes"; else cout<<"No"; return 0 }
a.cc: In function 'int main()': a.cc:10:13: error: expected ';' before '}' token 10 | return 0 | ^ | ; 11 | } | ~
s610565365
p03759
C++
0
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 0 | ^
s016878061
p03759
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0;i<(n);i++) const int MOD=(int)1e9+7; using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; if(b-a = c-d) cout << "YES" << endl; else cout << "NO" << endl; }
a.cc: In function 'int main()': a.cc:8:16: error: 'd' was not declared in this scope 8 | if(b-a = c-d) cout << "YES" << endl; | ^
s869156270
p03759
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0;i<(n);i++) const int MOD=(int)1e9+7; using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; if(b-a == c-d) cout << "YES" << endl; else cout << "NO" << endl; }
a.cc: In function 'int main()': a.cc:8:17: error: 'd' was not declared in this scope 8 | if(b-a == c-d) cout << "YES" << endl; | ^
s681192599
p03759
C++
#include<bits/stdc++.h> using namespace std; int c,a,b; int main() { cin>>a>>b>>c; if (b-a=c-b) cout<<"YES"<<endl; else cout<<"NO"; }
a.cc: In function 'int main()': a.cc:8:8: error: lvalue required as left operand of assignment 8 | if (b-a=c-b) | ~^~
s030243465
p03759
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; cout << (b-a == c-b) ? "YES" : "NO" << endl; }
a.cc: In function 'int main()': a.cc:8:39: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<' 8 | cout << (b-a == c-b) ? "YES" : "NO" << endl; | ~~~~~^~~~~~~
s646397567
p03759
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; cout << b-a = c-b ?"YES":"NO" << endl; }
a.cc: In function 'int main()': a.cc:8:33: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<' 8 | cout << b-a = c-b ?"YES":"NO" << endl; | ~~~~~^~~~~~~
s278244443
p03759
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; cout << b-a == c-b ?"YES":"NO" << endl; }
a.cc: In function 'int main()': a.cc:8:15: error: no match for 'operator==' (operand types are 'std::basic_ostream<char>' and 'int') 8 | cout << b-a == c-b ?"YES":"NO" << endl; | ~~~~~~~~~~~ ^~ ~~~ | | | | | int | std::basic_ostream<char> a.cc:8:15: note: candidate: 'operator==(int, int)' (built-in) 8 | cout << b-a == c-b ?"YES":"NO" << endl; | ~~~~~~~~~~~~^~~~~~ a.cc:8:15: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'int' In file included from /usr/include/c++/14/regex:68, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181, from a.cc:1: /usr/include/c++/14/bits/regex.h:1103:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1103 | operator==(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1103:5: note: template argument deduction/substitution failed: a.cc:8:20: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 8 | cout << b-a == c-b ?"YES":"NO" << endl; | ^ /usr/include/c++/14/bits/regex.h:1199:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)' 1199 | operator==(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1199:5: note: template argument deduction/substitution failed: a.cc:8:20: note: 'std::basic_ostream<char>' is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' 8 | cout << b-a == c-b ?"YES":"NO" << endl; | ^ /usr/include/c++/14/bits/regex.h:1274:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)' 1274 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1274:5: note: template argument deduction/substitution failed: a.cc:8:20: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 8 | cout << b-a == c-b ?"YES":"NO" << endl; | ^ /usr/include/c++/14/bits/regex.h:1366:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1366 | operator==(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1366:5: note: template argument deduction/substitution failed: a.cc:8:20: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 8 | cout << b-a == c-b ?"YES":"NO" << endl; | ^ /usr/include/c++/14/bits/regex.h:1441:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1441 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1441:5: note: template argument deduction/substitution failed: a.cc:8:20: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 8 | cout << b-a == c-b ?"YES":"NO" << endl; | ^ /usr/include/c++/14/bits/regex.h:1534:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1534 | operator==(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1534:5: note: template argument deduction/substitution failed: a.cc:8:20: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 8 | cout << b-a == c-b ?"YES":"NO" << endl; | ^ /usr/include/c++/14/bits/regex.h:1613:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1613 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1613:5: note: template argument deduction/substitution failed: a.cc:8:20: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 8 | cout << b-a == c-b ?"YES":"NO" << endl; | ^ /usr/include/c++/14/bits/regex.h:2186:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator==(const match_results<_BiIter, _Alloc>&, const match_results<_BiIter, _Alloc>&)' 2186 | operator==(const match_results<_Bi_iter, _Alloc>& __m1, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:2186:5: note: template argument deduction/substitution failed: a.cc:8:20: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::match_results<_BiIter, _Alloc>' 8 | cout << b-a == c-b ?"YES":"NO" << endl; | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51: /usr/include/c++/14/bits/stl_pair.h:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed: a.cc:8:20: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>' 8 | cout << b-a == c-b ?"YES":"NO" << endl; | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 441 | operator==(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed: a.cc:8:20: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 8 | cout << b-a == c-b ?"YES":"NO" << endl; | ^ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 486 | operator==(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed: a.cc:8:20: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 8 | cout << b-a == c-b ?"YES":"NO" << endl; | ^ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1667 | operator==(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed: a.cc:8:20: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 8 | cout << b-a == c-b ?"YES":"NO" << endl; | ^ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1737 | operator==(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed: a.cc:8:20: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 8 | cout << b-a == c-b ?"YES":"NO" << endl; | ^ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)' 192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed: a.cc:8:20: note: 'std::basic_ostream<char>' is not derived from 'const std::fpos<_StateT>' 8 | cout << b-a == c-b ?"YES":"NO" << endl; | ^ In file included from /usr/include/c++/14/string:43: /usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)' 235 | operator==(const allocator<_T1>&, const allocator<_T2>&) | ^~~~~~~~ /usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed: a.cc:8:20: note: 'std::basic_ostream<char>' is not derived from 'const std::allocator<_CharT>' 8 | cout << b-a == c-b ?"YES":"NO" << endl; | ^ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54: /usr/include/c++/14/string_view:629:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 629 | operator==(basic_string_view<_CharT, _Traits> __x, |
s099787153
p03759
C++
#include<iostream> #include<algorithm> #include<string> #include<map> #include<set> #include<vector> #include<string.h> #include<math.h> #include<stdio.h> #include<queue> #include<utility> #include<cstdio> #include<cstring> #include<new> #include<new.h> #include<float.h> #include<ctype.h> #include<cfloat> #include<cmath> #include<cctype> #include<errno.h> #include<cerrno> #include<memory> #include<memory.h> #include<assert.h> #include<cassert> #include<deque> #include<sstream> #define fo(i,w,n) for(int i=(int) w;i<(int) n;i++) #define qui queue<int> #define vit vector<int> #define ll long long #define pb push_back #define lb lower_bound #define ub upper_bound #define prq priority_queue #define pii pair<int,int> #define mp make_pair #define sz size() #define em empty() #define ct continue #define ms multiset #define all(a) (a).begin(),(a).end() #define pf push_front #define ppf pop_front() using namespace std; int main() { int a,b,c; cin>>a>>b>>c; if(b-a==c-b)cout<<"YES"; else cout<<"NO"; return 0; }
a.cc:15:9: fatal error: new.h: No such file or directory 15 | #include<new.h> | ^~~~~~~ compilation terminated.
s457142322
p03759
C++
#include<algorithm> #include<iostream> using namespace std; int a[5]={0,0,0,0,0}; int main() { cin>>a[0]>>a[1]>>a[2]; sort(a,a+3); if(a[1]-a[0]==a[2]-a[1]) cout<<"YES"; else <<"NO"; return 0; }
a.cc: In function 'int main()': a.cc:10:14: error: expected primary-expression before '<<' token 10 | else <<"NO"; | ^~
s623820339
p03759
C++
#include<iostream> #include<cstdio> #include<algorithm> using namespace std; int main() { int i[4]; scanf("%d%d%d",&a[1],a[2],a[3]); sort(i+1,i+4); if(i[2]-i[1]==i[3]-i[2]) cout<<"YES"<<endl; else cout<<"NO"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:21: error: 'a' was not declared in this scope 8 | scanf("%d%d%d",&a[1],a[2],a[3]); | ^
s931716382
p03759
C++
#include<iostream> #include<algorithm> using namespace std; int a,b,c; int main() { cin>>a>>b>>c; sort(a,b); if(b-a==c-b) { cout<<"YES"<<endl; } else { cout<<"NO"<<endl; } }
In file included from /usr/include/c++/14/algorithm:61, from a.cc:2: /usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]': /usr/include/c++/14/bits/stl_algo.h:1817:25: required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1817 | std::__insertion_sort(__first, __first + int(_S_threshold), __comp); | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1908:31: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1908 | std::__final_insertion_sort(__first, __last, __comp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:4772:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = int]' 4772 | std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:8:9: required from here 8 | sort(a,b); | ~~~~^~~~~ /usr/include/c++/14/bits/stl_algo.h:1780:17: error: no type named 'value_type' in 'struct std::iterator_traits<int>' 1780 | __val = _GLIBCXX_MOVE(*__i); | ^~~~~ In file included from /usr/include/c++/14/bits/exception_ptr.h:41, from /usr/include/c++/14/exception:166, from /usr/include/c++/14/ios:41, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stl_algo.h:1780:25: error: invalid type argument of unary '*' (have 'int') 1780 | __val = _GLIBCXX_MOVE(*__i); | ^~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1782:15: error: invalid type argument of unary '*' (have 'int') 1782 | *__first = _GLIBCXX_MOVE(__val); | ^~~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:71, from /usr/include/c++/14/string:51, 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: /usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::__ops::_Iter_less_iter::operator()(_Iterator1, _Iterator2) const [with _Iterator1 = int; _Iterator2 = int]': /usr/include/c++/14/bits/stl_algo.h:1777:14: required from 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1777 | if (__comp(__i, __first)) | ~~~~~~^~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1817:25: required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1817 | std::__insertion_sort(__first, __first + int(_S_threshold), __comp); | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1908:31: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1908 | std::__final_insertion_sort(__first, __last, __comp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:4772:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = int]' 4772 | std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:8:9: required from here 8 | sort(a,b); | ~~~~^~~~~ /usr/include/c++/14/bits/predefined_ops.h:45:16: error: invalid type argument of unary '*' (have 'int') 45 | { return *__it1 < *__it2; } | ^~~~~~ /usr/include/c++/14/bits/predefined_ops.h:45:25: error: invalid type argument of unary '*' (have 'int') 45 | { return *__it1 < *__it2; } | ^~~~~~ In file included from /usr/include/c++/14/bits/stl_algo.h:61: /usr/include/c++/14/bits/stl_heap.h: In instantiation of 'void std::__make_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare&) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]': /usr/include/c++/14/bits/stl_algo.h:1593:23: required from 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1593 | std::__make_heap(__first, __middle, __comp); | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1868:25: required from 'void std::__partial_sort(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1868 | std::__heap_select(__first, __middle, __last, __comp); | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1884:27: required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = int; _Size = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1884 | std::__partial_sort(__first, __last, __last, __comp); | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1905:25: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1905 | std::__introsort_loop(__first, __last, | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ 1906 | std::__lg(__last - __first) * 2, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1907 | __comp); | ~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:4772:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = int]' 4772 | std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:8:9: required from here 8 | sort(a,b); | ~~~~^~~~~ /usr/include/c++/14/bits/stl_heap.h:344:11: error: no type named 'value_type' in 'struct std::iterator_traits<int>' 344 | _ValueType; | ^~~~~~~~~~ /usr/include/c++/14/bits/stl_heap.h:346:11: error: no type named 'difference_type' in 'struct std::iterator_traits<int>' 346 | _DistanceType; | ^~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_heap.h: In instantiation of 'void std::__pop_heap(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare&) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]': /usr/include/c++/14/bits/stl_algo.h:1596:19: required from 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1596 | std::__pop_heap(__first, __middle, __i, __comp); | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1868:25: required from 'void std::__partial_sort(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1868 | std::__heap_select(__first, __middle, __last, __comp); | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1884:27: required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = int; _Size = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1884 | std::__partial_sort(__first, __last, __last, __comp); | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1905:25: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1905 | std::__introsort_loop(__first, __last, | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ 1906 | std::__lg(__last - __first) * 2, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1907 | __comp); | ~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:4772:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = int]' 4772 | std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:8:9: required from here 8 | sort(a,b); | ~~~~^~~~~ /usr/include/c++/14/bits/stl_heap.h:258:9: error: no type named 'value_type' in 'struct std::iterator_traits<int>' 258 | _ValueType; | ^~~~~~~~~~ /usr/include/c++/14/bits/stl_heap.h:260:9: error: no type named 'difference_type' in 'struct std::iterator_traits<int>' 260 | _DistanceType; | ^~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_heap.h:262:28: error: invalid type argument of unary '*' (have 'int') 262 | _ValueType __value = _GLIBCXX_MOVE(*__result); | ^~~~~~~~~~~~~ /
s736628908
p03759
C++
#include <iostream> using namespace std; int main() { int a; int b; int c; int d; cin>>a>>endl; cin>>b>>endl; cin>>c>>endl; d=b-a; e=c-b; if (d>0,e>0,d==e) cout<<"Yes"<<endl; else cout<<"No"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:11:11: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and '<unresolved overloaded function type>') 11 | cin>>a>>endl; | ~~~~~~^~~~~~ In file included from /usr/include/c++/14/iostream:42, from a.cc:1: /usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 170 | operator>>(bool& __n) | ^~~~~~~~ /usr/include/c++/14/istream:170:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool&' 170 | operator>>(bool& __n) | ~~~~~~^~~ /usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]' 174 | operator>>(short& __n); | ^~~~~~~~ /usr/include/c++/14/istream:174:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int&' 174 | operator>>(short& __n); | ~~~~~~~^~~ /usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 177 | operator>>(unsigned short& __n) | ^~~~~~~~ /usr/include/c++/14/istream:177:34: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short unsigned int&' 177 | operator>>(unsigned short& __n) | ~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]' 181 | operator>>(int& __n); | ^~~~~~~~ /usr/include/c++/14/istream:181:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int&' 181 | operator>>(int& __n); | ~~~~~^~~ /usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 184 | operator>>(unsigned int& __n) | ^~~~~~~~ /usr/include/c++/14/istream:184:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'unsigned int&' 184 | operator>>(unsigned int& __n) | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 188 | operator>>(long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:188:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long int&' 188 | operator>>(long& __n) | ~~~~~~^~~ /usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 192 | operator>>(unsigned long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:192:33: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long unsigned int&' 192 | operator>>(unsigned long& __n) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 199 | operator>>(long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:199:29: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int&' 199 | operator>>(long long& __n) | ~~~~~~~~~~~^~~ /usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 203 | operator>>(unsigned long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:203:38: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long unsigned int&' 203 | operator>>(unsigned long long& __n) | ~~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 219 | operator>>(float& __f) | ^~~~~~~~ /usr/include/c++/14/istream:219:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float&' 219 | operator>>(float& __f) | ~~~~~~~^~~ /usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 223 | operator>>(double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:223:26: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'double&' 223 | operator>>(double& __f) | ~~~~~~~~^~~ /usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 227 | operator>>(long double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:227:31: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long double&' 227 | operator>>(long double& __f) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 328 | operator>>(void*& __p) | ^~~~~~~~ /usr/include/c++/14/istream:328:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'void*&' 328 | operator>>(void*& __p) | ~~~~~~~^~~ /usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 122 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:122:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'} 122 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]' 126 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:126:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 126 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 133 | operator>>(ios_base& (*__pf)(ios_base&)) | ^~~~~~~~ /usr/include/c++/14/istream:133:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)' 133 | operator>>(ios_base& (*__pf)(ios_base&)) | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:352:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; __streambuf_type = std::basic_streambuf<char>]' 352 | operator>>(__streambuf_type* __sb); | ^~~~~~~~ /usr/include/c++/14/istream:352:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_istream<char>::__streambuf_type*' {aka 'std::basic_streambuf<char>*'} 352 | operator>>(__streambuf_type* __sb); | ~~~~~~
s009815670
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:8:12: error: extended character − is not valid in an identifier 8 | if(b−a==c−b){ | ^ a.cc:8:17: error: extended character − is not valid in an identifier 8 | if(b−a==c−b){ | ^ a.cc: In function 'int main()': a.cc:8:12: error: 'b\U00002212a' was not declared in this scope 8 | if(b−a==c−b){ | ^~~ a.cc:8:17: error: 'c\U00002212b' was not declared in this scope 8 | if(b−a==c−b){ | ^~~ a.cc:12:23: error: unable to find string literal operator 'operator""endl' with 'const char [3]', 'long unsigned int' arguments 12 | cout<<"NO"endl; | ^~~~~~~~
s266095340
p03759
C++
#include<iostream> using namespace std; int main() {int a,b,c; cin>>a,b,c; if((b-a)==(c-b)) cout<<"YES"; else cout<<"NO"}
a.cc: In function 'int main()': a.cc:9:11: error: expected ';' before '}' token 9 | cout<<"NO"} | ^ | ;
s004846683
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:8:12: error: extended character − is not valid in an identifier 8 | if(b−a==c−b) | ^ a.cc:8:17: error: extended character − is not valid in an identifier 8 | if(b−a==c−b) | ^ a.cc: In function 'int main()': a.cc:8:12: error: 'b\U00002212a' was not declared in this scope 8 | if(b−a==c−b) | ^~~ a.cc:8:17: error: 'c\U00002212b' was not declared in this scope 8 | if(b−a==c−b) | ^~~ a.cc:12:23: error: unable to find string literal operator 'operator""endl' with 'const char [3]', 'long unsigned int' arguments 12 | cout<<"NO"endl; | ^~~~~~~~
s925232801
p03759
C++
#include<iostream> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; if(b−a==c−b) { cout<<"YES"; } else{ cout<<"NO"; } return 0; }
a.cc:8:12: error: extended character − is not valid in an identifier 8 | if(b−a==c−b) | ^ a.cc:8:17: error: extended character − is not valid in an identifier 8 | if(b−a==c−b) | ^ a.cc: In function 'int main()': a.cc:8:12: error: 'b\U00002212a' was not declared in this scope 8 | if(b−a==c−b) | ^~~ a.cc:8:17: error: 'c\U00002212b' was not declared in this scope 8 | if(b−a==c−b) | ^~~
s530783935
p03759
C++
#include<iostream> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; if(a>=1&&a>=100&&b>=1&&b<=100&&c>=1&&c<=100) { if(b−a==c−b) { cout<<"YES"; } else{ cout<<"NO"; } } return 0; }
a.cc:9:12: error: extended character − is not valid in an identifier 9 | if(b−a==c−b) | ^ a.cc:9:17: error: extended character − is not valid in an identifier 9 | if(b−a==c−b) | ^ a.cc: In function 'int main()': a.cc:9:12: error: 'b\U00002212a' was not declared in this scope 9 | if(b−a==c−b) | ^~~ a.cc:9:17: error: 'c\U00002212b' was not declared in this scope 9 | if(b−a==c−b) | ^~~
s588145402
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: In function 'int main()': a.cc:8:17: error: expected ';' before 'if' 8 | cin>>a>>b>>c | ^ | ; 9 | 10 | if((b-a)==(c-b)) | ~~
s174602273
p03759
C++
#include <iostream> using namespace std; int main() { int a; int b; int c; int d; cin>>a>>endl; cin>>b>>endl; cin>>c>>endl; d=b-a; e=c-b; if (d>0,e>0,d==e) cout<<"Yes"<<endl; else cout<<"No"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:11:11: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and '<unresolved overloaded function type>') 11 | cin>>a>>endl; | ~~~~~~^~~~~~ In file included from /usr/include/c++/14/iostream:42, from a.cc:1: /usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 170 | operator>>(bool& __n) | ^~~~~~~~ /usr/include/c++/14/istream:170:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool&' 170 | operator>>(bool& __n) | ~~~~~~^~~ /usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]' 174 | operator>>(short& __n); | ^~~~~~~~ /usr/include/c++/14/istream:174:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int&' 174 | operator>>(short& __n); | ~~~~~~~^~~ /usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 177 | operator>>(unsigned short& __n) | ^~~~~~~~ /usr/include/c++/14/istream:177:34: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short unsigned int&' 177 | operator>>(unsigned short& __n) | ~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]' 181 | operator>>(int& __n); | ^~~~~~~~ /usr/include/c++/14/istream:181:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int&' 181 | operator>>(int& __n); | ~~~~~^~~ /usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 184 | operator>>(unsigned int& __n) | ^~~~~~~~ /usr/include/c++/14/istream:184:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'unsigned int&' 184 | operator>>(unsigned int& __n) | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 188 | operator>>(long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:188:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long int&' 188 | operator>>(long& __n) | ~~~~~~^~~ /usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 192 | operator>>(unsigned long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:192:33: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long unsigned int&' 192 | operator>>(unsigned long& __n) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 199 | operator>>(long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:199:29: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int&' 199 | operator>>(long long& __n) | ~~~~~~~~~~~^~~ /usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 203 | operator>>(unsigned long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:203:38: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long unsigned int&' 203 | operator>>(unsigned long long& __n) | ~~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 219 | operator>>(float& __f) | ^~~~~~~~ /usr/include/c++/14/istream:219:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float&' 219 | operator>>(float& __f) | ~~~~~~~^~~ /usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 223 | operator>>(double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:223:26: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'double&' 223 | operator>>(double& __f) | ~~~~~~~~^~~ /usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 227 | operator>>(long double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:227:31: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long double&' 227 | operator>>(long double& __f) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 328 | operator>>(void*& __p) | ^~~~~~~~ /usr/include/c++/14/istream:328:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'void*&' 328 | operator>>(void*& __p) | ~~~~~~~^~~ /usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 122 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:122:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'} 122 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]' 126 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:126:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 126 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 133 | operator>>(ios_base& (*__pf)(ios_base&)) | ^~~~~~~~ /usr/include/c++/14/istream:133:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)' 133 | operator>>(ios_base& (*__pf)(ios_base&)) | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:352:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; __streambuf_type = std::basic_streambuf<char>]' 352 | operator>>(__streambuf_type* __sb); | ^~~~~~~~ /usr/include/c++/14/istream:352:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_istream<char>::__streambuf_type*' {aka 'std::basic_streambuf<char>*'} 352 | operator>>(__streambuf_type* __sb); | ~~~~~~
s995774281
p03759
C++
#include<queue> #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> using namespace std; int main() { scanf("%d%d%d",&a,&b,&c); if (c-b==b-a) printf("YES"); else printf("NO"); return 0; }
a.cc: In function 'int main()': a.cc:9:25: error: 'a' was not declared in this scope 9 | scanf("%d%d%d",&a,&b,&c); | ^ a.cc:9:28: error: 'b' was not declared in this scope 9 | scanf("%d%d%d",&a,&b,&c); | ^ a.cc:9:31: error: 'c' was not declared in this scope 9 | scanf("%d%d%d",&a,&b,&c); | ^
s670724946
p03759
C++
#include<bits/stdc++.h> int a[10001]; using namespace std; int main() { int a,b,c,d; cin>>a[1]>>a[2]>>a[3]; sort(a+1,a+3+1); if(a[2]-a[1]==a[3]-a[2]) cout<<"YES"<<endl; else cout<<"NO"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:15: error: invalid types 'int[int]' for array subscript 7 | cin>>a[1]>>a[2]>>a[3]; | ^ a.cc:7:21: error: invalid types 'int[int]' for array subscript 7 | cin>>a[1]>>a[2]>>a[3]; | ^ a.cc:7:27: error: invalid types 'int[int]' for array subscript 7 | cin>>a[1]>>a[2]>>a[3]; | ^ a.cc:9:9: error: invalid types 'int[int]' for array subscript 9 | if(a[2]-a[1]==a[3]-a[2]) | ^ a.cc:9:14: error: invalid types 'int[int]' for array subscript 9 | if(a[2]-a[1]==a[3]-a[2]) | ^ a.cc:9:20: error: invalid types 'int[int]' for array subscript 9 | if(a[2]-a[1]==a[3]-a[2]) | ^ a.cc:9:25: error: invalid types 'int[int]' for array subscript 9 | if(a[2]-a[1]==a[3]-a[2]) | ^ In file included from /usr/include/c++/14/algorithm:61, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]': /usr/include/c++/14/bits/stl_algo.h:1817:25: required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1817 | std::__insertion_sort(__first, __first + int(_S_threshold), __comp); | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1908:31: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1908 | std::__final_insertion_sort(__first, __last, __comp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:4772:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = int]' 4772 | std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:8:6: required from here 8 | sort(a+1,a+3+1); | ~~~~^~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1780:17: error: no type named 'value_type' in 'struct std::iterator_traits<int>' 1780 | __val = _GLIBCXX_MOVE(*__i); | ^~~~~ In file included from /usr/include/c++/14/bits/stl_pair.h:61, from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60: /usr/include/c++/14/bits/stl_algo.h:1780:25: error: invalid type argument of unary '*' (have 'int') 1780 | __val = _GLIBCXX_MOVE(*__i); | ^~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1782:15: error: invalid type argument of unary '*' (have 'int') 1782 | *__first = _GLIBCXX_MOVE(__val); | ^~~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:71: /usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::__ops::_Iter_less_iter::operator()(_Iterator1, _Iterator2) const [with _Iterator1 = int; _Iterator2 = int]': /usr/include/c++/14/bits/stl_algo.h:1777:14: required from 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1777 | if (__comp(__i, __first)) | ~~~~~~^~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1817:25: required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1817 | std::__insertion_sort(__first, __first + int(_S_threshold), __comp); | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1908:31: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1908 | std::__final_insertion_sort(__first, __last, __comp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:4772:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = int]' 4772 | std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:8:6: required from here 8 | sort(a+1,a+3+1); | ~~~~^~~~~~~~~~~ /usr/include/c++/14/bits/predefined_ops.h:45:16: error: invalid type argument of unary '*' (have 'int') 45 | { return *__it1 < *__it2; } | ^~~~~~ /usr/include/c++/14/bits/predefined_ops.h:45:25: error: invalid type argument of unary '*' (have 'int') 45 | { return *__it1 < *__it2; } | ^~~~~~ In file included from /usr/include/c++/14/bits/stl_algo.h:61: /usr/include/c++/14/bits/stl_heap.h: In instantiation of 'void std::__make_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare&) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]': /usr/include/c++/14/bits/stl_algo.h:1593:23: required from 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1593 | std::__make_heap(__first, __middle, __comp); | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1868:25: required from 'void std::__partial_sort(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1868 | std::__heap_select(__first, __middle, __last, __comp); | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1884:27: required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = int; _Size = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1884 | std::__partial_sort(__first, __last, __last, __comp); | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1905:25: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1905 | std::__introsort_loop(__first, __last, | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ 1906 | std::__lg(__last - __first) * 2, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1907 | __comp); | ~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:4772:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = int]' 4772 | std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:8:6: required from here 8 | sort(a+1,a+3+1); | ~~~~^~~~~~~~~~~ /usr/include/c++/14/bits/stl_heap.h:344:11: error: no type named 'value_type' in 'struct std::iterator_traits<int>' 344 | _ValueType; | ^~~~~~~~~~ /usr/include/c++/14/bits/stl_heap.h:346:11: error: no type named 'difference_type' in 'struct std::iterator_traits<int>' 346 | _DistanceType; | ^~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_heap.h: In instantiation of 'void std::__pop_heap(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare&) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]': /usr/include/c++/14/bits/stl_algo.h:1596:19: required from 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1596 | std::__pop_heap(__first, __middle, __i, __comp); | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1868:25: required from 'void std::__partial_sort(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1868 | std::__heap_select(__first, __middle, __last, __comp); | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1884:27: required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = int; _Size = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1884 | std::__partial_sort(__first, __last, __last, __comp); | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1905:25: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1905 | std::__introsort_loop(__first, __last, | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ 1906 | std::__lg(__last - __first) * 2, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1907 | __comp); | ~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:4772:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = int]' 4772 | std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); |
s933360482
p03759
C++
#include<bits/stdc++.h> int a[10001]; using namespace std; int main() { int a,b,c,d; cin>>a[1]>>a[2]>>a[3]; sort(a+1,a+3+1); if(a[2]-a[1]==a[3]-a[2]) cout<<"YES"<<endl; else cout<<"NO"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:15: error: invalid types 'int[int]' for array subscript 7 | cin>>a[1]>>a[2]>>a[3]; | ^ a.cc:7:21: error: invalid types 'int[int]' for array subscript 7 | cin>>a[1]>>a[2]>>a[3]; | ^ a.cc:7:27: error: invalid types 'int[int]' for array subscript 7 | cin>>a[1]>>a[2]>>a[3]; | ^ a.cc:9:9: error: invalid types 'int[int]' for array subscript 9 | if(a[2]-a[1]==a[3]-a[2]) | ^ a.cc:9:14: error: invalid types 'int[int]' for array subscript 9 | if(a[2]-a[1]==a[3]-a[2]) | ^ a.cc:9:20: error: invalid types 'int[int]' for array subscript 9 | if(a[2]-a[1]==a[3]-a[2]) | ^ a.cc:9:25: error: invalid types 'int[int]' for array subscript 9 | if(a[2]-a[1]==a[3]-a[2]) | ^ In file included from /usr/include/c++/14/algorithm:61, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]': /usr/include/c++/14/bits/stl_algo.h:1817:25: required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1817 | std::__insertion_sort(__first, __first + int(_S_threshold), __comp); | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1908:31: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1908 | std::__final_insertion_sort(__first, __last, __comp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:4772:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = int]' 4772 | std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:8:6: required from here 8 | sort(a+1,a+3+1); | ~~~~^~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1780:17: error: no type named 'value_type' in 'struct std::iterator_traits<int>' 1780 | __val = _GLIBCXX_MOVE(*__i); | ^~~~~ In file included from /usr/include/c++/14/bits/stl_pair.h:61, from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60: /usr/include/c++/14/bits/stl_algo.h:1780:25: error: invalid type argument of unary '*' (have 'int') 1780 | __val = _GLIBCXX_MOVE(*__i); | ^~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1782:15: error: invalid type argument of unary '*' (have 'int') 1782 | *__first = _GLIBCXX_MOVE(__val); | ^~~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:71: /usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::__ops::_Iter_less_iter::operator()(_Iterator1, _Iterator2) const [with _Iterator1 = int; _Iterator2 = int]': /usr/include/c++/14/bits/stl_algo.h:1777:14: required from 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1777 | if (__comp(__i, __first)) | ~~~~~~^~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1817:25: required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1817 | std::__insertion_sort(__first, __first + int(_S_threshold), __comp); | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1908:31: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1908 | std::__final_insertion_sort(__first, __last, __comp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:4772:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = int]' 4772 | std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:8:6: required from here 8 | sort(a+1,a+3+1); | ~~~~^~~~~~~~~~~ /usr/include/c++/14/bits/predefined_ops.h:45:16: error: invalid type argument of unary '*' (have 'int') 45 | { return *__it1 < *__it2; } | ^~~~~~ /usr/include/c++/14/bits/predefined_ops.h:45:25: error: invalid type argument of unary '*' (have 'int') 45 | { return *__it1 < *__it2; } | ^~~~~~ In file included from /usr/include/c++/14/bits/stl_algo.h:61: /usr/include/c++/14/bits/stl_heap.h: In instantiation of 'void std::__make_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare&) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]': /usr/include/c++/14/bits/stl_algo.h:1593:23: required from 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1593 | std::__make_heap(__first, __middle, __comp); | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1868:25: required from 'void std::__partial_sort(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1868 | std::__heap_select(__first, __middle, __last, __comp); | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1884:27: required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = int; _Size = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1884 | std::__partial_sort(__first, __last, __last, __comp); | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1905:25: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1905 | std::__introsort_loop(__first, __last, | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ 1906 | std::__lg(__last - __first) * 2, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1907 | __comp); | ~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:4772:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = int]' 4772 | std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:8:6: required from here 8 | sort(a+1,a+3+1); | ~~~~^~~~~~~~~~~ /usr/include/c++/14/bits/stl_heap.h:344:11: error: no type named 'value_type' in 'struct std::iterator_traits<int>' 344 | _ValueType; | ^~~~~~~~~~ /usr/include/c++/14/bits/stl_heap.h:346:11: error: no type named 'difference_type' in 'struct std::iterator_traits<int>' 346 | _DistanceType; | ^~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_heap.h: In instantiation of 'void std::__pop_heap(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare&) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]': /usr/include/c++/14/bits/stl_algo.h:1596:19: required from 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1596 | std::__pop_heap(__first, __middle, __i, __comp); | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1868:25: required from 'void std::__partial_sort(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1868 | std::__heap_select(__first, __middle, __last, __comp); | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1884:27: required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = int; _Size = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1884 | std::__partial_sort(__first, __last, __last, __comp); | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1905:25: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1905 | std::__introsort_loop(__first, __last, | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ 1906 | std::__lg(__last - __first) * 2, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1907 | __comp); | ~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:4772:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = int]' 4772 | std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); |
s595258815
p03759
C++
#include<iostream> #include<algorithm> using namespace std; long long a,b,c; int main() { 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:15: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<' 9 | else cout<"NO"<<endl; | ~~~~^~~~~~
s952492868
p03759
C++
#include <iostream> #include<math.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; int r = sqrt((b-a)*(b-a)); int p= sqrt((c-b)*(c-b)); if(r==p){ cout<<"YES"<<endl; } else if(r!=p){ cout<<"NO"<<endl; } return 0;
a.cc: In function 'int main()': a.cc:18:14: error: expected '}' at end of input 18 | return 0; | ^ a.cc:6:11: note: to match this '{' 6 | int main(){ | ^
s270079234
p03759
C++
^ Select Code #include<iostream> #include<tgmath.h> #include<math.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; int r = sqrt((b-a)*(b-a)); int p= sqrt((c-b)*(c-b)); if(r==p){ cout<<"Yes"<<endl; } else if(r!=p){ cout<<"NO"<<endl; } return 0; }
a.cc:1:1: error: expected unqualified-id before '^' token 1 | ^ | ^ In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:4: /usr/include/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a type 68 | typedef ptrdiff_t streamsize; // Signed integral type | ^~~~~~~~~ /usr/include/c++/14/bits/postypes.h:41:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' 40 | #include <cwchar> // For mbstate_t +++ |+#include <cstddef> 41 | In file included from /usr/include/c++/14/bits/exception_ptr.h:38, from /usr/include/c++/14/exception:166, from /usr/include/c++/14/ios:41: /usr/include/c++/14/new:131:26: error: declaration of 'operator new' as non-function 131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~~~ /usr/include/c++/14/new:131:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~ In file included from /usr/include/wchar.h:35, from /usr/include/c++/14/cwchar:44, from /usr/include/c++/14/bits/postypes.h:40: /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:132:41: error: attributes after parenthesized initializer ignored [-fpermissive] 132 | __attribute__((__externally_visible__)); | ^ /usr/include/c++/14/new:133:26: error: declaration of 'operator new []' as non-function 133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~~~ /usr/include/c++/14/new:133:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:134:41: error: attributes after parenthesized initializer ignored [-fpermissive] 134 | __attribute__((__externally_visible__)); | ^ /usr/include/c++/14/new:140:29: error: 'std::size_t' has not been declared 140 | void operator delete(void*, std::size_t) _GLIBCXX_USE_NOEXCEPT | ^~~ /usr/include/c++/14/new:142:31: error: 'std::size_t' has not been declared 142 | void operator delete[](void*, std::size_t) _GLIBCXX_USE_NOEXCEPT | ^~~ /usr/include/c++/14/new:145:26: error: declaration of 'operator new' as non-function 145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~~~ /usr/include/c++/14/new:145:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:145:52: error: expected primary-expression before 'const' 145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~ /usr/include/c++/14/new:147:26: error: declaration of 'operator new []' as non-function 147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~~~ /usr/include/c++/14/new:147:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:147:54: error: expected primary-expression before 'const' 147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~ /usr/include/c++/14/new:154:26: error: declaration of 'operator new' as non-function 154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t) | ^~~~~~~~ /usr/include/c++/14/new:154:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:154:68: error: expected primary-expression before ')' token 154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t) | ^ /usr/include/c++/14/new:155:73: error: attributes after parenthesized initializer ignored [-fpermissive] 155 | __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); | ^ /usr/include/c++/14/new:156:26: error: declaration of 'operator new' as non-function 156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~~~ /usr/include/c++/14/new:156:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:156:68: error: expected primary-expression before ',' token 156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^ /usr/include/c++/14/new:156:70: error: expected primary-expression before 'const' 156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~ /usr/include/c++/14/new:162:26: error: declaration of 'operator new []' as non-function 162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t) | ^~~~~~~~ /usr/include/c++/14/new:162:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:162:70: error: expected primary-expression before ')' token 162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t) | ^ /usr/include/c++/14/new:163:73: error: attributes after parenthesized initializer ignored [-fpermissive] 163 | __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); | ^ /usr/include/c++/14/new:164:26: error: declaration of 'operator new []' as non-function 164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~~~ /usr/include/c++/14/new:164:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:164:70: error: expected primary-expression before ',' token 164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^ /usr/include/c++/14/new:164:72: error: expected primary-expression before 'const' 164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~ /usr/include/c++/14/new:171:29: error: 'std::size_t' has not been declared 171 | void operator delete(void*, std::size_t, std::align_val_t) | ^~~ /usr/include/c++/14/new:173:31: error: 'std::size_t' has not been declared 173 | void operator delete[](void*, std::size_t, std::align_val_t) | ^~~ /usr/include/c++/14/new:179:33: error: declaration of 'operator new' as non-function 179 | _GLIBCXX_NODISCARD inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT | ^~~~~~~~ /usr/include/c++/14/new:179:51: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 179 | _GLIBCXX_NODISCARD in
s844523475
p03759
C++
#include<iostream> #include<tgmath.h> #include<math.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; int r = sqrt((b-a)*(b-a)); int p= sqrt((c-b)*(c-b)); if((r==p){ cout<<"Yes"<<endl; } else if(r!=p){ cout<<"NO"<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:14:10: error: expected ';' before '{' token 14 | if((r==p){ | ^ | ; a.cc:17:1: error: expected primary-expression before 'else' 17 | else if(r!=p){ | ^~~~ a.cc:16:2: error: expected ')' before 'else' 16 | } | ^ | ) 17 | else if(r!=p){ | ~~~~ a.cc:14:3: note: to match this '(' 14 | if((r==p){ | ^
s748836455
p03759
C++
#include<iostream> using namespace std; int main(void){ int a, b, c; cin >> a >> b >> c; if(b-a==c-b){ cout << "YES" << endl; }else{ coout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:10:9: error: 'coout' was not declared in this scope 10 | coout << "NO" << endl; | ^~~~~
s024186192
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.
s441165116
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:11: fatal error: iostream : No such file or directory 1 | # include < iostream > | ^~~~~~~~~~~~ compilation terminated.
s428578120
p03759
C++
#include <iostream> using namespace std; int main(){ char a, b, c; cin >> a >> b >> c; cout << b-a == c-b ? "YES" : "NO" << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:15: error: no match for 'operator==' (operand types are 'std::basic_ostream<char>' and 'int') 8 | cout << b-a == c-b ? "YES" : "NO" << endl; | ~~~~~~~~~~~ ^~ ~~~ | | | | | int | std::basic_ostream<char> a.cc:8:15: note: candidate: 'operator==(int, int)' (built-in) 8 | cout << b-a == c-b ? "YES" : "NO" << endl; | ~~~~~~~~~~~~^~~~~~ a.cc:8:15: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'int' In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)' 192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed: a.cc:8:20: note: 'std::basic_ostream<char>' is not derived from 'const std::fpos<_StateT>' 8 | cout << b-a == c-b ? "YES" : "NO" << endl; | ^ In file included from /usr/include/c++/14/string:43, 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: /usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)' 235 | operator==(const allocator<_T1>&, const allocator<_T2>&) | ^~~~~~~~ /usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed: a.cc:8:20: note: 'std::basic_ostream<char>' is not derived from 'const std::allocator<_CharT>' 8 | cout << b-a == c-b ? "YES" : "NO" << endl; | ^ In file included from /usr/include/c++/14/string:48: /usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 441 | operator==(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed: a.cc:8:20: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 8 | cout << b-a == c-b ? "YES" : "NO" << endl; | ^ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 486 | operator==(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed: a.cc:8:20: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 8 | cout << b-a == c-b ? "YES" : "NO" << endl; | ^ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1667 | operator==(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed: a.cc:8:20: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 8 | cout << b-a == c-b ? "YES" : "NO" << endl; | ^ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1737 | operator==(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed: a.cc:8:20: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 8 | cout << b-a == c-b ? "YES" : "NO" << endl; | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/string:51: /usr/include/c++/14/bits/stl_pair.h:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed: a.cc:8:20: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>' 8 | cout << b-a == c-b ? "YES" : "NO" << endl; | ^ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54: /usr/include/c++/14/string_view:629:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 629 | operator==(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:629:5: note: template argument deduction/substitution failed: a.cc:8:20: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 8 | cout << b-a == c-b ? "YES" : "NO" << endl; | ^ /usr/include/c++/14/string_view:637:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 637 | operator==(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:637:5: note: template argument deduction/substitution failed: a.cc:8:20: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 8 | cout << b-a == c-b ? "YES" : "NO" << endl; | ^ /usr/include/c++/14/string_view:644:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)' 644 | operator==(__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:644:5: note: template argument deduction/substitution failed: a.cc:8:20: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int' 8 | cout << b-a == c-b ? "YES" : "NO" << endl; | ^ /usr/include/c++/14/bits/basic_string.h:3755:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3755 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3755:5: note: template argument deduction/substitution failed: a.cc:8:20: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 8 | cout << b-a == c-b ? "YES" : "NO" << endl; | ^ /usr/include/c++/14/bits/basic_string.h:3772:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3772 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3772:5: note: template argument deduction/substitution failed: a.cc:8:20: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 8 | cout << b-a == c-b ? "YES" : "NO" << endl; | ^ /usr/include/c++/14/bits/basic_string.h:3819:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3819 | operator==(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3819:5: note: template argument deduction/substitution failed: a.cc:8:20: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>' 8 | cout << b-a == c-b ? "YES" : "NO" << endl; | ^ In file included from /usr/include/c++/14/bits/memory_resource.h:47, from /usr/include/c++/14/string:68: /usr/include/c++/14/tuple:2558:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator==(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)' 2558 | operator==(const tuple<_TElements...>& __t, | ^~~~~~~~ /usr/include/c++/14/tuple:2558:5: note: template argument deduction/substitution failed: a.cc:8:20: note: 'std::basic_ostream<char>' is not derived from 'const std::tuple<_UTypes ...>' 8 | cout << b-a == c-b ? "YES" : "NO" << endl; | ^ In file included from /usr/include/c++/14/bits/locale_facets.h:48, from /usr/include/c++/14/bits/basic_ios.h:37, from /usr/include/c++/14/ios:46: /usr/include/c++/14/bits/streambuf_iterator.h:234:5: note: candidate: 'template<class _CharT, class _Traits> bool std::operator==(const istreambuf_iterator<_CharT, _Traits>&, const istreambuf_iterator<_CharT, _Traits>&)' 234 | operator==(const istreambuf_iterator<_CharT, _Traits>& __a, | ^~~~~~~~ /usr/include/c++/14/bits/streambuf_iterator.h:234:5: note: template argument deduction/substitution failed: a.cc:8:20: note: 'std::basic_ostream<char>' is not derived from 'const std::istreambuf_iterator<_CharT, _Traits>' 8 | cout << b-a == c
s383277987
p03759
C++
#include <iostream> using namespace std; int main(){ char a, b, c; cin >> a >> b >> c; cout << b-a == c-b ? "YES" : "NO" << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:15: error: no match for 'operator==' (operand types are 'std::basic_ostream<char>' and 'int') 7 | cout << b-a == c-b ? "YES" : "NO" << endl; | ~~~~~~~~~~~ ^~ ~~~ | | | | | int | std::basic_ostream<char> a.cc:7:15: note: candidate: 'operator==(int, int)' (built-in) 7 | cout << b-a == c-b ? "YES" : "NO" << endl; | ~~~~~~~~~~~~^~~~~~ a.cc:7:15: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'int' In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)' 192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed: a.cc:7:20: note: 'std::basic_ostream<char>' is not derived from 'const std::fpos<_StateT>' 7 | cout << b-a == c-b ? "YES" : "NO" << endl; | ^ In file included from /usr/include/c++/14/string:43, 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: /usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)' 235 | operator==(const allocator<_T1>&, const allocator<_T2>&) | ^~~~~~~~ /usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed: a.cc:7:20: note: 'std::basic_ostream<char>' is not derived from 'const std::allocator<_CharT>' 7 | cout << b-a == c-b ? "YES" : "NO" << endl; | ^ In file included from /usr/include/c++/14/string:48: /usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 441 | operator==(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed: a.cc:7:20: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 7 | cout << b-a == c-b ? "YES" : "NO" << endl; | ^ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 486 | operator==(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed: a.cc:7:20: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 7 | cout << b-a == c-b ? "YES" : "NO" << endl; | ^ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1667 | operator==(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed: a.cc:7:20: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 7 | cout << b-a == c-b ? "YES" : "NO" << endl; | ^ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1737 | operator==(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed: a.cc:7:20: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 7 | cout << b-a == c-b ? "YES" : "NO" << endl; | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/string:51: /usr/include/c++/14/bits/stl_pair.h:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed: a.cc:7:20: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>' 7 | cout << b-a == c-b ? "YES" : "NO" << endl; | ^ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54: /usr/include/c++/14/string_view:629:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 629 | operator==(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:629:5: note: template argument deduction/substitution failed: a.cc:7:20: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 7 | cout << b-a == c-b ? "YES" : "NO" << endl; | ^ /usr/include/c++/14/string_view:637:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 637 | operator==(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:637:5: note: template argument deduction/substitution failed: a.cc:7:20: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 7 | cout << b-a == c-b ? "YES" : "NO" << endl; | ^ /usr/include/c++/14/string_view:644:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)' 644 | operator==(__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:644:5: note: template argument deduction/substitution failed: a.cc:7:20: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int' 7 | cout << b-a == c-b ? "YES" : "NO" << endl; | ^ /usr/include/c++/14/bits/basic_string.h:3755:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3755 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3755:5: note: template argument deduction/substitution failed: a.cc:7:20: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 7 | cout << b-a == c-b ? "YES" : "NO" << endl; | ^ /usr/include/c++/14/bits/basic_string.h:3772:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3772 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3772:5: note: template argument deduction/substitution failed: a.cc:7:20: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 7 | cout << b-a == c-b ? "YES" : "NO" << endl; | ^ /usr/include/c++/14/bits/basic_string.h:3819:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3819 | operator==(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3819:5: note: template argument deduction/substitution failed: a.cc:7:20: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>' 7 | cout << b-a == c-b ? "YES" : "NO" << endl; | ^ In file included from /usr/include/c++/14/bits/memory_resource.h:47, from /usr/include/c++/14/string:68: /usr/include/c++/14/tuple:2558:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator==(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)' 2558 | operator==(const tuple<_TElements...>& __t, | ^~~~~~~~ /usr/include/c++/14/tuple:2558:5: note: template argument deduction/substitution failed: a.cc:7:20: note: 'std::basic_ostream<char>' is not derived from 'const std::tuple<_UTypes ...>' 7 | cout << b-a == c-b ? "YES" : "NO" << endl; | ^ In file included from /usr/include/c++/14/bits/locale_facets.h:48, from /usr/include/c++/14/bits/basic_ios.h:37, from /usr/include/c++/14/ios:46: /usr/include/c++/14/bits/streambuf_iterator.h:234:5: note: candidate: 'template<class _CharT, class _Traits> bool std::operator==(const istreambuf_iterator<_CharT, _Traits>&, const istreambuf_iterator<_CharT, _Traits>&)' 234 | operator==(const istreambuf_iterator<_CharT, _Traits>& __a, | ^~~~~~~~ /usr/include/c++/14/bits/streambuf_iterator.h:234:5: note: template argument deduction/substitution failed: a.cc:7:20: note: 'std::basic_ostream<char>' is not derived from 'const std::istreambuf_iterator<_CharT, _Traits>' 7 | cout << b-a == c
s760141889
p03759
C++
#include<iostream> using namespace std; int main(void) { int a, b, c; cin >> a >> b >> c; if (b-a == c-b ) cout << endl; } #include<iostream> using namespace std; int main(void) { int a, b, c; cin >> a >> b >> c; if (b-a == c-b ) cout <<"YES" << endl; else cout << "NO" << endl; }
a.cc:13:5: error: redefinition of 'int main()' 13 | int main(void) { | ^~~~ a.cc:4:5: note: 'int main()' previously defined here 4 | int main(void) { | ^~~~
s224500681
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; } }
a.cc: In function 'int main()': a.cc:7:5: error: lvalue required as left operand of assignment 7 | if(b-a = c-b){ | ~^~
s487518287
p03759
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; if(b-a = c-a){ cout << "YES" << endl; } else{ cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:7:5: error: lvalue required as left operand of assignment 7 | if(b-a = c-a){ | ~^~
s069670330
p03759
C++
#include<bits/stdc++.h> using namesapce 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:2:7: error: expected nested-name-specifier before 'namesapce' 2 | using namesapce std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:6:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin>>a>>b>>c; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:7:19: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 7 | if (b-a==c-b) cout<<"YES"<<endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:7:32: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 7 | if (b-a==c-b) cout<<"YES"<<endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:8:11: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 8 | else cout<<"NO"<<endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:8:23: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 8 | else cout<<"NO"<<endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s604488755
p03759
C++
#include<bits/stdc++.h> using namesapce 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:2:7: error: expected nested-name-specifier before 'namesapce' 2 | using namesapce std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:6:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin>>a>>b>>c; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:7:19: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 7 | if (b-a==c-b) cout<<"YES"<<endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:7:32: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 7 | if (b-a==c-b) cout<<"YES"<<endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:8:11: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 8 | else cout<<"NO"<<endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:8:23: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 8 | else cout<<"NO"<<endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s738315984
p03759
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { int a, b; cin >> a >> b; if(a==b && b==c){ cout << "YES" << endl; } else cout << "NO" << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:19: error: 'c' was not declared in this scope 9 | if(a==b && b==c){ | ^
s254561748
p03759
C++
#include <iostream> using namespace std; int main() { int a, b, c; cin >> a>>b>>c; int f = 2 * b - a - c; if (f == 0) { cout << "YES"; } else { cout << "NO; } }
a.cc:10:24: warning: missing terminating " character 10 | else { cout << "NO; } | ^ a.cc:10:24: error: missing terminating " character 10 | else { cout << "NO; } | ^~~~~~ a.cc: In function 'int main()': a.cc:11:1: error: expected primary-expression before '}' token 11 | } | ^ a.cc:11:2: error: expected '}' at end of input 11 | } | ^ a.cc:5:12: note: to match this '{' 5 | int main() { | ^
s748284403
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; } }
a.cc: In function 'int main()': a.cc:7:17: error: 'YES' was not declared in this scope 7 | cout << YES << endl; | ^~~ a.cc:10:12: error: 'NO' was not declared in this scope 10 | cout << NO << endl; | ^~
s850993884
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"<<end; } else(b-a!=c-b){ cout<<"NO"<<endl; } }
a.cc: In function 'int main()': a.cc:8:28: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 8 | cout<<"YES"<<end; | ~~~~~~~~~~~^~~~~ In file included from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'} 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]' 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ^~~~~~~~ /usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 174 | operator<<(long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long int' 174 | operator<<(long __n) | ~~~~~^~~ /usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 178 | operator<<(unsigned long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long unsigned int' 178 | operator<<(unsigned long __n) | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 182 | operator<<(bool __n) | ^~~~~~~~ /usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool' 182 | operator<<(bool __n) | ~~~~~^~~ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]' 96 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int' 97 | operator<<(short __n) | ~~~~~~^~~ /usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 189 | operator<<(unsigned short __n) | ^~~~~~~~ /usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short unsigned int' 189 | operator<<(unsigned short __n) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]' 110 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int' 111 | operator<<(int __n) | ~~~~^~~ /usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 200 | operator<<(unsigned int __n) | ^~~~~~~~ /usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'unsigned int' 200 | operator<<(unsigned int __n) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 211 | operator<<(long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int' 211 | operator<<(long long __n) | ~~~~~~~~~~^~~ /usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 215 | operator<<(unsigned long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long unsigned int' 215 | operator<<(unsigned long long __n) | ~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 231 | operator<<(double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:231:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'double' 231 | operator<<(double __f) | ~~~~~~~^~~ /usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 235 | operator<<(float __f) | ^~~~~~~~ /usr/include/c++/14/ostream:235:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float' 235 | operator<<(float __f) | ~~~~~~^~~ /usr/include/c++/14/ostream:243:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 243 | operator<<(long double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:243:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long double' 243 | operator<<(long double __f) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:301:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 301 | operator<<(const void* __p) | ^~~~~~~~ /usr/include/c++/14/ostream:301:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const void*' 301 | operator<<(const void* __p) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:306:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::nullptr_t) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; std::nullptr_t = std::nullptr_t]' 306 | operator<<(nullptr_t) | ^~~~~~~~ /usr/include/c++/14/ostream:306:18: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::nullptr_t' 306 | operator<<(nullp
s145521689
p03759
Java
import java.util.Scanner; 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:8: error: illegal character: '\u2212' if(b?a == c?b){ ^ Main.java:8: error: illegal character: '\u2212' if(b?a == c?b){ ^ Main.java:8: error: not a statement if(b?a == c?b){ ^ Main.java:8: error: not a statement if(b?a == c?b){ ^ Main.java:8: error: ';' expected if(b?a == c?b){ ^ Main.java:11: error: ';' expected System.out.print("NO") ^ Main.java:10: error: 'else' without 'if' }else{ ^ 7 errors
s630252998
p03759
C++
#include <iostream> int main() { int a,b,c; std::cin >> a >> b >> c; if(b-a == c-b) { std::cout << "YES" << endl; } else { std::cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:10:39: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 10 | std::cout << "YES" << endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:14:38: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 14 | std::cout << "NO" << endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s985480945
p03759
C++
#include <iostream> int main() { int a,b,c; cin >> a >> b >> c; if(b-a == c-b) { std::cout << "YES" << endl; } else { std::cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin >> a >> b >> c; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:10:39: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 10 | std::cout << "YES" << endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:14:38: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 14 | std::cout << "NO" << endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s239651131
p03759
C++
#include <iostream> 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:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin >> a >> b >> c; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:10:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 10 | cout << "YES" << endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:10:34: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 10 | cout << "YES" << endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:14:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 14 | cout << "NO" << endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:14:33: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 14 | cout << "NO" << endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s187246187
p03759
C++
#include <stdio.h> int main(){ int a, b, c, s, e, n, i, c=0; scanf("%d %d %d", &a, &b, &c); if(b-a == c-b) printf("YES"); else printf("NO"); }
a.cc: In function 'int main()': a.cc:4:30: error: redeclaration of 'int c' 4 | int a, b, c, s, e, n, i, c=0; | ^ a.cc:4:15: note: 'int c' previously declared here 4 | int a, b, c, s, e, n, i, c=0; | ^
s244056685
p03759
C++
#include <stdio.h> int main(){ int a, b, c, s, e, n, i, c=0; scanf("%d %d %d", &a, &b, &c); if(b-a == c-b) printf("YES"); else printf("NO") }
a.cc: In function 'int main()': a.cc:4:30: error: redeclaration of 'int c' 4 | int a, b, c, s, e, n, i, c=0; | ^ a.cc:4:15: note: 'int c' previously declared here 4 | int a, b, c, s, e, n, i, c=0; | ^ a.cc:9:32: error: expected ';' before '}' token 9 | else printf("NO") | ^ | ; 10 | } | ~
s807147838
p03759
C++
a, b, c = map(int,input().split()) if b-a == c-b: print("YES") else: print("NO")
a.cc:1:1: error: 'a' does not name a type 1 | a, b, c = map(int,input().split()) | ^
s871244139
p03759
C++
#include <iostream> int main(void) { int a,b,c; std::cin>>a>>b>>c; std::cout<<((a-b==b-c)?”YES”:”NO”)<<std::endl; return 0; }
a.cc:6:24: error: extended character ” is not valid in an identifier 6 | std::cout<<((a-b==b-c)?”YES”:”NO”)<<std::endl; | ^ a.cc:6:24: error: extended character ” is not valid in an identifier a.cc:6:30: error: extended character ” is not valid in an identifier 6 | std::cout<<((a-b==b-c)?”YES”:”NO”)<<std::endl; | ^ a.cc:6:30: error: extended character ” is not valid in an identifier a.cc: In function 'int main()': a.cc:6:24: error: '\U0000201dYES\U0000201d' was not declared in this scope 6 | std::cout<<((a-b==b-c)?”YES”:”NO”)<<std::endl; | ^~~~~ a.cc:6:30: error: '\U0000201dNO\U0000201d' was not declared in this scope 6 | std::cout<<((a-b==b-c)?”YES”:”NO”)<<std::endl; | ^~~~
s418888010
p03759
C++
#include <iostream> int main(void) { int a,b,c; std::cin>>a>>b>>c; std::cout<<(a-b==b-c?”YES”:”NO”)<<std::endl; return 0; }
a.cc:6:22: error: extended character ” is not valid in an identifier 6 | std::cout<<(a-b==b-c?”YES”:”NO”)<<std::endl; | ^ a.cc:6:22: error: extended character ” is not valid in an identifier a.cc:6:28: error: extended character ” is not valid in an identifier 6 | std::cout<<(a-b==b-c?”YES”:”NO”)<<std::endl; | ^ a.cc:6:28: error: extended character ” is not valid in an identifier a.cc: In function 'int main()': a.cc:6:22: error: '\U0000201dYES\U0000201d' was not declared in this scope 6 | std::cout<<(a-b==b-c?”YES”:”NO”)<<std::endl; | ^~~~~ a.cc:6:28: error: '\U0000201dNO\U0000201d' was not declared in this scope 6 | std::cout<<(a-b==b-c?”YES”:”NO”)<<std::endl; | ^~~~
s394861999
p03759
C++
#include <iostream> using namesapce std; int main(){ int a; int b; }
a.cc:2:7: error: expected nested-name-specifier before 'namesapce' 2 | using namesapce std; | ^~~~~~~~~
s488575528
p03759
C
#include <stdio.h> int main(void) { int a,b,c; scanf("%d %d %d",&a,&b,&c); printf("%s\n", c-b==b-a?"YES","NO"); return 0; }
main.c: In function 'main': main.c:6:37: error: expected ':' before ')' token 6 | printf("%s\n", c-b==b-a?"YES","NO"); | ^ | :
s519927471
p03759
C++
int main( int a,b,c; cin>>a>>b>>c; if(b-a==c-b){ cout<<"Yes"<<endl; } else{ cout<<"No" } return0 ; )
a.cc:2:7: error: 'b' has not been declared 2 | int a,b,c; | ^ a.cc:2:9: error: 'c' has not been declared 2 | int a,b,c; | ^ a.cc:2:10: error: expected ')' before ';' token 2 | int a,b,c; | ^ | ) a.cc:1:9: note: to match this '(' 1 | int main( | ^ a.cc:1:5: warning: second argument of 'int main(int, int, int)' should be 'char **' [-Wmain] 1 | int main( | ^~~~ a.cc:1:5: warning: third argument of 'int main(int, int, int)' should probably be 'char **' [-Wmain] a.cc:3:1: error: 'cin' does not name a type 3 | cin>>a>>b>>c; | ^~~ a.cc:4:1: error: expected unqualified-id before 'if' 4 | if(b-a==c-b){ | ^~ a.cc:7:1: error: expected unqualified-id before 'else' 7 | else{ | ^~~~ a.cc:10:5: error: 'return0' does not name a type 10 | return0 ; | ^~~~~~~ a.cc:13:1: error: expected unqualified-id before ')' token 13 | ) | ^
s946495504
p03759
C++
3 2 1
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 3 2 1 | ^
s022941775
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: In function 'int main()': a.cc:10:7: error: expected ')' before '$$' 10 | if(b-a $$ c-b){ | ~ ^~~ | )
s503411091
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: In function 'int main()': a.cc:10:7: error: expected ')' before '$$' 10 | if(b-a $$ c-b){ | ~ ^~~ | ) a.cc:16:9: error: expected ';' before '}' token 16 | return 0 | ^ | ; 17 | } | ~
s316548824
p03759
C++
#include <iostream> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; cout << (b - a == c - d ? "YES" : "NO") << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:27: error: 'd' was not declared in this scope 9 | cout << (b - a == c - d ? "YES" : "NO") << endl; | ^
s383598773
p03759
C++
#include<iostream> #include<string> #include<algorithm> #include<stdio.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; if(b-a==c-b)cout<<"YES"<<endl; else count<<"NO"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:13:15: error: invalid operands of types '<unresolved overloaded function type>' and 'const char [3]' to binary 'operator<<' 13 | else count<<"NO"<<endl; | ~~~~~^~~~~~
s511611071
p03759
C++
$0=($2-$1==$3-$2?"YES":"NO")
a.cc:1:1: error: '$0' does not name a type 1 | $0=($2-$1==$3-$2?"YES":"NO") | ^~
s833170671
p03759
C++
#include <iostream> using namespace std; int main() { int x, y, z; cin >> x >> y; if(b - a == c - b) { cout << "YES" << endl; } else { cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:6:6: error: 'b' was not declared in this scope 6 | if(b - a == c - b) { | ^ a.cc:6:10: error: 'a' was not declared in this scope 6 | if(b - a == c - b) { | ^ a.cc:6:15: error: 'c' was not declared in this scope 6 | if(b - a == c - b) { | ^
s344514318
p03759
C
#include<stdio.h> int main(){ int a; int b; int 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:11:6: error: stray '\342' in program 11 | if((b<U+2212>a)==(c<U+2212>b)){ | ^~~~~~~~ main.c:11:6: error: expected ')' before 'a' 11 | if((b−a)==(c−b)){ | ~ ^~ | ) main.c:11:13: error: stray '\342' in program 11 | if((b<U+2212>a)==(c<U+2212>b)){ | ^~~~~~~~ main.c:11:13: error: expected ')' before 'b' 11 | if((b−a)==(c−b)){ | ~ ^~ | )
s833114416
p03759
C
#include<stdio.h> int main(){ int a; int b; int c; scanf("%d %d %d",&a,&b,&c); if((b−a)!(c−b)){ printf("NO\n"); }else{ printf("YES\n"); } return 0; }
main.c: In function 'main': main.c:11:6: error: stray '\342' in program 11 | if((b<U+2212>a)!(c<U+2212>b)){ | ^~~~~~~~ main.c:11:6: error: expected ')' before 'a' 11 | if((b−a)!(c−b)){ | ~ ^~ | ) main.c:11:9: error: expected ')' before '!' token 11 | if((b−a)!(c−b)){ | ~ ^ | ) main.c:11:12: error: stray '\342' in program 11 | if((b<U+2212>a)!(c<U+2212>b)){ | ^~~~~~~~
s464751853
p03759
C
#include<stdio.h> int main(){ int a,b,c; scanf("%d %d %d",&a,&b,&c); if((b−a)!(c−b)){ printf("NO\n"); }else{ printf("YES\n"); } return 0; }
main.c: In function 'main': main.c:9:6: error: stray '\342' in program 9 | if((b<U+2212>a)!(c<U+2212>b)){ | ^~~~~~~~ main.c:9:6: error: expected ')' before 'a' 9 | if((b−a)!(c−b)){ | ~ ^~ | ) main.c:9:9: error: expected ')' before '!' token 9 | if((b−a)!(c−b)){ | ~ ^ | ) main.c:9:12: error: stray '\342' in program 9 | if((b<U+2212>a)!(c<U+2212>b)){ | ^~~~~~~~
s360238271
p03759
C
#include<stdio.h> int main(){ int a,b,c; scanf("%d %d %d",&a,&b,&c); if((b−a)!(c−b)){ printf("NO\n"); }else{ printf("YES\n"); } }
main.c: In function 'main': main.c:9:6: error: stray '\342' in program 9 | if((b<U+2212>a)!(c<U+2212>b)){ | ^~~~~~~~ main.c:9:6: error: expected ')' before 'a' 9 | if((b−a)!(c−b)){ | ~ ^~ | ) main.c:9:9: error: expected ')' before '!' token 9 | if((b−a)!(c−b)){ | ~ ^ | ) main.c:9:12: error: stray '\342' in program 9 | if((b<U+2212>a)!(c<U+2212>b)){ | ^~~~~~~~
s698249531
p03759
C
#include<stdio.h> int main(){ int a,b,c; scanf("%d %d %d",&a,&b,&c); if(b−a!c−b){ printf("NO\n"); }else{ printf("YES\n"); } }
main.c: In function 'main': main.c:9:5: error: stray '\342' in program 9 | if(b<U+2212>a!c<U+2212>b){ | ^~~~~~~~ main.c:9:5: error: expected ')' before 'a' 9 | if(b−a!c−b){ | ~ ^~ | ) main.c:9:9: error: stray '\342' in program 9 | if(b<U+2212>a!c<U+2212>b){ | ^~~~~~~~
s893018220
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\n"); }else{ printf("NO\n"); } }
main.c: In function 'main': main.c:9:5: error: stray '\342' in program 9 | if(b<U+2212>a=c<U+2212>b){ | ^~~~~~~~ main.c:9:5: error: expected ')' before 'a' 9 | if(b−a=c−b){ | ~ ^~ | ) main.c:9:9: error: stray '\342' in program 9 | if(b<U+2212>a=c<U+2212>b){ | ^~~~~~~~
s232671431
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\n") }else{ printf("NO\n") } }
main.c: In function 'main': main.c:9:5: error: stray '\342' in program 9 | if(b<U+2212>a=c<U+2212>b){ | ^~~~~~~~ main.c:9:5: error: expected ')' before 'a' 9 | if(b−a=c−b){ | ~ ^~ | ) main.c:9:9: error: stray '\342' in program 9 | if(b<U+2212>a=c<U+2212>b){ | ^~~~~~~~ main.c:10:16: error: expected ';' before '}' token 10 | printf("YES\n") | ^ | ; 11 | }else{ | ~ main.c:12:15: error: expected ';' before '}' token 12 | printf("NO\n") | ^ | ; 13 | } | ~
s757309886
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\n") }else{ printf("NO\n") } }
main.c: In function 'main': main.c:9:5: error: stray '\342' in program 9 | if(b<U+2212>a=c<U+2212>b){ | ^~~~~~~~ main.c:9:5: error: expected ')' before 'a' 9 | if(b−a=c−b){ | ~ ^~ | ) main.c:9:9: error: stray '\342' in program 9 | if(b<U+2212>a=c<U+2212>b){ | ^~~~~~~~ main.c:10:16: error: expected ';' before '}' token 10 | printf("YES\n") | ^ | ; 11 | }else{ | ~ main.c:12:15: error: expected ';' before '}' token 12 | printf("NO\n") | ^ | ; 13 | } | ~
s404525721
p03759
Java
import java.util.Scanner; public class main{ public static void main (String[] args){ Scanner scan = new Scanner(System.in); String kisupas = scan.nextLine(); String gusupas = scan.nextLine(); String[] kisu = kisupas.split("", 0); String[] gusu = gusupas.split("", 0); for(int i=0; i<kisu.length; i++){ System.out.print(kisu[i]); if(i != gusu.length) System.out.print(gusu[i]); } } }
Main.java:3: error: class main is public, should be declared in a file named main.java public class main{ ^ 1 error
s596850907
p03759
Java
import java.util.Scanner; import java.util.Random; import java.util.Arrays; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String a = sc.next(); String b = sc.next(); String c = sc.next(); if (b-a == c-b) { System.out.println("YES"); } else { System.out.println("NO"); } } }
Main.java:13: error: bad operand types for binary operator '-' if (b-a == c-b) { ^ first type: String second type: String Main.java:13: error: bad operand types for binary operator '-' if (b-a == c-b) { ^ first type: String second type: String 2 errors
s801936465
p03759
Java
import java.util.Scanner; import java.util.Random; import java.util.Arrays; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String a = sc.next(); String b = sc.next(); String c = sc.next(); if (b-a == c-b) { System.out.println("YES"); } else { System.out.println("NO"); } }
Main.java:18: error: reached end of file while parsing } ^ 1 error
s524657228
p03759
C
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> void main(){ int a,b,c; scanf_s("%d %d %d",&a,&b,&c); if(b-a == c-b){ printf("Yes\n"); }else{ printf("No\n"); } }
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 %d %d",&a,&b,&c); | ^~~~~~~ | scanf
s784178755
p03759
C++
a, b, c = map(int(input().split(" "))); if b-a == c-b: print("YES"); else: print("NO");
a.cc:1:1: error: 'a' does not name a type 1 | a, b, c = map(int(input().split(" "))); | ^ a.cc:3:1: error: expected unqualified-id before 'if' 3 | if b-a == c-b: | ^~ a.cc:5:1: error: expected unqualified-id before 'else' 5 | else: | ^~~~
s154006085
p03759
C++
#include <iostream > using namespace std; int main(){ string E, O; cin >> E >> O; for(int i=0; i < E.size(); i++){ if (i < O.size()) cout << O[i]; } return 0; }
a.cc:1:10: fatal error: iostream : No such file or directory 1 | #include <iostream > | ^~~~~~~~~~~ compilation terminated.
s710463335
p03759
Java
import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String line = br.readLine(); String[] jal = new String[3]; int[] ana = new int[3]; jal = line.split(" "); for(int i=0;i<jal.length;i++) ana[i]=Integer.parseInt(jal[i]); if(ana[1]-ana[0]=ana[2]-ana[1]) System.out.println("YES"); else System.out.println("NO"); } }
Main.java:14: error: unexpected type if(ana[1]-ana[0]=ana[2]-ana[1]) ^ required: variable found: value 1 error
s819918218
p03759
Java
public class Main { public static void main(String[] args) throws IOException { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); if(c - a == b ){ System.out.println("YES"); }else{ System.out.println("NO"); } }}
Main.java:3: error: cannot find symbol public static void main(String[] args) throws IOException { ^ symbol: class IOException location: class Main 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
s417792722
p03759
C++
/* @CopyRight: Script by vimer(micro.script@hotmail.com). All rights reserved. * @Version: 1.0 * @Date: Saturday, May 20, 2017 * @Description: A - ι⊥l * @Environment: Code::Blocks 16.01, GCC 4.9. */ #include<iostream> using namespace std; int main(){ int a = 0, b = 0, c = 0; cin >> a >> b >> c; if(b - a = c - b) cout << "YES" ; else cout << "NO"; cout << endl; return 0; }
a.cc: In function 'int main()': a.cc:12:10: error: lvalue required as left operand of assignment 12 | if(b - a = c - b) cout << "YES" ; | ~~^~~
s803872867
p03759
C++
#include<cstdio> #include<algorithm> #include<vector> #include<deque> #include<string> #include<iostream> #include<tuple> #include<utility> #include<set> #include<queue> using namespace std; typedef long long int llint; const llint big=((llint)1<<(llint)30); #define mt make_tuple #define mp make_pair #define fi first #define se second #define pub push_back #define res resize //JOI 2017 semiexp O(NlogN) //3:25~4:40 //Tmin int main(void){ int a,b,c; cin>>a>>b>>c; if(b+b==a+c){cout<<"YES"<<endl;} else{cout<<"NO"<<<endl;} return 0; }
a.cc: In function 'int main()': a.cc:27:26: error: expected primary-expression before '<' token 27 | else{cout<<"NO"<<<endl;} | ^
s858703379
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; } }
a.cc: In function 'int main()': a.cc:6:9: error: lvalue required as left operand of assignment 6 | if(b-a=c-b) { | ~^~
s080622472
p03759
Java
import java.util.Scanner; public class A.java { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { 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:2: error: '{' expected public class A.java { ^ 1 error
s143125013
p03759
Java
import java.util.Scanner; public class A { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { 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:2: error: class A is public, should be declared in a file named A.java public class A { ^ 1 error
s640795728
p03759
C++
#include <iostream> using namespace std; int main(){ int a,b,c; cin>>a >>b >>c; if (a-b=b-c){ cout<<"YES"<<endl; } else{ cout<<"NO"<<endl; } return 0 }
a.cc: In function 'int main()': a.cc:6:6: error: lvalue required as left operand of assignment 6 | if (a-b=b-c){ | ~^~ a.cc:12:9: error: expected ';' before '}' token 12 | return 0 | ^ | ; 13 | } | ~
s988435311
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; return 0; }
a.cc: In function 'int main()': a.cc:7:32: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<' 7 | cout<<(b-a==c-b)?"YES":"NO"<<endl; | ~~~~^~~~~~
s055049232
p03759
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; if (b - a == c - d) cout << "YES" << endl; else cout << "NO" << endl; }
a.cc: In function 'int main()': a.cc:9:26: error: 'd' was not declared in this scope 9 | if (b - a == c - d) | ^
s955894310
p03759
Java
import java.util.Scanner; public class MainA { 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(c-b==b-a) System.out.println("YES"); else System.out.println("NO"); } }
Main.java:4: error: class MainA is public, should be declared in a file named MainA.java public class MainA { ^ 1 error
s699029603
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:1:1: error: 'include' does not name a type 1 | include<iostream> | ^~~~~~~ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, from a.cc:2: /usr/include/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a type 68 | typedef ptrdiff_t streamsize; // Signed integral type | ^~~~~~~~~ /usr/include/c++/14/bits/postypes.h:41:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' 40 | #include <cwchar> // For mbstate_t +++ |+#include <cstddef> 41 | In file included from /usr/include/c++/14/bits/char_traits.h:50: /usr/include/c++/14/type_traits:666:33: error: 'nullptr_t' is not a member of 'std' 666 | struct is_null_pointer<std::nullptr_t> | ^~~~~~~~~ /usr/include/c++/14/type_traits:666:42: error: template argument 1 is invalid 666 | struct is_null_pointer<std::nullptr_t> | ^ /usr/include/c++/14/type_traits:670:48: error: template argument 1 is invalid 670 | struct is_null_pointer<const std::nullptr_t> | ^ /usr/include/c++/14/type_traits:674:51: error: template argument 1 is invalid 674 | struct is_null_pointer<volatile std::nullptr_t> | ^ /usr/include/c++/14/type_traits:678:57: error: template argument 1 is invalid 678 | struct is_null_pointer<const volatile std::nullptr_t> | ^ /usr/include/c++/14/type_traits:1429:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1429 | : public integral_constant<std::size_t, alignof(_Tp)> | ^~~~~~ In file included from /usr/include/wchar.h:35, from /usr/include/c++/14/cwchar:44, from /usr/include/c++/14/bits/postypes.h:40: /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/type_traits:1429:57: error: template argument 1 is invalid 1429 | : public integral_constant<std::size_t, alignof(_Tp)> | ^ /usr/include/c++/14/type_traits:1429:57: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1438:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1438 | : public integral_constant<std::size_t, 0> { }; | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/type_traits:1438:46: error: template argument 1 is invalid 1438 | : public integral_constant<std::size_t, 0> { }; | ^ /usr/include/c++/14/type_traits:1438:46: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1440:26: error: 'std::size_t' has not been declared 1440 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/14/type_traits:1441:21: error: '_Size' was not declared in this scope 1441 | struct rank<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:1441:27: error: template argument 1 is invalid 1441 | struct rank<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:1442:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/type_traits:1442:65: error: template argument 1 is invalid 1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^ /usr/include/c++/14/type_traits:1442:65: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1446:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/type_traits:1446:65: error: template argument 1 is invalid 1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^ /usr/include/c++/14/type_traits:1446:65: note: invalid template non-type parameter /usr/include/c++/14/type_traits:2086:26: error: 'std::size_t' has not been declared 2086 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/14/type_traits:2087:30: error: '_Size' was not declared in this scope 2087 | struct remove_extent<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:2087:36: error: template argument 1 is invalid 2087 | struct remove_extent<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:2099:26: error: 'std::size_t' has not been declared 2099 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/14/type_traits:2100:35: error: '_Size' was not declared in this scope 2100 | struct remove_all_extents<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:2100:41: error: template argument 1 is invalid 2100 | struct remove_all_extents<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:2171:12: error: 'std::size_t' has not been declared 2171 | template<std::size_t _Len> | ^~~ /usr/include/c++/14/type_traits:2176:30: error: '_Len' was not declared in this scope 2176 | unsigned char __data[_Len]; | ^~~~ /usr/include/c++/14/type_traits:2194:12: error: 'std::size_t' has not been declared 2194 | template<std::size_t _Len, std::size_t _Align = | ^~~ /usr/include/c++/14/type_traits:2194:30: error: 'std::size_t' has not been declared 2194 | template<std::size_t _Len, std::size_t _Align = | ^~~ /usr/include/c++/14/type_traits:2195:55: error: '_Len' was not declared in this scope 2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)> | ^~~~ /usr/include/c++/14/type_traits:2195:59: error: template argument 1 is invalid 2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)> | ^ /usr/include/c++/14/type_traits:2202:30: error: '_Len' was not declared in this scope 2202 | unsigned char __data[_Len]; | ^~~~ /usr/include/c++/14/type_traits:2203:44: error: '_Align' was not declared in this scope 2203 | struct __attribute__((__aligned__((_Align)))) { } __align; | ^~~~~~ /usr/include/c++/14/bits/char_traits.h:144:61: error: 'std::size_t' has not been declared 144 | compare(const char_type* __s1, const char_type* __s2, std::size_t __n); | ^~~ /usr/include/c++/14/bits/char_traits.h:146:40: error: 'size_t' in namespace 'std' does not name a type 146 | static _GLIBCXX14_CONSTEXPR std::size_t | ^~~~~~ /usr/include/c++/14/bits/char_traits.h:150:34: error: 'std::size_t' has not been declared 150 | find(const char_type* __s, std::size_t __n, const char_type& __a); | ^~~ /usr/include/c++/14/bits/char_traits.h:153:52: error: 'std::size_t' has not been declared 153 | move(char_type* __s1, const char_type* __s2, std::size_t __n); | ^~~ /usr/include/c++/14/bits/char_traits.h:156:52: error: 'std::size_t' has not been declared 156 | copy(char_type* __s1, const char_type* __s2, std::size_t __n); | ^~~ /usr/include/c++/14/bits/char_traits.h:159:30: error: 'std::size_t' has not been declared 159 | assign(char_type* __s, std::size_t __n, char_type __a); | ^~~ /usr/include/c++/14/bits/char_traits.h:187:59: error: 'std::size_t' has not been declared 187 | compare(const char_type* __s1, const char_type* __s2, std::size_t __n) | ^~~ /usr/include/c++/14/bits/char_traits.h: In static member function 'static constexpr int __gnu_cxx::char_traits<_CharT>::compare(const char_type*, const char_type*, int)': /usr/include/c++/14/bits/char_traits.h:189:17: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 189 | for (std::size_t __i = 0; __i < __n; ++__i) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/bits/char_traits.h:189:33: error: '__i' was not declared in this scope; did you mean '__n'? 189 | for (std::size_t __i = 0; __i < __n; ++__i) | ^~~ | __n /usr/include/c++/14/bits/char_traits.h: At global scope: /usr/include/c++/14/bits/char_traits.h:198:31: error: 'size_t' in namespace 'std' does not name a type 198 | _GLIBCXX14_CONSTEXPR std::size_t |
s062660741
p03759
C++
package main import ( "fmt" ) func main(){ var a,b,c int fmt.Scan(&a, &b, &c) if b - a == c - b { fmt.Println("YES") } else { fmt.Println("NO") } }
a.cc:1:1: error: 'package' does not name a type 1 | package main | ^~~~~~~
s130548969
p03759
C++
int a,b,c; cin >> a >> b >>c; if (b-a == c-b){ cout << "YES"; }else{ cout << "NO"; }
a.cc:2:1: error: 'cin' does not name a type 2 | cin >> a >> b >>c; | ^~~ a.cc:3:1: error: expected unqualified-id before 'if' 3 | if (b-a == c-b){ | ^~ a.cc:5:2: error: expected unqualified-id before 'else' 5 | }else{ | ^~~~
s906812522
p03759
C++
int a,b,c; if (b-a == c-b){ cout << "YES"; }else{ cout << "NO" }
a.cc:2:1: error: expected unqualified-id before 'if' 2 | if (b-a == c-b){ | ^~ a.cc:4:2: error: expected unqualified-id before 'else' 4 | }else{ | ^~~~
s417283932
p03759
C++
#include<iostream> using namespace std; int main() { // 変数 int a,b,c; // 入力 cin >> a >> b >> c; ba = b - a; cb = c - b; if (ba == cb) { cout << "YES" << endl; } else { cout << "NO" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:13:9: error: 'ba' was not declared in this scope; did you mean 'b'? 13 | ba = b - a; | ^~ | b a.cc:14:9: error: 'cb' was not declared in this scope; did you mean 'c'? 14 | cb = c - b; | ^~ | c
s686171526
p03759
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println(abc058_a(sc.next(),sc.next(),sc.next())); } static String abc058_a(int a, int b, int c) { if (b - a == c - b) { return "YES"; } return "NO"; } }
Main.java:6: error: incompatible types: String cannot be converted to int System.out.println(abc058_a(sc.next(),sc.next(),sc.next())); ^ Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output 1 error
s487730184
p03759
C++
#include <bits/stdc++.h> 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: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/bits/stl_algobase.h:67, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_iterator.h:618:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 618 | operator-(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:618:5: note: template argument deduction/substitution failed: a.cc: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"; | ^ In file included from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/complex:370:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator-(const complex<_Tp>&, const complex<_Tp>&)' 370 | operator-(const complex<_Tp>& __x, const complex<_Tp>& __y) | ^~~~~~~~ /usr/include/c++/14/complex:370:5: note: template argument deduction/substitution failed: a.cc:8:30: note: 'main()::<lambda()>' is not derived from 'const std::complex<_Tp>' 8 | if(a[1]-a[0]==[2]-a[1]) cout<<"YES\n"; | ^ /usr/include/c++/14/complex:379:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator-(const complex<_Tp>&, const _Tp&)' 379 | operator-(const complex<_Tp>& __x, const _Tp& __y) | ^~~~~~~~ /usr/include/c++/14/complex:379:5: note: template argument deduction/substitution failed: a.cc:8:30: note: 'main()::<lambda()>' is not derived from 'const std::complex<_Tp>' 8 | if(a[1]-a[0]==[2]-a[1]) cout<<"YES\n"; | ^ /usr/include/c++/14/complex:388:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator-(const _Tp&, const complex<_Tp>&)' 388 | operator-(const _Tp& __x, const complex<_Tp>& __y) | ^~~~~~~~ /usr/include/c++/14/complex:388:5: note: template argument deduction/substitution failed: a.cc:8:30: note: mismatched types 'const std::complex<_Tp>' and 'long int' 8 | if(a[1]-a[0]==[2]-a[1]) cout<<"YES\n"; | ^ /usr/include/c++/14/complex:465:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator-(const complex<_Tp>&)' 465 | operator-(const complex<_Tp>& __x) | ^~~~~~~~ /usr/include/c++/14/complex:465:5: note: candidate expects 1 argument, 2 provided In file included from /usr/include/c++/14/valarray:605, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166: /usr/include/c++/14/bits/valarray_after.h:406:5: note: candidate: 'template<class _Dom1, class _Dom2> std::_Expr<std::__detail::_BinClos<std::__minus, std::_Expr, std::_Expr, _Dom1, _Dom2>, typename std::__fun<std::__minus, typename _Dom1::value_type>::result_type> std::operator-(const _Expr<_Dom1, typename _Dom1::value_type>&, const _Expr<_Dom2, typename _Dom2::value_type>&)' 406 | _DEFINE_EXPR_BINARY_OPERATOR(-, struct std::__minus) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/valarray_after.h:406:5: note: template argument deduction/substitution failed: a.cc:8:30: note: 'main()::<lambda()>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 8 | if(a[1]-a[0]==[2]-a[1]) cout<<"YES\n"; | ^ /usr/include/c++/14/bits/valarray_after.h:406:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__minus, std::_Expr, std::_Constant, _Dom, typename _Dom::value_type>, typename std::__fun<std::__minus, typename _Dom1::value_type>::result_type> std::operator-(const _Expr<_Dom1, typename _Dom1::value_type>&, const typename _Dom::value_type&)' 406 | _DEFINE_EXPR_BINARY_OPERATOR(-, struct std::__minus) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/valarray_after.h:406:5: note: template argument deduction/substitution failed: a.cc:8:30: note: 'main()::<lambda()>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 8 | if(a[1]-a[0]==[2]-a[1]) cout<<"YES\n"; | ^ /usr/include/c++/14/bits/valarray_after.h:406:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__minus, std::_Constant, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__minus, typename _Dom1::value_type>::result_type> std::operator-(const typename _Dom::value_type&, const _Expr<_Dom1, typename _Dom1::value_type>&)' 406 | _DEFINE_EXPR_BINARY_OPERATOR(-, struct std::__minus) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/valarray_after.h:406:5: note: template argument deduction/substitution failed: a.cc:8:30: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'long int' 8 | if(a[1]-a[0]==[2]-a[1]) cout<<"YES\n"; | ^ /usr/include/c++/14/bits/valarray_after.h:406:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__minus, std::_Expr, std::_ValArray, _Dom, typename _Dom::value_type>, typename std::__fun<std::__minus, typename _Dom1::value_type>::result_type> std::operator-(const _Expr<_Dom1, typename _Dom1::value_type>&, const valarray<typename _Dom::value_type>&)' 406 | _DEFINE_EXPR_BINARY_OPERATOR(-, struct std::__minus) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/valarray_after.h:406:5: note: template argument deduction/substitution failed: a.cc:8:30: note: 'main()::<lambda()>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 8 | if(a[1]-a[0]==[2]-a[1]) cout<<"YES\n"; | ^ /usr/include/c++/14/bits/valarray_after.h:406:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__minus, std::_ValArray, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__minus, typename _Dom1::value_type>::result_type> std::operator-(const valarray<typename _Dom::value_type>&, const _Expr<_Dom1, typename _Dom1::value_type>&)' 406 | _DEFINE_EXPR_BINARY_OPERATOR(-, struct std::__minus) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/valarray_after.h:406:5: note: template argument deduction/substitution failed: a.cc:8:30: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'long int' 8 | if(a[1]-a[0]==[2]-a[1]) cout<<"YES\n"; | ^ /usr/include/c++/14/valarray:1197:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__minus, std::_ValArray, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__minus, _Tp>::result_type> std::operator-(const valarray<_Tp>&, const valarray<_Tp>&)' 1197 | _DEFINE_BINARY_OPERATOR(-, __minus) | ^~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/valarray:1197:1: note: template argument deduction/substitution failed: a.cc:8:30: note: 'main()::<lambda()>' is not derived from 'const std::valarray<_Tp>' 8 | if(a[1]-a[0]==[2]-a[1]) cout<<"YES\n"; | ^ /usr/include/c++/14/valarray:1197:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__minus, std::_ValArray, std::_Constant, _Tp, _Tp>, typename std::__fun<std::__minus, _Tp>::result_type> std::operator-(const valarray<_Tp>&, const typename valarray<_Tp>::value_type&)' 1197 | _DEFINE_BINARY_OPERATOR(-, __minus) | ^~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/valarray:1197:1: note: template argument deduction/substitution failed: a.cc:8:30: note: 'main()::<lambda()>' is not derived from 'const std::valarray<_Tp>' 8 | if(a[1]-a[0]==[2]-a[1]) cout<<"YES\n"; | ^ /usr/include/c++/14/valarray:1197:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__minus, std::_Constant, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__minus, _Tp>::result_type> std::operator-(const typename valarray<_Tp>::value_type&, const valarray<_Tp>&)' 1197 | _DEFINE_BINARY_OPERATOR(-, __minus) | ^~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/valarray:1197:1: note: template argument deduction/substitution failed: a.cc:8:30: note: mismatched types 'const std::valarray<_Tp>' and 'long int' 8 | if(a[1]-a[0]==[2]-a[1]) cout<<"YES\n"; | ^