submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s067112214
p03671
C++
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <map> #include <cmath> #include <queue> #include <set> #include <stack> #include <numeric> #include <bitset> #include <math.h> #include <iomanip> #include <sstream> #include <cstdlib> using namespace std; typedef long long ll; //マクロ...
a.cc: In function 'int main()': a.cc:97:29: error: expected primary-expression before ']' token 97 | ios::sync_with_stdio(false);] | ^ a.cc:99:19: error: invalid types '<unresolved overloaded function type>[ll {aka long long int}]' for array subscript 99 | REP(i,3) cin>>data[i]; ...
s469918202
p03671
C++
#include <iostream> #include <algorithm> #include <cmath> #include <vector> #include <stack> #include <queue> #include <map> #include <string> using namespace std; int main() { int ans,n, m; char str[222]; cin >> str; int n = strlen(str); for (int i = n - 2; i; i -= 2) { if (strncmp(str, str + i / 2, i / 2) == ...
a.cc: In function 'int main()': a.cc:16:13: error: redeclaration of 'int n' 16 | int n = strlen(str); | ^ a.cc:13:17: note: 'int n' previously declared here 13 | int ans,n, m; | ^ a.cc:16:17: error: 'strlen' was not declared in this scope 16 | int...
s921109253
p03671
C++
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; using ll = long long; int main() { int a, b, c; cin >> a >> b >> c; cout << a + b + c - max(a, b, c) << endl; return 0; }
In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int...
s360004932
p03671
C++
#include<iostream> #include<algorithm> using namespace std; ina main(){ int a,b,c; cin>>a>>b>>c; cout<<min({a+b,a+c,b+c}); return 0; }
a.cc:4:1: error: 'ina' does not name a type; did you mean 'int'? 4 | ina main(){ | ^~~ | int
s296955512
p03671
C++
#include<bits/stdc++.h> using namespace std; int main() { long long int a,b,c,s=0; cin>>a>b>>c; s+=min(a,b); s+=min(b,c); cout<<s; }
a.cc: In function 'int main()': a.cc:6:9: error: no match for 'operator>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'long long int') 6 | cin>>a>b>>c; | ~~~~~~^~~~~ | | | | | long long int | std::basic_istream<c...
s652121517
p03671
C++
#include <bits/stdc++.h> #define fi first #define se second #define rep(i, s, n) for (int i = (s); i < (n); ++i) #define rrep(i, n, g) for (int i = (n)-1; i >= (g); --i) #define all(a) a.begin(), a.end() #define rall(a) a.rbegin(), a.rend() #define len(x) (int)(x).size() #define dup(x, y) (((x) + (y)-1) / (y)) #define ...
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...
s132354094
p03671
C++
#include <iostream> using namespace std; int main() { int a,b,c,x,y,z; cin>>a>>b>>; x=a+b; y=a+c; z=c+b; if(x<y&&x<z) cout<<x; else if(y<x&&y<z) cout<<y; else if(z<x&&z<y) cout<<z; else cout<<x; return 0; }
a.cc: In function 'int main()': a.cc:9:12: error: expected primary-expression before ';' token 9 | cin>>a>>b>>; | ^
s675781988
p03671
C++
#include <iostream> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; if(a+b<<a+c&&a+b<<c+b) cout<<a+b; else if(a+c<<a+b&&a+c<<c+b) cout<<a+c; else if(b+c<<a+b&&c+b<<a+c) cout<<c+b; else if(a+b==a+c&&a+b==z&&a+c==b+c) cout<<a+b; return 0; }
a.cc: In function 'int main()': a.cc:18:19: error: 'z' was not declared in this scope 18 | if(a+b==a+c&&a+b==z&&a+c==b+c) | ^
s698966496
p03671
C++
#include <iostream> #include<vector> #include<algorithm> #include<string> #include<cmath> #include<set> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; int ans1 = a + b; int ans2 = a + c; int ans3 = b + c; cout << sort({ ans1,ans2,ans3 }) << endl; }
a.cc: In function 'int main()': a.cc:19:21: error: no matching function for call to 'sort(<brace-enclosed initializer list>)' 19 | cout << sort({ ans1,ans2,ans3 }) << endl; | ~~~~^~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:61, from a.cc:3: /...
s191477643
p03671
C++
/* Contest 066 A - ringring Rakesh Kumar --> 01/09/2020 */ #include <bits/stdc++.h> int main() { std::ios_base::sync_with_stdio(false); std::cin.tie(0); std::cout.tie(0); int a = 0, b = 0, c = 0; std::cint >> a >> b >> c; std::cout << std::min(a + b, std::min(b + c, a + c)) << std::endl; ...
a.cc: In function 'int main()': a.cc:14:10: error: 'cint' is not a member of 'std'; did you mean 'rint'? 14 | std::cint >> a >> b >> c; | ^~~~ | rint
s070001071
p03671
C
#include <stdio.h> int main() { int a, b, c, ab, ac, bc; scanf("%d %d %d", &a, &b, &c); ab = a+b; ac = a+c; bc = b+c; if(ab<ac && ab<bc) { printf("%d", ab); } else if(ac<ab && ac<bc) { printf("%d", ac); } else { printf("%d", bc); } retu...
main.c: In function 'main': main.c:21:5: error: expected declaration or statement at end of input 21 | return 0; | ^~~~~~
s252143078
p03671
C++
#include<iostream> #include<vector> #include<algorithm> using namesapce std; int main(){ vector<int>v(3); for(int i=0;i<3;i++) { cin>>v[i]; } sort(v.begin(),v.end()); cout<<v[0]+v[1]; }
a.cc:4:7: error: expected nested-name-specifier before 'namesapce' 4 | using namesapce std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:6:3: error: 'vector' was not declared in this scope 6 | vector<int>v(3); | ^~~~~~ a.cc:6:3: note: suggested alternatives: In file included from /usr/...
s142000652
p03671
C++
#include <bits/stdc++.h> using namespace std; int main() { int a , b ,c; vector<int> A(3); for ( int i=0 ; i<3 ; i++){ cin >> A.at(i); } sort ( A.begin() , A.end() ) cout << A.at(0)+A.at(1) << endl; }
a.cc: In function 'int main()': a.cc:11:31: error: expected ';' before 'cout' 11 | sort ( A.begin() , A.end() ) | ^ | ; 12 | cout << A.at(0)+A.at(1) << endl; | ~~~~
s421561269
p03671
C++
#include <bits/stdc++.h> using namespace std; int main() { int a , b ,c; int A[3]; for ( int i=0 ; i<3 ; i++){ cin >> A[i]; } sort ( A.begin() , A.end() ) cout << A[0]+A[1] << endl; }
a.cc: In function 'int main()': a.cc:11:12: error: request for member 'begin' in 'A', which is of non-class type 'int [3]' 11 | sort ( A.begin() , A.end() ) | ^~~~~ a.cc:11:24: error: request for member 'end' in 'A', which is of non-class type 'int [3]' 11 | sort ( A.begin() , A.end() ) ...
s119990414
p03671
C++
#include <bits/stdc++.h> using namespace std; int main() { int A, B, C; cin >> A >> B >> C; cout << min(A + B, B + C, C + A) << endl; }
In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int...
s667417973
p03671
C
#include <stdio.h> int main(void) { int a,b,c,max,s; scanf("%d%d%d",&a,&b,&c); s=a+b+c; if(a>b && b>c)max=a else if(a<b && a>c)max=b; else max=c; printf("%d",s-max); return 0; }
main.c: In function 'main': main.c:8:22: error: expected ';' before 'else' 8 | if(a>b && b>c)max=a | ^ | ; 9 | else if(a<b && a>c)max=b; | ~~~~
s768570375
p03671
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; cout<<a+b+c-min{(a,b,c)}<<endl; }
a.cc: In function 'int main()': a.cc:7:14: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator-' 7 | cout<<a+b+c-min{(a,b,c)}<<endl; | ~~~~~^~~~ a.cc:7:27: error: expected primary-expression before '<<' token 7 | cout<<a+b+c-min{(a,b,c)}<<endl...
s400895103
p03671
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; cout<<a+b+c-min{(a,b,c)}<<endl;
a.cc: In function 'int main()': a.cc:7:14: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator-' 7 | cout<<a+b+c-min{(a,b,c)}<<endl; | ~~~~~^~~~ a.cc:7:27: error: expected primary-expression before '<<' token 7 | cout<<a+b+c-min{(a,b,c)}<<endl...
s852655109
p03671
C++
#include <bits/stdc++.h> #include <vector> #include <algorithm> #include <iostream> using namespace std; int main() { vector<int> a.(3); for (int i=0; i<3; i++) { cin >> a.(i); } sort(a.begin(),a.end()); cout << a.at(0)+a.at(1) << endl; }
a.cc: In function 'int main()': a.cc:8:16: error: expected initializer before '.' token 8 | vector<int> a.(3); | ^ a.cc:10:12: error: 'a' was not declared in this scope 10 | cin >> a.(i); | ^ a.cc:10:14: error: expected unqualified-id before '(' token 10 | cin >...
s246743091
p03671
C++
#include <bits/stdc++.h> #include <vector> #include <algorithm> #include <iostream> using namespace std; int main() { int a, b, c, ans; cin >> a >> b >> c; ans=a+b+c-max(a,b,c); cout << ans << endl; }
In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int...
s040648075
p03671
C++
#include bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; cout << a+b+c-max(max(a,b),c) << endl; }
a.cc:1:10: error: #include expects "FILENAME" or <FILENAME> 1 | #include bits/stdc++.h> | ^~~~ a.cc: In function 'int main()': a.cc:6:3: error: 'cin' was not declared in this scope 6 | cin >> a >> b >> c; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probab...
s948164041
p03671
C++
#include<iostream> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; if(a==b&&b==c) { cout<<(2*a)<<endl; cout<<"Buying any two "<<(2*a)<<"yen."<<endl; } else if(a!=b!=c) { cout<<"Buying a "<<a<<"-yen bell and a "<<b<<"-yen bell costs "<<(a+b)<<" yen."<<endl; cout<<...
a.cc: In function 'int main()': a.cc:21:51: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and 'const char [6]') 21 | cout<<"The minimum among these is "<<(a+c)<" yen."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ | ...
s370225451
p03671
C++
#include<iostream> using namespace std; int main() { int a,b,c; int x,y,z; cin>>a>>b>>c; if(a==b&&b==c) { x=2*a; cout<<x<<endl; cout<<"Buying any two "<<x<<"yen."<<endl; } else if(a!=b!=c) { x=a+b; y=a+c; z=b+c; cout<<"Buying a "<<a<<"-yen bell and a "<<b<...
a.cc: In function 'int main()': a.cc:27:47: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and 'const char [6]') 27 | cout<<"The minimum among these is "<<y<" yen."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ | ...
s769589965
p03671
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class MAin { public static void main(String[] args) throws IOException { try (BufferedReader br = new BufferedReader( new InputStreamReader(System.in))) { String in = br.readLine(); String chr[] = in.split...
Main.java:5: error: class MAin is public, should be declared in a file named MAin.java public class MAin { ^ 1 error
s268465288
p03671
C++
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; #define rep(i, c) for (int i = 0; i < (int)c; i++) #define all(v) v.begin(), v.end() using ll = long long; using P = pair<int, int>; //const int inf = 1e9; //1(1倍)e(指数)9(10^9) //const ll MX = 1e18; //1(1倍)e(指数)18(10^18) //const ll MOD = 1e9 + 7; //100...
a.cc: In function 'int main()': a.cc:23:46: error: expected ';' before 'return' 23 | printf("%d\n", min(min(a, b) + c, a + b)) | ^ | ; 24 | return 0; | ~~~~~~ ...
s179727910
p03671
C++
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; #define rep(i, c) for (int i = 0; i < (int)c; i++) #define all(v) v.begin(), v.end() using ll = long long; using P = pair<int, int>; //const int inf = 1e9; //1(1倍)e(指数)9(10^9) //const ll MX = 1e18; //1(1倍)e(指数)18(10^18) //const ll MOD = 1e9 + 7; //100...
a.cc: In function 'int main()': a.cc:23:41: error: expected ';' before 'return' 23 | printf("%d\n", min(a, b) + c, a + b) | ^ | ; 24 | return 0; | ~~~~~~
s570905482
p03671
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner scanner = new Scanner(System.in); Integer A = scanner.nextInt(); Integer B = scanner.nextInt(); Integer C = scanner.nextInt(); Integer res1 = A + B; Integer res2 = A + ...
Main.java:25: error: cannot find symbol System.out.println(res3S); ^ symbol: variable res3S location: class Main 1 error
s320874740
p03671
C++
a,b,c= map(int,input().split()) print(min(a+b, b+c, c+a))
a.cc:1:1: error: 'a' does not name a type 1 | a,b,c= map(int,input().split()) | ^
s787620302
p03671
C++
#include <bits/stdc++.h> #include <vector> using namespace std; int main(){ int s,b,c; cin>>s>>b>>c; int a[3]; a[0] = s; a[1] = b; a[2] = c; sort(a,a+n); cout<<a[0]+a[1]<<endl; return 0; }
a.cc: In function 'int main()': a.cc:17:11: error: 'n' was not declared in this scope 17 | sort(a,a+n); | ^
s450107143
p03671
C++
#include <bits/stdc++.h> #include <vector> using namespace std; int main(){ int a,b,c; cin>>s>>b>>c; int a[3]; a[0] = s; a[1] = b; a[2] = c; sort(a,a+n); cout<<a[0]+a[1]<<endl; return 0; }
a.cc: In function 'int main()': a.cc:10:7: error: 's' was not declared in this scope 10 | cin>>s>>b>>c; | ^ a.cc:12:6: error: conflicting declaration 'int a [3]' 12 | int a[3]; | ^ a.cc:8:6: note: previous declaration as 'int a' 8 | int a,b,c; | ^ a.cc:13:3: error: invalid...
s727197716
p03671
C++
#include <bits/stdc++.h> using namespace std; #ifndef ONLINE_JUDGE #include "debug.h" #endif int main() { ios::sync_with_stdio(false), cin.tie(0); vector<int> a(3); cin >> a[0] >> a[1] >> a[2]; sort(begin(a), end(a)); cout << a[0] + a[1] << '\n'; return 0; }
a.cc:5:12: fatal error: debug.h: No such file or directory 5 | #include "debug.h" | ^~~~~~~~~ compilation terminated.
s202024688
p03671
C++
#include <iostream> #include <vector> int main() { int a, b, c; std::cin >> a >> b >> c; std::cout << std::min({a+b, b+c, c+a}) << std::endl; return 0; }
a.cc: In function 'int main()': a.cc:6:26: error: no matching function for call to 'min(<brace-enclosed initializer list>)' 6 | std::cout << std::min({a+b, b+c, c+a}) << std::endl; | ~~~~~~~~^~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/...
s893181747
p03671
C++
#include <bits/stdc++.h> #define rep(i,n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; int main() { int a, b, c; cin >> a >> b >> c; int ans = min({ a+b, b+c, c+a }) cout << ans << endl; return 0; }
a.cc: In function 'int main()': a.cc:15:3: error: expected ',' or ';' before 'cout' 15 | cout << ans << endl; | ^~~~
s022424330
p03671
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b,c; cin >> a>>b>>c; cout <<a+b+c-max(a,b,c)<<endl; return 0; }
In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int...
s675444343
p03671
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b,c; cin >> a>>b>>c; cout <<a+b+c-min(a,b,c)<<endl; return 0; }
In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int...
s031234744
p03671
C++
#include<bits/stdc++.h> using namespace std; int main () { int a, b, c; cin >> a >> b >> c; cout << min(a + b, b + c, c + a); }
In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int...
s465526299
p03671
C++
#include <bits/stdc++.h> using namespace std; int main() { int a , b , c ; cin >> a >> b >> c ; cout << min({a+b,b+c,c+a}) endl; }
a.cc: In function 'int main()': a.cc:7:29: error: expected ';' before 'endl' 7 | cout << min({a+b,b+c,c+a}) endl; | ^~~~~ | ;
s060358268
p03671
C++
#include <bits/stdc++.h> using namespace std; int main() { int a , b , c ; cin >> a >> b >> c ; cout << min({a+b,b+c,c+a}) }
a.cc: In function 'int main()': a.cc:7:29: error: expected ';' before '}' token 7 | cout << min({a+b,b+c,c+a}) | ^ | ; 8 | } | ~
s730522759
p03671
C++
#include <bits/stdc++.h> using namespace std; int main() { int a , b , c ; cin >> a >> b >> c ; cout << min(a+b,b+c,c+a) << endl; }
In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int...
s562521526
p03671
C++
#include <bits/stdc++.h> using namespace std; int main() { int a , b , c ; cin >> a >> b >> c ; cout << min(a+b,b+c,c+a) }
a.cc: In function 'int main()': a.cc:7:27: error: expected ';' before '}' token 7 | cout << min(a+b,b+c,c+a) | ^ | ; 8 | } | ~ In file included from /usr/include/c++/14/algorithm:60, from /usr/incl...
s127469156
p03671
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; int ans=a+b+c-max({a,b,c})<<endl; }
a.cc: In function 'int main()': a.cc:7:29: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<' 7 | int ans=a+b+c-max({a,b,c})<<endl; | ~~~~~~~~~~~~~~~~~~^~~~~~
s749455528
p03671
C++
#include<iostream> #include<string> #include<algorithm> #include<vector> using namespace std; int main(){ int ,a,b,c; cin >> a >> b >> c; cout << max(max(a+b,a+c),b+c) << endl; }
a.cc: In function 'int main()': a.cc:8:9: error: expected unqualified-id before ',' token 8 | int ,a,b,c; | ^
s792312675
p03671
C
#include<stdio.h> int main(){ int a,b,c,p1,p2,p3; scanf("%d %d %d",&a,&b,&c); p1=a+b; p2=a+c; p3=b+c; if(p1<p2 && p1<p3){ printf("Buying any two bells costs %dyen.",p1); } else if(p2<p1 && p2<p3){ printf("Buying any two bells costs %dyen.",p2); } else{ printf("Buying any two bells costs %dyen.",p3); } retur...
main.c: In function 'main': main.c:17:1: error: expected declaration or statement at end of input 17 | return 0; | ^~~~~~
s613351643
p03671
C++
#include <iostream> using namespace std; int main() { int arr[3],i; for( i = 0 ; i < 3 ; i++ ){ cin >> arr[i]; } sort(arr, arr+3); cout <<"Buying any two bells costs "<< arr[0]+arr[1] << " yen."; return 0; }
a.cc: In function 'int main()': a.cc:11:5: error: 'sort' was not declared in this scope; did you mean 'short'? 11 | sort(arr, arr+3); | ^~~~ | short
s353143919
p03671
C
#include <stdio.h> int main() { int a,b,c,d=0; scanf("%d %d %d",&a,&b,&c); if(a<b && a<c){ if(b<c){ d=a+b; } else d=a+c; } else if(b<a && b<c){ if(a<c){ d=b+a; } else d=b+c; } else if(c<a && c<b){ if(a<b){ ...
main.c: In function 'main': main.c:53:16: error: 'a00' undeclared (first use in this function) 53 | else d=a00+b; | ^~~ main.c:53:16: note: each undeclared identifier is reported only once for each function it appears in
s083667097
p03671
C++
#include <bits/stdc++.h> using namespace std; int main() { vector<int> x(3); cin>>x.at(0)>>x.at(1)>>x.at(2); sort(x.begin(),x.end()); cout<<x.at(0)+x.at(a)<<endl; return 0; }
a.cc: In function 'int main()': a.cc:11:24: error: 'a' was not declared in this scope 11 | cout<<x.at(0)+x.at(a)<<endl; | ^
s179847610
p03671
C++
icase=0 if icase==0: a,b,c=map(int,input().split()) print(min(a+b,b+c,c+a))
a.cc:1:1: error: 'icase' does not name a type 1 | icase=0 | ^~~~~
s918578523
p03671
Java
import java.util.*; public class Main{ public static void main(String ...string){ Scanner sc = new Scanner(System.in); System.out.println(Math.max(a+b,Math.max(a+c,c+b))); } }
Main.java:5: error: cannot find symbol System.out.println(Math.max(a+b,Math.max(a+c,c+b))); ^ symbol: variable a location: class Main Main.java:5: error: cannot find symbol System.out.println(Math.max(a+b,Math.max(a+c,c+b))); ^ symbol: va...
s598505460
p03671
C++
#include <bits/stdc++.h> using namespace std; int my_min(int a,int b,int c){ if(a<=b&&a<=c) cout<<a<<endl; else if(b<=c&&b<=a) cout<<b<<endl; else cout<<c<<endl; } int main(){ int a,b,c; cin>>a>>b>>c; cout<<my_min(a+b,b+c,c+a)<,endl; }
a.cc: In function 'int my_min(int, int, int)': a.cc:8:1: warning: no return statement in function returning non-void [-Wreturn-type] 8 | } | ^ a.cc: In function 'int main()': a.cc:12:29: error: expected primary-expression before ',' token 12 | cout<<my_min(a+b,b+c,c+a)<,endl; | ...
s852474777
p03671
C++
#include<iostream> #include<algorithm using namespace std; int main() { int a, b, c; cin >> a >> b >> c; int kingaku[3]; kingaku[0] = a + b; kingaku[1] = a + c; kingaku[2] = b + c; int ans = min({ kingaku[0],kingaku[1],kingaku[2] }); }
a.cc:2:19: error: missing terminating > character 2 | #include<algorithm | ^
s326459458
p03671
C++
#include <bits/stdc++.h> #define rep(i,n) for(int i = 0; i < n; i++) #include <vector> using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; int sum = a + b + c; cout << sum - max(a, b, c) << endl; return 0; }
In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int...
s427979167
p03671
C++
#include<iostream> #include<algorithm> int main(){ int a,b,c; cin>>a>>b>>c; cout<<min({a+b,a+c,c+b})<<endl; return 0; }
a.cc: In function 'int main()': a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | cin>>a>>b>>c; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to...
s943494052
p03671
C++
#nclude<iostream> #include<algorithm> int main(){ int a,b,c; cin>>a>>b>>c; cout<<min({a+b,a+c,c+b})<<ensl; return 0;
a.cc:1:2: error: invalid preprocessing directive #nclude; did you mean #include? 1 | #nclude<iostream> | ^~~~~~ | include a.cc: In function 'int main()': a.cc:5:3: error: 'cin' was not declared in this scope 5 | cin>>a>>b>>c; | ^~~ a.cc:6:3: error: 'cout' was not declared in this scope ...
s127953148
p03671
C++
#include<iostream> using namespace std; int main(){ int a[3]; cin>>a[0]>>a[1]>>a[2]; sort(a,a+3); cout<<a[0]+a[1]<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: 'sort' was not declared in this scope; did you mean 'short'? 6 | sort(a,a+3); | ^~~~ | short
s138263638
p03671
C++
#include <bits/stdc++.h> using namespace std; int main(){ vector<int> a(3); for(int i=0; i<3; i++) cin>>a[i]; sort(a.begin(),a.end()); cout<<a[0]+a[1];
a.cc: In function 'int main()': a.cc:8:19: error: expected '}' at end of input 8 | cout<<a[0]+a[1]; | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s616268378
p03671
Java
import java.io.*; import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); PrintStream out = new PrintStream(System.out); int a. b, c, min; a = sc.nextInt(); b = sc.nextInt(); c = sc.nextInt(); m...
Main.java:9: error: ';' expected int a. b, c, min; ^ Main.java:9: error: not a statement int a. b, c, min; ^ Main.java:9: error: ';' expected int a. b, c, min; ^ Main.java:9: error: not a statement int a. b, c, min; ^ Main.jav...
s012140241
p03671
Java
import java.io.*; import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); PrintStream out = new PrintStream(System.out); int a. b, c, min; a = sc.nextInt(); b = sc.nextInt(); c = sc.nextInt(); m...
Main.java:9: error: ';' expected int a. b, c, min; ^ Main.java:9: error: not a statement int a. b, c, min; ^ Main.java:9: error: ';' expected int a. b, c, min; ^ Main.java:9: error: not a statement int a. b, c, min; ^ Main.jav...
s129641049
p03671
C++
#include<bits/stdc++.h> using namespace std; int main() { int a,b,c; int all,biggest,ans; cin>>a>>b>>c; all=a+b+c; biggest=max(a,max(b,c)); ans=all-biggest; cout<<ans<<endl; retirn 0; }
a.cc: In function 'int main()': a.cc:12:5: error: 'retirn' was not declared in this scope 12 | retirn 0; | ^~~~~~
s080590904
p03671
C++
#include<iostream> #include<queue> using namespace std; struct Node{ int x; bool operator < (const Node & a) const{ return x>a.x; } }; priority_queue <Node> q; int main(){ int t=3; while(t--){ int i; cin>>i; Node now; now.x=i q.push(now); } int...
a.cc: In function 'int main()': a.cc:17:16: error: expected ';' before 'q' 17 | now.x=i | ^ | ; 18 | q.push(now); | ~ a.cc:21:8: error: no match for 'operator+=' (operand types are 'int' and 'const __gnu_cxx::__alloc_traits<std::alloca...
s803144944
p03671
C++
#include<iostream> #include<queue> using namespace std; struct Node{ int x; bool operator < (const Node & a) const{ return x>a.x; } } priority_queue <Node> q; int main(){ int t=3; while(t--){ int i; cin>>i; Node now; now.x=i q.push(now); } int ...
a.cc:10:23: error: invalid declarator before 'q' 10 | priority_queue <Node> q; | ^ a.cc: In function 'int main()': a.cc:17:16: error: expected ';' before 'q' 17 | now.x=i | ^ | ; 18 | q.push(now); | ~ a.c...
s629986324
p03671
C++
#include <iostream> #include <cstdio> using namespace std; int main(){ int a[3]; for(int i = 0; i < 3; i++) sacnf("%d", &a[i]); sort(a, a + 3); printf("%d", a[0] + a[1]); return 0; }
a.cc: In function 'int main()': a.cc:10:32: error: 'sacnf' was not declared in this scope; did you mean 'scanf'? 10 | for(int i = 0; i < 3; i++) sacnf("%d", &a[i]); | ^~~~~ | scanf a.cc:12:5: error: 'sort' was not declared in this scope; d...
s093946905
p03671
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int a = scanner.nextInt(); int b = scanner.nextInt(); int c = scanner.nextInt(); int sum = a+ b ; if(sum < a+c){ sum = a+c; } if(sum < b+c){ ...
Main.java:15: error: ';' expected sum = b + c: ^ 1 error
s878671233
p03671
C++
#include <bits/stdc++.h> using namespace std; int main(void){ int a,b,c cin>>a>>b>>c; cout<<min(min(a+b,a+c),b+c)<<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:3: error: expected initializer before 'cin' 8 | cin>>a>>b>>c; | ^~~ a.cc:9:23: error: 'c' was not declared in this scope 9 | cout<<min(min(a+b,a+c),b+c)<<endl; | ^
s969518457
p03671
C++
#include<iostream> using namespace std; int main(void) { int a,b,c; cin>>a>>b>>c; int sum1=a+b,sum2=b+c,sum3=c+a; int min=sum1; if(min>sum2){min=sum2;} if(min>sum3){min=sum3;} cout<<min>>endl; return 0; }
a.cc: In function 'int main()': a.cc:15:12: error: no match for 'operator>>' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 15 | cout<<min>>endl; | ~~~~~~~~~^~~~~~ In file included from /usr/include/c++/14/string:55, from /usr/include/c++/14/bits...
s483611969
p03671
C++
#include <bits/stdc++.h> using namespace std; #define REP(i,n) for(int i=0; i<(n); i++) #define REP2(i,x,n) for(int i=x; i<(n); i++) int main() { int a, b, c; cin >> a>>b>>c; ans = a+b+c; ans = min(ans, a+b); ans = min(ans, c+b); ans = min(ans, a+c); cout << ans<< endl; return 0; }
a.cc: In function 'int main()': a.cc:10:5: error: 'ans' was not declared in this scope; did you mean 'abs'? 10 | ans = a+b+c; | ^~~ | abs
s329611231
p03671
C++
#include <bits/stdc++.h> using namespace std; #define REP(i,n) for(int i=0; i<(n); i++) #define REP2(i,x,n) for(int i=x; i<(n); i++) int main() { int A, B, C; cin >> A>>B>>C; ans = 0; ans = min(ans, a+b); ans = min(ans, c+b); ans = min(ans, a+c); cout << ans<< endl; return 0; }
a.cc: In function 'int main()': a.cc:10:5: error: 'ans' was not declared in this scope; did you mean 'abs'? 10 | ans = 0; | ^~~ | abs a.cc:11:20: error: 'a' was not declared in this scope 11 | ans = min(ans, a+b); | ^ a.cc:11:22: error: 'b' was not declared in ...
s353641059
p03671
C
#include <stdio.h> int main(void){ int a,b,c; scanf("%d%d%d",&a,&b,&c); if((a>b)&&(a>c)){ printf("%d",b+c); }else if((b>c)&&(b>a)){ printf("%d",a+c); }else{ printf("%d",a+b); return 0; }
main.c: In function 'main': main.c:12:1: error: expected declaration or statement at end of input 12 | } | ^
s516519385
p03671
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll gcd(ll a, ll b) { if (b==0) return a; else{ return gcd(b,a%b); } } int main() { vector<ll> v(3); cin >> v[0] >> v[1] >> v[2]; sort(v.begin(), v.end()); cout << v[0]+v[1] << endl; } }
a.cc:17:1: error: expected declaration before '}' token 17 | } | ^
s382871466
p03671
C++
#include<bits/stdc++.h> using namespace std; int main(){ vector<int> vec(N); for (int i=0; i<3; i++){ cin >> vec.at(i); } sort(vec.begin(),vec.end()); cout << vec.at(0)+vec.at(1) << endl; }
a.cc: In function 'int main()': a.cc:5:19: error: 'N' was not declared in this scope 5 | vector<int> vec(N); | ^
s306361710
p03671
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using vi = vector<int>; using vll = vector<ll>; const int INF = 1e9; const ll INFLL = 1e18; const int MOD = 1e9 + 7; const int NIL = -1; #define rep(i,n) for(int i=0; i<(n); ++i) #define all(n) begin(n),end(n) template<class...
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...
s757010066
p03671
C++
#include <bits/stdc++.h> using namespace std; int main() { int A, B, C; cin >> A >> B >> C; int max = max({A, B, C}); cout << A + B + C - max << endl; }
a.cc: In function 'int main()': a.cc:8:22: error: 'max' cannot be used as a function 8 | int max = max({A, B, C}); | ~~~^~~~~~~~~~~
s147918882
p03671
C++
//#define _GLIBCXX_DEBUG #include<bits/stdc++.h> using namespace std; const int INF= 1e9+5; typedef long long ll; int main(){ int a,b,c; cin>>a>>b>>c; cout<<min{a+b,b+c,c+a}<<endl; }
a.cc: In function 'int main()': a.cc:11:7: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '<unresolved overloaded function type>') 11 | cout<<min{a+b,b+c,c+a}<<endl; | ~~~~^~~~~ In file included from /usr/include/c++/14/istream:41, f...
s899979190
p03671
C++
#include <bits/stdc++.h> #define fuck(n,m) sort(n,m) #define sb int #define shi cin #define shabi cout #define zhizhang endl #define shit 0 #define eat return using namespace std; sb you[3]; sb main() { shi>>you[0]>>you[1]>>you[2]; sb* bitch=you+2; fuck(you,bitch); shabi<<you[0]+you[1]<<zhizhng; eat...
a.cc: In function 'int main()': a.cc:16:27: error: 'zhizhng' was not declared in this scope; did you mean 'zhizhang'? 16 | shabi<<you[0]+you[1]<<zhizhng; | ^~~~~~~ | zhizhang
s976548787
p03671
C++
#include <bits/stdc++.h> #define fuck(n,m) sort(n,m) #define sb int #define shi cin #define shabi cout #define zhizhang endl #define shit 0 #define eat return using namespace std; sb you[3]; sb main() { shi>>you[0]>>you[i]>>you[2]; sb bitch=you+2; fuck(you,bitch); shabi<<you[0]+you[1]<<zhizhng; eat ...
a.cc: In function 'int main()': a.cc:13:22: error: 'i' was not declared in this scope 13 | shi>>you[0]>>you[i]>>you[2]; | ^ a.cc:14:17: error: invalid conversion from 'int*' to 'int' [-fpermissive] 14 | sb bitch=you+2; | ~~~^~ | | |...
s178289162
p03671
C++
int main() { cout << "ce" << endl; return 0; }
a.cc: In function 'int main()': a.cc:3:5: error: 'cout' was not declared in this scope 3 | cout << "ce" << endl; | ^~~~ a.cc:3:21: error: 'endl' was not declared in this scope 3 | cout << "ce" << endl; | ^~~~
s536251211
p03671
C++
#include<bits/sdtc++.h> using namespace std; int main(){ int s[4]; cin>>s[1]>>s[2]>>s[3]; sort(s+1,s+1+3); cout<<s[1]+s[2]; }
a.cc:1:9: fatal error: bits/sdtc++.h: No such file or directory 1 | #include<bits/sdtc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s200707994
p03671
C++
#include<bits/stdc++.h> using namespace std; int a,b,c,ab,ac,bc; int main() { cin>>a>>b>>c; ab=a+b; ac=a+c; ba=b+c; cout<<min(ab,min(ac,bc))<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:5: error: 'ba' was not declared in this scope; did you mean 'bc'? 9 | ba=b+c; | ^~ | bc
s660254161
p03671
C++
#include<bits/stdc++.h> using namespace std; int a,b,c; int main() { cin>>a>>b>>c; if((a<=b&&b<=c)||b<=a&&a<=c))cout<<a+b; else if((a<=b&&c<=b)||(c<=a&&a<=b))cout<<a+c; else cout<<c+b; return 0; }
a.cc: In function 'int main()': a.cc:8:33: error: expected primary-expression before ')' token 8 | if((a<=b&&b<=c)||b<=a&&a<=c))cout<<a+b; | ^
s703610026
p03671
C++
#include <bits/stdc++.h> using namespace std; int main(){ string S; cin >> S; if(S.length()==4){ cout<<2<<endl: return 0; } for(int i=2;i<S.length()+1;i=i+2){ S=S.erase(S.length()-2); if(S.substr(S.length()/2)==S.substr(0,S.length()/2)){ cout<<S.length()<<endl; return 0; }...
a.cc: In function 'int main()': a.cc:8:18: error: expected ';' before ':' token 8 | cout<<2<<endl: | ^ | ;
s001037937
p03671
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { int a,b,c; cin >> a >> b >> c; cout << min([a+b,b+c,a+c]) << endl; }
a.cc: In function 'int main()': a.cc:9:17: error: expected ',' before '+' token 9 | cout << min([a+b,b+c,a+c]) << endl; | ^ | , a.cc:9:17: error: expected identifier before '+' token a.cc:9:19: error: expected ']' before ',' token 9 | cout << min([a+b,b+c,a+c]) <<...
s739004344
p03671
C++
#include<iostream> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; if(a<b&&c<b){cout<<a+b;return 0;} if(b<a&&c<a){cout<<b+c;return 0;} if(a<c&&b<c){cout<<a+b;return 0;}
a.cc: In function 'int main()': a.cc:8:36: error: expected '}' at end of input 8 | if(a<c&&b<c){cout<<a+b;return 0;} | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s440857123
p03671
C++
#include <bits/stdc++.h> #define rep(i, n) for(int i = 0; i < n; i++) using namespace std; int main() { int a, b, c; cin >> n >> m; if(a >= b && a >= c) cout << b + c << endl; else if(b >= c && b >= a) cout << c + a << endl; else if(c >= a && c >= b) cout << a + b << endl; }
a.cc: In function 'int main()': a.cc:7:12: error: 'n' was not declared in this scope 7 | cin >> n >> m; | ^ a.cc:7:17: error: 'm' was not declared in this scope 7 | cin >> n >> m; | ^
s276911635
p03671
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b,c; cin >> a >> b >> c; cout << min(a+b, b+c, c+a) << endl; }
In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int...
s391137043
p03671
C++
#include <algorithm> #include <iostream> using namespace std; int main() { int bell[3]; for (auto & b : bell) cin >> bell; sort(bell, bell + 3); cout << bell[0] + bell[1]; return 0; }
a.cc: In function 'int main()': a.cc:10:9: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int [3]') 10 | cin >> bell; | ~~~ ^~ ~~~~ | | | | | int [3] | std::istream {aka std::basic_istream<char>} In file i...
s207514450
p03671
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; cout<<min(a+b,b+c,a+c)<<endl; }
In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int...
s660891027
p03671
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<n;i++) #define rep1(i,n) for(int i=1;i<=n;i++) typedef long long ll; int main(){ int d[3] = {0}; rep(i,3){ cin >> d[i]; } sort(d.begin(),d.end()); cout << d[0]+d[1] << endl; }
a.cc: In function 'int main()': a.cc:13:10: error: request for member 'begin' in 'd', which is of non-class type 'int [3]' 13 | sort(d.begin(),d.end()); | ^~~~~ a.cc:13:20: error: request for member 'end' in 'd', which is of non-class type 'int [3]' 13 | sort(d.begin(),d.end()); | ...
s201541432
p03671
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<n;i++) #define rep1(i,n) for(int i=1;i<=n;i++) typedef long long ll; int main(){ int d[3] = {0}; rep(i,3){ cin >> d[i]; } sort(d.bign(),d.end()); cout << d[0]+d[1] << endl; }
a.cc: In function 'int main()': a.cc:13:10: error: request for member 'bign' in 'd', which is of non-class type 'int [3]' 13 | sort(d.bign(),d.end()); | ^~~~ a.cc:13:19: error: request for member 'end' in 'd', which is of non-class type 'int [3]' 13 | sort(d.bign(),d.end()); | ...
s299135033
p03671
C++
a,b,c=map(int,input().split()) ans=min(a+b,b+c,c+a) print(ans)
a.cc:1:1: error: 'a' does not name a type 1 | a,b,c=map(int,input().split()) | ^
s605227686
p03671
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a[3]; cin >> a[0] >> a[1] >> a[2]; sort(a, a+n); int ans = a[0] + a[1]; cout << ans << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:13: error: 'n' was not declared in this scope 8 | sort(a, a+n); | ^
s858450951
p03671
C++
#include <iostream> #include <vector> using namespace std; int main(void){ vector<int> a(3); cin >> a[0] >> a[1] >> a[2]; sort(a.begin(), a.end()); cout << a[0]+a[1] << endl; return 0; }
a.cc: In function 'int main()': a.cc:10:3: error: 'sort' was not declared in this scope; did you mean 'short'? 10 | sort(a.begin(), a.end()); | ^~~~ | short
s994936496
p03671
C++
#include<bits/stdc++.h> using namespace std; //size_t f = string::npos //make pair int main(){ int a,b,c;cin >> a >> b >> c; cout < a + b + c - max(a, max(b, c)); }
a.cc: In function 'int main()': a.cc:8:12: error: no match for 'operator<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int') 8 | cout < a + b + c - max(a, max(b, c)); | ~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | ...
s007289842
p03671
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; cout << min((a + b),(b + c),(c + a)) << endl; }
In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int...
s464990846
p03671
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; cout << min(a + b, b + c, c + a) << endl; }
In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int...
s323630125
p03671
C++
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define repe(i, n) for (int i = 0; i <= (n); ++i) #define all(x) (x).begin(),(x).end() using namespace std; template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; } template<class T>bool chmin(T &a, const T &b) { if ...
a.cc: In function 'int main()': a.cc:16:29: error: expected ')' before 'a' 16 | cout << min(a+b, min(b+c a+c)) << "\n"; | ~ ^~ | ) a.cc:16:25: error: no matching function for call to 'min(int)' 16 | cout << min(a+b, min(b+c a+c)) << "\n"; ...
s422035369
p03671
C++
#include <iostream> using namespace std; int main(int argc, const char * argv[]) { int input [3]; int x = 0; int n = 0; int m = 0; //ringring -- work for (int i = 0; i< 3; i++){ cin>> input[i]; } //find greatest for (int i = 0; i< 3; i++){ if (input[i]>=n){ ...
a.cc: In function 'int main(int, const char**)': a.cc:28:15: error: expected '}' at end of input 28 | cout << x; | ^ a.cc:3:41: note: to match this '{' 3 | int main(int argc, const char * argv[]) { | ^
s030686577
p03671
C++
using ll=long long; void solve(){ vector<int > a(3); for(int i=0; i<3; i++)cin>>a[i]; sort(a.begin(), a.end()); cout<<a[0]+a[1]<<endl; } signed main(){ //while(1) solve(); }
a.cc: In function 'void solve()': a.cc:6:5: error: 'vector' was not declared in this scope 6 | vector<int > a(3); | ^~~~~~ a.cc:6:12: error: expected primary-expression before 'int' 6 | vector<int > a(3); | ^~~ a.cc:7:27: error: 'cin' was not declared in this scope 7 | ...
s087242536
p03671
C++
#include<iostream> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; if(a<=b&&b<=c){ cout<<a+b<<endl; } else if(c<=b&&b<=a){ cout<<c+b<<endl; } else if(c<=a&&a<=b){ cout<<c+a<<endl; } else if(b<=a&&a<=c){ cout<<b1+a<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:24:11: error: 'b1' was not declared in this scope; did you mean 'b'? 24 | cout<<b1+a<<endl; | ^~ | b
s449314338
p03671
C++
#include <bits/stdc++.h> using namespace std; int main() { int A, B, C; cin >> A >> B >> C; cout << A + B + C - max({A,B,C} << endl; }
a.cc: In function 'int main()': a.cc:7:34: error: expected ')' before '<<' token 7 | cout << A + B + C - max({A,B,C} << endl; | ~ ^~~ | )
s284100814
p03671
C++
#include <bits/stdc++.h> using namespace std; int main() { int A, B, C; cin >> A >> B >> C; cout << (A+B+C-max({A,B,C}) << endl; }
a.cc: In function 'int main()': a.cc:7:31: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<' 7 | cout << (A+B+C-max({A,B,C}) << endl; | ~~~~~~~~~~~~~~~~~~~^~~~~~~ a.cc:7:38: error: expected ')' before ';' token 7 | cout << (A+B+C-max({...
s781132499
p03671
C++
#include<iostream> usingnamespace std; int main() { int a, b, c; cin >> a >> b >> c; cout<<a+b+c-max(max(a,b),max(b,c))<<endl; return 0; }
a.cc:2:1: error: 'usingnamespace' does not name a type 2 | usingnamespace std; | ^~~~~~~~~~~~~~ a.cc: In function 'int main()': a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin >> a >> b >> c; | ^~~ | std::cin In file included from a.cc:1: /usr/incl...