submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3 values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s694230086 | p03943 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
if(a==b+c)
cout<<Yes<<endl;
else if(b==a+c)
cout<<Yes<<endl;
else if(c==a+b)
cout<<Yes<<endl;
else
cout<<No<<endl;
} | a.cc: In function 'int main()':
a.cc:7:11: error: 'Yes' was not declared in this scope
7 | cout<<Yes<<endl;
| ^~~
a.cc:9:11: error: 'Yes' was not declared in this scope
9 | cout<<Yes<<endl;
| ^~~
a.cc:11:11: error: 'Yes' was not declared in this scope
11 | cout<<Yes<<endl;
| ^~~
a.cc:13:11: error: 'No' was not declared in this scope
13 | cout<<No<<endl;
| ^~
|
s462796438 | p03943 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
switch((a+b+c)/3){
case a:
case b:
case c:
cout<<"Yes";
break;
default:
cout<<"No";
break;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:10: error: the value of 'a' is not usable in a constant expression
7 | case a:
| ^
a.cc:4:7: note: 'int a' is not const
4 | int a,b,c;
| ^
a.cc:7:10: error: the value of 'a' is not usable in a constant expression
7 | case a:
| ^
a.cc:4:7: note: 'int a' is not const
4 | int a,b,c;
| ^
a.cc:8:10: error: the value of 'b' is not usable in a constant expression
8 | case b:
| ^
a.cc:4:9: note: 'int b' is not const
4 | int a,b,c;
| ^
a.cc:8:10: error: the value of 'b' is not usable in a constant expression
8 | case b:
| ^
a.cc:4:9: note: 'int b' is not const
4 | int a,b,c;
| ^
a.cc:9:10: error: the value of 'c' is not usable in a constant expression
9 | case c:
| ^
a.cc:4:11: note: 'int c' is not const
4 | int a,b,c;
| ^
a.cc:9:10: error: the value of 'c' is not usable in a constant expression
9 | case c:
| ^
a.cc:4:11: note: 'int c' is not const
4 | int a,b,c;
| ^
|
s911476667 | p03943 | C++ | #include <bits/stdc++.h>
using namespace std;
int main () {
int a, b, c;
if (a == b + c) {
cout << "Yes" << endl;
}
else if (b == a + c) {
cout << "Yes" << endl;
}
else if (c == a + b) {
cout << "Yes" << endl;
}
else {
cout << "No" << endl;
}
}
}
| a.cc:20:1: error: expected declaration before '}' token
20 | }
| ^
|
s099446843 | p03943 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
int ans=(a+b+c)/3;
if((ans==a||ans==b)||ans==c)
cout<<Yes<<endl;
else
cout<<No<<endl;
} | a.cc: In function 'int main()':
a.cc:8:11: error: 'Yes' was not declared in this scope
8 | cout<<Yes<<endl;
| ^~~
a.cc:10:11: error: 'No' was not declared in this scope
10 | cout<<No<<endl;
| ^~
|
s310730429 | p03943 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b,c,sum;
cin >> a >> b >> c;
sum==a+b+c;
sum%=3;
if (sum==0){
cout << "Yes" << endl;
}
else{
cout << "No" << end;
}
} | a.cc: In function 'int main()':
a.cc:15:18: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
15 | cout << "No" << end;
| ~~~~~~~~~~~~~^~~~~~
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127,
from a.cc:1:
/usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'}
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]'
125 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
125 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
135 | operator<<(ios_base& (*__pf) (ios_base&))
| ^~~~~~~~
/usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)'
135 | operator<<(ios_base& (*__pf) (ios_base&))
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
174 | operator<<(long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long int'
174 | operator<<(long __n)
| ~~~~~^~~
/usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
178 | operator<<(unsigned long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long unsigned int'
178 | operator<<(unsigned long __n)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
182 | operator<<(bool __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool'
182 | operator<<(bool __n)
| ~~~~~^~~
In file included from /usr/include/c++/14/ostream:1022:
/usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]'
96 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int'
97 | operator<<(short __n)
| ~~~~~~^~~
/usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
189 | operator<<(unsigned short __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short unsigned int'
189 | operator<<(unsigned short __n)
| ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]'
110 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int'
111 | operator<<(int __n)
| ~~~~^~~
/usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
200 | operator<<(unsigned int __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'unsigned int'
200 | operator<<(unsigned int __n)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
211 | operator<<(long long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int'
211 | operator<<(long long __n)
| ~~~~~~~~~~^~~
/usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
215 | operator<<(unsigned long long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long unsigned int'
215 | operator<<(unsigned long long __n)
| ~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
231 | operator<<(double __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:231:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'double'
231 | operator<<(double __f)
| ~~~~~~~^~~
/usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
235 | operator<<(float __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:235:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float'
235 | operator<<(float __f)
| ~~~~~~^~~
/usr/include/c++/14/ostream:243:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
243 | operator<<(long double __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:243:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long double'
243 | operator<<(long double __f)
| ~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:301:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
301 | operator<<(const void* __p)
| ^~~~~~~~
/usr/include/c++/14/ostream:301:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const void*'
301 | operator<<(const void* __p)
| ~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:306:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::nullptr_t) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; std::nullptr_t = std::nullptr_t]'
306 | |
s280848568 | p03943 | C++ | /*
IftekharMd.Shishir
Dept. of Information and Communication Engineering
University of Rajshahi
30.05.20
*/
#include<bits/stdc++.h>
#include<iostream>
#include<stdio.h>
#include<vector>
#include<array>
#include<map>
#include<set>
#include<tuple>
#include<cmath>
#include<string>
#include<queue>
#include<sstream>
#include<stdlib.h>
#include<iterator>
#define ll long long int
#define ull unsigned long long int
#define f(i,n) for(i=0;i<n;i++)
#define F(i,n) for(i=n-1;i>=0;i--)
#define fa(i,a,b) for(i=a;i<=b;i++)
#define Fa(i,a,b) for(i=a;i>=b;i--)
#define LT(i,a,n) f(i,n)cout<<a[i]<<" "; cout<<endl;
#define vec vector<long long int>
#define vecit vec::iterator
#define ved vector<double>
#define st set<ll>
#define stid set<ll,greater<ll> >
#define stit set<ll>::iterator
#define Mst multiset<ll>
#define Mstid multiset<ll,greater<ll> >
#define Mstit multiset<ll>::iterator
#define mpi map<ll,ll>
#define mps map<string,ll>
#define mpit mp::iterator
#define mpsit mps::iterator
#define pi pair<ll,ll>
#define ps pair<string,ll>
#define ary(x) array<ll,x> // a.at a.fill(x) a.swap(b)
#define que queue<ll>
#define tpl tuple<ll,ll,ll> //a=make_tuple(x, y, z) get<0>(a)
#define pb(x) push_back(x)
#define pob() pop_back()
#define all(a) a.begin(),a.end()
#define sor(a) sort(a.begin(),a.end())
#define rev(a) reverse(a.begin(),a.end())
#define ins(a,x) insert(a.begin(),x)
#define mem(a,x) memset(a,x,sizeof(a)) // Array filling
#define bs binary_search
#define lb lower_bound
#define ub upper_bound
#define mp make_pair
#define FastIO ios::sync_with_stdio(false);cin.tie(nullptr);
#define points(x) fixed<<setprecision(x)
#define gcd(x,y) __gcd(x,y)
#define scd(a,x,y) a/gcd(x,y);
#define nl cout<<endl;
#define done return 0
const double PI= 2*acos(0.0);
const long long MOD= 1000000007;
/*----------[ string to integer ]--------------
string str; int x=0;
stringstream demo(str);
demo >> x;
cout<< x <<endl;
*/
/*----------[ integer to string ]--------------
string name; int x=345;
stringstream demo;
demo << x;
name=demo.str();
cout<< name <<endl;
*/
using namespace std;
int main()
{
FastIO;
ll n;
cin>>a>>b>>c;
ll k=max(a,max(b,c));
ll s=a+b+c;
if(k==(s-k))
{
cout<<"Yes"<<endl;
}
else cout<<"No"<<endl;
done;
} | a.cc: In function 'int main()':
a.cc:97:10: error: 'a' was not declared in this scope
97 | cin>>a>>b>>c;
| ^
a.cc:97:13: error: 'b' was not declared in this scope
97 | cin>>a>>b>>c;
| ^
a.cc:97:16: error: 'c' was not declared in this scope
97 | cin>>a>>b>>c;
| ^
|
s852990294 | p03943 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
// 整数の入力
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
if(a>=b&&a>=c){
if(a=(b+c)){
System.out.println("Yes");
}else{
System.out.println("No");
}
}elseif(b>=a&&b>=c){
if(b==(a+c)){
System.out.println("Yes");
}else{
System.out.println("No");
}
}elseif(c>=a&&c>=b){
if(c==(a+b)){
System.out.println("Yes");
}else{
System.out.println("No");
}
}
}
} | Main.java:16: error: ';' expected
}elseif(b>=a&&b>=c){
^
Main.java:22: error: ';' expected
}elseif(c>=a&&c>=b){
^
2 errors
|
s185874377 | p03943 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
// 整数の入力
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
if(a>=b&&a>=c){
if(a=(b+c)){
System.out.println("Yes");
}else{
System.out.println("No");
}
}elseif(b>=a&&b>=c){
if(b==(a+c)){
System.out.println("Yes");
}else{
System.out.println("No");
}
}elseif(c>=a&&c>=b){
if(c==(a+b)){
System.out.println("Yes");
}else{
System.out.println("No");
}
}
}
} | Main.java:16: error: ';' expected
}elseif(b>=a&&b>=c){
^
Main.java:22: error: ';' expected
}elseif(c>=a&&c>=b){
^
2 errors
|
s921150982 | p03943 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
// 整数の入力
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
if(a>=b&&a>=c){
if(a=(b+c)){
System.out.println("Yes");
}else{
System.out.println("No");
}
}elseif(b>=a&&b?=c){
if(b==(a+c)){
System.out.println("Yes");
}else{
System.out.println("No");
}
}elseif(c>=a&&c>=b){
if(c==(a+b)){
System.out.println("Yes");
}else{
System.out.println("No");
}
}
}
} | Main.java:16: error: illegal start of expression
}elseif(b>=a&&b?=c){
^
Main.java:16: error: : expected
}elseif(b>=a&&b?=c){
^
Main.java:16: error: ';' expected
}elseif(b>=a&&b?=c){
^
Main.java:22: error: ';' expected
}elseif(c>=a&&c>=b){
^
4 errors
|
s112615108 | p03943 | C++ | #include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include <math.h>
#include <cstdlib>
#define rep(i,x) for(int i=0;i<x;i++)
#define all(a) (a).begin(),(a).end()
using namespace std;
using ld = long double;
using ll = long long;
const ll INF = 10010010010;
typedef pair<ll, ll> P;
const ll mod = 1000000007;
ll gcd(ll a, ll b) {//a>b
if (a < b)swap(a, b);
if (a % b == 0) return b;
else return gcd(b, a % b);
}
int main() {
ll N, K, X;
cin >> N >> K >> X;
if(N + K == X || N + X == K || K + X = N)cout << "YES" << endl;
else cout << "NO" << endl;
} | a.cc: In function 'int main()':
a.cc:37:31: error: lvalue required as left operand of assignment
37 | if(N + K == X || N + X == K || K + X = N)cout << "YES" << endl;
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
|
s801448284 | p03943 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
int main() {
int a,b,c;cin>>a>>b>>C;
if(a+b==c||a+c==b||b+c==a) cout << "Yes" << endl;
else cout << "No" << endl;
}
| a.cc: In function 'int main()':
a.cc:7:24: error: 'C' was not declared in this scope
7 | int a,b,c;cin>>a>>b>>C;
| ^
|
s708637869 | p03943 | C++ | #include <iostream>
using namespace std;
int main( void )
{
int a, b, c;
cin >> a >> b >> c;
if ( a == ( b + c ) || b == ( a + c ) || c = ( b + a ) )
{
cout << "Yes";
}
else
{
cout << "No";
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:43: error: lvalue required as left operand of assignment
8 | if ( a == ( b + c ) || b == ( a + c ) || c = ( b + a ) )
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
|
s845064720 | p03943 | Java | import java.util.*;
import javax.lang.model.util.ElementScanner6;
public class ABC047_A {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
int[] arr = { a, b, c };
Arrays.sort(arr);
if (arr[0] + arr[1] == arr[2]) {
System.out.println("Yes");
} else {
System.out.println("No");
}
}
}
| Main.java:5: error: class ABC047_A is public, should be declared in a file named ABC047_A.java
public class ABC047_A {
^
1 error
|
s648365617 | p03943 | Java | import java.util.*;
import javax.lang.model.util.ElementScanner6;
public class ABC047_A {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
int[] arr = { a, b, c };
Arrays.sort(arr);
if (arr[0] + arr[1] == arr[2]) {
System.out.println("Yes");
} else {
System.out.println("No");
}
}
}
| Main.java:5: error: class ABC047_A is public, should be declared in a file named ABC047_A.java
public class ABC047_A {
^
1 error
|
s179987357 | p03943 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int[] n=new int[3];
n[0]=sc.nextInt(),n[1]=sc.nextInt(),n[2]=sc.nextInt();
Arrays.sort(n);
if(n[0]+n[1]==n[2]){
System.out.println("Yes");
}else{
System.out.println("No");
}
}
}
| Main.java:7: error: ';' expected
n[0]=sc.nextInt(),n[1]=sc.nextInt(),n[2]=sc.nextInt();
^
Main.java:7: error: ';' expected
n[0]=sc.nextInt(),n[1]=sc.nextInt(),n[2]=sc.nextInt();
^
2 errors
|
s568719524 | p03943 | Java | import java.io.BufferedReader;
import java.io.*;
import java.util.*;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Collections;
public class Main {
public static void main(final String[] args){
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
if(a >= b && a >= c){
if(a == b + c){
System.out.println("Yes");
}else{
System.out.println("No");
}
}else if(b >= a && b >= c){
if(b == a + c){
System.out.println("Yes");
}else{
Sytem.out.println("No");
}
}else{
if(c == a + b){
System.out.println("Yes");
}else{
System.out.println("No");
}
}
}
} | Main.java:26: error: package Sytem does not exist
Sytem.out.println("No");
^
1 error
|
s834786654 | p03943 | C | #include<stdio.h>
{
int main()
{
int a,b,c;
if(a+b==c || a+c==b || b+c==a){
printf("Yes");
}
else{
printf("No");
}
}
return 0;
}
| main.c:2:1: error: expected identifier or '(' before '{' token
2 | {
| ^
|
s335963977 | p03943 | C | include<stdio.h>
int main()
{
int a,b,c;
if(a+b==c || a+c==b || b+c==a){
printf("Yes");
}
else{
printf("No");
}
return 0;
} | main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
|
s375383231 | p03943 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
if (a == b+c || b == a+c || c == a+b) {
cout << "Yes" << end;
} else {
cout << "No" << end;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:9:19: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
9 | cout << "Yes" << end;
| ~~~~~~~~~~~~~~^~~~~~
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127,
from a.cc:1:
/usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'}
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]'
125 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
125 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
135 | operator<<(ios_base& (*__pf) (ios_base&))
| ^~~~~~~~
/usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)'
135 | operator<<(ios_base& (*__pf) (ios_base&))
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
174 | operator<<(long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long int'
174 | operator<<(long __n)
| ~~~~~^~~
/usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
178 | operator<<(unsigned long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long unsigned int'
178 | operator<<(unsigned long __n)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
182 | operator<<(bool __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool'
182 | operator<<(bool __n)
| ~~~~~^~~
In file included from /usr/include/c++/14/ostream:1022:
/usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]'
96 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int'
97 | operator<<(short __n)
| ~~~~~~^~~
/usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
189 | operator<<(unsigned short __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short unsigned int'
189 | operator<<(unsigned short __n)
| ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]'
110 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int'
111 | operator<<(int __n)
| ~~~~^~~
/usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
200 | operator<<(unsigned int __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'unsigned int'
200 | operator<<(unsigned int __n)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
211 | operator<<(long long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int'
211 | operator<<(long long __n)
| ~~~~~~~~~~^~~
/usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
215 | operator<<(unsigned long long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long unsigned int'
215 | operator<<(unsigned long long __n)
| ~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
231 | operator<<(double __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:231:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'double'
231 | operator<<(double __f)
| ~~~~~~~^~~
/usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
235 | operator<<(float __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:235:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float'
235 | operator<<(float __f)
| ~~~~~~^~~
/usr/include/c++/14/ostream:243:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
243 | operator<<(long double __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:243:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long double'
243 | operator<<(long double __f)
| ~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:301:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
301 | operator<<(const void* __p)
| ^~~~~~~~
/usr/include/c++/14/ostream:301:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const void*'
301 | operator<<(const void* __p)
| ~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:306:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::nullptr_t) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; std::nullptr_t = std::nullptr_t]'
306 | |
s704194098 | p03943 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b,c;
scanf("%d %d %d",&a,&b,&c);1
if(a==b+c || b==a+c || c==b+a)
{
cout<<"Yes"<<endl;
}
else
cout<<"No"<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:29: error: expected ';' before 'if'
10 | scanf("%d %d %d",&a,&b,&c);1
| ^
| ;
11 | if(a==b+c || b==a+c || c==b+a)
| ~~
a.cc:15:9: error: 'else' without a previous 'if'
15 | else
| ^~~~
|
s707525322 | p03943 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b,c;
scanf("%d %d %d",&a,&b,&c);1
if(a==b+c || b==a+c || c==b+a)
{
cout<<"Yes"<<endl;
}
else
cout<<"No"<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:29: error: expected ';' before 'if'
10 | scanf("%d %d %d",&a,&b,&c);1
| ^
| ;
11 | if(a==b+c || b==a+c || c==b+a)
| ~~
a.cc:15:9: error: 'else' without a previous 'if'
15 | else
| ^~~~
|
s483603184 | p03943 | C++ | //#include <tourist>
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> p;
const int INF = 1e9;
const ll LINF = ll(1e18);
const int MOD = 1000000007;
const int dx[4] = {0, 1, 0, -1}, dy[4] = {-1, 0, 1, 0};
const int Dx[8] = {0, 1, 1, 1, 0, -1, -1, -1}, Dy[8] = {-1, -1, 0, 1, 1, 1, 0, -1};
#define yes cout << "Yes" << endl
#define YES cout << "YES" << endl
#define no cout << "No" << endl
#define NO cout << "NO" << endl
#define rep(i, n) for (int i = 0; i < n; i++)
#define ALL(v) v.begin(), v.end()
#define debug(v) \
cout << #v << ":"; \
for (auto x : v) \
{ \
cout << x << ' '; \
} \
cout << endl;
template <class T>
bool chmax(T &a, const T &b)
{
if (a < b)
{
a = b;
return 1;
}
return 0;
}
template <class T>
bool chmin(T &a, const T &b)
{
if (b < a)
{
a = b;
return 1;
}
return 0;
}
//cout<<fixed<<setprecision(15);有効数字15桁
//-std=c++14
//-std=gnu++17
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
ll n, m;
vector<int>a;
int main()
{
cin.tie(0);
ios::sync_with_stdio(false);
a.resize(3);
rep(i,3)cin>>a[i];
sort(ALL(a));
if(a[0]+a[1]==a[2])yes;
no no;
}
| a.cc: In function 'int main()':
a.cc:13:12: error: expected ';' before 'cout'
13 | #define no cout << "No" << endl
| ^~~~
a.cc:59:8: note: in expansion of macro 'no'
59 | no no;
| ^~
|
s615289138 | p03943 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, srt, end) for (long long i = (srt); i < (long long)(end); i++)
#define VL vector<ll>
#define VS vector<string>
#define VB vector<bool>
#define VP vector<pair<ll,ll>>
#define VVL vector<vector<ll>>
#define VVP vector<vector<pair<ll,ll>>>
#define PL pair<ll,ll>
#define ALL(v) (v).begin(), (v).end()
int main(){
VL A[3];
cin>>A[0]>>A[1]>>A[2];
sort(A.begin(),A.end());
if(A[0]+A[1]==A[2])cout<<"Yes";
else cout<<"No";
return 0;
} | a.cc: In function 'int main()':
a.cc:17:8: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<long long int>')
17 | cin>>A[0]>>A[1]>>A[2];
| ~~~^~~~~~
| | |
| | std::vector<long long int>
| std::istream {aka std::basic_istream<char>}
In file included from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127,
from a.cc:1:
/usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
170 | operator>>(bool& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:170:24: note: no known conversion for argument 1 from 'std::vector<long long int>' to 'bool&'
170 | operator>>(bool& __n)
| ~~~~~~^~~
/usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]'
174 | operator>>(short& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:174:25: note: no known conversion for argument 1 from 'std::vector<long long int>' to 'short int&'
174 | operator>>(short& __n);
| ~~~~~~~^~~
/usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
177 | operator>>(unsigned short& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:177:34: note: no known conversion for argument 1 from 'std::vector<long long int>' to 'short unsigned int&'
177 | operator>>(unsigned short& __n)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]'
181 | operator>>(int& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:181:23: note: no known conversion for argument 1 from 'std::vector<long long int>' to 'int&'
181 | operator>>(int& __n);
| ~~~~~^~~
/usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
184 | operator>>(unsigned int& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:184:32: note: no known conversion for argument 1 from 'std::vector<long long int>' to 'unsigned int&'
184 | operator>>(unsigned int& __n)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
188 | operator>>(long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:188:24: note: no known conversion for argument 1 from 'std::vector<long long int>' to 'long int&'
188 | operator>>(long& __n)
| ~~~~~~^~~
/usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
192 | operator>>(unsigned long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:192:33: note: no known conversion for argument 1 from 'std::vector<long long int>' to 'long unsigned int&'
192 | operator>>(unsigned long& __n)
| ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
199 | operator>>(long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:199:29: note: no known conversion for argument 1 from 'std::vector<long long int>' to 'long long int&'
199 | operator>>(long long& __n)
| ~~~~~~~~~~~^~~
/usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
203 | operator>>(unsigned long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:203:38: note: no known conversion for argument 1 from 'std::vector<long long int>' to 'long long unsigned int&'
203 | operator>>(unsigned long long& __n)
| ~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
219 | operator>>(float& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:219:25: note: no known conversion for argument 1 from 'std::vector<long long int>' to 'float&'
219 | operator>>(float& __f)
| ~~~~~~~^~~
/usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
223 | operator>>(double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:223:26: note: no known conversion for argument 1 from 'std::vector<long long int>' to 'double&'
223 | operator>>(double& __f)
| ~~~~~~~~^~~
/usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
227 | operator>>(long double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:227:31: note: no known conversion for argument 1 from 'std::vector<long long int>' to 'long double&'
227 | operator>>(long double& __f)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
328 | operator>>(void*& __p)
| ^~~~~~~~
/usr/include/c++/14/istream:328:25: note: no known conversion for argument 1 from 'std::vector<long long int>' to 'void*&'
328 | operator>>(void*& __p)
| ~~~~~~~^~~
/usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:122:36: note: no known conversion for argument 1 from 'std::vector<long long int>' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'}
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]'
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:126:32: note: no known conversion for argument 1 from 'std::vector<long long int>' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
133 | operator>>(ios_base& (*__pf)(ios_base&))
| ^~~~~~~~
/usr/include/c++/14/istream:133:30: note: no known conversion for argument 1 from 'std::vector<long long int>' to 'std::ios_base& (*)(std::ios_base&)'
133 | operator>>(ios_base& (*__pf)(ios_base&))
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:352:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; __streambuf_type = std::basic_streambuf<char>]'
352 | operator>>(__streambuf_type* __sb);
| ^~~~~~~~
/usr/include/c++/14/istream:352:36: note: no known conversion for argument 1 from 'std::vector<long long int>' to 'std::basic_istream<char>::__streambuf_type*' {aka 'std::basic_streambuf< |
s478660368 | p03943 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int d,b,c;
cin>>d>>b>>c;
int a[n+1];
a[0] = d;
a[1] = b;
a[2] = c;
sort(a,a+n);
if(a[2] == a[1]+a[0])
cout<<"Yes"<<endl;
else cout<<"No"<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:8: error: 'n' was not declared in this scope
9 | int a[n+1];
| ^
a.cc:11:2: error: 'a' was not declared in this scope
11 | a[0] = d;
| ^
|
s783302150 | p03943 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b,c;
cin >> a >> b >> c;
int ma=max(a,max(b,c));
int min=a+b+c-ma;
cout << (ma==min ? "Yes" : "No") << endl;
} | a.cc:1: warning: unpaired UTF-8 bidirectional control character detected [-Wbidi-chars=]
1 | <U+202A>#include<iostream><U+202C>
| ~~~~~~~~
| | |
| | end of bidirectional context
| U+202A (LEFT-TO-RIGHT EMBEDDING)
a.cc:1:1: error: stray '#' in program
1 | #include<iostream>
| ^
a.cc:2:5: warning: unpaired UTF-8 bidirectional control character detected [-Wbidi-chars=]
2 | <U+202A>using namespace std;<U+202C>
| ~~~~~~~~ ^
| | |
| | end of bidirectional context
| U+202A (LEFT-TO-RIGHT EMBEDDING)
a.cc:3:3: warning: unpaired UTF-8 bidirectional control character detected [-Wbidi-chars=]
3 | <U+202A>int main(){<U+202C>
| ~~~~~~~~ ^
| | |
| | end of bidirectional context
| U+202A (LEFT-TO-RIGHT EMBEDDING)
a.cc:4: warning: unpaired UTF-8 bidirectional control character detected [-Wbidi-chars=]
4 | <U+202A> int a,b,c;<U+202C>
| ~~~~~~~~
| | |
| | end of bidirectional context
| U+202A (LEFT-TO-RIGHT EMBEDDING)
a.cc:5: warning: unpaired UTF-8 bidirectional control character detected [-Wbidi-chars=]
5 | <U+202A> cin >> a >> b >> c;<U+202C>
| ~~~~~~~~
| | |
| | end of bidirectional context
| U+202A (LEFT-TO-RIGHT EMBEDDING)
a.cc:6: warning: unpaired UTF-8 bidirectional control character detected [-Wbidi-chars=]
6 | <U+202A> int ma=max(a,max(b,c));<U+202C>
| ~~~~~~~~
| | |
| | end of bidirectional context
| U+202A (LEFT-TO-RIGHT EMBEDDING)
a.cc:7: warning: unpaired UTF-8 bidirectional control character detected [-Wbidi-chars=]
7 | <U+202A> int min=a+b+c-ma;<U+202C>
| ~~~~~~~~
| | |
| | end of bidirectional context
| U+202A (LEFT-TO-RIGHT EMBEDDING)
a.cc:8: warning: unpaired UTF-8 bidirectional control character detected [-Wbidi-chars=]
8 | <U+202A> cout << (ma==min ? "Yes" : "No") << endl;<U+202C>
| ~~~~~~~~
| | |
| | end of bidirectional context
| U+202A (LEFT-TO-RIGHT EMBEDDING)
a.cc:9: warning: unpaired UTF-8 bidirectional control character detected [-Wbidi-chars=]
9 | <U+202A> }<U+202C>
| ~~~~~~~~
| | |
| | end of bidirectional context
| U+202A (LEFT-TO-RIGHT EMBEDDING)
a.cc:1:1: error: '\U0000202a' does not name a type
1 | #include<iostream>
|
a.cc:2:21: error: '\U0000202c' does not name a type
2 | using namespace std;
|
a.cc:9:4: error: '\U0000202c' does not name a type
9 | }
|
|
s379250237 | p03943 | C++ | #include<iostream>
int main(){
int a,b,c;
cin >> a >> b >> c;
int max=max(a,max(b,c));
int min=a+b+c-max;
cout << (max==min ? "Yes" : "No") << endl;
} | a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | cin >> a >> b >> c;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:6:20: error: 'max' cannot be used as a function
6 | int max=max(a,max(b,c));
| ~~~^~~~~
a.cc:6:25: error: 'max' cannot be used as a function
6 | int max=max(a,max(b,c));
| ^
a.cc:8:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
8 | cout << (max==min ? "Yes" : "No") << endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:8:40: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
8 | cout << (max==min ? "Yes" : "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)
| ^~~~
|
s393363553 | p03943 | Java | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
int ab = a + b;
int bc = b + c;
int ca = c + a;
if(a == bc || b == ca || c == ab) {
System.out.println("YES");
} else {
System.out.println("NO");
}
} | Main.java:19: error: reached end of file while parsing
}
^
1 error
|
s099055082 | p03943 | Java | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
if(a == b + c || b = c + a || c = a + b) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
} | Main.java:10: error: bad operand types for binary operator '||'
if(a == b + c || b = c + a || c = a + b) {
^
first type: boolean
second type: int
Main.java:10: error: bad operand types for binary operator '||'
if(a == b + c || b = c + a || c = a + b) {
^
first type: int
second type: int
2 errors
|
s250248409 | p03943 | C++ | #include <iostream>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
if(a+b==c or a+c==b or c+b==a ){
cout<<"Yes"
}
else{
cout<<"No"
}
} | a.cc: In function 'int main()':
a.cc:8:16: error: expected ';' before '}' token
8 | cout<<"Yes"
| ^
| ;
9 | }
| ~
a.cc:11:15: error: expected ';' before '}' token
11 | cout<<"No"
| ^
| ;
12 | }
| ~
|
s784755918 | p03943 | C++ | a, b, c =map(int, input().split())
print("Yes" if a+b == c or a == b+c or b == a+c else "No") | a.cc:1:1: error: 'a' does not name a type
1 | a, b, c =map(int, input().split())
| ^
|
s022730949 | p03943 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int vector<int> v(3);
for (int x:v) {
cin >> v.at(x);
}
sort(v.begin(),v.begin());
if (v.at(1)+v.at(0) == v.at(2)) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:7:19: error: invalid declarator before 'v'
7 | int vector<int> v(3);
| ^
a.cc:8:14: error: 'v' was not declared in this scope
8 | for (int x:v) {
| ^
a.cc:12:8: error: 'v' was not declared in this scope
12 | sort(v.begin(),v.begin());
| ^
|
s651641496 | p03943 | C++ | #include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; int maxn = max({a, b, c}), sum = a + b + c; if (sum == 2 * maxn) cout << "Yes" << endl; else cout << "No" << endl; return 0; } | a.cc:1:26: warning: extra tokens at end of #include directive
1 | #include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; int maxn = max({a, b, c}), sum = a + b + c; if (sum == 2 * maxn) cout << "Yes" << endl; else cout << "No" << endl; return 0; }
| ^~~~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s288308604 | p03943 | C++ | //https://qiita.com/tanakh/items/0ba42c7ca36cd29d0ac8 より
macro_rules! input {
(source = $s:expr, $($r:tt)*) => {
let mut iter = $s.split_whitespace();
input_inner!{iter, $($r)*}
};
($($r:tt)*) => {
let s = {
use std::io::Read;
let mut s = String::new();
std::io::stdin().read_to_string(&mut s).unwrap();
s
};
let mut iter = s.split_whitespace();
input_inner!{iter, $($r)*}
};
}
macro_rules! input_inner {
($iter:expr) => {};
($iter:expr, ) => {};
($iter:expr, $var:ident : $t:tt $($r:tt)*) => {
let $var = read_value!($iter, $t);
input_inner!{$iter $($r)*}
};
}
macro_rules! read_value {
($iter:expr, ( $($t:tt),* )) => {
( $(read_value!($iter, $t)),* )
};
($iter:expr, [ $t:tt ; $len:expr ]) => {
(0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
};
($iter:expr, chars) => {
read_value!($iter, String).chars().collect::<Vec<char>>()
};
($iter:expr, usize1) => {
read_value!($iter, usize) - 1
};
($iter:expr, $t:ty) => {
$iter.next().unwrap().parse::<$t>().expect("Parse error")
};
}
//
fn run() {
input! {
a: [u32; 3],
}
let s: u32 = a.iter().sum();
if s % 3 != 0 {
println!("No");
} else {
println!("Yes");
}
}
fn main() {
run();
}
| a.cc:33:10: error: too many decimal points in number
33 | (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
| ^~~~~~~
a.cc:2:1: error: 'macro_rules' does not name a type
2 | macro_rules! input {
| ^~~~~~~~~~~
a.cc:19:1: error: 'macro_rules' does not name a type
19 | macro_rules! input_inner {
| ^~~~~~~~~~~
a.cc:28:1: error: 'macro_rules' does not name a type
28 | macro_rules! read_value {
| ^~~~~~~~~~~
a.cc:48:1: error: 'fn' does not name a type
48 | fn run() {
| ^~
a.cc:60:1: error: 'fn' does not name a type
60 | fn main() {
| ^~
|
s588910098 | p03943 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
if((a+b=c) ||(a=b+c) ||(b=a+c)){
cout<<"Yes"<<endl;
}
else{
cout<<"No"<<endl;
}
} | a.cc: In function 'int main()':
a.cc:7:8: error: lvalue required as left operand of assignment
7 | if((a+b=c) ||(a=b+c) ||(b=a+c)){
| ~^~
|
s083227704 | p03943 | C++ | a=list(map(int,input().split())).sort()
if a[0]+a[1]==a[2]:
print('YES')
else:
print('NO')
| a.cc:3:9: warning: multi-character character constant [-Wmultichar]
3 | print('YES')
| ^~~~~
a.cc:5:9: warning: multi-character character constant [-Wmultichar]
5 | print('NO')
| ^~~~
a.cc:1:1: error: 'a' does not name a type
1 | a=list(map(int,input().split())).sort()
| ^
|
s452646898 | p03943 | C++ | #include<bits/stdc++.h>
using namespace std;
int a,b,c;
int main(){
cin>>a>>b>>c;
if(a + b + c = 2 * max(max(a,b),c)){
cout<<"Yes"<<endl;
}else{
cout<<"No"<<endl;
}
}
| a.cc: In function 'int main()':
a.cc:8:18: error: lvalue required as left operand of assignment
8 | if(a + b + c = 2 * max(max(a,b),c)){
| ~~~~~~^~~
|
s868692697 | p03943 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
cout<<(a==b||b==c||c==a||a+b==c||b+c==a||c+a==b?"Yes":"No)<<endl;
return 0;
} | a.cc:8:59: warning: missing terminating " character
8 | cout<<(a==b||b==c||c==a||a+b==c||b+c==a||c+a==b?"Yes":"No)<<endl;
| ^
a.cc:8:59: error: missing terminating " character
8 | cout<<(a==b||b==c||c==a||a+b==c||b+c==a||c+a==b?"Yes":"No)<<endl;
| ^~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:18:5: error: expected primary-expression before 'return'
18 | return 0;
| ^~~~~~
a.cc:8:59: error: expected ')' before 'return'
8 | cout<<(a==b||b==c||c==a||a+b==c||b+c==a||c+a==b?"Yes":"No)<<endl;
| ~ ^
| )
......
18 | return 0;
| ~~~~~~
|
s936722879 | p03943 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c;
cin >>a>>b>>c;
if(a+b==c || b+c==a || c+a==b){
cout << "Yes";
}else{
cout << "No;
}
} | a.cc:9:13: warning: missing terminating " character
9 | cout << "No;
| ^
a.cc:9:13: error: missing terminating " character
9 | cout << "No;
| ^~~~
a.cc: In function 'int main()':
a.cc:10:3: error: expected primary-expression before '}' token
10 | }
| ^
|
s631579094 | p03943 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
vector<int> data = {a, b, c}
sort(data.begin(), data.end());
if (a + b == c) {
cout << "Yes" << endl;
}
else {
cout << "No" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'sort'
8 | sort(data.begin(), data.end());
| ^~~~
|
s314494538 | p03943 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
if(a==b+c || b==a+c || c=a+b)
cout<<"Yes"<<endl;
else
cout<<"No"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:23: error: lvalue required as left operand of assignment
6 | if(a==b+c || b==a+c || c=a+b)
| ~~~~~~~~~~~~~~~~~^~~~
|
s115804444 | p03943 | C++ | #include <iostream>
using namespace std;
int main(){
int a;
int b;
int c;
cin >> a >> b .> c;
if(a + b == c || b + c == a || c + a == b){
cout << "Yes" << endl;
}
else{
cout << "No" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:9:20: error: expected unqualified-id before '>' token
9 | cin >> a >> b .> c;
| ^
|
s858060440 | p03943 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
if(a == b + c){
System.out.println("Yes");
}else if(b == a + c){
System.out.println("Yes");
}else if(c == a + b){
System.out.println("Yes");
}else
System.out.println("No");
}
}
}
| Main.java:21: error: class, interface, enum, or record expected
}
^
1 error
|
s511255845 | p03943 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int A,B,C;
cin>>A>>B>>C,
if (A>B & A>C & A == B+C){
cout<<"Yes"<<endl;
}
else if (B>C & B>A & B == A+C){
cout<<"Yes"<<endl;
}
else if (C>B & C>A & C == A+B){
cout<<"Yes"<<endl;
}
else{
cout<<"No"<<endl;
}
}
| a.cc: In function 'int main()':
a.cc:7:3: error: expected primary-expression before 'if'
7 | if (A>B & A>C & A == B+C){
| ^~
a.cc:10:4: error: 'else' without a previous 'if'
10 | else if (B>C & B>A & B == A+C){
| ^~~~
|
s893678567 | p03943 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b,c;
cin>>a>>b>>c;
sort(a,a+3);
if(a+b==c)
cout<<"Yes"<<endl;
else
cout<<"No"<<endl;
return 0;
} | In file included from /usr/include/c++/14/algorithm:61,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]':
/usr/include/c++/14/bits/stl_algo.h:1817:25: required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
1817 | std::__insertion_sort(__first, __first + int(_S_threshold), __comp);
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:1908:31: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
1908 | std::__final_insertion_sort(__first, __last, __comp);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4772:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = int]'
4772 | std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter());
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:7:7: required from here
7 | sort(a,a+3);
| ~~~~^~~~~~~
/usr/include/c++/14/bits/stl_algo.h:1780:17: error: no type named 'value_type' in 'struct std::iterator_traits<int>'
1780 | __val = _GLIBCXX_MOVE(*__i);
| ^~~~~
In file included from /usr/include/c++/14/bits/stl_pair.h:61,
from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/algorithm:60:
/usr/include/c++/14/bits/stl_algo.h:1780:25: error: invalid type argument of unary '*' (have 'int')
1780 | __val = _GLIBCXX_MOVE(*__i);
| ^~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:1782:15: error: invalid type argument of unary '*' (have 'int')
1782 | *__first = _GLIBCXX_MOVE(__val);
| ^~~~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:71:
/usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::__ops::_Iter_less_iter::operator()(_Iterator1, _Iterator2) const [with _Iterator1 = int; _Iterator2 = int]':
/usr/include/c++/14/bits/stl_algo.h:1777:14: required from 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
1777 | if (__comp(__i, __first))
| ~~~~~~^~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:1817:25: required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
1817 | std::__insertion_sort(__first, __first + int(_S_threshold), __comp);
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:1908:31: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
1908 | std::__final_insertion_sort(__first, __last, __comp);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4772:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = int]'
4772 | std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter());
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:7:7: required from here
7 | sort(a,a+3);
| ~~~~^~~~~~~
/usr/include/c++/14/bits/predefined_ops.h:45:16: error: invalid type argument of unary '*' (have 'int')
45 | { return *__it1 < *__it2; }
| ^~~~~~
/usr/include/c++/14/bits/predefined_ops.h:45:25: error: invalid type argument of unary '*' (have 'int')
45 | { return *__it1 < *__it2; }
| ^~~~~~
In file included from /usr/include/c++/14/bits/stl_algo.h:61:
/usr/include/c++/14/bits/stl_heap.h: In instantiation of 'void std::__make_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare&) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]':
/usr/include/c++/14/bits/stl_algo.h:1593:23: required from 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
1593 | std::__make_heap(__first, __middle, __comp);
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:1868:25: required from 'void std::__partial_sort(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
1868 | std::__heap_select(__first, __middle, __last, __comp);
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:1884:27: required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = int; _Size = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
1884 | std::__partial_sort(__first, __last, __last, __comp);
| ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:1905:25: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
1905 | std::__introsort_loop(__first, __last,
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
1906 | std::__lg(__last - __first) * 2,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1907 | __comp);
| ~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4772:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = int]'
4772 | std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter());
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:7:7: required from here
7 | sort(a,a+3);
| ~~~~^~~~~~~
/usr/include/c++/14/bits/stl_heap.h:344:11: error: no type named 'value_type' in 'struct std::iterator_traits<int>'
344 | _ValueType;
| ^~~~~~~~~~
/usr/include/c++/14/bits/stl_heap.h:346:11: error: no type named 'difference_type' in 'struct std::iterator_traits<int>'
346 | _DistanceType;
| ^~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_heap.h: In instantiation of 'void std::__pop_heap(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare&) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]':
/usr/include/c++/14/bits/stl_algo.h:1596:19: required from 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
1596 | std::__pop_heap(__first, __middle, __i, __comp);
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:1868:25: required from 'void std::__partial_sort(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
1868 | std::__heap_select(__first, __middle, __last, __comp);
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:1884:27: required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = int; _Size = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
1884 | std::__partial_sort(__first, __last, __last, __comp);
| ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:1905:25: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
1905 | std::__introsort_loop(__first, __last,
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
1906 | std::__lg(__last - __first) * 2,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1907 | __comp);
| ~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4772:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = int]'
4772 | std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter());
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:7:7: required from here
7 | sort(a,a+3);
| ~~~~^~~~~~~
/usr/include/c++/14/bits/stl_heap.h:258:9: error: no type named 'value_type' in 'struct std::iterator_traits<int>'
258 | _ValueType;
| ^~~~~~~~~~
/usr/include/c++/14/bits/stl_heap.h:260:9: error: no type named 'difference_type' in 'struct std::iterator_traits<int>'
260 | _DistanceType;
| ^~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_heap.h:262:28: error: invalid type argument of unary '*' (have 'int')
262 | _ValueType __value = _GLIBCXX_MOVE(*__result);
| ^~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_heap.h:263:7: error: invalid type argument of unary '*' (have 'int')
263 | *__result = _GLIBCXX_MOVE(*__first);
| ^~~~~~~~~
/usr/include/c++/14/bits/stl_heap.h:263:19: error: invalid type argument of unary '*' (have 'int')
263 | |
s056155817 | p03943 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
cout<< ((a+c==b || b+c==a ||)? "Yes":"No")<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:37: error: expected primary-expression before ')' token
7 | cout<< ((a+c==b || b+c==a ||)? "Yes":"No")<<endl;
| ^
|
s837486707 | p03943 | Java | import java.util.Scanner;
public class practice{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int a=scan.nextInt();
Scanner scan1 = new Scanner(System.in);
int b=scan1.nextInt();
Scanner scan2 = new Scanner(System.in);
int c=scan2.nextInt();
if(a+b==c||a+c==b||b+c==a){
System.out.println("Yes");
}
else{
System.out.println("No");
}
}
} | Main.java:2: error: class practice is public, should be declared in a file named practice.java
public class practice{
^
1 error
|
s779466852 | p03943 | C++ | a,b,c = [int(i) for i in input().split()]
if a == b or b == c or a == c:
print("Yes")
elif a == b+c or b == a+c or c == a+b:
print("Yes")
else:
print("No") | a.cc:1:1: error: 'a' does not name a type
1 | a,b,c = [int(i) for i in input().split()]
| ^
|
s511695324 | p03943 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int A,B,C;
cin >> A >> B >> C;
if(A==B+C || B==A+C || C==A+B)
cout << "Yes" << endl;
}
else{
cout << "No" << endl;
}
} | a.cc:10:3: error: expected unqualified-id before 'else'
10 | else{
| ^~~~
a.cc:13:1: error: expected declaration before '}' token
13 | }
| ^
|
s048215078 | p03943 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int A,B,C;
cin >> A >> B >> C;
if((A+B+C)%3==0){
cout << "Yes" << endl;
}
else{
cout << "No" << endl;
} | a.cc: In function 'int main()':
a.cc:12:2: error: expected '}' at end of input
12 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s905284986 | p03943 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b,c;
cin >> a >> b >> c;
if (a+b == c) {
cout << "Yes" << endl;
}
if (a+c == b) {
cout << "Yes" << endl;
}
if (c+b == a) {
cout << "Yes" << endl;
}
else {
cout << "No" << endl;
}
| a.cc: In function 'int main()':
a.cc:19:2: error: expected '}' at end of input
19 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s757975793 | p03943 | C | #include <stdio.h>
int main(){
int a,b,c;
scanf("%d %d %d\n",&a,&b,&c)
if(a-b-c==0 || b-a-c==0 ||c-a-b==0)
printf("Yes");
else
printf("No");
} | main.c: In function 'main':
main.c:4:30: error: expected ';' before 'if'
4 | scanf("%d %d %d\n",&a,&b,&c)
| ^
| ;
5 | if(a-b-c==0 || b-a-c==0 ||c-a-b==0)
| ~~
main.c:7:3: error: 'else' without a previous 'if'
7 | else
| ^~~~
|
s026934370 | p03943 | C | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
vector<int> a(3);
for(int i=0;i<3;++i){
cin >> a[i];
}
sort(a.begin(),a.end());
if(a[0]+a[1] != a[2])cout << "No" << endl;
else cout << "Yes" << endl;
} | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s851073076 | p03943 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c,d,e;
cin >> a >> b >> c;
d = max{(a,b,c)};
e = a+ b+c-d;
if(d == e){
cout << "Yes" << endl;
}
else{
cout << "No" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:7:6: error: cannot resolve overloaded function 'max' based on conversion to type 'int'
7 | d = max{(a,b,c)};
| ^~~
|
s138097266 | p03943 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c,d;
cin >> a >> b >> c;
d = max{(a,b,c)};
e = a+ b+c-d;
if(d == e){
cout << "Yes" << endl;
}
else{
cout << "No" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:7:6: error: cannot resolve overloaded function 'max' based on conversion to type 'int'
7 | d = max{(a,b,c)};
| ^~~
a.cc:8:2: error: 'e' was not declared in this scope
8 | e = a+ b+c-d;
| ^
|
s825720059 | p03943 | Java | import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
if( a == b + c || b == c +a || c == a+b){
System.out.println("Yes");
}else{
System.out.pritnln("No");
}
}
}
| Main.java:16: error: cannot find symbol
System.out.pritnln("No");
^
symbol: method pritnln(String)
location: variable out of type PrintStream
1 error
|
s558953823 | p03943 | Java | import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a = sc.next();
int b = sc.next();
int c = sc.next();
if(a == b+ c || b == c +a || c == a+b){
System.out.println("Yes");
}else{
System.out.pritnln("No");
}
}
}
| Main.java:10: error: incompatible types: String cannot be converted to int
int a = sc.next();
^
Main.java:11: error: incompatible types: String cannot be converted to int
int b = sc.next();
^
Main.java:12: error: incompatible types: String cannot be converted to int
int c = sc.next();
^
Main.java:16: error: cannot find symbol
System.out.pritnln("No");
^
symbol: method pritnln(String)
location: variable out of type PrintStream
4 errors
|
s815665392 | p03943 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b,c;
cin >> a >> b >> c;
int sum = a + b + c;
if (sum - max((a,b),c) == max((a,b),c) cout << "Yes" << endl;
else cout << "No" << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:41: error: expected ';' before 'cout'
7 | if (sum - max((a,b),c) == max((a,b),c) cout << "Yes" << endl;
| ^~~~~
| ;
a.cc:8:3: error: expected primary-expression before 'else'
8 | else cout << "No" << endl;
| ^~~~
a.cc:7:64: error: expected ')' before 'else'
7 | if (sum - max((a,b),c) == max((a,b),c) cout << "Yes" << endl;
| ~ ^
| )
8 | else cout << "No" << endl;
| ~~~~
|
s865635848 | p03943 | C++ | #include<iostram>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
if(a==b+c or b==a+c or c==a+b)cout<<"Yes\n";else cout<<"No\n";} | a.cc:1:9: fatal error: iostram: No such file or directory
1 | #include<iostram>
| ^~~~~~~~~
compilation terminated.
|
s130455545 | p03943 | C | #include<stdio.h>
int main(void){
int a,b,c,sum;
scanf("%d%d%d",&a,&b,&c);
sum=a+b+c;
if(sum%2==0) ? printf("Yes"); : printf("No");
return 0;
}
| main.c: In function 'main':
main.c:6:16: error: expected expression before '?' token
6 | if(sum%2==0) ? printf("Yes"); : printf("No");
| ^
main.c:6:33: error: expected expression before ':' token
6 | if(sum%2==0) ? printf("Yes"); : printf("No");
| ^
|
s895749606 | p03943 | C | #include<stdio.h>
int main(void){
int a,b,c,sum;
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&c);
sum=a+b+c;
if(sum%2==0) ? printf("Yes"); : printf("No");
return 0;
}
| main.c: In function 'main':
main.c:8:16: error: expected expression before '?' token
8 | if(sum%2==0) ? printf("Yes"); : printf("No");
| ^
main.c:8:33: error: expected expression before ':' token
8 | if(sum%2==0) ? printf("Yes"); : printf("No");
| ^
|
s975183975 | p03943 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
if(a+b =c || a+c =b || b+c==a)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(a+b =c || a+c =b || b+c==a)cout<<"Yes";
| ~~^~~~~~
|
s422866079 | p03943 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b,c;
cin >> a >> b >> c;
if(a+b+c == 2*max(a,b,c)){
cout << "Yes";
}else{
cout << "No";
}
return 0;
} | In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:6:20: required from here
6 | if(a+b+c == 2*max(a,b,c)){
| ~~~^~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
306 | if (__comp(__a, __b))
| ~~~~~~^~~~~~~~~~
|
s549190794 | p03943 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> a(3);
cin >> a;
sort(a.begin(),a.end());
if(a.at(0)+a.at(1) == a.at(2)){
cout << "Yes" << endl;
}
else{
cout << "No" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:6:9: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<int>')
6 | cin >> a;
| ~~~ ^~ ~
| | |
| | std::vector<int>
| std::istream {aka std::basic_istream<char>}
In file included from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127,
from a.cc:1:
/usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
170 | operator>>(bool& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:170:24: note: no known conversion for argument 1 from 'std::vector<int>' to 'bool&'
170 | operator>>(bool& __n)
| ~~~~~~^~~
/usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]'
174 | operator>>(short& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:174:25: note: no known conversion for argument 1 from 'std::vector<int>' to 'short int&'
174 | operator>>(short& __n);
| ~~~~~~~^~~
/usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
177 | operator>>(unsigned short& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:177:34: note: no known conversion for argument 1 from 'std::vector<int>' to 'short unsigned int&'
177 | operator>>(unsigned short& __n)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]'
181 | operator>>(int& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:181:23: note: no known conversion for argument 1 from 'std::vector<int>' to 'int&'
181 | operator>>(int& __n);
| ~~~~~^~~
/usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
184 | operator>>(unsigned int& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:184:32: note: no known conversion for argument 1 from 'std::vector<int>' to 'unsigned int&'
184 | operator>>(unsigned int& __n)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
188 | operator>>(long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:188:24: note: no known conversion for argument 1 from 'std::vector<int>' to 'long int&'
188 | operator>>(long& __n)
| ~~~~~~^~~
/usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
192 | operator>>(unsigned long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:192:33: note: no known conversion for argument 1 from 'std::vector<int>' to 'long unsigned int&'
192 | operator>>(unsigned long& __n)
| ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
199 | operator>>(long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:199:29: note: no known conversion for argument 1 from 'std::vector<int>' to 'long long int&'
199 | operator>>(long long& __n)
| ~~~~~~~~~~~^~~
/usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
203 | operator>>(unsigned long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:203:38: note: no known conversion for argument 1 from 'std::vector<int>' to 'long long unsigned int&'
203 | operator>>(unsigned long long& __n)
| ~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
219 | operator>>(float& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:219:25: note: no known conversion for argument 1 from 'std::vector<int>' to 'float&'
219 | operator>>(float& __f)
| ~~~~~~~^~~
/usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
223 | operator>>(double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:223:26: note: no known conversion for argument 1 from 'std::vector<int>' to 'double&'
223 | operator>>(double& __f)
| ~~~~~~~~^~~
/usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
227 | operator>>(long double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:227:31: note: no known conversion for argument 1 from 'std::vector<int>' to 'long double&'
227 | operator>>(long double& __f)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
328 | operator>>(void*& __p)
| ^~~~~~~~
/usr/include/c++/14/istream:328:25: note: no known conversion for argument 1 from 'std::vector<int>' to 'void*&'
328 | operator>>(void*& __p)
| ~~~~~~~^~~
/usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:122:36: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'}
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]'
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:126:32: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
133 | operator>>(ios_base& (*__pf)(ios_base&))
| ^~~~~~~~
/usr/include/c++/14/istream:133:30: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::ios_base& (*)(std::ios_base&)'
133 | operator>>(ios_base& (*__pf)(ios_base&))
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:352:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; __streambuf_type = std::basic_streambuf<char>]'
352 | operator>>(__streambuf_type* __sb);
| ^~~~~~~~
/usr/include/c++/14/istream:352:36: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::basic_istream<char>::__streambuf_type*' {aka 'std::basic_streambuf<char>*'}
352 | operator>>(__streambuf_type* __sb);
| ~~~~~~~~~~~~~~~~~~^~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41:
/usr/include/c++/14/cst |
s499653612 | p03943 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> a(3);
getline(cin,a);
sort(a.begin(),a.end());
if(a.at(0)+a.at(1) == a.at(2)){
cout << "Yes" << endl;
}
else{
cout << "No" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:6:12: error: no matching function for call to 'getline(std::istream&, std::vector<int>&)'
6 | getline(cin,a);
| ~~~~~~~^~~~~~~
In file included from /usr/include/c++/14/string:55,
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.tcc:907:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&, _CharT)'
907 | getline(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:907:5: note: candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/string:54:
/usr/include/c++/14/bits/basic_string.h:4117:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
4117 | getline(basic_istream<_CharT, _Traits>& __is,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:4117:5: note: template argument deduction/substitution failed:
a.cc:6:12: note: 'std::vector<int>' is not derived from 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
6 | getline(cin,a);
| ~~~~~~~^~~~~~~
/usr/include/c++/14/bits/basic_string.h:4125:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&, _CharT)'
4125 | getline(basic_istream<_CharT, _Traits>&& __is,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:4125:5: note: candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:4132:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
4132 | getline(basic_istream<_CharT, _Traits>&& __is,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:4132:5: note: template argument deduction/substitution failed:
a.cc:6:12: note: 'std::vector<int>' is not derived from 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
6 | getline(cin,a);
| ~~~~~~~^~~~~~~
In file included from /usr/include/c++/14/cstdio:42,
from /usr/include/c++/14/ext/string_conversions.h:45,
from /usr/include/c++/14/bits/basic_string.h:4154:
/usr/include/stdio.h:697:18: note: candidate: '__ssize_t getline(char**, size_t*, FILE*)'
697 | extern __ssize_t getline (char **__restrict __lineptr,
| ^~~~~~~
/usr/include/stdio.h:697:18: note: candidate expects 3 arguments, 2 provided
|
s111888970 | p03943 | C++ | #include<bits/stdc++.h>
using namespace std;
int a[4];
int main()
{
for(int i=1;i<=3;i++)
scanf("%d",&a[i]);
sort(a+1,a+4);
if(a[1]+a[2]==a[3])
printf("Yes\n");
else printf("No\n);
return 0;
} | a.cc:11:21: warning: missing terminating " character
11 | else printf("No\n);
| ^
a.cc:11:21: error: missing terminating " character
11 | else printf("No\n);
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:12:4: error: expected primary-expression before 'return'
12 | return 0;
| ^~~~~~
|
s833052758 | p03943 | C++ | #include<iostream>
using namespace std;
int main()
{
int a,b,c,d;
cin>>a>>b>>c;
if(a>b)
{
d=a;
a=b;
b=d;
}
if(b>c)
{
d=b;
b=c;
c=d;
}
if(a>b)
{
d=a;
a=b;
b=d;
}
if(a+b=c) cout<<"Yes"<<endl;
else cout<<"No"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:25:13: error: lvalue required as left operand of assignment
25 | if(a+b=c) cout<<"Yes"<<endl;
| ~^~
|
s892950490 | p03943 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int n,a,b;
cin >> n >> a >> b;
if(n=a+b||a=b+n||b=a+n){
cout << "Yes";
}
else{
cout << "No";
}
}
| a.cc: In function 'int main()':
a.cc:6:18: error: lvalue required as left operand of assignment
6 | if(n=a+b||a=b+n||b=a+n){
| ~~~^~~
|
s705660606 | p03943 | C++ | #include<iostream>
using namespace std;
int a[2];
int main(){
cin>>a[0]>>a[1]>>a[2];
sort(a,a+3);
if(a[0]+a[1]==a[2]) cout<<"Yes";
else cout<<"No";} | a.cc: In function 'int main()':
a.cc:6:9: error: 'sort' was not declared in this scope; did you mean 'short'?
6 | sort(a,a+3);
| ^~~~
| short
|
s424942248 | p03943 | C++ | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define endl "\n"
#define pb push_back
#define f(i,n) for(i=0;i<n;i++)
#define F(i,a,b) for(i=a;a<=b;i++)
#define arr(a,n) for( i=0;i<n;i++)cin>>a[i];
#define fi first
#define se second
#define mp make_pair
#define mod 1000000007
#define YES cout<<"YES"<<endl;
#define Yes cout<<"Yes"<<endl;
#define NO cout<<"NO"<<endl;
#define No cout<<"No"<<endl;
#define yes cout<<"yes"<<endl;
#define no cout<<"no"<<endl;
#define vi vector<ll>
#define ed end()
#define bg begin()
#define sz size()
#define ln length()
#define s() sort(a,a+n);
#define sr() sort(a,a+n,greater<ll>());
#define v() sort(v.begin(),v.end());
#define vr() sort(v.begin(),v.end(),greater<ll>());
#define mod 1000000007
#define fast() ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
ll gcd(ll a, ll b){if(!b)return a;return gcd(b, a % b);}
ll power(ll x,ll y,ll p){ll res=1;x%=p;while(y>0){if(y&1)res=(res*x)%p;y=y>>1;x=(x*x)%p;}return res;}
int main() {
/* #ifndef ONLINE_JUDGE
// for getting input from input.txt
freopen("input.txt", "r", stdin);
// for writing output to output.txt
freopen("output.txt", "w", stdout);
#endif*/
fast();
//ll t;cin>>t;while(t--)
{
ll a=0,b,h,n=3;
cin>>n;ll int a[n];for(i=0;i<n;i++)cin>>a[i];
s(a,a+n)
if(a[0]+a[1]==a[2])
{
cout<<Yes<<endl;
}
else
{
cout<<No<<endl;
}
}
return 0;
}
| a.cc:44:9: error: macro "s" passed 2 arguments, but takes just 0
44 | s(a,a+n)
| ^
a.cc:24:9: note: macro "s" defined here
24 | #define s() sort(a,a+n);
| ^
a.cc: In function 'int main()':
a.cc:43:16: error: conflicting declaration 'long long int a [n]'
43 | cin>>n;ll int a[n];for(i=0;i<n;i++)cin>>a[i];
| ^
a.cc:42:6: note: previous declaration as 'long long int a'
42 | ll a=0,b,h,n=3;
| ^
a.cc:43:25: error: 'i' was not declared in this scope
43 | cin>>n;ll int a[n];for(i=0;i<n;i++)cin>>a[i];
| ^
a.cc:44:2: error: 's' was not declared in this scope
44 | s(a,a+n)
| ^
a.cc:49:1: error: 'else' without a previous 'if'
49 | else
| ^~~~
a.cc:51:7: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::ostream' {aka 'std::basic_ostream<char>'})
51 | cout<<No<<endl;
| ~~~~^~
| |
| basic_ostream<[...]>
a.cc:51:7: note: candidate: 'operator<<(int, int)' (built-in)
51 | cout<<No<<endl;
| ^
a.cc:51:7: note: no known conversion for argument 2 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int'
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127,
from a.cc:1:
/usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'}
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]'
125 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
125 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
135 | operator<<(ios_base& (*__pf) (ios_base&))
| ^~~~~~~~
/usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'std::ios_base& (*)(std::ios_base&)'
135 | operator<<(ios_base& (*__pf) (ios_base&))
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
174 | operator<<(long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'long int'
174 | operator<<(long __n)
| ~~~~~^~~
/usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
178 | operator<<(unsigned long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'long unsigned int'
178 | operator<<(unsigned long __n)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
182 | operator<<(bool __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'bool'
182 | operator<<(bool __n)
| ~~~~~^~~
In file included from /usr/include/c++/14/ostream:1022:
/usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]'
96 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'short int'
97 | operator<<(short __n)
| ~~~~~~^~~
/usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
189 | operator<<(unsigned short __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'short unsigned int'
189 | operator<<(unsigned short __n)
| ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]'
110 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int'
111 | operator<<(int __n)
| ~~~~^~~
/usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
200 | operator<<(unsigned int __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'unsigned int'
200 | operator<<(unsigned int __n)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
211 | operator<<(long long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'long long int'
211 | operator<<(long long __n)
| ~~~~~~~~~~^~~
/usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
215 | operator<<(unsigned long long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'long long unsigned int'
215 | operator<<(unsigned long long __n)
| ~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
231 | operator<<(double __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:231:25: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'double'
231 | operator<<(double __f)
| ~~~~~~~^~~
/usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
235 | operator<<(float __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:235:24: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'float'
235 | operator<<(float __f)
| ~~~~~~^~~
/usr/include/c++/14/ostream:243:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
243 | operator<<(long double _ |
s825374663 | p03943 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
vector<string> vec(3)={a,b,c};
cin>>a>>b>>c;
sort(vec.begin(),vec.end());
reverse(vec.begin(),vec.begin());
if(vec.at(0)==vec.at(1)+vec.at(2)){
cout<<"YES"<<endl;
}
else {
cout<<"NO"<<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:4:22: error: expected ',' or ';' before '=' token
4 | vector<string> vec(3)={a,b,c};
| ^
a.cc:5:6: error: 'a' was not declared in this scope
5 | cin>>a>>b>>c;
| ^
a.cc:5:9: error: 'b' was not declared in this scope
5 | cin>>a>>b>>c;
| ^
a.cc:5:12: error: 'c' was not declared in this scope
5 | cin>>a>>b>>c;
| ^
|
s156371806 | p03943 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
vector<int> vec={a,b,c};
cin>>a>>b>>c;
sort(vec.begin(),vec.end());
reverse(vec.begin(),vec.begin());
if(vec.at(0)==vec.at(1)+vec.at(2)){
cout<<"YES"<<endl;
}
else {
cout<<"NO"<<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:4:18: error: 'a' was not declared in this scope
4 | vector<int> vec={a,b,c};
| ^
a.cc:4:20: error: 'b' was not declared in this scope
4 | vector<int> vec={a,b,c};
| ^
a.cc:4:22: error: 'c' was not declared in this scope
4 | vector<int> vec={a,b,c};
| ^
a.cc:4:23: error: could not convert '{<expression error>, <expression error>, <expression error>}' from '<brace-enclosed initializer list>' to 'std::vector<int>'
4 | vector<int> vec={a,b,c};
| ^
| |
| <brace-enclosed initializer list>
|
s728150263 | p03943 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
vector<int> vec={a,b,c}
cin>>a>>b>>c;
sort(vec.begin(),vec.end());
reverse(vec.begin(),vec.begin());
if(vec.at(0)==vec.at(1)+vec.at(2)){
cout<<"YES"<<endl;
}
else {
cout<<"NO"<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:4:18: error: 'a' was not declared in this scope
4 | vector<int> vec={a,b,c}
| ^
a.cc:4:20: error: 'b' was not declared in this scope
4 | vector<int> vec={a,b,c}
| ^
a.cc:4:22: error: 'c' was not declared in this scope
4 | vector<int> vec={a,b,c}
| ^
a.cc:4:23: error: could not convert '{<expression error>, <expression error>, <expression error>}' from '<brace-enclosed initializer list>' to 'std::vector<int>'
4 | vector<int> vec={a,b,c}
| ^
| |
| <brace-enclosed initializer list>
a.cc:5:1: error: expected ',' or ';' before 'cin'
5 | cin>>a>>b>>c;
| ^~~
|
s043383716 | p03943 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b,c;
cin >> a >> b >> c ;
string ans ="No";
if(a+b==c)
ans = "Yes;
if(a == b+c)
ans = "Yes
if(a+c== b)
ans = "Yes
cout << ans ;
}
| a.cc:9:10: warning: missing terminating " character
9 | ans = "Yes;
| ^
a.cc:9:10: error: missing terminating " character
9 | ans = "Yes;
| ^~~~~
a.cc:11:11: warning: missing terminating " character
11 | ans = "Yes
| ^
a.cc:11:11: error: missing terminating " character
11 | ans = "Yes
| ^~~~
a.cc:13:11: warning: missing terminating " character
13 | ans = "Yes
| ^
a.cc:13:11: error: missing terminating " character
13 | ans = "Yes
| ^~~~
a.cc: In function 'int main()':
a.cc:10:3: error: expected primary-expression before 'if'
10 | if(a == b+c)
| ^~
|
s720941452 | p03943 | Java | import java.util.*;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
int max = math.max(math.max(a, b), c);
if ((max == a+b || max == b+c || max == c+a)) {
System.out.println("Yes");
}else{
System.out.println("No");
}
}
}
| Main.java:11: error: cannot find symbol
int max = math.max(math.max(a, b), c);
^
symbol: variable math
location: class Main
Main.java:11: error: cannot find symbol
int max = math.max(math.max(a, b), c);
^
symbol: variable math
location: class Main
2 errors
|
s699055021 | p03943 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
typedef long long ll;
int main(){
int a,b,c;
cin >> a >> b >> c;
if(a+b==c)||(a+c==b)||(b+c==a)cout << "Yes" << endl;
else cout << "No" << endl;
}
| a.cc: In function 'int main()':
a.cc:11:13: error: expected primary-expression before '||' token
11 | if(a+b==c)||(a+c==b)||(b+c==a)cout << "Yes" << endl;
| ^~
|
s875513191 | p03943 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b,c;
cin >> a>>b>>c;
if(a+b==c|| a+c==b||b+c==a){cout<<Yes<<endl;}
cout<<No<<endl;
} | a.cc: In function 'int main()':
a.cc:9:43: error: 'Yes' was not declared in this scope
9 | if(a+b==c|| a+c==b||b+c==a){cout<<Yes<<endl;}
| ^~~
a.cc:11:15: error: 'No' was not declared in this scope
11 | cout<<No<<endl;
| ^~
|
s193557263 | p03943 | Java | import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int a = Integer.parseInt(sc.next());
int b = Integer.parseInt(sc.next());
int c = Integer.parseInt(sc.next());
if(((a+b == c) || ((a+c == b) || ((b+c == a)) {
System.out.println("Yes");
}else {
System.out.println("No");
}
}
} | Main.java:9: error: ')' expected
if(((a+b == c) || ((a+c == b) || ((b+c == a)) {
^
1 error
|
s071080679 | p03943 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
float a, b, c;
cin >> a >> b >> c >> endl;
if (fmod(a+b+c, 3) == 0){
cout << "Yes" << endl;
}
else
{
cout << "No" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:6:28: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and '<unresolved overloaded function type>')
6 | cin >> a >> b >> c >> endl;
| ~~~~~~~~~~~~~~~~~~~^~~~~~~
In file included from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127,
from a.cc:1:
/usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
170 | operator>>(bool& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:170:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool&'
170 | operator>>(bool& __n)
| ~~~~~~^~~
/usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]'
174 | operator>>(short& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:174:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int&'
174 | operator>>(short& __n);
| ~~~~~~~^~~
/usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
177 | operator>>(unsigned short& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:177:34: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short unsigned int&'
177 | operator>>(unsigned short& __n)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]'
181 | operator>>(int& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:181:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int&'
181 | operator>>(int& __n);
| ~~~~~^~~
/usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
184 | operator>>(unsigned int& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:184:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'unsigned int&'
184 | operator>>(unsigned int& __n)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
188 | operator>>(long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:188:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long int&'
188 | operator>>(long& __n)
| ~~~~~~^~~
/usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
192 | operator>>(unsigned long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:192:33: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long unsigned int&'
192 | operator>>(unsigned long& __n)
| ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
199 | operator>>(long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:199:29: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int&'
199 | operator>>(long long& __n)
| ~~~~~~~~~~~^~~
/usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
203 | operator>>(unsigned long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:203:38: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long unsigned int&'
203 | operator>>(unsigned long long& __n)
| ~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
219 | operator>>(float& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:219:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float&'
219 | operator>>(float& __f)
| ~~~~~~~^~~
/usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
223 | operator>>(double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:223:26: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'double&'
223 | operator>>(double& __f)
| ~~~~~~~~^~~
/usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
227 | operator>>(long double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:227:31: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long double&'
227 | operator>>(long double& __f)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
328 | operator>>(void*& __p)
| ^~~~~~~~
/usr/include/c++/14/istream:328:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'void*&'
328 | operator>>(void*& __p)
| ~~~~~~~^~~
/usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:122:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'}
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]'
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:126:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
133 | operator>>(ios_base& (*__pf)(ios_base&))
| ^~~~~~~~
/usr/include/c++/14/istream:133:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)'
133 | operator>>(ios_base& (*__pf)(ios_base&))
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:352:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; __streambuf_type = std::basic_streambuf<char>]'
352 | operator>>(__streambuf_type* __sb);
| ^~~~~~~~
/usr/include/c++/14/istream:352:36: note: no known conversion for a |
s672214917 | p03943 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c endl;
if (mod(a+b+c, 3) == 0){
cout << "Yes" << endl;
}
else
{
cout << "No" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:6:27: error: expected ';' before 'endl'
6 | cin >> a >> b >> c endl;
| ^~~~~
| ;
a.cc:7:13: error: 'mod' was not declared in this scope; did you mean 'modf'?
7 | if (mod(a+b+c, 3) == 0){
| ^~~
| modf
|
s225043968 | p03943 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c endl
if (mod(a+b+c, 3) == 0){
cout << "Yes" << endl;
}
else
{
cout << "No" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:6:27: error: expected ';' before 'endl'
6 | cin >> a >> b >> c endl
| ^~~~~
| ;
a.cc:10:17: error: 'else' without a previous 'if'
10 | else
| ^~~~
|
s743498173 | p03943 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c endl
if (mod(a+b+c, 3) == 0;){
cout << "Yes" << endl;
}
else
{
cout << "No" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:6:27: error: expected ';' before 'endl'
6 | cin >> a >> b >> c endl
| ^~~~~
| ;
a.cc:7:32: error: expected primary-expression before ')' token
7 | if (mod(a+b+c, 3) == 0;){
| ^
a.cc:10:17: error: 'else' without a previous 'if'
10 | else
| ^~~~
|
s476246388 | p03943 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b,c;
cin >> a >> b >> c;
bool A = 0;
if(a+b==c||a+c==b||b+c==a)A=1;
if(A)
cout << Yes <<endl;
else{
cout << No <<endl;}
} | a.cc: In function 'int main()':
a.cc:10:11: error: 'Yes' was not declared in this scope
10 | cout << Yes <<endl;
| ^~~
a.cc:12:11: error: 'No' was not declared in this scope
12 | cout << No <<endl;}
| ^~
|
s522172913 | p03943 | C++ | include <bits/stdc++.h>
using namespace std;
int main() {
int a,b,c;
cin >> a >> b >> c;
bool A = 0;
if(a+b==c||a+c==b||b+c==a)A=1;
if(A)
cout << Yes <<endl;
else{
cout << No <<endl;}
} | a.cc:1:1: error: 'include' does not name a type
1 | include <bits/stdc++.h>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
6 | cin >> a >> b >> c;
| ^~~
a.cc:10:3: error: 'cout' was not declared in this scope
10 | cout << Yes <<endl;
| ^~~~
a.cc:10:11: error: 'Yes' was not declared in this scope
10 | cout << Yes <<endl;
| ^~~
a.cc:10:17: error: 'endl' was not declared in this scope
10 | cout << Yes <<endl;
| ^~~~
a.cc:12:3: error: 'cout' was not declared in this scope
12 | cout << No <<endl;}
| ^~~~
a.cc:12:11: error: 'No' was not declared in this scope
12 | cout << No <<endl;}
| ^~
a.cc:12:16: error: 'endl' was not declared in this scope
12 | cout << No <<endl;}
| ^~~~
|
s453584629 | p03943 | C++ | include <bits/stdc++.h>
using namespace std;
int main() {
int a,b,c;
cin >> a >> b >> c;
bool A = 0;
if(a+b==c||a+c==b||b+c==a)A=1;
if(A)
cout << Yes <<endl;
else{
cout << No <<endl;}
} | a.cc:1:1: error: 'include' does not name a type
1 | include <bits/stdc++.h>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
6 | cin >> a >> b >> c;
| ^~~
a.cc:10:3: error: 'cout' was not declared in this scope
10 | cout << Yes <<endl;
| ^~~~
a.cc:10:11: error: 'Yes' was not declared in this scope
10 | cout << Yes <<endl;
| ^~~
a.cc:10:17: error: 'endl' was not declared in this scope
10 | cout << Yes <<endl;
| ^~~~
a.cc:12:3: error: 'cout' was not declared in this scope
12 | cout << No <<endl;}
| ^~~~
a.cc:12:11: error: 'No' was not declared in this scope
12 | cout << No <<endl;}
| ^~
a.cc:12:16: error: 'endl' was not declared in this scope
12 | cout << No <<endl;}
| ^~~~
|
s043547266 | p03943 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b,c;
cin >> a >> b >> c;
bool A = 0;
if(a+b==c||a+c==b||b+c==a)A=1
cout << A <<endl;
} | a.cc: In function 'int main()':
a.cc:8:32: error: expected ';' before 'cout'
8 | if(a+b==c||a+c==b||b+c==a)A=1
| ^
| ;
9 |
10 | cout << A <<endl;
| ~~~~
|
s735103937 | p03943 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b,c;
cin >> a >> b >> c;
bool A = 0;
if(a+b===c||a+c==b||b+c==a)A=1
cout << A <<endl;
} | a.cc: In function 'int main()':
a.cc:8:11: error: expected primary-expression before '=' token
8 | if(a+b===c||a+c==b||b+c==a)A=1
| ^
a.cc:8:33: error: expected ';' before 'cout'
8 | if(a+b===c||a+c==b||b+c==a)A=1
| ^
| ;
9 |
10 | cout << A <<endl;
| ~~~~
|
s653426494 | p03943 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b,c,d;
cin>>a>>b>>c;
if(a+b==c||a+c==b||b+c==c)
cout<<"Yes"<<endl;
else
cout<<"No"<<endl;
}
| a.cc:8:3: error: extended character is not valid in an identifier
8 | cout<<"Yes"<<endl;
| ^
a.cc: In function 'int main()':
a.cc:8:3: error: '\U00003000cout' was not declared in this scope
8 | cout<<"Yes"<<endl;
| ^~~~~~
|
s121678131 | p03943 | C | #include<stdio.h>
int main(void){
int a,b,c;
scanf("%d %d %d",&a,&b,&c);
if(a + b == c||a = b + c) printf("YES");
else printf("No");
return 0;
} | main.c: In function 'main':
main.c:5:20: error: lvalue required as left operand of assignment
5 | if(a + b == c||a = b + c) printf("YES");
| ^
|
s839383388 | p03943 | C++ | #include <stdio.h>
int main() {
int a, b, c;
scanf("%d %d %d", &a, &b, &c);
if (a + b == c || a + c == b || b + c == a) { puts("Yes") }
else puts("No");
} | a.cc: In function 'int main()':
a.cc:6:66: error: expected ';' before '}' token
6 | if (a + b == c || a + c == b || b + c == a) { puts("Yes") }
| ^~
| ;
|
s284755192 | p03943 | C++ |
#include <iostream>
using namespace std;
int main()
{
int a,b,c;
cin>>a>>b>>c;
if(a+b=c||c+b=a||a+c=b)
cout<<"Yes";
else
cout<<"No";
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:20: error: lvalue required as left operand of assignment
10 | if(a+b=c||c+b=a||a+c=b)
| ~^~~~~
|
s824357050 | p03943 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a, b, c;
cin >> a >> b >> c;
if(a+b==c || a+c==b || a=b+c) cout << "Yes" << endl;
else cout << "No" << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:6:23: error: lvalue required as left operand of assignment
6 | if(a+b==c || a+c==b || a=b+c) cout << "Yes" << endl;
| ~~~~~~~~~~~~~~~~~^~~~
|
s577251373 | p03943 | C++ | //shara's here
#include<bits/stdc++.h>
int main(){
int x,y,z;
if(x+y==z||x+z==y||y+z==x)cout<<"Yes";
else cout<<"No";
return 0;
} | a.cc: In function 'int main()':
a.cc:5:35: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
5 | if(x+y==z||x+z==y||y+z==x)cout<<"Yes";
| ^~~~
| std::cout
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
from a.cc:2:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:6:14: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
6 | else cout<<"No";
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
|
s229404203 | p03943 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c,d,e,f;
cin >> a >> b >> c;
d = (max(a,b),c);
e = a+ b+c-d
if(d == e){
cout << "Yes" << endl;
}
else{
cout << "No" << endl;
}
} | a.cc: In function 'int main()':
a.cc:7:10: warning: ignoring return value of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&) [with _Tp = int]', declared with attribute 'nodiscard' [-Wunused-result]
7 | d = (max(a,b),c);
| ~~~^~~~~
In file included 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_algobase.h:257:5: note: declared here
257 | max(const _Tp& __a, const _Tp& __b)
| ^~~
a.cc:8:14: error: expected ';' before 'if'
8 | e = a+ b+c-d
| ^
| ;
9 |
10 | if(d == e){
| ~~
a.cc:13:2: error: 'else' without a previous 'if'
13 | else{
| ^~~~
|
s739346250 | p03943 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
if (2*max({a,b,c})==a+b+c) {
cout<<"Yes"<<endl;
}else{
cout<<"No"<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:9:14: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
9 | if (2*max({a,b,c})==a+b+c) {
| ~~~^~~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
257 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
303 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate expects 3 arguments, 1 provided
|
s304247339 | p03943 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
cout << (((max({A, B, C}))==(A+B+C-max({A, B, C})))?"Yes":"No")) << endl;
}
| a.cc: In function 'int main()':
a.cc:7:66: error: expected ';' before ')' token
7 | cout << (((max({A, B, C}))==(A+B+C-max({A, B, C})))?"Yes":"No")) << endl;
| ^
| ;
|
s363570042 | p03943 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
cout << ((max({A, B, C}))==(A+B+C-max({A, B, C})?"Yes":"No")) << endl;
}
| a.cc: In function 'int main()':
a.cc:7:28: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
7 | cout << ((max({A, B, C}))==(A+B+C-max({A, B, C})?"Yes":"No")) << endl;
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
s584264275 | p03943 | C++ | #include"bits/stdc++.h"
#include<boost/multi_array.hpp>
#include<boost/optional.hpp>
#include<boost/range/irange.hpp>
#include<boost/range/algorithm.hpp>
#include<boost/range/adaptors.hpp>
using namespace std;
namespace adaptor = boost::adaptors;
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define rep3(i,m,n) for(int (i)=m;(i)<=(n);(i)++)
#define rep3rev(i,m,n) for(int (i)=m;(i)>=(n);(i)--)
typedef long long ll;
void Main(){
int a,b,c;
cin >> a >> b >> c;
if((a+b-c)*(b+c-a)*(c+a-b)==0)
cout << "Yes" << endl;
else
cout << "No" endl;
return;
}
int main(){
cin.tie(nullptr);
ios_base::sync_with_stdio(false);
cout << fixed << setprecision(15);
Main();
return 0;
}
| a.cc:2:9: fatal error: boost/multi_array.hpp: No such file or directory
2 | #include<boost/multi_array.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s081876911 | p03943 | C++ | #include"bits/stdc++.h"#include<boost/multi_array.hpp>#include<boost/optional.hpp>#include<boost/range/irange.hpp>#include<boost/range/algorithm.hpp>#include<boost/range/adaptors.hpp>using namespace std;namespace adaptor = boost::adaptors;#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)#define rep3(i,m,n) for(int (i)=m;(i)<=(n);(i)++)#define rep3rev(i,m,n) for(int (i)=m;(i)>=(n);(i)--)typedef long long ll;void Main(){int N; cin >>N; cout << N*(N+1)/2 << endl;return;}int main(){cin.tie(nullptr);ios_base::sync_with_stdio(false);cout << fixed << setprecision(15);Main();return 0;}
#include"bits/stdc++.h"#include<boost/multi_array.hpp>#include<boost/optional.hpp>#include<boost/range/irange.hpp>#include<boost/range/algorithm.hpp>#include<boost/range/adaptors.hpp>using namespace std;namespace adaptor = boost::adaptors;#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)#define rep3(i,m,n) for(int (i)=m;(i)<=(n);(i)++)#define rep3rev(i,m,n) for(int (i)=m;(i)>=(n);(i)--)typedef long long ll;void Main(){int N; cin >>N; cout << N*(N+1)/2 << endl;return;}int main(){cin.tie(nullptr);ios_base::sync_with_stdio(false);cout << fixed << setprecision(15);Main();return 0;}
#include"bits/stdc++.h"
#include<boost/multi_array.hpp>
#include<boost/optional.hpp>
#include<boost/range/irange.hpp>
#include<boost/range/algorithm.hpp>
#include<boost/range/adaptors.hpp>
using namespace std;
namespace adaptor = boost::adaptors;
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define rep3(i,m,n) for(int (i)=m;(i)<=(n);(i)++)
#define rep3rev(i,m,n) for(int (i)=m;(i)>=(n);(i)--)
typedef long long ll;
void Main(){
int a,b,c;
cin >> a >> b >> c;
if((a+b-c)*(b+c-a)*(c+a-b)==0)
cout << "Yes" << endl;
else
cout << "No" endl;
return;
}
int main(){
cin.tie(nullptr);
ios_base::sync_with_stdio(false);
cout << fixed << setprecision(15);
Main();
return 0;
} | a.cc:1:24: warning: extra tokens at end of #include directive
1 | #include"bits/stdc++.h"#include<boost/multi_array.hpp>#include<boost/optional.hpp>#include<boost/range/irange.hpp>#include<boost/range/algorithm.hpp>#include<boost/range/adaptors.hpp>using namespace std;namespace adaptor = boost::adaptors;#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)#define rep3(i,m,n) for(int (i)=m;(i)<=(n);(i)++)#define rep3rev(i,m,n) for(int (i)=m;(i)>=(n);(i)--)typedef long long ll;void Main(){int N; cin >>N; cout << N*(N+1)/2 << endl;return;}int main(){cin.tie(nullptr);ios_base::sync_with_stdio(false);cout << fixed << setprecision(15);Main();return 0;}
| ^
a.cc:1:24: warning: extra tokens at end of #include directive
1 | #include"bits/stdc++.h"#include<boost/multi_array.hpp>#include<boost/optional.hpp>#include<boost/range/irange.hpp>#include<boost/range/algorithm.hpp>#include<boost/range/adaptors.hpp>using namespace std;namespace adaptor = boost::adaptors;#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)#define rep3(i,m,n) for(int (i)=m;(i)<=(n);(i)++)#define rep3rev(i,m,n) for(int (i)=m;(i)>=(n);(i)--)typedef long long ll;void Main(){int N; cin >>N; cout << N*(N+1)/2 << endl;return;}int main(){cin.tie(nullptr);ios_base::sync_with_stdio(false);cout << fixed << setprecision(15);Main();return 0;}
| ^
a.cc:2:9: fatal error: boost/multi_array.hpp: No such file or directory
2 | #include"bits/stdc++.h"#include<boost/multi_array.hpp>#include<boost/optional.hpp>#include<boost/range/irange.hpp>#include<boost/range/algorithm.hpp>#include<boost/range/adaptors.hpp>using namespace std;namespace adaptor = boost::adaptors;#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)#define rep3(i,m,n) for(int (i)=m;(i)<=(n);(i)++)#define rep3rev(i,m,n) for(int (i)=m;(i)>=(n);(i)--)typedef long long ll;void Main(){int N; cin >>N; cout << N*(N+1)/2 << endl;return;}int main(){cin.tie(nullptr);ios_base::sync_with_stdio(false);cout << fixed << setprecision(15);Main();return 0;}
| ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s140033251 | p03943 | C++ | #include <iostream>
using namespace std;
int main(void){
int a,b,c;
cin>>a>>b>>c;
if(a+c=b||a+b=c||b+c=a) cout<<"YES"<<endl;
else cout<<"NO"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:20: error: lvalue required as left operand of assignment
6 | if(a+c=b||a+b=c||b+c=a) cout<<"YES"<<endl;
| ~^~~~~
|
s385805506 | p03943 | C++ | #include <iostream>
using namespace std;
int main(void){
int a,b,c;
cin<<a<<b<<c;
if((a+b+c)%2==0)cout<<"Yes"<<endl;
else cout<<"No"<<endl;
}
| a.cc: In function 'int main()':
a.cc:5:8: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
5 | cin<<a<<b<<c;
| ~~~^~~
| | |
| | int
| std::istream {aka std::basic_istream<char>}
a.cc:5:8: note: candidate: 'operator<<(int, int)' (built-in)
5 | cin<<a<<b<<c;
| ~~~^~~
a.cc:5:8: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'int'
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)'
763 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed:
a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
5 | cin<<a<<b<<c;
| ^
/usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
4077 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed:
a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
5 | cin<<a<<b<<c;
| ^
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)'
125 | operator<<(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed:
a.cc:5:5: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte'
5 | cin<<a<<b<<c;
| ^~~
In file included from /usr/include/c++/14/bits/ios_base.h:46:
/usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)'
339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e)
| ^~~~~~~~
/usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed:
a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
5 | cin<<a<<b<<c;
| ^
/usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)'
563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed:
a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
5 | cin<<a<<b<<c;
| ^
/usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)'
573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed:
a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
5 | cin<<a<<b<<c;
| ^
/usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)'
579 | operator<<(basic_ostream<char, _Traits>& __out, char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed:
a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
5 | cin<<a<<b<<c;
| ^
/usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)'
590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed:
a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
5 | cin<<a<<b<<c;
| ^
/usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)'
595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed:
a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
5 | cin<<a<<b<<c;
| ^
/usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)'
654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed:
a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
5 | cin<<a<<b<<c;
| ^
In file included from /usr/include/c++/14/ostream:1022:
/usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)'
307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
| ^~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed:
a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
5 | cin<<a<<b<<c;
| ^
/usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)'
671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:671:5: note: template argument deduction/substitution failed:
a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
5 | cin<<a<<b<<c;
| ^
/usr/include/c++/14/ostream:684:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const signed char*)'
684 | operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:684:5: note: template argument deduction/substitution failed:
a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
5 | cin<<a<<b<<c;
| ^
/usr/include/c++/14/ostream:689:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const unsigned char*)'
689 | operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:689:5: note: template argument deduction/substitution failed:
a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
5 | cin<<a<<b<<c;
| ^
/usr/include/c++/14/ostream:810:5: note: candidate: 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&)'
810 | operator<<(_Ostream&& __os, const _Tp& __x)
| ^~~~~~~~
/usr/include/c++/14/ostream:810:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/ostream: In substitution of 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&) [with _Ostream = std::basic_istream<char>&; _Tp = int]':
a.cc:5:10: required from here
5 | cin<<a<<b<<c;
| ^
/usr/include/c++/14/ostream:810:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
810 | operator<<(_Ostream&& __os, const _Tp& __x)
| ^~~~~~~~
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.