submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s067112214
p03671
C++
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <map> #include <cmath> #include <queue> #include <set> #include <stack> #include <numeric> #include <bitset> #include <math.h> #include <iomanip> #include <sstream> #include <cstdlib> using namespace std; typedef long long ll; //マクロ //forループ関係 //引数は、(ループ内変数,動く範囲)か(ループ内変数,始めの数,終わりの数)、のどちらか //Dがついてないものはループ変数は1ずつインクリメントされ、Dがついてるものはループ変数は1ずつデクリメントされる #define REP(i,n) for(ll i=0;i<(ll)(n);i++) #define REPD(i,n) for(ll i=n-1;i>=0;i--) #define FOR(i,a,b) for(ll i=a;i<=(ll)(b);i++) #define FORD(i,a,b) for(ll i=a;i>=(ll)(b);i--) //xにはvectorなどのコンテナ #define ALL(x) (x).begin(),(x).end() //sortなどの引数を省略したい #define SIZE(x) ((ll)(x).size()) //sizeをsize_tからllに直しておく #define MAX(x) *max_element(ALL(x)) //最大値を求める #define MIN(x) *min_element(ALL(x)) //最小値を求める //定数 #define INF 1000000000000 //10^12:極めて大きい値,∞ #define MOD 1000000007 //10^9+7:合同式の法 #define MAXR 100000 //10^5:配列の最大のrange(素数列挙などで使用) #define PI 3.14159265359 //πの値 //略記 #define PB push_back //vectorヘの挿入 #define MP make_pair //pairのコンストラクタ #define F first //pairの一つ目の要素 #define S second //pairの二つ目の要素 #define C(x) cout << x << endl //テスト出力 //DP処理用 template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } //関数 //nCkの計算の関数(呼び出しは[cbn]) ll cbn(ll n, ll k) { ll r = 1; for (ll d = 1; d <= k; ++d) { r *= n--; r /= d; } return r; } // a^n mod を計算する ll powmod(ll a, ll n) { ll res = 1; while (n > 0) { if (n & 1) res = res * a % MOD; a = a * a % MOD; n >>= 1; } return res; } //2つの最大公約数 int gcb(int a, int b){ if(a < b){ int x = a; a = b; b = x; } int amari = a % b; if(amari == 0) return b; return gcb(b, amari); } //3つの最大公約数 int gcb_3(int a, int b, int c){ return gcb(gcb(a, b), c); } /*map<Keyの型, Valueの型> 変数名; queue<型> 変数名; priority_queue<型> 変数名; priority_queue<型, vector<型>, greater<型>> 変数名; vector<vector<要素の型>> 変数名(要素数1, vector<要素の型>(要素数2, 初期値)) sort(変数名.begin(), 変数名.end());*/ /*-----------------------------ここから-----------------------------*/ int main() { cin.tie(0); ios::sync_with_stdio(false);] ll data[3]; REP(i,3) cin>>data[i]; sort(data.begin(),data.end()); cout<<data[0]+data[1]; }
a.cc: In function 'int main()': a.cc:97:29: error: expected primary-expression before ']' token 97 | ios::sync_with_stdio(false);] | ^ a.cc:99:19: error: invalid types '<unresolved overloaded function type>[ll {aka long long int}]' for array subscript 99 | REP(i,3) cin>>data[i]; | ^ a.cc:100:11: error: overloaded function with no contextual type information 100 | sort(data.begin(),data.end()); | ^~~~~ a.cc:100:24: error: overloaded function with no contextual type information 100 | sort(data.begin(),data.end()); | ^~~ a.cc:101:11: error: invalid types '<unresolved overloaded function type>[int]' for array subscript 101 | cout<<data[0]+data[1]; | ^ a.cc:101:19: error: invalid types '<unresolved overloaded function type>[int]' for array subscript 101 | cout<<data[0]+data[1]; | ^
s469918202
p03671
C++
#include <iostream> #include <algorithm> #include <cmath> #include <vector> #include <stack> #include <queue> #include <map> #include <string> using namespace std; int main() { int ans,n, m; char str[222]; cin >> str; int n = strlen(str); for (int i = n - 2; i; i -= 2) { if (strncmp(str, str + i / 2, i / 2) == 0) { printf("%d\n", i); return 0; } } return 0; }
a.cc: In function 'int main()': a.cc:16:13: error: redeclaration of 'int n' 16 | int n = strlen(str); | ^ a.cc:13:17: note: 'int n' previously declared here 13 | int ans,n, m; | ^ a.cc:16:17: error: 'strlen' was not declared in this scope 16 | int n = strlen(str); | ^~~~~~ a.cc:8:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 7 | #include <map> +++ |+#include <cstring> 8 | #include <string> a.cc:18:21: error: 'strncmp' was not declared in this scope 18 | if (strncmp(str, str + i / 2, i / 2) == 0) { | ^~~~~~~ a.cc:18:21: note: 'strncmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
s921109253
p03671
C++
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; using ll = long long; int main() { int a, b, c; cin >> a >> b >> c; cout << a + b + c - max(a, 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::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]': a.cc:10:26: required from here 10 | 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)) | ~~~~~~^~~~~~~~~~
s360004932
p03671
C++
#include<iostream> #include<algorithm> using namespace std; ina main(){ int a,b,c; cin>>a>>b>>c; cout<<min({a+b,a+c,b+c}); return 0; }
a.cc:4:1: error: 'ina' does not name a type; did you mean 'int'? 4 | ina main(){ | ^~~ | int
s296955512
p03671
C++
#include<bits/stdc++.h> using namespace std; int main() { long long int a,b,c,s=0; cin>>a>b>>c; s+=min(a,b); s+=min(b,c); cout<<s; }
a.cc: In function 'int main()': a.cc:6:9: error: no match for 'operator>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'long long int') 6 | cin>>a>b>>c; | ~~~~~~^~~~~ | | | | | long long int | std::basic_istream<char>::__istream_type {aka std::basic_istream<char>} a.cc:6:9: note: candidate: 'operator>(int, long long int)' (built-in) 6 | cin>>a>b>>c; | ~~~~~~^~~~~ a.cc:6:9: note: no known conversion for argument 1 from 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'int' In file included from /usr/include/c++/14/regex:68, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181, from a.cc:1: /usr/include/c++/14/bits/regex.h:1176:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator>(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1176 | operator>(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1176:5: note: template argument deduction/substitution failed: a.cc:6:13: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 6 | cin>>a>b>>c; | ^ /usr/include/c++/14/bits/regex.h:1236:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator>(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)' 1236 | operator>(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1236:5: note: template argument deduction/substitution failed: a.cc:6:13: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' 6 | cin>>a>b>>c; | ^ /usr/include/c++/14/bits/regex.h:1329:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator>(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)' 1329 | operator>(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1329:5: note: template argument deduction/substitution failed: a.cc:6:13: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 6 | cin>>a>b>>c; | ^ /usr/include/c++/14/bits/regex.h:1403:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1403 | operator>(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1403:5: note: template argument deduction/substitution failed: a.cc:6:13: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'long long int' 6 | cin>>a>b>>c; | ^ /usr/include/c++/14/bits/regex.h:1497:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1497 | operator>(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1497:5: note: template argument deduction/substitution failed: a.cc:6:13: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 6 | cin>>a>b>>c; | ^ /usr/include/c++/14/bits/regex.h:1573:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1573 | operator>(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1573:5: note: template argument deduction/substitution failed: a.cc:6:13: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'long long int' 6 | cin>>a>b>>c; | ^ /usr/include/c++/14/bits/regex.h:1673:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1673 | operator>(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1673:5: note: template argument deduction/substitution failed: a.cc:6:13: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 6 | cin>>a>b>>c; | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51: /usr/include/c++/14/bits/stl_pair.h:1058:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator>(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1058 | operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1058:5: note: template argument deduction/substitution failed: a.cc:6:13: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::pair<_T1, _T2>' 6 | cin>>a>b>>c; | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:462:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 462 | operator>(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:462:5: note: template argument deduction/substitution failed: a.cc:6:13: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 6 | cin>>a>b>>c; | ^ /usr/include/c++/14/bits/stl_iterator.h:507:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 507 | operator>(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:507:5: note: template argument deduction/substitution failed: a.cc:6:13: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 6 | cin>>a>b>>c; | ^ /usr/include/c++/14/bits/stl_iterator.h:1714:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1714 | operator>(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1714:5: note: template argument deduction/substitution failed: a.cc:6:13: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 6 | cin>>a>b>>c; | ^ /usr/include/c++/14/bits/stl_iterator.h:1774:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1774 | operator>(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1774:5: note: template argument deduction/substitution failed: a.cc:6:13: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 6 | cin>>a>b>>c; | ^ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/string_view:695:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 695 | operator> (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:695:5: note: template argument deduction/substitution failed: a.cc:6:13: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 6 | cin>>a>b>>c; | ^ /usr/include/c++/14/string_view:702:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 702 | operator> (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:702:5: note: template argument deduction/substitution failed: a.cc:6:13: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 6 | cin>>a>b>>c; | ^ /usr/include/c++/14/string_view:710:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)' 710 | operator> (__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:710:5: note: template argument deduction/substitution failed: a.cc:6:13: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'long long int' 6 | cin>>a>b>>c; | ^ /usr/include/c++/14/bits/basic_string.h:3915:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3915 | operator>(const basic_string<_CharT,
s652121517
p03671
C++
#include <bits/stdc++.h> #define fi first #define se second #define rep(i, s, n) for (int i = (s); i < (n); ++i) #define rrep(i, n, g) for (int i = (n)-1; i >= (g); --i) #define all(a) a.begin(), a.end() #define rall(a) a.rbegin(), a.rend() #define len(x) (int)(x).size() #define dup(x, y) (((x) + (y)-1) / (y)) #define pb push_back #define Field(T) vector<vector<T>> using namespace std; using ll = long long; using P = pair<int, int>; 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:19:26: required from here 19 | 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)) | ~~~~~~^~~~~~~~~~
s132354094
p03671
C++
#include <iostream> using namespace std; int main() { int a,b,c,x,y,z; cin>>a>>b>>; x=a+b; y=a+c; z=c+b; if(x<y&&x<z) cout<<x; else if(y<x&&y<z) cout<<y; else if(z<x&&z<y) cout<<z; else cout<<x; return 0; }
a.cc: In function 'int main()': a.cc:9:12: error: expected primary-expression before ';' token 9 | cin>>a>>b>>; | ^
s675781988
p03671
C++
#include <iostream> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; if(a+b<<a+c&&a+b<<c+b) cout<<a+b; else if(a+c<<a+b&&a+c<<c+b) cout<<a+c; else if(b+c<<a+b&&c+b<<a+c) cout<<c+b; else if(a+b==a+c&&a+b==z&&a+c==b+c) cout<<a+b; return 0; }
a.cc: In function 'int main()': a.cc:18:19: error: 'z' was not declared in this scope 18 | if(a+b==a+c&&a+b==z&&a+c==b+c) | ^
s698966496
p03671
C++
#include <iostream> #include<vector> #include<algorithm> #include<string> #include<cmath> #include<set> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; int ans1 = a + b; int ans2 = a + c; int ans3 = b + c; cout << sort({ ans1,ans2,ans3 }) << endl; }
a.cc: In function 'int main()': a.cc:19:21: error: no matching function for call to 'sort(<brace-enclosed initializer list>)' 19 | cout << sort({ ans1,ans2,ans3 }) << endl; | ~~~~^~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:61, from a.cc:3: /usr/include/c++/14/bits/stl_algo.h:4762:5: note: candidate: 'template<class _RAIter> void std::sort(_RAIter, _RAIter)' 4762 | sort(_RandomAccessIterator __first, _RandomAccessIterator __last) | ^~~~ /usr/include/c++/14/bits/stl_algo.h:4762:5: note: candidate expects 2 arguments, 1 provided /usr/include/c++/14/bits/stl_algo.h:4793:5: note: candidate: 'template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)' 4793 | sort(_RandomAccessIterator __first, _RandomAccessIterator __last, | ^~~~ /usr/include/c++/14/bits/stl_algo.h:4793:5: note: candidate expects 3 arguments, 1 provided In file included from /usr/include/c++/14/algorithm:86: /usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare)' 292 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp); | ^~~~ /usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note: candidate expects 4 arguments, 1 provided /usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator)' 296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last); | ^~~~ /usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: candidate expects 3 arguments, 1 provided
s191477643
p03671
C++
/* Contest 066 A - ringring Rakesh Kumar --> 01/09/2020 */ #include <bits/stdc++.h> int main() { std::ios_base::sync_with_stdio(false); std::cin.tie(0); std::cout.tie(0); int a = 0, b = 0, c = 0; std::cint >> a >> b >> c; std::cout << std::min(a + b, std::min(b + c, a + c)) << std::endl; return 0; }
a.cc: In function 'int main()': a.cc:14:10: error: 'cint' is not a member of 'std'; did you mean 'rint'? 14 | std::cint >> a >> b >> c; | ^~~~ | rint
s070001071
p03671
C
#include <stdio.h> int main() { int a, b, c, ab, ac, bc; scanf("%d %d %d", &a, &b, &c); ab = a+b; ac = a+c; bc = b+c; if(ab<ac && ab<bc) { printf("%d", ab); } else if(ac<ab && ac<bc) { printf("%d", ac); } else { printf("%d", bc); } return 0;
main.c: In function 'main': main.c:21:5: error: expected declaration or statement at end of input 21 | return 0; | ^~~~~~
s252143078
p03671
C++
#include<iostream> #include<vector> #include<algorithm> using namesapce std; int main(){ vector<int>v(3); for(int i=0;i<3;i++) { cin>>v[i]; } sort(v.begin(),v.end()); cout<<v[0]+v[1]; }
a.cc:4:7: error: expected nested-name-specifier before 'namesapce' 4 | using namesapce std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:6:3: error: 'vector' was not declared in this scope 6 | vector<int>v(3); | ^~~~~~ a.cc:6:3: note: suggested alternatives: In file included from /usr/include/c++/14/vector:66, from a.cc:2: /usr/include/c++/14/bits/stl_vector.h:428:11: note: 'std::vector' 428 | class vector : protected _Vector_base<_Tp, _Alloc> | ^~~~~~ /usr/include/c++/14/vector:93:13: note: 'std::pmr::vector' 93 | using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>; | ^~~~~~ a.cc:6:10: error: expected primary-expression before 'int' 6 | vector<int>v(3); | ^~~ a.cc:9:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 9 | cin>>v[i]; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:9:14: error: 'v' was not declared in this scope 9 | cin>>v[i]; | ^ a.cc:11:8: error: 'v' was not declared in this scope 11 | sort(v.begin(),v.end()); | ^ a.cc:11:3: error: 'sort' was not declared in this scope; did you mean 'std::sort'? 11 | sort(v.begin(),v.end()); | ^~~~ | std::sort In file included from /usr/include/c++/14/algorithm:86, from a.cc:3: /usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: 'std::sort' declared here 296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last); | ^~~~ a.cc:12:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 12 | cout<<v[0]+v[1]; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~
s142000652
p03671
C++
#include <bits/stdc++.h> using namespace std; int main() { int a , b ,c; vector<int> A(3); for ( int i=0 ; i<3 ; i++){ cin >> A.at(i); } sort ( A.begin() , A.end() ) cout << A.at(0)+A.at(1) << endl; }
a.cc: In function 'int main()': a.cc:11:31: error: expected ';' before 'cout' 11 | sort ( A.begin() , A.end() ) | ^ | ; 12 | cout << A.at(0)+A.at(1) << endl; | ~~~~
s421561269
p03671
C++
#include <bits/stdc++.h> using namespace std; int main() { int a , b ,c; int A[3]; for ( int i=0 ; i<3 ; i++){ cin >> A[i]; } sort ( A.begin() , A.end() ) cout << A[0]+A[1] << endl; }
a.cc: In function 'int main()': a.cc:11:12: error: request for member 'begin' in 'A', which is of non-class type 'int [3]' 11 | sort ( A.begin() , A.end() ) | ^~~~~ a.cc:11:24: error: request for member 'end' in 'A', which is of non-class type 'int [3]' 11 | sort ( A.begin() , A.end() ) | ^~~
s119990414
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:6:14: required from here 6 | 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)) | ~~~~~~^~~~~~~~~~
s667417973
p03671
C
#include <stdio.h> int main(void) { int a,b,c,max,s; scanf("%d%d%d",&a,&b,&c); s=a+b+c; if(a>b && b>c)max=a else if(a<b && a>c)max=b; else max=c; printf("%d",s-max); return 0; }
main.c: In function 'main': main.c:8:22: error: expected ';' before 'else' 8 | if(a>b && b>c)max=a | ^ | ; 9 | else if(a<b && a>c)max=b; | ~~~~
s768570375
p03671
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; cout<<a+b+c-min{(a,b,c)}<<endl; }
a.cc: In function 'int main()': a.cc:7:14: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator-' 7 | cout<<a+b+c-min{(a,b,c)}<<endl; | ~~~~~^~~~ a.cc:7:27: error: expected primary-expression before '<<' token 7 | cout<<a+b+c-min{(a,b,c)}<<endl; | ^~
s400895103
p03671
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; cout<<a+b+c-min{(a,b,c)}<<endl;
a.cc: In function 'int main()': a.cc:7:14: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator-' 7 | cout<<a+b+c-min{(a,b,c)}<<endl; | ~~~~~^~~~ a.cc:7:27: error: expected primary-expression before '<<' token 7 | cout<<a+b+c-min{(a,b,c)}<<endl; | ^~ a.cc:7:34: error: expected '}' at end of input 7 | cout<<a+b+c-min{(a,b,c)}<<endl; | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s852655109
p03671
C++
#include <bits/stdc++.h> #include <vector> #include <algorithm> #include <iostream> using namespace std; int main() { vector<int> a.(3); for (int i=0; i<3; i++) { cin >> a.(i); } sort(a.begin(),a.end()); cout << a.at(0)+a.at(1) << endl; }
a.cc: In function 'int main()': a.cc:8:16: error: expected initializer before '.' token 8 | vector<int> a.(3); | ^ a.cc:10:12: error: 'a' was not declared in this scope 10 | cin >> a.(i); | ^ a.cc:10:14: error: expected unqualified-id before '(' token 10 | cin >> a.(i); | ^ a.cc:12:8: error: 'a' was not declared in this scope 12 | sort(a.begin(),a.end()); | ^
s246743091
p03671
C++
#include <bits/stdc++.h> #include <vector> #include <algorithm> #include <iostream> using namespace std; int main() { int a, b, c, ans; cin >> a >> b >> c; ans=a+b+c-max(a,b,c); cout << ans << 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:10:16: required from here 10 | ans=a+b+c-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)) | ~~~~~~^~~~~~~~~~
s040648075
p03671
C++
#include bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; cout << a+b+c-max(max(a,b),c) << endl; }
a.cc:1:10: error: #include expects "FILENAME" or <FILENAME> 1 | #include bits/stdc++.h> | ^~~~ a.cc: In function 'int main()': a.cc:6:3: error: 'cin' was not declared in this scope 6 | cin >> a >> b >> c; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | #include bits/stdc++.h> a.cc:7:3: error: 'cout' was not declared in this scope 7 | cout << a+b+c-max(max(a,b),c) << endl; | ^~~~ a.cc:7:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:7:21: error: 'max' was not declared in this scope 7 | cout << a+b+c-max(max(a,b),c) << endl; | ^~~ a.cc:7:17: error: 'max' was not declared in this scope 7 | cout << a+b+c-max(max(a,b),c) << endl; | ^~~ a.cc:7:36: error: 'endl' was not declared in this scope 7 | cout << a+b+c-max(max(a,b),c) << endl; | ^~~~ a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' +++ |+#include <ostream> 1 | #include bits/stdc++.h>
s948164041
p03671
C++
#include<iostream> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; if(a==b&&b==c) { cout<<(2*a)<<endl; cout<<"Buying any two "<<(2*a)<<"yen."<<endl; } else if(a!=b!=c) { cout<<"Buying a "<<a<<"-yen bell and a "<<b<<"-yen bell costs "<<(a+b)<<" yen."<<endl; cout<<"Buying a "<<a<<"-yen bell and a "<<c<<"-yen bell costs "<<(a+c)<<" yen."<<endl; cout<<"Buying a "<<b<<"-yen bell and a "<<c<<"-yen bell costs "<<(b+c)<<" yen."<<endl; if((a+b)<<(a+c)&(a+c)<<(b+c)) cout<<"The minimum among these is "<<(a+b)<<" yen."; else if((a+c)<<(a+b)&(a+b)<<(b+c)) cout<<"The minimum among these is "<<(a+c)<" yen."; else if((b+c)<<(a+b)&(a+b)<<(a+c)) cout<<"The minimum among these is "<<(b+c)<" yen."; } }
a.cc: In function 'int main()': a.cc:21:51: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and 'const char [6]') 21 | cout<<"The minimum among these is "<<(a+c)<" yen."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ | | | | | const char [6] | std::basic_ostream<char> In file included from /usr/include/c++/14/string:48, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 448 | operator<(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed: a.cc:21:52: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 21 | cout<<"The minimum among these is "<<(a+c)<" yen."; | ^~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 493 | operator<(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed: a.cc:21:52: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 21 | cout<<"The minimum among these is "<<(a+c)<" yen."; | ^~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1694 | operator<(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed: a.cc:21:52: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 21 | cout<<"The minimum among these is "<<(a+c)<" yen."; | ^~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1760 | operator<(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed: a.cc:21:52: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 21 | cout<<"The minimum among these is "<<(a+c)<" yen."; | ^~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/string:51: /usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed: a.cc:21:52: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>' 21 | cout<<"The minimum among these is "<<(a+c)<" yen."; | ^~~~~~~ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54: /usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 673 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed: a.cc:21:52: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 21 | cout<<"The minimum among these is "<<(a+c)<" yen."; | ^~~~~~~ /usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 680 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed: a.cc:21:52: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 21 | cout<<"The minimum among these is "<<(a+c)<" yen."; | ^~~~~~~ /usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)' 688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed: a.cc:21:52: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'const char*' 21 | cout<<"The minimum among these is "<<(a+c)<" yen."; | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed: a.cc:21:52: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 21 | cout<<"The minimum among these is "<<(a+c)<" yen."; | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:3888:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3888 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3888:5: note: template argument deduction/substitution failed: a.cc:21:52: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 21 | cout<<"The minimum among these is "<<(a+c)<" yen."; | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:3901:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3901 | operator<(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3901:5: note: template argument deduction/substitution failed: a.cc:21:52: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>' 21 | cout<<"The minimum among these is "<<(a+c)<" yen."; | ^~~~~~~ In file included from /usr/include/c++/14/bits/memory_resource.h:47, from /usr/include/c++/14/string:68: /usr/include/c++/14/tuple:2600:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator<(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)' 2600 | operator<(const tuple<_TElements...>& __t, | ^~~~~~~~ /usr/include/c++/14/tuple:2600:5: note: template argument deduction/substitution failed: a.cc:21:52: note: 'std::basic_ostream<char>' is not derived from 'const std::tuple<_UTypes ...>' 21 | cout<<"The minimum among these is "<<(a+c)<" yen."; | ^~~~~~~ In file included from /usr/include/c++/14/bits/ios_base.h:46: /usr/include/c++/14/system_error:324:3: note: candidate: 'bool std::operator<(const error_code&, const error_code&)' 324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept | ^~~~~~~~ /usr/include/c++/14/system_error:324:31: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'const std::error_code&' 324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept | ~~~~~~~~~~~~~~~~~~^~~~~ /usr/include/c++/14/system_error:507:3: note: candidate: 'bool std::operator<(const error_condition&, const error_condition&)' 507 | operator<(const error_condition& __lhs, | ^~~~~~~~ /usr/include/c++/14/system_error:507:36: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'const std::error_condition&' 507 | operator<(const error_condition& __lhs, | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~ a.cc:23:51: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and 'const char [6]') 23 | cout<<"The minimum among these is "<<(b+c)<" yen."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ | | | | | const char [6] |
s370225451
p03671
C++
#include<iostream> using namespace std; int main() { int a,b,c; int x,y,z; cin>>a>>b>>c; if(a==b&&b==c) { x=2*a; cout<<x<<endl; cout<<"Buying any two "<<x<<"yen."<<endl; } else if(a!=b!=c) { x=a+b; y=a+c; z=b+c; cout<<"Buying a "<<a<<"-yen bell and a "<<b<<"-yen bell costs "<<x<<" yen."<<endl; cout<<"Buying a "<<a<<"-yen bell and a "<<c<<"-yen bell costs "<<y<<" yen."<<endl; cout<<"Buying a "<<b<<"-yen bell and a "<<c<<"-yen bell costs "<<z<<" yen."<<endl; if(x<<y&y<<z) cout<<"The minimum among these is "<<x<<" yen."; else if(y<<x&x<<z) cout<<"The minimum among these is "<<y<" yen."; else if(z<<x&x<<y) cout<<"The minimum among these is "<<z<" yen."; } }
a.cc: In function 'int main()': a.cc:27:47: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and 'const char [6]') 27 | cout<<"The minimum among these is "<<y<" yen."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ | | | | | const char [6] | std::basic_ostream<char> In file included from /usr/include/c++/14/string:48, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 448 | operator<(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed: a.cc:27:48: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 27 | cout<<"The minimum among these is "<<y<" yen."; | ^~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 493 | operator<(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed: a.cc:27:48: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 27 | cout<<"The minimum among these is "<<y<" yen."; | ^~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1694 | operator<(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed: a.cc:27:48: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 27 | cout<<"The minimum among these is "<<y<" yen."; | ^~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1760 | operator<(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed: a.cc:27:48: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 27 | cout<<"The minimum among these is "<<y<" yen."; | ^~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/string:51: /usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed: a.cc:27:48: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>' 27 | cout<<"The minimum among these is "<<y<" yen."; | ^~~~~~~ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54: /usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 673 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed: a.cc:27:48: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 27 | cout<<"The minimum among these is "<<y<" yen."; | ^~~~~~~ /usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 680 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed: a.cc:27:48: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 27 | cout<<"The minimum among these is "<<y<" yen."; | ^~~~~~~ /usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)' 688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed: a.cc:27:48: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'const char*' 27 | cout<<"The minimum among these is "<<y<" yen."; | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed: a.cc:27:48: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 27 | cout<<"The minimum among these is "<<y<" yen."; | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:3888:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3888 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3888:5: note: template argument deduction/substitution failed: a.cc:27:48: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 27 | cout<<"The minimum among these is "<<y<" yen."; | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:3901:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3901 | operator<(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3901:5: note: template argument deduction/substitution failed: a.cc:27:48: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>' 27 | cout<<"The minimum among these is "<<y<" yen."; | ^~~~~~~ In file included from /usr/include/c++/14/bits/memory_resource.h:47, from /usr/include/c++/14/string:68: /usr/include/c++/14/tuple:2600:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator<(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)' 2600 | operator<(const tuple<_TElements...>& __t, | ^~~~~~~~ /usr/include/c++/14/tuple:2600:5: note: template argument deduction/substitution failed: a.cc:27:48: note: 'std::basic_ostream<char>' is not derived from 'const std::tuple<_UTypes ...>' 27 | cout<<"The minimum among these is "<<y<" yen."; | ^~~~~~~ In file included from /usr/include/c++/14/bits/ios_base.h:46: /usr/include/c++/14/system_error:324:3: note: candidate: 'bool std::operator<(const error_code&, const error_code&)' 324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept | ^~~~~~~~ /usr/include/c++/14/system_error:324:31: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'const std::error_code&' 324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept | ~~~~~~~~~~~~~~~~~~^~~~~ /usr/include/c++/14/system_error:507:3: note: candidate: 'bool std::operator<(const error_condition&, const error_condition&)' 507 | operator<(const error_condition& __lhs, | ^~~~~~~~ /usr/include/c++/14/system_error:507:36: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'const std::error_condition&' 507 | operator<(const error_condition& __lhs, | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~ a.cc:29:47: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and 'const char [6]') 29 | cout<<"The minimum among these is "<<z<" yen."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ | | | | | const char [6] | std::basic_ostream<char> /usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'templa
s769589965
p03671
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class MAin { public static void main(String[] args) throws IOException { try (BufferedReader br = new BufferedReader( new InputStreamReader(System.in))) { String in = br.readLine(); String chr[] = in.split(" "); int a = Integer.parseInt(chr[0]); int b = Integer.parseInt(chr[1]); int c = Integer.parseInt(chr[2]); System.out.println(a+b+c-(Math.max(a, Math.max(b, c)))); } } }
Main.java:5: error: class MAin is public, should be declared in a file named MAin.java public class MAin { ^ 1 error
s268465288
p03671
C++
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; #define rep(i, c) for (int i = 0; i < (int)c; i++) #define all(v) v.begin(), v.end() using ll = long long; using P = pair<int, int>; //const int inf = 1e9; //1(1倍)e(指数)9(10^9) //const ll MX = 1e18; //1(1倍)e(指数)18(10^18) //const ll MOD = 1e9 + 7; //1000000007で割った余りを聞かれたら使う //加算代入演算子は+= //int 2^31 10^9まで //intは10桁、long longは18桁、doubleは308桁、long double は4932桁 //10^10くらいまででdoubleは誤差が発生しちゃう。なるべく整数にすること //doubleからlong longにキャストするときは、+0.5で切り捨ての誤差を調整 //__int128()で128bit対応の整数(多倍長整数) //||は片方が成り立つとき int main() { int a, b, c; scanf("%d %d %d", &a, &b, &c); printf("%d\n", min(min(a, b) + c, a + b)) return 0; }
a.cc: In function 'int main()': a.cc:23:46: error: expected ';' before 'return' 23 | printf("%d\n", min(min(a, b) + c, a + b)) | ^ | ; 24 | return 0; | ~~~~~~
s179727910
p03671
C++
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; #define rep(i, c) for (int i = 0; i < (int)c; i++) #define all(v) v.begin(), v.end() using ll = long long; using P = pair<int, int>; //const int inf = 1e9; //1(1倍)e(指数)9(10^9) //const ll MX = 1e18; //1(1倍)e(指数)18(10^18) //const ll MOD = 1e9 + 7; //1000000007で割った余りを聞かれたら使う //加算代入演算子は+= //int 2^31 10^9まで //intは10桁、long longは18桁、doubleは308桁、long double は4932桁 //10^10くらいまででdoubleは誤差が発生しちゃう。なるべく整数にすること //doubleからlong longにキャストするときは、+0.5で切り捨ての誤差を調整 //__int128()で128bit対応の整数(多倍長整数) //||は片方が成り立つとき int main() { int a, b, c; scanf("%d %d %d", &a, &b, &c); printf("%d\n", min(a, b) + c, a + b) return 0; }
a.cc: In function 'int main()': a.cc:23:41: error: expected ';' before 'return' 23 | printf("%d\n", min(a, b) + c, a + b) | ^ | ; 24 | return 0; | ~~~~~~
s570905482
p03671
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner scanner = new Scanner(System.in); Integer A = scanner.nextInt(); Integer B = scanner.nextInt(); Integer C = scanner.nextInt(); Integer res1 = A + B; Integer res2 = A + C; Integer res3 = B + C; if(res1<res2) { if(res1<res3) { System.out.println(res1); }else { System.out.println(res3); } }else if (res2<res3) { System.out.println(res2); }else { System.out.println(res3S); } } }
Main.java:25: error: cannot find symbol System.out.println(res3S); ^ symbol: variable res3S location: class Main 1 error
s320874740
p03671
C++
a,b,c= map(int,input().split()) print(min(a+b, b+c, c+a))
a.cc:1:1: error: 'a' does not name a type 1 | a,b,c= map(int,input().split()) | ^
s787620302
p03671
C++
#include <bits/stdc++.h> #include <vector> using namespace std; int main(){ int s,b,c; cin>>s>>b>>c; int a[3]; a[0] = s; a[1] = b; a[2] = c; sort(a,a+n); cout<<a[0]+a[1]<<endl; return 0; }
a.cc: In function 'int main()': a.cc:17:11: error: 'n' was not declared in this scope 17 | sort(a,a+n); | ^
s450107143
p03671
C++
#include <bits/stdc++.h> #include <vector> using namespace std; int main(){ int a,b,c; cin>>s>>b>>c; int a[3]; a[0] = s; a[1] = b; a[2] = c; sort(a,a+n); cout<<a[0]+a[1]<<endl; return 0; }
a.cc: In function 'int main()': a.cc:10:7: error: 's' was not declared in this scope 10 | cin>>s>>b>>c; | ^ a.cc:12:6: error: conflicting declaration 'int a [3]' 12 | int a[3]; | ^ a.cc:8:6: note: previous declaration as 'int a' 8 | int a,b,c; | ^ a.cc:13:3: error: invalid types 'int[int]' for array subscript 13 | a[0] = s; | ^ a.cc:14:3: error: invalid types 'int[int]' for array subscript 14 | a[1] = b; | ^ a.cc:15:3: error: invalid types 'int[int]' for array subscript 15 | a[2] = c; | ^ a.cc:17:11: error: 'n' was not declared in this scope 17 | sort(a,a+n); | ^ a.cc:19:9: error: invalid types 'int[int]' for array subscript 19 | cout<<a[0]+a[1]<<endl; | ^ a.cc:19:14: error: invalid types 'int[int]' for array subscript 19 | cout<<a[0]+a[1]<<endl; | ^
s727197716
p03671
C++
#include <bits/stdc++.h> using namespace std; #ifndef ONLINE_JUDGE #include "debug.h" #endif int main() { ios::sync_with_stdio(false), cin.tie(0); vector<int> a(3); cin >> a[0] >> a[1] >> a[2]; sort(begin(a), end(a)); cout << a[0] + a[1] << '\n'; return 0; }
a.cc:5:12: fatal error: debug.h: No such file or directory 5 | #include "debug.h" | ^~~~~~~~~ compilation terminated.
s202024688
p03671
C++
#include <iostream> #include <vector> 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:26: 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
s893181747
p03671
C++
#include <bits/stdc++.h> #define rep(i,n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; int main() { int a, b, c; cin >> a >> b >> c; int ans = min({ a+b, b+c, c+a }) cout << ans << endl; return 0; }
a.cc: In function 'int main()': a.cc:15:3: error: expected ',' or ';' before 'cout' 15 | cout << ans << endl; | ^~~~
s022424330
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; 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::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]': a.cc:7:21: 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)) | ~~~~~~^~~~~~~~~~
s675444343
p03671
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b,c; cin >> a>>b>>c; cout <<a+b+c-min(a,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:7:21: required from here 7 | cout <<a+b+c-min(a,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)) | ~~~~~~^~~~~~~~~~
s031234744
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); }
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:6:16: required from here 6 | cout << min(a + b, b + c, c + a); | ~~~^~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function 284 | if (__comp(__b, __a)) | ~~~~~~^~~~~~~~~~
s465526299
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; }
a.cc: In function 'int main()': a.cc:7:29: error: expected ';' before 'endl' 7 | cout << min({a+b,b+c,c+a}) endl; | ^~~~~ | ;
s060358268
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:7:29: error: expected ';' before '}' token 7 | cout << min({a+b,b+c,c+a}) | ^ | ; 8 | } | ~
s730522759
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)) | ~~~~~~^~~~~~~~~~
s562521526
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:7:27: error: expected ';' before '}' token 7 | cout << min(a+b,b+c,c+a) | ^ | ; 8 | } | ~ 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) | ~~~^~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function 284 | if (__comp(__b, __a)) | ~~~~~~^~~~~~~~~~
s127469156
p03671
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; int ans=a+b+c-max({a,b,c})<<endl; }
a.cc: In function 'int main()': a.cc:7:29: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<' 7 | int ans=a+b+c-max({a,b,c})<<endl; | ~~~~~~~~~~~~~~~~~~^~~~~~
s749455528
p03671
C++
#include<iostream> #include<string> #include<algorithm> #include<vector> using namespace std; int main(){ int ,a,b,c; cin >> a >> b >> c; cout << max(max(a+b,a+c),b+c) << endl; }
a.cc: In function 'int main()': a.cc:8:9: error: expected unqualified-id before ',' token 8 | int ,a,b,c; | ^
s792312675
p03671
C
#include<stdio.h> int main(){ int a,b,c,p1,p2,p3; scanf("%d %d %d",&a,&b,&c); p1=a+b; p2=a+c; p3=b+c; if(p1<p2 && p1<p3){ printf("Buying any two bells costs %dyen.",p1); } else if(p2<p1 && p2<p3){ printf("Buying any two bells costs %dyen.",p2); } else{ printf("Buying any two bells costs %dyen.",p3); } return 0;
main.c: In function 'main': main.c:17:1: error: expected declaration or statement at end of input 17 | return 0; | ^~~~~~
s613351643
p03671
C++
#include <iostream> using namespace std; int main() { int arr[3],i; for( i = 0 ; i < 3 ; i++ ){ cin >> arr[i]; } sort(arr, arr+3); cout <<"Buying any two bells costs "<< arr[0]+arr[1] << " yen."; return 0; }
a.cc: In function 'int main()': a.cc:11:5: error: 'sort' was not declared in this scope; did you mean 'short'? 11 | sort(arr, arr+3); | ^~~~ | short
s353143919
p03671
C
#include <stdio.h> int main() { int a,b,c,d=0; scanf("%d %d %d",&a,&b,&c); if(a<b && a<c){ if(b<c){ d=a+b; } else d=a+c; } else if(b<a && b<c){ if(a<c){ d=b+a; } else d=b+c; } else if(c<a && c<b){ if(a<b){ d=c+a; } else d=c+b; } else if(c==a && c==b){ d=a+b; } else if(a==b && a!=c){ if(a<c){ d=a+b; } else d=c+b; } else if(b==c && a!=b){ if(a<b){ d=a+b; } else d=c+b; } else if(a==c && a!=b){ if(a<b){ d=a+c; } else d=a00+b; } printf("Buying any two bells costs %d yen.\n",d); return 0; }
main.c: In function 'main': main.c:53:16: error: 'a00' undeclared (first use in this function) 53 | else d=a00+b; | ^~~ main.c:53:16: note: each undeclared identifier is reported only once for each function it appears in
s083667097
p03671
C++
#include <bits/stdc++.h> using namespace std; int main() { vector<int> x(3); cin>>x.at(0)>>x.at(1)>>x.at(2); sort(x.begin(),x.end()); cout<<x.at(0)+x.at(a)<<endl; return 0; }
a.cc: In function 'int main()': a.cc:11:24: error: 'a' was not declared in this scope 11 | cout<<x.at(0)+x.at(a)<<endl; | ^
s179847610
p03671
C++
icase=0 if icase==0: a,b,c=map(int,input().split()) print(min(a+b,b+c,c+a))
a.cc:1:1: error: 'icase' does not name a type 1 | icase=0 | ^~~~~
s918578523
p03671
Java
import java.util.*; public class Main{ public static void main(String ...string){ Scanner sc = new Scanner(System.in); System.out.println(Math.max(a+b,Math.max(a+c,c+b))); } }
Main.java:5: error: cannot find symbol System.out.println(Math.max(a+b,Math.max(a+c,c+b))); ^ symbol: variable a location: class Main Main.java:5: error: cannot find symbol System.out.println(Math.max(a+b,Math.max(a+c,c+b))); ^ symbol: variable b location: class Main Main.java:5: error: cannot find symbol System.out.println(Math.max(a+b,Math.max(a+c,c+b))); ^ symbol: variable a location: class Main Main.java:5: error: cannot find symbol System.out.println(Math.max(a+b,Math.max(a+c,c+b))); ^ symbol: variable c location: class Main Main.java:5: error: cannot find symbol System.out.println(Math.max(a+b,Math.max(a+c,c+b))); ^ symbol: variable c location: class Main Main.java:5: error: cannot find symbol System.out.println(Math.max(a+b,Math.max(a+c,c+b))); ^ symbol: variable b location: class Main 6 errors
s598505460
p03671
C++
#include <bits/stdc++.h> using namespace std; int my_min(int a,int b,int c){ if(a<=b&&a<=c) cout<<a<<endl; else if(b<=c&&b<=a) cout<<b<<endl; else cout<<c<<endl; } int main(){ int a,b,c; cin>>a>>b>>c; cout<<my_min(a+b,b+c,c+a)<,endl; }
a.cc: In function 'int my_min(int, int, int)': a.cc:8:1: warning: no return statement in function returning non-void [-Wreturn-type] 8 | } | ^ a.cc: In function 'int main()': a.cc:12:29: error: expected primary-expression before ',' token 12 | cout<<my_min(a+b,b+c,c+a)<,endl; | ^
s852474777
p03671
C++
#include<iostream> #include<algorithm using namespace std; int main() { int a, b, c; cin >> a >> b >> c; int kingaku[3]; kingaku[0] = a + b; kingaku[1] = a + c; kingaku[2] = b + c; int ans = min({ kingaku[0],kingaku[1],kingaku[2] }); }
a.cc:2:19: error: missing terminating > character 2 | #include<algorithm | ^
s326459458
p03671
C++
#include <bits/stdc++.h> #define rep(i,n) for(int i = 0; i < n; i++) #include <vector> using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; int sum = a + b + c; cout << sum - max(a, 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::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]': a.cc:9:20: required from here 9 | cout << sum - 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)) | ~~~~~~^~~~~~~~~~
s427979167
p03671
C++
#include<iostream> #include<algorithm> int main(){ int a,b,c; cin>>a>>b>>c; cout<<min({a+b,a+c,c+b})<<endl; return 0; }
a.cc: In function 'int main()': a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | cin>>a>>b>>c; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:6:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 6 | cout<<min({a+b,a+c,c+b})<<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:9: error: 'min' was not declared in this scope; did you mean 'std::min'? 6 | cout<<min({a+b,a+c,c+b})<<endl; | ^~~ | std::min In file included from /usr/include/c++/14/algorithm:61, from a.cc:2: /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:6:29: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 6 | cout<<min({a+b,a+c,c+b})<<endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s943494052
p03671
C++
#nclude<iostream> #include<algorithm> int main(){ int a,b,c; cin>>a>>b>>c; cout<<min({a+b,a+c,c+b})<<ensl; return 0;
a.cc:1:2: error: invalid preprocessing directive #nclude; did you mean #include? 1 | #nclude<iostream> | ^~~~~~ | include a.cc: In function 'int main()': a.cc:5:3: error: 'cin' was not declared in this scope 5 | cin>>a>>b>>c; | ^~~ a.cc:6:3: error: 'cout' was not declared in this scope 6 | cout<<min({a+b,a+c,c+b})<<ensl; | ^~~~ a.cc:6:9: error: 'min' was not declared in this scope; did you mean 'std::min'? 6 | cout<<min({a+b,a+c,c+b})<<ensl; | ^~~ | std::min In file included from /usr/include/c++/14/algorithm:61, from a.cc:2: /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:6:29: error: 'ensl' was not declared in this scope 6 | cout<<min({a+b,a+c,c+b})<<ensl; | ^~~~ a.cc:7:12: error: expected '}' at end of input 7 | return 0; | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s127953148
p03671
C++
#include<iostream> using namespace std; int main(){ int a[3]; cin>>a[0]>>a[1]>>a[2]; sort(a,a+3); cout<<a[0]+a[1]<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: 'sort' was not declared in this scope; did you mean 'short'? 6 | sort(a,a+3); | ^~~~ | short
s138263638
p03671
C++
#include <bits/stdc++.h> using namespace std; int main(){ vector<int> a(3); for(int i=0; i<3; i++) cin>>a[i]; sort(a.begin(),a.end()); cout<<a[0]+a[1];
a.cc: In function 'int main()': a.cc:8:19: error: expected '}' at end of input 8 | cout<<a[0]+a[1]; | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s616268378
p03671
Java
import java.io.*; import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); PrintStream out = new PrintStream(System.out); int a. b, c, min; a = sc.nextInt(); b = sc.nextInt(); c = sc.nextInt(); min = a + b; if (min > a + c) { min = a + c; } if (min > b + c) { min = b + c; } out.println(min); sc.close(); } }
Main.java:9: error: ';' expected int a. b, c, min; ^ Main.java:9: error: not a statement int a. b, c, min; ^ Main.java:9: error: ';' expected int a. b, c, min; ^ Main.java:9: error: not a statement int a. b, c, min; ^ Main.java:9: error: ';' expected int a. b, c, min; ^ Main.java:9: error: not a statement int a. b, c, min; ^ 6 errors
s012140241
p03671
Java
import java.io.*; import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); PrintStream out = new PrintStream(System.out); int a. b, c, min; a = sc.nextInt(); b = sc.nextInt(); c = sc.nextInt(); min = a + b; if (min > a + c) { min = a + c; } if (min > b + c) { min = b + c; } sc.close(); } }
Main.java:9: error: ';' expected int a. b, c, min; ^ Main.java:9: error: not a statement int a. b, c, min; ^ Main.java:9: error: ';' expected int a. b, c, min; ^ Main.java:9: error: not a statement int a. b, c, min; ^ Main.java:9: error: ';' expected int a. b, c, min; ^ Main.java:9: error: not a statement int a. b, c, min; ^ 6 errors
s129641049
p03671
C++
#include<bits/stdc++.h> using namespace std; int main() { int a,b,c; int all,biggest,ans; cin>>a>>b>>c; all=a+b+c; biggest=max(a,max(b,c)); ans=all-biggest; cout<<ans<<endl; retirn 0; }
a.cc: In function 'int main()': a.cc:12:5: error: 'retirn' was not declared in this scope 12 | retirn 0; | ^~~~~~
s080590904
p03671
C++
#include<iostream> #include<queue> using namespace std; struct Node{ int x; bool operator < (const Node & a) const{ return x>a.x; } }; priority_queue <Node> q; int main(){ int t=3; while(t--){ int i; cin>>i; Node now; now.x=i q.push(now); } int ans=0; ans+=q.top(); q.pop(); ans+=q.top(); cout<<ans; return 0; }
a.cc: In function 'int main()': a.cc:17:16: error: expected ';' before 'q' 17 | now.x=i | ^ | ; 18 | q.push(now); | ~ a.cc:21:8: error: no match for 'operator+=' (operand types are 'int' and 'const __gnu_cxx::__alloc_traits<std::allocator<Node>, Node>::value_type' {aka 'const Node'}) 21 | ans+=q.top(); | ~~~^~~~~~~~~ a.cc:23:8: error: no match for 'operator+=' (operand types are 'int' and 'const __gnu_cxx::__alloc_traits<std::allocator<Node>, Node>::value_type' {aka 'const Node'}) 23 | ans+=q.top(); | ~~~^~~~~~~~~
s803144944
p03671
C++
#include<iostream> #include<queue> using namespace std; struct Node{ int x; bool operator < (const Node & a) const{ return x>a.x; } } priority_queue <Node> q; int main(){ int t=3; while(t--){ int i; cin>>i; Node now; now.x=i q.push(now); } int ans=0; ans+=q.top(); q.pop(); ans+=q.top(); cout<<ans; return 0; }
a.cc:10:23: error: invalid declarator before 'q' 10 | priority_queue <Node> q; | ^ a.cc: In function 'int main()': a.cc:17:16: error: expected ';' before 'q' 17 | now.x=i | ^ | ; 18 | q.push(now); | ~ a.cc:21:10: error: 'q' was not declared in this scope 21 | ans+=q.top(); | ^
s629986324
p03671
C++
#include <iostream> #include <cstdio> using namespace std; int main(){ int a[3]; for(int i = 0; i < 3; i++) sacnf("%d", &a[i]); sort(a, a + 3); printf("%d", a[0] + a[1]); return 0; }
a.cc: In function 'int main()': a.cc:10:32: error: 'sacnf' was not declared in this scope; did you mean 'scanf'? 10 | for(int i = 0; i < 3; i++) sacnf("%d", &a[i]); | ^~~~~ | scanf a.cc:12:5: error: 'sort' was not declared in this scope; did you mean 'short'? 12 | sort(a, a + 3); | ^~~~ | short
s093946905
p03671
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int a = scanner.nextInt(); int b = scanner.nextInt(); int c = scanner.nextInt(); int sum = a+ b ; if(sum < a+c){ sum = a+c; } if(sum < b+c){ sum = b + c: } System.out.println(sum); } }
Main.java:15: error: ';' expected sum = b + c: ^ 1 error
s878671233
p03671
C++
#include <bits/stdc++.h> using namespace std; int main(void){ int a,b,c cin>>a>>b>>c; cout<<min(min(a+b,a+c),b+c)<<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:3: error: expected initializer before 'cin' 8 | cin>>a>>b>>c; | ^~~ a.cc:9:23: error: 'c' was not declared in this scope 9 | cout<<min(min(a+b,a+c),b+c)<<endl; | ^
s969518457
p03671
C++
#include<iostream> using namespace std; int main(void) { int a,b,c; cin>>a>>b>>c; int sum1=a+b,sum2=b+c,sum3=c+a; int min=sum1; if(min>sum2){min=sum2;} if(min>sum3){min=sum3;} cout<<min>>endl; return 0; }
a.cc: In function 'int main()': a.cc:15:12: error: no match for 'operator>>' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 15 | cout<<min>>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:15:14: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>' 15 | cout<<min>>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:15:14: note: couldn't deduce template parameter '_IntegerType' 15 | cout<<min>>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:15:14: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>' 15 | cout<<min>>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:15:14: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>' 15 | cout<<min>>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:15:14: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>' 15 | cout<<min>>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:15:14: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>' 15 | cout<<min>>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:15:14: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>' 15 | cout<<min>>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:15:14: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>' 15 | cout<<min>>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:15:14: note: couldn't deduce template parameter '_Tp' 15 | cout<<min>>endl; | ^~~~
s483611969
p03671
C++
#include <bits/stdc++.h> using namespace std; #define REP(i,n) for(int i=0; i<(n); i++) #define REP2(i,x,n) for(int i=x; i<(n); i++) int main() { int a, b, c; cin >> a>>b>>c; ans = a+b+c; ans = min(ans, a+b); ans = min(ans, c+b); ans = min(ans, a+c); cout << ans<< endl; return 0; }
a.cc: In function 'int main()': a.cc:10:5: error: 'ans' was not declared in this scope; did you mean 'abs'? 10 | ans = a+b+c; | ^~~ | abs
s329611231
p03671
C++
#include <bits/stdc++.h> using namespace std; #define REP(i,n) for(int i=0; i<(n); i++) #define REP2(i,x,n) for(int i=x; i<(n); i++) int main() { int A, B, C; cin >> A>>B>>C; ans = 0; ans = min(ans, a+b); ans = min(ans, c+b); ans = min(ans, a+c); cout << ans<< endl; return 0; }
a.cc: In function 'int main()': a.cc:10:5: error: 'ans' was not declared in this scope; did you mean 'abs'? 10 | ans = 0; | ^~~ | abs a.cc:11:20: error: 'a' was not declared in this scope 11 | ans = min(ans, a+b); | ^ a.cc:11:22: error: 'b' was not declared in this scope 11 | ans = min(ans, a+b); | ^ a.cc:12:20: error: 'c' was not declared in this scope 12 | ans = min(ans, c+b); | ^
s353641059
p03671
C
#include <stdio.h> int main(void){ int a,b,c; scanf("%d%d%d",&a,&b,&c); if((a>b)&&(a>c)){ printf("%d",b+c); }else if((b>c)&&(b>a)){ printf("%d",a+c); }else{ printf("%d",a+b); return 0; }
main.c: In function 'main': main.c:12:1: error: expected declaration or statement at end of input 12 | } | ^
s516519385
p03671
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll gcd(ll a, ll b) { if (b==0) return a; else{ return gcd(b,a%b); } } int main() { vector<ll> v(3); cin >> v[0] >> v[1] >> v[2]; sort(v.begin(), v.end()); cout << v[0]+v[1] << endl; } }
a.cc:17:1: error: expected declaration before '}' token 17 | } | ^
s382871466
p03671
C++
#include<bits/stdc++.h> using namespace std; int main(){ vector<int> vec(N); for (int i=0; i<3; i++){ cin >> vec.at(i); } sort(vec.begin(),vec.end()); cout << vec.at(0)+vec.at(1) << endl; }
a.cc: In function 'int main()': a.cc:5:19: error: 'N' was not declared in this scope 5 | vector<int> vec(N); | ^
s306361710
p03671
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using vi = vector<int>; using vll = vector<ll>; const int INF = 1e9; const ll INFLL = 1e18; const int MOD = 1e9 + 7; const int NIL = -1; #define rep(i,n) for(int i=0; i<(n); ++i) #define all(n) begin(n),end(n) template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; } template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; } #define DEBUG int main() { ios::sync_with_stdio(false); cin.tie(0); int a,b,c; cin >> a >> b >> c; int ab = a + b; int bc = b + c; int ac = a + c; cout << min(ab, bc, ac) << 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:32:13: required from here 32 | cout << min(ab, bc, ac) << endl; | ~~~^~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function 284 | if (__comp(__b, __a)) | ~~~~~~^~~~~~~~~~
s757010066
p03671
C++
#include <bits/stdc++.h> using namespace std; int main() { int A, B, C; cin >> A >> B >> C; int max = max({A, B, C}); cout << A + B + C - max << endl; }
a.cc: In function 'int main()': a.cc:8:22: error: 'max' cannot be used as a function 8 | int max = max({A, B, C}); | ~~~^~~~~~~~~~~
s147918882
p03671
C++
//#define _GLIBCXX_DEBUG #include<bits/stdc++.h> using namespace std; const int INF= 1e9+5; typedef long long ll; int main(){ int a,b,c; cin>>a>>b>>c; cout<<min{a+b,b+c,c+a}<<endl; }
a.cc: In function 'int main()': a.cc:11:7: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '<unresolved overloaded function type>') 11 | cout<<min{a+b,b+c,c+a}<<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:3: /usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'} 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]' 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ^~~~~~~~ /usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 174 | operator<<(long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long int' 174 | operator<<(long __n) | ~~~~~^~~ /usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 178 | operator<<(unsigned long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long unsigned int' 178 | operator<<(unsigned long __n) | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 182 | operator<<(bool __n) | ^~~~~~~~ /usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool' 182 | operator<<(bool __n) | ~~~~~^~~ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]' 96 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int' 97 | operator<<(short __n) | ~~~~~~^~~ /usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 189 | operator<<(unsigned short __n) | ^~~~~~~~ /usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short unsigned int' 189 | operator<<(unsigned short __n) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]' 110 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int' 111 | operator<<(int __n) | ~~~~^~~ /usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 200 | operator<<(unsigned int __n) | ^~~~~~~~ /usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'unsigned int' 200 | operator<<(unsigned int __n) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 211 | operator<<(long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int' 211 | operator<<(long long __n) | ~~~~~~~~~~^~~ /usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 215 | operator<<(unsigned long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long unsigned int' 215 | operator<<(unsigned long long __n) | ~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 231 | operator<<(double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:231:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'double' 231 | operator<<(double __f) | ~~~~~~~^~~ /usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 235 | operator<<(float __f) | ^~~~~~~~ /usr/include/c++/14/ostream:235:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float' 235 | operator<<(float __f) | ~~~~~~^~~ /usr/include/c++/14/ostream:243:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 243 | operator<<(long double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:243:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long double' 243 | operator<<(long double __f) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:301:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 301 | operator<<(const void* __p) | ^~~~~~~~ /usr/include/c++/14/ostream:301:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const void*' 301 | operator<<(const void* __p) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:306:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::nullptr_t) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; std::nullptr_t = std::nullptr
s899979190
p03671
C++
#include <bits/stdc++.h> #define fuck(n,m) sort(n,m) #define sb int #define shi cin #define shabi cout #define zhizhang endl #define shit 0 #define eat return using namespace std; sb you[3]; sb main() { shi>>you[0]>>you[1]>>you[2]; sb* bitch=you+2; fuck(you,bitch); shabi<<you[0]+you[1]<<zhizhng; eat shit; }
a.cc: In function 'int main()': a.cc:16:27: error: 'zhizhng' was not declared in this scope; did you mean 'zhizhang'? 16 | shabi<<you[0]+you[1]<<zhizhng; | ^~~~~~~ | zhizhang
s976548787
p03671
C++
#include <bits/stdc++.h> #define fuck(n,m) sort(n,m) #define sb int #define shi cin #define shabi cout #define zhizhang endl #define shit 0 #define eat return using namespace std; sb you[3]; sb main() { shi>>you[0]>>you[i]>>you[2]; sb bitch=you+2; fuck(you,bitch); shabi<<you[0]+you[1]<<zhizhng; eat shit; }
a.cc: In function 'int main()': a.cc:13:22: error: 'i' was not declared in this scope 13 | shi>>you[0]>>you[i]>>you[2]; | ^ a.cc:14:17: error: invalid conversion from 'int*' to 'int' [-fpermissive] 14 | sb bitch=you+2; | ~~~^~ | | | int* a.cc:2:23: error: no matching function for call to 'sort(int [3], int&)' 2 | #define fuck(n,m) sort(n,m) | ~~~~^~~~~ a.cc:15:5: note: in expansion of macro 'fuck' 15 | fuck(you,bitch); | ^~~~ In file included from /usr/include/c++/14/algorithm:61, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algo.h:4762:5: note: candidate: 'template<class _RAIter> void std::sort(_RAIter, _RAIter)' 4762 | sort(_RandomAccessIterator __first, _RandomAccessIterator __last) | ^~~~ /usr/include/c++/14/bits/stl_algo.h:4762:5: note: template argument deduction/substitution failed: a.cc:2:23: note: deduced conflicting types for parameter '_RAIter' ('int*' and 'int') 2 | #define fuck(n,m) sort(n,m) | ~~~~^~~~~ a.cc:15:5: note: in expansion of macro 'fuck' 15 | fuck(you,bitch); | ^~~~ /usr/include/c++/14/bits/stl_algo.h:4793:5: note: candidate: 'template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)' 4793 | sort(_RandomAccessIterator __first, _RandomAccessIterator __last, | ^~~~ /usr/include/c++/14/bits/stl_algo.h:4793:5: note: candidate expects 3 arguments, 2 provided In file included from /usr/include/c++/14/algorithm:86: /usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare)' 292 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp); | ^~~~ /usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note: candidate expects 4 arguments, 2 provided /usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator)' 296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last); | ^~~~ /usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: candidate expects 3 arguments, 2 provided a.cc:16:27: error: 'zhizhng' was not declared in this scope; did you mean 'zhizhang'? 16 | shabi<<you[0]+you[1]<<zhizhng; | ^~~~~~~ | zhizhang
s178289162
p03671
C++
int main() { cout << "ce" << endl; return 0; }
a.cc: In function 'int main()': a.cc:3:5: error: 'cout' was not declared in this scope 3 | cout << "ce" << endl; | ^~~~ a.cc:3:21: error: 'endl' was not declared in this scope 3 | cout << "ce" << endl; | ^~~~
s536251211
p03671
C++
#include<bits/sdtc++.h> using namespace std; int main(){ int s[4]; cin>>s[1]>>s[2]>>s[3]; sort(s+1,s+1+3); cout<<s[1]+s[2]; }
a.cc:1:9: fatal error: bits/sdtc++.h: No such file or directory 1 | #include<bits/sdtc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s200707994
p03671
C++
#include<bits/stdc++.h> using namespace std; int a,b,c,ab,ac,bc; int main() { cin>>a>>b>>c; ab=a+b; ac=a+c; ba=b+c; cout<<min(ab,min(ac,bc))<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:5: error: 'ba' was not declared in this scope; did you mean 'bc'? 9 | ba=b+c; | ^~ | bc
s660254161
p03671
C++
#include<bits/stdc++.h> using namespace std; int a,b,c; int main() { cin>>a>>b>>c; if((a<=b&&b<=c)||b<=a&&a<=c))cout<<a+b; else if((a<=b&&c<=b)||(c<=a&&a<=b))cout<<a+c; else cout<<c+b; return 0; }
a.cc: In function 'int main()': a.cc:8:33: error: expected primary-expression before ')' token 8 | if((a<=b&&b<=c)||b<=a&&a<=c))cout<<a+b; | ^
s703610026
p03671
C++
#include <bits/stdc++.h> using namespace std; int main(){ string S; cin >> S; if(S.length()==4){ cout<<2<<endl: return 0; } for(int i=2;i<S.length()+1;i=i+2){ S=S.erase(S.length()-2); if(S.substr(S.length()/2)==S.substr(0,S.length()/2)){ cout<<S.length()<<endl; return 0; } } return 0; }
a.cc: In function 'int main()': a.cc:8:18: error: expected ';' before ':' token 8 | cout<<2<<endl: | ^ | ;
s001037937
p03671
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { int a,b,c; cin >> a >> b >> c; cout << min([a+b,b+c,a+c]) << endl; }
a.cc: In function 'int main()': a.cc:9:17: error: expected ',' before '+' token 9 | cout << min([a+b,b+c,a+c]) << endl; | ^ | , a.cc:9:17: error: expected identifier before '+' token a.cc:9:19: error: expected ']' before ',' token 9 | cout << min([a+b,b+c,a+c]) << endl; | ^ | ] a.cc: In lambda function: a.cc:9:19: error: expected '{' before ',' token a.cc: In function 'int main()': a.cc:9:27: error: expected ')' before ']' token 9 | cout << min([a+b,b+c,a+c]) << endl; | ~ ^ | )
s739004344
p03671
C++
#include<iostream> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; if(a<b&&c<b){cout<<a+b;return 0;} if(b<a&&c<a){cout<<b+c;return 0;} if(a<c&&b<c){cout<<a+b;return 0;}
a.cc: In function 'int main()': a.cc:8:36: error: expected '}' at end of input 8 | if(a<c&&b<c){cout<<a+b;return 0;} | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s440857123
p03671
C++
#include <bits/stdc++.h> #define rep(i, n) for(int i = 0; i < n; i++) using namespace std; int main() { int a, b, c; cin >> n >> m; if(a >= b && a >= c) cout << b + c << endl; else if(b >= c && b >= a) cout << c + a << endl; else if(c >= a && c >= b) cout << a + b << endl; }
a.cc: In function 'int main()': a.cc:7:12: error: 'n' was not declared in this scope 7 | cin >> n >> m; | ^ a.cc:7:17: error: 'm' was not declared in this scope 7 | cin >> n >> m; | ^
s276911635
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:16: 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)) | ~~~~~~^~~~~~~~~~
s391137043
p03671
C++
#include <algorithm> #include <iostream> using namespace std; int main() { int bell[3]; for (auto & b : bell) cin >> bell; sort(bell, bell + 3); cout << bell[0] + bell[1]; return 0; }
a.cc: In function 'int main()': a.cc:10:9: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int [3]') 10 | cin >> bell; | ~~~ ^~ ~~~~ | | | | | int [3] | std::istream {aka std::basic_istream<char>} In file included from /usr/include/c++/14/iostream:42, from a.cc:3: /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:10:12: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type 'int*' 10 | cin >> bell; | ^~~~ /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:10:12: error: invalid conversion from 'int*' to 'short int' [-fpermissive] 10 | cin >> bell; | ^~~~ | | | int* a.cc:10:12: error: cannot bind rvalue '(short int)((int*)(& bell))' 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:10:12: error: invalid conversion from 'int*' to 'short unsigned int' [-fpermissive] 10 | cin >> bell; | ^~~~ | | | int* a.cc:10:12: error: cannot bind rvalue '(short unsigned int)((int*)(& bell))' 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:10:12: error: invalid conversion from 'int*' to 'int' [-fpermissive] 10 | cin >> bell; | ^~~~ | | | int* a.cc:10:12: error: cannot bind rvalue '(int)((int*)(& bell))' 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:10:12: error: invalid conversion from 'int*' to 'unsigned int' [-fpermissive] 10 | cin >> bell; | ^~~~ | | | int* a.cc:10:12: error: cannot bind rvalue '(unsigned int)((int*)(& bell))' 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:10:12: error: invalid conversion from 'int*' to 'long int' [-fpermissive] 10 | cin >> bell; | ^~~~ | | | int* a.cc:10:12: error: cannot bind rvalue '(long int)((int*)(& bell))' 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:10:12: error: invalid conversion from 'int*' to 'long unsigned int' [-fpermissive] 10 | cin >> bell; | ^~~~ | | | int* a.cc:10:12: error: cannot bind rvalue '(long unsigned int)((int*)(& bell))' 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:10:12: error: invalid conversion from 'int*' to 'long long int' [-fpermissive] 10 | cin >> bell; | ^~~~ | | | int* a.cc:10:12: error: cannot bind rvalue '(long long int)((int*)(& bell))' 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:10:12: error: invalid conversion from 'int*' to 'long long unsigned int' [-fpermissive] 10 | cin >> bell; | ^~~~ | | | int* a.cc:10:12: error: cannot bind rvalue '(long long unsigned int)((int*)(& bell))' 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:10:12: error: cannot bind non-const lvalue reference of type 'void*&' to an rvalue of type 'void*' 10 | cin >> bell; | ^~~~ /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_istr
s207514450
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,a+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::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]': a.cc:8:11: required from here 8 | cout<<min(a+b,b+c,a+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)) | ~~~~~~^~~~~~~~~~
s660891027
p03671
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<n;i++) #define rep1(i,n) for(int i=1;i<=n;i++) typedef long long ll; int main(){ int d[3] = {0}; rep(i,3){ cin >> d[i]; } sort(d.begin(),d.end()); cout << d[0]+d[1] << endl; }
a.cc: In function 'int main()': a.cc:13:10: error: request for member 'begin' in 'd', which is of non-class type 'int [3]' 13 | sort(d.begin(),d.end()); | ^~~~~ a.cc:13:20: error: request for member 'end' in 'd', which is of non-class type 'int [3]' 13 | sort(d.begin(),d.end()); | ^~~
s201541432
p03671
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<n;i++) #define rep1(i,n) for(int i=1;i<=n;i++) typedef long long ll; int main(){ int d[3] = {0}; rep(i,3){ cin >> d[i]; } sort(d.bign(),d.end()); cout << d[0]+d[1] << endl; }
a.cc: In function 'int main()': a.cc:13:10: error: request for member 'bign' in 'd', which is of non-class type 'int [3]' 13 | sort(d.bign(),d.end()); | ^~~~ a.cc:13:19: error: request for member 'end' in 'd', which is of non-class type 'int [3]' 13 | sort(d.bign(),d.end()); | ^~~
s299135033
p03671
C++
a,b,c=map(int,input().split()) ans=min(a+b,b+c,c+a) print(ans)
a.cc:1:1: error: 'a' does not name a type 1 | a,b,c=map(int,input().split()) | ^
s605227686
p03671
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a[3]; cin >> a[0] >> a[1] >> a[2]; sort(a, a+n); int ans = a[0] + a[1]; cout << ans << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:13: error: 'n' was not declared in this scope 8 | sort(a, a+n); | ^
s858450951
p03671
C++
#include <iostream> #include <vector> using namespace std; int main(void){ vector<int> a(3); cin >> a[0] >> a[1] >> a[2]; sort(a.begin(), a.end()); cout << a[0]+a[1] << endl; return 0; }
a.cc: In function 'int main()': a.cc:10:3: error: 'sort' was not declared in this scope; did you mean 'short'? 10 | sort(a.begin(), a.end()); | ^~~~ | short
s994936496
p03671
C++
#include<bits/stdc++.h> using namespace std; //size_t f = string::npos //make pair int main(){ int a,b,c;cin >> a >> b >> c; cout < a + b + c - max(a, max(b, c)); }
a.cc: In function 'int main()': a.cc:8:12: error: no match for 'operator<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int') 8 | cout < a + b + c - max(a, max(b, c)); | ~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | int | std::ostream {aka std::basic_ostream<char>} a.cc:8:12: note: candidate: 'operator<(int, int)' (built-in) 8 | cout < a + b + c - max(a, max(b, c)); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:8:12: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int' In file included from /usr/include/c++/14/regex:68, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181, from a.cc:1: /usr/include/c++/14/bits/regex.h:1143:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1143 | operator<(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1143:5: note: template argument deduction/substitution failed: a.cc:8:42: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 8 | cout < a + b + c - max(a, max(b, c)); | ^ /usr/include/c++/14/bits/regex.h:1224:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)' 1224 | operator<(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1224:5: note: template argument deduction/substitution failed: a.cc:8:42: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' 8 | cout < a + b + c - max(a, max(b, c)); | ^ /usr/include/c++/14/bits/regex.h:1317:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)' 1317 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1317:5: note: template argument deduction/substitution failed: a.cc:8:42: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 8 | cout < a + b + c - max(a, max(b, c)); | ^ /usr/include/c++/14/bits/regex.h:1391:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1391 | operator<(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1391:5: note: template argument deduction/substitution failed: a.cc:8:42: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 8 | cout < a + b + c - max(a, max(b, c)); | ^ /usr/include/c++/14/bits/regex.h:1485:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1485 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1485:5: note: template argument deduction/substitution failed: a.cc:8:42: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 8 | cout < a + b + c - max(a, max(b, c)); | ^ /usr/include/c++/14/bits/regex.h:1560:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1560 | operator<(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1560:5: note: template argument deduction/substitution failed: a.cc:8:42: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 8 | cout < a + b + c - max(a, max(b, c)); | ^ /usr/include/c++/14/bits/regex.h:1660:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1660 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1660:5: note: template argument deduction/substitution failed: a.cc:8:42: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 8 | cout < a + b + c - max(a, max(b, c)); | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51: /usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed: a.cc:8:42: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::pair<_T1, _T2>' 8 | cout < a + b + c - max(a, max(b, c)); | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 448 | operator<(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed: a.cc:8:42: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 8 | cout < a + b + c - max(a, max(b, c)); | ^ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 493 | operator<(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed: a.cc:8:42: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 8 | cout < a + b + c - max(a, max(b, c)); | ^ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1694 | operator<(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed: a.cc:8:42: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 8 | cout < a + b + c - max(a, max(b, c)); | ^ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1760 | operator<(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed: a.cc:8:42: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 8 | cout < a + b + c - max(a, max(b, c)); | ^ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 673 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed: a.cc:8:42: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 8 | cout < a + b + c - max(a, max(b, c)); | ^ /usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 680 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed: a.cc:8:42: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 8 | cout < a + b + c - max(a, max(b, c)); | ^ /usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)' 688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /
s007289842
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)) | ~~~~~~^~~~~~~~~~
s464990846
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:6:14: required from here 6 | 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)) | ~~~~~~^~~~~~~~~~
s323630125
p03671
C++
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define repe(i, n) for (int i = 0; i <= (n); ++i) #define all(x) (x).begin(),(x).end() using namespace std; template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; } template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; } typedef long long ll; const int INF = 1e9; const ll mod = 1000000007; int gcd(int a,int b){return b?gcd(b,a%b):a;} int main() { int a,b,c; cin >> a >> b >> c; cout << min(a+b, min(b+c a+c)) << "\n"; }
a.cc: In function 'int main()': a.cc:16:29: error: expected ')' before 'a' 16 | cout << min(a+b, min(b+c a+c)) << "\n"; | ~ ^~ | ) a.cc:16:25: error: no matching function for call to 'min(int)' 16 | cout << min(a+b, min(b+c a+c)) << "\n"; | ~~~^~~~~~ 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:16:25: note: mismatched types 'std::initializer_list<_Tp>' and 'int' 16 | cout << min(a+b, min(b+c a+c)) << "\n"; | ~~~^~~~~~ /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
s422035369
p03671
C++
#include <iostream> using namespace std; int main(int argc, const char * argv[]) { int input [3]; int x = 0; int n = 0; int m = 0; //ringring -- work for (int i = 0; i< 3; i++){ cin>> input[i]; } //find greatest for (int i = 0; i< 3; i++){ if (input[i]>=n){ n = input[i]; m = i; } } //add other two for (int i = 0; i< 3; i++){ if (i == m){ continue; } else { x+= input[i]; } } cout << x;
a.cc: In function 'int main(int, const char**)': a.cc:28:15: error: expected '}' at end of input 28 | cout << x; | ^ a.cc:3:41: note: to match this '{' 3 | int main(int argc, const char * argv[]) { | ^
s030686577
p03671
C++
using ll=long long; void solve(){ vector<int > a(3); for(int i=0; i<3; i++)cin>>a[i]; sort(a.begin(), a.end()); cout<<a[0]+a[1]<<endl; } signed main(){ //while(1) solve(); }
a.cc: In function 'void solve()': a.cc:6:5: error: 'vector' was not declared in this scope 6 | vector<int > a(3); | ^~~~~~ a.cc:6:12: error: expected primary-expression before 'int' 6 | vector<int > a(3); | ^~~ a.cc:7:27: error: 'cin' was not declared in this scope 7 | for(int i=0; i<3; i++)cin>>a[i]; | ^~~ a.cc:7:32: error: 'a' was not declared in this scope 7 | for(int i=0; i<3; i++)cin>>a[i]; | ^ a.cc:8:10: error: 'a' was not declared in this scope 8 | sort(a.begin(), a.end()); | ^ a.cc:8:5: error: 'sort' was not declared in this scope; did you mean 'short'? 8 | sort(a.begin(), a.end()); | ^~~~ | short a.cc:9:5: error: 'cout' was not declared in this scope 9 | cout<<a[0]+a[1]<<endl; | ^~~~ a.cc:9:22: error: 'endl' was not declared in this scope 9 | cout<<a[0]+a[1]<<endl; | ^~~~
s087242536
p03671
C++
#include<iostream> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; if(a<=b&&b<=c){ cout<<a+b<<endl; } else if(c<=b&&b<=a){ cout<<c+b<<endl; } else if(c<=a&&a<=b){ cout<<c+a<<endl; } else if(b<=a&&a<=c){ cout<<b1+a<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:24:11: error: 'b1' was not declared in this scope; did you mean 'b'? 24 | cout<<b1+a<<endl; | ^~ | b
s449314338
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; }
a.cc: In function 'int main()': a.cc:7:34: error: expected ')' before '<<' token 7 | cout << A + B + C - max({A,B,C} << endl; | ~ ^~~ | )
s284100814
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; }
a.cc: In function 'int main()': a.cc:7:31: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<' 7 | cout << (A+B+C-max({A,B,C}) << endl; | ~~~~~~~~~~~~~~~~~~~^~~~~~~ a.cc:7:38: error: expected ')' before ';' token 7 | cout << (A+B+C-max({A,B,C}) << endl; | ~ ^ | )
s781132499
p03671
C++
#include<iostream> usingnamespace std; int main() { int a, b, c; cin >> a >> b >> c; cout<<a+b+c-max(max(a,b),max(b,c))<<endl; return 0; }
a.cc:2:1: error: 'usingnamespace' does not name a type 2 | usingnamespace std; | ^~~~~~~~~~~~~~ a.cc: In function 'int main()': a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin >> a >> b >> c; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:7:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 7 | cout<<a+b+c-max(max(a,b),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:7:19: error: 'max' was not declared in this scope; did you mean 'std::max'? 7 | cout<<a+b+c-max(max(a,b),max(b,c))<<endl; | ^~~ | std::max 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: /usr/include/c++/14/bits/stl_algobase.h:303:5: note: 'std::max' declared here 303 | max(const _Tp& __a, const _Tp& __b, _Compare __comp) | ^~~ a.cc:7:15: error: 'max' was not declared in this scope; did you mean 'std::max'? 7 | cout<<a+b+c-max(max(a,b),max(b,c))<<endl; | ^~~ | std::max /usr/include/c++/14/bits/stl_algobase.h:303:5: note: 'std::max' declared here 303 | max(const _Tp& __a, const _Tp& __b, _Compare __comp) | ^~~ a.cc:7:39: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 7 | cout<<a+b+c-max(max(a,b),max(b,c))<<endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~