submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s808063381
p03759
C++
#include<iostream> using namespace std; #include<bits/stdc++.h> int main(){ int a, b, c; cin >> a >> b >> c; int k = abc(b-a); int l = abs(c-b); if (k==l){ cout << "YES" << endl; } else { cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:8:12: error: 'abc' was not declared in this scope; did you mean 'abs'? 8 | int k = abc(b-a); | ^~~ | abs
s773250182
p03759
C++
#include<iostream> using namespace std; #include<bits/stdc++.h> int main(){ int a, b, c; cin >> a >> b >> c; int k = abc(b-a), l = abs(c-b); if (k==l){ cout << "YES" << endl; } else { cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:8:12: error: 'abc' was not declared in this scope; did you mean 'abs'? 8 | int k = abc(b-a), l = abs(c-b); | ^~~ | abs a.cc:9:11: error: 'l' was not declared in this scope 9 | if (k==l){ | ^
s632689697
p03759
C++
#include <iostream> #include <cstdlib> #include <algorithm> #include <vector> #include <string> #include <cmath> #include <cassert> #include <functional> #include <string> #include <sstream> #include <cctype> using namespace std; int main(){ int A, B, C; cin >> A >> B >> C; cout << (2 * B = A + C ? "YES" : "NO") << endl; }
a.cc: In function 'int main()': a.cc:17:14: error: lvalue required as left operand of assignment 17 | cout << (2 * B = A + C ? "YES" : "NO") << endl; | ~~^~~
s250018817
p03759
C++
#include <stdio.h> int main(){ scanf("%d %d %d", &a, &b, &c); if(b-a == c-b){ printf("YES\n"); } else { printf("NO\n"); } }
a.cc: In function 'int main()': a.cc:4:28: error: 'a' was not declared in this scope 4 | scanf("%d %d %d", &a, &b, &c); | ^ a.cc:4:32: error: 'b' was not declared in this scope 4 | scanf("%d %d %d", &a, &b, &c); | ^ a.cc:4:36: error: 'c' was not declared in this scope 4 | scanf("%d %d %d", &a, &b, &c); | ^
s642865204
p03759
C
#include <stdio.h> int main (){ int a, b, c; scanf ("%d %d %d", &a, &b, &c); if (b - a == c - b){ printf ("YES"); } else if (b - a != c - b){ printd ("NO"); } return 0; }
main.c: In function 'main': main.c:10:9: error: implicit declaration of function 'printd'; did you mean 'printf'? [-Wimplicit-function-declaration] 10 | printd ("NO"); | ^~~~~~ | printf
s060423609
p03759
C++
#include<stdio.h> int main(){ char a,b; scanf("%c %c",&a,&b); if(a=='H'){ if(b=='H') printf("H\n"); else printf("D\n") }else { if(b=='H') printf("D\n"); else printf("H\n"); } return 0; }
a.cc: In function 'int main()': a.cc:8:27: error: expected ';' before '}' token 8 | else printf("D\n") | ^ | ; 9 | }else { | ~
s048657270
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:10: error: lvalue required as left operand of assignment 7 | if ((b - a) = (c - b)) { | ~~~^~~~
s318369748
p03759
C++
#include<iostream> using nmaespace std; int main() { long long a, b, c, d, e; cin >> a >> b >> c; d = b - a; e = c - b; if(d == e) cout << "YES"; else cout << "NO"; return 0; }
a.cc:2:7: error: expected nested-name-specifier before 'nmaespace' 2 | using nmaespace std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:6:1: 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:9:12: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 9 | if(d == e) cout << "YES"; | ^~~~ | 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:6: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 10 | else cout << "NO"; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~
s251950843
p03759
C++
#include<bits/stdc++.h> using namespace std; int main() { int a[4]; cin>>a[1]>>a[2]>>a[3]; sort(a+1,a+4); if(a[3]-a[2]==a[2]-a[1]) cout<<"YES"; else cout<<"NO"; }
a.cc:1:25: warning: extra tokens at end of #include directive 1 | #include<bits/stdc++.h> using namespace std; int main() { int a[4]; cin>>a[1]>>a[2]>>a[3]; sort(a+1,a+4); if(a[3]-a[2]==a[2]-a[1]) cout<<"YES"; else cout<<"NO"; } | ^~~~~ /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s296109992
p03759
C++
2 4 6
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 2 4 6 | ^
s525078733
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" }else{ cout << "NO" } }
a.cc: In function 'int main()': a.cc:8:16: error: expected ';' before '}' token 8 | cout << "YES" | ^ | ; 9 | }else{ | ~ a.cc:10:15: error: expected ';' before '}' token 10 | cout << "NO" | ^ | ; 11 | } | ~
s182471796
p03759
C++
#include<iostream> #include<algorithm> #include<string> #include<cstdlib> #include<map> #include<iomanip> #include<sstream> #include<vector> #include<stack> #include<math.h> #include<queue> #include<complex> using namespace std; long long int solve(long long int n){ if(n==2){return 3;} else if(n==4||n==6||n==9||n==11){return 2;} else{return 1;} } int main() { long long int n=0,m,a,b,c,d,e; long double z,w; string str,str2,str3; char ch; long long int x[130]={}; cout << fixed << setprecision(10); cin>>a<<b<<c; if(b-a==c-b){cout<<"YES";} else{cout<<"NO";} cout<<endl; }
a.cc: In function 'int main()': a.cc:28:15: error: no match for 'operator<<' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'long long int') 28 | cin>>a<<b<<c; | ~~~~~~^~~ | | | | | long long int | std::basic_istream<char>::__istream_type {aka std::basic_istream<char>} a.cc:28:15: note: candidate: 'operator<<(int, long long int)' (built-in) 28 | cin>>a<<b<<c; | ~~~~~~^~~ a.cc:28:15: note: no known conversion for argument 1 from 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'int' In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)' 763 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed: a.cc:28:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 28 | cin>>a<<b<<c; | ^ /usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 4077 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed: a.cc:28:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 28 | cin>>a<<b<<c; | ^ In file included from /usr/include/c++/14/bits/memory_resource.h:38, from /usr/include/c++/14/string:68: /usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)' 125 | operator<<(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed: a.cc:28:12: note: cannot convert 'std::cin.std::basic_istream<char>::operator>>(a)' (type 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'}) to type 'std::byte' 28 | cin>>a<<b<<c; | ~~~^~~ In file included from /usr/include/c++/14/bits/ios_base.h:46: /usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)' 339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e) | ^~~~~~~~ /usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed: a.cc:28:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 28 | cin>>a<<b<<c; | ^ /usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)' 563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) | ^~~~~~~~ /usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed: a.cc:28:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 28 | cin>>a<<b<<c; | ^ /usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)' 573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed: a.cc:28:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 28 | cin>>a<<b<<c; | ^ /usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)' 579 | operator<<(basic_ostream<char, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed: a.cc:28:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 28 | cin>>a<<b<<c; | ^ /usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)' 590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed: a.cc:28:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 28 | cin>>a<<b<<c; | ^ /usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)' 595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed: a.cc:28:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 28 | cin>>a<<b<<c; | ^ /usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)' 654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed: a.cc:28:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 28 | cin>>a<<b<<c; | ^ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)' 307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed: a.cc:28:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 28 | cin>>a<<b<<c; | ^ /usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)' 671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:671:5: note: template argument deduction/substitution failed: a.cc:28:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 28 | cin>>a<<b<<c; | ^ /usr/include/c++/14/ostream:684:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const signed char*)' 684 | operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:684:5: note: template argument deduction/substitution failed: a.cc:28:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 28 | cin>>a<<b<<c; | ^ /usr/include/c++/14/ostream:689:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const unsigned char*)' 689 | operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:689:5: note: template argument deduction/substitution failed: a.cc:28:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 28 | cin>>a<<b<<c; | ^ /usr/include/c++/14/ostream:810:5: note: candidate: 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&)' 810 | operator<<(_Ostream&& __os, const _Tp& __x) | ^~~~~~~~ /usr/include/c++/14/ostream:810:5: note: template argument deduction/substitution failed: /usr/include/c++/14/ostream: In substitution of 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&) [with _Ostream = std::basic_istream<char>&; _Tp = long long int]': a.cc:28:10: required from here 28 | cin>>a<<b<<c; | ^ /usr/
s386116641
p03759
C++
#include <bits/stdc++.h> using namespace std; int main(){ string o,e; cin>>o>>e; int oLen=o.size(),eLen=e.size(), i; if(oLen==eLen) { for (i=0; i < oLen; i++) { cout<<o[i]<<e[i]; } } else { for (i,i < eLen; i++) { cout<<o[i]<<e[i]; } cout<<o[o.size()-1]; } cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:16:25: error: expected ';' before ')' token 16 | for (i,i < eLen; i++) { | ^ | ;
s895961952
p03759
C++
#include <iostream> #include <algorithm> #include <vector> #include <set> #include <cmath> #include <complex> #include <deque> #include <iterator> #include <map> #include <queue> #include <stack> #include <string> #include <tuple> #include <utility> #include <limits> #include <iomanip> using namespace std; using ll=long long; template<class T> using V = vector<T>; template<class T, class U> using P = pair<T, U>; using vll = V<ll>; using vvll = V<vll>; #define rep(i, k, n) for (ll i=k; i<(ll)n; ++i) #define REP(i, n) rep(i, 0, n) template<class T> inline bool chmax(T& a, T b) {if (a<b) {a=b; return true;} return false;} template<class T> inline bool chmin(T& a, T b) {if (a>b) {a=b; return true;} return false;} const ll MOD = 1000000007; const ll HIGHINF = (ll)1e18; int main() { ll a, b, c; cin >> a >> b >> c; if (b-a == c-b) cout << "YES" << endl; else "NO" << endl; return 0; }
a.cc: In function 'int main()': a.cc:35:13: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<' 35 | else "NO" << endl; | ~~~~~^~~~~~~
s749548161
p03759
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; if(2b==a+c){ cout<<"YES"<<endl; } else{ cout<<"NO"<<endl; } }
a.cc: In function 'int main()': a.cc:7:6: error: unable to find numeric literal operator 'operator""b' 7 | if(2b==a+c){ | ^~
s791785146
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\n"; else cout<<"NO\n"; return 0; }
a.cc:1:9: fatal error: Bits/stdc++.h: No such file or directory 1 | #include<Bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s087273009
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"; else cout<<"NO"; }
a.cc: In function 'int main()': a.cc:6:5: error: lvalue required as left operand of assignment 6 | if(b-a=c-b) | ~^~
s372417112
p03759
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; cout <<(a+c=2*b?"YES":"NO")<<endl; }
a.cc: In function 'int main()': a.cc:6:12: error: lvalue required as left operand of assignment 6 | cout <<(a+c=2*b?"YES":"NO")<<endl; | ~^~
s017143956
p03759
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; cout <<(a+c=2*b?"YES":"NO") <<endl; }
a.cc: In function 'int main()': a.cc:6:12: error: lvalue required as left operand of assignment 6 | cout <<(a+c=2*b?"YES":"NO") <<endl; | ~^~
s621635305
p03759
C++
#include <bits/stdc++.h> using namespace std; const int MOD = 1000000007; //long long using ll = long long; //出力系 #define print(x) cout << x << endl #define yes cout << "Yes" << endl #define YES cout << "YES" << endl #define no cout << "No" << endl #define NO cout << "NO" << endl // begin() end() #define all(x) (x).begin(),(x).end() //for #define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i) //最大公約数 unsigned gcd(unsigned a, unsigned b) { if(a < b) return gcd(b, a); unsigned r; while ((r=a%b)) { a = b; b = r; } return b; } int main(){ int a, b, c; cin >> a >> b >> c; if(b - a == c - b) { YES; return 0 } NO; }
a.cc: In function 'int main()': a.cc:38:11: error: expected ';' before '}' token 38 | return 0 | ^ | ; 39 | } | ~
s848567756
p03759
C++
#include<stdio.h> int main(void) { int a,b,c; scanf("%d",&a); scanf("%d",&b); scanf("%d",&c); if(a-b=c-b){ printf("Yes\n") } else{ printf("No\n") } return 0; }
a.cc: In function 'int main()': a.cc:8:13: error: lvalue required as left operand of assignment 8 | if(a-b=c-b){ | ~^~ a.cc:9:24: error: expected ';' before '}' token 9 | printf("Yes\n") | ^ | ; 10 | } | ~ a.cc:12:23: error: expected ';' before '}' token 12 | printf("No\n") | ^ | ; 13 | } | ~
s673809760
p03759
C++
int main() { int Z=0; //----------- int a=0,b=0,c=0; cin>>a>>b>>c; if(b-a==c-b) { cout<<"YES"<<endl; } else{ cout<<"NO"<<endl; } //------------ //cin>>Z; return 0; }
a.cc: In function 'int main()': a.cc:8:5: error: 'cin' was not declared in this scope 8 | cin>>a>>b>>c; | ^~~ a.cc:12:9: error: 'cout' was not declared in this scope 12 | cout<<"YES"<<endl; | ^~~~ a.cc:12:22: error: 'endl' was not declared in this scope 12 | cout<<"YES"<<endl; | ^~~~ a.cc:15:5: error: 'cout' was not declared in this scope 15 | cout<<"NO"<<endl; | ^~~~ a.cc:15:17: error: 'endl' was not declared in this scope 15 | cout<<"NO"<<endl; | ^~~~
s179608516
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:5:12: error: found ':' in nested-name-specifier, expected '::' 5 | int A,B,C: | ^ | :: a.cc:5:11: error: 'C' has not been declared 5 | int A,B,C: | ^ a.cc:6:7: error: qualified-id in declaration before '>>' token 6 | cin >> A >> B >> C; | ^~ a.cc:7:14: error: 'C' was not declared in this scope 7 | if (B-A == C - B) { | ^
s153287436
p03759
Java
a, b, c = (int(x) for x in input().split()) if b - a == c - b: print('YES') else: print('NO')
Main.java:1: error: class, interface, enum, or record expected a, b, c = (int(x) for x in input().split()) ^ Main.java:3: error: unclosed character literal print('YES') ^ Main.java:3: error: unclosed character literal print('YES') ^ Main.java:5: error: unclosed character literal print('NO') ^ Main.java:5: error: unclosed character literal print('NO') ^ 5 errors
s673886587
p03759
C++
#include <bits/stdc++.h> using namespace std; #define ll long long int main(){ cin.tie(0); ios::sync_with_stdio(false); ll a, b, ,c; cin >> a >> b >> c; if (b-a==c-b){ cout << "YES" << endl; } else { cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:9:18: error: expected unqualified-id before ',' token 9 | ll a, b, ,c; | ^
s317483505
p03759
C++
#include <bits/stdc++.h> #define rep(i,n) for (int i = 0; i < (n); i++) #define rep1(i,n) for (int i = 1; i <= (n); i++) #define repi(i,a,b) for (int i = (a); i < (b); i++) #define all(x) (x).begin(),(x).end() using namespace std; using uint = unsigned int; using ll = long long; using ull = unsigned long long; using vi = vector<int>; using vvi = vector<vi>; using pii = pair<int, int>; using vc = vector<char>; using vvc = vector<vc>; using vs = vector<string>; int main() { string a, b, c; cin >> a >> b >> c; cout << (b-a == c-b ? "YES" : "NO") << endl; }
a.cc: In function 'int main()': a.cc:21:13: error: no match for 'operator-' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 21 | cout << (b-a == c-b ? "YES" : "NO") << endl; | ~^~ | | | | | basic_string<[...]> | basic_string<[...]> 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:21:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 21 | cout << (b-a == c-b ? "YES" : "NO") << endl; | ^ /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:21:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 21 | cout << (b-a == c-b ? "YES" : "NO") << endl; | ^ 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:21:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::complex<_Tp>' 21 | cout << (b-a == c-b ? "YES" : "NO") << endl; | ^ /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:21:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::complex<_Tp>' 21 | cout << (b-a == c-b ? "YES" : "NO") << endl; | ^ /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:21:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::complex<_Tp>' 21 | cout << (b-a == c-b ? "YES" : "NO") << endl; | ^ /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:21:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 21 | cout << (b-a == c-b ? "YES" : "NO") << endl; | ^ /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:21:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 21 | cout << (b-a == c-b ? "YES" : "NO") << endl; | ^ /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:21:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 21 | cout << (b-a == c-b ? "YES" : "NO") << endl; | ^ /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:21:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 21 | cout << (b-a == c-b ? "YES" : "NO") << endl; | ^ /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:21:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 21 | cout << (b-a == c-b ? "YES" : "NO") << endl; | ^ /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:21:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::valarray<_Tp>' 21 | cout << (b-a == c-b ? "YES" : "NO") << endl; | ^ /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:21:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::valarray<_Tp>' 21 | cout << (b-a == c-b ? "YES" : "NO") << endl; | ^ /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:21:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::valarray<_Tp>' 21 | cout << (b-a == c-b ? "YES" : "NO") << endl; | ^ a.cc:21:20: error: no match for 'operator-' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::string' {aka
s234675586
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"; } else { cout << "NO"; } }
a.cc: In function 'int main()': a.cc:7:8: error: lvalue required as left operand of assignment 7 | if (b-a=c-b) { | ~^~
s639718665
p03759
C++
#include<bits/stdc++.h> 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; }
a.cc: In function 'int main()': a.cc:7:7: error: expected primary-expression before '<<' token 7 | else<<cout<<"NO"<<endl; | ^~
s791945931
p03759
C++
#include<bits/stdc++.h> 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; }
a.cc: In function 'int main()': a.cc:5:27: error: 'B' was not declared in this scope 5 | int a,b,c;cin>>a>>B>>C; | ^ a.cc:5:30: error: 'C' was not declared in this scope 5 | int a,b,c;cin>>a>>B>>C; | ^ a.cc:7:7: error: expected primary-expression before '<<' token 7 | else<<cout<<"NO"<<endl; | ^~
s906100718
p03759
C++
x,y,z = map(int,input().split()) if z-y==y-x: print("YES") else: print("NO")
a.cc:1:1: error: 'x' does not name a type 1 | x,y,z = map(int,input().split()) | ^
s264699674
p03759
C++
#include <bits/stdc++.h> using namespace std; int main() { string a , b , c; cin >> a >> b >> c; vector<int> vec = {a, b , c}; sort(vec.begin(), vec.end()); for (int i = 0; i < vec.size(); i++) ; if ((vec.at(1)-vec.at(0)) == (vec.at(2)-vec.at(1)){ cout << "YES" << endl; } else if ((vec.at(1)-vec.at(0)) != (vec.at(2)-vec.at(1)){ cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:9:32: error: could not convert '{a, b, c}' from '<brace-enclosed initializer list>' to 'std::vector<int>' 9 | vector<int> vec = {a, b , c}; | ^ | | | <brace-enclosed initializer list> a.cc:14:53: error: expected ')' before '{' token 14 | if ((vec.at(1)-vec.at(0)) == (vec.at(2)-vec.at(1)){ | ~ ^ | ) a.cc:22:1: error: expected primary-expression before '}' token 22 | } | ^
s263997219
p03759
C++
#include <bits/stdc++.h> using namespace std; using ll=long long; int main(){ int a,b,c; cin>>a>>b>>c; if(b-c==c-a)cout<<"YES"<<endl; else cout<<"NO<<endl; }
a.cc:8:14: warning: missing terminating " character 8 | else cout<<"NO<<endl; | ^ a.cc:8:14: error: missing terminating " character 8 | else cout<<"NO<<endl; | ^~~~~~~~~~ a.cc: In function 'int main()': a.cc:9:1: error: expected primary-expression before '}' token 9 | } | ^
s640009694
p03759
C++
#include <bits/stdc++.h> #define rep(i, n) for(int i=0; i<(n); ++i) #define rep1(i,n) for(int i=1; i<=(n); ++i) #define repi(i,a,b) for(int i=a; i<=(b); ++i) #define rrep(i,n) for(int i=(n-1); i>=0; --i) #define ALL(obj) (obj).begin(), (obj).end() #define RALL(obj) (obj).rbegin(), (obj).rend() #define pb push_back #define mp make_pair #define to_s to_string #define sz(v) (int)v.size() #define UNIQUE(v) v.erase( unique(v.begin(), v.end()), v.end() ) #define pr(x) cout<<(x)<<'\n' #define debug(x) cout << #x << ": " << (x) << '\n' #define yes "YES" #define no "NO" using ll = long long; using namespace std; typedef pair<int,int> P; struct aaa{aaa(){ cin.tie(0); ios::sync_with_stdio(0); cout<<fixed<<setprecision(20);};}aaaaaaa; int MOD = 1e9 + 7; int gcd(int a,int b){return b?gcd(b,a%b):a;} int lcm(int a,int b){return (a*b)/gcd(a,b);} int dx[4]={1,0,-1,0}; int dy[4]={0,1,0,-1}; int a,b,c; int main(){ cin >> a >> b >> c; pr((b-a == c-a)?yes : no); } }
a.cc:33:1: error: expected declaration before '}' token 33 | } | ^
s210517307
p03759
C++
#include <bits/stdc++.h> #define ld long double #define ll long long int #define ull unsigned long long int #define vi vector<int> #define vl vector<ll> #define vvi vector< vector<int> > #define vvl vector< vector<ll> > #define repd(i, a, b) for (int i=(a);i<(b);i++) #define rep(i, n) repd(i,0,n) #define ALL(v) v.begin(), v.end() #define INF 1e9 using namespace std; /** * calculate GCD(greatest common divisor) * @param a * @param b * @return */ unsigned euclidean_gcd(unsigned a, unsigned b) { if (a < b) return euclidean_gcd(b, a); unsigned r; while ((r = a % b)) { a = b; b = r; } return b; } /** * change minimum * @tparam T * @param a * @param b * @return bool */ template<class T> inline bool changeMinimum(T &a, T b) { if (a > b) { a = b; return true; } return false; } /** * change maximum * @tparam T * @param a * @param b * @return bool */ template<class T> inline bool changeMaximum(T &a, T b) { if (a < b) { a = b; return true; } return false; } /** * output answer * @tparam T * @param answer * @return */ template<typename T> T output(T answer) { cout << answer << endl; return 0; } /** ----from here ---------------------------------------------------------- */ int main() { int a, b, c; cin >> a >> b >> c; bool ans = false; if(b-a == c-b){ans = true;} string a; if(ans){a="YES";}else{a="NO";}cout<<a<<endl; }
a.cc: In function 'int main()': a.cc:85:12: error: conflicting declaration 'std::string a' 85 | string a; | ^ a.cc:81:9: note: previous declaration as 'int a' 81 | int a, b, c; | ^ a.cc:86:15: error: invalid conversion from 'const char*' to 'int' [-fpermissive] 86 | if(ans){a="YES";}else{a="NO";}cout<<a<<endl; | ^~~~~ | | | const char* a.cc:86:29: error: invalid conversion from 'const char*' to 'int' [-fpermissive] 86 | if(ans){a="YES";}else{a="NO";}cout<<a<<endl; | ^~~~ | | | const char*
s466644827
p03759
C++
#include <iostream> #include <string> #include <cmath> #include <sstream> #include <iomanip> using namespace std; int main(int argc, char* argv[]) { int a,b,c; cin >> a >> b >> c; cout << ((b-a==c-b) "YES": "NO") << endl; return 0; }
a.cc: In function 'int main(int, char**)': a.cc:17:28: error: expected ')' before string constant 17 | cout << ((b-a==c-b) "YES": "NO") << endl; | ~ ^~~~~~ | )
s810922656
p03759
C++
#include <bits/stdc++.h> using namespace std; int main() { vector<int> vec = { a,b,c }; cin>>a,b,c>>endl; if(b-a =c-b) {cout<<"YES"<<endl;} else {cout<<"NO"<<endl;} }
a.cc: In function 'int main()': a.cc:5:23: error: 'a' was not declared in this scope 5 | vector<int> vec = { a,b,c }; | ^ a.cc:5:25: error: 'b' was not declared in this scope 5 | vector<int> vec = { a,b,c }; | ^ a.cc:5:27: error: 'c' was not declared in this scope 5 | vector<int> vec = { a,b,c }; | ^ a.cc:5:29: error: could not convert '{<expression error>, <expression error>, <expression error>}' from '<brace-enclosed initializer list>' to 'std::vector<int>' 5 | vector<int> vec = { a,b,c }; | ^ | | | <brace-enclosed initializer list>
s059674215
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:14: error: unable to find string literal operator 'operator""endl' with 'const char [3]', 'long unsigned int' arguments 7 | else cout<<"NO"endl; | ^~~~~~~~
s917582210
p03759
C++
a
a.cc:1:1: error: 'a' does not name a type 1 | a | ^
s235053100
p03759
C++
#include <iostream> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; if(b - a == c - d) cout << "YES"; else cout << "NO"; }
a.cc: In function 'int main()': a.cc:8:19: error: 'd' was not declared in this scope 8 | if(b - a == c - d) cout << "YES"; | ^
s933395720
p03759
C++
#include <iostream> #include <vector> #include <string> #include <cstdlib> #include <algorithm> #include <cstdio> #include <cstring> #include <stack> #include <math.h> #include <map> #define Z class #define ln cout<<'\n' #define ll long long #define rep(i, n) for(int i = 0; i < (n); ++i) //ASCII a=97, A=65 // int H[N]; rep(i,N) scanf("%d", &H[i]); // int max_x = *std::max_element(x.begin(), x.end()); // int min_y = *std::min_element(y.begin(), y.end()); using namespace std; template<class T> inline bool chmax(T& a, T b){ if(a < b) { a=b; return 1; }return 0;} template<class T> inline bool chmin(T& a, T b){ if(a > b) { a=b; return 1; }return 0;} template<Z A>void pr(A a){cout<<a;ln;} template<Z A,Z B>void pr(A a,B b){cout<<a<<' ';pr(b);} template<Z A,Z B,Z C>void pr(A a,B b,C c){cout<<a<<' ';pr(b,c);} template<Z A,Z B,Z C,Z D>void pr(A a,B b,C c,D d){cout<<a<<' ';pr(b,c,d);} template<Z A>void PR(A a,ll n){rep(i,n){if(i)cout<<' ';cout<<a[i];}ln;} int GCD(int a, int b) { return b ? GCD(b, a%b) : a; } const long long INF = 1LL << 60; int main(){ int A,B,C; cin > A >> B >> C; if(B-A==C-B) pr("YES"); else pr("NO"); }
a.cc: In function 'int main()': a.cc:32:20: error: no match for 'operator>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 32 | int A,B,C; cin > A >> B >> C; | ~~~ ^ ~~~~~~~~~~~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:32:20: note: candidate: 'operator>(int, int)' (built-in) 32 | int A,B,C; cin > A >> B >> C; | ~~~~^~~~~~~~~~~~~ a.cc:32:20: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'int' In file included from /usr/include/c++/14/string:48, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stl_iterator.h:462:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 462 | operator>(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:462:5: note: template argument deduction/substitution failed: a.cc:32:32: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 32 | int A,B,C; cin > A >> B >> C; | ^ /usr/include/c++/14/bits/stl_iterator.h:507:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 507 | operator>(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:507:5: note: template argument deduction/substitution failed: a.cc:32:32: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 32 | int A,B,C; cin > A >> B >> C; | ^ /usr/include/c++/14/bits/stl_iterator.h:1714:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1714 | operator>(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1714:5: note: template argument deduction/substitution failed: a.cc:32:32: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 32 | int A,B,C; cin > A >> B >> C; | ^ /usr/include/c++/14/bits/stl_iterator.h:1774:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1774 | operator>(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1774:5: note: template argument deduction/substitution failed: a.cc:32:32: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 32 | int A,B,C; cin > A >> B >> C; | ^ 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:1058:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator>(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1058 | operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1058:5: note: template argument deduction/substitution failed: a.cc:32:32: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::pair<_T1, _T2>' 32 | int A,B,C; cin > A >> B >> C; | ^ 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:695:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 695 | operator> (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:695:5: note: template argument deduction/substitution failed: a.cc:32:32: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 32 | int A,B,C; cin > A >> B >> C; | ^ /usr/include/c++/14/string_view:702: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> >)' 702 | operator> (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:702:5: note: template argument deduction/substitution failed: a.cc:32:32: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 32 | int A,B,C; cin > A >> B >> C; | ^ /usr/include/c++/14/string_view:710: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>)' 710 | operator> (__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:710:5: note: template argument deduction/substitution failed: a.cc:32:32: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int' 32 | int A,B,C; cin > A >> B >> C; | ^ /usr/include/c++/14/bits/basic_string.h:3915: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>&)' 3915 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3915:5: note: template argument deduction/substitution failed: a.cc:32:32: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 32 | int A,B,C; cin > A >> B >> C; | ^ /usr/include/c++/14/bits/basic_string.h:3929:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3929 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3929:5: note: template argument deduction/substitution failed: a.cc:32:32: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 32 | int A,B,C; cin > A >> B >> C; | ^ /usr/include/c++/14/bits/basic_string.h:3942:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3942 | operator>(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3942:5: note: template argument deduction/substitution failed: a.cc:32:32: note: mismatched types 'const _CharT*' and 'std::basic_istream<char>' 32 | int A,B,C; cin > A >> B >> C; | ^ 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:2619:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator>(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)' 2619 | operator>(const tuple<_TElements...>& __t, | ^~~~~~~~ /usr/include/c++/14/tuple:2619:5: note: template argument deduction/substitution failed: a.cc:32:32: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::tuple<_UTypes ...>' 32 | int A,B,C; cin > A >> B >> C; | ^ In file included from /usr/include/c++/14/vector:66, from a.cc:2: /usr/include/c++/14/bits/stl_vector.h:2102:5: note: candidate: 'template<class _Tp, class _Alloc> bool std::operator>(const vector<_Tp, _Alloc>&, const vector<_Tp, _Alloc>&)' 2102 | operator>(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_vector.h:2102:5: note: template argument deduction/substitution failed: a.cc:32:32: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::vector<_Tp, _Alloc>' 32 | int A,B,C; cin > A >> B >> C; | ^ In file included from /usr/include/c++/14/deque:66, from /usr/include/c++/14/stack:62, from a.cc:8: /usr/include/c++/14/bits/stl_deque.h:2349:5: note: candidate: 'template<class _Tp, class _Alloc> bool std::operator>(const deque<_Tp, _Alloc>&, const deque<_Tp, _Alloc>&)' 2349 | operator>(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_deque.h:2349:5: note: template argument deduction/substitution failed: a.cc:32:32: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::deque<_Tp, _Alloc>' 32 | int A,B,C; cin > A >> B >> C; | ^ In file included from /usr/include/c++/14/stack:63: /usr/include/c++/14/bits/stl_stack.h:387:5: note: candidate: 'template<class _Tp, class _Seq> bool std::operator>(const stack<_Tp, _Seq>&, const stack<_Tp, _Seq>&)' 387 | operator>(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y) | ^~
s045922813
p03759
C++
#include <iostream> #include <vector> #include <string> #include <cstdlib> #include <algorithm> #include <cstdio> #include <cstring> #include <stack> #include <math.h> #include <map> #define Z class #define ln cout<<'\n' #define ll long long#include <iostream> #include <vector> #include <string> #include <cstdlib> #include <algorithm> #include <cstdio> #include <cstring> #include <stack> #include <math.h> #include <map> #define Z class #define ln cout<<'\n' #define ll long long #define rep(i, n) for(int i = 0; i < (n); ++i) //ASCII a=97, A=65 // int H[N]; rep(i,N) scanf("%d", &H[i]); // int max_x = *std::max_element(x.begin(), x.end()); // int min_y = *std::min_element(y.begin(), y.end()); using namespace std; template<class T> inline bool chmax(T& a, T b){ if(a < b) { a=b; return 1; }return 0;} template<class T> inline bool chmin(T& a, T b){ if(a > b) { a=b; return 1; }return 0;} template<Z A>void pr(A a){cout<<a;ln;} template<Z A,Z B>void pr(A a,B b){cout<<a<<' ';pr(b);} template<Z A,Z B,Z C>void pr(A a,B b,C c){cout<<a<<' ';pr(b,c);} template<Z A,Z B,Z C,Z D>void pr(A a,B b,C c,D d){cout<<a<<' ';pr(b,c,d);} template<Z A>void PR(A a,ll n){rep(i,n){if(i)cout<<' ';cout<<a[i];}ln;} int GCD(int a, int b) { return b ? GCD(b, a%b) : a; } const long long INF = 1LL << 60; int main(){ int A,B,C; cin > A >> B >> C; if(B-A==C-B) pr("YES"); else pr("NO"); } #define rep(i, n) for(int i = 0; i < (n); ++i) //ASCII a=97, A=65 // int H[N]; rep(i,N) scanf("%d", &H[i]); // int max_x = *std::max_element(x.begin(), x.end()); // int min_y = *std::min_element(y.begin(), y.end()); using namespace std; template<class T> inline bool chmax(T& a, T b){ if(a < b) { a=b; return 1; }return 0;} template<class T> inline bool chmin(T& a, T b){ if(a > b) { a=b; return 1; }return 0;} template<Z A>void pr(A a){cout<<a;ln;} template<Z A,Z B>void pr(A a,B b){cout<<a<<' ';pr(b);} template<Z A,Z B,Z C>void pr(A a,B b,C c){cout<<a<<' ';pr(b,c);} template<Z A,Z B,Z C,Z D>void pr(A a,B b,C c,D d){cout<<a<<' ';pr(b,c,d);} template<Z A>void PR(A a,ll n){rep(i,n){if(i)cout<<' ';cout<<a[i];}ln;} int GCD(int a, int b) { return b ? GCD(b, a%b) : a; } const long long INF = 1LL << 60; int main(){ int A,B,C; cin >. A >> B >> C; if(B-A==C-B) pr("YES"); else pr("NO"); }
a.cc:25:9: warning: "ll" redefined 25 | #define ll long long | ^~ a.cc:13:9: note: this is the location of the previous definition 13 | #define ll long long#include <iostream> | ^~ a.cc: In function 'int main()': a.cc:44:20: error: no match for 'operator>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 44 | int A,B,C; cin > A >> B >> C; | ~~~ ^ ~~~~~~~~~~~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:44:20: note: candidate: 'operator>(int, int)' (built-in) 44 | int A,B,C; cin > A >> B >> C; | ~~~~^~~~~~~~~~~~~ a.cc:44:20: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'int' In file included from /usr/include/c++/14/string:48, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stl_iterator.h:462:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 462 | operator>(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:462:5: note: template argument deduction/substitution failed: a.cc:44:32: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 44 | int A,B,C; cin > A >> B >> C; | ^ /usr/include/c++/14/bits/stl_iterator.h:507:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 507 | operator>(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:507:5: note: template argument deduction/substitution failed: a.cc:44:32: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 44 | int A,B,C; cin > A >> B >> C; | ^ /usr/include/c++/14/bits/stl_iterator.h:1714:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1714 | operator>(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1714:5: note: template argument deduction/substitution failed: a.cc:44:32: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 44 | int A,B,C; cin > A >> B >> C; | ^ /usr/include/c++/14/bits/stl_iterator.h:1774:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1774 | operator>(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1774:5: note: template argument deduction/substitution failed: a.cc:44:32: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 44 | int A,B,C; cin > A >> B >> C; | ^ 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:1058:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator>(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1058 | operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1058:5: note: template argument deduction/substitution failed: a.cc:44:32: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::pair<_T1, _T2>' 44 | int A,B,C; cin > A >> B >> C; | ^ 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:695:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 695 | operator> (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:695:5: note: template argument deduction/substitution failed: a.cc:44:32: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 44 | int A,B,C; cin > A >> B >> C; | ^ /usr/include/c++/14/string_view:702: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> >)' 702 | operator> (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:702:5: note: template argument deduction/substitution failed: a.cc:44:32: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 44 | int A,B,C; cin > A >> B >> C; | ^ /usr/include/c++/14/string_view:710: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>)' 710 | operator> (__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:710:5: note: template argument deduction/substitution failed: a.cc:44:32: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int' 44 | int A,B,C; cin > A >> B >> C; | ^ /usr/include/c++/14/bits/basic_string.h:3915: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>&)' 3915 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3915:5: note: template argument deduction/substitution failed: a.cc:44:32: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 44 | int A,B,C; cin > A >> B >> C; | ^ /usr/include/c++/14/bits/basic_string.h:3929:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3929 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3929:5: note: template argument deduction/substitution failed: a.cc:44:32: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 44 | int A,B,C; cin > A >> B >> C; | ^ /usr/include/c++/14/bits/basic_string.h:3942:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3942 | operator>(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3942:5: note: template argument deduction/substitution failed: a.cc:44:32: note: mismatched types 'const _CharT*' and 'std::basic_istream<char>' 44 | int A,B,C; cin > A >> B >> C; | ^ 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:2619:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator>(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)' 2619 | operator>(const tuple<_TElements...>& __t, | ^~~~~~~~ /usr/include/c++/14/tuple:2619:5: note: template argument deduction/substitution failed: a.cc:44:32: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::tuple<_UTypes ...>' 44 | int A,B,C; cin > A >> B >> C; | ^ In file included from /usr/include/c++/14/vector:66, from a.cc:2: /usr/include/c++/14/bits/stl_vector.h:2102:5: note: candidate: 'template<class _Tp, class _Alloc> bool std::operator>(const vector<_Tp, _Alloc>&, const vector<_Tp, _Alloc>&)' 2102 | operator>(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_vector.h:2102:5: note: template argument deduction/substitution failed: a.cc:44:32: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::vector<_Tp, _Alloc>' 44 | int A,B,C; cin > A >> B >> C; | ^ In file included from /usr/include/c++/14/deque:66, from /usr/include/c++/14/stack:62, from a.cc:8: /usr/include/c++/14/bits/stl_deque.h:2349:5: note: candidate: 'template<class _Tp, class _Alloc> bool std::operator>(const deque<_Tp, _Alloc>&, const deque<_Tp, _Alloc>&)' 2349 | operator>(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_deque.h:2349:5: note: template argument deduction/substitution failed: a.cc:44:32: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::deque<_Tp, _Alloc>' 44 | int A,B,C; cin > A >> B >> C; | ^ In file included from /usr/include/c++/14/stack:63: /usr/include/c++/14/bits/stl_stack.h:387:5:
s170390975
p03759
C++
#include <iostream> #include <vector> #include <string> #include <cstdlib> #include <algorithm> #include <cstdio> #include <cstring> #include <stack> #include <math.h> #include <map> #define Z class #define ln cout<<'\n' #define ll long long #define rep(i, n) for(int i = 0; i < (n); ++i) //ASCII a=97, A=65 // int H[N]; rep(i,N) scanf("%d", &H[i]); // int max_x = *std::max_element(x.begin(), x.end()); // int min_y = *std::min_element(y.begin(), y.end()); using namespace std; template<class T> inline bool chmax(T& a, T b){ if(a < b) { a=b; return 1; }return 0;} template<class T> inline bool chmin(T& a, T b){ if(a > b) { a=b; return 1; }return 0;} template<Z A>void pr(A a){cout<<a;ln;} template<Z A,Z B>void pr(A a,B b){cout<<a<<' ';pr(b);} template<Z A,Z B,Z C>void pr(A a,B b,C c){cout<<a<<' ';pr(b,c);} template<Z A,Z B,Z C,Z D>void pr(A a,B b,C c,D d){cout<<a<<' ';pr(b,c,d);} template<Z A>void PR(A a,ll n){rep(i,n){if(i)cout<<' ';cout<<a[i];}ln;} int GCD(int a, int b) { return b ? GCD(b, a%b) : a; } const long long INF = 1LL << 60; int main(){ int A,B,C; cin >. A >> B >> C; if(B-A==C-B) pr("YES"); else pr("NO"); }
a.cc: In function 'int main()': a.cc:32:21: error: expected primary-expression before '.' token 32 | int A,B,C; cin >. A >> B >> C; | ^
s536102884
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; } if((b-a)!=(c-b)){ cout<<"NO"<<endl; } }
a.cc: In function 'int main()': a.cc:8:5: error: expected primary-expression before 'if' 8 | if((b-a)==(c-b)){ | ^~
s121953592
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"<<entl; } if((b-a)!=(c-b)){ cout<<"NO"<<entl; } }
a.cc: In function 'int main()': a.cc:8:5: error: expected primary-expression before 'if' 8 | if((b-a)==(c-b)){ | ^~ a.cc:13:19: error: 'entl' was not declared in this scope 13 | cout<<"NO"<<entl; | ^~~~
s490541723
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:5:17: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 5 | int a,b,c; cin<<a<<b<<c; | ~~~^~~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:5:17: note: candidate: 'operator<<(int, int)' (built-in) 5 | int a,b,c; cin<<a<<b<<c; | ~~~^~~ a.cc:5:17: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<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:1715:5: note: candidate: 'template<class _Ch_type, class _Ch_traits, class _Bi_iter> std::basic_ostream<_CharT, _Traits>& std::__cxx11::operator<<(std::basic_ostream<_CharT, _Traits>&, const sub_match<_Bi_iter>&)' 1715 | operator<<(basic_ostream<_Ch_type, _Ch_traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1715:5: note: template argument deduction/substitution failed: a.cc:5:19: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | int a,b,c; cin<<a<<b<<c; | ^ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41: /usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)' 125 | operator<<(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed: a.cc:5:14: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte' 5 | int a,b,c; cin<<a<<b<<c; | ^~~ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)' 763 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed: a.cc:5:19: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | int a,b,c; cin<<a<<b<<c; | ^ /usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 4077 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed: a.cc:5:19: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | int a,b,c; cin<<a<<b<<c; | ^ /usr/include/c++/14/bitset:1687:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const bitset<_Nb>&)' 1687 | operator<<(std::basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bitset:1687:5: note: template argument deduction/substitution failed: a.cc:5:19: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | int a,b,c; cin<<a<<b<<c; | ^ In file included from /usr/include/c++/14/bits/ios_base.h:46, from /usr/include/c++/14/streambuf:43, from /usr/include/c++/14/bits/streambuf_iterator.h:35, from /usr/include/c++/14/iterator:66, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54: /usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)' 339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e) | ^~~~~~~~ /usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed: a.cc:5:19: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | int a,b,c; cin<<a<<b<<c; | ^ In file included from /usr/include/c++/14/memory:80, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:56: /usr/include/c++/14/bits/shared_ptr.h:70:5: note: candidate: 'template<class _Ch, class _Tr, class _Tp, __gnu_cxx::_Lock_policy _Lp> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __shared_ptr<_Tp, _Lp>&)' 70 | operator<<(std::basic_ostream<_Ch, _Tr>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/shared_ptr.h:70:5: note: template argument deduction/substitution failed: a.cc:5:19: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | int a,b,c; cin<<a<<b<<c; | ^ 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:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)' 563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) | ^~~~~~~~ /usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed: a.cc:5:19: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | int a,b,c; cin<<a<<b<<c; | ^ /usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)' 573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed: a.cc:5:19: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | int a,b,c; cin<<a<<b<<c; | ^ /usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)' 579 | operator<<(basic_ostream<char, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed: a.cc:5:19: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 5 | int a,b,c; cin<<a<<b<<c; | ^ /usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)' 590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed: a.cc:5:19: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 5 | int a,b,c; cin<<a<<b<<c; | ^ /usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)' 595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed: a.cc:5:19: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 5 | int a,b,c; cin<<a<<b<<c; | ^ /usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)' 654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed: a.cc:5:19: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | int a,b,c; cin<<a<<b<<c; | ^ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)' 307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed: a.cc:5:19: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | int a,b,c; cin<<a<<b<<c; | ^ /usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)' 671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/o
s274623467
p03759
C++
nclude<bits/stdc++.h> using namespace std; using ll = long long; const ll amari = 1e9+7; #define ben(a) a.begin(),a.end() #define pb(a,b) a.push_back(b) 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: 'nclude' does not name a type 1 | nclude<bits/stdc++.h> | ^~~~~~ a.cc: In function 'int main()': a.cc:11:9: error: 'cin' was not declared in this scope 11 | cin >> a >> b >> c; | ^~~ a.cc:12:27: error: 'cout' was not declared in this scope 12 | if(b - a == c - b)cout << "Yes" << endl; | ^~~~ a.cc:12:44: error: 'endl' was not declared in this scope 12 | if(b - a == c - b)cout << "Yes" << endl; | ^~~~ a.cc:13:14: error: 'cout' was not declared in this scope 13 | else cout << "No" << endl; | ^~~~ a.cc:13:30: error: 'endl' was not declared in this scope 13 | else cout << "No" << endl; | ^~~~
s462498773
p03759
C++
#include <iostream> #include <string> #include <algorithm> #include <vector> using namespace std; int main() { int a,b,c; cin >> a >> b >> c; if (b - a == c - b) { puts("YES"); } else { puts("NO") } return 0; }
a.cc: In function 'int main()': a.cc:18:27: error: expected ';' before '}' token 18 | puts("NO") | ^ | ; 19 | } | ~
s545764136
p03759
C++
#include <cstdio> using namespace std; int main() { int a,b,c; scanf("%d %d %d", &a, &b ,&c); if(b−a==c−b){ printf("YES"); } else { printf("NO"); } }
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){ | ^~~
s786856398
p03759
C++
#include <cstdio> using namespace std; int main() { int a,b,c; scanf("%d %d %d", &a, &b ,%c); if(b−a==c−b){ printf("YES"); } else { printf("NO"); } }
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:8:35: error: expected primary-expression before '%' token 8 | scanf("%d %d %d", &a, &b ,%c); | ^ 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){ | ^~~
s741270520
p03759
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b,c; cin>>a>>b>>c if(a-2*b+c==0){ cout<<"YES"; } else{ cout<<"NO"; } }
a.cc: In function 'int main()': a.cc:6:15: error: expected ';' before 'if' 6 | cin>>a>>b>>c | ^ | ; 7 | if(a-2*b+c==0){ | ~~ a.cc:10:9: error: 'else' without a previous 'if' 10 | else{ | ^~~~
s538296230
p03759
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b,c; cin<<a<<b<<c if(a-2*b+c==0){ cout<<"YES"; } else{ cout<<"NO"; } }
a.cc: In function 'int main()': a.cc:6:6: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 6 | cin<<a<<b<<c | ~~~^~~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:6:6: note: candidate: 'operator<<(int, int)' (built-in) 6 | cin<<a<<b<<c | ~~~^~~ a.cc:6:6: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<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:1715:5: note: candidate: 'template<class _Ch_type, class _Ch_traits, class _Bi_iter> std::basic_ostream<_CharT, _Traits>& std::__cxx11::operator<<(std::basic_ostream<_CharT, _Traits>&, const sub_match<_Bi_iter>&)' 1715 | operator<<(basic_ostream<_Ch_type, _Ch_traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1715:5: note: template argument deduction/substitution failed: a.cc:6:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin<<a<<b<<c | ^ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41: /usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)' 125 | operator<<(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed: a.cc:6:3: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte' 6 | cin<<a<<b<<c | ^~~ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)' 763 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed: a.cc:6:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin<<a<<b<<c | ^ /usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 4077 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed: a.cc:6:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin<<a<<b<<c | ^ /usr/include/c++/14/bitset:1687:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const bitset<_Nb>&)' 1687 | operator<<(std::basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bitset:1687:5: note: template argument deduction/substitution failed: a.cc:6:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin<<a<<b<<c | ^ In file included from /usr/include/c++/14/bits/ios_base.h:46, from /usr/include/c++/14/streambuf:43, from /usr/include/c++/14/bits/streambuf_iterator.h:35, from /usr/include/c++/14/iterator:66, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54: /usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)' 339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e) | ^~~~~~~~ /usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed: a.cc:6:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin<<a<<b<<c | ^ In file included from /usr/include/c++/14/memory:80, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:56: /usr/include/c++/14/bits/shared_ptr.h:70:5: note: candidate: 'template<class _Ch, class _Tr, class _Tp, __gnu_cxx::_Lock_policy _Lp> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __shared_ptr<_Tp, _Lp>&)' 70 | operator<<(std::basic_ostream<_Ch, _Tr>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/shared_ptr.h:70:5: note: template argument deduction/substitution failed: a.cc:6:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin<<a<<b<<c | ^ 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:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)' 563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) | ^~~~~~~~ /usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed: a.cc:6:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin<<a<<b<<c | ^ /usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)' 573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed: a.cc:6:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin<<a<<b<<c | ^ /usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)' 579 | operator<<(basic_ostream<char, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed: a.cc:6:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 6 | cin<<a<<b<<c | ^ /usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)' 590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed: a.cc:6:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 6 | cin<<a<<b<<c | ^ /usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)' 595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed: a.cc:6:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 6 | cin<<a<<b<<c | ^ /usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)' 654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed: a.cc:6:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin<<a<<b<<c | ^ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)' 307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed: a.cc:6:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin<<a<<b<<c | ^ /usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)' 671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:671:5: note: template argument deduction/substitution failed: a.cc:6:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 6 | cin<<a<<b<<c | ^ /usr/include/c++/14/ostream:684:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const signed char*)' 684
s110834103
p03759
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b,c; if(a-2*b+c==0){ cout<<"YES" } else{ cout<<"NO" } }
a.cc: In function 'int main()': a.cc:7:18: error: expected ';' before '}' token 7 | cout<<"YES" | ^ | ; 8 | } | ~ a.cc:10:17: error: expected ';' before '}' token 10 | cout<<"NO" | ^ | ; 11 | } | ~
s413657047
p03759
C++
#include<bits/stdc++.h> using namesspace std; int main(void){ int a,b,c; cin>>a>>b>>c; if(b-a==c-a) cout<<"YES"<<endl; else cout<<"NO"<<endl; return 0; }
a.cc:2:7: error: expected nested-name-specifier before 'namesspace' 2 | using namesspace 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:8:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 8 | 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:8:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 8 | 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:10:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 10 | 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:10:21: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 10 | cout<<"NO"<<endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s475512927
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:7:1: error: extended character − is not valid in an identifier 7 | b−a==c−b)cout<<"YES"<<endl;else cout<<"NO"<<endl;} | ^ a.cc:7:6: error: extended character − is not valid in an identifier 7 | b−a==c−b)cout<<"YES"<<endl;else cout<<"NO"<<endl;} | ^ a.cc: In function 'int main()': a.cc:7:1: error: 'b\U00002212a' was not declared in this scope 7 | b−a==c−b)cout<<"YES"<<endl;else cout<<"NO"<<endl;} | ^~~ a.cc:7:6: error: 'c\U00002212b' was not declared in this scope 7 | b−a==c−b)cout<<"YES"<<endl;else cout<<"NO"<<endl;} | ^~~
s444933544
p03759
C++
#include<bits/stdc++.h> using namespace std; int main() { int a , b , c; cin >> a >> b >> c; if(a - b == b - c) cout << "YES"; else cout << "NO"; cou << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:5: error: 'cou' was not declared in this scope; did you mean 'cos'? 9 | cou << endl; | ^~~ | cos
s526896606
p03759
C
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <time.h> int main(void){ int a,b,c; scanf("%d%d%d",&a,&b,&c); printf("%s", b - a == c - b ? "YES" : "NO"); return 0;
main.c: In function 'main': main.c:11:3: error: expected declaration or statement at end of input 11 | return 0; | ^~~~~~
s636772595
p03759
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; if(a+c=2*b){ cout<<"YES"<<endl; } else{ cout<<"NO"<<endl; } }
a.cc: In function 'int main()': a.cc:7:7: error: lvalue required as left operand of assignment 7 | if(a+c=2*b){ | ~^~
s651307498
p03759
C++
#include<iostream> #include<cmath> #include<vector> #include<set> #include<algorithm> #include<tuple> #include<utility> #include<cctype> #include<climits> #include<map> #include<queue> #include<functional> using namespace std; template<class T> void chmax(T& a, T b) {if(a < b){a=b;}} template<class T> void chmin(T& a, T b) {if(a > b){a=b;}} #define REP(i,a,n) for(int i=a;i<n;++i) #define RUP(a,b) ((a+b-1)/(b)) #define ENT "\n" #define REV(v) reverse(v.begin(),v.end()) #define SRTV(v) sort(v.begin(),v.end()) #define SRTAG(a,n) sort(a,a+n,greater<>()) #define MOD 1000000007 typedef long long ll; typedef tuple<int,int,bool> Tb; int gcd(int a,int b){ int r; if(a<b) swap(a,b); r = a % b; while(r!=0){ a = b; b = r; r = a % b; } return b; } int atcoder(){ //入力 string a,b,c; cin >> a >> b >> c; //処理 //出力 if(b-a==c-b) cout << "YES" << ENT; else cout << "NO" << ENT; return 0; } int main() { cin.tie(0); ios::sync_with_stdio(false); atcoder(); return 0; }
a.cc: In function 'int atcoder()': a.cc:48:9: error: no match for 'operator-' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 48 | if(b-a==c-b) cout << "YES" << ENT; | ~^~ | | | | | basic_string<[...]> | basic_string<[...]> In file included from /usr/include/c++/14/string:48, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stl_iterator.h:618:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 618 | operator-(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:618:5: note: template argument deduction/substitution failed: a.cc:48:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 48 | if(b-a==c-b) cout << "YES" << ENT; | ^ /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:48:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 48 | if(b-a==c-b) cout << "YES" << ENT; | ^ a.cc:48:14: error: no match for 'operator-' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 48 | if(b-a==c-b) cout << "YES" << ENT; | ~^~ | | | | | basic_string<[...]> | basic_string<[...]> /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:48:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 48 | if(b-a==c-b) cout << "YES" << ENT; | ^ /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:48:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 48 | if(b-a==c-b) cout << "YES" << ENT; | ^
s289831126
p03759
C
#include<stdio.h> int main(void){ int a,b,c; scanf("%d %d %d",&a,&b,&c); if((b−a)==(c−b)) printf("YES\n"); else printf("NO\n"); return 0; }
main.c: In function 'main': main.c:5:8: error: stray '\342' in program 5 | if((b<U+2212>a)==(c<U+2212>b)) printf("YES\n"); | ^~~~~~~~ main.c:5:8: error: expected ')' before 'a' 5 | if((b−a)==(c−b)) printf("YES\n"); | ~ ^~ | ) main.c:5:15: error: stray '\342' in program 5 | if((b<U+2212>a)==(c<U+2212>b)) printf("YES\n"); | ^~~~~~~~ main.c:5:15: error: expected ')' before 'b' 5 | if((b−a)==(c−b)) printf("YES\n"); | ~ ^~ | )
s026895785
p03759
C
#include<stdio.h> int main(void){ int a,b,c; scanf("%d%d%d",&a,&b,&c); if(b−a==c−b) printf("YES\n"); else printf("NO\n"); return 0; }
main.c: In function 'main': main.c:5:7: error: stray '\342' in program 5 | if(b<U+2212>a==c<U+2212>b) printf("YES\n"); | ^~~~~~~~ main.c:5:7: error: expected ')' before 'a' 5 | if(b−a==c−b) printf("YES\n"); | ~ ^~ | ) main.c:5:12: error: stray '\342' in program 5 | if(b<U+2212>a==c<U+2212>b) printf("YES\n"); | ^~~~~~~~
s129460380
p03759
C++
#include <iostream> #include <climits> #include <set> #include <string> #include <algorithm> #include <vector> #define MAX 1000000007 using namespace std; #define ll long long #define dbg if(0) #define ISRANGE(val,lo,hi) ((lo<=val)&&(val<hi)) int main(){ ll ans,a,b,c; cin >>a>>b>>c; { if(b−a==c−b)cout <<"YES"<<endl; else cout <<"NO"<<endl; } dbg cout <<ans<<endl; return 0; }
a.cc:23:12: error: extended character − is not valid in an identifier 23 | if(b−a==c−b)cout <<"YES"<<endl; | ^ a.cc:23:17: error: extended character − is not valid in an identifier 23 | if(b−a==c−b)cout <<"YES"<<endl; | ^ a.cc: In function 'int main()': a.cc:23:12: error: 'b\U00002212a' was not declared in this scope 23 | if(b−a==c−b)cout <<"YES"<<endl; | ^~~ a.cc:23:17: error: 'c\U00002212b' was not declared in this scope 23 | if(b−a==c−b)cout <<"YES"<<endl; | ^~~
s300924657
p03759
C++
#include <iostream> #include <climits> #include <set> #include <string> #include <algorithm> #include <vector> #define MAX 1000000007 using namespace std; #define ll long long #define dbg if(0) #define ISRANGE(val,lo,hi) ((lo<=val)&&(val<hi)) int main(){ ll ans,a,b,c; cin >>a>>b>>c; { if(b−a=c−b)cout <<"YES"<<endl; else cout <<"NO"<<endl; } dbg cout <<ans<<endl; return 0; }
a.cc:23:12: error: extended character − is not valid in an identifier 23 | if(b−a=c−b)cout <<"YES"<<endl; | ^ a.cc:23:16: error: extended character − is not valid in an identifier 23 | if(b−a=c−b)cout <<"YES"<<endl; | ^ a.cc: In function 'int main()': a.cc:23:12: error: 'b\U00002212a' was not declared in this scope 23 | if(b−a=c−b)cout <<"YES"<<endl; | ^~~ a.cc:23:16: error: 'c\U00002212b' was not declared in this scope 23 | if(b−a=c−b)cout <<"YES"<<endl; | ^~~
s532786159
p03759
C++
#include <iostream> #include<string> #include<cmath> #include<algorithm> #include<cctype> #include<queue> #include<stack> #include<stdio.h> #include<vector> #include<set> #include<map> #include<iomanip> #define rep(i,n) for(int i=0;i<n;i++) typedef int long long ll; using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; if(b-a==0&&c-b==0){puts("YES");}else{puts("NO")} return 0; }
a.cc: In function 'int main()': a.cc:21:52: error: expected ';' before '}' token 21 | if(b-a==0&&c-b==0){puts("YES");}else{puts("NO")} | ^ | ;
s936776284
p03759
C++
// abc059.a #include <iostream> #include <sstream> #include <fstream> #include <string> #include <vector> #include <deque> #include <queue> #include <stack> #include <set> #include <map> #include <algorithm> #include <functional> #include <utility> #include <bitset> #include <cmath> #include <cstdlib> #include <ctime> #include <cstdio> using namespace std; #define REP(i, n) for (int i = 0; i < n; i++) int main() { ios::sync_with_stdio(false); cin.tie(0); 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:31:15: error: lvalue required as left operand of assignment 31 | if (b - a = c - b) { | ~~^~~
s855914566
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";clse cout<<"NO";}
a.cc: In function 'int main()': a.cc:3:59: error: 'clse' was not declared in this scope; did you mean 'close'? 3 | int main(){int a,b,c;cin>>a>>b>>c;if(b-a==c-b)cout<<"YES";clse cout<<"NO";} | ^~~~ | close
s851333477
p03759
C++
#include <iostream> #include <string> int main{ int a,b,c; std::cin>>a>>b>>c; string ans="NO"; if (a-b==b-c) ans="YES"; std::cout<<ans<<std::endl; }
a.cc:3:5: error: cannot declare '::main' to be a global variable 3 | int main{ | ^~~~ a.cc:4:1: error: expected primary-expression before 'int' 4 | int a,b,c; | ^~~ a.cc:4:1: error: expected '}' before 'int' a.cc:3:9: note: to match this '{' 3 | int main{ | ^ a.cc:5:6: error: 'cin' in namespace 'std' does not name a type 5 | std::cin>>a>>b>>c; | ^~~ 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:6:1: error: 'string' does not name a type; did you mean 'stdin'? 6 | string ans="NO"; | ^~~~~~ | stdin a.cc:7:1: error: expected unqualified-id before 'if' 7 | if (a-b==b-c) ans="YES"; | ^~ a.cc:8:6: error: 'cout' in namespace 'std' does not name a type 8 | std::cout<<ans<<std::endl; | ^~~~ /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:9:1: error: expected declaration before '}' token 9 | } | ^
s107796104
p03759
C++
#include <iostream> int a,b,c; std::cin>>a>>b>>c; string ans="NO"; if (a-b==b-c) ans="YES"; std::cout<<ans<<std::endl;
a.cc:3:6: error: 'cin' in namespace 'std' does not name a type 3 | std::cin>>a>>b>>c; | ^~~ 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:4:1: error: 'string' does not name a type; did you mean 'stdin'? 4 | string ans="NO"; | ^~~~~~ | stdin a.cc:5:1: error: expected unqualified-id before 'if' 5 | if (a-b==b-c) ans="YES"; | ^~ a.cc:6:6: error: 'cout' in namespace 'std' does not name a type 6 | std::cout<<ans<<std::endl; | ^~~~ /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~
s157056554
p03759
C++
#include<iostream> #include<string> #include<vector> #include<iomanip> #include<algorithm> #include<queue> #include<stack> #include<map> using namespace std; #define ll long long int main(){ int a,b,c; cin >> a >> b >> c; if(b-a == c-a){ cout <<"YES"; }else{ cout << "NO" } return 0; }
a.cc: In function 'int main()': a.cc:17:19: error: expected ';' before '}' token 17 | cout << "NO" | ^ | ; 18 | } | ~
s664616601
p03759
C++
#include <iostrem> 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:1:10: fatal error: iostrem: No such file or directory 1 | #include <iostrem> | ^~~~~~~~~ compilation terminated.
s548817191
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: In function 'int main()': a.cc:7:9: error: lvalue required as left operand of assignment 7 | if(b-a=c-b) cout<<"Yes"; | ~^~
s033989931
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:10:7: error: expected '}' before 'else' 10 | { else { | ~ ^~~~ a.cc:10:7: error: expected '}' before 'else' a.cc:8:18: note: to match this '{' 8 | if(b-a == c-b) { | ^
s082287905
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:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | 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:6:23: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 6 | 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:6:40: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 6 | if (b - a == c - b) 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:7:8: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 7 | 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:7:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 7 | 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) | ^~~~
s764070071
p03759
C++
include <bits/stdc++.h> using namespace std; int a, b, c; int main() { cin >> a >> b >> c; if (a - b == b - c) { cout << "YES"; } else { cout << "NO"; } cout<<endl; }
a.cc:1:1: error: 'include' does not name a type 1 | include <bits/stdc++.h> | ^~~~~~~ a.cc: In function 'int main()': a.cc:5:5: error: 'cin' was not declared in this scope 5 | cin >> a >> b >> c; | ^~~ a.cc:7:9: error: 'cout' was not declared in this scope 7 | cout << "YES"; | ^~~~ a.cc:10:9: error: 'cout' was not declared in this scope 10 | cout << "NO"; | ^~~~ a.cc:12:5: error: 'cout' was not declared in this scope 12 | cout<<endl; | ^~~~ a.cc:12:11: error: 'endl' was not declared in this scope 12 | cout<<endl; | ^~~~
s180620284
p03759
C++
#include<iostream> using namespace std; int a,b,c; int main() { cin>>a>>b>>c; if(b-c==c-b) { cout<<"YES"; } else { cout<<"NO"; } retrun 0; }
a.cc: In function 'int main()': a.cc:15:5: error: 'retrun' was not declared in this scope 15 | retrun 0; | ^~~~~~
s169383135
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()) | ^
s040822476
p03759
C++
#include <bits/stdc++.h> using namespace std; int 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:7:19: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<' 7 | else cout<"NO"<<endl; | ~~~~^~~~~~
s175356400
p03759
C
#include<stdio.h> int A, B, C; int main(){ scanf("%d%d%d", &A, &B, &C); if(a+c==B<<1){ printf("YES\n"); }else{ printf("NO\n"); } }
main.c: In function 'main': main.c:5:6: error: 'a' undeclared (first use in this function) 5 | if(a+c==B<<1){ | ^ main.c:5:6: note: each undeclared identifier is reported only once for each function it appears in main.c:5:8: error: 'c' undeclared (first use in this function) 5 | if(a+c==B<<1){ | ^
s391975253
p03759
C++
ome Tasks Submit Clarifications Results Standings Custom Test Editorial Submission #3809874 Source code Copy #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; int main() { int i,j,k,as=0,bs=0; string a,b; cin>>a>>b; string c; for(i=0;i<a.size();i++){ cout<<a[i]; if(i<b.size()) cout<<b[i]; } return 0; }
a.cc:9:12: error: stray '#' in program 9 | Submission #3809874 | ^ a.cc:1:1: error: 'ome' does not name a type 1 | ome | ^~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:12: /usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cxx::__is_null_pointer' redeclared as different kind of entity 164 | __is_null_pointer(std::nullptr_t) | ^ /usr/include/c++/14/ext/type_traits.h:159:5: note: previous declaration 'template<class _Type> constexpr bool __gnu_cxx::__is_null_pointer(_Type)' 159 | __is_null_pointer(_Type) | ^~~~~~~~~~~~~~~~~ /usr/include/c++/14/ext/type_traits.h:164:26: error: 'nullptr_t' is not a member of 'std'; did you mean 'nullptr_t'? 164 | __is_null_pointer(std::nullptr_t) | ^~~~~~~~~ In file included from /usr/include/c++/14/cstddef:50, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41: /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:443:29: note: 'nullptr_t' declared here 443 | typedef decltype(nullptr) nullptr_t; | ^~~~~~~~~ In file included from /usr/include/c++/14/bits/stl_pair.h:60, from /usr/include/c++/14/bits/stl_algobase.h:64: /usr/include/c++/14/type_traits:666:33: error: 'nullptr_t' is not a member of 'std'; did you mean 'nullptr_t'? 666 | struct is_null_pointer<std::nullptr_t> | ^~~~~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:443:29: note: 'nullptr_t' declared here 443 | typedef decltype(nullptr) 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)> | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/type_traits:1429:57: error: template argument 1 is invalid 1429 | : public integral_constant<std::size_t, alignof(_Tp)> | ^ /usr/include/c++/14/type_traits:1429:57: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1438:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1438 | : public integral_constant<std::size_t, 0> { }; | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/type_traits:1438:46: error: template argument 1 is invalid 1438 | : public integral_constant<std::size_t, 0> { }; | ^ /usr/include/c++/14/type_traits:1438:46: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1440:26: error: 'std::size_t' has not been declared 1440 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/14/type_traits:1441:21: error: '_Size' was not declared in this scope 1441 | struct rank<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:1441:27: error: template argument 1 is invalid 1441 | struct rank<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:1442:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/type_traits:1442:65: error: template argument 1 is invalid 1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^ /usr/include/c++/14/type_traits:1442:65: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1446:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/type_traits:1446:65: error: template argument 1 is invalid 1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^ /usr/include/c++/14/type_traits:1446:65: note: invalid template non-type parameter /usr/include/c++/14/type_traits:2086:26: error: 'std::size_t' has not been declared 2086 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/14/type_traits:2087:30: error: '_Size' was not declared in this scope 2087 | struct remove_extent<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:2087:36: error: template argument 1 is invalid 2087 | struct remove_extent<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:2099:26: error: 'std::size_t' has not been declared 2099 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/14/type_traits:2100:35: error: '_Size' was not declared in this scope 2100 | struct remove_all_extents<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:2100:41: error: template argument 1 is invalid 2100 | struct remove_all_extents<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:2171:12: error: 'std::size_t' has not been declared 2171 | template<std::size_t _Len> | ^~~ /usr/include/c++/14/type_traits:2176:30: error: '_Len' was not declared in this scope 2176 | unsigned char __data[_Len]; | ^~~~ /usr/include/c++/14/type_traits:2194:12: error: 'std::size_t' has not been declared 2194 | template<std::size_t _Len, std::size_t _Align = | ^~~ /usr/include/c++/14/type_traits:2194:30: error: 'std::size_t' has not been declared 2194 | template<std::size_t _Len, std::size_t _Align = | ^~~ /usr/include/c++/14/type_traits:2195:55: error: '_Len' was not declared in this scope 2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)> | ^~~~ /usr/include/c++/14/type_traits:2195:59: error: template argument 1 is invalid 2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)> | ^ /usr/include/c++/14/type_traits:2202:30: error: '_Len' was not declared in this scope 2202 | unsigned char __data[_Len]; | ^~~~ /usr/include/c++/14/type_traits:2203:44: error: '_Align' was not declared in this scope 2203 | struct __attribute__((__aligned__((_Align)))) { } __align; | ^~~~~~ In file included from /usr/include/c++/14/bits/stl_tempbuf.h:59, from /usr/include/c++/14/bits/stl_algo.h:69, from /usr/include/c++/14/algorithm:61: /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) | ^~~~~~ /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__(
s331682233
p03759
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define EPS (1e-7) #define INF (1e9) #define PI (acos(-1)) //const ll mod = 1000000007; int main() { //cout.precision(10); int a, b, c; cin >> a >> b >> c; string ans == "NO"; if(b-a== c-b){ ans="YES"; } cout << ans << endl; return 0; }
a.cc: In function 'int main()': a.cc:14:14: error: expected initializer before '==' token 14 | string ans == "NO"; | ^~ a.cc:16:1: error: 'ans' was not declared in this scope; did you mean 'abs'? 16 | ans="YES"; | ^~~ | abs a.cc:18:9: error: 'ans' was not declared in this scope; did you mean 'abs'? 18 | cout << ans << endl; | ^~~ | abs
s167049017
p03759
C
#include <stdio.h> using namespace std; int main(){ int a,b,c; scanf("%d%d%d",&a,&b,&c); if(a-b==b-c) printf("YES\n"); else printf("NO\n"); return 0; }
main.c:2:1: error: unknown type name 'using' 2 | using namespace std; | ^~~~~ main.c:2:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std' 2 | using namespace std; | ^~~
s042361206
p03759
C++
#include "bits/stdc++.h" using namespace std; #define print(s) cout << (s) << endl; #define sp(x) cout<<setprecision(x); #define FOR(i,a,b) for(int i=(a);i<(b);i++) #define REP(i,n) FOR(i,0,n) #define all(a) (a).begin(), (a).end() #define inf 10000000 int main(){ ios::sync_with_stdio(false); cin.tie(0); int a, b, c; int >> a>> b>> c; if (b-a==c-b){ cout<<"YES"<<endl; } else{ cou<<"NO"<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:15:22: error: expected unqualified-id before '>>' token 15 | int a, b, c; int >> a>> b>> c; | ^~ a.cc:19:9: error: 'cou' was not declared in this scope; did you mean 'cos'? 19 | cou<<"NO"<<endl; | ^~~ | cos
s344157846
p03759
C++
#include<bits/stdc++.h> using namespace std; int main() { int a,b,c; scanf("%d%d%d",&a,&b,&c); if(a-b==b-c) { printf("YES\n"); } else { printf("NO\n") } return 0; }
a.cc: In function 'int main()': a.cc:13:23: error: expected ';' before '}' token 13 | printf("NO\n") | ^ | ; 14 | } | ~
s414745768
p03759
C++
#include<iostream> using namespace std; int main(){ int a,b,c; in>>a>>b>>c; cout<<(b-a==c-b?"YES":"NO"); return 0; }
a.cc: In function 'int main()': a.cc:6:3: error: 'in' was not declared in this scope; did you mean 'int'? 6 | in>>a>>b>>c; | ^~ | int
s544149071
p03759
C++
#include<bits/stdc++.h> using namespace std; int a,b; 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:6:20: error: 'c' was not declared in this scope 6 | cin>>a>>b>>c; | ^
s725151317
p03759
C++
#include<bits/stdc++.h> using namespace std; int main(void){ int a, b, c; cin >> a >> b >> c; if((b-a)==(c-b)) cout << "YES\n"; else cout << "NO\n }
a.cc:8:16: warning: missing terminating " character 8 | else cout << "NO\n | ^ a.cc:8:16: error: missing terminating " character 8 | else cout << "NO\n | ^~~~~ a.cc: In function 'int main()': a.cc:9:1: error: expected primary-expression before '}' token 9 | } | ^
s438416012
p03759
C++
#include <iostream> int main(){ int a,b,c; std::cin>>a>>b>>c; if(a-b==b-c)cout<<"YES"<<std::endl; else cout<<"NO"<<endl; }
a.cc: In function 'int main()': a.cc:5:15: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 5 | if(a-b==b-c)cout<<"YES"<<std::endl; | ^~~~ | std::cout In file included from a.cc:1: /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:6:8: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 6 | 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:6:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 6 | else cout<<"NO"<<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) | ^~~~
s783455197
p03759
C++
#include <bits/stdc++.h> using namespace std; int main() { int A,B,C; cin >> A >> B >> C; if (A-B==B-C){ cout << "YES" << endl; } else { cout << "NO" << endkl;} }
a.cc: In function 'int main()': a.cc:10:19: error: 'endkl' was not declared in this scope 10 | cout << "NO" << endkl;} | ^~~~~
s416304610
p03759
C++
#include <bits/stdc++.h> using namespendl;ace 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 'namespendl' 2 | using namespendl;ace std; | ^~~~~~~~~~ a.cc:2:18: error: 'ace' does not name a type 2 | using namespendl;ace 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:18: 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:35: 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:10: 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:26: 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) | ^~~~
s431045160
p03759
C
#include <stdio.h> int main() { long int a,b,c; scanf("%ld%ld%ld",&a,&b,&c); if((a<b && b<c && b-a==c-d) || (a>b && b>c && a-b==b-c)) { printf("YES"); }else{ printf("NO"); } return 0; }
main.c: In function 'main': main.c:7:26: error: 'd' undeclared (first use in this function) 7 | if((a<b && b<c && b-a==c-d) || (a>b && b>c && a-b==b-c)) | ^ main.c:7:26: note: each undeclared identifier is reported only once for each function it appears in
s777357343
p03759
C
#include <stdio.h> int main() { long int a,b,c; scanf("%ld%ld%ld",&a,&b,&c); if(a<b && b<c && b-a==c-d) { printf("YES"); }else{ printf("NO"); } return 0; }
main.c: In function 'main': main.c:7:25: error: 'd' undeclared (first use in this function) 7 | if(a<b && b<c && b-a==c-d) | ^ main.c:7:25: note: each undeclared identifier is reported only once for each function it appears in
s714335500
p03759
C++
#include <bits/stdc++.h> typedef long long ll; ll a, b, c; int main() { cin >> a >> b >> c; cout << (b-a == c-b ? "YES" : "NO") << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | 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:8:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 8 | cout << (b-a == c-b ? "YES" : "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:42: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 8 | cout << (b-a == c-b ? "YES" : "NO") << 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) | ^~~~
s901300536
p03759
C++
#include<stdio.h> #include<stdlib.h> #include<string.h> int main(){ int a,b,c; int strcmp(char a,char b); scanf("%d",&a); scanf("%d",&b); scanf("%d",&c); if(strcmp(b-a,c-b)==0){ printf("Yes\n"); }else{ printf("No\n");} system("pause"); return 0; }
/usr/bin/ld: /tmp/ccleLDON.o: in function `main': a.cc:(.text+0x80): undefined reference to `strcmp(char, char)' collect2: error: ld returned 1 exit status
s478548987
p03759
C++
#include<stdio.h> #include<stdlib.h> #include<string.h> int main(){ int a,b,c; int strcmp(char*a,char*b); scanf("%d",&a); scanf("%d",&b); scanf("%d",&c); if(strcmp(b-a,c-b)==0){ printf("Yes\n"); }else{ printf("No\n");} system("pause"); return 0; }
a.cc: In function 'int main()': a.cc:10:20: error: invalid conversion from 'int' to 'char*' [-fpermissive] 10 | if(strcmp(b-a,c-b)==0){ | ~^~ | | | int a.cc:6:25: note: initializing argument 1 of 'int strcmp(char*, char*)' 6 | int strcmp(char*a,char*b); | ~~~~~^ a.cc:10:24: error: invalid conversion from 'int' to 'char*' [-fpermissive] 10 | if(strcmp(b-a,c-b)==0){ | ~^~ | | | int a.cc:6:32: note: initializing argument 2 of 'int strcmp(char*, char*)' 6 | int strcmp(char*a,char*b); | ~~~~~^
s663467033
p03759
C++
#include<stdio.h> #include<stdlib.h> #include<string.h> int main(){ int a,b,c; int strcmp(char a,char b); scanf("%d",&a); scanf("%d",&b); scanf("%d",&c); if(strcmp(b-a,c-b)==0){ printf("Yes\n"); }else{ printf("No\n");} system("pause"); return 0; }
/usr/bin/ld: /tmp/ccY17kTm.o: in function `main': a.cc:(.text+0x80): undefined reference to `strcmp(char, char)' collect2: error: ld returned 1 exit status
s590422797
p03759
C++
#include<stdio.h> #include<stdlib.h> int main(){ int a,b,c; int strcmp(char a,char b); scanf("%d",&a); scanf("%d",&b); scanf("%d",&c); if(strcmp(b-a,c-b)==0){ printf("Yes/n"); }else{ printf("No\n");} system("pause"); return 0; }
/usr/bin/ld: /tmp/ccSybnC6.o: in function `main': a.cc:(.text+0x80): undefined reference to `strcmp(char, char)' collect2: error: ld returned 1 exit status
s250888826
p03759
C
#include<stdio.h> int a,b,c; int main(){ scanf("%d %d %d",&a,&b,&c); if(a+c==2*b) printf("YES"); else printf("NO"); } }
main.c:11:1: error: expected identifier or '(' before '}' token 11 | } | ^
s001710275
p03759
C
#include<stdio.h> int a,b,c; int main(){ scanf("%d %d %d",&a,&b,&c); if(a+c==2*b) printf("YES"); else printf("NO"); } }
main.c:11:1: error: expected identifier or '(' before '}' token 11 | } | ^
s935436585
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"; else cout<<"NO"; cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:16: error: 'C' was not declared in this scope 6 | cin>>a>>b>>C; | ^
s538139516
p03759
C++
#include<bits/stdc++.h> using namespace std; int main() { int a,b,c; cin>>a>>b>>C; if(b==(a+c)/2)cout<<"YES"; else cout<<"NO"; return 0; }
a.cc: In function 'int main()': a.cc:6:16: error: 'C' was not declared in this scope 6 | cin>>a>>b>>C; | ^
s920975103
p03759
C++
#include<iostream> using namespace std; int main(){ if(a<b)swap(a,b); if(b<c)swap(b,c); if(a<b)swap(a,b); if(c-b==b-a)cout<<"YES"<<endl; else cout<<"NO"<<endl; }
a.cc: In function 'int main()': a.cc:4:6: error: 'a' was not declared in this scope 4 | if(a<b)swap(a,b); | ^ a.cc:4:8: error: 'b' was not declared in this scope 4 | if(a<b)swap(a,b); | ^ a.cc:5:6: error: 'b' was not declared in this scope 5 | if(b<c)swap(b,c); | ^ a.cc:5:8: error: 'c' was not declared in this scope 5 | if(b<c)swap(b,c); | ^ a.cc:6:6: error: 'a' was not declared in this scope 6 | if(a<b)swap(a,b); | ^ a.cc:6:8: error: 'b' was not declared in this scope 6 | if(a<b)swap(a,b); | ^ a.cc:7:6: error: 'c' was not declared in this scope 7 | if(c-b==b-a)cout<<"YES"<<endl; | ^ a.cc:7:8: error: 'b' was not declared in this scope 7 | if(c-b==b-a)cout<<"YES"<<endl; | ^ a.cc:7:13: error: 'a' was not declared in this scope 7 | if(c-b==b-a)cout<<"YES"<<endl; | ^