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 100000000... | 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... |
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/x... |
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,... | 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; _Com... |
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... | 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])
| ^~... |
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;
... | 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.... |
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{
... | 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 '}'... |
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,
... |
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 << ... | 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 >... |
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 c... | 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... |
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... |
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... |
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,
... |
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})... |
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... |
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;
| ... |
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;
... |
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<<(ostrea... | 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: ... |
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... |
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... |
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... |
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 =... | 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 =... | 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 =... | 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: I... |
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);
| ^~~
| ... |
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... | 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<ve... | 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/includ... |
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.... | 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.L... |
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... |
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>
#includ... | 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: ... |
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/includ... |
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_classe... |
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}
| ... |
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')
| ^~~~... |
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,
... |
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... |
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]'
... |
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(),... |
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]'
... |
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.... |
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,
... |
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... | 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;
... |
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 =... | 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... |
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();
... |
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 __... |
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 ... |
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/includ... |
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]'
... |
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 <... | 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... |
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
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.