submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s043364349
p03671
C++
#include <bits/stdc++.h> using namespace std; #define all(x) (x).begin(),(x).end() #define Sort(x) sort((x).begin(), (x).end()) #define Reverse(x) reverse((x).begin(), (x).end()) #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define REP(i, m, n) for(int i = m; i < n; i++) #define INF INT_MAX #define MOD 1000000007 #define fcout cout << fixed << setprecision(15) //15桁まで表示 #define str string typedef std::pair<int,int> pii; typedef long long ll; typedef unsigned long long ull; typedef unsigned int ui; typedef pair<ui,ui> puu; typedef pair<int, int> P; typedef vector<int> vi; typedef vector<str> vs; int gcd(int a,int b){return b?gcd(b,a%b):a;}; int lcm(int a,int b){return a * b / gcd(a, b);}; int floor(int a,int b){return (a+b-1)/b;}; int month[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; template<class T>inline bool chmax(T& a,T b){if(a < b){a=b;return true;}return false;}; template<class T>inline bool chmin(T& a,T b){if(a > b){a=b;return true;}return false;}; 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:30:16: required from here 30 | 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)) | ~~~~~~^~~~~~~~~~
s152549598
p03671
C++
#include<bits/stdc++.h> #define rep(i,n) for(int i = 0; i < (n); i++) #define ll long long using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; valarray<int, 3> p = {a+b, b+c, a+c}; cout<<p.min(); return 0; }
a.cc: In function 'int main()': a.cc:12:18: error: wrong number of template arguments (2, should be 1) 12 | valarray<int, 3> p = {a+b, b+c, a+c}; | ^ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52, from a.cc:1: /usr/include/c++/14/bits/range_access.h:111:32: note: provided for 'template<class _Tp> class std::valarray' 111 | template<typename _Tp> class valarray; | ^~~~~~~~ a.cc:12:20: error: scalar object 'p' requires one element in initializer 12 | valarray<int, 3> p = {a+b, b+c, a+c}; | ^
s435155658
p03671
C++
#include<bits/stdc++.h> #define rep(i,n) for(int i = 0; i < (n); i++) #define ll long long using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; array<int, 3> p = {a+b, b+c, a+c}; cout<<p.min(); return 0; }
a.cc: In function 'int main()': a.cc:13:11: error: 'struct std::array<int, 3>' has no member named 'min' 13 | cout<<p.min(); | ^~~
s648689443
p03671
C++
#include <stdlib.h> #include <bits/stdc++.h> #include <math.h> using namespace std; using ll=long long; #define rep(i, n) for (int i = 0; i < (int)(n); i++) inline constexpr ll gcd(ll a,ll b){if(!a||!b)return 0;while(b){ll c=b;b=a%b;a=c;}return a;} inline constexpr ll lcm(ll a,ll b){if(!a||!b)return 0;return a*b/gcd(a,b);} int main() { long long 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:2: /usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = long long int; _Compare = long long int]': a.cc:13:12: required from here 13 | 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)) | ~~~~~~^~~~~~~~~~
s630705549
p03671
C++
#include<bits/stdc++.h> #include<bitset> using namespace std; #define M 1000000007 #define pb push_back #define f first #define s second #define rep(i, st, ed) for(int i=st; i<ed; i++) #define repn(si, st, ed) for(int i=st; i<=ed; i++) #define repb(i, ed, st) for(int i=ed; i>=st; i--) typedef long long ll; typedef unsigned long long int llt; typedef long double ld; const long double PI =3.141592653589793238463; const int N = 5e5 + 10; const ll INF = 1LL << 60; template<class T> void chmax(T &a,T b) { if (a<b) a=b;} template<class T> void chmin(T &a,T b) { if (a>b) a=b;} vector<int> g[N]; bool viss[N]; int vis[N]; // Normal DFS void dfs(int curr, int par) { for(auto x: g[curr]) if(x != par) dfs(x, curr); } // DFS with visiting status void dfs1(int curr, int par) { viss[curr] = 1; for(auto x: g[curr]) if(!viss[x]) dfs1(x, curr); } // DFS with strongly connected component void dfs2(int curr, int par, int num) { vis[curr] = num; for(auto x: g[curr]) if(vis[x] == 0) dfs2(x, curr, num); } // XOR from 0 to n ll fxor(ll n) { if(n < 0) return 0; if(n % 4 == 3) return 0; else if(n % 4 == 0) return n; else if(n % 4 == 1) return n^(n-1); else if(n%4 == 2) return n^(n-1)^(n-2); } // Power in logn with mod 1000000007 llt ppow(llt x, llt y) { llt res = 1; while(y > 0){ if(y&1) res = (res * x)%M; y = y >> 1; x = (x * x)%M; } return res; } // Factorial with dp llt factdp[N]; llt fact(llt x) { if(x == 0) return 1; if(x == 1) return 1; if(factdp[x] != -1) return factdp[x]; return factdp[x] = (x*fact(x-1))%M; } // String return to base b string ansConv =""; void convert10tob(llt N, int b) { if (N == 0) return; int x = N % b; N /= b; if (x < 0) N += 1; convert10tob(N, b); ansConv += to_string(x); return; } // Convert string to num wiht base b llt convertstrtob(string a, int b) { llt aa = 0; llt mul = 1; for(int i=a.length()-1; i>=0; i--) { int curr = a[i] - '0'; aa += (curr * mul); mul *= b; } return aa; } // Union Find // Find() int find(int x) { if(parent[x]==x)return x; else return parent[x]=find(parent[x]); } // Union() void unite(int x,int y){ x=find(x); y=find(y); if(x==y)return; if(ran[x]<ran[y]) parent[x]=y; else{ parent[y]=x; if(ran[x]==ran[y])ran[x]++; } } // Main Code int main() { int arr[3]; rep(i, 0, 3) cin>>arr[i]; sort(arr, arr+3); cout<<(arr[0] + arr[1])<<endl; return 0; }
a.cc: In function 'int find(int)': a.cc:122:8: error: 'parent' was not declared in this scope 122 | if(parent[x]==x)return x; | ^~~~~~ a.cc: In function 'void unite(int, int)': a.cc:131:8: error: 'ran' was not declared in this scope; did you mean 'tan'? 131 | if(ran[x]<ran[y]) | ^~~ | tan a.cc:132:9: error: 'parent' was not declared in this scope 132 | parent[x]=y; | ^~~~~~ a.cc:134:9: error: 'parent' was not declared in this scope 134 | parent[y]=x; | ^~~~~~ a.cc: In function 'll fxor(ll)': a.cc:64:1: warning: control reaches end of non-void function [-Wreturn-type] 64 | } | ^
s497531706
p03671
C++
a=gets.split.map(&:to_int).sort puts(a[0]+a[1])
a.cc:1:1: error: 'a' does not name a type 1 | a=gets.split.map(&:to_int).sort | ^
s394911732
p03671
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define all(x) (x).begin(),(x).end() #define pb push_back #define lb lower_bound #define ub upper_bound typedef long long ll; const int INF = 100000000; const long INF64 = 1000000000000000ll; const ll MOD = 1000000007ll; int main(){ std::vector<int> a(3); rep(i,3)std::cin >> a[i]; sort(all(a)) std::cout << a[0]+a[1] << std::endl; }
a.cc: In function 'int main()': a.cc:16:21: error: expected ';' before 'std' 16 | sort(all(a)) | ^ | ; 17 | std::cout << a[0]+a[1] << std::endl; | ~~~
s704881948
p03671
C++
#include<iostream> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; if((a>=b&&b>=c)||(a>=c&&c>=b)){ cout<<b+c<<endl; } else if((b>=a&&a>=c)||(b>=c&&c>=a)){ cout<<a+c<<endl; } else if((c>=a&&a>=b)||(c>=b&&b>=a)){ cout<<a+b<<endl; } return o; }
a.cc: In function 'int main()': a.cc:19:10: error: 'o' was not declared in this scope 19 | return o; | ^
s000147488
p03671
C++
#include <iostream> #include <vector> #include <algorithm> #include <string.h> #include <iomanip> #include <map> #include <cstdlib> using namespace std; int main() { int a, b, c, ; cin >> a >> b >> c; cout << a + b + c - min(a, min(b, c)) << endl; return 0; }
a.cc: In function 'int main()': a.cc:11:18: error: expected unqualified-id before ';' token 11 | int a, b, c, ; | ^
s500261762
p03671
C++
using namespace std; int main() { int a, b, c; cin >> a >> b >> c; if (a>=b&&b>=c) { cout << b + c << endl; return 0; } if (b>=c&&c>=a) { cout << c + a << endl; return 0; } else { cout << b + a << endl; return 0; } return 0; }
a.cc: In function 'int main()': a.cc:4:9: error: 'cin' was not declared in this scope 4 | 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 | using namespace std; a.cc:6:17: error: 'cout' was not declared in this scope 6 | cout << b + c << endl; | ^~~~ a.cc:6:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:6:34: error: 'endl' was not declared in this scope 6 | cout << 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 | using namespace std; a.cc:10:17: error: 'cout' was not declared in this scope 10 | cout << c + a << endl; | ^~~~ a.cc:10:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:10:34: error: 'endl' was not declared in this scope 10 | cout << c + a << endl; | ^~~~ a.cc:10:34: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' a.cc:14:17: error: 'cout' was not declared in this scope 14 | cout << b + a << endl; | ^~~~ a.cc:14:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:14:34: error: 'endl' was not declared in this scope 14 | cout << b + a << endl; | ^~~~ a.cc:14:34: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
s636607495
p03671
C++
#include<iostream> using namespace std; int main(){ int a, b, c; cin >> a >> b >> c; if(a < b) if(b < c) cout << a+b; else cout << a+c; else if(a < c) cout << a+b; else cout << b+c; return 0;
a.cc: In function 'int main()': a.cc:19:12: error: expected '}' at end of input 19 | return 0; | ^ a.cc:5:11: note: to match this '{' 5 | int main(){ | ^
s250646311
p03671
C++
#include<iostream> #define size(array) (sizeof(array) / sizeof(array[0])) using namespace std; int main(void){ int a,b,c; cin >> a >> b >> c; if(a > b){ if(a > c){ cout << b + c; }else{ cout << b + a; } }else[ if(b > c){ cout << a + c; }else{ cout << a + b; } } }
a.cc: In function 'int main()': a.cc:14:7: error: expected identifier before 'if' 14 | if(b > c){ | ^~ a.cc:18:8: error: expected ']' before '}' token 18 | } | ^ | ] 19 | } | ~ a.cc: In lambda function: a.cc:19:5: error: expected '{' before '}' token 19 | } | ^ a.cc: In function 'int main()': a.cc:18:8: error: expected ';' before '}' token 18 | } | ^ | ; 19 | } | ~ a.cc: At global scope: a.cc:20:1: error: expected declaration before '}' token 20 | } | ^
s439963894
p03671
C++
#include <bits/stdc++.h> using namespace std; int main() { vector<int> vec(3) 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:7:5: error: expected ',' or ';' before 'for' 7 | for (int i = 0; i < 3; i++) { | ^~~ a.cc:7:21: error: 'i' was not declared in this scope 7 | for (int i = 0; i < 3; i++) { | ^
s761746926
p03671
C++
main :: IO() main = do ls <- map read . words <$> getLine print $ sum ls - maximum ls
a.cc:1:1: error: 'main' does not name a type 1 | main :: IO() | ^~~~
s785139755
p03671
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a, b ,c; char X,Y; string S1,S2; cin >>a >> b >> c; cout << min{a+b,b+c,c+a} << endl; }
a.cc: In function 'int main()': a.cc:9:10: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '<unresolved overloaded function type>') 9 | 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:1: /usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'} 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]' 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ^~~~~~~~ /usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 174 | operator<<(long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long int' 174 | operator<<(long __n) | ~~~~~^~~ /usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 178 | operator<<(unsigned long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long unsigned int' 178 | operator<<(unsigned long __n) | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 182 | operator<<(bool __n) | ^~~~~~~~ /usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool' 182 | operator<<(bool __n) | ~~~~~^~~ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]' 96 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int' 97 | operator<<(short __n) | ~~~~~~^~~ /usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 189 | operator<<(unsigned short __n) | ^~~~~~~~ /usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short unsigned int' 189 | operator<<(unsigned short __n) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]' 110 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int' 111 | operator<<(int __n) | ~~~~^~~ /usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 200 | operator<<(unsigned int __n) | ^~~~~~~~ /usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'unsigned int' 200 | operator<<(unsigned int __n) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 211 | operator<<(long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int' 211 | operator<<(long long __n) | ~~~~~~~~~~^~~ /usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 215 | operator<<(unsigned long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long unsigned int' 215 | operator<<(unsigned long long __n) | ~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 231 | operator<<(double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:231:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'double' 231 | operator<<(double __f) | ~~~~~~~^~~ /usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 235 | operator<<(float __f) | ^~~~~~~~ /usr/include/c++/14/ostream:235:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float' 235 | operator<<(float __f) | ~~~~~~^~~ /usr/include/c++/14/ostream:243:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 243 | operator<<(long double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:243:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long double' 243 | operator<<(long double __f) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:301:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 301 | operator<<(const void* __p) | ^~~~~~~~ /usr/include/c++/14/ostream:301:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const void*' 301 | operator<<(const void* __p) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:306:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::nullptr_t) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; std::nullptr_t = st
s961382694
p03671
C++
#include <bits/stdc++.h> using namespace std; int main() { vector<int> a(3); cin >> a.at(0) >> a.at(1) >> a.at(2); sort(a.begin(), a.end()); printf("%d\n", a.at(0) + a.(1)); }
a.cc: In function 'int main()': a.cc:8:36: error: expected unqualified-id before '(' token 8 | printf("%d\n", a.at(0) + a.(1)); | ^
s852665184
p03671
C++
1 #include<bits/stdc++.h> using namespace std; #define rep(i, n) for(int i = 0; i < (n); ++i) typedef long long ll; template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1;} return 0;} template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1;} return 0;} const ll INF = 1LL << 60; int main(){ int a, b, c; cin >> a >> b >> c; cout << a + b + c - max({a, b, c}); }
a.cc:1:3: error: stray '#' in program 1 | 1 #include<bits/stdc++.h> | ^ a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 1 #include<bits/stdc++.h> | ^ a.cc: In function 'int main()': a.cc:10:22: error: 'cin' was not declared in this scope 10 | int a, b, c; cin >> a >> b >> c; | ^~~ a.cc:11:9: error: 'cout' was not declared in this scope 11 | cout << a + b + c - max({a, b, c}); | ^~~~ a.cc:11:29: error: 'max' was not declared in this scope 11 | cout << a + b + c - max({a, b, c}); | ^~~
s948154132
p03671
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; int min; min = min({a+b, b+c, c+a}); cout << min << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:12: error: 'min' cannot be used as a function 9 | min = min({a+b, b+c, c+a}); | ~~~^~~~~~~~~~~~~~~~~
s857980134
p03671
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; int min; min = min(a+b, b+c, c+a); cout << min << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:12: error: 'min' cannot be used as a function 9 | min = min(a+b, b+c, c+a); | ~~~^~~~~~~~~~~~~~~
s090780377
p03671
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; int min; min = min(a+b, b+c, c+a) cout << min << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:12: error: 'min' cannot be used as a function 9 | min = min(a+b, b+c, c+a) | ~~~^~~~~~~~~~~~~~~
s556343702
p03671
C++
#include <bits/stdc++.h> #include <cstdlib> // abs() for integer 絶対値求めやつ #include <cmath> // abs() for float, and fabs() #include <algorithm> #include <vector> #define rep(i,n) for(int i = 0; i< (n);i++) #define sort(a) sort((a).begin(),(a).end()); #define che(a,string) cout<<string<<":"<<(a)<<endl; #define ch(a,string) cout<<string<<":"<<(a)<<" "; using namespace std; typedef pair<int,int> p; int main(){ int a,b,c; cin>> a>>b>>c; vector<int> A(3); A[0]=a+b; A[1]=a+c; A[2]=b+c; SORT(A); cout<<A[0]<<endl; }
a.cc: In function 'int main()': a.cc:28:1: error: 'SORT' was not declared in this scope 28 | SORT(A); | ^~~~
s881371076
p03671
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b,c; cin >>a>>b >>c; int total=0; total=a+b; if(total >=a+c){ total=a+c; } if(total >=c+b){ total=c+b; } cout << total <<endl; } }
a.cc:20:1: error: expected declaration before '}' token 20 | } | ^
s862290654
p03671
C++
#include <bits/stdc++.h> using namespace std; int main() { vector<int> v(3); rep(i,3) cin>>v[i]; sort(v.begin(),v.end()); cout<<v[0]+v[1]<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:7: error: 'i' was not declared in this scope 6 | rep(i,3) cin>>v[i]; | ^ a.cc:6:3: error: 'rep' was not declared in this scope 6 | rep(i,3) cin>>v[i]; | ^~~
s061897281
p03671
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; vector<int> v={a,b,c} sort(v.begin(),v.end()); cout<<v[0]+v[1]<<endl; }
a.cc: In function 'int main()': a.cc:7:3: error: expected ',' or ';' before 'sort' 7 | sort(v.begin(),v.end()); | ^~~~
s499142249
p03671
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; int ans = max(a + b, b + c, c + a); 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:6:16: required from here 6 | int ans = max(a + b, b + c, c + a); | ~~~^~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function 306 | if (__comp(__a, __b)) | ~~~~~~^~~~~~~~~~
s432922480
p03671
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; cout << max (a + b, b + c, c + a) << 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:6:15: required from here 6 | cout << max (a + b, b + c, c + a) << endl; | ~~~~^~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function 306 | if (__comp(__a, __b)) | ~~~~~~^~~~~~~~~~
s275111083
p03671
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; cout << max(a + b, b + c, c + a) << 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:6:14: required from here 6 | cout << max(a + b, b + c, c + a) << endl; | ~~~^~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function 306 | if (__comp(__a, __b)) | ~~~~~~^~~~~~~~~~
s657052931
p03671
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; cout << max{a + b, b + c, c + a} << endl; }
a.cc: In function 'int main()': a.cc:6:8: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '<unresolved overloaded function type>') 6 | cout << max{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:1: /usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'} 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]' 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ^~~~~~~~ /usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 174 | operator<<(long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long int' 174 | operator<<(long __n) | ~~~~~^~~ /usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 178 | operator<<(unsigned long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long unsigned int' 178 | operator<<(unsigned long __n) | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 182 | operator<<(bool __n) | ^~~~~~~~ /usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool' 182 | operator<<(bool __n) | ~~~~~^~~ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]' 96 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int' 97 | operator<<(short __n) | ~~~~~~^~~ /usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 189 | operator<<(unsigned short __n) | ^~~~~~~~ /usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short unsigned int' 189 | operator<<(unsigned short __n) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]' 110 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int' 111 | operator<<(int __n) | ~~~~^~~ /usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 200 | operator<<(unsigned int __n) | ^~~~~~~~ /usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'unsigned int' 200 | operator<<(unsigned int __n) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 211 | operator<<(long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int' 211 | operator<<(long long __n) | ~~~~~~~~~~^~~ /usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 215 | operator<<(unsigned long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long unsigned int' 215 | operator<<(unsigned long long __n) | ~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 231 | operator<<(double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:231:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'double' 231 | operator<<(double __f) | ~~~~~~~^~~ /usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 235 | operator<<(float __f) | ^~~~~~~~ /usr/include/c++/14/ostream:235:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float' 235 | operator<<(float __f) | ~~~~~~^~~ /usr/include/c++/14/ostream:243:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 243 | operator<<(long double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:243:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long double' 243 | operator<<(long double __f) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:301:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 301 | operator<<(const void* __p) | ^~~~~~~~ /usr/include/c++/14/ostream:301:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const void*' 301 | operator<<(const void* __p) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:306:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::nullptr_t) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; std::nullptr_t =
s432009484
p03671
C++
#include<bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0; i<n; i++) #define MOD 10e9+7 int main(){ int a, b, c; cin >> a >> b >> c; cout << a + b + c - max({a,b,c});
a.cc: In function 'int main()': a.cc:8:38: error: expected '}' at end of input 8 | cout << a + b + c - max({a,b,c}); | ^ a.cc:6:11: note: to match this '{' 6 | int main(){ | ^
s062787392
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:28: error: expected ')' before '}' token 7 | cout << A+B+C-max((A,B),C}) << endl; | ~ ^ | ) a.cc: At global scope: a.cc:7:29: error: expected unqualified-id before ')' token 7 | cout << A+B+C-max((A,B),C}) << endl; | ^ a.cc:8:1: error: expected declaration before '}' token 8 | } | ^
s717840368
p03671
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; cout<< a+b+c - max(a,b,c)<<endl; }
In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]': a.cc:7:23: 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)) | ~~~~~~^~~~~~~~~~
s698930296
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:5:10: error: expected initializer before '>>' token 5 | int a>>b>>c; | ^~ a.cc:6:10: error: 'a' was not declared in this scope 6 | cin>>a>>b>>c; | ^ a.cc:6:13: error: 'b' was not declared in this scope 6 | cin>>a>>b>>c; | ^ a.cc:6:16: error: 'c' was not declared in this scope 6 | cin>>a>>b>>c; | ^ a.cc:7:20: error: no matching function for call to 'max(<brace-enclosed initializer list>)' 7 | cout<<a+b+c-max({a,b,c})<<endl; | ~~~^~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)' 257 | max(const _Tp& __a, const _Tp& __b) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate expects 2 arguments, 1 provided /usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)' 303 | max(const _Tp& __a, const _Tp& __b, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate expects 3 arguments, 1 provided In file included from /usr/include/c++/14/algorithm:61: /usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)' 5706 | max(initializer_list<_Tp> __l) | ^~~ /usr/include/c++/14/bits/stl_algo.h:5706:5: note: template argument deduction/substitution failed: /usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)' 5716 | max(initializer_list<_Tp> __l, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate expects 2 arguments, 1 provided
s728458336
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:5:10: error: expected initializer before '>>' token 5 | int a>>b>>c; | ^~ a.cc:6:11: error: 'a' was not declared in this scope 6 | cin >>a>>b>>c; | ^ a.cc:6:14: error: 'b' was not declared in this scope 6 | cin >>a>>b>>c; | ^ a.cc:6:17: error: 'c' was not declared in this scope 6 | cin >>a>>b>>c; | ^ a.cc:7:20: error: no matching function for call to 'max(<brace-enclosed initializer list>)' 7 | cout<<a+b+c-max({a,b,c})<<endl; | ~~~^~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)' 257 | max(const _Tp& __a, const _Tp& __b) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate expects 2 arguments, 1 provided /usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)' 303 | max(const _Tp& __a, const _Tp& __b, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate expects 3 arguments, 1 provided In file included from /usr/include/c++/14/algorithm:61: /usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)' 5706 | max(initializer_list<_Tp> __l) | ^~~ /usr/include/c++/14/bits/stl_algo.h:5706:5: note: template argument deduction/substitution failed: /usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)' 5716 | max(initializer_list<_Tp> __l, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate expects 2 arguments, 1 provided
s731966183
p03671
C++
#include <cassert> #include <cstdio> #include <cmath> #include <iostream> #include <sstream> #include <string> #include <vector> #include <map> #include <queue> #include <algorithm> const int MOD = 1000000007, INF = 1111111111; using namespace std; using lint = long long; template <class T> ostream &operator<<(ostream &os, const vector<T> &vec) { for (int i = 0; i < (int)vec.size(); i++) { os << vec[i] << (i + 1 == vec.size() ? "" : " "); } return os; } #ifdef _DEBUG template <class Head> void dump(const char* str, Head &&h) { cerr << str << " = " << h << "\n"; }; template <class Head, class... Tail> void dump(const char* str, Head &&h, Tail &&... t) { while (*str != ',') cerr << *str++; cerr << " = " << h << "\n"; dump(str + 1, t...); } #define DMP(...) dump(#__VA_ARGS__, __VA_ARGS__) #else #define DMP(...) ((void)0) #endif int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int a, b, c; cin >> a >> b >> c; cout << a + b + c - min(a, b, c) << "\n"; return 0; }
In file included from /usr/include/c++/14/bits/specfun.h:43, from /usr/include/c++/14/cmath:3906, from a.cc:3: /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:45:25: required from here 45 | cout << a + b + c - min(a, b, c) << "\n"; | ~~~^~~~~~~~~ /usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function 284 | if (__comp(__b, __a)) | ~~~~~~^~~~~~~~~~
s242134359
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: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)) | ~~~~~~^~~~~~~~~~
s588444826
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: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)) | ~~~~~~^~~~~~~~~~
s789849414
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:7:15: 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)) | ~~~~~~^~~~~~~~~~
s830770752
p03671
C++
#include<bits/stdc++.h> using namespace std; int main(){ int 3[a]; for(auto &i:a) cin >> i; sort(a,a+3); cout << a[0]+a[1] << endl; }
a.cc: In function 'int main()': a.cc:4:7: error: expected unqualified-id before numeric constant 4 | int 3[a]; | ^ a.cc:5:15: error: 'a' was not declared in this scope 5 | for(auto &i:a) cin >> i; | ^ a.cc:6:8: error: 'a' was not declared in this scope 6 | sort(a,a+3); | ^
s019341771
p03671
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = (int)(0); i < (int)(n); ++i) #define reps(i, n) for (int i = (int)(1); i <= (int)(n); ++i) #define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--) #define rreps(i, n) for (int i = ((int)(n)); i > 0; i--) #define irep(i, m, n) for (int i = (int)(m); i < (int)(n); ++i) #define ireps(i, m, n) for (int i = (int)(m); i <= (int)(n); ++i) #define FOR(e, c) for (auto &e : c) #define SORT(v, n) sort(v, v + n); #define vsort(v) sort(v.begin(), v.end()); #define rvisort(v) sort(v.begin(), v.end(), greater<int>()); #define all(v) v.begin(), v.end() #define mp(n, m) make_pair(n, m); #define cout(d) cout<<d<<endl; #define coutd(d) cout<<std::setprecision(10)<<d<<endl; #define cinline(n) getline(cin,n); using ll = long long; using vi = vector<int>; using vvi = vector<vi>; using vll = vector<ll>; using vvll = vector<vll>; using pii = pair<int, int>; using vpii = vector<pii>; using vs = vector<string>; using vd = vector<double>; using ul = unsigned long; template<class T, class C> void chmax(T& a, C b){ a>b?:a=b; } template<class T, class C> void chmin(T& a, C b){ a<b?:a=b; } const int mod=1e9+7; struct mint { ll x; mint(ll x=0):x(x%mod){} mint& operator+=(const mint a) { if ((x += a.x) >= mod) x -= mod; return *this; } mint& operator-=(const mint a) { if ((x += mod-a.x) >= mod) x -= mod; return *this; } mint& operator*=(const mint a) { (x *= a.x) %= mod; return *this; } mint operator+(const mint a) const { mint res(*this); return res+=a; } mint operator-(const mint a) const { mint res(*this); return res-=a; } mint operator*(const mint a) const { mint res(*this); return res*=a; } }; mint c[4005][4005]; void init() { c[0][0] = 1; for (int i = 0; i <= 4000; i++) { for (int j = 0; j <= i; j++) { c[i+1][j] += c[i][j]; c[i+1][j+1] += c[i][j]; } } } mint comb(int n, int k) { return c[n][k]; } bool IsPrime(int num) { if (num < 2) return false; else if (num == 2) return true; else if (num % 2 == 0) return false; double sqrtNum = sqrt(num); for (int i = 3; i <= sqrtNum; i += 2) { if (num % i == 0) { return false; } } return true; } map<ll, ll> primeFact(ll n) { map<ll, ll> res; for (ll i = 2; i * i <= n; i++) { while (n % i == 0) { res[i]++; n /= i; } } if (n != 1) res[n]++; return res; } void printv(vi& v){ rep(i,v.size()) cout << v[i] << " "; cout << endl; } void printv(vll& v){ rep(i,v.size()) cout << v[i] << " "; cout << endl; } int vtotal(vi& v){ int total=0; rep(i,v.size()) total+=v[i]; return total; } int main() { //init(); // mint初期化 cin.tie( 0 ); ios::sync_with_stdio( false ); int a,b,c;cin>>a>>b>>c; int max=max(max(a,b),c); int ans=a+b+c-max; cout(ans); return 0; }
a.cc: In function 'int main()': a.cc:130:18: error: 'max' cannot be used as a function 130 | int max=max(max(a,b),c); | ~~~^~~~~ a.cc:130:14: error: 'max' cannot be used as a function 130 | int max=max(max(a,b),c); | ~~~^~~~~~~~~~~~
s667331760
p03671
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = (int)(0); i < (int)(n); ++i) #define reps(i, n) for (int i = (int)(1); i <= (int)(n); ++i) #define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--) #define rreps(i, n) for (int i = ((int)(n)); i > 0; i--) #define irep(i, m, n) for (int i = (int)(m); i < (int)(n); ++i) #define ireps(i, m, n) for (int i = (int)(m); i <= (int)(n); ++i) #define FOR(e, c) for (auto &e : c) #define SORT(v, n) sort(v, v + n); #define vsort(v) sort(v.begin(), v.end()); #define rvisort(v) sort(v.begin(), v.end(), greater<int>()); #define all(v) v.begin(), v.end() #define mp(n, m) make_pair(n, m); #define cout(d) cout<<d<<endl; #define coutd(d) cout<<std::setprecision(10)<<d<<endl; #define cinline(n) getline(cin,n); using ll = long long; using vi = vector<int>; using vvi = vector<vi>; using vll = vector<ll>; using vvll = vector<vll>; using pii = pair<int, int>; using vpii = vector<pii>; using vs = vector<string>; using vd = vector<double>; using ul = unsigned long; template<class T, class C> void chmax(T& a, C b){ a>b?:a=b; } template<class T, class C> void chmin(T& a, C b){ a<b?:a=b; } const int mod=1e9+7; struct mint { ll x; mint(ll x=0):x(x%mod){} mint& operator+=(const mint a) { if ((x += a.x) >= mod) x -= mod; return *this; } mint& operator-=(const mint a) { if ((x += mod-a.x) >= mod) x -= mod; return *this; } mint& operator*=(const mint a) { (x *= a.x) %= mod; return *this; } mint operator+(const mint a) const { mint res(*this); return res+=a; } mint operator-(const mint a) const { mint res(*this); return res-=a; } mint operator*(const mint a) const { mint res(*this); return res*=a; } }; mint c[4005][4005]; void init() { c[0][0] = 1; for (int i = 0; i <= 4000; i++) { for (int j = 0; j <= i; j++) { c[i+1][j] += c[i][j]; c[i+1][j+1] += c[i][j]; } } } mint comb(int n, int k) { return c[n][k]; } bool IsPrime(int num) { if (num < 2) return false; else if (num == 2) return true; else if (num % 2 == 0) return false; double sqrtNum = sqrt(num); for (int i = 3; i <= sqrtNum; i += 2) { if (num % i == 0) { return false; } } return true; } map<ll, ll> primeFact(ll n) { map<ll, ll> res; for (ll i = 2; i * i <= n; i++) { while (n % i == 0) { res[i]++; n /= i; } } if (n != 1) res[n]++; return res; } void printv(vi& v){ rep(i,v.size()) cout << v[i] << " "; cout << endl; } void printv(vll& v){ rep(i,v.size()) cout << v[i] << " "; cout << endl; } int vtotal(vi& v){ int total=0; rep(i,v.size()) total+=v[i]; return total; } int main() { //init(); // mint初期化 cin.tie( 0 ); ios::sync_with_stdio( false ); int a,b,c;cin>>a>>b>>c; int max=max(max(a,b),c); int ans=a+b+c-max; cout(ans); return 0; }
a.cc: In function 'int main()': a.cc:130:18: error: 'max' cannot be used as a function 130 | int max=max(max(a,b),c); | ~~~^~~~~ a.cc:130:14: error: 'max' cannot be used as a function 130 | int max=max(max(a,b),c); | ~~~^~~~~~~~~~~~
s482684193
p03671
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = (int)(0); i < (int)(n); ++i) #define reps(i, n) for (int i = (int)(1); i <= (int)(n); ++i) #define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--) #define rreps(i, n) for (int i = ((int)(n)); i > 0; i--) #define irep(i, m, n) for (int i = (int)(m); i < (int)(n); ++i) #define ireps(i, m, n) for (int i = (int)(m); i <= (int)(n); ++i) #define FOR(e, c) for (auto &e : c) #define SORT(v, n) sort(v, v + n); #define vsort(v) sort(v.begin(), v.end()); #define rvisort(v) sort(v.begin(), v.end(), greater<int>()); #define all(v) v.begin(), v.end() #define mp(n, m) make_pair(n, m); #define cout(d) cout<<d<<endl; #define coutd(d) cout<<std::setprecision(10)<<d<<endl; #define cinline(n) getline(cin,n); using ll = long long; using vi = vector<int>; using vvi = vector<vi>; using vll = vector<ll>; using vvll = vector<vll>; using pii = pair<int, int>; using vpii = vector<pii>; using vs = vector<string>; using vd = vector<double>; using ul = unsigned long; template<class T, class C> void chmax(T& a, C b){ a>b?:a=b; } template<class T, class C> void chmin(T& a, C b){ a<b?:a=b; } const int mod=1e9+7; struct mint { ll x; mint(ll x=0):x(x%mod){} mint& operator+=(const mint a) { if ((x += a.x) >= mod) x -= mod; return *this; } mint& operator-=(const mint a) { if ((x += mod-a.x) >= mod) x -= mod; return *this; } mint& operator*=(const mint a) { (x *= a.x) %= mod; return *this; } mint operator+(const mint a) const { mint res(*this); return res+=a; } mint operator-(const mint a) const { mint res(*this); return res-=a; } mint operator*(const mint a) const { mint res(*this); return res*=a; } }; mint c[4005][4005]; void init() { c[0][0] = 1; for (int i = 0; i <= 4000; i++) { for (int j = 0; j <= i; j++) { c[i+1][j] += c[i][j]; c[i+1][j+1] += c[i][j]; } } } mint comb(int n, int k) { return c[n][k]; } bool IsPrime(int num) { if (num < 2) return false; else if (num == 2) return true; else if (num % 2 == 0) return false; double sqrtNum = sqrt(num); for (int i = 3; i <= sqrtNum; i += 2) { if (num % i == 0) { return false; } } return true; } map<ll, ll> primeFact(ll n) { map<ll, ll> res; for (ll i = 2; i * i <= n; i++) { while (n % i == 0) { res[i]++; n /= i; } } if (n != 1) res[n]++; return res; } void printv(vi& v){ rep(i,v.size()) cout << v[i] << " "; cout << endl; } void printv(vll& v){ rep(i,v.size()) cout << v[i] << " "; cout << endl; } int vtotal(vi& v){ int total=0; rep(i,v.size()) total+=v[i]; return total; } int main() { //init(); // mint初期化 cin.tie( 0 ); ios::sync_with_stdio( false ); int a,b,c;cin>>a>>b>>c; int max=max(max(a,b),c); int ans=a+b+c-max; cout(ans); return 0; }
a.cc: In function 'int main()': a.cc:130:18: error: 'max' cannot be used as a function 130 | int max=max(max(a,b),c); | ~~~^~~~~ a.cc:130:14: error: 'max' cannot be used as a function 130 | int max=max(max(a,b),c); | ~~~^~~~~~~~~~~~
s514202566
p03671
C++
package main import ( "fmt" "sort" ) func main() { var a [3]int fmt.Scan(&a[0], &a[1], &a[2]) sort.Ints(a[:]) fmt.Println(a[0] + a[1]) }
a.cc:1:1: error: 'package' does not name a type 1 | package main | ^~~~~~~
s976907635
p03671
C++
#include<bits/stdc++.h> using namespace std; main(){ int a,b,c; cin>>a>>b>>c; cout<<a+b+c-max(a,b,c); }
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 3 | main(){ | ^~~~ 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:6:18: required from here 6 | cout<<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)) | ~~~~~~^~~~~~~~~~
s561243467
p03671
C++
#include<iostream> main(){ int a,b,c; std::cin>>a>>b>>c; std::cout<<a+b+c-max(a,b,c); }
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:5:20: error: 'max' was not declared in this scope; did you mean 'std::max'? 5 | std::cout<<a+b+c-max(a,b,c); | ^~~ | 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, from a.cc:1: /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) | ^~~
s362530534
p03671
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; vector<int>x = {a,b,c}; sort(x.begin(),x.end()) cout<<x.at(0)+x.at(1)<<endl; }
a.cc: In function 'int main()': a.cc:7:26: error: expected ';' before 'cout' 7 | sort(x.begin(),x.end()) | ^ | ; 8 | cout<<x.at(0)+x.at(1)<<endl; | ~~~~
s548688294
p03671
C++
// pch.cpp: プリコンパイル済みヘッダーに対応するソース ファイル。コンパイルが正常に実行されるために必要です #include "pch.h" #define _USE_MATH_DEFINES #include<iostream> #include<vector> #include<set> #include<queue> #include<map> #include<algorithm> #include<cstring> #include<string> #include<cassert> #include<cmath> #include<climits> #include<iomanip> #include<stack> #include<unordered_map> using namespace std; #define MOD 1000000007 #define rep(i,m,n) for(int (i)=(int)(m);i<(int)(n);i++) #define REP(i,n) rep(i,0,n) #define FOR(i,c) for(decltype((c).begin())i=(c).begin();i!=(c).end();++i) #define ll long long #define ull unsigned long long #define all(hoge) (hoge).begin(),(hoge).end() typedef pair<ll, ll> P; const long long INF = 1LL << 60; typedef vector<ll> Array; typedef vector<Array> Matrix; //priority_queue<ll> max;//大きい順 //priority_queue<ll, Array, greater<ll>> min;//小さい順 /*firstについては昇順 secondについては降順 sort(all(wh), [&](P x, P y) { if (x.first == y.first)return x.second > y.second; return x.first < y.first; }); */ template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; } template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; } //substr 文字列取り出し //upper_bound ある値より大きい一番左のイテレータを返す、lowerは以上(setに対して使うとO(N)なので、setのメンバ関数を使う //stoi struct Edge {//グラフ ll to, cap, rev; Edge(ll _to, ll _cap, ll _rev) { to = _to; cap = _cap; rev = _rev; } }; typedef vector<Edge> Edges; typedef vector<Edges> Graph; void add_edge(Graph& G, ll from, ll to, ll cap, bool revFlag, ll revCap) {//最大フロー求める Ford-fulkerson G[from].push_back(Edge(to, cap, (ll)G[to].size())); if (revFlag)G[to].push_back(Edge(from, revCap, (ll)G[from].size() - 1));//最小カットの場合逆辺は0にする } ll max_flow_dfs(Graph & G, ll v, ll t, ll f, vector<bool> & used) { if (v == t) return f; used[v] = true; for (int i = 0; i < G[v].size(); ++i) { Edge& e = G[v][i]; if (!used[e.to] && e.cap > 0) { ll d = max_flow_dfs(G, e.to, t, min(f, e.cap), used); if (d > 0) { e.cap -= d; G[e.to][e.rev].cap += d; return d; } } } return 0; } //二分グラフの最大マッチングを求めたりも出来る また二部グラフの最大独立集合は頂点数-最大マッチングのサイズ ll max_flow(Graph & G, ll s, ll t)//O(V(V+E)) { ll flow = 0; for (;;) { vector<bool> used(G.size()); REP(i, used.size())used[i] = false; ll f = max_flow_dfs(G, s, t, INF, used); if (f == 0) { return flow; } flow += f; } } void BellmanFord(Graph& G, ll s, Array& d, Array &negative) {//O(|E||V|) d.resize(G.size()); negative.resize(G.size()); REP(i, d.size())d[i] = INF; REP(i, d.size())negative[i] = false; d[s] = 0; REP(k, G.size() - 2) { REP(i, G.size()) { REP(j, G[i].size()) { if (d[G[i][j].to] > d[i] + G[i][j].cap) { d[G[i][j].to] = d[i] + G[i][j].cap; } } } } REP(k, G.size() - 2) { REP(i, G.size()) { REP(j, G[i].size()) { if (d[G[i][j].to] > d[i] + G[i][j].cap) { d[G[i][j].to] = d[i] + G[i][j].cap; negative[G[i][j].to] = true; } if (negative[i] == true)negative[G[i][j].to] = true; } } } } void Dijkstra(Graph& G, ll s, Array& d) {//O(|E|log|V|) d.resize(G.size()); REP(i, d.size())d[i] = INF; d[s] = 0; priority_queue<P, vector<P>, greater<P>> q; q.push(make_pair(0, s)); while (!q.empty()) { P a = q.top(); q.pop(); if (d[a.second] < a.first)continue; REP(i, G[a.second].size()) { Edge e = G[a.second][i]; if (d[e.to] > d[a.second] + e.cap) { d[e.to] = d[a.second] + e.cap; q.push(make_pair(d[e.to], e.to)); } } } } void WarshallFloyd(Graph& G, Matrix& d) {//O(V^3) d.resize(G.size()); REP(i, d.size())d[i].resize(G.size()); REP(i, d.size()) { REP(j, d[i].size()) { d[i][j] = INF; } } REP(i, G.size()) { REP(j, G[i].size()) { d[i][G[i][j].to] = G[i][j].cap; } } REP(i, G.size()) { REP(j, G.size()) { REP(k, G.size()) { chmin(d[j][k], d[j][i] + d[i][k]); } } } } bool tsort(Graph& graph, vector<int>& order) {//トポロジカルソートO(E+V) int n = graph.size(), k = 0; Array in(n); for (auto& es : graph) for (auto& e : es)in[e.to]++; priority_queue<ll, Array, greater<ll>> que; REP(i, n) if (in[i] == 0)que.push(i); while (que.size()) { int v = que.top(); que.pop(); order.push_back(v); for (auto& e : graph[v]) if (--in[e.to] == 0)que.push(e.to); } if (order.size() != n)return false; else return true; } class lca { public: const int n = 0; const int log2_n = 0; std::vector<std::vector<int>> parent; std::vector<int> depth; lca() {} lca(const Graph& g, int root) : n(g.size()), log2_n(log2(n) + 1), parent(log2_n, std::vector<int>(n)), depth(n) { dfs(g, root, -1, 0); for (int k = 0; k + 1 < log2_n; k++) { for (int v = 0; v < (int)g.size(); v++) { if (parent[k][v] < 0) parent[k + 1][v] = -1; else parent[k + 1][v] = parent[k][parent[k][v]]; } } } void dfs(const Graph& g, int v, int p, int d) { parent[0][v] = p; depth[v] = d; for (auto& e : g[v]) { if (e.to != p) dfs(g, e.to, v, d + 1); } } int get(int u, int v) { if (depth[u] > depth[v]) std::swap(u, v); for (int k = 0; k < log2_n; k++) { if ((depth[v] - depth[u]) >> k & 1) { v = parent[k][v]; } } if (u == v) return u; for (int k = log2_n - 1; k >= 0; k--) { if (parent[k][u] != parent[k][v]) { u = parent[k][u]; v = parent[k][v]; } } return parent[0][u]; } }; class UnionFind { vector<int> data; ll num; public: UnionFind(int size) : data(size, -1), num(size) { } bool unionSet(int x, int y) {//xとyの集合を統合する x = root(x); y = root(y); if (x != y) { if (data[y] < data[x]) swap(x, y); data[x] += data[y]; data[y] = x; } num -= (x != y); return x != y; } bool findSet(int x, int y) {//xとyが同じ集合か返す return root(x) == root(y); } int root(int x) {//xのルートを返す return data[x] < 0 ? x : data[x] = root(data[x]); } int size(int x) {//xの集合のサイズを返す return -data[root(x)]; } int numSet() {//集合の数を返す return num; } }; class SumSegTree { private: int _sum(int a, int b, int k, int l, int r) { if (r <= a || b <= l)return 0; // 交差しない if (a <= l && r <= b)return dat[k]; // a,l,r,bの順で完全に含まれる else { int s1 = _sum(a, b, 2 * k + 1, l, (l + r) / 2); // 左の子 int s2 = _sum(a, b, 2 * k + 2, (l + r) / 2, r); // 右の子 return s1 + s2; } } public: int n, height; vector<int> dat; // 初期化(_nは最大要素数) SumSegTree(int _n) { n = 1; height = 1; while (n < _n) { n *= 2; height++; } dat = vector<int>(2 * n - 1, 0); } // 場所i(0-indexed)にxを足す void add(int i, int x) { i += n - 1; // i番目の葉ノードへ dat[i] += x; while (i > 0) { // 下から上がっていく i = (i - 1) / 2; dat[i] += x; } } // 区間[a,b)の総和。ノードk=[l,r)に着目している。 int sum(int a, int b) { return _sum(a, b, 0, 0, n); } }; class RmqTree { private: ll _find(ll a, ll b, ll k, ll l, ll r) { if (r <= a || b <= l)return INF; // 交差しない if (a <= l && r <= b)return dat[k]; // a,l,r,bの順で完全に含まれる else { ll s1 = _find(a, b, 2 * k + 1, l, (l + r) / 2); // 左の子 ll s2 = _find(a, b, 2 * k + 2, (l + r) / 2, r); // 右の子 return min(s1, s2); } } public: ll n, height; vector<ll> dat; // 初期化(_nは最大要素数) RmqTree(ll _n) { n = 1; height = 1; while (n < _n) { n *= 2; height++; } dat = vector<ll>(2 * n - 1, INF); } // 場所i(0-indexed)をxにする void update(ll i, ll x) { i += n - 1; // i番目の葉ノードへ dat[i] = x; while (i > 0) { // 下から上がっていく i = (i - 1) / 2; dat[i] = min(dat[i * 2 + 1], dat[i * 2 + 2]); } } // 区間[a,b)の最小値。ノードk=[l,r)に着目している。 ll find(ll a, ll b) { return _find(a, b, 0, 0, n); } }; //約数求める //約数 void divisor(ll n, vector<ll>& ret) { for (ll i = 1; i * i <= n; i++) { if (n % i == 0) { ret.push_back(i); if (i * i != n) ret.push_back(n / i); } } sort(ret.begin(), ret.end()); } vector<ll> lis_fast(const vector<ll>& a) {//最長部分増加列 const ll n = a.size(); vector<ll> A(n, INT_MAX); vector<ll> id(n); for (int i = 0; i < n; ++i) { id[i] = distance(A.begin(), lower_bound(A.begin(), A.end(), a[i])); A[id[i]] = a[i]; } ll m = *max_element(id.begin(), id.end()); vector<ll> b(m + 1); for (int i = n - 1; i >= 0; --i) if (id[i] == m) b[m--] = a[i]; return b; } ll ModPow(ll x, ll n) { ll res = 1LL; while (n > 0) { if (n & 1) res = res * x % MOD; x = x * x % MOD; n >>= 1; } return res; } //nCrとか class Combination { public: Array fact; Array inv; ll mod; ll mod_inv(ll x) { ll n = mod - 2LL; ll res = 1LL; while (n > 0) { if (n & 1) res = res * x % mod; x = x * x % mod; n >>= 1; } return res; } ll nCr(ll n, ll r) { return ((fact[n] * inv[r] % mod) * inv[n - r]) % mod; } ll nPr(ll n, ll r) { return (fact[n] * inv[n - r]) % mod; } ll nHr(ll n, ll r) { return nCr(r + n - 1, r); } Combination(ll n, ll _mod) { mod = _mod; fact.resize(n + 1); fact[0] = 1; REP(i, n) { fact[i + 1] = (fact[i] * (i + 1LL)) % mod; } inv.resize(n + 1); REP(i, n + 1) { inv[i] = mod_inv(fact[i]); } } }; ll gcd(ll m, ll n) { if (n == 0)return m; return gcd(n, m % n); }//gcd ll lcm(ll m, ll n) { return m / gcd(m, n) * n; } Matrix mIdentity(ll n) { Matrix A(n, Array(n)); for (int i = 0; i < n; ++i) A[i][i] = 1; return A; } Matrix mMul(const Matrix& A, const Matrix& B) { Matrix C(A.size(), Array(B[0].size())); for (int i = 0; i < C.size(); ++i) for (int j = 0; j < C[i].size(); ++j) for (int k = 0; k < A[i].size(); ++k) (C[i][j] += (A[i][k] % MOD) * (B[k][j] % MOD)) %= MOD; return C; } // O( n^3 log e ) Matrix mPow(const Matrix & A, ll e) { return e == 0 ? mIdentity(A.size()) : e % 2 == 0 ? mPow(mMul(A, A), e / 2) : mMul(A, mPow(A, e - 1)); } template <class T>class RectangleSum { public: vector<vector<T>> sum; T GetSum(int left, int right, int top, int bottom) { //[left, right], [top, bottom] T res = sum[bottom][right]; if (left > 0) res -= sum[bottom][left - 1]; if (top > 0) res -= sum[top - 1][right]; if (left > 0 && top > 0) res += sum[top - 1][left - 1]; return res; } RectangleSum(const vector<vector<T>> &s, int h, int w) { sum.resize(h); for (int i = 0; i < h; i++) sum[i].resize(w, 0); for (int y = 0; y < h; y++) { for (int x = 0; x < w; x++) { sum[y][x] = s[y][x]; if (y > 0) sum[y][x] += sum[y - 1][x]; if (x > 0) sum[y][x] += sum[y][x - 1]; if (y > 0 && x > 0) sum[y][x] -= sum[y - 1][x - 1]; } } } }; int main() { ios::sync_with_stdio(false); cin.tie(0); ll a, b, c; cin >> a >> b >> c; cout << a + b + c - max({ a, b, c }); return 0; }
a.cc:4:10: fatal error: pch.h: No such file or directory 4 | #include "pch.h" | ^~~~~~~ compilation terminated.
s776528629
p03671
C++
#include<iostream> #include<vector> #include<map> #include<algorithm> #include<math.h> #include<string> #include <iomanip> #include<deque> typedef long long ll; typedef unsigned long long ull; typedef int itn; const ll LINF = 1e18; const int INF = 1e8; using namespace std; //マクロ定義 #define vvint(vec,n,m,l) vector<vector<int>> vec(n, vector<int>(m,l)); // lで初期化 #define vvll(vec,n,m,l) vector<vector<ll>> vec(n,vector<ll>(m,l)); #define vint vector<int> #define pint pair<int,int> #define rep(i,a) for(int i=0;i<(a);i++) #define all(x) (x).begin(),(x).end() #define debug system("pause") //デバッグ用 int main(void) { cin.tie(0); ios::sync_with_stdio(false); 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/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]': a.cc:36:25: required from here 36 | 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)) | ~~~~~~^~~~~~~~~~
s588133046
p03671
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c; cout<<a+b+c-max(max(a,b),c)<<endl;
a.cc: In function 'int main()': a.cc:6:37: error: expected '}' at end of input 6 | cout<<a+b+c-max(max(a,b),c)<<endl; | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s956373196
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; }
a.cc: In function 'int main()': a.cc:6:17: error: found ':' in nested-name-specifier, expected '::' 6 | cin>>a>>b>>c: | ^ | :: a.cc:6:16: error: 'c' is not a class, namespace, or enumeration 6 | cin>>a>>b>>c: | ^
s471041640
p03671
C++
using System; using System.Collections.Generic; using System.Linq; using static System.Math; namespace ConsoleApp1 { class Program { static void Main(string[] args) { A(); } static void A() { var abc = ReadSplitInt(); var order = abc.OrderBy(x => x).ToList(); Println(order[0] + order[1]); } static List<long> ReadLines(long n) { var l = new List<long>(); for (long i = 0; i < n; i++) { l.Add(ReadLong()); } return l; } static IEnumerable<int> Range(int start, int stop) { if (start < 0 || stop < 0 || start > stop || (start <= 0 && stop <= 0)) return new List<int>(); return Enumerable.Range(start, stop - start); } static bool IsDigit(string str) { var i = 0; return int.TryParse(str, out i); } static int SumDigits(long num) { return num.ToString().Select(x => x.ToString()).Sum(int.Parse); } static int[] ToIntArray(string str) { return str.Select(x => x.ToString()).Select(int.Parse).ToArray(); } static long Gcd(long a, long b) => b == 0 ? a : Gcd(b, a % b); static long Lcm(long a, long b) => a / Gcd(a, b) * b; static bool IsPrime(int x) { if (x <= 1 || (x != 2 && x % 2 == 0)) return false; if (x == 2) return true; for (int i = 3; i < x; i += 2) if (x % i == 0) return false; return true; } static string Read() => Console.ReadLine(); static int ReadInt() => int.Parse(Read()); static long ReadLong() => long.Parse(Read()); static List<string> ReadSplit() => Read().Split().ToList(); static List<int> ReadSplitInt() => Read().Split().Select(int.Parse).ToList(); static List<long> ReadSplitLong() => Read().Split().Select(long.Parse).ToList(); static void Print(object value) => Console.Write(value.ToString()); static void Println(object value) => Console.WriteLine(value.ToString()); static string Join<T>(IEnumerable<T> list) => string.Join("", list); } public static class MyExtensions { public static string Slice(this string str, int start = 0, int stop = 0) { if (start > str.Length || stop > str.Length || start < 0 || stop < 0) return ""; if (stop == 0) stop = str.Length; return str.Substring(start, stop - start); } } }
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Collections.Generic; | ^~~~~~ a.cc:3:7: error: expected nested-name-specifier before 'System' 3 | using System.Linq; | ^~~~~~ a.cc:4:7: error: expected nested-name-specifier before 'static' 4 | using static System.Math; | ^~~~~~ a.cc:10:26: error: 'string' has not been declared 10 | static void Main(string[] args) | ^~~~~~ a.cc:10:35: error: expected ',' or '...' before 'args' 10 | static void Main(string[] args) | ^~~~ a.cc:22:16: error: 'List' does not name a type 22 | static List<long> ReadLines(long n) | ^~~~ a.cc:32:16: error: 'IEnumerable' does not name a type 32 | static IEnumerable<int> Range(int start, int stop) | ^~~~~~~~~~~ a.cc:40:29: error: 'string' has not been declared 40 | static bool IsDigit(string str) | ^~~~~~ a.cc:51:19: error: expected unqualified-id before '[' token 51 | static int[] ToIntArray(string str) | ^ a.cc:56:44: error: invalid pure specifier (only '= 0' is allowed) before 'b' 56 | static long Gcd(long a, long b) => b == 0 ? a : Gcd(b, a % b); | ^ a.cc:56:21: error: initializer specified for static member function 'static long int ConsoleApp1::Program::Gcd(long int, long int)' 56 | static long Gcd(long a, long b) => b == 0 ? a : Gcd(b, a % b); | ^~~ a.cc:57:44: error: invalid pure specifier (only '= 0' is allowed) before 'a' 57 | static long Lcm(long a, long b) => a / Gcd(a, b) * b; | ^ a.cc:57:21: error: initializer specified for static member function 'static long int ConsoleApp1::Program::Lcm(long int, long int)' 57 | static long Lcm(long a, long b) => a / Gcd(a, b) * b; | ^~~ a.cc:70:16: error: 'string' does not name a type 70 | static string Read() => Console.ReadLine(); | ^~~~~~ a.cc:71:33: error: invalid pure specifier (only '= 0' is allowed) before 'int' 71 | static int ReadInt() => int.Parse(Read()); | ^~~ a.cc:71:20: error: initializer specified for static member function 'static int ConsoleApp1::Program::ReadInt()' 71 | static int ReadInt() => int.Parse(Read()); | ^~~~~~~ a.cc:72:35: error: invalid pure specifier (only '= 0' is allowed) before 'long' 72 | static long ReadLong() => long.Parse(Read()); | ^~~~ a.cc:72:21: error: initializer specified for static member function 'static long int ConsoleApp1::Program::ReadLong()' 72 | static long ReadLong() => long.Parse(Read()); | ^~~~~~~~ a.cc:74:16: error: 'List' does not name a type 74 | static List<string> ReadSplit() => Read().Split().ToList(); | ^~~~ a.cc:75:16: error: 'List' does not name a type 75 | static List<int> ReadSplitInt() => Read().Split().Select(int.Parse).ToList(); | ^~~~ a.cc:76:16: error: 'List' does not name a type 76 | static List<long> ReadSplitLong() => Read().Split().Select(long.Parse).ToList(); | ^~~~ a.cc:78:27: error: 'object' has not been declared 78 | static void Print(object value) => Console.Write(value.ToString()); | ^~~~~~ a.cc:78:44: error: invalid pure specifier (only '= 0' is allowed) before 'Console' 78 | static void Print(object value) => Console.Write(value.ToString()); | ^~~~~~~ a.cc:78:21: error: initializer specified for static member function 'static void ConsoleApp1::Program::Print(int)' 78 | static void Print(object value) => Console.Write(value.ToString()); | ^~~~~ a.cc:79:29: error: 'object' has not been declared 79 | static void Println(object value) => Console.WriteLine(value.ToString()); | ^~~~~~ a.cc:79:46: error: invalid pure specifier (only '= 0' is allowed) before 'Console' 79 | static void Println(object value) => Console.WriteLine(value.ToString()); | ^~~~~~~ a.cc:79:21: error: initializer specified for static member function 'static void ConsoleApp1::Program::Println(int)' 79 | static void Println(object value) => Console.WriteLine(value.ToString()); | ^~~~~~~ a.cc:81:16: error: 'string' does not name a type 81 | static string Join<T>(IEnumerable<T> list) => string.Join("", list); | ^~~~~~ a.cc:82:6: error: expected ';' after class definition 82 | } | ^ | ; a.cc: In static member function 'static void ConsoleApp1::Program::A()': a.cc:17:13: error: 'var' was not declared in this scope 17 | var abc = ReadSplitInt(); | ^~~ a.cc:18:17: error: expected ';' before 'order' 18 | var order = abc.OrderBy(x => x).ToList(); | ^~~~~ a.cc:19:21: error: 'order' was not declared in this scope 19 | Println(order[0] + order[1]); | ^~~~~ a.cc: In static member function 'static bool ConsoleApp1::Program::IsDigit(int)': a.cc:42:13: error: 'var' was not declared in this scope 42 | var i = 0; | ^~~ a.cc:43:20: error: expected primary-expression before 'int' 43 | return int.TryParse(str, out i); | ^~~ a.cc:43:20: error: expected ';' before 'int' a.cc:43:23: error: expected unqualified-id before '.' token 43 | return int.TryParse(str, out i); | ^ a.cc: In static member function 'static int ConsoleApp1::Program::SumDigits(long int)': a.cc:48:24: error: request for member 'ToString' in 'num', which is of non-class type 'long int' 48 | return num.ToString().Select(x => x.ToString()).Sum(int.Parse); | ^~~~~~~~ a.cc:48:42: error: 'x' was not declared in this scope 48 | return num.ToString().Select(x => x.ToString()).Sum(int.Parse); | ^ a.cc:48:45: error: expected primary-expression before '>' token 48 | return num.ToString().Select(x => x.ToString()).Sum(int.Parse); | ^ a.cc:48:65: error: expected primary-expression before 'int' 48 | return num.ToString().Select(x => x.ToString()).Sum(int.Parse); | ^~~ a.cc: At global scope: a.cc:84:5: error: expected unqualified-id before 'public' 84 | public static class MyExtensions | ^~~~~~
s416531683
p03671
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c ; cin >> a >> b >> c; int answer = max(max(a,b),c) cout<< a + b + c -answer << endl; }
a.cc: In function 'int main()': a.cc:11:4: error: expected ',' or ';' before 'cout' 11 | cout<< a + b + c -answer << endl; | ^~~~
s648889161
p03671
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; int anko = max({a,b,c)}; int maojini = a+b+c - anko - min({a,b,c}); cout << anko + maojini << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:24: error: expected '}' before ')' token 7 | int anko = max({a,b,c)}; | ~ ^ a.cc:7:25: error: expected ',' or ';' before '}' token 7 | int anko = max({a,b,c)}; | ^ a.cc: At global scope: a.cc:8:17: error: 'a' was not declared in this scope 8 | int maojini = a+b+c - anko - min({a,b,c}); | ^ a.cc:8:19: error: 'b' was not declared in this scope 8 | int maojini = a+b+c - anko - min({a,b,c}); | ^ a.cc:8:21: error: 'c' was not declared in this scope 8 | int maojini = a+b+c - anko - min({a,b,c}); | ^ a.cc:8:25: error: 'anko' was not declared in this scope 8 | int maojini = a+b+c - anko - min({a,b,c}); | ^~~~ a.cc:8:37: error: 'a' was not declared in this scope 8 | int maojini = a+b+c - anko - min({a,b,c}); | ^ a.cc:8:39: error: 'b' was not declared in this scope 8 | int maojini = a+b+c - anko - min({a,b,c}); | ^ a.cc:8:41: error: 'c' was not declared in this scope 8 | int maojini = a+b+c - anko - min({a,b,c}); | ^ a.cc:8:35: error: no matching function for call to 'min(<brace-enclosed initializer list>)' 8 | int maojini = a+b+c - anko - min({a,b,c}); | ~~~^~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h: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: /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 a.cc:10:3: error: 'cout' does not name a type 10 | cout << anko + maojini << endl; | ^~~~ a.cc:12:3: error: expected unqualified-id before 'return' 12 | return 0; | ^~~~~~ a.cc:13:1: error: expected declaration before '}' token 13 | } | ^
s339293120
p03671
C++
#ifndef _GLIBCXX_NO_ASSERT #include <cassert> #endif #include <cctype> #include <cerrno> #include <cfloat> #include <ciso646> #include <climits> #include <clocale> #include <cmath> #include <csetjmp> #include <csignal> #include <cstdarg> #include <cstddef> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #if __cplusplus >= 201103L #include <ccomplex> #include <cfenv> #include <cinttypes> #include <cstdbool> #include <cstdint> #include <ctgmath> #include <cwchar> #include <cwctype> #endif // C++ #include <algorithm> #include <bitset> #include <complex> #include <deque> #include <exception> #include <fstream> #include <functional> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <iterator> #include <limits> #include <list> #include <locale> #include <map> #include <memory> #include <new> #include <numeric> #include <ostream> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdexcept> #include <streambuf> #include <string> #include <typeinfo> #include <utility> #include <valarray> #include <vector> #if __cplusplus >= 201103L #include <array> #include <atomic> #include <chrono> #include <condition_variable> #include <forward_list> #include <future> #include <initializer_list> #include <mutex> #include <random> #include <ratio> #include <regex> #include <scoped_allocator> #include <system_error> #include <thread> #include <tuple> #include <typeindex> #include <type_traits> #include <unordered_map> #include <unordered_set> #endif using namespace std; typedef long long ll; //typedef pair<int,int> Pint; typedef pair<ll, ll> P; //typedef pair<int, pair<int, int>> P; //typedef tuple<int,int,int> T; typedef vector<ll> vec; typedef vector<vec> mat; #define rep(i, n) for(ll i = 0; i < n; i++) #define revrep(i, n) for(ll i = n-1; i >= 0; i--) ll max(ll a, ll b){return (a > b) ? a : b;} ll min(ll a, ll b){return (a < b) ? a : b;} ll Mypow(ll x, ll k){ ll res = 1; while(k > 0){ if(k % 2) res *= x; x *= x; k /= 2; } return res; } ll INFL = 1000000000000000010;//10^18 = 2^60 int INF = 1000000000;//10^9 ll MOD = 1000000007; //vector<int> dy = {0,0,1,-1}; //vector<int> dx = {1,-1,0,0}; 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/bits/specfun.h:43, from /usr/include/c++/14/cmath:3906, from a.cc:10: /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:118:26: required from here 118 | 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)) | ~~~~~~^~~~~~~~~~
s159963822
p03671
C++
#include<iostream> #include<algorithm> #include<string> #include<vector> using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; int max = max(a,max(b,c)); cout << a+b+c-max << endl; }
a.cc: In function 'int main()': a.cc:9:24: error: 'max' cannot be used as a function 9 | int max = max(a,max(b,c)); | ~~~^~~~~ a.cc:9:29: error: 'max' cannot be used as a function 9 | int max = max(a,max(b,c)); | ^
s127129116
p03671
C++
#include<iostream> #include<numeric> #include<string> #include<vector> #include<algorithm> using namespace std; int main(){ int a,b,c,x; cin>>a>>b>>c; x=max(a,b,c); cout<<(a+b+c)-x<<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: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]': a.cc:10:7: required from here 10 | x=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)) | ~~~~~~^~~~~~~~~~
s465948201
p03671
C++
#include<iostream> 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:5:12: error: no matching function for call to 'min(<brace-enclosed initializer list>)' 5 | cout<<min({(a+b),(b+c),(c+a)}); | ~~~^~~~~~~~~~~~~~~~~~~~~ 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
s916030904
p03671
C++
#include <iostream> #include <string> #include <cmath> #include <sstream> #include <iomanip> using namespace std; int main(int argc, char* argv[]) { int a,b,c; cin >> a >> b >> c; cout << min(a+b,min(b+c,a+c) << endl; return 0; }
a.cc: In function 'int main(int, char**)': a.cc:17:38: error: invalid operands of types 'const int' and '<unresolved overloaded function type>' to binary 'operator<<' 17 | cout << min(a+b,min(b+c,a+c) << endl; | ~~~~~~~~~~~~~^~~~~~~
s367885364
p03671
C++
a, b, c = map(int, input().split()) print(a + b + c - max(a, b, c))
a.cc:1:1: error: 'a' does not name a type 1 | a, b, c = map(int, input().split()) | ^
s092410287
p03671
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,c,d; cin >> a >> b >> c; d = max(a,max(b,c)) cout << a+b+c-d << endl; }
a.cc: In function 'int main()': a.cc:7:22: error: expected ';' before 'cout' 7 | d = max(a,max(b,c)) | ^ | ; 8 | cout << a+b+c-d << endl; | ~~~~
s832043021
p03671
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main ( ) { ll a,b,c; cin>>a>b>>c; cout<<min(min(a+b,a+c),b+c)<<endl; }
a.cc: In function 'int main()': a.cc:7:9: error: no match for 'operator>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'll' {aka 'long long int'}) 7 | cin>>a>b>>c; | ~~~~~~^~~~~ | | | | | ll {aka long long int} | std::basic_istream<char>::__istream_type {aka std::basic_istream<char>} a.cc:7:9: note: candidate: 'operator>(int, ll {aka long long int})' (built-in) 7 | cin>>a>b>>c; | ~~~~~~^~~~~ a.cc:7: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:7:13: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | 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:7: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>' 7 | 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:7:13: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | 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:7:13: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'll' {aka 'long long int'} 7 | 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:7:13: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | 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:7:13: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'll' {aka 'long long int'} 7 | 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:7:13: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | 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:7:13: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::pair<_T1, _T2>' 7 | 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:7:13: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 7 | 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:7:13: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 7 | 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:7:13: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 7 | 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:7:13: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 7 | 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:7:13: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 7 | 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:7:13: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 7 | 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:7:13: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'long long int' 7 | 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>&)
s530114120
p03671
C++
#include<iostream> using namespace std; int main(){ int a,b,c,max,sum; cin >> a >> b >> c; sum = a+b+c; max = (a>b && a>c)? a: (b>c? b :c); cout << sum - man << endl; }
a.cc: In function 'int main()': a.cc:8:19: error: 'man' was not declared in this scope; did you mean 'max'? 8 | cout << sum - man << endl; | ^~~ | max
s733708792
p03671
C++
#include<iostream> using namespace std; int main(){ int a,b,c,max,sum; cin >> a >> b >> c; sum = a+b+c; max = a>b && a>c? a: b>c? b :c; cout << sum - man << endl; }
a.cc: In function 'int main()': a.cc:8:19: error: 'man' was not declared in this scope; did you mean 'max'? 8 | cout << sum - man << endl; | ^~~ | max
s218713550
p03671
C++
#include<iostream> using namespace std; int main(){ int a,b,c,max,sum; cin >> a >> b >> c; sum = a+b+c; max = a>b && a>c? a: b>c? b :c; cout << sum - min << endl; }
a.cc: In function 'int main()': a.cc:8:17: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator-' 8 | cout << sum - min << endl; | ~~~~^~~~~
s184532686
p03671
C++
#include<iostream> using namespace std; int main(){ int a,b,c,max,sum; cin >> a >> b >> c; sum = a+b+c; max = a>b && a>c? a: b>c? b :c; cout << sum - min << endl; }
a.cc: In function 'int main()': a.cc:8:17: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator-' 8 | cout << sum - min << endl; | ~~~~^~~~~
s894405065
p03671
C++
a= list(map(int,input().split())) a.sort() print(a[0]+a[1])
a.cc:1:1: error: 'a' does not name a type 1 | a= list(map(int,input().split())) | ^
s438003308
p03671
C++
#include <iostream> #include <algorithm> #include <math.h> #include <stdio.h> using namespace std; int main(){ int a, b, c; cin>>a>>b>>c; int max = <int>max({a, b, c}); cout<<a+b+c-max<<endl; return 0; }
a.cc: In function 'int main()': a.cc:10:15: error: expected primary-expression before '<' token 10 | int max = <int>max({a, b, c}); | ^ a.cc:10:16: error: expected primary-expression before 'int' 10 | int max = <int>max({a, b, c}); | ^~~
s602523660
p03671
C++
#include <iostream> #include <algorithm> #include <math.h> #include <stdio.h> using namespace std; int main(){ int a, b, c; cin>>a>>b>>c; int max = max<int>({a, b, c}); cout<<a+b+c-max<<endl; return 0; }
a.cc: In function 'int main()': a.cc:10:19: error: expected primary-expression before 'int' 10 | int max = max<int>({a, b, c}); | ^~~
s910496873
p03671
C++
#include <iostream> #include <algorithm> #include <math.h> #include <stdio.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; return 0; }
a.cc: In function 'int main()': a.cc:10:18: error: 'max' cannot be used as a function 10 | int max = max({a, b, c}); | ~~~^~~~~~~~~~~
s119887370
p03671
C++
#include <iostream> #include <algorithm> #include <math.h> #include <stdio.h> using namespace std; int main(){ int a, b, c; cin>>a>>b>>c; int max = <int>max({a, b, c}); cout<<a+b+c-max<<endl; return 0; }
a.cc: In function 'int main()': a.cc:10:15: error: expected primary-expression before '<' token 10 | int max = <int>max({a, b, c}); | ^ a.cc:10:16: error: expected primary-expression before 'int' 10 | int max = <int>max({a, b, c}); | ^~~
s603946383
p03671
C++
#include <iostream> #include <algorithm> #include <math.h> #include <stdio.h> using namespace std; int main(){ int a, b, c; cin>>a>>b>>c; int max = max<int>({a, b, c}); cout<<a+b+c-max<<endl; return 0; }
a.cc: In function 'int main()': a.cc:10:19: error: expected primary-expression before 'int' 10 | int max = max<int>({a, b, c}); | ^~~
s969449827
p03671
C++
import sys, os f = lambda:list(map(int,input().split())) if 'local' in os.environ : sys.stdin = open('./input.txt', 'r') def solve(): a,b,c = f() print(a+b+c - max(a,b,c)) solve()
a.cc:4:4: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes 4 | if 'local' in os.environ : | ^~~~~~~ a.cc:5:22: warning: multi-character literal with 11 characters exceeds 'int' size of 4 bytes 5 | sys.stdin = open('./input.txt', 'r') | ^~~~~~~~~~~~~ a.cc:1:1: error: 'import' does not name a type 1 | import sys, os | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
s155027707
p03671
C++
a
a.cc:1:1: error: 'a' does not name a type 1 | a | ^
s358482953
p03671
C++
#include "bits/stdc++.h" using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; vector<int> vec; vec.push_back(a,b,c); sort(vec.begin(),vec.end()); cout << vec[0] + vec[1] << endl; }
a.cc: In function 'int main()': a.cc:7:16: error: no matching function for call to 'std::vector<int>::push_back(int&, int&, int&)' 7 | vec.push_back(a,b,c); | ~~~~~~~~~~~~~^~~~~~~ In file included from /usr/include/c++/14/vector:66, from /usr/include/c++/14/functional:64, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53, from a.cc:1: /usr/include/c++/14/bits/stl_vector.h:1283:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; value_type = int]' 1283 | push_back(const value_type& __x) | ^~~~~~~~~ /usr/include/c++/14/bits/stl_vector.h:1283:7: note: candidate expects 1 argument, 3 provided /usr/include/c++/14/bits/stl_vector.h:1300:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = int; _Alloc = std::allocator<int>; value_type = int]' 1300 | push_back(value_type&& __x) | ^~~~~~~~~ /usr/include/c++/14/bits/stl_vector.h:1300:7: note: candidate expects 1 argument, 3 provided
s985239780
p03671
C++
#include<iostream> #include<numeric> #include<vector> using namespace std; int main(){ vector<int> m[3]; cin>>m[0]>>m[1]>>m[2]; cout<<accumulate(m,m+3,0)-max(m.begin(),m.end()); }
a.cc: In function 'int main()': a.cc:7:6: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<int>') 7 | cin>>m[0]>>m[1]>>m[2]; | ~~~^~~~~~ | | | | | std::vector<int> | std::istream {aka std::basic_istream<char>} In file included from /usr/include/c++/14/iostream:42, from a.cc:1: /usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 170 | operator>>(bool& __n) | ^~~~~~~~ /usr/include/c++/14/istream:170:24: note: no known conversion for argument 1 from 'std::vector<int>' to 'bool&' 170 | operator>>(bool& __n) | ~~~~~~^~~ /usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]' 174 | operator>>(short& __n); | ^~~~~~~~ /usr/include/c++/14/istream:174:25: note: no known conversion for argument 1 from 'std::vector<int>' to 'short int&' 174 | operator>>(short& __n); | ~~~~~~~^~~ /usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 177 | operator>>(unsigned short& __n) | ^~~~~~~~ /usr/include/c++/14/istream:177:34: note: no known conversion for argument 1 from 'std::vector<int>' to 'short unsigned int&' 177 | operator>>(unsigned short& __n) | ~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]' 181 | operator>>(int& __n); | ^~~~~~~~ /usr/include/c++/14/istream:181:23: note: no known conversion for argument 1 from 'std::vector<int>' to 'int&' 181 | operator>>(int& __n); | ~~~~~^~~ /usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 184 | operator>>(unsigned int& __n) | ^~~~~~~~ /usr/include/c++/14/istream:184:32: note: no known conversion for argument 1 from 'std::vector<int>' to 'unsigned int&' 184 | operator>>(unsigned int& __n) | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 188 | operator>>(long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:188:24: note: no known conversion for argument 1 from 'std::vector<int>' to 'long int&' 188 | operator>>(long& __n) | ~~~~~~^~~ /usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 192 | operator>>(unsigned long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:192:33: note: no known conversion for argument 1 from 'std::vector<int>' to 'long unsigned int&' 192 | operator>>(unsigned long& __n) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 199 | operator>>(long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:199:29: note: no known conversion for argument 1 from 'std::vector<int>' to 'long long int&' 199 | operator>>(long long& __n) | ~~~~~~~~~~~^~~ /usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 203 | operator>>(unsigned long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:203:38: note: no known conversion for argument 1 from 'std::vector<int>' to 'long long unsigned int&' 203 | operator>>(unsigned long long& __n) | ~~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 219 | operator>>(float& __f) | ^~~~~~~~ /usr/include/c++/14/istream:219:25: note: no known conversion for argument 1 from 'std::vector<int>' to 'float&' 219 | operator>>(float& __f) | ~~~~~~~^~~ /usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 223 | operator>>(double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:223:26: note: no known conversion for argument 1 from 'std::vector<int>' to 'double&' 223 | operator>>(double& __f) | ~~~~~~~~^~~ /usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 227 | operator>>(long double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:227:31: note: no known conversion for argument 1 from 'std::vector<int>' to 'long double&' 227 | operator>>(long double& __f) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 328 | operator>>(void*& __p) | ^~~~~~~~ /usr/include/c++/14/istream:328:25: note: no known conversion for argument 1 from 'std::vector<int>' to 'void*&' 328 | operator>>(void*& __p) | ~~~~~~~^~~ /usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 122 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:122:36: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'} 122 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]' 126 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:126:32: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 126 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 133 | operator>>(ios_base& (*__pf)(ios_base&)) | ^~~~~~~~ /usr/include/c++/14/istream:133:30: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::ios_base& (*)(std::ios_base&)' 133 | operator>>(ios_base& (*__pf)(ios_base&)) | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:352:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; __streambuf_type = std::basic_streambuf<char>]' 352 | operator>>(__streambuf_type* __sb); | ^~~~~~~~ /usr/include/c++/14/istream:352:36: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::basic_istream<char>::__streambuf_type*' {aka 'std::basic_streambuf<char>*'} 352 | operator>>(__streambuf_type* __sb); | ~~~~~~~~~~~~~~~~~~^~~~ In file included from /usr/include/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/ostre
s315172189
p03671
C++
#include<iostream> #include<numeric> using namespace std; int main(){ int m[3]; cin>>m[0]>>m[1]>>m[2]; cout<<accumulate(m,m+3,0)-max(m.begin(),m.end()); }
a.cc: In function 'int main()': a.cc:7:35: error: request for member 'begin' in 'm', which is of non-class type 'int [3]' 7 | cout<<accumulate(m,m+3,0)-max(m.begin(),m.end()); | ^~~~~ a.cc:7:45: error: request for member 'end' in 'm', which is of non-class type 'int [3]' 7 | cout<<accumulate(m,m+3,0)-max(m.begin(),m.end()); | ^~~
s972303089
p03671
C++
#include<iostream> using namespace std; int main(){ int m[3]; cin>>m[0]>>m[1]>>m[2]; cout<<accumulate(m,m+3,0)-max(m.begin(),m.end()); }
a.cc: In function 'int main()': a.cc:6:9: error: 'accumulate' was not declared in this scope 6 | cout<<accumulate(m,m+3,0)-max(m.begin(),m.end()); | ^~~~~~~~~~ a.cc:6:35: error: request for member 'begin' in 'm', which is of non-class type 'int [3]' 6 | cout<<accumulate(m,m+3,0)-max(m.begin(),m.end()); | ^~~~~ a.cc:6:45: error: request for member 'end' in 'm', which is of non-class type 'int [3]' 6 | cout<<accumulate(m,m+3,0)-max(m.begin(),m.end()); | ^~~
s317230725
p03671
C++
#include<iostream> using namespace std; int main(){ int m[3]; cin>>m[0]>>m[1]>>m[2]; cout<<accumulate(m.begin(),m.end(),0)-max(m.begin(),m.end()); }
a.cc: In function 'int main()': a.cc:6:22: error: request for member 'begin' in 'm', which is of non-class type 'int [3]' 6 | cout<<accumulate(m.begin(),m.end(),0)-max(m.begin(),m.end()); | ^~~~~ a.cc:6:32: error: request for member 'end' in 'm', which is of non-class type 'int [3]' 6 | cout<<accumulate(m.begin(),m.end(),0)-max(m.begin(),m.end()); | ^~~ a.cc:6:9: error: 'accumulate' was not declared in this scope 6 | cout<<accumulate(m.begin(),m.end(),0)-max(m.begin(),m.end()); | ^~~~~~~~~~ a.cc:6:47: error: request for member 'begin' in 'm', which is of non-class type 'int [3]' 6 | cout<<accumulate(m.begin(),m.end(),0)-max(m.begin(),m.end()); | ^~~~~ a.cc:6:57: error: request for member 'end' in 'm', which is of non-class type 'int [3]' 6 | cout<<accumulate(m.begin(),m.end(),0)-max(m.begin(),m.end()); | ^~~
s173632088
p03671
C++
#include<iostream> using namespace std; int main(){ int m[3]; cin>>m[0]>>m[1]>>m[2]; cout<<accumulate(m,m+m.size(),0)-max(m.begin(),m.end()); }
a.cc: In function 'int main()': a.cc:6:26: error: request for member 'size' in 'm', which is of non-class type 'int [3]' 6 | cout<<accumulate(m,m+m.size(),0)-max(m.begin(),m.end()); | ^~~~ a.cc:6:9: error: 'accumulate' was not declared in this scope 6 | cout<<accumulate(m,m+m.size(),0)-max(m.begin(),m.end()); | ^~~~~~~~~~ a.cc:6:42: error: request for member 'begin' in 'm', which is of non-class type 'int [3]' 6 | cout<<accumulate(m,m+m.size(),0)-max(m.begin(),m.end()); | ^~~~~ a.cc:6:52: error: request for member 'end' in 'm', which is of non-class type 'int [3]' 6 | cout<<accumulate(m,m+m.size(),0)-max(m.begin(),m.end()); | ^~~
s184378788
p03671
C++
#include<iostream> using namespace std; int main(){ int m[3]; cin>>m[0]>>m[1]>>m[2]; cout<<sum(m)-max(m); }
a.cc: In function 'int main()': a.cc:6:9: error: 'sum' was not declared in this scope 6 | cout<<sum(m)-max(m); | ^~~ a.cc:6:19: error: no matching function for call to 'max(int [3])' 6 | cout<<sum(m)-max(m); | ~~~^~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)' 257 | max(const _Tp& __a, const _Tp& __b) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate expects 2 arguments, 1 provided /usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)' 303 | max(const _Tp& __a, const _Tp& __b, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate expects 3 arguments, 1 provided
s981448775
p03671
C++
#include <bits/stdc++.h> using namespace std; int main() { int A,B,C; cin>>A>>B>>C; cout<<min(A+B,min(B+C,A+C))<<endl }
a.cc: In function 'int main()': a.cc:7:36: error: expected ';' before '}' token 7 | cout<<min(A+B,min(B+C,A+C))<<endl | ^ | ; 8 | } | ~
s677612720
p03671
C++
#include<iostream> #include<stdio.h> #include<string.h> #include<algorithm> #include<vector> #include<queue> #include<map> #include<set> #include<iomanip> #define REP(i,n) for (int i = 0; (i) < (n); ++ (i)) using namespace std; int a,b; int main(){ cin >> a >> b >> c; int ans = min(a+b,b+c); ans = min(ans, a+c); cout << ans << endl; return 0; }
a.cc: In function 'int main()': a.cc:19:20: error: 'c' was not declared in this scope 19 | cin >> a >> b >> c; | ^
s122496993
p03671
C++
#include<iostream> #include<algorithm> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; cout<<min([a+b,a+c,b+c])<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:15: error: expected ',' before '+' token 9 | cout<<min([a+b,a+c,b+c])<<endl; | ^ | , a.cc:9:15: error: expected identifier before '+' token a.cc:9:17: error: expected ']' before ',' token 9 | cout<<min([a+b,a+c,b+c])<<endl; | ^ | ] a.cc: In lambda function: a.cc:9:17: error: expected '{' before ',' token a.cc: In function 'int main()': a.cc:9:25: error: expected ')' before ']' token 9 | cout<<min([a+b,a+c,b+c])<<endl; | ~ ^ | )
s462014256
p03671
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; cout << min(min(a+b,b+c),a+c)
a.cc: In function 'int main()': a.cc:7:32: error: expected ';' at end of input 7 | cout << min(min(a+b,b+c),a+c) | ^ | ; a.cc:7:32: error: expected '}' at end of input a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s670677796
p03671
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,c,d,e; cin>>a>>c>>d; e=max(a,max(c,d)) if(a==e){ cout<<c+d<<endl; } else if(c==e){ cout<<a+d<<endl; } else{ cout<<a+c<<endl; } }
a.cc: In function 'int main()': a.cc:7:18: error: expected ';' before 'if' 7 | e=max(a,max(c,d)) | ^ | ; 8 | if(a==e){ | ~~ a.cc:11:3: error: 'else' without a previous 'if' 11 | else if(c==e){ | ^~~~
s086774207
p03671
Java
import java.util.*; public class Main{ public static void main(String[]args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] a = new int[n]; for(int i = 0; i < n; i++){ a[i] = sc.nextInt(); } if(n%2 == 0){ for(int i = n-1; i < n; i-=2){ System.out.print(a[i]+" "); } for(int i = 0; i < n; i+=2){ System.out.print(a[i]+" "); } }else{ for(int i=n-1; i>=0; i-=2){ System.out.print(a[i]+" "); } for(int i=1; i<n; i+=2){ System.out.print(a[i]+" "); } } }
Main.java:26: error: reached end of file while parsing } ^ 1 error
s260532596
p03671
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(); int[] a = new int[3]; for(int i= 0; i<3; i++) a[i] = sc.nextInt(); Arrays.sort(a); System.out.println(a[0]+a[1]); } }
Main.java:5: error: no suitable constructor found for Scanner(no arguments) Scanner sc = new Scanner(); ^ constructor Scanner.Scanner(Readable,Pattern) is not applicable (actual and formal argument lists differ in length) constructor Scanner.Scanner(Readable) is not applicable (actual and formal argument lists differ in length) constructor Scanner.Scanner(InputStream) is not applicable (actual and formal argument lists differ in length) constructor Scanner.Scanner(InputStream,String) is not applicable (actual and formal argument lists differ in length) constructor Scanner.Scanner(InputStream,Charset) is not applicable (actual and formal argument lists differ in length) constructor Scanner.Scanner(File) is not applicable (actual and formal argument lists differ in length) constructor Scanner.Scanner(File,String) is not applicable (actual and formal argument lists differ in length) constructor Scanner.Scanner(File,Charset) is not applicable (actual and formal argument lists differ in length) constructor Scanner.Scanner(File,CharsetDecoder) is not applicable (actual and formal argument lists differ in length) constructor Scanner.Scanner(Path) is not applicable (actual and formal argument lists differ in length) constructor Scanner.Scanner(Path,String) is not applicable (actual and formal argument lists differ in length) constructor Scanner.Scanner(Path,Charset) is not applicable (actual and formal argument lists differ in length) constructor Scanner.Scanner(String) is not applicable (actual and formal argument lists differ in length) constructor Scanner.Scanner(ReadableByteChannel) is not applicable (actual and formal argument lists differ in length) constructor Scanner.Scanner(ReadableByteChannel,String) is not applicable (actual and formal argument lists differ in length) constructor Scanner.Scanner(ReadableByteChannel,Charset) is not applicable (actual and formal argument lists differ in length) 1 error
s773602634
p03671
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(); int[] a = new int[3]; for(int = i; i<3; i++) a[i] = sc.nextInt(); Arrays.sort(a); System.out.println(a[0]+a[1]); } }
Main.java:7: error: not a statement for(int = i; i<3; i++) a[i] = sc.nextInt(); ^ Main.java:7: error: ';' expected for(int = i; i<3; i++) a[i] = sc.nextInt(); ^ Main.java:7: error: illegal start of expression for(int = i; i<3; i++) a[i] = sc.nextInt(); ^ Main.java:7: error: not a statement for(int = i; i<3; i++) a[i] = sc.nextInt(); ^ Main.java:7: error: ')' expected for(int = i; i<3; i++) a[i] = sc.nextInt(); ^ Main.java:7: error: ';' expected for(int = i; i<3; i++) a[i] = sc.nextInt(); ^ 6 errors
s345517467
p03671
C++
include <iostream> #include <algorithm> #include <vector> using namespace std; int main(){ int a, b, c; vector<int> ans; cin >> a >> b >> c; ans.push_back(a+b); ans.push_back(a+c); ans.push_back(b+c); sort(ans.begin(), ans.end()); cout << ans[0] << endl; }
a.cc:1:1: error: 'include' does not name a type 1 | include <iostream> | ^~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/algorithm:60, from a.cc:2: /usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cxx::__is_null_pointer' redeclared as different kind of entity 164 | __is_null_pointer(std::nullptr_t) | ^ /usr/include/c++/14/ext/type_traits.h:159:5: note: previous declaration 'template<class _Type> constexpr bool __gnu_cxx::__is_null_pointer(_Type)' 159 | __is_null_pointer(_Type) | ^~~~~~~~~~~~~~~~~ /usr/include/c++/14/ext/type_traits.h:164:26: error: 'nullptr_t' is not a member of 'std' 164 | __is_null_pointer(std::nullptr_t) | ^~~~~~~~~ In file included from /usr/include/c++/14/bits/stl_pair.h:60, from /usr/include/c++/14/bits/stl_algobase.h:64: /usr/include/c++/14/type_traits:295:27: error: 'size_t' has not been declared 295 | template <typename _Tp, size_t = sizeof(_Tp)> | ^~~~~~ /usr/include/c++/14/type_traits:666:33: error: 'nullptr_t' is not a member of 'std' 666 | struct is_null_pointer<std::nullptr_t> | ^~~~~~~~~ /usr/include/c++/14/type_traits:666:42: error: template argument 1 is invalid 666 | struct is_null_pointer<std::nullptr_t> | ^ /usr/include/c++/14/type_traits:670:48: error: template argument 1 is invalid 670 | struct is_null_pointer<const std::nullptr_t> | ^ /usr/include/c++/14/type_traits:674:51: error: template argument 1 is invalid 674 | struct is_null_pointer<volatile std::nullptr_t> | ^ /usr/include/c++/14/type_traits:678:57: error: template argument 1 is invalid 678 | struct is_null_pointer<const volatile std::nullptr_t> | ^ /usr/include/c++/14/type_traits:984:26: error: 'size_t' has not been declared 984 | template<typename _Tp, size_t _Size> | ^~~~~~ /usr/include/c++/14/type_traits:985:40: error: '_Size' was not declared in this scope 985 | struct __is_array_known_bounds<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:985:46: error: template argument 1 is invalid 985 | struct __is_array_known_bounds<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:1429:37: error: 'size_t' is not a member of 'std' 1429 | : public integral_constant<std::size_t, alignof(_Tp)> | ^~~~~~ /usr/include/c++/14/type_traits:1429:57: error: template argument 1 is invalid 1429 | : public integral_constant<std::size_t, alignof(_Tp)> | ^ /usr/include/c++/14/type_traits:1429:57: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1438:37: error: 'size_t' is not a member of 'std' 1438 | : public integral_constant<std::size_t, 0> { }; | ^~~~~~ /usr/include/c++/14/type_traits:1438:46: error: template argument 1 is invalid 1438 | : public integral_constant<std::size_t, 0> { }; | ^ /usr/include/c++/14/type_traits:1438:46: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1440:26: error: 'std::size_t' has not been declared 1440 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/14/type_traits:1441:21: error: '_Size' was not declared in this scope 1441 | struct rank<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:1441:27: error: template argument 1 is invalid 1441 | struct rank<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:1442:37: error: 'size_t' is not a member of 'std' 1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^~~~~~ /usr/include/c++/14/type_traits:1442:65: error: template argument 1 is invalid 1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^ /usr/include/c++/14/type_traits:1442:65: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1446:37: error: 'size_t' is not a member of 'std' 1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^~~~~~ /usr/include/c++/14/type_traits:1446:65: error: template argument 1 is invalid 1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^ /usr/include/c++/14/type_traits:1446:65: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1451:32: error: 'size_t' was not declared in this scope 1451 | : public integral_constant<size_t, 0> { }; | ^~~~~~ /usr/include/c++/14/type_traits:64:1: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' 63 | #include <bits/version.h> +++ |+#include <cstddef> 64 | /usr/include/c++/14/type_traits:1451:41: error: template argument 1 is invalid 1451 | : public integral_constant<size_t, 0> { }; | ^ /usr/include/c++/14/type_traits:1451:41: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1453:26: error: 'size_t' has not been declared 1453 | template<typename _Tp, size_t _Size> | ^~~~~~ /usr/include/c++/14/type_traits:1454:23: error: '_Size' was not declared in this scope 1454 | struct extent<_Tp[_Size], 0> | ^~~~~ /usr/include/c++/14/type_traits:1454:32: error: template argument 1 is invalid 1454 | struct extent<_Tp[_Size], 0> | ^ /usr/include/c++/14/type_traits:1455:32: error: 'size_t' was not declared in this scope 1455 | : public integral_constant<size_t, _Size> { }; | ^~~~~~ /usr/include/c++/14/type_traits:1455:32: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' /usr/include/c++/14/type_traits:1455:40: error: '_Size' was not declared in this scope 1455 | : public integral_constant<size_t, _Size> { }; | ^~~~~ /usr/include/c++/14/type_traits:1455:45: error: template argument 1 is invalid 1455 | : public integral_constant<size_t, _Size> { }; | ^ /usr/include/c++/14/type_traits:1455:45: error: template argument 2 is invalid /usr/include/c++/14/type_traits:1457:42: error: 'size_t' has not been declared 1457 | template<typename _Tp, unsigned _Uint, size_t _Size> | ^~~~~~ /usr/include/c++/14/type_traits:1458:23: error: '_Size' was not declared in this scope 1458 | struct extent<_Tp[_Size], _Uint> | ^~~~~ /usr/include/c++/14/type_traits:1458:36: error: template argument 1 is invalid 1458 | struct extent<_Tp[_Size], _Uint> | ^ /usr/include/c++/14/type_traits:1463:32: error: 'size_t' was not declared in this scope 1463 | : public integral_constant<size_t, 0> { }; | ^~~~~~ /usr/include/c++/14/type_traits:1463:32: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' /usr/include/c++/14/type_traits:1463:41: error: template argument 1 is invalid 1463 | : public integral_constant<size_t, 0> { }; | ^ /usr/include/c++/14/type_traits:1463:41: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1857:26: error: 'size_t' does not name a type 1857 | { static constexpr size_t __size = sizeof(_Tp); }; | ^~~~~~ /usr/include/c++/14/type_traits:1857:26: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' /usr/include/c++/14/type_traits:1859:14: error: 'size_t' has not been declared 1859 | template<size_t _Sz, typename _Tp, bool = (_Sz <= _Tp::__size)> | ^~~~~~ /usr/include/c++/14/type_traits:1859:48: error: '_Sz' was not declared in this scope 1859 | template<size_t _Sz, typename _Tp, bool = (_Sz <= _Tp::__size)> | ^~~ /usr/include/c++/14/type_traits:1860:14: error: no default argument for '_Tp' 1860 | struct __select; | ^~~~~~~~ /usr/include/c++/14/type_traits:1862:14: error: 'size_t' has not been declared 1862 | template<size_t _Sz, typename _Uint, typename... _UInts> | ^~~~~~ /usr/include/c++/14/type_traits:1863:23: error: '_Sz' was not declared in this scope 1863 | struct __select<_Sz, _List<_Uint, _UInts...>, true> | ^~~ /usr/include/c++/14/type_traits:1863:57: error: template argument 1 is invalid 1863 | struct __select<_Sz, _List<_Uint, _UInts...>, true> | ^ /usr/include/c++/14/type_traits:1866:14: error: 'size_t' has not been declared 1866 | template<size_t _Sz, typename _Uint, typename... _UInts> | ^~~~~~ /usr/include/c++/14/type_traits:1867:23: error: '_Sz' was not declared in this scope 1867 | struct __select<_Sz, _List<_Uint, _UInts...>, false> | ^~~ /usr/include/c++/14/type_traits:1867:58: error: template argument 1 is invalid 1867 | struct __select<_Sz, _List<_Uint, _UInts...>, false>
s176530141
p03671
C++
#include <iostream> using namespace std; int main(){ int a[3]; for(int i=0;i<3;i++) cin >> a[i]; sort(a,a+3); cout << a[0]+a[1] << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:5: error: 'sort' was not declared in this scope; did you mean 'short'? 8 | sort(a,a+3); | ^~~~ | short
s897605222
p03671
C++
#include <iostream> using namespace std; typedef long long unsigned int ll; int main() { vector<int> a(3); cin >> a[0]; cin >>a[1]; cin >>a[2]; sort(a.begin(),a.end()); cout << a[0]+a[1] <<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:3: error: 'vector' was not declared in this scope 7 | vector<int> a(3); | ^~~~~~ a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 1 | #include <iostream> +++ |+#include <vector> 2 | using namespace std; a.cc:7:10: error: expected primary-expression before 'int' 7 | vector<int> a(3); | ^~~ a.cc:8:10: error: 'a' was not declared in this scope 8 | cin >> a[0]; | ^ a.cc:11:3: error: 'sort' was not declared in this scope; did you mean 'short'? 11 | sort(a.begin(),a.end()); | ^~~~ | short
s422060366
p03671
C++
#include<iostream> #include <algorithm> #include <string> #include<math.h> #define rep(i,n)for(int i=0;i<n;i++) using namespace std; int main() { int a, b, c; cin >> a >> b >> c; int d = a + b; int e = b + c; int f = c + a; int ans = min(d, e, f); cout << ans << endl; return 0; }
In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]': a.cc:13:18: required from here 13 | int ans = min(d, e, f); | ~~~^~~~~~~~~ /usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function 284 | if (__comp(__b, __a)) | ~~~~~~^~~~~~~~~~
s120026319
p03671
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; vector<int> v{ a, b, c }; v.sort( v.begin(), v.end() ); cout << v[0] + v[1] << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:5: error: 'class std::vector<int>' has no member named 'sort' 9 | v.sort( v.begin(), v.end() ); | ^~~~
s025725169
p03671
C++
#include<bits/stdc++.h> using namespace std; int main(){ vector<int>value(3); for (int i = 0; i < 3; ++i) { cin >> value.at(i); } sort(value.begin(),value.end()); int sum = value(0) + value(1); cout << sum << endl; }
a.cc: In function 'int main()': a.cc:11:24: error: no match for call to '(std::vector<int>) (int)' 11 | int sum = value(0) + value(1); | ~~~~~^~~ a.cc:11:35: error: no match for call to '(std::vector<int>) (int)' 11 | int sum = value(0) + value(1); | ~~~~~^~~
s645875424
p03671
C++
#include<iostream> #include<string> #include <algorithm> using namespace std; int main() { int a, b, c; int sm[3]; cin >> a >> b >> c; sm[0] = a+b; sm[1] = b+c; sm[2] = c+a; cout << *min_element(sm.begin(), sm.end()) << endl; return 0; }
a.cc: In function 'int main()': a.cc:15:29: error: request for member 'begin' in 'sm', which is of non-class type 'int [3]' 15 | cout << *min_element(sm.begin(), sm.end()) << endl; | ^~~~~ a.cc:15:41: error: request for member 'end' in 'sm', which is of non-class type 'int [3]' 15 | cout << *min_element(sm.begin(), sm.end()) << endl; | ^~~
s001975017
p03671
C++
#include<iostream> #include<algorithm> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; int maxv=max(a,b);int minv=min(a,b); maxv=max(maxv,c);minv=min(miv,c); cout<<maxv+minv<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:35: error: 'miv' was not declared in this scope; did you mean 'minv'? 9 | maxv=max(maxv,c);minv=min(miv,c); | ^~~ | minv
s875258213
p03671
C++
#include <bits/stdc++.h> using namespace std; int main () { vector<int> data(3); for(int i = 0; i < N; i++) { cin >> data.at(i); } sort(data.begin(),data.end()); cout << data.at(0) + data.at(1) << endl; return 0; }
a.cc: In function 'int main()': a.cc:5:22: error: 'N' was not declared in this scope 5 | for(int i = 0; i < N; i++) { | ^
s370185344
p03671
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a, b, c; cin >> a >> b >> c; if (a < b && b < c) { cout << a + b << endl; } else if (a < b && a > c) { cout << a + c << endl; } else if (a > b && b > c) { cout << b + c << endl; } else if (a == b && b > c) {   cout << a + c << endl; } else if (a == c && a > b) { cout << a + b << endl; } else if (b == c && b > a) { cout << b + a << endl; } else if (a == b && a < c) { cout << a + b << endl; } else if (a == c && a < b) { cout << a + c << endl; } else if (b == c && b < a) { cout << b + c << endl; } else { cout << a + b << endl; } }
a.cc:17:1: error: extended character   is not valid in an identifier 17 |   cout << a + c << endl; | ^ a.cc:17:1: error: extended character   is not valid in an identifier a.cc: In function 'int main()': a.cc:17:1: error: '\U00003000\U00003000cout' was not declared in this scope 17 |   cout << a + c << endl; | ^~~~~~~~
s825965759
p03671
C++
#include<iostream> #include<algorithm> #include<string> using namespace std; int main(void) { int x[3]; cin >> x[0] >> x[1] >> x[2]; sort(x.begin(),x.end()); cout << x[0] + x[1] << endl; return 0; }
a.cc: In function 'int main()': a.cc:10:12: error: request for member 'begin' in 'x', which is of non-class type 'int [3]' 10 | sort(x.begin(),x.end()); | ^~~~~ a.cc:10:22: error: request for member 'end' in 'x', which is of non-class type 'int [3]' 10 | sort(x.begin(),x.end()); | ^~~
s931959374
p03671
C++
#include <bits/stdc++.h> using namespace std; int main () { int a,b,c; cin >> a >> b >> c; cout << min((a+b),(a+c),(b+c)) ; }
In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]': a.cc:8:14: required from here 8 | cout << min((a+b),(a+c),(b+c)) ; | ~~~^~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function 284 | if (__comp(__b, __a)) | ~~~~~~^~~~~~~~~~
s907875952
p03671
C++
#include <bits/stdc++.h> using namespace std; itn main () { int a,b,c; cin >> a >> b >> c; cout << min((a+b),(a+c),(b+c)) ; }
a.cc:4:1: error: 'itn' does not name a type; did you mean 'int'? 4 | itn main () { | ^~~ | int