submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s475187239
p03671
C++
#include <bits/stdc++.h> using namespace std; int main () { int a,b,c; cin >> a >> b >> c; cout << min(a+b,a+c,b+c) ; }
In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]': a.cc:8:14: required from here 8 | cout << min(a+b,a+c,b+c) ; | ~~~^~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function 284 | if (__comp(__b, __a)) | ~~~~~~^~~~~~~~~~
s462287703
p03671
C++
#include <bits/stdc++.h> using namespace std; itn main () { int a,b,c; cin >> a >> b >> c; cout << min(a+b,a+c,b+c) ; }
a.cc:4:1: error: 'itn' does not name a type; did you mean 'int'? 4 | itn main () { | ^~~ | int
s979271061
p03671
C++
print(sum(sorted(list(map(int,input().split())), reverse = True)[:2]))
a.cc:1:6: error: expected constructor, destructor, or type conversion before '(' token 1 | print(sum(sorted(list(map(int,input().split())), reverse = True)[:2])) | ^
s494987313
p03671
C++
#include <iostream> #include <vector> using namespace std; int a, b, c; vector<int> vec(3); int main() { for (int i=0;i<3;i++) cin >> vec[i]; sort(vec.begin(), vec.end()); cout << vec[0]+vec[1] << endl; }
a.cc: In function 'int main()': a.cc:8:5: error: 'sort' was not declared in this scope; did you mean 'short'? 8 | sort(vec.begin(), vec.end()); | ^~~~ | short
s974056726
p03671
C++
#include <iostream> #include <vector> #inclide <algorithm> int main() { int a; int b; int c; std::cin >> a >> b >> c; std::vector<int> bell{a, b, c}; std::sort(bell.begin(), bell.end()); std::cout << bell[0] + bell[1] << std::endl; return 0; }
a.cc:3:2: error: invalid preprocessing directive #inclide; did you mean #include? 3 | #inclide <algorithm> | ^~~~~~~ | include a.cc: In function 'int main()': a.cc:14:8: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 14 | std::sort(bell.begin(), bell.end()); | ^~~~ | qsort
s609442695
p03671
C++
#include <iostream> #include <vector> int main() { int a; int b; int c; std::cin >> a >> b >> c; std::vector<int> bell{a, b, c}; std::sort(bell.begin(), bell.end()); std::cout << bell[0] + bell[1] << std::endl; return 0; }
a.cc: In function 'int main()': a.cc:13:8: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 13 | std::sort(bell.begin(), bell.end()); | ^~~~ | qsort
s472510981
p03671
C++
#include <iostream> #include <vector> int main() { int a; int b; int c; std::cin >> a >> b >> c; std::vector<int> bell{a, b, c}; // 並べ替える std::sort(bell.begin(), bell.end()); std::cout << bell[0] + bell[1] << std::endl; return 0; }
a.cc: In function 'int main()': a.cc:14:8: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 14 | std::sort(bell.begin(), bell.end()); | ^~~~ | qsort
s300076903
p03671
C++
#include <bits/stdc++.h> #define FOR(i, n) for(int i = 0;i <n;i++) #define RFOR(i, n) for(int i = n;i >= 0;i--) #define REP(i, m, n) for(int i = m;i < n;i++) #define RREP(i, m, n) for(int i = m;i >= n;i--) #define INF 999999999 using namespace std; int main(int argc, char const *argv[]) { int n[3],a,b,c; cin>>a>>b>>c; cout<<min((a+b),(a+c),(b+c))<<endl; return 0; }
In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]': a.cc:13:12: required from here 13 | cout<<min((a+b),(a+c),(b+c))<<endl; | ~~~^~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function 284 | if (__comp(__b, __a)) | ~~~~~~^~~~~~~~~~
s627687652
p03671
C++
#include <bits/stdc++.h> #define FOR(i, n) for(int i = 0;i <n;i++) #define RFOR(i, n) for(int i = n;i >= 0;i--) #define REP(i, m, n) for(int i = m;i < n;i++) #define RREP(i, m, n) for(int i = m;i >= n;i--) #define INF 999999999 using namespace std; int main(int argc, char const *argv[]) { int n[3],a,b,c; cin>>a>>b>>c; n[0] = a+b; n[1] = a+c; n[2] = b+c; int m; m = min(n[0],n[1],n[2]) cout<<m<<endl; return 0; }
a.cc: In function 'int main(int, const char**)': a.cc:17:26: error: expected ';' before 'cout' 17 | m = min(n[0],n[1],n[2]) | ^ | ; 18 | cout<<m<<endl; | ~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]': a.cc:17:10: required from here 17 | m = min(n[0],n[1],n[2]) | ~~~^~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function 284 | if (__comp(__b, __a)) | ~~~~~~^~~~~~~~~~
s084411421
p03671
C++
#include <bits/stdc++.h> #define FOR(i, n) for(int i = 0;i <n;i++) #define RFOR(i, n) for(int i = n;i >= 0;i--) #define REP(i, m, n) for(int i = m;i < n;i++) #define RREP(i, m, n) for(int i = m;i >= n;i--) #define INF 999999999 using namespace std; int main(int argc, char const *argv[]) { int n[3],a,b,c; cin>>a>>b>>c; n[0] = a+b; n[1] = a+c; n[2] = b+c; int m; m = max{n[0],n[1],n[2]} cout<<m<<endl; return 0; }
a.cc: In function 'int main(int, const char**)': a.cc:17:7: error: cannot resolve overloaded function 'max' based on conversion to type 'int' 17 | m = max{n[0],n[1],n[2]} | ^~~
s991381612
p03671
C++
#include <bits/stdc++.h> #define FOR(i, n) for(int i = 0;i <n;i++) #define RFOR(i, n) for(int i = n;i >= 0;i--) #define REP(i, m, n) for(int i = m;i < n;i++) #define RREP(i, m, n) for(int i = m;i >= n;i--) #define INF 999999999 using namespace std; int main(int argc, char const *argv[]) { int n[3],a,b,c; cin>>a>>b>>c; n[0] = a+b; n[1] = a+c; n[2] = b+c; cout<<max{n[0],n[1],n[2]}<<endl; return 0; }
a.cc: In function 'int main(int, const char**)': a.cc:16:7: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '<unresolved overloaded function type>') 16 | cout<<max{n[0],n[1],n[2]}<<endl; | ~~~~^~~~~ In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127, from a.cc:1: /usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'} 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]' 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ^~~~~~~~ /usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 174 | operator<<(long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long int' 174 | operator<<(long __n) | ~~~~~^~~ /usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 178 | operator<<(unsigned long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long unsigned int' 178 | operator<<(unsigned long __n) | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 182 | operator<<(bool __n) | ^~~~~~~~ /usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool' 182 | operator<<(bool __n) | ~~~~~^~~ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]' 96 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int' 97 | operator<<(short __n) | ~~~~~~^~~ /usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 189 | operator<<(unsigned short __n) | ^~~~~~~~ /usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short unsigned int' 189 | operator<<(unsigned short __n) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]' 110 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int' 111 | operator<<(int __n) | ~~~~^~~ /usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 200 | operator<<(unsigned int __n) | ^~~~~~~~ /usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'unsigned int' 200 | operator<<(unsigned int __n) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 211 | operator<<(long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int' 211 | operator<<(long long __n) | ~~~~~~~~~~^~~ /usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 215 | operator<<(unsigned long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long unsigned int' 215 | operator<<(unsigned long long __n) | ~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 231 | operator<<(double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:231:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'double' 231 | operator<<(double __f) | ~~~~~~~^~~ /usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 235 | operator<<(float __f) | ^~~~~~~~ /usr/include/c++/14/ostream:235:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float' 235 | operator<<(float __f) | ~~~~~~^~~ /usr/include/c++/14/ostream:243:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 243 | operator<<(long double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:243:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long double' 243 | operator<<(long double __f) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:301:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 301 | operator<<(const void* __p) | ^~~~~~~~ /usr/include/c++/14/ostream:301:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const void*' 301 | operator<<(const void* __p) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:306:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::nullptr_t) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; std::null
s560211654
p03671
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a, b, c; cin >> a >> b >> c; cout << min(a+b, b+c, c+a) << endl; }
In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]': a.cc:7:14: required from here 7 | cout << min(a+b, b+c, c+a) << endl; | ~~~^~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function 284 | if (__comp(__b, __a)) | ~~~~~~^~~~~~~~~~
s689095657
p03671
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c;cin>>a>>b>>c;cout<<min([a+b,b+c,c+a]);}
a.cc: In function 'int main()': a.cc:4:38: error: expected ',' before '+' token 4 | int a,b,c;cin>>a>>b>>c;cout<<min([a+b,b+c,c+a]);} | ^ | , a.cc:4:38: error: expected identifier before '+' token a.cc:4:40: error: expected ']' before ',' token 4 | int a,b,c;cin>>a>>b>>c;cout<<min([a+b,b+c,c+a]);} | ^ | ] a.cc: In lambda function: a.cc:4:40: error: expected '{' before ',' token a.cc: In function 'int main()': a.cc:4:48: error: expected ')' before ']' token 4 | int a,b,c;cin>>a>>b>>c;cout<<min([a+b,b+c,c+a]);} | ~ ^ | )
s844610489
p03671
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c;cin>>a>>b>>c;cout<<max{(a+b,b+c,c+a)};}
a.cc: In function 'int main()': a.cc:4:30: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '<unresolved overloaded function type>') 4 | int a,b,c;cin>>a>>b>>c;cout<<max{(a+b,b+c,c+a)};} | ~~~~^~~~~ In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127, from a.cc:1: /usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'} 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]' 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ^~~~~~~~ /usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 174 | operator<<(long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long int' 174 | operator<<(long __n) | ~~~~~^~~ /usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 178 | operator<<(unsigned long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long unsigned int' 178 | operator<<(unsigned long __n) | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 182 | operator<<(bool __n) | ^~~~~~~~ /usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool' 182 | operator<<(bool __n) | ~~~~~^~~ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]' 96 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int' 97 | operator<<(short __n) | ~~~~~~^~~ /usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 189 | operator<<(unsigned short __n) | ^~~~~~~~ /usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short unsigned int' 189 | operator<<(unsigned short __n) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]' 110 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int' 111 | operator<<(int __n) | ~~~~^~~ /usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 200 | operator<<(unsigned int __n) | ^~~~~~~~ /usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'unsigned int' 200 | operator<<(unsigned int __n) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 211 | operator<<(long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int' 211 | operator<<(long long __n) | ~~~~~~~~~~^~~ /usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 215 | operator<<(unsigned long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long unsigned int' 215 | operator<<(unsigned long long __n) | ~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 231 | operator<<(double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:231:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'double' 231 | operator<<(double __f) | ~~~~~~~^~~ /usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 235 | operator<<(float __f) | ^~~~~~~~ /usr/include/c++/14/ostream:235:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float' 235 | operator<<(float __f) | ~~~~~~^~~ /usr/include/c++/14/ostream:243:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 243 | operator<<(long double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:243:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long double' 243 | operator<<(long double __f) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:301:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 301 | operator<<(const void* __p) | ^~~~~~~~ /usr/include/c++/14/ostream:301:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const void*' 301 | operator<<(const void* __p) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:306:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::nullptr_t) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_o
s680909544
p03671
C
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for(int i = 0; i < n; i++) #define repi(i, start, end) for(int i = start; i < end; i++) #define all(x) (x).begin(), (x).end() #define debug(x) cout << (x) << endl; #define INF (1e9) int dx[] = {0, 1, 0, -1}; int dy[] = {-1, 0, 1, 0}; typedef long long ll; int main(){ cin.tie(0); ios::sync_with_stdio(false); int a, b, c; cin >> a >> b >> c; cout << min(a + b, min(a + c, b + c)) << endl; }
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include <bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s976460777
p03671
Java
package main import "fmt" func main() { var a, b, c int fmt.Scan(&a, &b, &c) s := []int{a+b, b+c, c+a} min := s[0] for _, i := range s { if i < min { min = i } } fmt.Println(min) }
Main.java:1: error: ';' expected package main ^ Main.java:3: error: <identifier> expected import "fmt" ^ 2 errors
s454710016
p03671
C++
#include <iostream> #include <algorithm> #include <math.h> #include <string> using namespace std; int main(){ int A, B, C, D ,E ,F; string S,Sa,Sb,Sc; cin >> A >> B >> C; sort(A,B,C); cout << A + B << endl; return 0; }
In file included from /usr/include/c++/14/algorithm:61, from a.cc:2: /usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<int>]': /usr/include/c++/14/bits/stl_algo.h:1817:25: required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<int>]' 1817 | std::__insertion_sort(__first, __first + int(_S_threshold), __comp); | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1908:31: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<int>]' 1908 | std::__final_insertion_sort(__first, __last, __comp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:4805:18: required from 'void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = int; _Compare = int]' 4805 | std::__sort(__first, __last, __gnu_cxx::__ops::__iter_comp_iter(__comp)); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:10:7: required from here 10 | sort(A,B,C); | ~~~~^~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1780:17: error: no type named 'value_type' in 'struct std::iterator_traits<int>' 1780 | __val = _GLIBCXX_MOVE(*__i); | ^~~~~ In file included from /usr/include/c++/14/bits/exception_ptr.h:41, from /usr/include/c++/14/exception:166, from /usr/include/c++/14/ios:41, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stl_algo.h:1780:25: error: invalid type argument of unary '*' (have 'int') 1780 | __val = _GLIBCXX_MOVE(*__i); | ^~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1782:15: error: invalid type argument of unary '*' (have 'int') 1782 | *__first = _GLIBCXX_MOVE(__val); | ^~~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:71, from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44: /usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::__ops::_Iter_comp_iter<_Compare>::operator()(_Iterator1, _Iterator2) [with _Iterator1 = int; _Iterator2 = int; _Compare = int]': /usr/include/c++/14/bits/stl_algo.h:1777:14: required from 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<int>]' 1777 | if (__comp(__i, __first)) | ~~~~~~^~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1817:25: required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<int>]' 1817 | std::__insertion_sort(__first, __first + int(_S_threshold), __comp); | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1908:31: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<int>]' 1908 | std::__final_insertion_sort(__first, __last, __comp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:4805:18: required from 'void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = int; _Compare = int]' 4805 | std::__sort(__first, __last, __gnu_cxx::__ops::__iter_comp_iter(__comp)); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:10:7: required from here 10 | sort(A,B,C); | ~~~~^~~~~~~ /usr/include/c++/14/bits/predefined_ops.h:158:31: error: invalid type argument of unary '*' (have 'int') 158 | { return bool(_M_comp(*__it1, *__it2)); } | ^~~~~~ /usr/include/c++/14/bits/predefined_ops.h:158:39: error: invalid type argument of unary '*' (have 'int') 158 | { return bool(_M_comp(*__it1, *__it2)); } | ^~~~~~ /usr/include/c++/14/bits/predefined_ops.h:158:30: error: expression cannot be used as a function 158 | { return bool(_M_comp(*__it1, *__it2)); } | ~~~~~~~^~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/bits/stl_algo.h:61: /usr/include/c++/14/bits/stl_heap.h: In instantiation of 'void std::__make_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare&) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<int>]': /usr/include/c++/14/bits/stl_algo.h:1593:23: required from 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<int>]' 1593 | std::__make_heap(__first, __middle, __comp); | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1868:25: required from 'void std::__partial_sort(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<int>]' 1868 | std::__heap_select(__first, __middle, __last, __comp); | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1884:27: required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = int; _Size = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<int>]' 1884 | std::__partial_sort(__first, __last, __last, __comp); | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1905:25: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<int>]' 1905 | std::__introsort_loop(__first, __last, | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ 1906 | std::__lg(__last - __first) * 2, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1907 | __comp); | ~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:4805:18: required from 'void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = int; _Compare = int]' 4805 | std::__sort(__first, __last, __gnu_cxx::__ops::__iter_comp_iter(__comp)); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:10:7: required from here 10 | sort(A,B,C); | ~~~~^~~~~~~ /usr/include/c++/14/bits/stl_heap.h:344:11: error: no type named 'value_type' in 'struct std::iterator_traits<int>' 344 | _ValueType; | ^~~~~~~~~~ /usr/include/c++/14/bits/stl_heap.h:346:11: error: no type named 'difference_type' in 'struct std::iterator_traits<int>' 346 | _DistanceType; | ^~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_heap.h: In instantiation of 'void std::__pop_heap(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare&) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<int>]': /usr/include/c++/14/bits/stl_algo.h:1596:19: required from 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<int>]' 1596 | std::__pop_heap(__first, __middle, __i, __comp); | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1868:25: required from 'void std::__partial_sort(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<int>]' 1868 | std::__heap_select(__first, __middle, __last, __comp); | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1884:27: required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = int; _Size = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<int>]' 1884 | std::__partial_sort(__first, __last, __last, __comp); | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1905:25: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<int>]' 1905 | std::__introsort_loop(__first, __last, | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ 1906 | std::__lg(__last - __first) * 2, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1907 | __comp); | ~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:4805:18: required from 'void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = int; _Compare = int]' 4805 | std::__sort(__first, __last, __gnu_cxx::__ops::__iter_comp_iter(__comp)); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:10:7: required from here 10 | sort(A,B,C); | ~~~~^~~~~~~ /usr/include/c++/14/bits/stl_heap
s305231085
p03671
C++
#include <iostream> #include <string> #include <utility> #include <algorithm> #include <map> #include <vector> #include <cmath> #include <cstdlib> #include <queue> #include <stack> using namespace std; #define REP(i, n) for(int i = 0;i < n;i++) #define REPR(i, n) for(int i = n;i >= 0;i--) #define FOR(i, m, n) for(int i = m;i < n;i++) #define FORR(i, m, n) for(int i = n;i >= m;i--) #define REPO(i, n) for(int i = 1;i <= n;i++) #define ll long long #define INF 1999999999 #define MINF -1999999999 #define ALL(n) n.begin(),n.end() int main(){ int a, b, c; cin >> a >> b >> c; cout << min(a + b, min(a + c, b + c)) << endl;
a.cc: In function 'int main()': a.cc:27:55: error: expected '}' at end of input 27 | cout << min(a + b, min(a + c, b + c)) << endl; | ^ a.cc:24:11: note: to match this '{' 24 | int main(){ | ^
s802510354
p03671
Java
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int x = Math.max(a,b); int y = Math.max(x,c) int z = a+b+c; System.out.print(z-y); } }
Main.java:11: error: ';' expected int y = Math.max(x,c) ^ 1 error
s637496341
p03671
C++
#include <iostream> using namespace std; int main(){ int a, b, c; cin >> a >> b >> c; min_total = 100000 if(min_total >= a + b) min_total = a + b; if(min_total >= b + c) min_total = b + c; if(min_total >= c + a) min_total = c + a; cout << min_total << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:5: error: 'min_total' was not declared in this scope 7 | min_total = 100000 | ^~~~~~~~~
s256242449
p03671
C++
#include <iostream> #include <algorithm> #include <vector> #include <queue> #include <string> using namespace std; typedef long long ll; int main() { vector<int> a(3); cin >> a[0] >> a[1] >> a[2]; int res = *min_element(a.begin, a.end); a.erase(min_element(a.begin, a.end)); cout << res + (*min_element(a.begin,a.end)) << endl; }
a.cc: In function 'int main()': a.cc:14:31: error: no matching function for call to 'min_element(<unresolved overloaded function type>, <unresolved overloaded function type>)' 14 | int res = *min_element(a.begin, a.end); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:61, from a.cc:2: /usr/include/c++/14/bits/stl_algo.h:5577:12: note: candidate: 'template<class _FIter> constexpr _FIter std::min_element(_FIter, _FIter)' 5577 | inline min_element(_ForwardIterator __first, _ForwardIterator __last) | ^~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:5577:12: note: template argument deduction/substitution failed: a.cc:14:31: note: couldn't deduce template parameter '_FIter' 14 | int res = *min_element(a.begin, a.end); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:5602:5: note: candidate: 'template<class _FIter, class _Compare> constexpr _FIter std::min_element(_FIter, _FIter, _Compare)' 5602 | min_element(_ForwardIterator __first, _ForwardIterator __last, | ^~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:5602:5: note: candidate expects 3 arguments, 2 provided In file included from /usr/include/c++/14/algorithm:86: /usr/include/c++/14/pstl/glue_algorithm_defs.h:516:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Compare> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> std::min_element(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Compare)' 516 | min_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Compare __comp); | ^~~~~~~~~~~ /usr/include/c++/14/pstl/glue_algorithm_defs.h:516:1: note: candidate expects 4 arguments, 2 provided /usr/include/c++/14/pstl/glue_algorithm_defs.h:520:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> std::min_element(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator)' 520 | min_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last); | ^~~~~~~~~~~ /usr/include/c++/14/pstl/glue_algorithm_defs.h:520:1: note: candidate expects 3 arguments, 2 provided a.cc:15:28: error: no matching function for call to 'min_element(<unresolved overloaded function type>, <unresolved overloaded function type>)' 15 | a.erase(min_element(a.begin, a.end)); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:5577:12: note: candidate: 'template<class _FIter> constexpr _FIter std::min_element(_FIter, _FIter)' 5577 | inline min_element(_ForwardIterator __first, _ForwardIterator __last) | ^~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:5577:12: note: template argument deduction/substitution failed: a.cc:15:28: note: couldn't deduce template parameter '_FIter' 15 | a.erase(min_element(a.begin, a.end)); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:5602:5: note: candidate: 'template<class _FIter, class _Compare> constexpr _FIter std::min_element(_FIter, _FIter, _Compare)' 5602 | min_element(_ForwardIterator __first, _ForwardIterator __last, | ^~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:5602:5: note: candidate expects 3 arguments, 2 provided /usr/include/c++/14/pstl/glue_algorithm_defs.h:516:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Compare> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> std::min_element(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Compare)' 516 | min_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Compare __comp); | ^~~~~~~~~~~ /usr/include/c++/14/pstl/glue_algorithm_defs.h:516:1: note: candidate expects 4 arguments, 2 provided /usr/include/c++/14/pstl/glue_algorithm_defs.h:520:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> std::min_element(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator)' 520 | min_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last); | ^~~~~~~~~~~ /usr/include/c++/14/pstl/glue_algorithm_defs.h:520:1: note: candidate expects 3 arguments, 2 provided a.cc:16:36: error: no matching function for call to 'min_element(<unresolved overloaded function type>, <unresolved overloaded function type>)' 16 | cout << res + (*min_element(a.begin,a.end)) << endl; | ~~~~~~~~~~~^~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:5577:12: note: candidate: 'template<class _FIter> constexpr _FIter std::min_element(_FIter, _FIter)' 5577 | inline min_element(_ForwardIterator __first, _ForwardIterator __last) | ^~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:5577:12: note: template argument deduction/substitution failed: a.cc:16:36: note: couldn't deduce template parameter '_FIter' 16 | cout << res + (*min_element(a.begin,a.end)) << endl; | ~~~~~~~~~~~^~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:5602:5: note: candidate: 'template<class _FIter, class _Compare> constexpr _FIter std::min_element(_FIter, _FIter, _Compare)' 5602 | min_element(_ForwardIterator __first, _ForwardIterator __last, | ^~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:5602:5: note: candidate expects 3 arguments, 2 provided /usr/include/c++/14/pstl/glue_algorithm_defs.h:516:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Compare> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> std::min_element(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Compare)' 516 | min_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Compare __comp); | ^~~~~~~~~~~ /usr/include/c++/14/pstl/glue_algorithm_defs.h:516:1: note: candidate expects 4 arguments, 2 provided /usr/include/c++/14/pstl/glue_algorithm_defs.h:520:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> std::min_element(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator)' 520 | min_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last); | ^~~~~~~~~~~ /usr/include/c++/14/pstl/glue_algorithm_defs.h:520:1: note: candidate expects 3 arguments, 2 provided
s883002000
p03671
C++
#include<iostream> #include<string> #include<vector> #include<iomanip> #include<algorithm> #include<queue> #include<stack> #include<map> using namespace std; #define ll long long int main(){ int a,b,c; cin >> a >> b >> c; int min=a; if(max<b)max=b; if(max<c)max=c; cout << a+b+c-max; return 0; }
a.cc: In function 'int main()': a.cc:15:8: error: parse error in template argument list 15 | if(max<b)max=b; | ^~~~~ a.cc:15:13: error: cannot resolve overloaded function 'max' based on conversion to type 'bool' 15 | if(max<b)max=b; | ^ a.cc:15:18: error: overloaded function with no contextual type information 15 | if(max<b)max=b; | ^ a.cc:16:8: error: parse error in template argument list 16 | if(max<c)max=c; | ^~~~~ a.cc:16:13: error: cannot resolve overloaded function 'max' based on conversion to type 'bool' 16 | if(max<c)max=c; | ^ a.cc:16:18: error: overloaded function with no contextual type information 16 | if(max<c)max=c; | ^ a.cc:17:18: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator-' 17 | cout << a+b+c-max; | ~~~~~^~~~
s089866987
p03671
C++
#include<iostream> #include<string> #include<vector> #include<iomanip> #include<algorithm> #include<queue> #include<stack> #include<map> using namespace std; #define ll long long int main(){ int a,b,c; cin >> a >> b >> c; int min=a; if(max<b)min=b; if(max<c)min=c; cout << a+b+c-max; return 0; }
a.cc: In function 'int main()': a.cc:15:8: error: parse error in template argument list 15 | if(max<b)min=b; | ^~~~~ a.cc:15:13: error: cannot resolve overloaded function 'max' based on conversion to type 'bool' 15 | if(max<b)min=b; | ^ a.cc:16:8: error: parse error in template argument list 16 | if(max<c)min=c; | ^~~~~ a.cc:16:13: error: cannot resolve overloaded function 'max' based on conversion to type 'bool' 16 | if(max<c)min=c; | ^ a.cc:17:18: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator-' 17 | cout << a+b+c-max; | ~~~~~^~~~
s634167542
p03671
C++
#include <bits/stdc++.h> using namespace std; int main(){ vector<int> P(3); for(int i=0; i<3; i++){ cin>>P.at(i); } sort(P.begin(),P.end()); cout<<p.at(0)+P.at(1)<<endl; }
a.cc: In function 'int main()': a.cc:12:9: error: 'p' was not declared in this scope 12 | cout<<p.at(0)+P.at(1)<<endl; | ^
s596810656
p03671
C++
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Atcoder { class Atcoderrrrrrr { static void Main(string[] args) { int[] input = Console.ReadLine().Split(' ').Select(int.Parse).ToArray(); Console.WriteLine(input[0] + input[1] + input[2] - input.Max()); } } }
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.Generic; | ^~~~~~ a.cc:3:7: error: expected nested-name-specifier before 'System' 3 | using System.Linq; | ^~~~~~ a.cc:4:7: error: expected nested-name-specifier before 'System' 4 | using System.Text; | ^~~~~~ a.cc:5:7: error: expected nested-name-specifier before 'System' 5 | using System.Threading.Tasks; | ^~~~~~ a.cc:11:26: error: 'string' has not been declared 11 | static void Main(string[] args) | ^~~~~~ a.cc:11:35: error: expected ',' or '...' before 'args' 11 | static void Main(string[] args) | ^~~~ a.cc:17:6: error: expected ';' after class definition 17 | } | ^ | ; a.cc: In static member function 'static void Atcoder::Atcoderrrrrrr::Main(int*)': a.cc:13:16: error: structured binding declaration cannot have type 'int' 13 | int[] input = Console.ReadLine().Split(' ').Select(int.Parse).ToArray(); | ^~ a.cc:13:16: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto' a.cc:13:16: error: empty structured binding declaration a.cc:13:19: error: expected initializer before 'input' 13 | int[] input = Console.ReadLine().Split(' ').Select(int.Parse).ToArray(); | ^~~~~ a.cc:15:13: error: 'Console' was not declared in this scope 15 | Console.WriteLine(input[0] + input[1] + input[2] - input.Max()); | ^~~~~~~ a.cc:15:31: error: 'input' was not declared in this scope; did you mean 'int'? 15 | Console.WriteLine(input[0] + input[1] + input[2] - input.Max()); | ^~~~~ | int
s688671677
p03671
C++
a,b,c = gets.split.map &:to_i p [a,b,c].sort.first(2).inject(:+)
a.cc:1:1: error: 'a' does not name a type 1 | a,b,c = gets.split.map &:to_i | ^
s664218551
p03671
C++
#include<iostream> #include<algorithm> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; cout<<a+b+c-max()<<endl; return 0; }
a.cc: In function 'int main()': a.cc:10:24: error: no matching function for call to 'max()' 10 | cout<<a+b+c-max()<<endl; | ~~~^~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)' 257 | max(const _Tp& __a, const _Tp& __b) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate expects 2 arguments, 0 provided /usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)' 303 | max(const _Tp& __a, const _Tp& __b, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate expects 3 arguments, 0 provided In file included from /usr/include/c++/14/algorithm:61, from a.cc:2: /usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)' 5706 | max(initializer_list<_Tp> __l) | ^~~ /usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate expects 1 argument, 0 provided /usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)' 5716 | max(initializer_list<_Tp> __l, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate expects 2 arguments, 0 provided
s055281905
p03671
C++
#include<iostream> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; cout<<a+b+c-max({a,b,c})<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:24: error: no matching function for call to 'max(<brace-enclosed initializer list>)' 9 | cout<<a+b+c-max({a,b,c})<<endl; | ~~~^~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)' 257 | max(const _Tp& __a, const _Tp& __b) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate expects 2 arguments, 1 provided /usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)' 303 | max(const _Tp& __a, const _Tp& __b, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate expects 3 arguments, 1 provided
s346923024
p03671
C
#include<stdio.h> #include<stdlib.h> #include<string.h> //絶対値 long long int change_plus(long long int a) { if (a < 0) { return -a; } if (a >= 0) { return a; } } //大小比較(大) long long int big(long long int a, long long int b) { if (a >= b) { return a; } else { return b; } } //大小比較(小) long long int small(long long int a, long long int b) { if (a >= b) { return b; } else { return a; } } main() { long long int n, m, k = 0; char str[5]; scanf("%lld%lld%lld",&n,&m&k); printf("%lld",n+m+k-big(big(n,m),k)); }
main.c:29:1: error: return type defaults to 'int' [-Wimplicit-int] 29 | main() { | ^~~~ main.c: In function 'main': main.c:32:35: error: invalid operands to binary & (have 'long long int *' and 'long long int') 32 | scanf("%lld%lld%lld",&n,&m&k); | ~~^ | | | long long int *
s799266647
p03671
C
#include<stdio.h> int main(void){ int A, B, C; if (scanf_s("%d %d %d", &A, &B, &C) == 1); if (A >= 1 && B >= 1 && C >= 1 && A <= 10000 && B <= 10000 && C <= 10000){ if (A + B<A + C){ if (A + B<B + C) printf("%d", A + B); else printf("%d", B + C); } else{ if (A + C<B + C) printf("%d", A + C); else printf("%d", B + C); } } return 0; }
main.c: In function 'main': main.c:5:13: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 5 | if (scanf_s("%d %d %d", &A, &B, &C) == 1); | ^~~~~~~ | scanf
s175730751
p03671
C
#include<stdio.h> int main(void){ int A,B,C; if(scanf("%x %x %x",&A,&B,&C) == 1); if(A >=1 && B >=1 && C >=1 && A <= 10000 && B <= 10000 && C <= 10000){ if (A+B<A+C){ if (A+B<B+C) printf("%d",A+B); else printf("%d",B+C); } else{ if(A+C<B+C) printf("%d",A+C); else printf("%d",B+C); } return 0; }
main.c: In function 'main': main.c:20:1: error: expected declaration or statement at end of input 20 | } | ^
s101984803
p03671
C
#include<stdio.h> int main(void){ int A,B,C; if(scanf("%x %x %x",&A,&B,&C)) == 1); if(A >=1 && B >=1 && C >=1 && A <= 10000 && B <= 10000 && C <= 10000){ if (A+B<A+C){ if (A+B<B+C) printf("%d",A+B); else printf("%d",B+C); } else{ if(A+C<B+C) printf("%d",A+C); else printf("%d",B+C); } return 0; }
main.c: In function 'main': main.c:5:34: error: expected expression before '==' token 5 | if(scanf("%x %x %x",&A,&B,&C)) == 1); | ^~ main.c:5:38: error: expected statement before ')' token 5 | if(scanf("%x %x %x",&A,&B,&C)) == 1); | ^ main.c:20:1: error: expected declaration or statement at end of input 20 | } | ^
s368062451
p03671
C
#include<stdio.h> int main(){ int i, j, a[3]; for (i = 0; i < 3; i++){ scanf("%d", &a[i]); } for (i = 0; i < 3; i++){ for (j = i; j < 3; j++){ if(a[i] > a[j]){ c = a[i]; a[i] = a[j]; a[j] = c; } } } printf("%d\n", a[0] + a[1]); return 0; }
main.c: In function 'main': main.c:13:9: error: 'c' undeclared (first use in this function) 13 | c = a[i]; | ^ main.c:13:9: note: each undeclared identifier is reported only once for each function it appears in
s234528035
p03671
C
#include<stdio.h> int main(){ int i, a[3]; for (i = 0; i < 3; i++){ scanf("%d", &a[i]); } for (i = 0; i < 3; i++){ for (j = i; j < 3; j++){ if(a[i] > a[j]){ c = a[i]; a[i] = a[j]; a[j] = c; } } } printf("%d\n", a[0] + a[1]); return 0; }
main.c: In function 'main': main.c:11:10: error: 'j' undeclared (first use in this function) 11 | for (j = i; j < 3; j++){ | ^ main.c:11:10: note: each undeclared identifier is reported only once for each function it appears in main.c:13:9: error: 'c' undeclared (first use in this function) 13 | c = a[i]; | ^
s169317289
p03671
C++
#include<iostream> #include<cmath> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; int m=max(a,b); int ma=max(m,c); cout<<a+b+c-ma<<"n¥"; }
a.cc:1:20: warning: extra tokens at end of #include directive 1 | #include<iostream> #include<cmath> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; int m=max(a,b); int ma=max(m,c); cout<<a+b+c-ma<<"n¥"; } | ^ /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s765015288
p03671
C
#include <stdio.h> int main(){a+b; int a,b,c; scanf("%d%d%d",&a,&b,&c); int min; min=a+b; if(min>a+c) min=a+c; if(min>b+c) min=b+c; printf("%d",min); return 0; }
main.c: In function 'main': main.c:2:24: error: 'a' undeclared (first use in this function) 2 | int main(){a+b; | ^ main.c:2:24: note: each undeclared identifier is reported only once for each function it appears in main.c:2:26: error: 'b' undeclared (first use in this function) 2 | int main(){a+b; | ^
s194092061
p03671
C
#include <stdio.h> int main(){a+b; int a,b,c; scanf("%d%d%d",&a,&b,&c); int min; min=a+b; if(min>a+c) min=a+c; else if(min>b+c) min=b+c; else min=min; printf("%d",min); return 0; }
main.c: In function 'main': main.c:2:20: error: 'a' undeclared (first use in this function) 2 | int main(){a+b; | ^ main.c:2:20: note: each undeclared identifier is reported only once for each function it appears in main.c:2:22: error: 'b' undeclared (first use in this function) 2 | int main(){a+b; | ^
s184529726
p03671
C
#include <stdio.h> int main(){a+b; int a,b,c; scanf("%d%d%d",&a,&b,&c); int min; min=a+b; if(min>a+c) min=a+c; else if(min>b+c) min=b+c; printf("%d",min); return 0; }
main.c: In function 'main': main.c:2:16: error: 'a' undeclared (first use in this function) 2 | int main(){a+b; | ^ main.c:2:16: note: each undeclared identifier is reported only once for each function it appears in main.c:2:18: error: 'b' undeclared (first use in this function) 2 | int main(){a+b; | ^
s051939547
p03671
C
#include <stdio.h> int main(){ int a,b,c; scanf("%d%d%d",&a,&b,&c); int min; min= a+b; if(min>a+c) min=a+c printf("%d",min); else if(min>b+c) min=b+c printf("%d",min); else printf("%d",min); return 0; }
main.c: In function 'main': main.c:9:28: error: expected ';' before 'printf' 9 | if(min>a+c) min=a+c printf("%d",min); | ^~~~~~~ | ; main.c:11:28: error: expected ';' before 'printf' 11 | if(min>b+c) min=b+c printf("%d",min); | ^~~~~~~ | ;
s705123895
p03671
C
#include <stdio.h> int main(){ int a,b,c; scanf("%d%d%d",&a,&b,&c); int min; min= a+b; if(min>a+c) min=a+c; printf("%d",min); else if(min>b+c) min=b+c; printf("%d",min); else printf("%d",min); return 0; }
main.c: In function 'main': main.c:10:5: error: 'else' without a previous 'if' 10 | else | ^~~~ main.c:12:5: error: 'else' without a previous 'if' 12 | else | ^~~~
s025904588
p03671
C
#include <stdio.h> int main(){ int a,b,c; scanf("%d%d%d",&a,&b,&c); int min; min a+b; if(min>a+c) min=a+c; printf("%d",&min); else if(min>b+c) min=b+c; printf("%d",&min); else printf("%d",&min); return 0; }
main.c: In function 'main': main.c:7:4: error: expected ';' before 'a' 7 | min a+b; | ^~ | ; main.c:10:1: error: 'else' without a previous 'if' 10 | else | ^~~~ main.c:12:1: error: 'else' without a previous 'if' 12 | else | ^~~~
s372312271
p03671
C
#include <stdio.h> int main(){ int a,b,c; scanf("%d%d%d",&a,&b,&c); int min; min a+b; if(min>a+c) min=a+c; else if(min>b+c) min=b+c; printf("%d",&min); return 0; }
main.c: In function 'main': main.c:7:4: error: expected ';' before 'a' 7 | min a+b; | ^~ | ;
s995008805
p03671
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; if(a>=b && a>=c) cout << b+c << endl; else if(b>=c && b >=a) cout << a+C << endl; }
a.cc: In function 'int main()': a.cc:10:15: error: 'C' was not declared in this scope 10 | cout << a+C << endl; | ^
s661349037
p03671
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; int k=max(a,b,c); cout<<a+b+c-k<<endl; }
In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]': a.cc:7:12: required from here 7 | int k=max(a,b,c); | ~~~^~~~~~~ /usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function 306 | if (__comp(__a, __b)) | ~~~~~~^~~~~~~~~~
s089366996
p03671
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; cout<<a+b+c-max(a,b,c)<<endl; }
In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]': a.cc:7:18: required from here 7 | cout<<a+b+c-max(a,b,c)<<endl; | ~~~^~~~~~~ /usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function 306 | if (__comp(__a, __b)) | ~~~~~~^~~~~~~~~~
s313488208
p03671
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <cmath> #include <map> using namespace std; int main() { int a[3]; cin >> a[0] >> a[1] >> a[2]; sort(a[0], a[2]); cout << a[0] + a[1] << endl; return 0; }
In file included from /usr/include/c++/14/algorithm:61, from a.cc:4: /usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]': /usr/include/c++/14/bits/stl_algo.h:1817:25: required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1817 | std::__insertion_sort(__first, __first + int(_S_threshold), __comp); | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1908:31: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1908 | std::__final_insertion_sort(__first, __last, __comp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:4772:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = int]' 4772 | std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:14:6: required from here 14 | sort(a[0], a[2]); | ~~~~^~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1780:17: error: no type named 'value_type' in 'struct std::iterator_traits<int>' 1780 | __val = _GLIBCXX_MOVE(*__i); | ^~~~~ In file included from /usr/include/c++/14/bits/exception_ptr.h:41, from /usr/include/c++/14/exception:166, from /usr/include/c++/14/ios:41, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stl_algo.h:1780:25: error: invalid type argument of unary '*' (have 'int') 1780 | __val = _GLIBCXX_MOVE(*__i); | ^~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1782:15: error: invalid type argument of unary '*' (have 'int') 1782 | *__first = _GLIBCXX_MOVE(__val); | ^~~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:71, from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44: /usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::__ops::_Iter_less_iter::operator()(_Iterator1, _Iterator2) const [with _Iterator1 = int; _Iterator2 = int]': /usr/include/c++/14/bits/stl_algo.h:1777:14: required from 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1777 | if (__comp(__i, __first)) | ~~~~~~^~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1817:25: required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1817 | std::__insertion_sort(__first, __first + int(_S_threshold), __comp); | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1908:31: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1908 | std::__final_insertion_sort(__first, __last, __comp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:4772:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = int]' 4772 | std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:14:6: required from here 14 | sort(a[0], a[2]); | ~~~~^~~~~~~~~~~~ /usr/include/c++/14/bits/predefined_ops.h:45:16: error: invalid type argument of unary '*' (have 'int') 45 | { return *__it1 < *__it2; } | ^~~~~~ /usr/include/c++/14/bits/predefined_ops.h:45:25: error: invalid type argument of unary '*' (have 'int') 45 | { return *__it1 < *__it2; } | ^~~~~~ In file included from /usr/include/c++/14/bits/stl_algo.h:61: /usr/include/c++/14/bits/stl_heap.h: In instantiation of 'void std::__make_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare&) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]': /usr/include/c++/14/bits/stl_algo.h:1593:23: required from 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1593 | std::__make_heap(__first, __middle, __comp); | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1868:25: required from 'void std::__partial_sort(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1868 | std::__heap_select(__first, __middle, __last, __comp); | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1884:27: required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = int; _Size = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1884 | std::__partial_sort(__first, __last, __last, __comp); | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1905:25: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1905 | std::__introsort_loop(__first, __last, | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ 1906 | std::__lg(__last - __first) * 2, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1907 | __comp); | ~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:4772:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = int]' 4772 | std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:14:6: required from here 14 | sort(a[0], a[2]); | ~~~~^~~~~~~~~~~~ /usr/include/c++/14/bits/stl_heap.h:344:11: error: no type named 'value_type' in 'struct std::iterator_traits<int>' 344 | _ValueType; | ^~~~~~~~~~ /usr/include/c++/14/bits/stl_heap.h:346:11: error: no type named 'difference_type' in 'struct std::iterator_traits<int>' 346 | _DistanceType; | ^~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_heap.h: In instantiation of 'void std::__pop_heap(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare&) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]': /usr/include/c++/14/bits/stl_algo.h:1596:19: required from 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1596 | std::__pop_heap(__first, __middle, __i, __comp); | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1868:25: required from 'void std::__partial_sort(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1868 | std::__heap_select(__first, __middle, __last, __comp); | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1884:27: required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = int; _Size = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1884 | std::__partial_sort(__first, __last, __last, __comp); | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1905:25: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1905 | std::__introsort_loop(__first, __last, | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ 1906 | std::__lg(__last - __first) * 2, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1907 | __comp); | ~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:4772:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = int]' 4772 | std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:14:6: required from here 14 | sort(a[0], a[2]); | ~~~~^~~~~~~~~~~~ /usr/include/c++/14/bits/stl_heap.h:258:9: error: no type named 'value_type' in 'struct std::iterator_traits<int>' 258 | _ValueType; | ^~~~~~~~~~ /usr/include/c++/14/bits/stl_heap.h:260:9: error: no type named 'difference_type' in 'struct std::iterator_traits<int>' 260 | _DistanceType; | ^~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_heap.h:262:28: error: invalid type argument of unary '*' (have 'int') 262 | _Valu
s705505520
p03671
C
main(a,b,c){scanf("%d%d%d",&a,&b,&c);int max;a<b?b<c?max=c:max=b:a<c?max=c:max=a;printf("%d",a+b+c-max);}
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(a,b,c){scanf("%d%d%d",&a,&b,&c);int max;a<b?b<c?max=c:max=b:a<c?max=c:max=a;printf("%d",a+b+c-max);} | ^~~~ main.c: In function 'main': main.c:1:1: error: type of 'a' defaults to 'int' [-Wimplicit-int] main.c:1:1: error: type of 'b' defaults to 'int' [-Wimplicit-int] main.c:1:1: error: type of 'c' defaults to 'int' [-Wimplicit-int] main.c:1:13: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 1 | main(a,b,c){scanf("%d%d%d",&a,&b,&c);int max;a<b?b<c?max=c:max=b:a<c?max=c:max=a;printf("%d",a+b+c-max);} | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | main(a,b,c){scanf("%d%d%d",&a,&b,&c);int max;a<b?b<c?max=c:max=b:a<c?max=c:max=a;printf("%d",a+b+c-max);} main.c:1:13: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 1 | main(a,b,c){scanf("%d%d%d",&a,&b,&c);int max;a<b?b<c?max=c:max=b:a<c?max=c:max=a;printf("%d",a+b+c-max);} | ^~~~~ main.c:1:13: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:1:63: error: lvalue required as left operand of assignment 1 | main(a,b,c){scanf("%d%d%d",&a,&b,&c);int max;a<b?b<c?max=c:max=b:a<c?max=c:max=a;printf("%d",a+b+c-max);} | ^ main.c:1:82: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 1 | main(a,b,c){scanf("%d%d%d",&a,&b,&c);int max;a<b?b<c?max=c:max=b:a<c?max=c:max=a;printf("%d",a+b+c-max);} | ^~~~~~ main.c:1:82: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:1:82: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:1:82: note: include '<stdio.h>' or provide a declaration of 'printf'
s108518578
p03671
C++
#include<iostream> #include<algorithm> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; int x=a+b,y=b+c,z=c+a; cout<<min({min({x,y})},z})<<endl; }
a.cc: In function 'int main()': a.cc:8:25: error: expected ')' before '}' token 8 | cout<<min({min({x,y})},z})<<endl; | ~ ^ | ) a.cc: At global scope: a.cc:8:26: error: expected unqualified-id before ')' token 8 | cout<<min({min({x,y})},z})<<endl; | ^ a.cc:9:1: error: expected declaration before '}' token 9 | } | ^
s691352085
p03671
C++
#include<iostream> #include<algorithm> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; int x=a+b,y=b+c,z=c+a; cout<<min({min(x,y)},z)<<endl; }
In file included from /usr/include/c++/14/bits/stl_algobase.h:71, from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::__ops::_Iter_comp_iter<_Compare>::operator()(_Iterator1, _Iterator2) [with _Iterator1 = const int*; _Iterator2 = const int*; _Compare = int]': /usr/include/c++/14/bits/stl_algo.h:5562:12: required from 'constexpr _ForwardIterator std::__min_element(_ForwardIterator, _ForwardIterator, _Compare) [with _ForwardIterator = const int*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<int>]' 5562 | if (__comp(__first, __result)) | ~~~~~~^~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:5699:44: required from 'constexpr _Tp std::min(initializer_list<_Tp>, _Compare) [with _Tp = int; _Compare = int]' 5699 | return *_GLIBCXX_STD_A::__min_element(__l.begin(), __l.end(), | ^ a.cc:8:12: required from here 8 | cout<<min({min(x,y)},z)<<endl; | ~~~^~~~~~~~~~~~~~ /usr/include/c++/14/bits/predefined_ops.h:158:30: error: expression cannot be used as a function 158 | { return bool(_M_comp(*__it1, *__it2)); } | ~~~~~~~^~~~~~~~~~~~~~~~
s271293194
p03671
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c; cout<<(a+b+c)-max({a,b,c})<<N<<endl; return 0; }
a.cc: In function 'int main()': a.cc:5:37: error: 'N' was not declared in this scope 5 | cout<<(a+b+c)-max({a,b,c})<<N<<endl; | ^
s977195158
p03671
C++
#include "iostream" #include <algorithm> #include <stdlib.h> #include <string> #include <cctype> #include <stack> #include <vector> #include <list> #include <queue> using namespace std; using ll=long long; #define mod 1000000007 int main(int argc, char const *argv[]) { int a,b,c; std::cin >> a >> b >> c; std::cout << min(a+b,b+c,c+a) << '\n'; return 0; }
In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]': a.cc:18:19: required from here 18 | std::cout << min(a+b,b+c,c+a) << '\n'; | ~~~^~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function 284 | if (__comp(__b, __a)) | ~~~~~~^~~~~~~~~~
s484463752
p03671
C++
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int ans = Math.min(Math.min(a+b,b+c),a+c); System.out.println(ans); } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:11: error: expected ':' before 'static' 4 | public static void main(String[] args){ | ^~~~~~~ | : a.cc:4:29: error: 'String' has not been declared 4 | public static void main(String[] args){ | ^~~~~~ a.cc:4:38: error: expected ',' or '...' before 'args' 4 | public static void main(String[] args){ | ^~~~ a.cc:12:2: error: expected ';' after class definition 12 | } | ^ | ; a.cc: In static member function 'static void Main::main(int*)': a.cc:5:9: error: 'Scanner' was not declared in this scope 5 | Scanner sc = new Scanner(System.in); | ^~~~~~~ a.cc:6:17: error: 'sc' was not declared in this scope 6 | int a = sc.nextInt(); | ^~ a.cc:9:19: error: 'Math' was not declared in this scope 9 | int ans = Math.min(Math.min(a+b,b+c),a+c); | ^~~~ a.cc:10:9: error: 'System' was not declared in this scope 10 | System.out.println(ans); | ^~~~~~
s285639521
p03671
C++
#include<bits/stdc++.h> using namesapce std; int a,b,c; int main(){ cin>>a>>b>>c; cout<<(a+b+c)-max(a,max(b,c))<<endl; return 0; }
a.cc:2:7: error: expected nested-name-specifier before 'namesapce' 2 | using namesapce std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:5:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | cin>>a>>b>>c; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:6:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 6 | cout<<(a+b+c)-max(a,max(b,c))<<endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:6:25: error: 'max' was not declared in this scope; did you mean 'std::max'? 6 | cout<<(a+b+c)-max(a,max(b,c))<<endl; | ^~~ | std::max In file included from /usr/include/c++/14/algorithm:61, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51: /usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here 5716 | max(initializer_list<_Tp> __l, _Compare __comp) | ^~~ a.cc:6:19: error: 'max' was not declared in this scope; did you mean 'std::max'? 6 | cout<<(a+b+c)-max(a,max(b,c))<<endl; | ^~~ | std::max /usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here 5716 | max(initializer_list<_Tp> __l, _Compare __comp) | ^~~ a.cc:6:36: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 6 | cout<<(a+b+c)-max(a,max(b,c))<<endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s170818198
p03671
C++
#include<bits/stdc++.h>//头文件 using namesapce std; int a,b,c;//定义三种价格 int main(){ cin>>a>>b>>c;//输入价格 cout<<(a+b+c)-max(a,max(b,c))<<endl;//按照思(tao)路输出 return 0;//完美结束 }
a.cc:2:7: error: expected nested-name-specifier before 'namesapce' 2 | using namesapce std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:5:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | cin>>a>>b>>c;//输入价格 | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:6:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 6 | cout<<(a+b+c)-max(a,max(b,c))<<endl;//按照思(tao)路输出 | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:6:25: error: 'max' was not declared in this scope; did you mean 'std::max'? 6 | cout<<(a+b+c)-max(a,max(b,c))<<endl;//按照思(tao)路输出 | ^~~ | std::max In file included from /usr/include/c++/14/algorithm:61, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51: /usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here 5716 | max(initializer_list<_Tp> __l, _Compare __comp) | ^~~ a.cc:6:19: error: 'max' was not declared in this scope; did you mean 'std::max'? 6 | cout<<(a+b+c)-max(a,max(b,c))<<endl;//按照思(tao)路输出 | ^~~ | std::max /usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here 5716 | max(initializer_list<_Tp> __l, _Compare __comp) | ^~~ a.cc:6:36: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 6 | cout<<(a+b+c)-max(a,max(b,c))<<endl;//按照思(tao)路输出 | ^~~~ | std::endl In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s765409290
p03671
C++
#include<bits/stdc++.h> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; cout<<min(a+b,min(a+c,min(b+c))); return 0; }
a.cc: In function 'int main()': a.cc:7:30: error: no matching function for call to 'min(int)' 7 | cout<<min(a+b,min(a+c,min(b+c))); | ~~~^~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)' 233 | min(const _Tp& __a, const _Tp& __b) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate expects 2 arguments, 1 provided /usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)' 281 | min(const _Tp& __a, const _Tp& __b, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate expects 3 arguments, 1 provided In file included from /usr/include/c++/14/algorithm:61: /usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)' 5686 | min(initializer_list<_Tp> __l) | ^~~ /usr/include/c++/14/bits/stl_algo.h:5686:5: note: template argument deduction/substitution failed: a.cc:7:30: note: mismatched types 'std::initializer_list<_Tp>' and 'int' 7 | cout<<min(a+b,min(a+c,min(b+c))); | ~~~^~~~~ /usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)' 5696 | min(initializer_list<_Tp> __l, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate expects 2 arguments, 1 provided
s717956563
p03671
C++
#include <bits/stdc++.h> using namesapce std; int a, b, c; int main() { cin >> a >> b >> c; cout << max(a + b, max(b + c, a + c)) << endl; return 0; }
a.cc:2:7: error: expected nested-name-specifier before 'namesapce' 2 | using namesapce std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:5:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | cin >> a >> b >> c; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:6:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 6 | cout << max(a + b, max(b + c, a + c)) << endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:6:24: error: 'max' was not declared in this scope; did you mean 'std::max'? 6 | cout << max(a + b, max(b + c, a + c)) << endl; | ^~~ | std::max In file included from /usr/include/c++/14/algorithm:61, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51: /usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here 5716 | max(initializer_list<_Tp> __l, _Compare __comp) | ^~~ a.cc:6:13: error: 'max' was not declared in this scope; did you mean 'std::max'? 6 | cout << max(a + b, max(b + c, a + c)) << endl; | ^~~ | std::max /usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here 5716 | max(initializer_list<_Tp> __l, _Compare __comp) | ^~~ a.cc:6:46: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 6 | cout << max(a + b, max(b + c, a + c)) << endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s852474051
p03671
C++
#include<cstdio> using namespace std; int main() { int a[4]; scanf("%d%d%d",&a[1],&a[2],&a[3]); sort(a+1,a+4); if(a[3]>=a[2])printf("%d\n",a[1]+a[2]); else printf("%d\n",a[2]+a[3]); return 0; }
a.cc: In function 'int main()': a.cc:7:5: error: 'sort' was not declared in this scope; did you mean 'short'? 7 | sort(a+1,a+4); | ^~~~ | short
s286279942
p03671
C++
#include<bits/stdc++.h> using namesapce std; int main() { int a,b,c; cin>>a>>b>>c; cout<<min(a+b,min(a+c,b+c))<<'\n'; return 0; }
a.cc:2:7: error: expected nested-name-specifier before 'namesapce' 2 | using namesapce std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:6:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin>>a>>b>>c; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:7:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 7 | cout<<min(a+b,min(a+c,b+c))<<'\n'; | ^~~~ | 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:19: error: 'min' was not declared in this scope; did you mean 'std::min'? 7 | cout<<min(a+b,min(a+c,b+c))<<'\n'; | ^~~ | std::min In file included from /usr/include/c++/14/algorithm:61, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51: /usr/include/c++/14/bits/stl_algo.h:5696:5: note: 'std::min' declared here 5696 | min(initializer_list<_Tp> __l, _Compare __comp) | ^~~ a.cc:7:11: error: 'min' was not declared in this scope; did you mean 'std::min'? 7 | cout<<min(a+b,min(a+c,b+c))<<'\n'; | ^~~ | std::min /usr/include/c++/14/bits/stl_algo.h:5696:5: note: 'std::min' declared here 5696 | min(initializer_list<_Tp> __l, _Compare __comp) | ^~~
s727853975
p03671
C++
#include <bits/stdc++.h> using namespace std; int main() { int a[3]; cin >> a[0] >> a[1] >> a[2]; sort(a.begin(), a.end()); cout << a[0] + a[1] << end; }
a.cc: In function 'int main()': a.cc:8:10: error: request for member 'begin' in 'a', which is of non-class type 'int [3]' 8 | sort(a.begin(), a.end()); | ^~~~~ a.cc:8:21: error: request for member 'end' in 'a', which is of non-class type 'int [3]' 8 | sort(a.begin(), a.end()); | ^~~ a.cc:9:23: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 9 | cout << a[0] + a[1] << end; | ~~~~~~~~~~~~~~~~~~~~^~~~~~ In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127, from a.cc:1: /usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'} 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]' 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ^~~~~~~~ /usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 174 | operator<<(long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long int' 174 | operator<<(long __n) | ~~~~~^~~ /usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 178 | operator<<(unsigned long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long unsigned int' 178 | operator<<(unsigned long __n) | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 182 | operator<<(bool __n) | ^~~~~~~~ /usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool' 182 | operator<<(bool __n) | ~~~~~^~~ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]' 96 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int' 97 | operator<<(short __n) | ~~~~~~^~~ /usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 189 | operator<<(unsigned short __n) | ^~~~~~~~ /usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short unsigned int' 189 | operator<<(unsigned short __n) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]' 110 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int' 111 | operator<<(int __n) | ~~~~^~~ /usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 200 | operator<<(unsigned int __n) | ^~~~~~~~ /usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'unsigned int' 200 | operator<<(unsigned int __n) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 211 | operator<<(long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int' 211 | operator<<(long long __n) | ~~~~~~~~~~^~~ /usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 215 | operator<<(unsigned long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long unsigned int' 215 | operator<<(unsigned long long __n) | ~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 231 | operator<<(double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:231:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'double' 231 | operator<<(double __f) | ~~~~~~~^~~ /usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 235 | operator<<(float __f) | ^~~~~~~~ /usr/include/c++/14/ostream:235:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float' 235 | operator<<(float __f) | ~~~~~~^~~ /usr/include/c++/14/ostream:243:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 243 | operator<<(long double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:243:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long double' 243 | operator<<(long double __f) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:301:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 301 | operator<<(const void* __p) | ^~~~~~~~ /usr/include/c++/14/ostream:301:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const void*' 301 | operator<<(const void* __p) | ~~~~~~~~~~~~^~
s668422764
p03671
C++
#include<bits/stdc++.h> using namesapce std; int a,b,c; int main(){ cin>>a>>b>>c; cout<<(a+b+c)-max(a,max(b,c))<<endl; return 0; }
a.cc:2:7: error: expected nested-name-specifier before 'namesapce' 2 | using namesapce std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:5:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | cin>>a>>b>>c; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:6:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 6 | cout<<(a+b+c)-max(a,max(b,c))<<endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:6:25: error: 'max' was not declared in this scope; did you mean 'std::max'? 6 | cout<<(a+b+c)-max(a,max(b,c))<<endl; | ^~~ | std::max In file included from /usr/include/c++/14/algorithm:61, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51: /usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here 5716 | max(initializer_list<_Tp> __l, _Compare __comp) | ^~~ a.cc:6:19: error: 'max' was not declared in this scope; did you mean 'std::max'? 6 | cout<<(a+b+c)-max(a,max(b,c))<<endl; | ^~~ | std::max /usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here 5716 | max(initializer_list<_Tp> __l, _Compare __comp) | ^~~ a.cc:6:36: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 6 | cout<<(a+b+c)-max(a,max(b,c))<<endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s680819163
p03671
C++
#include<bits/stdc++.h> using namespace std; int main() {int a[10]; for(int i=1;i<=3;i++) cin>>a[i]; sort(a,a+3); cin<<a[1]+a[2]<<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:4: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 8 | cin<<a[1]+a[2]<<endl; | ~~~^~~~~~~~~~~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:8:4: note: candidate: 'operator<<(int, int)' (built-in) 8 | cin<<a[1]+a[2]<<endl; | ~~~^~~~~~~~~~~ a.cc:8:4: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'int' In file included from /usr/include/c++/14/regex:68, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181, from a.cc:1: /usr/include/c++/14/bits/regex.h:1715:5: note: candidate: 'template<class _Ch_type, class _Ch_traits, class _Bi_iter> std::basic_ostream<_CharT, _Traits>& std::__cxx11::operator<<(std::basic_ostream<_CharT, _Traits>&, const sub_match<_Bi_iter>&)' 1715 | operator<<(basic_ostream<_Ch_type, _Ch_traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1715:5: note: template argument deduction/substitution failed: a.cc:8:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 8 | cin<<a[1]+a[2]<<endl; | ^ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41: /usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)' 125 | operator<<(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed: a.cc:8:1: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte' 8 | cin<<a[1]+a[2]<<endl; | ^~~ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)' 763 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed: a.cc:8:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 8 | cin<<a[1]+a[2]<<endl; | ^ /usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 4077 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed: a.cc:8:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 8 | cin<<a[1]+a[2]<<endl; | ^ /usr/include/c++/14/bitset:1687:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const bitset<_Nb>&)' 1687 | operator<<(std::basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bitset:1687:5: note: template argument deduction/substitution failed: a.cc:8:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 8 | cin<<a[1]+a[2]<<endl; | ^ In file included from /usr/include/c++/14/bits/ios_base.h:46, from /usr/include/c++/14/streambuf:43, from /usr/include/c++/14/bits/streambuf_iterator.h:35, from /usr/include/c++/14/iterator:66, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54: /usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)' 339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e) | ^~~~~~~~ /usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed: a.cc:8:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 8 | cin<<a[1]+a[2]<<endl; | ^ In file included from /usr/include/c++/14/memory:80, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:56: /usr/include/c++/14/bits/shared_ptr.h:70:5: note: candidate: 'template<class _Ch, class _Tr, class _Tp, __gnu_cxx::_Lock_policy _Lp> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __shared_ptr<_Tp, _Lp>&)' 70 | operator<<(std::basic_ostream<_Ch, _Tr>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/shared_ptr.h:70:5: note: template argument deduction/substitution failed: a.cc:8:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 8 | cin<<a[1]+a[2]<<endl; | ^ In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)' 563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) | ^~~~~~~~ /usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed: a.cc:8:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 8 | cin<<a[1]+a[2]<<endl; | ^ /usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)' 573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed: a.cc:8:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 8 | cin<<a[1]+a[2]<<endl; | ^ /usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)' 579 | operator<<(basic_ostream<char, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed: a.cc:8:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 8 | cin<<a[1]+a[2]<<endl; | ^ /usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)' 590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed: a.cc:8:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 8 | cin<<a[1]+a[2]<<endl; | ^ /usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)' 595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed: a.cc:8:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 8 | cin<<a[1]+a[2]<<endl; | ^ /usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)' 654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed: a.cc:8:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 8 | cin<<a[1]+a[2]<<endl; | ^ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)' 307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed: a.cc:8:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 8 | cin<<a[1]+a[2]<<endl; | ^ /usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)' 671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:671:5: note: template argument deduction/substitution failed: a.cc:8:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 8 | c
s745329222
p03671
C++
#include<bits/stdc++.h> using namesapce std; int a,b,c int main(){ cin>>a>>b>>c; cout<<(a+b+c)-max(a,max(b,c))<<endl; return 0; }
a.cc:2:7: error: expected nested-name-specifier before 'namesapce' 2 | using namesapce std; | ^~~~~~~~~ a.cc:4:1: error: expected initializer before 'int' 4 | int main(){ | ^~~
s763493674
p03671
C++
#include<bits/stdc++.h> using namesapce std; int a,b,c; int main(){ cin>>a>>b>>c; cout<<(a+b+c)-max(a,max(b,c))<<endl; return 0; }
a.cc:2:7: error: expected nested-name-specifier before 'namesapce' 2 | using namesapce std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:5:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | cin>>a>>b>>c; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:6:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 6 | cout<<(a+b+c)-max(a,max(b,c))<<endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:6:25: error: 'max' was not declared in this scope; did you mean 'std::max'? 6 | cout<<(a+b+c)-max(a,max(b,c))<<endl; | ^~~ | std::max In file included from /usr/include/c++/14/algorithm:61, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51: /usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here 5716 | max(initializer_list<_Tp> __l, _Compare __comp) | ^~~ a.cc:6:19: error: 'max' was not declared in this scope; did you mean 'std::max'? 6 | cout<<(a+b+c)-max(a,max(b,c))<<endl; | ^~~ | std::max /usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here 5716 | max(initializer_list<_Tp> __l, _Compare __comp) | ^~~ a.cc:6:36: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 6 | cout<<(a+b+c)-max(a,max(b,c))<<endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s622305342
p03671
C++
#include <cstdio> #include <cmath> #include <iostream> #include <cstdlib> #include <string> #include <iomanip> #include <ctime> #include <set> #include <sstream> #include <map> #include <cstring> #include <algorithm> using namespace std; typedef long long ll; int i,a[5]; int main(){ // freopen(".in","r",stdin); // freopen(".out","w",stdout); cin>>a[1]>>a[2]>>a[3]; sort(a+1,a+1+n); printf("%d\n",a[1]+a[2]); return 0; }
a.cc: In function 'int main()': a.cc:20:22: error: 'n' was not declared in this scope; did you mean 'yn'? 20 | sort(a+1,a+1+n); | ^ | yn
s621135207
p03671
C++
#include<bits/stdc++.h> using namespace std; int main() { int a,b,c,nga,ga,ans; cin>>a>>b>>c; nga=(a>b)? a:b; ga=(nga>c)? nga:c; ans=a+b+c-ga<<endl; cout<<ans; return 0; }
a.cc: In function 'int main()': a.cc:9:21: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<' 9 | ans=a+b+c-ga<<endl; | ~~~~~~~~^~~~~~
s565038254
p03671
C++
#include <iostream> #include <algorithm> using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; cout << min(a+b,min(a+c,min(b+c))) << endl; }
a.cc: In function 'int main()': a.cc:9:30: error: no matching function for call to 'min(int)' 9 | cout << min(a+b,min(a+c,min(b+c))) << endl; | ~~~^~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)' 233 | min(const _Tp& __a, const _Tp& __b) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate expects 2 arguments, 1 provided /usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)' 281 | min(const _Tp& __a, const _Tp& __b, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate expects 3 arguments, 1 provided In file included from /usr/include/c++/14/algorithm:61, from a.cc:2: /usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)' 5686 | min(initializer_list<_Tp> __l) | ^~~ /usr/include/c++/14/bits/stl_algo.h:5686:5: note: template argument deduction/substitution failed: a.cc:9:30: note: mismatched types 'std::initializer_list<_Tp>' and 'int' 9 | cout << min(a+b,min(a+c,min(b+c))) << endl; | ~~~^~~~~ /usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)' 5696 | min(initializer_list<_Tp> __l, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate expects 2 arguments, 1 provided
s658516703
p03671
C++
#include <iostream> using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; cout << min(a+b,min(a+c,min(b+c))) << endl; }
a.cc: In function 'int main()': a.cc:8:30: error: no matching function for call to 'min(int)' 8 | cout << min(a+b,min(a+c,min(b+c))) << endl; | ~~~^~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)' 233 | min(const _Tp& __a, const _Tp& __b) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate expects 2 arguments, 1 provided /usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)' 281 | min(const _Tp& __a, const _Tp& __b, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate expects 3 arguments, 1 provided
s205471421
p03671
C++
#include<bits/stdc++.h> using namespace std; int main() { int a[4]; for(int i=1;i<=3;i++) cin>>a[i]; sort(a+1,a+4); cout<<a+b<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:13: error: 'b' was not declared in this scope 9 | cout<<a+b<<endl; | ^
s704724255
p03671
C++
#include <bits/stdc++.h> using namespace std; int a,b,c; int d[3]; int main(){ cin>>a>>b>>c; d[3]={a+b,b+c,c+a}; sort(d,d+3); cout<<d[0]<<endl; }
a.cc: In function 'int main()': a.cc:8:20: error: cannot convert '<brace-enclosed initializer list>' to 'int' in assignment 8 | d[3]={a+b,b+c,c+a}; | ^
s775580103
p03671
C++
#include <bits/stdc++.h> using namespace std; int a,b,c,d[10]; int main(){ cin>>a>>b>>c; d[10]={a+b,b+c,c+a}; sort(d,d+3); cout<<d[0]<<endl; }
a.cc: In function 'int main()': a.cc:7:21: error: cannot convert '<brace-enclosed initializer list>' to 'int' in assignment 7 | d[10]={a+b,b+c,c+a}; | ^
s639553318
p03671
C++
#include <bits/stdc++.h> using namespace std; int a,b,c,d[3]; int main(){ cin>>a>>b>>c; d[3]={a+b,b+c,c+a}; sort(d,d+3); cout<<d[0]<<endl; }
a.cc: In function 'int main()': a.cc:7:20: error: cannot convert '<brace-enclosed initializer list>' to 'int' in assignment 7 | d[3]={a+b,b+c,c+a}; | ^
s065097930
p03671
C++
#include <bits/stdc++.h> using namespace std; int a[3],b,c; int main(){ cin>>a>>b>>c; a[3]={a+b,b+c,c+a}; sort(a,a+3); cout<<a[0]<<endl; }
a.cc: In function 'int main()': a.cc:6:6: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int [3]') 6 | cin>>a>>b>>c; | ~~~^~~ | | | | | int [3] | std::istream {aka std::basic_istream<char>} In file included from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127, from a.cc:1: /usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 170 | operator>>(bool& __n) | ^~~~~~~~ /usr/include/c++/14/istream:170:7: note: conversion of argument 1 would be ill-formed: a.cc:6:8: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type 'int*' 6 | cin>>a>>b>>c; | ^ /usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match) 174 | operator>>(short& __n); | ^~~~~~~~ /usr/include/c++/14/istream:174:7: note: conversion of argument 1 would be ill-formed: a.cc:6:8: error: invalid conversion from 'int*' to 'short int' [-fpermissive] 6 | cin>>a>>b>>c; | ^ | | | int* a.cc:6:8: error: cannot bind rvalue '(short int)((int*)(& a))' to 'short int&' /usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 177 | operator>>(unsigned short& __n) | ^~~~~~~~ /usr/include/c++/14/istream:177:7: note: conversion of argument 1 would be ill-formed: a.cc:6:8: error: invalid conversion from 'int*' to 'short unsigned int' [-fpermissive] 6 | cin>>a>>b>>c; | ^ | | | int* a.cc:6:8: error: cannot bind rvalue '(short unsigned int)((int*)(& a))' to 'short unsigned int&' /usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match) 181 | operator>>(int& __n); | ^~~~~~~~ /usr/include/c++/14/istream:181:7: note: conversion of argument 1 would be ill-formed: a.cc:6:8: error: invalid conversion from 'int*' to 'int' [-fpermissive] 6 | cin>>a>>b>>c; | ^ | | | int* a.cc:6:8: error: cannot bind rvalue '(int)((int*)(& a))' to 'int&' /usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 184 | operator>>(unsigned int& __n) | ^~~~~~~~ /usr/include/c++/14/istream:184:7: note: conversion of argument 1 would be ill-formed: a.cc:6:8: error: invalid conversion from 'int*' to 'unsigned int' [-fpermissive] 6 | cin>>a>>b>>c; | ^ | | | int* a.cc:6:8: error: cannot bind rvalue '(unsigned int)((int*)(& a))' to 'unsigned int&' /usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 188 | operator>>(long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:188:7: note: conversion of argument 1 would be ill-formed: a.cc:6:8: error: invalid conversion from 'int*' to 'long int' [-fpermissive] 6 | cin>>a>>b>>c; | ^ | | | int* a.cc:6:8: error: cannot bind rvalue '(long int)((int*)(& a))' to 'long int&' /usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 192 | operator>>(unsigned long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:192:7: note: conversion of argument 1 would be ill-formed: a.cc:6:8: error: invalid conversion from 'int*' to 'long unsigned int' [-fpermissive] 6 | cin>>a>>b>>c; | ^ | | | int* a.cc:6:8: error: cannot bind rvalue '(long unsigned int)((int*)(& a))' to 'long unsigned int&' /usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 199 | operator>>(long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:199:7: note: conversion of argument 1 would be ill-formed: a.cc:6:8: error: invalid conversion from 'int*' to 'long long int' [-fpermissive] 6 | cin>>a>>b>>c; | ^ | | | int* a.cc:6:8: error: cannot bind rvalue '(long long int)((int*)(& a))' to 'long long int&' /usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 203 | operator>>(unsigned long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:203:7: note: conversion of argument 1 would be ill-formed: a.cc:6:8: error: invalid conversion from 'int*' to 'long long unsigned int' [-fpermissive] 6 | cin>>a>>b>>c; | ^ | | | int* a.cc:6:8: error: cannot bind rvalue '(long long unsigned int)((int*)(& a))' to 'long long unsigned int&' /usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 328 | operator>>(void*& __p) | ^~~~~~~~ /usr/include/c++/14/istream:328:7: note: conversion of argument 1 would be ill-formed: a.cc:6:8: error: cannot bind non-const lvalue reference of type 'void*&' to an rvalue of type 'void*' 6 | cin>>a>>b>>c; | ^ /usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 219 | operator>>(float& __f) | ^~~~~~~~ /usr/include/c++/14/istream:219:25: note: no known conversion for argument 1 from 'int [3]' to 'float&' 219 | operator>>(float& __f) | ~~~~~~~^~~ /usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 223 | operator>>(double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:223:26: note: no known conversion for argument 1 from 'int [3]' to 'double&' 223 | operator>>(double& __f) | ~~~~~~~~^~~ /usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 227 | operator>>(long double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:227:31: note: no known conversion for argument 1 from 'int [3]' to 'long double&' 227 | operator>>(long double& __f) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 122 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:122:36: note: no known conversion for argument 1 from 'int [3]' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'} 122 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]' 126 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:126:32: note: no known conversion for argument 1 from 'int [3]' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 126 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std:
s508357248
p03671
C++
#include <bits/stdc++.h> using namespace std; int a,b,c; int main(){ cin>>a>>b>>c; a[3]={a+b,b+c,c+a}; sort(a,a+3); cout<<a[0]<<endl; }
a.cc: In function 'int main()': a.cc:7:4: error: invalid types 'int[int]' for array subscript 7 | a[3]={a+b,b+c,c+a}; | ^ a.cc:9:10: error: invalid types 'int[int]' for array subscript 9 | cout<<a[0]<<endl; | ^ In file included from /usr/include/c++/14/algorithm:61, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]': /usr/include/c++/14/bits/stl_algo.h:1817:25: required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1817 | std::__insertion_sort(__first, __first + int(_S_threshold), __comp); | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1908:31: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1908 | std::__final_insertion_sort(__first, __last, __comp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:4772:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = int]' 4772 | std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:8:7: required from here 8 | sort(a,a+3); | ~~~~^~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1780:17: error: no type named 'value_type' in 'struct std::iterator_traits<int>' 1780 | __val = _GLIBCXX_MOVE(*__i); | ^~~~~ In file included from /usr/include/c++/14/bits/stl_pair.h:61, from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60: /usr/include/c++/14/bits/stl_algo.h:1780:25: error: invalid type argument of unary '*' (have 'int') 1780 | __val = _GLIBCXX_MOVE(*__i); | ^~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1782:15: error: invalid type argument of unary '*' (have 'int') 1782 | *__first = _GLIBCXX_MOVE(__val); | ^~~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:71: /usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::__ops::_Iter_less_iter::operator()(_Iterator1, _Iterator2) const [with _Iterator1 = int; _Iterator2 = int]': /usr/include/c++/14/bits/stl_algo.h:1777:14: required from 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1777 | if (__comp(__i, __first)) | ~~~~~~^~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1817:25: required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1817 | std::__insertion_sort(__first, __first + int(_S_threshold), __comp); | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1908:31: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1908 | std::__final_insertion_sort(__first, __last, __comp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:4772:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = int]' 4772 | std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:8:7: required from here 8 | sort(a,a+3); | ~~~~^~~~~~~ /usr/include/c++/14/bits/predefined_ops.h:45:16: error: invalid type argument of unary '*' (have 'int') 45 | { return *__it1 < *__it2; } | ^~~~~~ /usr/include/c++/14/bits/predefined_ops.h:45:25: error: invalid type argument of unary '*' (have 'int') 45 | { return *__it1 < *__it2; } | ^~~~~~ In file included from /usr/include/c++/14/bits/stl_algo.h:61: /usr/include/c++/14/bits/stl_heap.h: In instantiation of 'void std::__make_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare&) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]': /usr/include/c++/14/bits/stl_algo.h:1593:23: required from 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1593 | std::__make_heap(__first, __middle, __comp); | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1868:25: required from 'void std::__partial_sort(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1868 | std::__heap_select(__first, __middle, __last, __comp); | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1884:27: required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = int; _Size = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1884 | std::__partial_sort(__first, __last, __last, __comp); | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1905:25: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1905 | std::__introsort_loop(__first, __last, | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ 1906 | std::__lg(__last - __first) * 2, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1907 | __comp); | ~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:4772:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = int]' 4772 | std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:8:7: required from here 8 | sort(a,a+3); | ~~~~^~~~~~~ /usr/include/c++/14/bits/stl_heap.h:344:11: error: no type named 'value_type' in 'struct std::iterator_traits<int>' 344 | _ValueType; | ^~~~~~~~~~ /usr/include/c++/14/bits/stl_heap.h:346:11: error: no type named 'difference_type' in 'struct std::iterator_traits<int>' 346 | _DistanceType; | ^~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_heap.h: In instantiation of 'void std::__pop_heap(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare&) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]': /usr/include/c++/14/bits/stl_algo.h:1596:19: required from 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1596 | std::__pop_heap(__first, __middle, __i, __comp); | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1868:25: required from 'void std::__partial_sort(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1868 | std::__heap_select(__first, __middle, __last, __comp); | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1884:27: required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = int; _Size = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1884 | std::__partial_sort(__first, __last, __last, __comp); | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1905:25: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1905 | std::__introsort_loop(__first, __last, | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ 1906 | std::__lg(__last - __first) * 2, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1907 | __comp); | ~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:4772:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = int]' 4772 | std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:8:7: required from here 8 | sort(a,a+3); | ~~~~^~~~~~~ /usr/include/c++/14/bits/stl_heap.h:258:9: error: no type named 'value_type' in 'struct std::iterator_traits<int>' 258 | _ValueType; | ^~~~~~~~~~ /usr/include/c++/14/bits/stl_heap.h:260:9: error: no type named 'difference_type' in 'struct std::iterator_traits<int>' 260 | _DistanceType; | ^~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_heap.h:262:28: error: invalid type argument of unary '*' (have 'int') 262 | _ValueType __value = _GLIBCXX_MOVE(*__result); | ^~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_heap.h:263
s347797444
p03671
C++
#include<iostream> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; else if(c<=a&&b<=a) { cout<<c+b<<endl; } else if(a<=b&&c<=b) { cout<<c+a<<endl; } else if(a<=c&&b<=c) { cout<<a+b<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:7:9: error: 'else' without a previous 'if' 7 | else if(c<=a&&b<=a) | ^~~~
s206601946
p03671
C++
#include<bits/stdc++.h> using namespace std; int main() { cin>>a>>b>>c; if (a>b) if (b>c) cout<<b+c<<endl; else if (a>c) cout<<b+c<<endl; else cout<<a+b<<endl; else if (a>c) cout<<a+b<<endl; else if (b>c) cout<<c+a<<endl; else cout<<b+a<<endl; return 0; }
a.cc: In function 'int main()': a.cc:5:10: error: 'a' was not declared in this scope 5 | cin>>a>>b>>c; | ^ a.cc:5:13: error: 'b' was not declared in this scope 5 | cin>>a>>b>>c; | ^ a.cc:5:16: error: 'c' was not declared in this scope 5 | cin>>a>>b>>c; | ^
s512981619
p03671
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b,c,m; cin >> a >> b >> c; m = max(a, b, c); cout << a+b+c-m << endl;}
In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]': a.cc:7:10: required from here 7 | m = max(a, b, c); | ~~~^~~~~~~~~ /usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function 306 | if (__comp(__a, __b)) | ~~~~~~^~~~~~~~~~
s909451479
p03671
C++
#include<iostream> using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; cout << a+b+c-max({a,b,c}) << endl; }
a.cc: In function 'int main()': a.cc:7:20: error: no matching function for call to 'max(<brace-enclosed initializer list>)' 7 | cout << a+b+c-max({a,b,c}) << endl; | ~~~^~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)' 257 | max(const _Tp& __a, const _Tp& __b) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate expects 2 arguments, 1 provided /usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)' 303 | max(const _Tp& __a, const _Tp& __b, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate expects 3 arguments, 1 provided
s405485803
p03671
C++
#include<iostream> #include<cstdio> using namespace std; int a,b,c; int main() { cin>>a>>b>>c; if(a>b && b>c) cout<<a+b<<endl; if(a>b && c>b) cout<<a+c<<endl; if(b>a && a>c) cout<<a+b<<endl; if(b>a && c>a) cout<<b+c<<endl; if(c>a && a>b) cout<<c+a>>endl; if(c>a && b>a) cout<<b+c<<endl; return 0; }
a.cc: In function 'int main()': a.cc:12:30: error: no match for 'operator>>' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 12 | if(c>a && a>b) cout<<c+a>>endl; | ~~~~~~~~~^~~~~~ 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:12:32: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>' 12 | if(c>a && a>b) cout<<c+a>>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:12:32: note: couldn't deduce template parameter '_IntegerType' 12 | if(c>a && a>b) cout<<c+a>>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:12:32: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>' 12 | if(c>a && a>b) cout<<c+a>>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:32: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>' 12 | if(c>a && a>b) cout<<c+a>>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:32: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>' 12 | if(c>a && a>b) cout<<c+a>>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:32: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>' 12 | if(c>a && a>b) cout<<c+a>>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:32: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>' 12 | if(c>a && a>b) cout<<c+a>>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:32: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>' 12 | if(c>a && a>b) cout<<c+a>>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:32: note: couldn't deduce template parameter '_Tp' 12 | if(c>a && a>b) cout<<c+a>>endl; | ^~~~
s544731985
p03671
C++
#include<iostream> #include<cstdio> using namespace std; int a,b,c; int main() { cin>>a>>b>>c; if(a>b && b>c) cout<<a+b<<endl; if(a>b && c>b) cout<<a+c<<endl; if(b>a && a>c) cout<<a+b<<endl; if(b>a && c>a) cout<<b+c<<endl; if(c>a && a>b) cout<<c+a>>endl; if(c>a && b>a) cout<<b+c<<endl; return 0;
a.cc: In function 'int main()': a.cc:12:30: error: no match for 'operator>>' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 12 | if(c>a && a>b) cout<<c+a>>endl; | ~~~~~~~~~^~~~~~ 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:12:32: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>' 12 | if(c>a && a>b) cout<<c+a>>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:12:32: note: couldn't deduce template parameter '_IntegerType' 12 | if(c>a && a>b) cout<<c+a>>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:12:32: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>' 12 | if(c>a && a>b) cout<<c+a>>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:32: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>' 12 | if(c>a && a>b) cout<<c+a>>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:32: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>' 12 | if(c>a && a>b) cout<<c+a>>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:32: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>' 12 | if(c>a && a>b) cout<<c+a>>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:32: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>' 12 | if(c>a && a>b) cout<<c+a>>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:32: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>' 12 | if(c>a && a>b) cout<<c+a>>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:32: note: couldn't deduce template parameter '_Tp' 12 | if(c>a && a>b) cout<<c+a>>endl; | ^~~~ a.cc:14:14: error: expected '}' at end of input 14 | return 0; | ^ a.cc:6:1: note: to match this '{' 6 | { | ^
s171594672
p03671
C++
#include<iostream> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; else if(a<=b&&c<=b)cout<<a+c<<endl; else if(b<=a&&a<=c)cout<<b+a<<endl; else if(b<=a&&c<=a)cout<<b+c<<endl; else if(c<=a&&a<=b)cout<<c+a<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:5: error: 'else' without a previous 'if' 7 | else if(a<=b&&c<=b)cout<<a+c<<endl; | ^~~~
s575200508
p03671
C++
#include<iostream> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; else if(a<=b&&c<=b)cout<<a+c<<endl; else if(b<=a&&a<=c)cout<<b+a<<endl; else if(b<=a&&c<=a)cout<<b+c<<endl; else if(c<=a&&a<=b)cout<<c+a<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:5: error: 'else' without a previous 'if' 7 | else if(a<=b&&c<=b)cout<<a+c<<endl; | ^~~~
s843170186
p03671
C++
#include<bits/stdc++.h> using namesapce std; int a,b,c; int main(){ cin>>a>>b>>c; cout<<(a+b+c)-max(a,max(b,c))<<endl; return 0; }
a.cc:2:7: error: expected nested-name-specifier before 'namesapce' 2 | using namesapce std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:5:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | cin>>a>>b>>c; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:6:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 6 | cout<<(a+b+c)-max(a,max(b,c))<<endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:6:25: error: 'max' was not declared in this scope; did you mean 'std::max'? 6 | cout<<(a+b+c)-max(a,max(b,c))<<endl; | ^~~ | std::max In file included from /usr/include/c++/14/algorithm:61, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51: /usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here 5716 | max(initializer_list<_Tp> __l, _Compare __comp) | ^~~ a.cc:6:19: error: 'max' was not declared in this scope; did you mean 'std::max'? 6 | cout<<(a+b+c)-max(a,max(b,c))<<endl; | ^~~ | std::max /usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here 5716 | max(initializer_list<_Tp> __l, _Compare __comp) | ^~~ a.cc:6:36: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 6 | cout<<(a+b+c)-max(a,max(b,c))<<endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s633711428
p03671
C++
#include<bits/stdc++.h> using namesapce std; int a,b,c,d; int main(){ cin>>a>>b>>c; d=max(a,max(b,c)); cout<<(a+b+c)-d<<endl; return 0; }
a.cc:2:7: error: expected nested-name-specifier before 'namesapce' 2 | using namesapce std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:5:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | cin>>a>>b>>c; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:6:13: error: 'max' was not declared in this scope; did you mean 'std::max'? 6 | d=max(a,max(b,c)); | ^~~ | std::max In file included from /usr/include/c++/14/algorithm:61, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51: /usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here 5716 | max(initializer_list<_Tp> __l, _Compare __comp) | ^~~ a.cc:6:7: error: 'max' was not declared in this scope; did you mean 'std::max'? 6 | d=max(a,max(b,c)); | ^~~ | std::max /usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here 5716 | max(initializer_list<_Tp> __l, _Compare __comp) | ^~~ a.cc:7:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 7 | cout<<(a+b+c)-d<<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<<(a+b+c)-d<<endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s077458356
p03671
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; vector<int> vec(3) = {a, b, c}; sort(vec.begin(), vec.end()); cout << vec[0] + vec[1] << endl; }
a.cc: In function 'int main()': a.cc:6:22: error: expected ',' or ';' before '=' token 6 | vector<int> vec(3) = {a, b, c}; | ^
s274678703
p03671
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; int vec[3] = {a, b, c}; sort(vec.begin(), vec.end()); cout << vec[0] + vec[1] << endl; }
a.cc: In function 'int main()': a.cc:7:12: error: request for member 'begin' in 'vec', which is of non-class type 'int [3]' 7 | sort(vec.begin(), vec.end()); | ^~~~~ a.cc:7:25: error: request for member 'end' in 'vec', which is of non-class type 'int [3]' 7 | sort(vec.begin(), vec.end()); | ^~~
s699802266
p03671
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; vec[3] = {a, b, c}; sort(vec.begin(), vec.end()); cout << vec[0] + vec[1] << endl; }
a.cc: In function 'int main()': a.cc:6:3: error: 'vec' was not declared in this scope 6 | vec[3] = {a, b, c}; | ^~~
s012540276
p03671
C++
#include <stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; vec[3] = {a, b, c}; sort(vec.begin(), vec.end()); cout << vec[0] + vec[1] << endl; }
a.cc:1:10: fatal error: stdc++.h: No such file or directory 1 | #include <stdc++.h> | ^~~~~~~~~~ compilation terminated.
s984578115
p03671
C++
#include<iostream> int main() { int a,b,c; std::cin>>a>>b>>c; std::cout<<std::min({a+b,b+c,c+a})<<std::endl; return 0; }
a.cc: In function 'int main()': a.cc:6:22: error: no matching function for call to 'min(<brace-enclosed initializer list>)' 6 | std::cout<<std::min({a+b,b+c,c+a})<<std::endl; | ~~~~~~~~^~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)' 233 | min(const _Tp& __a, const _Tp& __b) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate expects 2 arguments, 1 provided /usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)' 281 | min(const _Tp& __a, const _Tp& __b, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate expects 3 arguments, 1 provided
s274207356
p03671
C++
#include<iostream> int main() { int a,b,c; std::cin>>a>>b>>c; std::cout<<std::min(a+b,b+c,c+a)<<std::endl; return 0; }
In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]': a.cc:6:22: required from here 6 | std::cout<<std::min(a+b,b+c,c+a)<<std::endl; | ~~~~~~~~^~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function 284 | if (__comp(__b, __a)) | ~~~~~~^~~~~~~~~~
s133779981
p03671
C++
use std::io::*; fn main() { let mut n = read_v(); n.sort(); println!("{}", n[0] + n[1]); } fn read_v() -> Vec<u32> { let mut s = String::new(); stdin().read_line(&mut s).unwrap(); s.split_whitespace() .map(|c| c.parse().ok().unwrap()) .collect() }
a.cc:1:1: error: 'use' does not name a type 1 | use std::io::*; | ^~~ a.cc:3:1: error: 'fn' does not name a type 3 | fn main() { | ^~ a.cc:9:1: error: 'fn' does not name a type 9 | fn read_v() -> Vec<u32> { | ^~
s895396728
p03671
C++
#include <iostream> #include <sstream> #include <math.h> #include <algoritm> #include <string> using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; cout<< min({a + b, b+c , c+a}) << endl; return 0; }
a.cc:4:10: fatal error: algoritm: No such file or directory 4 | #include <algoritm> | ^~~~~~~~~~ compilation terminated.
s075155783
p03671
C++
#include <iostream> #include <sstream> #include <math.h> using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; cout<< std::min({a + b, b+c , c+a}) << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:20: error: no matching function for call to 'min(<brace-enclosed initializer list>)' 8 | cout<< std::min({a + b, b+c , c+a}) << endl; | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)' 233 | min(const _Tp& __a, const _Tp& __b) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate expects 2 arguments, 1 provided /usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)' 281 | min(const _Tp& __a, const _Tp& __b, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate expects 3 arguments, 1 provided
s679126088
p03671
C++
#include <iostream> #include <sstream> #include <math.h> using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; cout<< std::min(a + b, b+c , c+a) << endl; return 0; }
In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]': a.cc:8:20: required from here 8 | cout<< std::min(a + b, b+c , c+a) << endl; | ~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function 284 | if (__comp(__b, __a)) | ~~~~~~^~~~~~~~~~
s837357769
p03671
C++
#include <iostream> #include <sstream> #include <math.h> using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; cout<< min(a + b, b+c , c+a) << endl; return 0; }
In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]': a.cc:8:15: required from here 8 | cout<< min(a + b, b+c , c+a) << endl; | ~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function 284 | if (__comp(__b, __a)) | ~~~~~~^~~~~~~~~~
s078344014
p03671
C++
#include <iostream> #include <sstream> #include <math> using namespace st; int main(){ int a,b,c; cin >> a >> b >> c; cout<< min(a + b, b+c , c+a) << endl; return 0; }
a.cc:3:10: fatal error: math: No such file or directory 3 | #include <math> | ^~~~~~ compilation terminated.
s098272974
p03671
C++
#include <iostream> #include <sstream> #include <math> using namespace st; int main(){ int a,b,c; cin >> a >> b >> c; cout<< min(a + b, b+c , c+a) << endl; return 0; }
a.cc:3:10: fatal error: math: No such file or directory 3 | #include <math> | ^~~~~~ compilation terminated.
s120106343
p03671
C++
#include <iostream> using namespace std; int main() {x = a; if (b > x) { x = b; } else if (c > x) { x = c; } cout << a + b + c - x; return 0;}
a.cc: In function 'int main()': a.cc:6:2: error: 'x' was not declared in this scope 6 | {x = a; | ^ a.cc:6:6: error: 'a' was not declared in this scope 6 | {x = a; | ^ a.cc:7:13: error: 'b' was not declared in this scope 7 | if (b > x) { x = b; } | ^ a.cc:8:18: error: 'c' was not declared in this scope 8 | else if (c > x) { x = c; } | ^ a.cc:9:21: error: 'b' was not declared in this scope 9 | cout << a + b + c - x; | ^ a.cc:9:25: error: 'c' was not declared in this scope 9 | cout << a + b + c - x; | ^
s807316363
p03671
C++
#include <iostream> using namespace std; int main() int main() { int a, b, c; cin >> a >> b >> c; if ((a + b) < (b + c) && (a + b) < (a + c)) { cout << a + b; } else if ((c + b) < (b + a) && (c + b) < (a + b)) { cout << c + b; } else if ((a + c) < (b + a) && (a + c) < (b + c)) { cout << a + c; } return 0; }
a.cc:5:1: error: expected initializer before 'int' 5 | int main() | ^~~
s271007032
p03671
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin >>a >>b >>c; if ((a+c)>=(b+c) && (a+b)>=(b+c)) cout >> b+c >>endl; else if((a+c)>=(a+b) && (b+c)>=(a+b)) cout >> a+b >>endl; else cout >> a+c >> endl; }
a.cc: In function 'int main()': a.cc:7:48: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int') 7 | if ((a+c)>=(b+c) && (a+b)>=(b+c)) cout >> b+c >>endl; | ~~~~ ^~ ~~~ | | | | | int | std::ostream {aka std::basic_ostream<char>} a.cc:7:48: note: candidate: 'operator>>(int, int)' (built-in) 7 | if ((a+c)>=(b+c) && (a+b)>=(b+c)) cout >> b+c >>endl; | ~~~~~^~~~~~ a.cc:7:48: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int' 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:7:43: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte' 7 | if ((a+c)>=(b+c) && (a+b)>=(b+c)) cout >> b+c >>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:7:53: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 7 | if ((a+c)>=(b+c) && (a+b)>=(b+c)) cout >> b+c >>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:7:53: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 7 | if ((a+c)>=(b+c) && (a+b)>=(b+c)) cout >> b+c >>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:7:53: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 7 | if ((a+c)>=(b+c) && (a+b)>=(b+c)) cout >> b+c >>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:7:53: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 7 | if ((a+c)>=(b+c) && (a+b)>=(b+c)) cout >> b+c >>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:7:53: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 7 | if ((a+c)>=(b+c) && (a+b)>=(b+c)) cout >> b+c >>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:7:53: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 7 | if ((a+c)>=(b+c) && (a+b)>=(b+c)) cout >> b+c >>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:7:53: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 7 | if ((a+c)>=(b+c) && (a+b)>=(b+c)) cout >> b+c >>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:7:53: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 7 | if ((a+c)>=(b+c) && (a+b)>=(b+c)) cout >> b+c >>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 = int]': a.cc:7:48: required from here 7 | if ((a+c)>=(b+c) && (a+b)>=(b+c)) cout >> b+c >>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) | ^~~~~~~~ /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:7:53: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 7 | if ((a+c)>=(b+c) && (a+b)>=(b+c)) cout >> b+c >>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:7:53: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 7 | if ((a+c)>=(b+c) && (a+b)>=(b+c)) cout >> b+c >>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:7:53: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 7 | if ((a+c)>=(b+c) && (a+b)>=(b+c)) cout >> b+c >>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) |
s448022675
p03671
C++
str=input() nedan=str.split() max=0 sum=0 for i in range(len(nedan)): if int(nedan[i])>max: max=i for i in range(len(nedan)): if i!=max: sum+=int(nedan[i]) print(sum)
a.cc:1:1: error: 'str' does not name a type 1 | str=input() | ^~~