submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s566396648
p03759
C++
#include<iostream> int main() { int a,b,c; cout<<"a="; cin>>a; cout<<"b="; cin>>b; cout<<"c="; cin>>c; if(1<=a and 1<=b and 1<=c and a<=100 and b<=100 and c<=100) { if(b-a==c-b){ cout<<"Yes"; } else if(c-b==b-a){ cout<<"Yes"; } else{ cout<<"NO"; } } return 0; }
a.cc: In function 'int main()': a.cc:4:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 4 | cout<<"a="; | ^~~~ | 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:5:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | cin>>a; | ^~~ | std::cin /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~
s556629304
p03759
C++
#include<bits/stdc++.h> int main() { int a,b,c; cout<<"a="; cin>>a; cout<<"b="; cin>>b; cout<<"c="; cin>>c; if(1<=a and 1<=b and 1<=c and a<=100 and b<=100 and c<=100) { if(b-a==c-b){ cout<<"Yes"; } else if(c-b==b-a){ cout<<"Yes"; } else{ cout<<"NO"; } } return 0; }
a.cc: In function 'int main()': a.cc:4:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 4 | cout<<"a="; | ^~~~ | std::cout 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:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:5:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | cin>>a; | ^~~ | std::cin /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~
s585373648
p03759
C++
#include<iostream.h> int main() { int a,b,c; cout<<"a="; cin>>a; cout<<"b="; cin>>b; cout<<"c="; cin>>c; if(1<=a and 1<=b and 1<=c and a<=100 and b<=100 and c<=100) { if(b-a==c-b){ cout<<"Yes"; } else if(c-b==b-a){ cout<<"Yes"; } else{ cout<<"NO"; } } return 0; }
a.cc:1:9: fatal error: iostream.h: No such file or directory 1 | #include<iostream.h> | ^~~~~~~~~~~~ compilation terminated.
s145639107
p03759
C++
1 #include<bits/stdc++.h> 2 using namespace std; 3 6 int main() 7 { 8 int a,b,c; 9 cin>>a>>b>>c; 10 if(b-a==c-b) 11 { 12 cout<<"YES"<<endl; 13 } 14 else 15 { 16 cout<<"NO"<<endl; 17 } 18 return 0; 19 }
a.cc:1:4: error: stray '#' in program 1 | 1 #include<bits/stdc++.h> | ^ a.cc:1:2: error: expected unqualified-id before numeric constant 1 | 1 #include<bits/stdc++.h> | ^ a.cc:3:2: error: expected unqualified-id before numeric constant 3 | 3 | ^
s327296919
p03759
C
#include<stdio.h> #include<math.h> void main() { int a,b,c; printf("Enter 3 numbers"); scanf(%d%d%d",&a&b&c); if((a-b == b-c) || (b-a == c-b)) {printf("Yes");} else {printf("No"); } }
main.c: In function 'main': main.c:7:7: error: expected expression before '%' token 7 | scanf(%d%d%d",&a&b&c); | ^ main.c:7:13: warning: missing terminating " character 7 | scanf(%d%d%d",&a&b&c); | ^ main.c:7:13: error: missing terminating " character 7 | scanf(%d%d%d",&a&b&c); | ^~~~~~~~~~ main.c:11:17: error: expected ';' before '}' token 11 | {printf("No"); } | ^ | ; 12 | } | ~
s656727992
p03759
C++
#include <iostream> #include<string> #include<cmath> #include<vector> using std::cin; using std::cout; using std::vector; int main(){ int a,b,c; if(a-b==c-b){ cout<<"YES"; else cout<<"NO"; }
a.cc: In function 'int main()': a.cc:12:9: error: expected '}' before 'else' 12 | else | ^~~~ a.cc:10:21: note: to match this '{' 10 | if(a-b==c-b){ | ^
s839718023
p03759
C++
#include <iostream.h> 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:10: fatal error: iostream.h: No such file or directory 1 | #include <iostream.h> | ^~~~~~~~~~~~ compilation terminated.
s562275095
p03759
C++
#include <assert.h> #include <limits.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> void main() { int a,b,c; scanf("%d %d %d",&a,&b,&c); if(abs(a-b)==abs(b-c)) printf("Yes"); else printf("No"); }
a.cc:10:1: error: '::main' must return 'int' 10 | void main() | ^~~~
s013531054
p03759
C++
#include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> void main() { int a,b,c; scanf("%d",&a); scanf("%d",&a); scanf("%d",&a); if(abs(a-b)==abs(b-c)) printf("Yes"); else printf("No"); }
a.cc:10:1: error: '::main' must return 'int' 10 | void main() | ^~~~
s049375561
p03759
C
void main() { int a,b,c,d,e; scanf("%d%d%d",&a&b&c); d=a-b; e=b-c; if(d==e){ printf("yes"); } else printf("no"); }
main.c: In function 'main': main.c:4:1: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 4 | scanf("%d%d%d",&a&b&c); | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | void main() main.c:4:1: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 4 | scanf("%d%d%d",&a&b&c); | ^~~~~ main.c:4:1: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:4:18: error: invalid operands to binary & (have 'int *' and 'int') 4 | scanf("%d%d%d",&a&b&c); | ~~^ | | | int * main.c:8:1: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 8 | printf("yes"); | ^~~~~~ main.c:8:1: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:8:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:8:1: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:11:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] 11 | printf("no"); | ^~~~~~ main.c:11:1: note: include '<stdio.h>' or provide a declaration of 'printf'
s466242068
p03759
C
#include<iostream.h> void main() { int a,b,c,d,e; scanf("%d%d%d",&a,&b,&c); d=a-b; e=b-c; if(d==e) printf("yes"); else printf("no"); }
main.c:1:9: fatal error: iostream.h: No such file or directory 1 | #include<iostream.h> | ^~~~~~~~~~~~ compilation terminated.
s855207939
p03759
C
#include<conio.h> void main() { int a,b,c,d,e; scanf("%d%d%d",&a,&b,&c); d=a-b; e=b-c; if(d==e) printf("yes"); else printf("no"); }
main.c:1:9: fatal error: conio.h: No such file or directory 1 | #include<conio.h> | ^~~~~~~~~ compilation terminated.
s608997378
p03759
C++
#include<bits/stdc++.h> using namespace std; int main() { long float a, b, c; if((b-a)==(c-b)) { cout<<"YES"; } else cout<<"NO"; return 0; }
a.cc: In function 'int main()': a.cc:5:1: error: 'long' specified with 'float' 5 | long float a, b, c; | ^~~~ a.cc:5:1: error: 'long' specified with 'float' a.cc:5:1: error: 'long' specified with 'float'
s718488544
p03759
C++
#include<bits/stdc++.h> using namespace std: int main() { long long int a, b, c; if((b-a)==(c-b)) { cout<<"YES"; } else cout<<"NO"; return 0; }
a.cc:2:21: error: expected ';' before ':' token 2 | using namespace std: | ^ | ; a.cc:2:21: error: expected unqualified-id before ':' token
s854690713
p03759
C
#include<conio.h> void main() { int a,b,c,d,e; printf("enter the numbers\n"); d=a-b; e=b-c; if(d==e) { priintf("yes"); } else{ printf("no"); } }
main.c:1:9: fatal error: conio.h: No such file or directory 1 | #include<conio.h> | ^~~~~~~~~ compilation terminated.
s739062989
p03759
C
#include<stdio.h> #include<conio.h> void main() {int a,b,c; printf("Enter the value of a ,b and c"); scanf("%d %d %d ",&a,&b,&c); if(a<0 || a>100 || b<0 || b>100||c>100 ||c<0) { printf("enter the number between 1-100"); } else { if(b-a==c-b) { printf("arrangement of pole is beautiful"); } else printf("arrangement of pole is not beautiful"); } }
main.c:2:9: fatal error: conio.h: No such file or directory 2 | #include<conio.h> | ^~~~~~~~~ compilation terminated.
s956735849
p03759
C
#include<stdio.h> #include<conio.h> void main() {int a,b,c; printf("Enter the value of a ,b and c"); scanf("%d %d %d ",&a,&b,&c); if(a<0 || a>100 || b<0 || b>100||c>100 ||c<0) { printf("enter the number between 1-100"); } else { if(b-a==c-b) { printf("arrangement of pole is beautiful"); } else printf("arrangement of pole is not beautiful"); } }
main.c:2:9: fatal error: conio.h: No such file or directory 2 | #include<conio.h> | ^~~~~~~~~ compilation terminated.
s249889084
p03759
C++
#include<iostream> using namespace std; int maint(){ long long int a,b,c; cin>>a>>b>>c; if(b-a==c-b) cout<<"YES"; else cout<<"NO"; return 0; }
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s413489450
p03759
C++
#include<bits/stdc++.h> using namespace std; void main() { int a,b,c; cin>>a>>b>>c; if((a-b))==(b-c)) cout<<"YES"; else cout<<"NO"; }
a.cc:4:1: error: '::main' must return 'int' 4 | void main() | ^~~~ a.cc: In function 'int main()': a.cc:9:13: error: expected primary-expression before '==' token 9 | if((a-b))==(b-c)) | ^~
s249224803
p03759
C++
#include<iostream> using namesapce std; int maint(){ long long int a,b,c; cin>>a>>b>>c; if(b-a==c-b) cout<<"YES"; else cout<<"NO"; return 0; }
a.cc:3:7: error: expected nested-name-specifier before 'namesapce' 3 | using namesapce std; | ^~~~~~~~~ a.cc: In function 'int maint()': 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 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:4: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 9 | 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:11:4: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 11 | cout<<"NO"; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~
s885220451
p03759
C
#include<stdio.h> int main( { int a,b,c; scanf("%d %d %d",&a,&b,&c); if(b-a==c-b){ printf("YES"); } else{ printf("NO"); } return 0; }
main.c:4:1: error: expected declaration specifiers or '...' before '{' token 4 | { | ^
s211666129
p03759
C++
#include <iostream> using name space 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:2:7: error: expected nested-name-specifier before 'name' 2 | using name space std ; | ^~~~ a.cc: In function 'int main()': a.cc:7:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | 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:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 9 | 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:11:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 11 | cout << "No" ; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~
s436391185
p03759
Java
import java.util.Scanner; public class TriSeqLinear{ public static void main(String[] args){ Scanner scanner = new Scanner(System.in); int a = scanner.nextInt(); int b = scanner.nextInt(); int c = scanner.nextInt(); int n = b-a; int m = c-b; if(n==m){ System.out.print("YES"); }else{ System.out.print("NO"); } } }
Main.java:3: error: class TriSeqLinear is public, should be declared in a file named TriSeqLinear.java public class TriSeqLinear{ ^ 1 error
s106598112
p03759
C++
//#define _GLIBCXX_DEBUG #include<bits/stdc++.h> using namespace std; const int INF= 1e9+5; typedef long long ll; int main(){ int a,b,c; cin>>a>>b>>C; if(2*a==b+c)cout<<"YES"<<endl; else cout<<"NO"<<endl; }
a.cc: In function 'int main()': a.cc:10:14: error: 'C' was not declared in this scope 10 | cin>>a>>b>>C; | ^
s694107799
p03759
C++
//#define _GLIBCXX_DEBUG #include<bits/stdc++.h> using namespace std; const int INF= 1e9+5; typedef long long ll; int main(){ int a,b,c; cin>>a>>b>>C; if(2*a=b+c)cout<<"YES"<<endl; else cout<<"NO"<<endl; }
a.cc: In function 'int main()': a.cc:10:14: error: 'C' was not declared in this scope 10 | cin>>a>>b>>C; | ^ a.cc:11:7: error: lvalue required as left operand of assignment 11 | if(2*a=b+c)cout<<"YES"<<endl; | ~^~
s949549845
p03759
C++
#include <bits/stdc++.h> using namespace std; int main() { int A=0, B=0, C=0; cin >> A >> B >> c; int sub1= abs(A-B); int sub2= abs(B-C); if(sub1==sub2) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:8:20: error: 'c' was not declared in this scope 8 | cin >> A >> B >> c; | ^
s302753818
p03759
C++
#include <bits/stdc++.h> using namespace std; int main() { string a,b,c; cin >> a >>b >>c; if(abs(a-b)==abs(c-b)){ cout << "YES"; } else{ cout << "NO"; } }
a.cc: In function 'int main()': a.cc:7: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>'}) 7 | if(abs(a-b)==abs(c-b)){ | ~^~ | | | | | 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:7:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 7 | if(abs(a-b)==abs(c-b)){ | ^ /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:7:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 7 | if(abs(a-b)==abs(c-b)){ | ^ 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:7:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::complex<_Tp>' 7 | if(abs(a-b)==abs(c-b)){ | ^ /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:7:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::complex<_Tp>' 7 | if(abs(a-b)==abs(c-b)){ | ^ /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:7:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::complex<_Tp>' 7 | if(abs(a-b)==abs(c-b)){ | ^ /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:7:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 7 | if(abs(a-b)==abs(c-b)){ | ^ /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:7:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 7 | if(abs(a-b)==abs(c-b)){ | ^ /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:7:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 7 | if(abs(a-b)==abs(c-b)){ | ^ /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:7:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 7 | if(abs(a-b)==abs(c-b)){ | ^ /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:7:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 7 | if(abs(a-b)==abs(c-b)){ | ^ /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:7:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::valarray<_Tp>' 7 | if(abs(a-b)==abs(c-b)){ | ^ /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:7:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::valarray<_Tp>' 7 | if(abs(a-b)==abs(c-b)){ | ^ /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:7:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::valarray<_Tp>' 7 | if(abs(a-b)==abs(c-b)){ | ^ a.cc:7:23: 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>'}) 7 | if(abs(a-b)==abs(c-b)){ | ~^~ | | | | | basic_string<[...]> | basic_string<[...]> /usr/include/c++/14/bits/stl_iterator.h:6
s840026406
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:6:7: error: extended character − is not valid in an identifier 6 | if((b−a) == (c−b)) | ^ a.cc:6:16: error: extended character − is not valid in an identifier 6 | if((b−a) == (c−b)) | ^ a.cc: In function 'int main()': a.cc:6:7: error: 'b\U00002212a' was not declared in this scope 6 | if((b−a) == (c−b)) | ^~~ a.cc:6:16: error: 'c\U00002212b' was not declared in this scope 6 | if((b−a) == (c−b)) | ^~~
s358313370
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:6:7: error: extended character − is not valid in an identifier 6 | if((b−a) == (c−b)) | ^ a.cc:6:16: error: extended character − is not valid in an identifier 6 | if((b−a) == (c−b)) | ^ a.cc: In function 'int main()': a.cc:6:7: error: 'b\U00002212a' was not declared in this scope 6 | if((b−a) == (c−b)) | ^~~ a.cc:6:16: error: 'c\U00002212b' was not declared in this scope 6 | if((b−a) == (c−b)) | ^~~
s114229347
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:6:6: error: extended character − is not valid in an identifier 6 | if(b−a == c−b) | ^ a.cc:6:13: error: extended character − is not valid in an identifier 6 | if(b−a == c−b) | ^ a.cc: In function 'int main()': a.cc:6:6: error: 'b\U00002212a' was not declared in this scope 6 | if(b−a == c−b) | ^~~ a.cc:6:13: error: 'c\U00002212b' was not declared in this scope 6 | if(b−a == c−b) | ^~~
s744011196
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:6:6: error: extended character − is not valid in an identifier 6 | if(b−a==c−b) | ^ a.cc:6:11: error: extended character − is not valid in an identifier 6 | if(b−a==c−b) | ^ a.cc: In function 'int main()': a.cc:6:6: error: 'b\U00002212a' was not declared in this scope 6 | if(b−a==c−b) | ^~~ a.cc:6:11: error: 'c\U00002212b' was not declared in this scope 6 | if(b−a==c−b) | ^~~
s075052328
p03759
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c;cin>>a>b>>c; cout<(a+c==b*2 ? "YES":"NO")<<endl; return 0; }
a.cc: In function 'int main()': a.cc:5:21: error: no match for 'operator>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int') 5 | int a, b, c;cin>>a>b>>c; | ~~~~~~^~~~~ | | | | | int | std::basic_istream<char>::__istream_type {aka std::basic_istream<char>} a.cc:5:21: note: candidate: 'operator>(int, int)' (built-in) 5 | int a, b, c;cin>>a>b>>c; | ~~~~~~^~~~~ a.cc:5:21: 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/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:1176:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator>(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1176 | operator>(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1176:5: note: template argument deduction/substitution failed: a.cc:5:25: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 5 | int a, b, c;cin>>a>b>>c; | ^ /usr/include/c++/14/bits/regex.h:1236:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator>(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)' 1236 | operator>(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1236:5: note: template argument deduction/substitution failed: a.cc:5:25: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' 5 | int a, b, c;cin>>a>b>>c; | ^ /usr/include/c++/14/bits/regex.h:1329:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator>(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)' 1329 | operator>(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1329:5: note: template argument deduction/substitution failed: a.cc:5:25: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 5 | int a, b, c;cin>>a>b>>c; | ^ /usr/include/c++/14/bits/regex.h:1403:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1403 | operator>(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1403:5: note: template argument deduction/substitution failed: a.cc:5:25: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 5 | int a, b, c;cin>>a>b>>c; | ^ /usr/include/c++/14/bits/regex.h:1497:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1497 | operator>(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1497:5: note: template argument deduction/substitution failed: a.cc:5:25: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 5 | int a, b, c;cin>>a>b>>c; | ^ /usr/include/c++/14/bits/regex.h:1573:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1573 | operator>(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1573:5: note: template argument deduction/substitution failed: a.cc:5:25: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 5 | int a, b, c;cin>>a>b>>c; | ^ /usr/include/c++/14/bits/regex.h:1673:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1673 | operator>(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1673:5: note: template argument deduction/substitution failed: a.cc:5:25: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 5 | 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/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h: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:5:25: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::pair<_T1, _T2>' 5 | int a, b, c;cin>>a>b>>c; | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /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:5:25: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 5 | 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:5:25: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 5 | 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:5:25: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 5 | 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:5:25: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 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: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:5:25: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 5 | 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:5:25: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 5 | 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:5:25: note: mismatched types 'std::basic_string_view<_CharT, _Traits>
s264080015
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=c-b) { printf("YES"); } else { printf("NO"); } return 0; }
a.cc: In function 'int main()': a.cc:7:13: error: lvalue required as left operand of assignment 7 | if(a-b=c-b) | ~^~
s534971577
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=c-b) { printf("YES"); } else { printf("NO"); } return 0; }
a.cc: In function 'int main()': a.cc:7:13: error: lvalue required as left operand of assignment 7 | if(a-b=c-b) | ~^~
s974481126
p03759
C++
#include<iostream> using namesace std; int main() { int A,B,C cin>>A>>B>>C if(B-A==C-B) cout<<"YES"<<endl; else cout<<"NO"<<endl; return 0; }
a.cc:2:7: error: expected nested-name-specifier before 'namesace' 2 | using namesace std; | ^~~~~~~~ a.cc: In function 'int main()': a.cc:6:5: error: expected initializer before 'cin' 6 | cin>>A>>B>>C | ^~~ a.cc:9:5: error: 'else' without a previous 'if' 9 | else | ^~~~ a.cc:10:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 10 | cout<<"NO"<<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:10:17: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 10 | 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) | ^~~~
s209465708
p03759
C++
#include <bits/stdc++.h> using namespace std; int main() { string 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:8: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>'}) 8 | if(b-a==c-b) cout << "YES" << 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:8:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 8 | if(b-a==c-b) cout << "YES" << 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:8:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 8 | if(b-a==c-b) cout << "YES" << 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:8:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::complex<_Tp>' 8 | if(b-a==c-b) cout << "YES" << 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:8:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::complex<_Tp>' 8 | if(b-a==c-b) cout << "YES" << 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:8:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::complex<_Tp>' 8 | if(b-a==c-b) cout << "YES" << 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:8:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 8 | if(b-a==c-b) cout << "YES" << 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:8:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 8 | if(b-a==c-b) cout << "YES" << 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:8:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 8 | if(b-a==c-b) cout << "YES" << 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:8:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 8 | if(b-a==c-b) cout << "YES" << 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:8:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 8 | if(b-a==c-b) cout << "YES" << 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:8:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::valarray<_Tp>' 8 | if(b-a==c-b) cout << "YES" << 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:8:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::valarray<_Tp>' 8 | if(b-a==c-b) cout << "YES" << 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:8:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::valarray<_Tp>' 8 | if(b-a==c-b) cout << "YES" << endl; | ^ a.cc:8:18: 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>'}) 8 | if(
s699482487
p03759
C++
#include <bits/stddc++.h> using namespace std; int main() { double a,b,c; cin>>a>>b>>c; if(b-a == c-b){ cout<<"YES"<<endl; } else{ cout<<"NO"<<endl; } return 0; }
a.cc:1:10: fatal error: bits/stddc++.h: No such file or directory 1 | #include <bits/stddc++.h> | ^~~~~~~~~~~~~~~~ compilation terminated.
s079459779
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:11:18: error: expected '}' at end of input 11 | return 0; | ^ a.cc:4:1: note: to match this '{' 4 | { | ^
s464426835
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:11:18: error: expected '}' at end of input 11 | return 0; | ^ a.cc:4:1: note: to match this '{' 4 | { | ^
s214764165
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:11:18: error: expected '}' at end of input 11 | return 0; | ^ a.cc:4:1: note: to match this '{' 4 | { | ^
s949936916
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:11:18: error: expected '}' at end of input 11 | return 0; | ^ a.cc:4:1: note: to match this '{' 4 | { | ^
s321300923
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:11:18: error: expected '}' at end of input 11 | return 0; | ^ a.cc:4:1: note: to match this '{' 4 | { | ^
s045794614
p03759
C++
#include <iostream> #include <vector> #include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; typedef long long ll; typedef pair<int, int> P; #define pb push_back #define eb emplace_back #define fi first #define se second #define bg begin() #define ed end() #define all(x) x.bg, x.ed #ifdef LOCAL #define dmp(x) cerr << __LINE__ << " " << #x << " " << x << endl #else #define dmp(x) void(0) #endif template <class t, class u> void chmax(t &a, u b) { if (a < b) a = b; } template <class t, class u> void chmin(t &a, u b) { if (b < a) a = b; } const int mod = 1000000007; struct mint { ll x; // typedef long long ll; mint(ll x = 0) : x((x % mod + mod) % mod) {} mint &operator+=(const mint a) { if ((x += a.x) >= mod) x -= mod; return *this; } mint &operator-=(const mint a) { if ((x += mod - a.x) >= mod) x -= mod; return *this; } mint &operator*=(const mint a) { (x *= a.x) %= mod; return *this; } mint operator+(const mint a) const { mint res(*this); return res += a; } mint operator-(const mint a) const { mint res(*this); return res -= a; } mint operator*(const mint a) const { mint res(*this); return res *= a; } mint pow(ll t) const { if (!t) return 1; mint a = pow(t >> 1); a *= a; if (t & 1) a *= *this; return a; } // for prime mod mint inv() const { return pow(mod - 2); } mint &operator/=(const mint a) { return (*this) *= a.inv(); } mint operator/(const mint a) const { mint res(*this); return res /= a; } }; struct combination { vector<mint> fact, ifact; combination(int n) : fact(n + 1), ifact(n + 1) { assert(n < mod); fact[0] = 1; for (int i = 1; i <= n; ++i) fact[i] = fact[i - 1] * i; ifact[n] = fact[n].inv(); for (int i = n; i >= 1; --i) ifact[i - 1] = ifact[i] * i; } mint operator()(int n, int k) { if (k < 0 || k > n) return 0; return fact[n] * ifact[k] * ifact[n - k]; } }; template <class t> using vc = vector<t>; template <class t> using vvc = vc<vc<t>>; using vi = vc<int>; int gcd(int a, int b) { if (b == 0) return a; return gcd(b, a % b); } int lcm(int a, int b) { return (a * b) / gcd(a, b); } int fact(int n) { if (n == 0) return 1; return n * fact(n - 1); } int main() { int a,b,c; cin >> a >> b >>c; if(b-a==c-b){ cout<<"YES"<<endl; }else{ out<<"NO"<<endl; } }
a.cc: In function 'int main()': a.cc:148:3: error: 'out' was not declared in this scope 148 | out<<"NO"<<endl; | ^~~
s153268130
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){ | ~^~
s770275950
p03759
C++
#include<bits/stdc++.h> using namespace std; int n; 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:8:13: error: lvalue required as left operand of assignment 8 | if(b-a=c-b) | ~^~
s077251635
p03759
C++
package main import ( "bufio" "fmt" "os" "strconv" ) // I/O type Scanner struct { sc *bufio.Scanner } func NewScanner() *Scanner { sc := bufio.NewScanner(os.Stdin) sc.Split(bufio.ScanWords) sc.Buffer(make([]byte, 1024), int(1e+9)) return &Scanner{sc} } func (s *Scanner) nextStr() string { s.sc.Scan() return s.sc.Text() } func (s *Scanner) nextInt() int { i, e := strconv.Atoi(s.nextStr()) if e != nil { panic(e) } return i } func (s *Scanner) nextFloat() float64 { f, e := strconv.ParseFloat(s.nextStr(), 64) if e != nil { panic(e) } return f } func (s *Scanner) nextRuneSlice() []rune { return []rune(s.nextStr()) } func (s *Scanner) nextIntSlice(n int) []int { res := make([]int, n) for i := 0; i < n; i++ { res[i] = s.nextInt() } return res } func (s *Scanner) nextFloatSlice(n int) []float64 { res := make([]float64, n) for i := 0; i < n; i++ { res[i] = s.nextFloat() } return res } // Arithmetic func max(nums ...int) int { m := nums[0] for _, i := range nums { if m < i { m = i } } return m } func min(nums ...int) int { m := nums[0] for _, i := range nums { if m > i { m = i } } return m } func abs(x int) int { if x > 0 { return x } return -x } func pow(x, y int) int { res := 1 for i := 0; i < y; i++ { res *= x } return res } // Sort type Val struct { id, num int } type ByNum []Val func (a ByNum) Len() int { return len(a) } func (a ByNum) Less(i, j int) bool { return a[i].num < a[j].num } func (a ByNum) Swap(i, j int) { a[i], a[j] = a[j], a[i] } func main() { sc := NewScanner() wtr := bufio.NewWriter(os.Stdout) a, b, c := sc.nextInt(), sc.nextInt(), sc.nextInt() if (b - a) == (c - b) { fmt.Fprintln(wtr, "YES") } else { fmt.Fprintln(wtr, "NO") } wtr.Flush() }
a.cc:1:1: error: 'package' does not name a type 1 | package main | ^~~~~~~ a.cc:15:1: error: 'func' does not name a type 15 | func NewScanner() *Scanner { | ^~~~ a.cc:22:6: error: expected constructor, destructor, or type conversion before '(' token 22 | func (s *Scanner) nextStr() string { | ^ a.cc:27:6: error: expected constructor, destructor, or type conversion before '(' token 27 | func (s *Scanner) nextInt() int { | ^ a.cc:35:6: error: expected constructor, destructor, or type conversion before '(' token 35 | func (s *Scanner) nextFloat() float64 { | ^ a.cc:43:6: error: expected constructor, destructor, or type conversion before '(' token 43 | func (s *Scanner) nextRuneSlice() []rune { | ^ a.cc:47:6: error: expected constructor, destructor, or type conversion before '(' token 47 | func (s *Scanner) nextIntSlice(n int) []int { | ^ a.cc:55:6: error: expected constructor, destructor, or type conversion before '(' token 55 | func (s *Scanner) nextFloatSlice(n int) []float64 { | ^ a.cc:64:1: error: 'func' does not name a type 64 | func max(nums ...int) int { | ^~~~ a.cc:74:1: error: 'func' does not name a type 74 | func min(nums ...int) int { | ^~~~ a.cc:84:1: error: 'func' does not name a type 84 | func abs(x int) int { | ^~~~ a.cc:91:1: error: 'func' does not name a type 91 | func pow(x, y int) int { | ^~~~ a.cc:100:1: error: 'type' does not name a type; did you mean 'typeof'? 100 | type Val struct { | ^~~~ | typeof a.cc:103:1: error: 'type' does not name a type; did you mean 'typeof'? 103 | type ByNum []Val | ^~~~ | typeof a.cc:106:6: error: expected constructor, destructor, or type conversion before '(' token 106 | func (a ByNum) Less(i, j int) bool { return a[i].num < a[j].num } | ^ a.cc:107:6: error: expected constructor, destructor, or type conversion before '(' token 107 | func (a ByNum) Swap(i, j int) { a[i], a[j] = a[j], a[i] } | ^ a.cc:109:1: error: 'func' does not name a type 109 | func main() { | ^~~~
s862986432
p03759
C
#include <stdio.h> int main() { int a,b,c; scanf("%d %d %d",&a,&b,&c); if(c-b==b-a) sanf("Yes\n"); else { scanf("No\n"); } return 0; }
main.c: In function 'main': main.c:7:5: error: implicit declaration of function 'sanf'; did you mean 'scanf'? [-Wimplicit-function-declaration] 7 | sanf("Yes\n"); | ^~~~ | scanf
s618010732
p03759
C++
#include <iostream> using namespace std; int a, b, c; int main() { cin >> a >> b >> c; if (b - a == c - b) puts("YES"); else puts("NO); return 0; }
a.cc:9:14: warning: missing terminating " character 9 | puts("NO); | ^ a.cc:9:14: error: missing terminating " character 9 | puts("NO); | ^~~~~ a.cc: In function 'int main()': a.cc:10:5: error: expected primary-expression before 'return' 10 | return 0; | ^~~~~~
s560961202
p03759
C++
#include <iostream> using namespace std; int a, b, c; int main() { cin >> a >> b >> c; if (b - a == c - b) puts("YES"); else puts("NO); return 0; }
a.cc:9:14: warning: missing terminating " character 9 | puts("NO); | ^ a.cc:9:14: error: missing terminating " character 9 | puts("NO); | ^~~~~ a.cc: In function 'int main()': a.cc:10:5: error: expected primary-expression before 'return' 10 | return 0; | ^~~~~~
s945746522
p03759
C++
#include <iostream> using namespace std; int a, b, c; int main() { cin >> a >> b >> c; if (b - a == c - b) puts("YES"); else puts("NO); return 0; }
a.cc:9:14: warning: missing terminating " character 9 | puts("NO); | ^ a.cc:9:14: error: missing terminating " character 9 | puts("NO); | ^~~~~ a.cc: In function 'int main()': a.cc:10:5: error: expected primary-expression before 'return' 10 | return 0; | ^~~~~~
s916611994
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"; return 0; } cout << "NO" << endl; return 0; }
a.cc:1:1: error: 'include' does not name a type 1 | include <bits / stdc++.h> | ^~~~~~~ a.cc: In function 'int main()': a.cc:6:5: error: 'cin' was not declared in this scope 6 | cin >> a >> b >> c; | ^~~ a.cc:9:9: error: 'cout' was not declared in this scope 9 | cout << "YES"; | ^~~~ a.cc:12:5: error: 'cout' was not declared in this scope 12 | cout << "NO" << endl; | ^~~~ a.cc:12:21: error: 'endl' was not declared in this scope 12 | cout << "NO" << endl; | ^~~~
s050339132
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"; } return 0; }
a.cc:1:10: fatal error: bits.stdc++.h: No such file or directory 1 | #include <bits.stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s511353529
p03759
C++
#include<iostream> #incldue<cstdio> #incldue<cmath> #include<string> #include<algithm> using namespace std; long long a,b,c; int main() { cin>>a>>b>>c; if(b-a==c-b) cout<<"YES"; else cout<<"NO"; return 0; }
a.cc:2:2: error: invalid preprocessing directive #incldue; did you mean #include? 2 | #incldue<cstdio> | ^~~~~~~ | include a.cc:3:2: error: invalid preprocessing directive #incldue; did you mean #include? 3 | #incldue<cmath> | ^~~~~~~ | include a.cc:5:9: fatal error: algithm: No such file or directory 5 | #include<algithm> | ^~~~~~~~~ compilation terminated.
s351186258
p03759
C++
A,B,C=map(int,raw_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,raw_input().split) | ^
s294747365
p03759
C++
#include <iostream> #include <vector> #include <algorithm> #include <string.h> #include <iomanip> #include <map> #include <cstdlib> #include <cctype> #include <ctype.h> #include <math.h> #define ll long long char toupper(char c); char toupper(char c) { return (c - 0x20); } using namespace std; int main() { int a,b,c; cin >> a>>b>>c; if(a==-c+2b) { cout << "YES" << endl; return 0; } cout <<"NO"<< endl; return 0; }
a.cc: In function 'int main()': a.cc:23:12: error: unable to find numeric literal operator 'operator""b' 23 | if(a==-c+2b) | ^~
s191048402
p03759
Java
#include<iostream> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; if(b-a==c-b)cout<<"YES"<<endl; else cout<<"NO"<<endl; return 0; }
Main.java:1: error: illegal character: '#' #include<iostream> ^ Main.java:1: error: class, interface, enum, or record expected #include<iostream> ^ Main.java:5: error: not a statement cin>>a>>b>>c; ^ Main.java:6: error: not a statement if(b-a==c-b)cout<<"YES"<<endl; ^ Main.java:7: error: not a statement else cout<<"NO"<<endl; ^ Main.java:3: error: unnamed classes are a preview feature and are disabled by default. int main(){ ^ (use --enable-preview to enable unnamed classes) 6 errors
s410966245
p03759
C++
#include <bits/stdc++.h> using namespace std; int main() { int A, B, C; cin >> A >> B >> C; cout << (b - a == c - b ? "YES" : "NO") << endl; }
a.cc: In function 'int main()': a.cc:8:12: error: 'b' was not declared in this scope 8 | cout << (b - a == c - b ? "YES" : "NO") << endl; | ^ a.cc:8:16: error: 'a' was not declared in this scope 8 | cout << (b - a == c - b ? "YES" : "NO") << endl; | ^ a.cc:8:21: error: 'c' was not declared in this scope 8 | cout << (b - a == c - b ? "YES" : "NO") << endl; | ^
s293386832
p03759
C++
a,b,c = map(int,input().split()) if b-a==c-b: print('YES') else: print('NO')
a.cc:3:11: warning: multi-character character constant [-Wmultichar] 3 | print('YES') | ^~~~~ a.cc:5:11: warning: multi-character character constant [-Wmultichar] 5 | print('NO') | ^~~~ a.cc:1:1: error: 'a' does not name a type 1 | a,b,c = map(int,input().split()) | ^
s913056060
p03759
C++
#include<bits/stdc++.h> using namespace std; int main() { int a,b,c,d; 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:21: error: expected primary-expression before ')' token 7 | if((b-a)==(c-b))) | ^
s092593600
p03759
C
#include<stdio.h> #include<algorithm> int compare() int main() bool compare(int a,int b) { return a>b; } { int a,b,c,d,e; scanf("%d %d %d",&a,&b,&c); compare(int a,int b); d=b-a; compare(int b,int c); e=c-b; if(d=e) printf("YES"); else printf("NO"); }
main.c:2:9: fatal error: algorithm: No such file or directory 2 | #include<algorithm> | ^~~~~~~~~~~ compilation terminated.
s410953242
p03759
C
#include<stdio.h> #include<algorithm> int main() bool compare(int a,int b) { return a>b; } { int a,b,c,d,e; scanf("%d %d %d",&a,&b,&c); compare(int a,int b); d=b-a; compare(int b,int c); e=c-b; if(d=e) printf("YES"); else printf("NO"); }
main.c:2:9: fatal error: algorithm: No such file or directory 2 | #include<algorithm> | ^~~~~~~~~~~ compilation terminated.
s846498114
p03759
C++
#include<iostream> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; if(a-b=b-c){ cout<<"YES"<<endl; return 0; } else{ cout<<"NO"<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: lvalue required as left operand of assignment 6 | if(a-b=b-c){ | ~^~
s254718254
p03759
C++
#include<iostream> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; if(a-b=b-c){ cout<<"YES"<<endl; return 0; } else{ cout<<"NO"<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: lvalue required as left operand of assignment 6 | if(a-b=b-c){ | ~^~
s170162937
p03759
C++
#include<stdio.h> main() { int a,b,c; scanf("%d %d %d",&a,&b,&c); if((b-a)==(c-b)) printf("YES); else printf("NO"); }
a.cc:7:24: warning: missing terminating " character 7 | printf("YES); | ^ a.cc:7:24: error: missing terminating " character 7 | printf("YES); | ^~~~~~ a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | main() | ^~~~ a.cc: In function 'int main()': a.cc:8:9: error: expected primary-expression before 'else' 8 | else | ^~~~
s816952480
p03759
C++
nclude <iostream> using namespace std; int main(){ int a, b, c; cin >> a >> b >> c; if(b-a == c-b) cout << "YES"; else cout << "NO"; }
a.cc:1:1: error: 'nclude' does not name a type 1 | nclude <iostream> | ^~~~~~ a.cc: In function 'int main()': a.cc:7:2: error: 'cin' was not declared in this scope 7 | cin >> a >> b >> c; | ^~~ a.cc:8:17: error: 'cout' was not declared in this scope 8 | if(b-a == c-b) cout << "YES"; | ^~~~ a.cc:9:8: error: 'cout' was not declared in this scope 9 | else cout << "NO"; | ^~~~
s876942313
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:6: error: 'b' was not declared in this scope 7 | if(b -a == c - b){ | ^ a.cc:7:9: error: 'a' was not declared in this scope 7 | if(b -a == c - b){ | ^ a.cc:7:14: error: 'c' was not declared in this scope 7 | if(b -a == c - b){ | ^
s084374587
p03759
C++
#include<bits/stdc++.h> using namespace std; int a,b,c; int main() { scanf("%d%d%d",&a,&b,&c); if(b-a==c-b)printf("YES"); else printf("NO"); return 0p; }
a.cc: In function 'int main()': a.cc:9:12: error: unable to find numeric literal operator 'operator""p' 9 | return 0p; | ^~
s883669632
p03759
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main(){ int a, b, c; cin >> a >> b >> c; if(c-b==b-a)cout << "YES" << endl; else{cout<<"NO"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:12:2: error: expected '}' at end of input 12 | } | ^ a.cc:5:11: note: to match this '{' 5 | int main(){ | ^
s275392057
p03759
C++
#include <bits/stdc++.h> typedef long long ll; #define REP(i,n) for(int i=0;i<n;i++) #define ALL(x) (x).begin(),(x).end() using namespace std; //素因数分解 vector<pair<ll,int>> factorize(ll n){ vector<pair<ll,int>>res; for(ll i=2;i*i<=n;i++){ if(n%i)continue; res.emplace_back(i,0); while (n%i == 0) { n /= i; res.back().second++; } } if(n != 1) res.emplace_back(n,1); return res; } void trace(int A[],int N){ REP(i,N){ if(i>0)printf(" "); printf("%d",A[i]); } printf("\n"); } int main(){ int a,b,c; cin >> a >> b >> c; if(abs(b-a)==abs(c-b))puts("YES"); else puts("NO") }
a.cc: In function 'int main()': a.cc:37:20: error: expected ';' before '}' token 37 | else puts("NO") | ^ | ; 38 | } | ~
s216711765
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"; return 0; }
a.cc:1:9: fatal error: bits.stdc++.h: No such file or directory 1 | #include<bits.stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s910029882
p03759
C++
f=lambda x:x[0]-2*x[1]+x[2]==0 print('YES' if f(list(map(int,input().split()))) else 'NO')
a.cc:2:7: warning: multi-character character constant [-Wmultichar] 2 | print('YES' if f(list(map(int,input().split()))) else 'NO') | ^~~~~ a.cc:2:55: warning: multi-character character constant [-Wmultichar] 2 | print('YES' if f(list(map(int,input().split()))) else 'NO') | ^~~~ a.cc:1:1: error: 'f' does not name a type 1 | f=lambda x:x[0]-2*x[1]+x[2]==0 | ^
s034136659
p03759
C++
#include<bits/stdc++.h> using namespace std; #define int long long #define fo(a,b) for(int a=0;a<b;a++) #define Sort(a) sort(a.begin(),a.end()) #define rev(a) reverse(a.begin(),a.end()) #define fi first #define se second #define co(a) cout<<a<<endl #define sz size() #define bgn begin() #define en end() #define pb(a) push_back(a) #define pp() pop_back() #define V vector #define P pair #define V2(a,b,c) V<V<int>> a(b,V<int>(c)) #define V2a(a,b,c,d) V<V<int>> a(b,V<int>(c,d)) #define incin(a) int a; cin>>a #define yuko(a) setprecision(a) #define uni(a) a.erase(unique(a.begin(),a.end()),a.end()) #define pri priority_queue //#define min min<int> //#define max max<int> template<class T> void cou(vector<vector<T>> a){ int b=a.size(); int c=a[0].size(); fo(i,b){ fo(j,c){ cout<<a[i][j]; if(j==c-1) cout<<endl; else cout<<' '; } } } /*template<> void cou(vector<vector<char>> a){ int b=a.size(); int c=a[0].size(); fo(i,b){ fo(j,c){ cout<<a[i][j]; if(j==c-1) cout<<endl; else cout<<' '; } } }*/ int wari(int a,int b) { if(a%b==0) return a/b; else return a/b+1; } int keta(int a){ double b=a; b=log10(b); int c=b; return c+1; } int souwa(int a){ return a*(a+1)/2; } /*int lcm(int a,int b){ int d=a,e=b,f; if(a<b) swap(a,b); int c,m=1; while(m){ c=a%b; if(c==0){ f=b; m--; } else{ a=b; b=c; } } return d*e/f; } */ int gcm(int a,int b){ int d=a,e=b,f; if(a<b) swap(a,b); int c,m=1; while(m){ c=a%b; if(c==0){ f=b; m--; } else{ a=b; b=c; } } return f; }/* /*bool prime(int a){ if(a<2) return false; else if(a==2) return true; else if(a%2==0) return false; double b=sqrt(a); for(int i=3;i<=b;i+=2){ if(a%i==0){ return false; } } return true; }*/ struct Union{ vector<int> par; Union(int a){ par= vector<int>(a,-1); } int find(int a){ if(par[a]<0) return a; else return par[a]=find(par[a]); } bool same(int a,int b){ return find(a)==find(b); } int Size(int a){ return -par[find(a)]; } void unite(int a,int b){ a=find(a); b=find(b); if(a==b) return; if(Size(b)>Size(a)) swap<int>(a,b); par[a]+=par[b]; par[b]=a; } }; int ketas(int a){ string b=to_string(a); int c=0; fo(i,keta(a)){ c+=b[i]-'0'; } return c; } /*int gcm(int a,int b){ if(b==0) return a; return gcm(b,a%b); }*/ int lcm(int a,int b){ return a/gcm(a,b)*b; } /*struct aa{ vector<int> gt; aa(int n){ gt= vector<int>(n, 1); } void c(V<int> d,int b){ if(d[b]==0){ gt[d[b]-1]++; gt[gt.sz-1]++; } else{ gt[d[b]-1]++; c(d,d[d[b]]-1); } } void cok(int a){ cout<<gt[a-1]<<endl; fo(i,a-1) cout<<gt[i]<<endl; } }; */ /*struct dfs(){ }*/ bool fe(int a,int b){ a%=10; b%=10; if(a==0) a=10; if(b==0) b=10; if(a>b) return true; else return false; } int INF=1000000007; struct edge{int s,t,d; }; signed main(){ string a,b,c,i; cin >> a >> b; for(i=0; i<b.size(); i++){ c.pb (a.at(i)); c.pb (b.at(i)); } if(a.size() != b.size()) c.pb(a.at(i+1)); cout << c << endl; }
a.cc: In function 'int main()': a.cc:205:9: error: ambiguous overload for 'operator=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int') 205 | for(i=0; i<b.size(); i++){ | ^ In file included 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, from a.cc:1: /usr/include/c++/14/bits/basic_string.h:817:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 817 | operator=(const basic_string& __str) | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:828:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 828 | operator=(const _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:840:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 840 | operator=(_CharT __c) | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:858:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 858 | operator=(basic_string&& __str) | ^~~~~~~~ a.cc:205:13: error: no match for 'operator<' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}) 205 | for(i=0; i<b.size(); i++){ | ~^~~~~~~~~ | | | | | std::__cxx11::basic_string<char>::size_type {aka long unsigned int} | std::string {aka std::__cxx11::basic_string<char>} In file included from /usr/include/c++/14/regex:68, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181: /usr/include/c++/14/bits/regex.h:1143:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1143 | operator<(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1143:5: note: template argument deduction/substitution failed: a.cc:205:21: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 205 | for(i=0; i<b.size(); i++){ | ^ /usr/include/c++/14/bits/regex.h:1224:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)' 1224 | operator<(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1224:5: note: template argument deduction/substitution failed: a.cc:205:21: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 205 | for(i=0; i<b.size(); i++){ | ^ /usr/include/c++/14/bits/regex.h:1317:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)' 1317 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1317:5: note: template argument deduction/substitution failed: a.cc:205:21: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 205 | for(i=0; i<b.size(); i++){ | ^ /usr/include/c++/14/bits/regex.h:1391:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1391 | operator<(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1391:5: note: template argument deduction/substitution failed: a.cc:205:21: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 205 | for(i=0; i<b.size(); i++){ | ^ /usr/include/c++/14/bits/regex.h:1485:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1485 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1485:5: note: template argument deduction/substitution failed: a.cc:205:21: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 205 | for(i=0; i<b.size(); i++){ | ^ /usr/include/c++/14/bits/regex.h:1560:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1560 | operator<(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1560:5: note: template argument deduction/substitution failed: a.cc:205:21: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 205 | for(i=0; i<b.size(); i++){ | ^ /usr/include/c++/14/bits/regex.h:1660:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1660 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1660:5: note: template argument deduction/substitution failed: a.cc:205:21: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 205 | for(i=0; i<b.size(); i++){ | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51: /usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed: a.cc:205:21: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::pair<_T1, _T2>' 205 | for(i=0; i<b.size(); i++){ | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 448 | operator<(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed: a.cc:205:21: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 205 | for(i=0; i<b.size(); i++){ | ^ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 493 | operator<(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed: a.cc:205:21: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 205 | for(i=0; i<b.size(); i++){ | ^ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1694 | operator<(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed: a.cc:205:21: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 205 | for(i=0; i<b.size(); i++){ | ^ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1760 | operator<(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed: a.cc:205:21: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 205 | for(i=0; i<b.size(); i++){ | ^ In file included from /usr/include/c++/14/bits/basic_string.h:47: /usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 673 | operator< (basic_string_vi
s950839789
p03759
C
#include<stdio.h> int main() { int a,b,c; scanf("%d%d%d",&a,&b,&c); if(b-a==c-b){ printf("YES\n"); } else{ printf("NO\n"); return 0; }
main.c: In function 'main': main.c:15:1: error: expected declaration or statement at end of input 15 | } | ^
s741681995
p03759
C
#include<stdio.h> int main() { int a,b,c; scanf("%d%d%d",&a,&b,&c); if(b-a==c-b){ printf("YES\n"); } else{ printf("NO\n"); return 0;
main.c: In function 'main': main.c:14:1: error: expected declaration or statement at end of input 14 | return 0; | ^~~~~~ main.c:14:1: error: expected declaration or statement at end of input
s691296652
p03759
C
#include<stdio.h> Int main() { int a,b,c; scanf("%d%d%d",&a,&b,&c); if(b-a==c-b){ printf("YES\n"); } else{ printf("NO\n"); return 0;
main.c:2:1: error: unknown type name 'Int'; did you mean 'int'? 2 | Int main() | ^~~ | int main.c: In function 'main': main.c:14:1: error: expected declaration or statement at end of input 14 | return 0; | ^~~~~~ main.c:14:1: error: expected declaration or statement at end of input
s809554222
p03759
C
#include<stdio.h> int main() { Int a,b,c; scanf("%d%d%d",&a,&b,&c); if(b-a==c-b){ printf("YES\n"); } else{ printf("NO\n"); return 0;
main.c: In function 'main': main.c:4:1: error: unknown type name 'Int'; did you mean 'int'? 4 | Int a,b,c; | ^~~ | int main.c:14:1: error: expected declaration or statement at end of input 14 | return 0; | ^~~~~~ main.c:14:1: error: expected declaration or statement at end of input
s817509690
p03759
C
#include<stdio.h> Int main() { Int a,b,c; scanf("%d%d%d",&a,&b,&c); if(b-a==c-b){ printf("YES\n"); } else{ printf("NO\n"); return 0;
main.c:2:1: error: unknown type name 'Int'; did you mean 'int'? 2 | Int main() | ^~~ | int main.c: In function 'main': main.c:4:1: error: unknown type name 'Int'; did you mean 'int'? 4 | Int a,b,c; | ^~~ | int main.c:14:1: error: expected declaration or statement at end of input 14 | return 0; | ^~~~~~ main.c:14:1: error: expected declaration or statement at end of input
s052003187
p03759
Java
import java.util.*; class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int A = sc.nextInt(); int B = sc.nextInt(); int C = sc.nextInt(); if(2B == A + C){ System.out.println("YES"); }else{ System.out.println("NO"); } } }
Main.java:10: error: ')' expected if(2B == A + C){ ^ Main.java:10: error: not a statement if(2B == A + C){ ^ Main.java:10: error: ';' expected if(2B == A + C){ ^ Main.java:12: error: 'else' without 'if' }else{ ^ 4 errors
s897677244
p03759
C++
#include <bits/stdc++.h> using namespace std; #define LOOP(i,o) for(i=0;i<o;i++) #define ALL(a) (a).begin(),(a).end() int main() { int n; cin>>n; vector<string> s(n); int i=0; LOOP(i,n){ cin>>s[i]; sort(ALL(s[i])); } vector<int> a(26,51); LOOP(i,n){ for(int j=0;j<s.at(i).size();j++){ int hh=1; if(s[i][j]==s[i][j+1]){ hh++; continue; } else{ a[s[i][j]-'a']=min(a[s[i][j]-'a'],hh); } } } for(int i=0;i<26;i++){ if(a[i]==51) a[i]=0; } LOOP(i,26){ for(int j=0;j<a[i];j++){ ans+=(char)(i+'a'); } } cout<<ans<<endl; }
a.cc: In function 'int main()': a.cc:32:7: error: 'ans' was not declared in this scope; did you mean 'abs'? 32 | ans+=(char)(i+'a'); | ^~~ | abs a.cc:35:9: error: 'ans' was not declared in this scope; did you mean 'abs'? 35 | cout<<ans<<endl; | ^~~ | abs
s668298495
p03759
C++
(print (if (= (+ (- (read) (* 2 (read))) (read)) 0) "YES" "NO"))
a.cc:1:7: error: expected ')' before '(' token 1 | (print (if (= (+ (- (read) (* 2 (read))) (read)) 0) "YES" "NO")) | ~ ^~ | )
s756538054
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; }
a.cc: In function 'int main()': a.cc:6:13: error: lvalue required as left operand of assignment 6 | if(b-a=c-b){ | ~^~
s961935517
p03759
C++
#include<bits/stdc++.h> using namespace std; int main() { int a[3]; for(int i=0;i<3;i++) { cin>>a[i]; } sort(a,a+3) if((a[1]-a[0])==(a[2]-a[1])) { cout<<"YES"<<endl; } else { cout<<"NO"<<endl; } }
a.cc: In function 'int main()': a.cc:10:14: error: expected ';' before 'if' 10 | sort(a,a+3) | ^ | ; 11 | if((a[1]-a[0])==(a[2]-a[1])) | ~~ a.cc:15:3: error: 'else' without a previous 'if' 15 | else | ^~~~
s885549951
p03759
C++
#include <bits/stdc++.h> using namespace std; int main() { int n,m,h; cin>>n>>m>h; if(b-a==c-b) cout<<"YES"<<endl; else cout<<"NO"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:14: error: no match for 'operator>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int') 7 | cin>>n>>m>h; | ~~~~~~~~~^~ | | | | | int | std::basic_istream<char>::__istream_type {aka std::basic_istream<char>} a.cc:7:14: note: candidate: 'operator>(int, int)' (built-in) 7 | cin>>n>>m>h; | ~~~~~~~~~^~ a.cc:7:14: 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/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:1176:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator>(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1176 | operator>(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1176:5: note: template argument deduction/substitution failed: a.cc:7:15: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | cin>>n>>m>h; | ^ /usr/include/c++/14/bits/regex.h:1236:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator>(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)' 1236 | operator>(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1236:5: note: template argument deduction/substitution failed: a.cc:7:15: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' 7 | cin>>n>>m>h; | ^ /usr/include/c++/14/bits/regex.h:1329:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator>(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)' 1329 | operator>(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1329:5: note: template argument deduction/substitution failed: a.cc:7:15: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | cin>>n>>m>h; | ^ /usr/include/c++/14/bits/regex.h:1403:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1403 | operator>(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1403:5: note: template argument deduction/substitution failed: a.cc:7:15: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 7 | cin>>n>>m>h; | ^ /usr/include/c++/14/bits/regex.h:1497:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1497 | operator>(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1497:5: note: template argument deduction/substitution failed: a.cc:7:15: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | cin>>n>>m>h; | ^ /usr/include/c++/14/bits/regex.h:1573:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1573 | operator>(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1573:5: note: template argument deduction/substitution failed: a.cc:7:15: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 7 | cin>>n>>m>h; | ^ /usr/include/c++/14/bits/regex.h:1673:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1673 | operator>(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1673:5: note: template argument deduction/substitution failed: a.cc:7:15: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | cin>>n>>m>h; | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51: /usr/include/c++/14/bits/stl_pair.h: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:7:15: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::pair<_T1, _T2>' 7 | cin>>n>>m>h; | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /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:7:15: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 7 | cin>>n>>m>h; | ^ /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:7:15: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 7 | cin>>n>>m>h; | ^ /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:7:15: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 7 | cin>>n>>m>h; | ^ /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:7:15: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 7 | cin>>n>>m>h; | ^ 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: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:7:15: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 7 | cin>>n>>m>h; | ^ /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:7:15: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 7 | cin>>n>>m>h; | ^ /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:7:15: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int' 7 | cin>>n>>m>h; | ^ /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>(con
s649962066
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"; return 0; }
a.cc:1:23: error: missing terminating > character 1 | #include<bits/stdc++.h | ^
s343483256
p03759
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define all(x) (x).begin(),(x).end() #define pb push_back typedef long long ll; const int INF = 1000000000; const long INF64 = 1000000000000000ll; const ll MOD = 1000000007ll; int main(){ int a>>b>>c; std::cin >> a>>b>>c; if(b-a==c-b)std::cout << "YES" << std::endl; else std::cout << "NO" << std::endl; }
a.cc: In function 'int main()': a.cc:13:14: error: expected initializer before '>>' token 13 | int a>>b>>c; | ^~ a.cc:14:21: error: 'a' was not declared in this scope 14 | std::cin >> a>>b>>c; | ^ a.cc:14:24: error: 'b' was not declared in this scope; did you mean 'pb'? 14 | std::cin >> a>>b>>c; | ^ | pb a.cc:14:27: error: 'c' was not declared in this scope 14 | std::cin >> a>>b>>c; | ^
s342107521
p03759
C++
<>!~/ .* /;print$`-$&*2+$'?NO:YES
a.cc:1:18: error: stray '`' in program 1 | <>!~/ .* /;print$`-$&*2+$'?NO:YES | ^ a.cc:1:26: warning: missing terminating ' character 1 | <>!~/ .* /;print$`-$&*2+$'?NO:YES | ^ a.cc:1:26: error: missing terminating ' character 1 | <>!~/ .* /;print$`-$&*2+$'?NO:YES | ^~~~~~~~ a.cc:1:1: error: expected unqualified-id before '<' token 1 | <>!~/ .* /;print$`-$&*2+$'?NO:YES | ^ a.cc:1:12: error: 'print$' does not name a type 1 | <>!~/ .* /;print$`-$&*2+$'?NO:YES | ^~~~~~
s534156040
p03759
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; if(b-a==c-b) { cout << "YES" << endl: } else { cout << "NO" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:8:26: error: expected ';' before ':' token 8 | cout << "YES" << endl: | ^ | ;
s801722869
p03759
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; if(b-a=c-b) { cout << "YES" << endl: } else { cout << "NO" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:7:7: error: lvalue required as left operand of assignment 7 | if(b-a=c-b) { | ~^~ a.cc:8:26: error: expected ';' before ':' token 8 | cout << "YES" << endl: | ^ | ;
s447929270
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:6:16: error: 'C' was not declared in this scope 6 | cin>>a>>b>>C; | ^
s877064294
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:6:11: error: expected initializer before '.' token 6 | int a, b. c; | ^ a.cc:7:15: error: 'b' was not declared in this scope 7 | cin >> a >> b >> c; | ^ a.cc:7:20: error: 'c' was not declared in this scope 7 | cin >> a >> b >> c; | ^
s776060241
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"; return 0; }
a.cc: In function 'int main()': a.cc:8:23: error: expected ';' before 'cout' 8 | if ((b - a == c - b) cout << "YES"; | ^~~~~ | ; a.cc:9:3: error: expected primary-expression before 'else' 9 | else cout << "NO"; | ^~~~ a.cc:8:38: error: expected ')' before 'else' 8 | if ((b - a == c - b) cout << "YES"; | ~ ^ | ) 9 | else cout << "NO"; | ~~~~
s845669817
p03759
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b ,c; cin >> a >> b >> c; if ((abs(a-b) == abs(b-c)) cout << "YES"; else cout << "NO"; return 0; }
a.cc: In function 'int main()': a.cc:8:29: error: expected ';' before 'cout' 8 | if ((abs(a-b) == abs(b-c)) cout << "YES"; | ^~~~~ | ; a.cc:9:3: error: expected primary-expression before 'else' 9 | else cout << "NO"; | ^~~~ a.cc:8:44: error: expected ')' before 'else' 8 | if ((abs(a-b) == abs(b-c)) cout << "YES"; | ~ ^ | ) 9 | else cout << "NO"; | ~~~~
s390396826
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" return 0; }
a.cc: In function 'int main()': a.cc:8:18: error: expected ';' before 'else' 8 | cout << "YES" | ^ | ; 9 | else | ~~~~
s646059615
p03759
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a, b, c; cin >> a >> b >> c; if( abs(a-b) == abs(b-c) ) cout << "YES" else cout << "NO" return 0; }
a.cc: In function 'int main()': a.cc:8:18: error: expected ';' before 'else' 8 | cout << "YES" | ^ | ; 9 | else | ~~~~
s055387134
p03759
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(ll i=0; i<n; i++) typedef long long ll; typedef long long unsigned int llu; ll mod = 1000000007; void solve(){ int a,b,c; cin >> a >> b >> c; if(b-a==c-b) cout << "YES" << endl; else cout << "NO" << endll } int main(){ cin.tie(0); ios::sync_with_stdio(false); solve(); return 0; }
a.cc: In function 'void solve()': a.cc:14:26: error: 'endll' was not declared in this scope 14 | else cout << "NO" << endll | ^~~~~
s925383022
p03759
C++
function Main(input){ input=input.split("\n"); tmp=input[0].split(" "); var a = parseInt(tmp[0], 10); var b = parseInt(tmp[1], 10); var c = parseInt(tmp[2], 10); if(b-a == c-b){ console.log("YES"); }else{ console.log("NO"); } } Main(require("fs").readFileSync("/dev/stdin", "utj8"));
a.cc:1:1: error: 'function' does not name a type; did you mean 'union'? 1 | function Main(input){ | ^~~~~~~~ | union a.cc:14:5: error: expected constructor, destructor, or type conversion before '(' token 14 | Main(require("fs").readFileSync("/dev/stdin", "utj8")); | ^
s559308222
p03759
C++
#include <iostream> using namespace std; int main(void){ int a, b, c; cin >> a >> b >> c; if(b - a == c -b) cout << "YES" << endl; else cout << "NO" << endl;
a.cc: In function 'int main()': a.cc:11:30: error: expected '}' at end of input 11 | cout << "NO" << endl; | ^ a.cc:3:15: note: to match this '{' 3 | int main(void){ | ^
s948696338
p03759
C++
#include <bits/stdc++.h> using namespace std; int main() { int A; int B; int 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) | ~^~
s123378562
p03759
C++
#include<bits/stdc++.h> using namespace std; int main(){int a,b,c;cin>>a>>b>>c;cout<<b-a==c-b?"YES":"NO"<<endl;}
a.cc: In function 'int main()': a.cc:3:44: error: no match for 'operator==' (operand types are 'std::basic_ostream<char>' and 'int') 3 | int main(){int a,b,c;cin>>a>>b>>c;cout<<b-a==c-b?"YES":"NO"<<endl;} | ~~~~~~~~~^~~~~ | | | | | int | std::basic_ostream<char> a.cc:3:44: note: candidate: 'operator==(int, int)' (built-in) 3 | int main(){int a,b,c;cin>>a>>b>>c;cout<<b-a==c-b?"YES":"NO"<<endl;} | ~~~~~~~~~^~~~~ a.cc:3:44: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'int' In file included from /usr/include/c++/14/regex:68, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181, from a.cc:1: /usr/include/c++/14/bits/regex.h:1103:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1103 | operator==(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1103:5: note: template argument deduction/substitution failed: a.cc:3:48: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 3 | int main(){int a,b,c;cin>>a>>b>>c;cout<<b-a==c-b?"YES":"NO"<<endl;} | ^ /usr/include/c++/14/bits/regex.h:1199:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)' 1199 | operator==(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1199:5: note: template argument deduction/substitution failed: a.cc:3:48: note: 'std::basic_ostream<char>' is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' 3 | int main(){int a,b,c;cin>>a>>b>>c;cout<<b-a==c-b?"YES":"NO"<<endl;} | ^ /usr/include/c++/14/bits/regex.h:1274:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)' 1274 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1274:5: note: template argument deduction/substitution failed: a.cc:3:48: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 3 | int main(){int a,b,c;cin>>a>>b>>c;cout<<b-a==c-b?"YES":"NO"<<endl;} | ^ /usr/include/c++/14/bits/regex.h:1366:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1366 | operator==(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1366:5: note: template argument deduction/substitution failed: a.cc:3:48: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 3 | int main(){int a,b,c;cin>>a>>b>>c;cout<<b-a==c-b?"YES":"NO"<<endl;} | ^ /usr/include/c++/14/bits/regex.h:1441:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1441 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1441:5: note: template argument deduction/substitution failed: a.cc:3:48: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 3 | int main(){int a,b,c;cin>>a>>b>>c;cout<<b-a==c-b?"YES":"NO"<<endl;} | ^ /usr/include/c++/14/bits/regex.h:1534:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1534 | operator==(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1534:5: note: template argument deduction/substitution failed: a.cc:3:48: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 3 | int main(){int a,b,c;cin>>a>>b>>c;cout<<b-a==c-b?"YES":"NO"<<endl;} | ^ /usr/include/c++/14/bits/regex.h:1613:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1613 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1613:5: note: template argument deduction/substitution failed: a.cc:3:48: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 3 | int main(){int a,b,c;cin>>a>>b>>c;cout<<b-a==c-b?"YES":"NO"<<endl;} | ^ /usr/include/c++/14/bits/regex.h:2186:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator==(const match_results<_BiIter, _Alloc>&, const match_results<_BiIter, _Alloc>&)' 2186 | operator==(const match_results<_Bi_iter, _Alloc>& __m1, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:2186:5: note: template argument deduction/substitution failed: a.cc:3:48: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::match_results<_BiIter, _Alloc>' 3 | int main(){int a,b,c;cin>>a>>b>>c;cout<<b-a==c-b?"YES":"NO"<<endl;} | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51: /usr/include/c++/14/bits/stl_pair.h:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed: a.cc:3:48: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>' 3 | int main(){int a,b,c;cin>>a>>b>>c;cout<<b-a==c-b?"YES":"NO"<<endl;} | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 441 | operator==(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed: a.cc:3:48: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 3 | int main(){int a,b,c;cin>>a>>b>>c;cout<<b-a==c-b?"YES":"NO"<<endl;} | ^ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 486 | operator==(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed: a.cc:3:48: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 3 | int main(){int a,b,c;cin>>a>>b>>c;cout<<b-a==c-b?"YES":"NO"<<endl;} | ^ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1667 | operator==(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed: a.cc:3:48: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 3 | int main(){int a,b,c;cin>>a>>b>>c;cout<<b-a==c-b?"YES":"NO"<<endl;} | ^ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1737 | operator==(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed: a.cc:3:48: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 3 | int main(){int a,b,c;cin>>a>>b>>c;cout<<b-a==c-b?"YES":"NO"<<endl;} | ^ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)' 192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed: a.cc:3:48: note: 'std::basic_ostream<char>' is not derived from 'const std::fpos<_StateT>' 3 | int main(){int a,b,c;cin>>a>>b>>c;cout<<b-a==c-b?"YES":"NO"<<endl;} | ^ In file included from /usr/include/c++/14/str
s397432809
p03759
C++
#include<iostream> using namespace std; #include<bits/stdc++.h> int main(){ int a, b, c; cin >> a >> b >> c; int k = abs(b-a); int l = abs(c-b); if (k==l&&K!=0){ cout << "YES" << endl; } else { cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:10:14: error: 'K' was not declared in this scope 10 | if (k==l&&K!=0){ | ^