submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3 values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s707290303 | p03943 | C++ | #include<iostream>
#include<set>
using namespace std;
int main(){
int a,b,c;
cin >> a >> b >> c;
if(a+b==c) cout << "Yes\n";
else if(a+c==b) cout << "Yes\n";
else if(b+c==a) cout << "Yes\n";
else cout << "No\n"
} | a.cc: In function 'int main()':
a.cc:10:27: error: expected ';' before '}' token
10 | else cout << "No\n"
| ^
| ;
11 | }
| ~
|
s916787442 | p03943 | C++ | #include <bits/stdc++.h>
using namespace std;
#define REP(i,n) for (int i=0;i<(n);i++)
//#define int long long
int main(){
int s[3];
cin >> s[0] >> s[1] >> s[2];
sort(s,s+3);
if(s[0]+s[1]==s[2]){
cout << "Yes" << endl;
}else{
cout << "No" >> endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:12:22: error: no match for 'operator>>' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
12 | cout << "No" >> endl;
| ~~~~~~~~~~~~~^~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41,
from a.cc:1:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:12:25: note: couldn't deduce template parameter '_IntegerType'
12 | cout << "No" >> endl;
| ^~~~
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:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:12:25: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
12 | cout << "No" >> endl;
| ^~~~
/usr/include/c++/14/bitset:1597:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, bitset<_Nb>&)'
1597 | operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x)
| ^~~~~~~~
/usr/include/c++/14/bitset:1597:5: note: template argument deduction/substitution failed:
a.cc:12:25: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
12 | cout << "No" >> endl;
| ^~~~
In file included from /usr/include/c++/14/istream:1109,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:12:25: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
12 | cout << "No" >> endl;
| ^~~~
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:12:25: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>'
12 | cout << "No" >> endl;
| ^~~~
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:12:25: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>'
12 | cout << "No" >> endl;
| ^~~~
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:12:25: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
12 | cout << "No" >> endl;
| ^~~~
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:12:25: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>'
12 | cout << "No" >> endl;
| ^~~~
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:12:25: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>'
12 | cout << "No" >> endl;
| ^~~~
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
a.cc:12:25: note: couldn't deduce template parameter '_Tp'
12 | cout << "No" >> endl;
| ^~~~
/usr/include/c++/14/complex:509:5: note: candidate: 'template<class _Tp, class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, complex<_Tp>&)'
509 | operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x)
| ^~~~~~~~
/usr/include/c++/14/complex:509:5: note: template argument deduction/substitution failed:
a.cc:12:25: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
12 | cout << "No" >> endl;
| ^~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:143:
/usr/include/c++/14/iomanip:76:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Resetiosflags)'
76 | operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:76:5: note: template argument deduction/substitution failed:
a.cc:12:25: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
12 | cout << "No" >> endl;
| ^~~~
/usr/include/c++/14/iomanip:106:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setiosflags)'
106 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:106:5: note: template argument deduction/substitution failed:
a.cc:12:25: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
12 | cout << "No" >> endl;
| ^~~~
/usr/include/c++/14/iomanip:137:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setbase)'
137 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:137:5: note: template argument deduction/substitution failed:
a.cc:12:25: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
12 | cout << "No" >> endl;
| ^~~~
/usr/include/c++/14/iomanip:177:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setfill<_CharT>)'
177 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:177:5: note: template argument deduction/substitution failed:
a.cc:12:25: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
12 | cout << "No" >> endl;
| ^~~~
/usr/include/c++/14/iomanip:207:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setprecision)'
207 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setprecision __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:207:5: note: template argument deduction/substitution failed:
a.cc:12:25: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
12 | cout << "No" >> endl;
| ^~~~
/usr/include/c++/14/iomanip:237:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setw)'
237 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setw __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:237:5: note: template argument deduction/substitution failed:
a.cc:12:25: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
12 | |
s399090621 | p03943 | C | #include <stdio.h>
#include <main.h>
int main()
{
int a, b, c;
bool result;
scanf("%d %d %d", &a, &b, &c);
if(a == b+c)
{
result = true;
}
else if(b == a+c)
{
result = true;
}
else if(c == a+b)
{
result = true;
}
else
{
result = false;
}
return 0;
} | main.c:2:10: fatal error: main.h: No such file or directory
2 | #include <main.h>
| ^~~~~~~~
compilation terminated.
|
s137660020 | p03943 | C | #include <stdio.h>
int main()
{
int a, b, c;
bool result;
scanf("%d %d %d", &a, &b, &c);
if(a == b+c)
{
result = true;
}
else if(b == a+c)
{
result = true;
}
else if(c == a+b)
{
result = true;
}
else
{
result = false;
}
return 0;
} | main.c: In function 'main':
main.c:6:9: error: unknown type name 'bool'
6 | bool result;
| ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
1 | #include <stdio.h>
+++ |+#include <stdbool.h>
2 |
main.c:12:26: error: 'true' undeclared (first use in this function)
12 | result = true;
| ^~~~
main.c:12:26: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:12:26: note: each undeclared identifier is reported only once for each function it appears in
main.c:24:26: error: 'false' undeclared (first use in this function)
24 | result = false;
| ^~~~~
main.c:24:26: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
|
s665404616 | p03943 | C | #include <main.h>
int main()
{
int a, b, c;
bool result;
scanf("%d %d %d", &a, &b, &c);
if(a == b+c)
{
result = true;
}
else if(b == a+c)
{
result = true;
}
else if(c == a+b)
{
result = true;
}
else
{
result = false;
}
return 0;
} | main.c:1:10: fatal error: main.h: No such file or directory
1 | #include <main.h>
| ^~~~~~~~
compilation terminated.
|
s545939767 | p03943 | C | #include<stdio.h>
int main(){
int l=0,r,u,d=0,n=0;
int x,y,a;
scanf("%d%d%d",&r,&u,&n);
for(int i=0;i<n;i++){
scanf("%d%d%d",&x,&y,&a);
switch(a){
case 1:
(x<l)?l=x:;
break;
case 2:
(r<x)?r=x:;
break;
case 3:
(y<d)?d=y:;
break;
case 4:
(u<y)?u=y:;
break;
}
}
if(u>d&&r>l) printf("%d\n",(u-d)*(r-l));
else printf("0\n");
return 0;
}
| main.c: In function 'main':
main.c:10:19: error: expected expression before ';' token
10 | (x<l)?l=x:;
| ^
main.c:13:19: error: expected expression before ';' token
13 | (r<x)?r=x:;
| ^
main.c:16:19: error: expected expression before ';' token
16 | (y<d)?d=y:;
| ^
main.c:19:19: error: expected expression before ';' token
19 | (u<y)?u=y:;
| ^
|
s981649328 | p03943 | C++ | #include <iostream>
using namespace std;
int main(void){
int a,b,c; cin>>a>>b>>c;
cout<<(a+b==c||a==b+c||a+c==b)?"Yes":"No"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:44: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<'
7 | cout<<(a+b==c||a==b+c||a+c==b)?"Yes":"No"<<endl;
| ~~~~^~~~~~
|
s363292051 | p03943 | C++ | #include <iostream>
#include <string>
#include <set>
#include <vector>
#include <algorithm>
int main(){
int a, b, 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:10:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
10 | 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:12:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
12 | cout << "Yes" << endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:12:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
12 | cout << "Yes" << endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:14:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
14 | cout << "No" << endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:14:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
14 | cout << "No" << endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s011428652 | p03943 | C++ | int main(){
int a, b, 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:3:5: error: 'cin' was not declared in this scope
3 | cin >> a >> b >> c;
| ^~~
a.cc:5:9: error: 'cout' was not declared in this scope
5 | cout << "Yes" << endl;
| ^~~~
a.cc:5:26: error: 'endl' was not declared in this scope
5 | cout << "Yes" << endl;
| ^~~~
a.cc:7:9: error: 'cout' was not declared in this scope
7 | cout << "No" << endl;
| ^~~~
a.cc:7:25: error: 'endl' was not declared in this scope
7 | cout << "No" << endl;
| ^~~~
|
s762744943 | p03943 | C | #include <stdio.h>
staic int a, b, c;
int main(void) {
scanf("%d%d%d", &a, &b, &c);
if (a + b == c || a == b + c) {
puts("Yes");
} else {
puts("No");
}
return 0;
}
| main.c:3:6: error: expected ';' before 'int'
3 | staic int a, b, c;
| ^~~~
| ;
|
s158216946 | p03943 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
int main()
{
int a,b,c;
int d[]={a,b,c};
cin>>a>>b>>c;
sort(d,d+3);
if(d[1]+d[0]==d[2])
{
cout<<"Yes"<<endl;
}else{
cout<<"No"<<endl;
}
return 0; | a.cc: In function 'int main()':
a.cc:16:12: error: expected '}' at end of input
16 | return 0;
| ^
a.cc:5:1: note: to match this '{'
5 | {
| ^
|
s828966455 | p03943 | C++ | #include<iostream>
#include<algorithm>
using namespace iostream;
int main()
{
int a,b,c;
int d[]={a,b,c};
cin>>a>>b>>c;
sort(d,d+3);
if(d[1]+d[0]==d[2])
{
cout<<"Yes"<<endl;
}else{
cout<<"No"<<endl;
}
return 0;
} | a.cc:3:17: error: 'iostream' is not a namespace-name
3 | using namespace iostream;
| ^~~~~~~~
a.cc: In function 'int main()':
a.cc:8:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
8 | cin>>a>>b>>c;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:9:3: error: 'sort' was not declared in this scope; did you mean 'std::sort'?
9 | sort(d,d+3);
| ^~~~
| std::sort
In file included from /usr/include/c++/14/algorithm:86,
from a.cc:2:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: 'std::sort' declared here
296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
| ^~~~
a.cc:12:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
12 | cout<<"Yes"<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:12:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
12 | cout<<"Yes"<<endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:14:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
14 | cout<<"No"<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:14:17: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
14 | cout<<"No"<<endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s967717727 | p03943 | C++ | #include<iostream>
#include<algorithm>
int main()
{
int a,b,c;
int d[]={a,b,c};
cin>>a>>b>>c;
sort(d,d+3);
if(d[1]+d[0]==d[2])
{
cout<<"Yes"<<endl;
}else{
cout<<"No"<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
7 | cin>>a>>b>>c;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:8:3: error: 'sort' was not declared in this scope; did you mean 'std::sort'?
8 | sort(d,d+3);
| ^~~~
| std::sort
In file included from /usr/include/c++/14/algorithm:86,
from a.cc:2:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: 'std::sort' declared here
296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
| ^~~~
a.cc:11:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
11 | cout<<"Yes"<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:11:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
11 | cout<<"Yes"<<endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:13:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
13 | cout<<"No"<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:13:17: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
13 | cout<<"No"<<endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s913565705 | p03943 | C++ | #include<iostream>
#include<algorithm>
int main()
{
int a,b,c;
int d[]={a,b,c};
cin>>a>>b>>c;
sort(d,d+2);
if(d[1]+d[0]==d[2])
{
cout<<"Yes"<<endl;
}else{
cout<<"No"<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
7 | cin>>a>>b>>c;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:8:3: error: 'sort' was not declared in this scope; did you mean 'std::sort'?
8 | sort(d,d+2);
| ^~~~
| std::sort
In file included from /usr/include/c++/14/algorithm:86,
from a.cc:2:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: 'std::sort' declared here
296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
| ^~~~
a.cc:11:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
11 | cout<<"Yes"<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:11:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
11 | cout<<"Yes"<<endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:13:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
13 | cout<<"No"<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:13:17: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
13 | cout<<"No"<<endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s989618280 | p03943 | C++ | #include<iostream>
#include<algorithm>
int main()
{
int a,b,c;
int d[]={a,b,c};
cin>>a>>b>>c;
sort(d,d+2);
if(d[1]+d[0]==d[2])
{
cout<<"Yes"<<end;
}else{
cout<<"No"<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
7 | cin>>a>>b>>c;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:8:3: error: 'sort' was not declared in this scope; did you mean 'std::sort'?
8 | sort(d,d+2);
| ^~~~
| std::sort
In file included from /usr/include/c++/14/algorithm:86,
from a.cc:2:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: 'std::sort' declared here
296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
| ^~~~
a.cc:11:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
11 | cout<<"Yes"<<end;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:11:20: error: 'end' was not declared in this scope; did you mean 'std::end'?
11 | cout<<"Yes"<<end;
| ^~~
| std::end
In file included from /usr/include/c++/14/string:53,
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:
/usr/include/c++/14/bits/range_access.h:116:37: note: 'std::end' declared here
116 | template<typename _Tp> const _Tp* end(const valarray<_Tp>&) noexcept;
| ^~~
a.cc:13:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
13 | cout<<"No"<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:13:17: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
13 | cout<<"No"<<endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s888881228 | p03943 | C++ | #include<iostream>
#include<algorithm>
int main()
{
int a,b,c;
int d[]={a,b,c};
cin>>a>>b>>c;
sort(d,d+3);
if(d[1]+d[0]==d[2])
{
cout<<"Yes"<<end;
}else{
cout<<"No"<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
7 | cin>>a>>b>>c;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:8:3: error: 'sort' was not declared in this scope; did you mean 'std::sort'?
8 | sort(d,d+3);
| ^~~~
| std::sort
In file included from /usr/include/c++/14/algorithm:86,
from a.cc:2:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: 'std::sort' declared here
296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
| ^~~~
a.cc:11:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
11 | cout<<"Yes"<<end;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:11:20: error: 'end' was not declared in this scope; did you mean 'std::end'?
11 | cout<<"Yes"<<end;
| ^~~
| std::end
In file included from /usr/include/c++/14/string:53,
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:
/usr/include/c++/14/bits/range_access.h:116:37: note: 'std::end' declared here
116 | template<typename _Tp> const _Tp* end(const valarray<_Tp>&) noexcept;
| ^~~
a.cc:13:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
13 | cout<<"No"<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:13:17: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
13 | cout<<"No"<<endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s330189088 | p03943 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
if((a+b+c)%==0) cout<<"Yes"<<endl;
else cout<<"No<<endl;
return 0;
}
| a.cc:9:12: warning: missing terminating " character
9 | else cout<<"No<<endl;
| ^
a.cc:9:12: error: missing terminating " character
9 | else cout<<"No<<endl;
| ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:8:13: error: expected primary-expression before '=' token
8 | if((a+b+c)%==0) cout<<"Yes"<<endl;
| ^
a.cc:10:1: error: expected primary-expression before 'return'
10 | return 0;
| ^~~~~~
|
s944228768 | p03943 | C++ | # -*- coding: utf-8 -*-
import math
import sys
import itertools
import numpy as np
import functools
import collections
mo = 1000000007
INF = 10**100
r = range
class infix(object):
def __init__(self, function):
self.function = function
def __ror__(self, other):
self.left = other
return self
def __or__(self, other):
return self.function(self.left, other)
def __call__(self, value1, value2):
return self.function(value1, value2)
@infix
def c(f_t_u, f_u_r): return lambda t: f_u_r(f_t_u(t))
class _Ap(object):
def __rlshift__(self, other):
self.value = other
return self
def __rshift__(self, other):
return other(self.value)
Ap = _Ap()
ap = Ap
#d = {1:2, 3:5, 6:10, 1000043:3814}
#zip(d.keys(), d.values())<<ap>>(list |c| sorted |c| reversed |c| list |c| print)
x=map(int,input().split())<<ap>>list<<ap>>sorted
print('Yes' if x[0]+x[1]==x[2] else 'No')
| a.cc:1:3: error: invalid preprocessing directive #-
1 | # -*- coding: utf-8 -*-
| ^
a.cc:26:1: error: stray '@' in program
26 | @infix
| ^
a.cc:39:2: error: invalid preprocessing directive #d
39 | #d = {1:2, 3:5, 6:10, 1000043:3814}
| ^
a.cc:40:2: error: invalid preprocessing directive #zip
40 | #zip(d.keys(), d.values())<<ap>>(list |c| sorted |c| reversed |c| list |c| print)
| ^~~
a.cc:43:7: warning: multi-character character constant [-Wmultichar]
43 | print('Yes' if x[0]+x[1]==x[2] else 'No')
| ^~~~~
a.cc:43:37: warning: multi-character character constant [-Wmultichar]
43 | print('Yes' if x[0]+x[1]==x[2] else 'No')
| ^~~~
a.cc:2:1: error: 'import' does not name a type
2 | import math
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
|
s156307583 | p03943 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b,c;
cin>>a>>b>>c;
puts(a+b==c||b+c==a||c+a==b)
cout<<"Yes";
else
cout<<"No";
} | a.cc: In function 'int main()':
a.cc:7:28: error: cannot convert 'bool' to 'const char*'
7 | puts(a+b==c||b+c==a||c+a==b)
| ~~~~~~~~~~~~~~^~~~~~~~
| |
| bool
In file included from /usr/include/c++/14/cstdio:42,
from /usr/include/c++/14/ext/string_conversions.h:45,
from /usr/include/c++/14/bits/basic_string.h:4154,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
from a.cc:1:
/usr/include/stdio.h:714:30: note: initializing argument 1 of 'int puts(const char*)'
714 | extern int puts (const char *__s);
| ~~~~~~~~~~~~^~~
a.cc:9:5: error: 'else' without a previous 'if'
9 | else
| ^~~~
|
s166949362 | p03943 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
}
int a,b,c;
cin>>a>>b>>c;
puts(a+b==c||b+c==a||c+a==b)
cout<<"Yes";
else
cout<<"No";
} | a.cc:7:5: error: 'cin' does not name a type
7 | cin>>a>>b>>c;
| ^~~
a.cc:8:13: error: expected constructor, destructor, or type conversion before '(' token
8 | puts(a+b==c||b+c==a||c+a==b)
| ^
a.cc:10:5: error: expected unqualified-id before 'else'
10 | else
| ^~~~
a.cc:12:1: error: expected declaration before '}' token
12 | }
| ^
|
s562099447 | p03943 | C++ | #include<iostream>
using namespace std;
int main()
{
long long W,H,N;
cin >> W >> H >> N;
long long l=0,r=W,b=0,t=H;
long long x,y,a;
for(int i=0;i<N;i++){
cin >> x >> y >> a;
switch(a){
case 1:
if(l < x)l = x;
break;
case 2:
if(r > x)r = x;
break;
case 3:
if(b < y)b = y;
break;
case 4:
if(t > y)t = y;
break;
}
}
cout << (r-l)*(t-b) << endl;
return 0;
| a.cc: In function 'int main()':
a.cc:34:18: error: expected '}' at end of input
34 | return 0;
| ^
a.cc:6:1: note: to match this '{'
6 | {
| ^
|
s298296465 | p03943 | C++ | #include <iostream>
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:9:32: error: lvalue required as left operand of assignment
9 | if (a = b + c || b = a + c || c = a + b) {
| ~~~~~~^~~~
|
s390699649 | p03943 | C++ | #include <iostream>
#include <stdio.h>
#include <string>
#include <math.h>
using namespace std;
int main(){
int a, b, c;
cin >> a >> b >> c;
if(a=b+c || b=c+a || c==a+b) printf("Yes\n");
else printf("No\n");
return 0;
} | a.cc: In function 'int main()':
a.cc:11:18: error: lvalue required as left operand of assignment
11 | if(a=b+c || b=c+a || c==a+b) printf("Yes\n");
| ~~~~^~~~
|
s755844710 | p03943 | C++ | #include <iostream>
#include <stdio.h>
#include <string>
#include <math.h>
using namespace std;
int main(){
int a, b, c
cin >> a >> b >> c;
if(a=b+c || b=c+a || c==a+b) printf("Yes\n");
else printf("No\n");
return 0;
} | a.cc: In function 'int main()':
a.cc:9:9: error: expected initializer before 'cin'
9 | cin >> a >> b >> c;
| ^~~
a.cc:11:16: error: 'c' was not declared in this scope
11 | if(a=b+c || b=c+a || c==a+b) printf("Yes\n");
| ^
|
s088116099 | p03943 | C++ | using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
namespace AtCoder {
class MainClass {
public static void Main(string[] args) { new MainClass().solve(); }
Scanner cin = new Scanner();
int a, b, c;
void solve() {
a = cin.nextInt();
b = cin.nextInt();
c = cin.nextInt();
int[] candy = {a,b,c};
Array.Sort(candy);
Array.Reverse(candy);
bool isEnable = candy[0] == (candy[1] + candy[2]);
Console.WriteLine(isEnable?"YES":"NO");
}
class Scanner {
string[] nextBuffer; int BufferCnt; char[] cs = new char[] { ' ' };
public Scanner() { nextBuffer = new string[0]; BufferCnt = 0; }
public string next() {
if (BufferCnt < nextBuffer.Length) return nextBuffer[BufferCnt++];
string st = Console.ReadLine();
while (st == "") st = Console.ReadLine();
nextBuffer = st.Split(cs, StringSplitOptions.RemoveEmptyEntries);
BufferCnt = 0;
return nextBuffer[BufferCnt++];
}
public int nextInt() { return int.Parse(next()); }
public long nextLong() { return long.Parse(next()); }
public double nextDouble() { return double.Parse(next()); }
}
class Mathf {
private int mod = 1000000007;//10^9+7
public int Mod { get; set; }
public Mathf() { }
public Mathf(int mod) { this.mod = mod; }
public long Pow(long a, long b) {
if (b == 0) return 1;
if (b % 2 == 1) return (a % mod * Pow(a % mod, b - 1) % mod) % mod;
else return Pow(a * a % mod, b / 2) % mod;
}
public long Fact(long n) { return n != 0 ? (n % mod * (Fact(n - 1) % mod) % mod) : 1; }
public long C(long n, long r) {if (r == 0 || n == r) return 1;
else return (Fact(n) % mod * Pow((Fact(n - r) % mod * Fact(r) % mod) % mod, mod - 2) % mod) % mod;}
}
}
} | a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
2 | using System.Collections;
| ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
3 | using System.Collections.Generic;
| ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
4 | using System.Diagnostics;
| ^~~~~~
a.cc:5:7: error: expected nested-name-specifier before 'System'
5 | using System.IO;
| ^~~~~~
a.cc:6:7: error: expected nested-name-specifier before 'System'
6 | using System.Linq;
| ^~~~~~
a.cc:7:7: error: expected nested-name-specifier before 'System'
7 | using System.Text;
| ^~~~~~
a.cc:10:15: error: expected ':' before 'static'
10 | public static void Main(string[] args) { new MainClass().solve(); }
| ^~~~~~~
| :
a.cc:10:33: error: 'string' has not been declared
10 | public static void Main(string[] args) { new MainClass().solve(); }
| ^~~~~~
a.cc:10:42: error: expected ',' or '...' before 'args'
10 | public static void Main(string[] args) { new MainClass().solve(); }
| ^~~~
a.cc:12:9: error: 'Scanner' does not name a type
12 | Scanner cin = new Scanner();
| ^~~~~~~
a.cc:31:13: error: 'string' does not name a type
31 | string[] nextBuffer; int BufferCnt; char[] cs = new char[] { ' ' };
| ^~~~~~
a.cc:31:53: error: expected unqualified-id before '[' token
31 | string[] nextBuffer; int BufferCnt; char[] cs = new char[] { ' ' };
| ^
a.cc:32:19: error: expected ':' before 'Scanner'
32 | public Scanner() { nextBuffer = new string[0]; BufferCnt = 0; }
| ^~~~~~~~
| :
a.cc:33:19: error: expected ':' before 'string'
33 | public string next() {
| ^~~~~~~
| :
a.cc:33:20: error: 'string' does not name a type
33 | public string next() {
| ^~~~~~
a.cc:41:19: error: expected ':' before 'int'
41 | public int nextInt() { return int.Parse(next()); }
| ^~~~
| :
a.cc:42:19: error: expected ':' before 'long'
42 | public long nextLong() { return long.Parse(next()); }
| ^~~~~
| :
a.cc:43:19: error: expected ':' before 'double'
43 | public double nextDouble() { return double.Parse(next()); }
| ^~~~~~~
| :
a.cc:44:10: error: expected ';' after class definition
44 | }
| ^
| ;
a.cc:46:20: error: expected ':' before 'int'
46 | private int mod = 1000000007;//10^9+7
| ^~~~
| :
a.cc:47:19: error: expected ':' before 'int'
47 | public int Mod { get; set; }
| ^~~~
| :
a.cc:47:40: error: expected ';' at end of member declaration
47 | public int Mod { get; set; }
| ^
| ;
a.cc:48:19: error: expected ':' before 'Mathf'
48 | public Mathf() { }
| ^~~~~~
| :
a.cc:49:19: error: expected ':' before 'Mathf'
49 | public Mathf(int mod) { this.mod = mod; }
| ^~~~~~
| :
a.cc:50:19: error: expected ':' before 'long'
50 | public long Pow(long a, long b) {
| ^~~~~
| :
a.cc:55:19: error: expected ':' before 'long'
55 | public long Fact(long n) { return n != 0 ? (n % mod * (Fact(n - 1) % mod) % mod) : 1; }
| ^~~~~
| :
a.cc:56:19: error: expected ':' before 'long'
56 | public long C(long n, long r) {if (r == 0 || n == r) return 1;
| ^~~~~
| :
a.cc:58:10: error: expected ';' after class definition
58 | }
| ^
| ;
a.cc:59:6: error: expected ';' after class definition
59 | }
| ^
| ;
a.cc:47:30: error: 'get' was not declared in this scope
47 | public int Mod { get; set; }
| ^~~
a.cc:47:33: error: expected '}' before ';' token
47 | public int Mod { get; set; }
| ^
a.cc:47:28: note: to match this '{'
47 | public int Mod { get; set; }
| ^
a.cc:47:33: error: cannot convert '<brace-enclosed initializer list>' to 'int' in initialization
47 | public int Mod { get; set; }
| ^
a.cc:47:33: error: expected ';' before ';' token
a.cc: In static member function 'static void AtCoder::MainClass::Main(int*)':
a.cc:10:65: error: expected ';' before '.' token
10 | public static void Main(string[] args) { new MainClass().solve(); }
| ^
a.cc: In member function 'void AtCoder::MainClass::solve()':
a.cc:16:17: error: 'cin' was not declared in this scope
16 | a = cin.nextInt();
| ^~~
a.cc:20:16: error: structured binding declaration cannot have type 'int'
20 | int[] candy = {a,b,c};
| ^~
a.cc:20:16: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:20:16: error: empty structured binding declaration
a.cc:20:19: error: expected initializer before 'candy'
20 | int[] candy = {a,b,c};
| ^~~~~
a.cc:22:13: error: 'Array' was not declared in this scope
22 | Array.Sort(candy);
| ^~~~~
a.cc:22:24: error: 'candy' was not declared in this scope
22 | Array.Sort(candy);
| ^~~~~
a.cc:27:13: error: 'Console' was not declared in this scope
27 | Console.WriteLine(isEnable?"YES":"NO");
| ^~~~~~~
a.cc: In constructor 'AtCoder::MainClass::Scanner::Scanner()':
a.cc:32:32: error: 'nextBuffer' was not declared in this scope
32 | public Scanner() { nextBuffer = new string[0]; BufferCnt = 0; }
| ^~~~~~~~~~
a.cc:32:49: error: 'string' does not name a type
32 | public Scanner() { nextBuffer = new string[0]; BufferCnt = 0; }
| ^~~~~~
a.cc: In member function 'int AtCoder::MainClass::Scanner::nextInt()':
a.cc:41:43: error: expected primary-expression before 'int'
41 | public int nextInt() { return int.Parse(next()); }
| ^~~
a.cc:41:43: error: expected ';' before 'int'
a.cc:41:46: error: expected unqualified-id before '.' token
41 | public int nextInt() { return int.Parse(next()); }
| ^
a.cc: In member function 'long int AtCoder::MainClass::Scanner::nextLong()':
a.cc:42:45: error: expected primary-expression before 'long'
42 | public long nextLong() { return long.Parse(next()); }
| ^~~~
a.cc:42:45: error: expected ';' before 'long'
a.cc:42:49: error: expected unqualified-id before '.' token
42 | public long nextLong() { return long.Parse(next()); }
| ^
a.cc: In member function 'double AtCoder::MainClass::Scanner::nextDouble()':
a.cc:43:49: error: expected primary-expression before 'double'
43 | public double nextDouble() { return double.Parse(next()); }
| ^~~~~~
a.cc:43:49: error: expected ';' before 'double'
a.cc:43:55: error: expected unqualified-id before '.' token
43 | public double nextDouble() { return double.Parse(next()); }
| ^
a.cc: In constructor 'AtCoder::MainClass::Mathf::Mathf(int)':
a.cc:49:42: error: request for member 'mod' in '(AtCoder::MainClass::Mathf*)this', which is of pointer type 'AtCoder::MainClass::Mathf*' (maybe you meant to use '->' ?)
49 | public Mathf(int mod) { this.mod = mod; }
| ^~~
|
s823807814 | p03943 | C++ | #include <iostream>
#include <string>
using namespace std;
int main()
{
int a[3];
cin >> a[0] >> a[1] >> a[2];
sort(a, a + 3);
if (a[0] + a[1] == a[2]) {
cout << "Yes" << endl;
}
else
{
cout << "No" << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:10:9: error: 'sort' was not declared in this scope; did you mean 'short'?
10 | sort(a, a + 3);
| ^~~~
| short
|
s750647707 | p03943 | Java |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String x = br.readLine();
String[] cut = x.split(" ");
int a = Integer.parseInt(cut[0]);
int b = Integer.parseInt(cut[1]);
int c = Integer.parseInt(cut[2]);
/*String u = "No";
if(a==b){
u="Yes";
}else if(b==c){
u="Yes";
}else if(c==a){
u="Yea";
}
*/
int y = Math.max(a, Math.max(b, c));
if (y == a && a == b + c) {
u = "Yes";
} else if (y == b && b == a + c) {
u = "Yes";
} else if (y == c && c == a + b) {
u = "Yes";
}
System.out.println(u);
}
}
| Main.java:28: error: cannot find symbol
u = "Yes";
^
symbol: variable u
location: class Main
Main.java:30: error: cannot find symbol
u = "Yes";
^
symbol: variable u
location: class Main
Main.java:32: error: cannot find symbol
u = "Yes";
^
symbol: variable u
location: class Main
Main.java:34: error: cannot find symbol
System.out.println(u);
^
symbol: variable u
location: class Main
4 errors
|
s417788536 | p03943 | C++ | a, b ,c = map(int, input().split())
if a + b == c or b + c == a or a + c == b:
print('Yes')
else :
print('No') | a.cc:3:11: warning: multi-character character constant [-Wmultichar]
3 | print('Yes')
| ^~~~~
a.cc:5:11: warning: multi-character character constant [-Wmultichar]
5 | print('No')
| ^~~~
a.cc:1:1: error: 'a' does not name a type
1 | a, b ,c = map(int, input().split())
| ^
|
s061158768 | p03943 | C++ | #include <bits/stdc++.h>
using namespace std;
#define REP(i, s, n) for (int i = s; i < n; ++i)
#define rep(i, n) REP(i, 0, n)
#define SORT(c) sort((c).begin(), (c).end())
#define IINF INT_MAX
#define LLINF LLONG_MAX
#define DEBUG false
int main()
{
vector<int> hoge(3);
rep(i, 3)
{
cin >> hoge[i];
}
sort(hoge);
if (hoge[2] == hoge[1] + hoge[0])
{
cout << "YES" << endl;
}
else
{
cout << "NO" << endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:18:9: error: no matching function for call to 'sort(std::vector<int>&)'
18 | sort(hoge);
| ~~~~^~~~~~
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:4762:5: note: candidate: 'template<class _RAIter> void std::sort(_RAIter, _RAIter)'
4762 | sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
| ^~~~
/usr/include/c++/14/bits/stl_algo.h:4762:5: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algo.h:4793:5: note: candidate: 'template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)'
4793 | sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
| ^~~~
/usr/include/c++/14/bits/stl_algo.h:4793:5: note: candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare)'
292 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp);
| ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note: candidate expects 4 arguments, 1 provided
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator)'
296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
| ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: candidate expects 3 arguments, 1 provided
|
s462265219 | p03943 | C++ | #include<iostream>
using namespace std;
int main(){
int W , H , N;
cin >> W >> H >> N ;
int WWL = 0 , WWR = W , WHU = 0 , WHO = H;
for(int i = 0 ; i < N ; i++){
int x , y , a;
cin >> x >> y >> a;
switch(a):
case(1){
if(WWL > x)
WWL = x;
break;
}
case(2){
if(WWR < x)
WWR = x;
break;
}
case(3){
if(WHU > y)
WHU = y;
break;
}
case(4){
if(Who < y)
WHO = y;
break;
}
//cout << "xa=" << WWL << " xb=" << WWR << " ya=" << WHU << " yb =" << WHO << endl;
}
int men = (WWR - WWL) * (WHO - WHU);
if ((WWR - WWL) < 0 || (WHO - WHU)<0)
men = 0;
cout << men << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:14:14: error: expected primary-expression before ':' token
14 | switch(a):
| ^
a.cc:20:7: error: case label '2' not within a switch statement
20 | case(2){
| ^~~~
a.cc:20:14: error: expected ':' before '{' token
20 | case(2){
| ^
| :
a.cc:25:7: error: case label '3' not within a switch statement
25 | case(3){
| ^~~~
a.cc:25:14: error: expected ':' before '{' token
25 | case(3){
| ^
| :
a.cc:30:7: error: case label '4' not within a switch statement
30 | case(4){
| ^~~~
a.cc:30:14: error: expected ':' before '{' token
30 | case(4){
| ^
| :
a.cc:31:12: error: 'Who' was not declared in this scope; did you mean 'WHO'?
31 | if(Who < y)
| ^~~
| WHO
|
s607127499 | p03943 | C++ | 1 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 1
| ^
|
s626655292 | p03943 | C++ | #include <iostream>
using namespace std;
int main(){
int a,b,c;
cin >> a >> b >> c;
if(a == b+c || b == a+c || c = a+b){
puts("Yes");
}else{
puts("No");
}
return 0;
} | a.cc: In function 'int main()':
a.cc:10:27: error: lvalue required as left operand of assignment
10 | if(a == b+c || b == a+c || c = a+b){
| ~~~~~~~~~~~~~~~~~~~~~^~~~
|
s049942117 | p03943 | C++ | #include<iostream>
#include<string>
#include<cmath>
#include<iomanip>
#include<cstdlib>
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"<<endl;
}
else{
cout<<"NO"<<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:47: error: expected primary-expression before ')' token
10 | if( a + b == c || b + c == a || c + a == b )){
| ^
|
s337409039 | p03943 | Java | import java.net.SecureCacheResponse;
import java.util.Random;
import java.util.Scanner;
public class kougi {
public static void main(String[] args) {
int a ,b, c;
Scanner scan = new Scanner(System.in);
a = scan.nextInt();
b = scan.nextInt();
c = scan.nextInt();
if(a + b == c || b + c == a || c + a == b){
System.out.println("Yes");
}else {
System.out.println("No");
}
}
}
| Main.java:5: error: class kougi is public, should be declared in a file named kougi.java
public class kougi {
^
1 error
|
s199608489 | p03943 | Java | import java.net.SecureCacheResponse;
import java.util.Random;
import java.util.Scanner;
public class kougi {
public static void main(String[] args) {
int a ,b, c;
Scanner scan = new Scanner(System.in);
a = scan.nextInt();
b = scan.nextInt();
c = scan.nextInt();
if(a + b == c){
System.out.println("Yes");
}else if(b + c == a){
System.out.println("Yes");
}else if(c + a == b){
System.out.println("Yes");
}else {
System.out.println("No");
}
}
}
| Main.java:5: error: class kougi is public, should be declared in a file named kougi.java
public class kougi {
^
1 error
|
s055509723 | p03943 | C++ | #include <cstdio>
#include <iostream>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <cstring>
#include <queue>
#include <stack>
#include <functional>
#include <set>
#include <map>
#include <deque>
#define WMAX 10000
#define HMAX 10000
//コメントアウトするとdebug()を実行しない
#define DEBUG
using namespace std;
template<typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val){
std::fill( (T*)array, (T*)(array+N), val );
}
typedef pair<int ,int > P;
typedef long long ll;
int A,B,C,N,W,H;
string ans;
string S;
static const int dx[8] = {0,1,1,1,0,-1,-1,-1},
dy[8] = {1,1,0,-1,-1,-1,0,1};
void solve(){
}
void debug(){
}
void answer(){
cout << ans << "\n";
}
int main(){
cin >> A >> B >> C;
if(A+B == C || A+C == B || B+C == A){
ans = "Yes";
}else{
ans = "No"
}
solve();
#ifdef DEBUG
debug();
#endif
answer();
return 0;
} | a.cc: In function 'int main()':
a.cc:51:27: error: expected ';' before '}' token
51 | ans = "No"
| ^
| ;
52 | }
| ~
|
s898808783 | p03943 | C++ | #include <cstdio>
#include <iostream>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <cstring>
#include <queue>
#include <stack>
#include <functional>
#include <set>
#include <map>
#include <deque>
#define WMAX 10000
#define HMAX 10000
//コメントアウトするとdebug()を実行しない
#define DEBUG
using namespace std;
template<typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val){
std::fill( (T*)array, (T*)(array+N), val );
}
typedef pair<int ,int > P;
typedef long long ll;
int A,B,C,N,W,H
string ans;
string S;
static const int dx[8] = {0,1,1,1,0,-1,-1,-1},
dy[8] = {1,1,0,-1,-1,-1,0,1};
void solve(){
}
void debug(){
}
void answer(){
cout << ans << "\n";
}
int main(){
cin >> A >> B >> C;
if(A+B == C || A+C == B || B+C == A){
ans = "Yes";
}else{
ans = "No";
}
solve();
#ifdef DEBUG
debug();
#endif
answer();
return 0;
} | a.cc:29:1: error: expected initializer before 'string'
29 | string ans;
| ^~~~~~
a.cc: In function 'void answer()':
a.cc:43:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
43 | cout << ans << "\n";
| ^~~
| abs
a.cc: In function 'int main()':
a.cc:49:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
49 | ans = "Yes";
| ^~~
| abs
a.cc:51:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
51 | ans = "No";
| ^~~
| abs
|
s447655617 | p03943 | C | #define SORT(v) sort(v.begin(), v.end())
#include <iostream>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <algorithm>
#include <cstdlib>
#include <cstdarg>
#include <cstdio>
#include <cmath>
#include <numeric>
#include <utility>
// #include "ane.cpp"
#define INF (int)1e9
#define INFLL (long long)1e18
#define NMAX 100005
#define MMAX 100005
#define MOD 100000
using namespace std;
// コメントアウトするとdebug()を実行しない
#define DEBUG
//
// ライブラリ
//
// frequent used aliases
typedef long long ll;
typedef pair<int, int> p;
typedef pair<ll, int> lp;
typedef pair<ll, ll> llp;
typedef vector<int> vec;
typedef vector<vec> mat;
// frequent used constants
static const int di[] = {-1, 0, 1, -1, 1, -1, 0, 1};
static const int dj[] = {-1, -1, -1, 0, 0, 1, 1, 1};
// デバッグ用printf
void debug(const char* format, ...){
#ifndef DEBUG
return;
#endif
va_list arg;
va_start(arg, format);
vprintf(format, arg); // コンソールに出力
va_end(arg);
}
// n次元配列の初期化。第2引数の型のサイズごとに初期化していく。
template<typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val){
std::fill( (T*)array, (T*)(array+N), val );
}
// Union-Find Tree
class UnionFindTree{
struct node{
int par;
};
std::vector<node> T;
public:
void init(int num){
T.resize(num+1); // ignore T[0]
for (int i = 1; i <= num; ++i)
{
T[i].par = i;
}
}
void unite(int x, int y){
T[find(y)].par = find(x);
}
int find(int x){
if (T[x].par == x) return x;
else return T[x].par = find(T[x].par);
}
bool same(int x, int y){
return find(x) == find(y);
}
};
// Segment Tree for Range Minimum Query
// **********************************************************
// *** important: all functions' variable, ***
// *** such as "index", "l", "r", etc., must be 0-origin. ***
// **********************************************************
// ********************************************
// *** important: NMAX must be power of 2. ***
// ********************************************
template<typename T>
class SegmentTree{
private:
ll N;
T INF_VAL;
T dat[NMAX * 2]; // 0 origin, A[i] = dat[i + N]
T _query(ll l, ll r, ll l_resp, ll r_resp, ll i_dat){
debug("query(%lld, %lld, %lld, %lld, %lld) called\n",
l, r, l_resp, r_resp, i_dat);
if (r < l_resp || r_resp < l) return INF_VAL;
else if(l <= l_resp && r_resp <= r) return dat[i_dat];
else return min(_query(l ,r, l_resp, (l_resp + r_resp) / 2, i_dat * 2),
_query(l, r, (l_resp + r_resp) / 2 + 1, r_resp, i_dat * 2 + 1));
}
public:
void init(ll _N, T _inf_val){
N = 1; while(N < _N) N *= 2;
INF_VAL = _inf_val;
Fill(dat, _inf_val);
}
T get(ll index){
return dat[index + N];
}
void set(int index, T val){
int i_dat = index + N;
dat[i_dat] = val;
for (i_dat /= 2; i_dat > 0; i_dat /= 2)
{
dat[i_dat] = min(dat[i_dat * 2], dat[i_dat * 2 + 1]);
}
}
T query(ll l, ll r){
return _query(l, r, 0, N - 1, 1);
}
void dump(){
cout << "*** SegTree dump begin ***\n";
cout << "N = " << N << ", INF_VAL = " << INF_VAL << endl;
for (int i = 1; i < N * 2; i *= 2)
{
for (int j = i; j < i * 2; ++j)
{
if(dat[j] == INF_VAL) cout << "INF ";
else cout << dat[j] << " ";
}
cout << endl;
}
cout << "*** SegTree dump end ***\n";
}
};
// Binary Indexed Tree for Range Sum Query
// *******************************************
// *** important: all functions' variable, ***
// *** such as "i", must be 1-origin. ***
// *******************************************
template<typename T>
class BinaryIndexedTree{
private:
ll N;
T dat[NMAX + 1]; // 1 origin, A[i] = sum(i) - sum(i-1)
public:
void init(ll _N){
N = _N;
Fill(dat, 0);
}
void add(int i, T val){
while(i <= N) {
dat[i] += val;
i += i & -i;
}
}
T sum(ll i){
T ret = 0;
while(i > 0) {
ret += dat[i];
i -= i & -i; // set last HIGH bit to LOW
}
return ret;
}
T sum(ll left, ll right){
return sum(right) - sum(left - 1);
}
void dump(){
cout << "*** BITree dump begin ***\n";
cout << "N = " << N << endl;
for (int i = 1; i <= N; i *= 2)
{
cout << dat[i] << " ";
}
cout << "*** BITree dump end ***\n";
}
};
//
// ライブラリ終了
//
ll N,M,K,A,B,C,D,E;
int dp[NMAX] = {};
ll ans = 0;
void solve(){
// 解答アルゴリズム
}
void debug(){
// デバッグ用出力
}
void answer(){
// 解答出力
if (N + K == M || N + M == K || M + K == N)
{
cout << "Yes\n";
}else{
cout << "No\n";
}
}
int main(int argc, char const *argv[])
{
// 入力の読み込み,番兵法
// Fill(dp, -1);
scanf("%lld%lld%lld", &N,&M, &K);
solve();
#ifdef DEBUG
debug();
#endif
answer();
return 0;
} | main.c:2:10: fatal error: iostream: No such file or directory
2 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s211238871 | p03943 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner scan = new Scanner(System.in);
int a = scan.nextInt();
int b = scan.nextInt();
int c = scan.nextInt();
if(a == b + c){
System.out.println("はい");
}
else if(b == a + c){
System.out.println("はい");
}
else if(c == a + b){
System.out.println("はい");
}
else{
System.out.print("いいえ");
}
} | Main.java:24: error: reached end of file while parsing
}
^
1 error
|
s142201298 | 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){
System.out.println("Yes");
}else{
System.out.println("No");
}
}
} | Main.java:8: error: incompatible types: int cannot be converted to boolean
if(a = b + c){
^
1 error
|
s988065865 | 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){
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:17: error: reached end of file while parsing
}
^
1 error
|
s586652100 | 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){
System.out.println("Yes");
}else if(b==a+c){
System.out.println("Yes");
}else if(c==a+b){
System.out.println("Yes");
}
}
}
} | Main.java:17: error: class, interface, enum, or record expected
}
^
1 error
|
s738753448 | 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){
System.out.println("Yes");
}else if(b==a+c){
System.out.println("Yes");
}else if(c==a+b){
System.out.println("Yes");
}
} | Main.java:15: error: reached end of file while parsing
}
^
1 error
|
s127930876 | 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)System.out.println("Yes");
if(b=a+c)System.out.println("Yes");
if(c=a+b)System.out.println("Yes");
}
} | Main.java:8: error: incompatible types: int cannot be converted to boolean
if(a=b+c)System.out.println("Yes");
^
Main.java:9: error: incompatible types: int cannot be converted to boolean
if(b=a+c)System.out.println("Yes");
^
Main.java:10: error: incompatible types: int cannot be converted to boolean
if(c=a+b)System.out.println("Yes");
^
3 errors
|
s089026458 | p03943 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(void){
vector<int> n(3);
cin >> a[0] >> a[1] >> a[2];
sort(a.begin(), a.end());
cout << ((a[0]+a[1]==a[2]) ? "Yes" : "No") << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:9: error: 'a' was not declared in this scope
6 | cin >> a[0] >> a[1] >> a[2];
| ^
|
s340268347 | p03943 | C++ | #include<iostream>
#include<string>
#include<algorithm>
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\n"; else cout << "No\n";
} | a.cc: In function 'int main()':
a.cc:7:36: error: lvalue required as left operand of assignment
7 | if (a = b + c || b = a + c || c = a + b)cout << "Yes\n"; else cout << "No\n";
| ~~~~~~^~~~
|
s542754012 | p03943 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int w,h,n;
cin>>w>>h>>n;
int x,y,a;
int b[100][100]={};
int minx=100,my=100;
while(1){
if(n==0)break;
cin>>x>>y>>a;
if(a==1)
if(minx>w-x)minx=w-x;
else if(a==2)
if(minx>x)minx=x;
else if(a==3)
if(miny>h-y)miny=h-y;
else if(a==4)
if(miny>y)miny=y;
n--;
}
cout<<minx*miny<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:17:7: error: 'miny' was not declared in this scope; did you mean 'minx'?
17 | if(miny>h-y)miny=h-y;
| ^~~~
| minx
a.cc:22:13: error: 'miny' was not declared in this scope; did you mean 'minx'?
22 | cout<<minx*miny<<endl;
| ^~~~
| minx
|
s217937689 | p03943 | C++ | #include <iostream>
using namespace std;
int main(void) {
int a, b, c;
int n[3];
cin >> n[0] >> n[1] >> n[2];
sort(n, n + 3);
if(n[0] + n[1] == n[2]) cout << "Yes" << endl;
else cout << "No" << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:12:5: error: 'sort' was not declared in this scope; did you mean 'short'?
12 | sort(n, n + 3);
| ^~~~
| short
|
s260819549 | p03943 | Java | package question;
import java.util.Scanner;
public class Test003 {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner sc = new Scanner(System.in);
String line = sc.nextLine();
String[] N = line.split(" ");
int first = Integer.parseInt(N[0]);
int second = Integer.parseInt(N[1]);
int third = Integer.parseInt(N[2]);
int a=first;
int b=second;
int c=third;
if((a+b==c)||(a+c==b)||(b+c==a)){
System.out.println("Yes");
}else
System.out.println("No");
}
}
| Main.java:5: error: class Test003 is public, should be declared in a file named Test003.java
public class Test003 {
^
1 error
|
s852747287 | p03943 | Java | package question;
import java.util.Scanner;
public class Test003 {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner sc = new Scanner(System.in);
String line = sc.nextLine();
String[] N = line.split(" ");
int first = Integer.parseInt(N[0]);
int second = Integer.parseInt(N[1]);
int third = Integer.parseInt(N[2]);
int a=first;
int b=second;
int c=third;
if((a+b==c)||(a+c==b)||(b+c==a)){
System.out.println("Yes");
}else
System.out.println("No");
}
}
| Main.java:5: error: class Test003 is public, should be declared in a file named Test003.java
public class Test003 {
^
1 error
|
s618024824 | p03943 | C++ | #include <iostream>
using namespace std;
int main(){
int a[3];
cin >> a[0] >> a[1] >> a[2];
sort(a, a + 3);
cout << (a[0] == a[1] + a[2] || a[0] + a[1] == a[2] ? "Yes" : "No") << endl;
} | a.cc: In function 'int main()':
a.cc:7:9: error: 'sort' was not declared in this scope; did you mean 'short'?
7 | sort(a, a + 3);
| ^~~~
| short
|
s662107734 | p03943 | C | #include <stdio.h>
#include <string.h>
#include <stdbool.h>
#define N_MAX 100
#define M_MAX 1000
#define INF 10000000
#define SMAP(a, b) ((a)!=(b))&&((a)^=((b)^=((a)^= (b))))
typedef unsigned long long ull;
int d[M_MAX];
int n, m;
int i, j, k;
int e[M_MAX][2];
void deb(){
return;
}
void solve(){
return;
}
int main (void) {
scanf("%d %d %d\n", &i, &j, &k);
if (a == b+c || b == c+a || c == a+b) {
puts("Yes");
} else {
puts("No");
}
solve();
return 0;
}
| main.c: In function 'main':
main.c:30:13: error: 'a' undeclared (first use in this function)
30 | if (a == b+c || b == c+a || c == a+b) {
| ^
main.c:30:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:30:18: error: 'b' undeclared (first use in this function)
30 | if (a == b+c || b == c+a || c == a+b) {
| ^
main.c:30:20: error: 'c' undeclared (first use in this function)
30 | if (a == b+c || b == c+a || c == a+b) {
| ^
|
s304420961 | p03943 | C++ | a,b,c = gets.split(" ").map{|s| s.to_i}.sort
if c = a + b then
puts "Yes"
else
puts "No"
end
| a.cc:1:1: error: 'a' does not name a type
1 | a,b,c = gets.split(" ").map{|s| s.to_i}.sort
| ^
a.cc:1:41: error: expected unqualified-id before '.' token
1 | a,b,c = gets.split(" ").map{|s| s.to_i}.sort
| ^
|
s013704342 | p03943 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(i=0; i<n; i++)
int main(){
cin>>a>>b>>c;
if(a+b==c || b+c==a || c+a==b){
cout<<"Yes";
}
else{
cout<<"No";
}
} | a.cc: In function 'int main()':
a.cc:6:8: error: 'a' was not declared in this scope
6 | cin>>a>>b>>c;
| ^
a.cc:6:11: error: 'b' was not declared in this scope
6 | cin>>a>>b>>c;
| ^
a.cc:6:14: error: 'c' was not declared in this scope
6 | cin>>a>>b>>c;
| ^
|
s557286524 | p03943 | C++ | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = 0, b = 0, c = 0, m = 0;
a = sc.nextInt();
b = sc.nextInt();
c = sc.nextInt();
m = Math.max(a, b);
m = Math.max(m, c);
if (m == a + b + c - m) {
System.out.println("Yes");
} else {
System.out.println("No");
}
}
}
| a.cc:1:1: error: 'import' does not name a type
1 | import java.util.Scanner;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class Main {
| ^~~~~~
|
s789246552 | p03943 | C | #include <studio.h>
int main (void) {
int a, b, c;
int sum;
scanf("%d %d %d", &a, &b, &c);
sum = (a + b + c) / 2;
if(sum == a || sum == b || sum == c) {
printf("YES");
} else {
printf("NO");
}
return 0;
} | main.c:1:10: fatal error: studio.h: No such file or directory
1 | #include <studio.h>
| ^~~~~~~~~~
compilation terminated.
|
s437153684 | p03943 | C++ | #include <stdio.h>
int main(){
int a,b,c;
printf("3つの数値を入力してください。\n");
scanf("d% %d %d", &a, &b, &c);
wihle((a<1 || a>100) || (b<1 || b>100) || (c<1 || c>100)){
printf("a,b,cは1以上100以下で入力してください\n");
scanf("d% %d %d", &a, &b, &c);
}
if(a==b+c || b==a+c || c==a+b){
printf("Yes");
}else{
printf("No");
}
}
| a.cc: In function 'int main()':
a.cc:8:9: error: 'wihle' was not declared in this scope
8 | wihle((a<1 || a>100) || (b<1 || b>100) || (c<1 || c>100)){
| ^~~~~
|
s691619622 | p03943 | C++ | #include <stdio.h>
int main(){
int a,b,c;
printf("3つの数値を入力してください。\n");
scanf("d% %d%d", &a, ,&b, &c);
wihle((a<1 || a>100) || (b<1 || b>100) || (c<1 || c>100)){
printf("a,b,cは1以上100以下で入力してください\n");
scanf("d% %d%d", &a, ,&b, &c);
}
if(a==b+c || b==a+c || c==a+b){
printf("Yes");
}else{
printf("No");
}
}
| a.cc: In function 'int main()':
a.cc:6:30: error: expected primary-expression before ',' token
6 | scanf("d% %d%d", &a, ,&b, &c);
| ^
a.cc:8:9: error: 'wihle' was not declared in this scope
8 | wihle((a<1 || a>100) || (b<1 || b>100) || (c<1 || c>100)){
| ^~~~~
|
s266450619 | p03943 | C++ | #include <stdoi.h>
int main(){
int a,b,c;
printf("3つの数値を入力してください。\n");
scanf("d% %d%d", &a, ,&b, &c);
wihle((a<1 || a>100) || (b<1 || b>100) || (c<1 || c>100)){
printf("a,b,cは1以上100以下で入力してください\n");
scanf("d% %d%d", &a, ,&b, &c);
}
if(a==b+c || b==a+c || c==a+b){
printf("Yes");
}else{
printf("No");
}
}
| a.cc:1:10: fatal error: stdoi.h: No such file or directory
1 | #include <stdoi.h>
| ^~~~~~~~~
compilation terminated.
|
s277472273 | p03943 | C | #include <stdoi.h>
int main(){
int a,b,c;
printf("3つの数値を入力してください。\n");
scanf("d% %d%d", &a, ,&b, &c);
wihle((a<1 || a>100) || (b<1 || b>100) || (c<1 || c>100)){
printf("a,b,cは1以上100以下で入力してください\n");
scanf("d% %d%d", &a, ,&b, &c);
}
if(a==b+c || b==a+c || c==a+b){
printf("Yes");
}else{
printf("No");
}
}
| main.c:1:10: fatal error: stdoi.h: No such file or directory
1 | #include <stdoi.h>
| ^~~~~~~~~
compilation terminated.
|
s166816054 | p03943 | C++ |
#include <iostream>
int main() {
int a, b, c;
cin >> a >> b >> c;
if (a + b == c || b + c == a || c + a == b){
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
return 0;
} | 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:2:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:7:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
7 | cout << "Yes" << endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:7:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
7 | cout << "Yes" << endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:9:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
9 | cout << "No" << endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:9:21: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
9 | cout << "No" << endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s452912819 | p03943 | C++ | S#include <string>
#include <queue>
#include <stack>
#include <vector>
#include <sstream>
#include <algorithm>
#include <deque>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <list>
#include <cstdio>
#include <iostream>
#include <cmath>
#include <climits>
#include <bitset>
#include <functional>
#include <numeric>
#include <ctime>
#include <cassert>
#include <cstring>
#include <fstream>
#define FOR(i, a, b) for(int (i)=(a); (i)<(b); (i)++)
#define IFOR(i, a, b) for(int (i)=(a);(i)<=(b);(i)++)
#define RFOR(i, a, b) for(int (i)=(a);(i)>=(b);(i)--)
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
int sumx = a + b + c;
if (2 * a == sumx || 2 * b == sumx || 2 * c == sumx) {
cout << "Yes" << endl;
}
else
cout << "No" << endl;
return 0;
} | a.cc:1:2: error: stray '#' in program
1 | S#include <string>
| ^
a.cc:1:1: error: 'S' does not name a type
1 | S#include <string>
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/deque:62,
from /usr/include/c++/14/queue:62,
from a.cc:2:
/usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cxx::__is_null_pointer' redeclared as different kind of entity
164 | __is_null_pointer(std::nullptr_t)
| ^
/usr/include/c++/14/ext/type_traits.h:159:5: note: previous declaration 'template<class _Type> constexpr bool __gnu_cxx::__is_null_pointer(_Type)'
159 | __is_null_pointer(_Type)
| ^~~~~~~~~~~~~~~~~
/usr/include/c++/14/ext/type_traits.h:164:26: error: 'nullptr_t' is not a member of 'std'
164 | __is_null_pointer(std::nullptr_t)
| ^~~~~~~~~
In file included from /usr/include/c++/14/bits/stl_pair.h:60,
from /usr/include/c++/14/bits/stl_algobase.h:64:
/usr/include/c++/14/type_traits:295:27: error: 'size_t' has not been declared
295 | template <typename _Tp, size_t = sizeof(_Tp)>
| ^~~~~~
/usr/include/c++/14/type_traits:666:33: error: 'nullptr_t' is not a member of 'std'
666 | struct is_null_pointer<std::nullptr_t>
| ^~~~~~~~~
/usr/include/c++/14/type_traits:666:42: error: template argument 1 is invalid
666 | struct is_null_pointer<std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:670:48: error: template argument 1 is invalid
670 | struct is_null_pointer<const std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:674:51: error: template argument 1 is invalid
674 | struct is_null_pointer<volatile std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:678:57: error: template argument 1 is invalid
678 | struct is_null_pointer<const volatile std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:984:26: error: 'size_t' has not been declared
984 | template<typename _Tp, size_t _Size>
| ^~~~~~
/usr/include/c++/14/type_traits:985:40: error: '_Size' was not declared in this scope
985 | struct __is_array_known_bounds<_Tp[_Size]>
| ^~~~~
/usr/include/c++/14/type_traits:985:46: error: template argument 1 is invalid
985 | struct __is_array_known_bounds<_Tp[_Size]>
| ^
/usr/include/c++/14/type_traits:1429:37: error: 'size_t' is not a member of 'std'
1429 | : public integral_constant<std::size_t, alignof(_Tp)>
| ^~~~~~
/usr/include/c++/14/type_traits:1429:57: error: template argument 1 is invalid
1429 | : public integral_constant<std::size_t, alignof(_Tp)>
| ^
/usr/include/c++/14/type_traits:1429:57: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1438:37: error: 'size_t' is not a member of 'std'
1438 | : public integral_constant<std::size_t, 0> { };
| ^~~~~~
/usr/include/c++/14/type_traits:1438:46: error: template argument 1 is invalid
1438 | : public integral_constant<std::size_t, 0> { };
| ^
/usr/include/c++/14/type_traits:1438:46: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1440:26: error: 'std::size_t' has not been declared
1440 | template<typename _Tp, std::size_t _Size>
| ^~~
/usr/include/c++/14/type_traits:1441:21: error: '_Size' was not declared in this scope
1441 | struct rank<_Tp[_Size]>
| ^~~~~
/usr/include/c++/14/type_traits:1441:27: error: template argument 1 is invalid
1441 | struct rank<_Tp[_Size]>
| ^
/usr/include/c++/14/type_traits:1442:37: error: 'size_t' is not a member of 'std'
1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^~~~~~
/usr/include/c++/14/type_traits:1442:65: error: template argument 1 is invalid
1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^
/usr/include/c++/14/type_traits:1442:65: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1446:37: error: 'size_t' is not a member of 'std'
1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^~~~~~
/usr/include/c++/14/type_traits:1446:65: error: template argument 1 is invalid
1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^
/usr/include/c++/14/type_traits:1446:65: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1451:32: error: 'size_t' was not declared in this scope
1451 | : public integral_constant<size_t, 0> { };
| ^~~~~~
/usr/include/c++/14/type_traits:64:1: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
63 | #include <bits/version.h>
+++ |+#include <cstddef>
64 |
/usr/include/c++/14/type_traits:1451:41: error: template argument 1 is invalid
1451 | : public integral_constant<size_t, 0> { };
| ^
/usr/include/c++/14/type_traits:1451:41: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1453:26: error: 'size_t' has not been declared
1453 | template<typename _Tp, size_t _Size>
| ^~~~~~
/usr/include/c++/14/type_traits:1454:23: error: '_Size' was not declared in this scope
1454 | struct extent<_Tp[_Size], 0>
| ^~~~~
/usr/include/c++/14/type_traits:1454:32: error: template argument 1 is invalid
1454 | struct extent<_Tp[_Size], 0>
| ^
/usr/include/c++/14/type_traits:1455:32: error: 'size_t' was not declared in this scope
1455 | : public integral_constant<size_t, _Size> { };
| ^~~~~~
/usr/include/c++/14/type_traits:1455:32: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
/usr/include/c++/14/type_traits:1455:40: error: '_Size' was not declared in this scope
1455 | : public integral_constant<size_t, _Size> { };
| ^~~~~
/usr/include/c++/14/type_traits:1455:45: error: template argument 1 is invalid
1455 | : public integral_constant<size_t, _Size> { };
| ^
/usr/include/c++/14/type_traits:1455:45: error: template argument 2 is invalid
/usr/include/c++/14/type_traits:1457:42: error: 'size_t' has not been declared
1457 | template<typename _Tp, unsigned _Uint, size_t _Size>
| ^~~~~~
/usr/include/c++/14/type_traits:1458:23: error: '_Size' was not declared in this scope
1458 | struct extent<_Tp[_Size], _Uint>
| ^~~~~
/usr/include/c++/14/type_traits:1458:36: error: template argument 1 is invalid
1458 | struct extent<_Tp[_Size], _Uint>
| ^
/usr/include/c++/14/type_traits:1463:32: error: 'size_t' was not declared in this scope
1463 | : public integral_constant<size_t, 0> { };
| ^~~~~~
/usr/include/c++/14/type_traits:1463:32: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
/usr/include/c++/14/type_traits:1463:41: error: template argument 1 is invalid
1463 | : public integral_constant<size_t, 0> { };
| ^
/usr/include/c++/14/type_traits:1463:41: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1857:26: error: 'size_t' does not name a type
1857 | { static constexpr size_t __size = sizeof(_Tp); };
| ^~~~~~
/usr/include/c++/14/type_traits:1857:26: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
/usr/include/c++/14/type_traits:1859:14: error: 'size_t' has not been declared
1859 | template<size_t _Sz, typename _Tp, bool = (_Sz <= _Tp::__size)>
| ^~~~~~
/usr/include/c++/14/type_traits:1859:48: error: '_Sz' was not declared in this scope
1859 | template<size_t _Sz, typename _Tp, bool = (_Sz <= _Tp::__size)>
| ^~~
/usr/include/c++/14/type_traits:1860:14: error: no default argument for '_Tp'
1860 | struct __select;
| ^~~~~~~~
/usr/include/c++/14/type_traits:1862:14: error: 'size_t' has not been declared
1862 | template<size_t _Sz, typename _Uint, typename... _UInts>
| ^~~~~~
/usr/include/c++/14/type_traits:1863:23: error: '_Sz' was not declared in this scope
1863 | struct __select<_Sz, _List<_Uint, _UInts...>, true>
| ^~~
/usr/include/c++/14/type_traits:1863:57: error: template argument 1 is invalid
1863 | struct __select<_Sz, _List<_Uint, _UInts...>, true>
| ^
/usr/include/c++/14/type_traits:1866:14: error: 'size_t' has not been declared
1866 | template<size_t _Sz, typename _Uint, typename... _UInts>
| ^~~~~~
/usr/include/c++/14/type_traits:1867:23: error: '_Sz' was not declared in this scope
1867 | struct __select<_Sz, _List<_Uint, _UInts...>, false>
| ^~~
/usr/include/c++/14/type_traits:1867:58 |
s974631433 | p03943 | Java | import java.util.Scanner;
/**
* Created by gumio_inf on 2016/12/02.
*/
public class A1 {
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 (1 <= a && a <= 100 && 1 <= b && b <= 100 && 1 <= c && c <= 100) {
int sum = a + b + c;
String flag = (a + b + c) % 3 == 0 ? "YES" : "NO";
System.out.println(flag);
}
}
}
| Main.java:6: error: class A1 is public, should be declared in a file named A1.java
public class A1 {
^
1 error
|
s838052132 | p03943 | C++ | #include <iosteram>
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" << endl;
else
cout << "No" << endl;
return 0;
} | a.cc:1:10: fatal error: iosteram: No such file or directory
1 | #include <iosteram>
| ^~~~~~~~~~
compilation terminated.
|
s657220997 | 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 || c+b==a){
printf("Yes");
else
{ printf("No");
}
}
return 0;
} | main.c: In function 'main':
main.c:10:1: error: expected '}' before 'else'
10 | else
| ^~~~
main.c: At top level:
main.c:15:1: error: expected identifier or '(' before 'return'
15 | return 0;
| ^~~~~~
main.c:16:1: error: expected identifier or '(' before '}' token
16 | }
| ^
|
s961233969 | p03943 | C++ | #include <iostream>
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";
}
return 0; | a.cc: In function 'int main()':
a.cc:13:10: error: expected '}' at end of input
13 | return 0;
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s433396865 | p03943 | C++ | #include <iostream>
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";
}
return 0; | a.cc: In function 'int main()':
a.cc:13:10: error: expected '}' at end of input
13 | return 0;
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s295486514 | p03943 | C | #include<stdio.h>
int main(){
int W,H,N;
scanf("%d",&W);
scanf("%d",&H);
scanf("%d",&N);
int x1=0,x2=W,y1=0,y2=H;
int x[N],y[N],a[N];
for(int i=0;i<N;i++){
scanf("%d",&x[i]);
scanf("%d",&y[i]);
scanf("%d",&a[i]);
if(a[i]==1){
if(x1<x[i])x1=x[i];
}
else if(a[i]==2){
if(x2>x[i])x2=x[i];
}
else if(a[i]==3){
if(y1<y[i])y1=y[i];
}
else if(a[i]==4){
if(y2<y[i])y2=y[i];
}
}
if(x1>x2+1)pritnf("0\n");
else{
printf("%d\n",(x2-x1+2)*(y2-y1+2));
}
return 0;
}
| main.c: In function 'main':
main.c:32:16: error: implicit declaration of function 'pritnf'; did you mean 'printf'? [-Wimplicit-function-declaration]
32 | if(x1>x2+1)pritnf("0\n");
| ^~~~~~
| printf
|
s050548311 | p03943 | C | #include<stdio.h>
int main(void)
{
int a,b,c;
if(a+b=c,a+c=b,b+c=a){
printf("Yes\n");
}else{
printf("No\n");
}
return 0;
} | main.c: In function 'main':
main.c:5:8: error: lvalue required as left operand of assignment
5 | if(a+b=c,a+c=b,b+c=a){
| ^
main.c:5:14: error: lvalue required as left operand of assignment
5 | if(a+b=c,a+c=b,b+c=a){
| ^
main.c:5:20: error: lvalue required as left operand of assignment
5 | if(a+b=c,a+c=b,b+c=a){
| ^
|
s094045069 | p03943 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
#include <string>
void InputToVector(std::vector<int> *pTarget)
{
if(pTarget == NULL) { return; }
int Input;
std::cin >> Input;
pTarget->push_back(Input);
}
int main()
{
std::vector List;
InputToVector(&List);
InputToVector(&List);
InputToVector(&List);
std::sort(List.begin(), List.end(), std::greater<int>());
std::string ResultStr = "No";
if(List[0] == (List[1] + List[2]))
{
ResultStr = "Yes";
}
std::cout << ResultStr << std::endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:21:17: error: class template argument deduction failed:
21 | std::vector List;
| ^~~~
a.cc:21:17: error: no matching function for call to 'vector()'
In file included from /usr/include/c++/14/vector:66,
from a.cc:2:
/usr/include/c++/14/bits/stl_vector.h:707:9: note: candidate: 'template<class _Tp, class _Alloc, class _InputIterator, class> vector(_InputIterator, _InputIterator, const _Alloc&)-> std::vector<_Tp, _Alloc>'
707 | vector(_InputIterator __first, _InputIterator __last,
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:707:9: note: candidate expects 2 arguments, 0 provided
/usr/include/c++/14/bits/stl_vector.h:678:7: note: candidate: 'template<class _Tp, class _Alloc> vector(std::initializer_list<_Tp>, const _Alloc&)-> std::vector<_Tp, _Alloc>'
678 | vector(initializer_list<value_type> __l,
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:678:7: note: candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/stl_vector.h:659:7: note: candidate: 'template<class _Tp, class _Alloc> vector(std::vector<_Tp, _Alloc>&&, std::__type_identity_t<_Alloc>&)-> std::vector<_Tp, _Alloc>'
659 | vector(vector&& __rv, const __type_identity_t<allocator_type>& __m)
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:659:7: note: candidate expects 2 arguments, 0 provided
/usr/include/c++/14/bits/stl_vector.h:640:7: note: candidate: 'template<class _Tp, class _Alloc> vector(std::vector<_Tp, _Alloc>&&, const _Alloc&, std::false_type)-> std::vector<_Tp, _Alloc>'
640 | vector(vector&& __rv, const allocator_type& __m, false_type)
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:640:7: note: candidate expects 3 arguments, 0 provided
/usr/include/c++/14/bits/stl_vector.h:635:7: note: candidate: 'template<class _Tp, class _Alloc> vector(std::vector<_Tp, _Alloc>&&, const _Alloc&, std::true_type)-> std::vector<_Tp, _Alloc>'
635 | vector(vector&& __rv, const allocator_type& __m, true_type) noexcept
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:635:7: note: candidate expects 3 arguments, 0 provided
/usr/include/c++/14/bits/stl_vector.h:624:7: note: candidate: 'template<class _Tp, class _Alloc> vector(const std::vector<_Tp, _Alloc>&, std::__type_identity_t<_Alloc>&)-> std::vector<_Tp, _Alloc>'
624 | vector(const vector& __x, const __type_identity_t<allocator_type>& __a)
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:624:7: note: candidate expects 2 arguments, 0 provided
/usr/include/c++/14/bits/stl_vector.h:620:7: note: candidate: 'template<class _Tp, class _Alloc> vector(std::vector<_Tp, _Alloc>&&)-> std::vector<_Tp, _Alloc>'
620 | vector(vector&&) noexcept = default;
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:620:7: note: candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/stl_vector.h:601:7: note: candidate: 'template<class _Tp, class _Alloc> vector(const std::vector<_Tp, _Alloc>&)-> std::vector<_Tp, _Alloc>'
601 | vector(const vector& __x)
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:601:7: note: candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/stl_vector.h:569:7: note: candidate: 'template<class _Tp, class _Alloc> vector(std::size_t, const _Tp&, const _Alloc&)-> std::vector<_Tp, _Alloc>'
569 | vector(size_type __n, const value_type& __value,
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:569:7: note: candidate expects 2 arguments, 0 provided
/usr/include/c++/14/bits/stl_vector.h:556:7: note: candidate: 'template<class _Tp, class _Alloc> vector(std::size_t, const _Alloc&)-> std::vector<_Tp, _Alloc>'
556 | vector(size_type __n, const allocator_type& __a = allocator_type())
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:556:7: note: candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/stl_vector.h:542:7: note: candidate: 'template<class _Tp, class _Alloc> vector(const _Alloc&)-> std::vector<_Tp, _Alloc>'
542 | vector(const allocator_type& __a) _GLIBCXX_NOEXCEPT
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:542:7: note: candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/stl_vector.h:531:7: note: candidate: 'template<class _Tp, class _Alloc> vector()-> std::vector<_Tp, _Alloc>'
531 | vector() = default;
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:531:7: note: template argument deduction/substitution failed:
a.cc:21:17: note: couldn't deduce template parameter '_Tp'
21 | std::vector List;
| ^~~~
/usr/include/c++/14/bits/stl_vector.h:428:11: note: candidate: 'template<class _Tp, class _Alloc> vector(std::vector<_Tp, _Alloc>)-> std::vector<_Tp, _Alloc>'
428 | class vector : protected _Vector_base<_Tp, _Alloc>
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:428:11: note: candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/stl_vector.h:2033:5: note: candidate: 'template<class _InputIterator, class _ValT, class _Allocator, class, class> std::vector(_InputIterator, _InputIterator, _Allocator)-> vector<_ValT, _Allocator>'
2033 | vector(_InputIterator, _InputIterator, _Allocator = _Allocator())
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:2033:5: note: candidate expects 2 arguments, 0 provided
|
s974025546 | p03943 | C++ | a = gets.split.map(&:to_i)
s = a.inject(&:+)
if a.any?{|x| s-x ==x }
puts 'Yes'
else
puts 'No'
end | a.cc:4:8: warning: multi-character character constant [-Wmultichar]
4 | puts 'Yes'
| ^~~~~
a.cc:6:8: warning: multi-character character constant [-Wmultichar]
6 | puts 'No'
| ^~~~
a.cc:1:1: error: 'a' does not name a type
1 | a = gets.split.map(&:to_i)
| ^
a.cc:4:3: error: 'puts' does not name a type
4 | puts 'Yes'
| ^~~~
|
s594317364 | p03943 | C++ | # include<stdio.h>
int main(){
int a,b,c;
cin >> a >> b >>c;
if(a == b+c || b == c+a || c == a+b) printf("Yes\n");
else printf("No\n");
return 0;
}
| a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope
6 | cin >> a >> b >>c;
| ^~~
|
s368475881 | p03943 | Java | import java.util.Scanner;
public class atcode {
public static void main (String[]args){
Scanner sc = new Scanner(System.in);
String line = sc.nextLine();
String[] num = line.split(" ");
int a = Integer.parseInt(num[0]);
int b = Integer.parseInt(num[1]);
int c = Integer.parseInt(num[2]);
if(a==b+c)System.out.println("Yes");
else if(b==a+c)System.out.println("Yes");
else if(c==a+c)System.out.println("Yes");
else System.out.println("No");
}
}
| Main.java:3: error: class atcode is public, should be declared in a file named atcode.java
public class atcode {
^
1 error
|
s394323937 | p03943 | Java | import java.util.Scanner;
public class atcode {
public static void main (String[]args){
Scanner sc = new Scanner(System.in);
String line = sc.nextLine();
String[] num = line.split(" ");
int a = Integer.parseInt(num[0]);
int b = Integer.parseInt(num[1]);
int c = Integer.parseInt(num[2]);
if(a==b+c)System.out.println("Yes");
else if(b==a+c)System.out.println("Yes");
else if(c==a+c)System.out.println("Yes");
else System.out.println("No");
}
}
| Main.java:3: error: class atcode is public, should be declared in a file named atcode.java
public class atcode {
^
1 error
|
s528576295 | p03943 | Java | import java.util.Scanner;
public class atcode {
public static void main (String[]args){
Scanner sc = new Scanner(System.in);
String line = sc.nextLine();
String[] num = line.split(" ");
int a = Integer.parseInt(num[0]);
int b = Integer.parseInt(num[1]);
int c = Integer.parseInt(num[2]);
if(a==b+c)System.out.println("Yes");
if(b==a+c)System.out.println("Yes");
if(c==a+c)System.out.println("Yes");
else System.out.println("No");
}
}
| Main.java:3: error: class atcode is public, should be declared in a file named atcode.java
public class atcode {
^
1 error
|
s042797449 | p03943 | C++ | #include "stdafx.h"
#include<iostream>
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" << endl;
}
else {
cout << "No" << endl;
}
return 0;
} | a.cc:1:10: fatal error: stdafx.h: No such file or directory
1 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s826979619 | p03943 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
int main(){
int a[3];
cin>>a[0]>>a[1]>>a[2];
sort(a,a+3);
cout<<(a[2]==a[1]+a[0]?("Yes","No"))<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:37: error: expected ':' before ')' token
8 | cout<<(a[2]==a[1]+a[0]?("Yes","No"))<<endl;
| ^
| :
a.cc:8:37: error: expected primary-expression before ')' token
|
s212797424 | p03943 | C | #define _USE_MATH_DEFINES
#include <algorithm>
#include <cstdio>
#include <functional>
#include <iostream>
#include <cfloat>
#include <climits>
#include <cstring>
#include <cmath>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <time.h>
#include <vector>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> i_i;
typedef pair<ll, int> ll_i;
typedef pair<double, int> d_i;
typedef pair<ll, ll> ll_ll;
typedef pair<double, double> d_d;
struct edge { int u, v; ll w; };
ll MOD = 1000000007;
ll _MOD = 1000000009;
double EPS = 1e-10;
int main() {
int a, b, c;
cin >> a >> b >> c;
if (a + b == c || b + c == a || a + c == b) printf("Yes");
else printf("No");
} | main.c:2:10: fatal error: algorithm: No such file or directory
2 | #include <algorithm>
| ^~~~~~~~~~~
compilation terminated.
|
s926098974 | p03943 | C | #include<stdio.h>
#include<stdlib.h>
#include<math.h>
int main()
{
int a,b,c;
scanf("%d %d %d",&a,%b,&c);
if (a+b==c || b+c==a || c+a==b){
printf("Yes");
} else {
printf("No");
}
return 0;
} | main.c: In function 'main':
main.c:9:29: error: expected expression before '%' token
9 | scanf("%d %d %d",&a,%b,&c);
| ^
|
s268210558 | p03943 | C++ | #include <cstdio>
using namespace std;
int main() {
int a, b, c;
char s[101];
scanf("%d %d %d", &a, &b, &c);
if (a + b == c || b + c == a || c + a == b)
s = "Yes";
else
s = "No";
printf("%s\n", s);
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:7: error: incompatible types in assignment of 'const char [4]' to 'char [101]'
9 | s = "Yes";
| ~~^~~~~~~
a.cc:11:7: error: incompatible types in assignment of 'const char [3]' to 'char [101]'
11 | s = "No";
| ~~^~~~~~
|
s044123392 | p03943 | C++ | #include "bits/stdc++.h"
using namespace std;
int main(){
long long a,b,c;
cin>>a>>b>>c;
if(a+b==c || a+c == b || b+c ==a)
cout << "Yes\n"
else
cout << "No\n"
} | a.cc: In function 'int main()':
a.cc:7:16: error: expected ';' before 'else'
7 | cout << "Yes\n"
| ^
| ;
8 | else
| ~~~~
|
s331020867 | p03943 | Java | import java.util.Scanner;
public class a_FightingOverCandies {
static Scanner scanner;
static int a, b, c;
public static void main(String[] args){
scanner = new Scanner(System.in);
a = scanner.nextInt();
b = scanner.nextInt();
c = scanner.nextInt();
candy_divide();
}
private static void candy_divide() {
if ( a + b == c || a + c == b || b + c == a){
System.out.println("Yes");
}
else
System.out.println("No");
}
}
| Main.java:3: error: class a_FightingOverCandies is public, should be declared in a file named a_FightingOverCandies.java
public class a_FightingOverCandies {
^
1 error
|
s686449539 | p03943 | Java | import test.jason.io.LRUCache;
import test.jason.io.Solution;
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) {
if (a > c ) {
output(a - b == c);
} else output(c-a == b);
} else if (b > c) {
output(b-c == a);
} else {
output(c -b ==a );
}
}
static private void output(boolean b) {
String r = b ? "Yes" : "No";
System.out.println(r);
}
}
| Main.java:1: error: package test.jason.io does not exist
import test.jason.io.LRUCache;
^
Main.java:2: error: package test.jason.io does not exist
import test.jason.io.Solution;
^
2 errors
|
s554705531 | p03943 | C++ | 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) {
if (a > c ) {
output(a - b == c);
} else output(c-a == b);
} else if (b > c) {
output(b-c == a);
} else {
output(c -b ==a );
}
}
static private void output(boolean b) {
String r = b ? "Yes" : "No";
System.out.println(r);
}
}
| a.cc:1:1: error: 'import' does not name a type
1 | import java.util.Scanner;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class Main {
| ^~~~~~
|
s444203510 | p03943 | C++ |
{
int a, b, c;
cin>>a>>b>>c;
if( a+b == c ) cout<<"Yes"<<endl;
else if( a+c == b ) cout<<"Yes"<<endl;
else if( b+c == a ) cout<<"Yes"<<endl;
else cout<<"No"<<endl;
return 0;
}
| a.cc:2:1: error: expected unqualified-id before '{' token
2 | {
| ^
|
s186538150 | 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( a+c == b ) cout>>"Yes">>endl;
else if( b+c == a ) cout>>"Yes">>endl;
else cout>>"No">>endl;
return 0;
}
{
int a, b, c;
cin>>a>>b>>c;
if( a+b == c ) cout>>"Yes">>endl;
else if( a+c == b ) cout>>"Yes">>endl;
else if( b+c == a ) cout>>"Yes">>endl;
else cout>>"No">>endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:24: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [4]')
9 | if( a+b == c ) cout>>"Yes">>endl;
| ~~~~^~~~~~~
| | |
| | const char [4]
| std::ostream {aka std::basic_ostream<char>}
In file included from /usr/include/c++/14/string:55,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:9:26: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | if( a+b == c ) cout>>"Yes">>endl;
| ^~~~~
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:9:20: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
9 | if( a+b == c ) cout>>"Yes">>endl;
| ^~~~
In file included from /usr/include/c++/14/istream:1109,
from /usr/include/c++/14/iostream:42:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:9:26: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | if( a+b == c ) cout>>"Yes">>endl;
| ^~~~~
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:9:26: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | if( a+b == c ) cout>>"Yes">>endl;
| ^~~~~
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:9:26: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | if( a+b == c ) cout>>"Yes">>endl;
| ^~~~~
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:9:26: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | if( a+b == c ) cout>>"Yes">>endl;
| ^~~~~
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:9:26: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | if( a+b == c ) cout>>"Yes">>endl;
| ^~~~~
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:9:26: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | if( a+b == c ) cout>>"Yes">>endl;
| ^~~~~
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = const char (&)[4]]':
a.cc:9:26: required from here
9 | if( a+b == c ) cout>>"Yes">>endl;
| ^~~~~
/usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
a.cc:10:29: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [4]')
10 | else if( a+c == b ) cout>>"Yes">>endl;
| ~~~~^~~~~~~
| | |
| | const char [4]
| std::ostream {aka std::basic_ostream<char>}
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:10:31: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
10 | else if( a+c == b ) cout>>"Yes">>endl;
| ^~~~~
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:10:25: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
10 | else if( a+c == b ) cout>>"Yes">>endl;
| ^~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:10:31: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
10 | else if( a+c == b ) cout>>"Yes">>endl;
| ^~~~~
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:10:31: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
10 | else if( a+c == b ) cout>>"Yes">>endl;
| ^~~~~
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:10:31: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
10 | else if( a+c == b ) cout>>"Yes">>endl;
| ^~~~~
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitutio |
s300755558 | p03943 | C++ | #include <cstdio>
using namespace std;
int main()
{
int a, b, c;
cin>>a>>b>>c;
if( a+b == c ) cout>>"Yes">>endl;
else if( a+c == b ) cout>>"Yes">>endl;
else if( b+c == a ) cout>>"Yes">>endl;
else cout>>"No">>endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope
8 | cin>>a>>b>>c;
| ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
1 | #include <cstdio>
+++ |+#include <iostream>
2 |
a.cc:9:20: error: 'cout' was not declared in this scope
9 | if( a+b == c ) cout>>"Yes">>endl;
| ^~~~
a.cc:9:20: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:33: error: 'endl' was not declared in this scope
9 | if( a+b == c ) cout>>"Yes">>endl;
| ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
1 | #include <cstdio>
+++ |+#include <ostream>
2 |
a.cc:10:25: error: 'cout' was not declared in this scope
10 | else if( a+c == b ) cout>>"Yes">>endl;
| ^~~~
a.cc:10:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:10:38: error: 'endl' was not declared in this scope
10 | else if( a+c == b ) cout>>"Yes">>endl;
| ^~~~
a.cc:10:38: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:11:25: error: 'cout' was not declared in this scope
11 | else if( b+c == a ) cout>>"Yes">>endl;
| ^~~~
a.cc:11:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:38: error: 'endl' was not declared in this scope
11 | else if( b+c == a ) cout>>"Yes">>endl;
| ^~~~
a.cc:11:38: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:12:10: error: 'cout' was not declared in this scope
12 | else cout>>"No">>endl;
| ^~~~
a.cc:12:10: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:22: error: 'endl' was not declared in this scope
12 | else cout>>"No">>endl;
| ^~~~
a.cc:12:22: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
|
s749511289 | p03943 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
//double pi=3.1415926535898;
//double pi=acos(-1.0);
#define scarr(a,s,e) for(int i=s;i<=int(e);i++) scanf("%d ",&a[i]);
#define prarr(a,s,e) for(int i=s;i<=int(e);i++) printf("%d ",a[i]);
#define speed ios::sync_with_stdio(false);cin.tie(NULL); cout.tie(NULL);
#define rng(i,a,b) for(int i=a;i>=int(b);i--)
#define rep(i,a,b) for(int i=a;i<=int(b);++i)
#define lop(i,n) for(int i=0;i<int(n);i++)
#define ms(x,a) memset(x,a,sizeof(x))
#define all(x) (x).begin(),(x).end()
#define sz(x) int(x.size())
#define pb push_back
#define mkp make_pair
#define sc(x) scanf("%d",&x)
#define scl(x) scanf("%lld",&x)
#define pr(x) printf("%d ",x)
#define prl(x) printf("%lld ",x)
#define prln(x) printf("%d\n",x)
#define prlln(x) printf("%lld\n",x)
#define r0 return 0;
#define CC continue;
#define scd(x) scanf("%lf",&x)
#define prd(x) printf("%.10f\n",x)
#define bb(x) cerr<< x <<endl;
#define pii pair<int,int>
#define pis pair<int,string>
#define vi vector<int>
#define x first
#define y second
//#define max(a,b) a<b?b:a
//#define min(a,b) a<b?a:b
const ll M = 1e9+7 ;
const ll linf = 1e18 ;
const int iinf = INT_MAX ;
const int N = 300300 ;
////////////////////// Hi ^_^ hack me if you can :P
int main()
{
int a,b,c;
cin>>a>>b>>c;
if(a==b+c||
b==a+c||
c==a+b){
cout<<"Yes
";
}
else
cout<<"No";
}
/*
ll pwmod(ll a, ll n, ll mod) {
ll ret = 1;
while (n) {
if (n & 1) ret = ret * a % mod;
a = a * a % mod;
n >>= 1;
}
return ret;
}
Wj0944296025*
*/
/*
freopen("output.txt","w",stdout);
freopen("input.txt","r",stdin);
for (int i=0;i<n;i++) Hi ^_^ hack me if you can :P
int mx[]= {0,0,1,-1, 1,1,-1,-1};
int my[]= {1,-1,0,0, 1,-1,1,-1};
bool inside (int i,int j) {return (i>=0 && i<n && j>=0 && j<m);}
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> pbds;
void gcd(LL n,LL m,LL &d,LL &xx,LL &yy){
if(!m) {d=n; xx=1; yy=0;}
else {gcd(m,n%m,d,yy,xx); yy-=xx*(n/m);}
}
int getm(int l,int r)
{
if(l>r)
return N;
if(l==r)
return 0;
if(l==r-1)
return s[l] != s[r];
if(s[l]==s[r])
return getm(l+1,r-1);
else
return 1+min(getm(l+1,r),getm(l,r-1));
}
int BIT[si], a[si], n;
void update(int x, int delta)
{
for(; x <= N; x += x&-x)
BIT[x] += delta;
}
int query(int x)
{
int sum = 0;
for(; x > 0; x -= x&-x)
sum += BIT[x];
return sum;
}
*/
| a.cc:48:11: warning: missing terminating " character
48 | cout<<"Yes
| ^
a.cc:48:11: error: missing terminating " character
48 | cout<<"Yes
| ^~~~
a.cc:49:1: warning: missing terminating " character
49 | ";
| ^
a.cc:49:1: error: missing terminating " character
49 | ";
| ^~
a.cc: In function 'int main()':
a.cc:50:4: error: expected primary-expression before '}' token
50 | }
| ^
|
s745929042 | p03943 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int w,h,n,a,b,c,count=0;
cin >> w >> h >> n;
int maps[h][w];
for(int i=0;i<h;i++){
for(int j=0;j<w;j++){
maps[i][j]=0;
}
}
for(int cas=0;cas<n;cas++){
cin >> a >> b >> c;
if(c == 1){
for(int i=0;i<a;i++){
for(int j=0;j<h;j++){
maps[j][i]=1;
}
}
} else if( c == 2){
for(int i=a;i<w;i++){
for(int j=0;j<h;j++){
maps[j][i]=1;
}
}
} else if( c == 3){
for(int i=0;i<b;i++){
for(int j=0;j<w;j++){
maps[i][j]=1;
}
}
} else if(c == 4){
for(int i=b;i<h;i++){
for(int j=0;j<w;j++){
maps[i][j]=1;
}
}
}
for(int i=0;i<h;i++){
for(int j=0;j<w;j++){
if( maps[i][j] == 0){
count++;
}
}
}
cout << count << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:52:2: error: expected '}' at end of input
52 | }
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s344529964 | p03943 | Java | class probA{
static public void main(String[] args)
{
int suji[] = new suji[3];
int i, sum = 0;
for (i = 0; i < 3; i++){
suji[i] = Integer.parseInt(args[i]);
sum += num[i];
}
for (i = 0; i < 3; i++){
if (sum - suji[i] == suji[i]){
System.out.println("Yes");
System.exit(0);
}
}
System.out.println("No");
System.exit(0);
}
} | Main.java:4: error: cannot find symbol
int suji[] = new suji[3];
^
symbol: class suji
location: class probA
Main.java:8: error: cannot find symbol
sum += num[i];
^
symbol: variable num
location: class probA
2 errors
|
s295555791 | p03943 | Java | class probA{
static public void main(String[] args)
{
int suji[] = new suji[3];
int i, sum = 0;
for (i = 0; i < 3; i++){
suji[i] = Integer.parseInt(args[i]);
sum += num[i];
}
for (i = 0; i < 3; i++){
if (sum - suji[i] == suji[i]){
System.out.println("Yes");
System.exit(0);
}
}
System.out.println("No");
System.exit(0);
} | Main.java:19: error: reached end of file while parsing
}
^
1 error
|
s993354245 | p03943 | Java | class probA{
static public void main(String[] args)
{
int suji[] = new int[3];
int i, sum = 0;
for (i = 0; i < 3; i++){
suji[i] = parseInt(args[i]);
sum += suji[i];
}
for (i = 0; i < 3; i++){
if (sum - suji[i] == suji[i]){
System.out.println("Yes");
System.exit(0);
}
}
System.out.println("No");
System.exit(0);
}
} | Main.java:7: error: cannot find symbol
suji[i] = parseInt(args[i]);
^
symbol: method parseInt(String)
location: class probA
1 error
|
s262985242 | p03943 | Java | class probA{
static public void main(String[] args)
{
int suji[] = new suji[3];
int i, sum = 0;
for (i = 0; i < 3; i++){
suji[i] = parseInt(args[i]);
sum += num[i];
}
for (i = 0; i < 3; i++){
if (sum - suji[i] == suji[i]){
System.out.println("Yes");
System.exit(0);
}
}
System.out.println("No");
System.exit(0);
}
}
| Main.java:4: error: cannot find symbol
int suji[] = new suji[3];
^
symbol: class suji
location: class probA
Main.java:7: error: cannot find symbol
suji[i] = parseInt(args[i]);
^
symbol: method parseInt(String)
location: class probA
Main.java:8: error: cannot find symbol
sum += num[i];
^
symbol: variable num
location: class probA
3 errors
|
s658285846 | p03943 | Java | class probA{
static public void main(String[] args)
{
int num[] = new num[3];
int i, sum = 0;
for (i = 0; i < 3; i++){
num[i] = parseInt(args[i]);
sum += num[i];
}
for (i = 0; i < 3; i++){
if (sum - num[i] == num[i]){
System.out.println("Yes");
System.exit(0);
}
}
System.out.println("No");
System.exit(0);
}
} | Main.java:4: error: cannot find symbol
int num[] = new num[3];
^
symbol: class num
location: class probA
Main.java:7: error: cannot find symbol
num[i] = parseInt(args[i]);
^
symbol: method parseInt(String)
location: class probA
2 errors
|
s999723677 | p03943 | Java | class probA{
static public void main(String[] args)
{
int num[] = new num[3];
int i, sum = 0;
for (i = 0; i < 3; i++){
int num[i] = parseInt(args[i]);
sum += num[i]
}
for (i = 0; i < 3; i++){
if (sum - num[i] == num[i]){
System.out.println("Yes");
System.exit(0);
}
}
System.out.println("No");
System.exit(0);
}
| Main.java:7: error: ']' expected
int num[i] = parseInt(args[i]);
^
Main.java:7: error: ';' expected
int num[i] = parseInt(args[i]);
^
Main.java:8: error: ';' expected
sum += num[i]
^
Main.java:19: error: reached end of file while parsing
}
^
4 errors
|
s009755303 | p03943 | Java | class probA{
static public void main(String[] args)
{
int num[3];
int i, sum = 0;
for (i = 0; i < 3; i++){
int num[i] = parseInt(args[i]);
sum += num[i]
}
for (i = 0; i < 3; i++){
if (sum - num[i] == num[i]){
System.out.println("Yes");
System.exit(0);
}
}
System.out.println("No");
System.exit(0);
}
| Main.java:4: error: ']' expected
int num[3];
^
Main.java:7: error: ']' expected
int num[i] = parseInt(args[i]);
^
Main.java:7: error: ';' expected
int num[i] = parseInt(args[i]);
^
Main.java:8: error: ';' expected
sum += num[i]
^
Main.java:19: error: reached end of file while parsing
}
^
5 errors
|
s268426971 | p03943 | C | #include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
if (argc == 3) {
int i;
int num[3];
for (i = 0; i < 3; i++) {
num[i] = atoi(argv[i]);
}
if (num[0]+num[1] == num[2] || num[1]+num[2] == num[0] || num[2]+num[0] == num[1])
printf("Yes\n");
else
printf("No\n");
} else
printf("No\n");
retrun 0;
} | main.c: In function 'main':
main.c:21:1: error: 'retrun' undeclared (first use in this function)
21 | retrun 0;
| ^~~~~~
main.c:21:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:21:7: error: expected ';' before numeric constant
21 | retrun 0;
| ^~
| ;
|
s120000670 | p03943 | C | #include <stdio.h>
#include <string.h>
int main(int argc, char *argv[])
{
if (argc == 3) {
int i;
int num[3];
for (i = 0; i < 3; i++) {
num[i] = atoi(argv[i]);
}
if (num[0]+num[1] == num[2] || num[1]+num[2] == num[0] || num[2]+num[0] == num[1])
printf("Yes\n");
else
printf("No\n");
} else
printf("No\n");
retrun 0;
} | main.c: In function 'main':
main.c:11:10: error: implicit declaration of function 'atoi' [-Wimplicit-function-declaration]
11 | num[i] = atoi(argv[i]);
| ^~~~
main.c:21:1: error: 'retrun' undeclared (first use in this function)
21 | retrun 0;
| ^~~~~~
main.c:21:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:21:7: error: expected ';' before numeric constant
21 | retrun 0;
| ^~
| ;
|
s461468848 | p03943 | C | #include <stdio.h>
#include <string.h>
int main(int *argc, char *argv[])
{
if (argc == 3) {
int i;
int num[3];
for (i = 0; i < 3; i++) {
num[i] = atoi(argv[i]);
}
if (num[0]+num[1] == num[2] || num[1]+num[2] == num[0] || num[2]+num[0] == num[1])
printf("Yes\n");
else
printf("No\n");
} else
printf("No\n");
retrun 0;
} | main.c: In function 'main':
main.c:6:10: warning: comparison between pointer and integer
6 | if (argc == 3) {
| ^~
main.c:11:10: error: implicit declaration of function 'atoi' [-Wimplicit-function-declaration]
11 | num[i] = atoi(argv[i]);
| ^~~~
main.c:21:1: error: 'retrun' undeclared (first use in this function)
21 | retrun 0;
| ^~~~~~
main.c:21:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:21:7: error: expected ';' before numeric constant
21 | retrun 0;
| ^~
| ;
|
s523467552 | p03943 | C | #include <stdio.h>
#include <string.h>
int main(int *argc, char *argv[])
{
if (argc == 3) {
int i;
int num[3];
for (i = 0; i < 3; i++) {
num[i] = atoi(argv[i]);
}
if (num[0]+num[1] == num[2] || num[1]+num[2] == num[0] || num[2]+num[0] == num[1])
printf("Yes\n");
else
printf("No\n");
} else
printf("No\n");
retrun0;} | main.c: In function 'main':
main.c:6:10: warning: comparison between pointer and integer
6 | if (argc == 3) {
| ^~
main.c:11:10: error: implicit declaration of function 'atoi' [-Wimplicit-function-declaration]
11 | num[i] = atoi(argv[i]);
| ^~~~
main.c:21:1: error: 'retrun0' undeclared (first use in this function)
21 | retrun0;}
| ^~~~~~~
main.c:21:1: note: each undeclared identifier is reported only once for each function it appears in
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.