submission_id
stringlengths 10
10
| problem_id
stringlengths 6
6
| language
stringclasses 3
values | code
stringlengths 1
522k
| compiler_output
stringlengths 43
10.2k
|
|---|---|---|---|---|
s064723109
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int a[3], count = 0;
for (int i = 0; i<3; i++) cin >> a[i];
sort (a.begin(), a.end());
for (int i = 0; i<3; i++) {
if (a[i]%2 == 0)
count ++;
}
if (count == 0)
cout << a[0]*a[1] << endl;
else
cout << "0" << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:7:11: error: request for member 'begin' in 'a', which is of non-class type 'int [3]'
7 | sort (a.begin(), a.end());
| ^~~~~
a.cc:7:22: error: request for member 'end' in 'a', which is of non-class type 'int [3]'
7 | sort (a.begin(), a.end());
| ^~~
|
s285279274
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
vector<lomg> x(3);
cin >> x.at(0) >> x.at(1) >> x.at(2);
if(x.at(0) % 2 == 0 || x.at(1) % 2 == 0 || x.at(2) % 2 == 0){
cout << 0 << endl;
}
else{
sort(x.begin(), x.end());
cout << x.at(0) * x.at(1) << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:5:10: error: 'lomg' was not declared in this scope; did you mean 'long'?
5 | vector<lomg> x(3);
| ^~~~
| long
a.cc:5:14: error: template argument 1 is invalid
5 | vector<lomg> x(3);
| ^
a.cc:5:14: error: template argument 2 is invalid
a.cc:6:12: error: request for member 'at' in 'x', which is of non-class type 'int'
6 | cin >> x.at(0) >> x.at(1) >> x.at(2);
| ^~
a.cc:6:23: error: request for member 'at' in 'x', which is of non-class type 'int'
6 | cin >> x.at(0) >> x.at(1) >> x.at(2);
| ^~
a.cc:6:34: error: request for member 'at' in 'x', which is of non-class type 'int'
6 | cin >> x.at(0) >> x.at(1) >> x.at(2);
| ^~
a.cc:8:8: error: request for member 'at' in 'x', which is of non-class type 'int'
8 | if(x.at(0) % 2 == 0 || x.at(1) % 2 == 0 || x.at(2) % 2 == 0){
| ^~
a.cc:8:28: error: request for member 'at' in 'x', which is of non-class type 'int'
8 | if(x.at(0) % 2 == 0 || x.at(1) % 2 == 0 || x.at(2) % 2 == 0){
| ^~
a.cc:8:48: error: request for member 'at' in 'x', which is of non-class type 'int'
8 | if(x.at(0) % 2 == 0 || x.at(1) % 2 == 0 || x.at(2) % 2 == 0){
| ^~
a.cc:12:12: error: request for member 'begin' in 'x', which is of non-class type 'int'
12 | sort(x.begin(), x.end());
| ^~~~~
a.cc:12:23: error: request for member 'end' in 'x', which is of non-class type 'int'
12 | sort(x.begin(), x.end());
| ^~~
a.cc:13:15: error: request for member 'at' in 'x', which is of non-class type 'int'
13 | cout << x.at(0) * x.at(1) << endl;
| ^~
a.cc:13:25: error: request for member 'at' in 'x', which is of non-class type 'int'
13 | cout << x.at(0) * x.at(1) << endl;
| ^~
|
s025803564
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namespace std;
const long long mod = pow(10, 9) + 7;
const long long MOD = 998244353;
const long long INF = 1LL << 60;
const int inf = pow(10, 9) + 7;
template <class T> bool chmin(T& a, T b) {if (a > b) {a = b; return true;} return false;}
template <class T> bool chmax(T& a, T b) {if (a < b) {a = b; return true;} return false;}
int divCeil(int A, int B) {return (A + (B - 1)) / B;}
long long divCeil(long long A, int B) {return (A + (B - 1)) / B;}
long long divCeil(int A, long long B) {return (A + (B - 1)) / B;}
long long divCeil(long long A, long long B) {return (A + (B - 1)) / B;}
int main()
{
long long A, B, C;
cin >> A >> B >> C;
long long ans;
if (A * B * C % 2 == 0) ans = 0;
else ans = min({A * B, B * C, C * A})
cout << ans << endl;
}
|
a.cc: In function 'int main()':
a.cc:21:40: error: expected ';' before 'cout'
21 | else ans = min({A * B, B * C, C * A})
| ^
| ;
22 |
23 | cout << ans << endl;
| ~~~~
|
s578454918
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namespace std;
const long long mod = pow(10, 9) + 7;
const long long MOD = 998244353;
const long long INF = 1LL << 60;
const int inf = pow(10, 9) + 7;
template <class T> bool chmin(T& a, T b) {if (a > b) {a = b; return true;} return false;}
template <class T> bool chmax(T& a, T b) {if (a < b) {a = b; return true;} return false;}
int divCeil(int A, int B) {return (A + (B - 1)) / B;}
long long divCeil(long long A, int B) {return (A + (B - 1)) / B;}
long long divCeil(int A, long long B) {return (A + (B - 1)) / B;}
long long divCeil(long long A, long long B) {return (A + (B - 1)) / B;}
int main()
{
int A, B, C;
cin >> A >> B >> C;
int ans;
if (A * B * C % 2 == 0) ans = 0;
else ans = min({A * B, B * C, C * A})
cout << ans << endl;
}
|
a.cc: In function 'int main()':
a.cc:21:40: error: expected ';' before 'cout'
21 | else ans = min({A * B, B * C, C * A})
| ^
| ;
22 |
23 | cout << ans << endl;
| ~~~~
|
s774026279
|
p04005
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main(){
long long a,b,c;
cin>>a>>b>>c;
if(a%2==0||b%2==0||c%2==0){
cout<<0<<endl;
}else cout<<min(min(a*b,b*c)a*c)<<endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:8:33: error: expected ')' before 'a'
8 | }else cout<<min(min(a*b,b*c)a*c)<<endl;
| ~ ^
| )
a.cc:8:20: error: no matching function for call to 'min(const long long int&)'
8 | }else cout<<min(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:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
233 | min(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
281 | min(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
5686 | min(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: template argument deduction/substitution failed:
a.cc:8:20: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
8 | }else cout<<min(min(a*b,b*c)a*c)<<endl;
| ~~~^~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
5696 | min(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate expects 2 arguments, 1 provided
|
s860666183
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
if(a % 2 == 0 || b % 2 == 0 c % 2 == 0) {
cout << 0 << endl;
} else {
cout << min{b * c, c * a, a * b} << endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:7:30: error: expected ')' before 'c'
7 | if(a % 2 == 0 || b % 2 == 0 c % 2 == 0) {
| ~ ^~
| )
a.cc:10:10: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '<unresolved overloaded function type>')
10 | cout << min{b * c, c * a, a * b} << 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&
|
s590858985
|
p04005
|
C++
|
#include<iostream>
using namespace std;
int main(){
int a, b ,c;
cin >> a >> b >>c;
if(a%2==0 || b%2==0 || c%2==0 )cout << 0 << endl;
else{
cout << min(a*b, b*c, c*a) << endl;
}
}
|
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:9:20: required from here
9 | 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))
| ~~~~~~^~~~~~~~~~
|
s345882822
|
p04005
|
C++
|
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
typedef long long ll;
int main() {
ll a, b, c;
cin >> a >> b >> c;
if (a % 2 && b % 2 && c % 2) {
cout << min(a * b, b * c, c * a) << endl;
} else {
cout << 0 << 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::min(const _Tp&, const _Tp&, _Compare) [with _Tp = long long int; _Compare = long long int]':
a.cc:13:20: 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))
| ~~~~~~^~~~~~~~~~
|
s443294989
|
p04005
|
C++
|
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <cmath>
#include <set>
using namespace std;
int main(){
long long a,b,c;
cin >> a >> b >> c;
if(a%2 == 0 || b%2 == 0 || c%2 == 0){
cout << 0 << endl;
}
else{
long long d = max(a,max(b,c));
if(c == d){
cout << a*b << endl;
else{
cout << (a*b/d)*c << endl;
}
}
}
|
a.cc: In function 'int main()':
a.cc:18:9: error: expected '}' before 'else'
18 | else{
| ^~~~
a.cc:16:19: note: to match this '{'
16 | if(c == d){
| ^
|
s415934769
|
p04005
|
C++
|
#include<iostream>
#include<vector>
#include<altorithm>
using namespace std;
int main(void){
vector<int> v(3);
int p = 1;
for(int i = 0; i < 3; i++){
cin >> v[i];
p *= v[i];
}
if(p % 2 == 0) cout << 0 << endl;
else{
sort(v.begin(), v.end());
cout << v[0] * v[1] << endl;
}
return 0;
}
|
a.cc:3:9: fatal error: altorithm: No such file or directory
3 | #include<altorithm>
| ^~~~~~~~~~~
compilation terminated.
|
s405849283
|
p04005
|
C++
|
#include<iostream>
#include<vector>
using namespace std;
int main(void){
vector<int> v(3);
int p = 1;
for(int i = 0; i < 3; i++){
cin >> v[i];
p *= v[i];
}
if(p % 2 == 0) cout << 0 << endl;
else{
sort(v.begin(), v.end());
cout << v[0] * v[1] << endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:15:5: error: 'sort' was not declared in this scope; did you mean 'short'?
15 | sort(v.begin(), v.end());
| ^~~~
| short
|
s705774827
|
p04005
|
C++
|
#include <iostream>
#include <functional>
using namespace std;
int main() {
long long A, B, C; cin >> A >> B >> C;
if (A % 2 == 0 || B % 2 == 0 || C % 2 == 0) cout << 0 << endl;
else cout << min({A*B, B*C, C*A}) << endl;
}
|
a.cc: In function 'int main()':
a.cc:8:21: error: no matching function for call to 'min(<brace-enclosed initializer list>)'
8 | else cout << min({A*B, B*C, C*A}) << endl;
| ~~~^~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
233 | min(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
281 | min(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate expects 3 arguments, 1 provided
|
s863091857
|
p04005
|
C++
|
#include <iostream>
using namespace std;
int main() {
long long A, B, C; cin >> A >> B >> C;
if (A % 2 == 0 || B % 2 == 0 || C % 2 == 0) cout << 0 << endl;
else cout << min({A*B, B*C, C*A}) << endl;
}
|
a.cc: In function 'int main()':
a.cc:7:21: error: no matching function for call to 'min(<brace-enclosed initializer list>)'
7 | else cout << min({A*B, B*C, C*A}) << endl;
| ~~~^~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
233 | min(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
281 | min(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate expects 3 arguments, 1 provided
|
s241236773
|
p04005
|
C++
|
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll a, b, c;
cin >> a >> b >> c;
ans = a * b * c;
ans = min(ans, (a / 2) * b * c);
ans = min(ans, a * (b / 2) * c);
ans = min(ans, a * b * (c / 2));
ans = a * b * c - ans * 2;
cout << ans;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:10:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
10 | ans = a * b * c;
| ^~~
| abs
|
s992316304
|
p04005
|
C++
|
#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<map>
#include<set>
#include<queue>
#include<stack>
#include<limits>
#include<iomanip>
#include<cmath>
#include<climits>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
const int mod=1e9+7;
int main(){
ll a,b,c;
cin >> a >> b >> c;
cout << ((a%2)*(b%2)*(c%2)==0?0:min({a*b,b*c,c*a}) << endl;
}
|
a.cc: In function 'int main()':
a.cc:24:56: error: invalid operands of types 'long long int' and '<unresolved overloaded function type>' to binary 'operator<<'
24 | cout << ((a%2)*(b%2)*(c%2)==0?0:min({a*b,b*c,c*a}) << endl;
| ~~~~~~~~~~~~~~~~~~~^~~~~~~
a.cc:24:63: error: expected ')' before ';' token
24 | cout << ((a%2)*(b%2)*(c%2)==0?0:min({a*b,b*c,c*a}) << endl;
| ~ ^
| )
|
s271806340
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(){
int a, b, c;
cin << a << b << c;
if(a%2 == 0 || b%2 == 0 || c%2 == 0){
cout << 0;
}else{
cout << min(a*b, min(b*c, c*a));
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:6:9: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
6 | cin << a << b << c;
| ~~~ ^~ ~
| | |
| | int
| std::istream {aka std::basic_istream<char>}
a.cc:6:9: note: candidate: 'operator<<(int, int)' (built-in)
6 | cin << a << b << c;
| ~~~~^~~~
a.cc:6:9: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'int'
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
from a.cc:1:
/usr/include/c++/14/bits/regex.h:1715:5: note: candidate: 'template<class _Ch_type, class _Ch_traits, class _Bi_iter> std::basic_ostream<_CharT, _Traits>& std::__cxx11::operator<<(std::basic_ostream<_CharT, _Traits>&, const sub_match<_Bi_iter>&)'
1715 | operator<<(basic_ostream<_Ch_type, _Ch_traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1715:5: note: template argument deduction/substitution failed:
a.cc:6:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin << a << b << c;
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41:
/usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)'
125 | operator<<(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed:
a.cc:6:5: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte'
6 | cin << a << b << c;
| ^~~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)'
763 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed:
a.cc:6:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin << a << b << c;
| ^
/usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
4077 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed:
a.cc:6:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin << a << b << c;
| ^
/usr/include/c++/14/bitset:1687:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const bitset<_Nb>&)'
1687 | operator<<(std::basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bitset:1687:5: note: template argument deduction/substitution failed:
a.cc:6:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin << a << b << c;
| ^
In file included from /usr/include/c++/14/bits/ios_base.h:46,
from /usr/include/c++/14/streambuf:43,
from /usr/include/c++/14/bits/streambuf_iterator.h:35,
from /usr/include/c++/14/iterator:66,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54:
/usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)'
339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e)
| ^~~~~~~~
/usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed:
a.cc:6:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin << a << b << c;
| ^
In file included from /usr/include/c++/14/memory:80,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:56:
/usr/include/c++/14/bits/shared_ptr.h:70:5: note: candidate: 'template<class _Ch, class _Tr, class _Tp, __gnu_cxx::_Lock_policy _Lp> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __shared_ptr<_Tp, _Lp>&)'
70 | operator<<(std::basic_ostream<_Ch, _Tr>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/shared_ptr.h:70:5: note: template argument deduction/substitution failed:
a.cc:6:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin << a << b << c;
| ^
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)'
563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed:
a.cc:6:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin << a << b << c;
| ^
/usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)'
573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed:
a.cc:6:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin << a << b << c;
| ^
/usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)'
579 | operator<<(basic_ostream<char, _Traits>& __out, char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed:
a.cc:6:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
6 | cin << a << b << c;
| ^
/usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)'
590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed:
a.cc:6:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
6 | cin << a << b << c;
| ^
/usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)'
595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed:
a.cc:6:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
6 | cin << a << b << c;
| ^
/usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)'
654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed:
a.cc:6:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin << a << b << c;
| ^
In file included from /usr/include/c++/14/ostream:1022:
/usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)'
307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
| ^~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed:
a.cc:6:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin << a << b << c;
| ^
/usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)'
671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:671:5: note: template argument deduction/substitution failed:
a.cc:6:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Trai
|
s288062741
|
p04005
|
C++
|
#include<bits/stdc++.h>
#define all(x) (x).begin(),(x).end()
typedef long long ll;
#define rep(i,n) for(ll i=0, i##_len=(n); i<i##_len; ++i)
using namespace std;
#define sz(x) ((int)(x).size())
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))
#define MEMSET(v, h) memset((v), h, sizeof(v))
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
#define pb push_back
#define mp make_pair
#define y0 y3487465
#define y1 y8687969
#define j0 j1347829
#define j1 j234892
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
const ll INF = 1LL<<60;
int main() {
ll a,b,c;
cin >> a >> b >> c;
ll pat1,pat2,pat3;
if(a % 2 || b % 2 || c % 2){
cout << 0 << endl;
return 0;
}
else {
pat1 = (a + 1) * b * c - a * b * c;
pat2 = a * (b + 1) * c - a * b * c;
pat3 = a * b * (c + 1) - a * b * c;
}
cout << min(pat1,pat2,pat3) << 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 = long long int; _Compare = long long int]':
a.cc:34:15: required from here
34 | cout << min(pat1,pat2,pat3) << endl;
| ~~~^~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function
284 | if (__comp(__b, __a))
| ~~~~~~^~~~~~~~~~
|
s557464425
|
p04005
|
C++
|
#include<bits/stdc++.h>
#define all(x) (x).begin(),(x).end()
typedef long long ll;
#define rep(i,n) for(ll i=0, i##_len=(n); i<i##_len; ++i)
using namespace std;
#define sz(x) ((int)(x).size())
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))
#define MEMSET(v, h) memset((v), h, sizeof(v))
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
#define pb push_back
#define mp make_pair
#define y0 y3487465
#define y1 y8687969
#define j0 j1347829
#define j1 j234892
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
const ll INF = 1LL<<60;
int main() {
ll a,b,c;
cin >> a >> b >> c;
ll pat1,pat2,pat3;
if(a % 2 || b % 2 || c % 2) ans = 0;
else {
pat1 = (a + 1) * b * c - a * b * c;
pat2 = a * (b + 1) * c - a * b * c;
pat3 = a * b * (c + 1) - a * b * c;
}
cout << min(pat1,pat2,pat3) << endl;
}
|
a.cc: In function 'int main()':
a.cc:25:37: error: 'ans' was not declared in this scope; did you mean 'abs'?
25 | if(a % 2 || b % 2 || c % 2) ans = 0;
| ^~~
| abs
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 = long long int; _Compare = long long int]':
a.cc:31:15: required from here
31 | cout << min(pat1,pat2,pat3) << endl;
| ~~~^~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function
284 | if (__comp(__b, __a))
| ~~~~~~^~~~~~~~~~
|
s538720342
|
p04005
|
C++
|
#include<bits/stdc++.h>
#define all(x) (x).begin(),(x).end()
typedef long long ll;
#define rep(i,n) for(ll i=0, i##_len=(n); i<i##_len; ++i)
using namespace std;
#define sz(x) ((int)(x).size())
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))
#define MEMSET(v, h) memset((v), h, sizeof(v))
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
#define pb push_back
#define mp make_pair
#define y0 y3487465
#define y1 y8687969
#define j0 j1347829
#define j1 j234892
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
const ll INF = 1LL<<60;
int main() {
ll a,b,c;
ll ans = INF;
cin >> a >> b >> c;
if(a % 2 || b % 2 || c % 2) ans = 0;
else {
ll pat1 = (a + 1) * b * c - a * b * c;
ll pat2 = a * (b + 1) * c - a * b * c;
ll pat3 = a * b * (c + 1) - a * b * c;
}
cout << min(pat1,pat2,pat3) << endl;
}
|
a.cc: In function 'int main()':
a.cc:31:21: error: 'pat1' was not declared in this scope
31 | cout << min(pat1,pat2,pat3) << endl;
| ^~~~
a.cc:31:26: error: 'pat2' was not declared in this scope
31 | cout << min(pat1,pat2,pat3) << endl;
| ^~~~
a.cc:31:31: error: 'pat3' was not declared in this scope
31 | cout << min(pat1,pat2,pat3) << endl;
| ^~~~
|
s399475037
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namespace std;
#define FOR(i,n) for(int i=0;i<n;i++)
#define why(n,x) int n;while(cin >>n,n!=x)
#define iFOR(i,x,n)for(int i=x;i<n;i++)
#define unless(flg) if ( !(flg) )
#define read cin<<
#define echo cout<<
#define fin <<'\n'
#define __ <<" "<<
#define ___ <<" "
#define bash push_back
#define ALL(x) x.begin(),x.end()
#define SWAP(a,b) ((a != b) && (a += b,b = a - b,a -= b))
#define cinf(n,x) for(int UNCH=0;UNCH<(n);UNCH++) cin >> x[UNCH];
#define fcin(n,x) for(int UNCH=1;UNCH<=(n);UNCH++) cin>> x[UNCH];
#define memmin(x) memset((x),-1,sizeof((x)))
#define memzer(x) memset((x), 0,sizeof((x)))
#define meminf(x) memset((x),0x3f,sizeof((x)))
//#define int long long
typedef long long ll;
typedef pair < int , int > pii;
typedef vector < int > vit;
typedef map < string , int > mstit;
typedef vector < pii > vpi ;
typedef greater < pii > gpi;
typedef priority_queue < pii , vpi , gpi > dijk ;
static const signed int INF = 0x3f3f3f3f;
static const signed long long LINF = 0x3f3f3f3f3f3f3f3fLL;
static const signed int SMOD = 1000000007;
static const signed int NMOD = 1000000009;
static const signed int dx[]={1,0,-1,0,1,1,-1,-1};
static const signed int dy[]={0,-1,0,1,-1,1,-1,1};
bool inside(int x,int y,int w,int h){return (x>=0 && y>=0 && x<w && y<h);}
template<class T>T abs(T &x){return x<0 ? -x : x;}
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
int qp(int a,ll b,int mo){int ans=1;do{if(b&1)ans=1ll*ans*a%mo;a=1ll*a*a%mo;}while(b>>=1);return ans;}
int gcd(int a,int b){return b?gcd(b,a%b):a;}
void solve(){
int a,b,c;
cinf(3,a);
if(a%2==0 || b%2==0 || c%2==0)
cout << 0 fin;
else
cout << min(a*b,min(b*c,c*a)) fin;
}
struct xyz{ xyz(){ cin.tie(0), ios::sync_with_stdio(false); cout <<fixed<<setprecision(12);};}xyzzy;signed main(){solve();return 0;}
|
a.cc: In function 'void solve()':
a.cc:15:59: error: invalid types 'int[int]' for array subscript
15 | #define cinf(n,x) for(int UNCH=0;UNCH<(n);UNCH++) cin >> x[UNCH];
| ^
a.cc:45:3: note: in expansion of macro 'cinf'
45 | cinf(3,a);
| ^~~~
|
s541235561
|
p04005
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main(){
int a[3];
cin>>a[0]>>a[1]>>a[2];
if(a[0]%2==0 || a[1]%2==0 || a[2]%2==0){
cour<<0<<endl;
return 0;
}
sort(a,a+3);
cout<<a[0]*a[1];
}
|
a.cc: In function 'int main()':
a.cc:8:9: error: 'cour' was not declared in this scope
8 | cour<<0<<endl;
| ^~~~
|
s019146640
|
p04005
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main(){
int a[3];
cin>>a[0]>>a[1]>>a[2];
if(a[0]%2==0 || a[1]%2==0 || a[2]%2==0){
cour<<0<<endl;
return 0;
}
sort(a,a+3);
reverse(a,a+3);
cout<<(a[0]-a[0]/2*2)*a[1]*a[2];
}
|
a.cc: In function 'int main()':
a.cc:8:9: error: 'cour' was not declared in this scope
8 | cour<<0<<endl;
| ^~~~
|
s650860778
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define Abs(x)((x) < 0 ? (x) * -1 : (x))
#define rep(x, y) for ((x) = 0; (x) < (y); (x)++)
#define repin(x, y) for ((x) = 0; (x) <= (y); (x)++)
#define nep(x, y) for ((x) = (y) - 1; 0 <= (x); (x)--)
#define nepi(x, y, z) for ((x) = (y) - 1; (z) <= (x); (x)--)
#define repi(x, y, z) for ((x) = (z); (x) < (y); (x)++)
#define repiin(x, y, z) for ((x) = (z); (x) <= (y); (x)++)
#define reps(x, y, z) for ((x) = 0; (x) < (y); (x) += (z))
#define repis(x, y, z, s) for ((x) = (z); (x) < (y); (x) += (s))
#define repiins(x, y, z, s) for ((x) = (z); (x) <= (y); (x) += (s))
#define repit(x) for (__typeof((x).begin()) it = (x).begin(); it != (x).end(); it++)
#define repit2(x) for (__typeof((x).begin()) it2 = (x).begin(); it2 != (x).end(); it2++)
#define nepit(x) for (__typeof((x).rbegin()) it = (x).rbegin(); it != (x).rend(); it++)
#define All(x) (x).begin(),(x).end()
#define Mem0(x) memset(x, 0, sizeof(x))
#define Mem1(x) memset(x, -1, sizeof(x))
#define Unique(v) v.resize(unique(All(v)) - v.begin())
#define peq(p0, p1)(p0.first == p1.first && p0.second == p1.second)
#define End '\n'
#define Out(x) cout<<(x)<<End
#define OutP(p, sep, end) cout<<p.first<<sep<<p.second<<end
template<typename T> inline bool Max(T &x, const T &y) { return x < y ? x = y, 1 : 0; }
template<typename T> inline bool Min(T &x, const T &y) { return x > y ? x = y, 1 : 0; }
template<typename T> using V = vector<T>;
template<typename T> using VV = V<V<T> >;
#define Sort(v) sort(All(v))
#define SortR(v) sort(All(v), std::greater<__typeof(v[0])>())
#define SoArrt(a, n) sort(a, a + n);
#define SoArrtR(a, n) sort(a, a + n, std::greater<__typeof(a[0])>())
#define pb push_back
#define mp make_pair
#define X first
#define Y second
#define lb std::lower_bound
#define ub std::upper_bound
#define lbi(v, x) lb(All(v), (x))-v.begin()
#define ubi(v, x) ub(All(v), (x))-v.begin()
static const ll MOD = 1e9 + 7;
static const double PI = 3.141592653589793;
#define LOCAL 0
int main()
{
#if LOCAL
freopen("in.txt", "r", stdin);
freopen("out.txt", "w", stdout);
freopen("debug.txt", "w", stderr);
#endif
cin.tie(0);
ios::sync_with_stdio(false);
//std::cout.precision(18);
ll a, b, c;
cin >> a >> b >> c;
ll x, y;
ll diff;
x = a / 2;
y = a - x;
x *= b * c;
y *= b * c;
diff = Abs(x - y);
blue = x;
red = y;
x = b / 2;
y = b - x;
x *= a * c;
y *= a * c;
Min(diff, Abs(x - y));
x = c / 2;
y = c - x;
x *= a * b;
y *= a * b;
Min(diff, Abs(x - y));
Out(diff);
return 0;
}
|
a.cc: In function 'int main()':
a.cc:85:9: error: 'blue' was not declared in this scope
85 | blue = x;
| ^~~~
a.cc:86:9: error: 'red' was not declared in this scope; did you mean 'read'?
86 | red = y;
| ^~~
| read
|
s006533846
|
p04005
|
C++
|
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <iomanip>
#include <math.h>
using namespace std;
int main()
{
vector<double> A(3);
cin >> A[0] >> A[1] >> A[2] ;
sort(A.begin(), A.end());
if (A[0] % 2 == 0 || A[1] % 2 == 0 || A[2] % 2 == 0) {
cout << 0 << endl;
}
else {
cout << A[0] * A[1] << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:14:18: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<double>, double>::value_type' {aka 'double'} and 'int' to binary 'operator%'
14 | if (A[0] % 2 == 0 || A[1] % 2 == 0 || A[2] % 2 == 0) {
a.cc:14:35: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<double>, double>::value_type' {aka 'double'} and 'int' to binary 'operator%'
14 | if (A[0] % 2 == 0 || A[1] % 2 == 0 || A[2] % 2 == 0) {
a.cc:14:52: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<double>, double>::value_type' {aka 'double'} and 'int' to binary 'operator%'
14 | if (A[0] % 2 == 0 || A[1] % 2 == 0 || A[2] % 2 == 0) {
|
s145156928
|
p04005
|
C++
|
#include <iostream>
#include <vector>
using namespace std;
int main(){
int s,h;
vector<int> x(3);
for(int i=0;i<3;i++)cin >> x.at(i);
sort(x.begin(),x.end());
s=x.at(0)*x.at(1);
h=x.at(2);
if(h%2==0)cout << 0 << endl;
else cout << s << endl;
}
|
a.cc: In function 'int main()':
a.cc:9:3: error: 'sort' was not declared in this scope; did you mean 'short'?
9 | sort(x.begin(),x.end());
| ^~~~
| short
|
s675247224
|
p04005
|
C++
|
#include <iostream>
#include <algorithm>
using namespace std;
long long int main() {
long long int A, B, C;
cin >> A >> B >> C;
cout << ((A * B * C) % 2) * A * B * C / max({ A, B, C }) << endl;
}
|
a.cc:5:11: error: '::main' must return 'int'
5 | long long int main() {
| ^~~
|
s393498866
|
p04005
|
C++
|
#include<iostream>
#include<algorithm>
using namespace std;
int main(){
long long int a[3];
cin >> a[0] >> a[1]>> a[2];
if(a[0]%2==0||a[1]%2==0||a[2]%2==0){
cout << 0 << endl;
}
else{
sort(a,a+3);
cout << a[0]*a[1] << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:7:20: error: unable to find numeric literal operator 'operator""\U0000ff3d'
7 | cin >> a[0] >> a[1]>> a[2];
| ^~~
a.cc:7:30: error: expected ']' before ';' token
7 | cin >> a[0] >> a[1]>> a[2];
| ^
| ]
|
s701223949
|
p04005
|
C++
|
#include <iostream>
using namespace std;
int main(){
int A, B, C;
cin >> A >> B >> C;
cout << (A*B*C)/max({A,B,C}) << endl;
}
|
a.cc: In function 'int main()':
a.cc:7:22: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
7 | cout << (A*B*C)/max({A,B,C}) << endl;
| ~~~^~~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
257 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
303 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate expects 3 arguments, 1 provided
|
s176869510
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namespace std;
namespace io {
template <typename T> inline void read(T &x) {
bool flag = false; char c = getchar();
while ((c < '0' || c > '9') && c != '-') c = getchar();
c == '-' ? flag = true, x = 0 : x = c - '0';
c = getchar();
while (c >= '0' && c <= '9') x = (x << 3) + (x << 1) + c - '0', c = getchar();
if (flag) x = -x;
}
template <typename T> inline void write(T x) {
char st[10010];
int cnt = 0;
if (x < 0) x = -x, putchar('-');
if (x == 0) putchar('0');
while (x) { st[++cnt] = x % 10 + 48; x /= 10; }
while (cnt) { putchar(st[cnt--]); }
}
}
using namespace io;
int main() {
LL a, b, c;
read(a); read(b); read(c);
if (a > b && a > c) {
write(b * c); puts("");
} else if (b > a && b > c) {
write(a * c); puts("");
} else {
write(a * b); puts("");
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:23:5: error: 'LL' was not declared in this scope
23 | LL a, b, c;
| ^~
a.cc:24:10: error: 'a' was not declared in this scope
24 | read(a); read(b); read(c);
| ^
a.cc:24:19: error: 'b' was not declared in this scope
24 | read(a); read(b); read(c);
| ^
a.cc:24:28: error: 'c' was not declared in this scope
24 | read(a); read(b); read(c);
| ^
|
s480737675
|
p04005
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main() {
long long a, b, c;
cin >> a >> b >> c;
if (a % 2 == 0 || b % 2 = 0 || c % 2 == 0) {
cout << 0 << endl;
return 0;
}
else {
long long dif[3];
dif[0] = a * b;
dif[1] = b * c;
dif[2] = c * a;
sort(dif, dif + 3);
cout << dif[0] << endl;
return 0;
}
}
|
a.cc: In function 'int main()':
a.cc:7:24: error: lvalue required as left operand of assignment
7 | if (a % 2 == 0 || b % 2 = 0 || c % 2 == 0) {
| ~~~~~~~~~~~^~~~~~~~
|
s197380536
|
p04005
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main()
{
cin >> a >> b >> c;
if (a % 2 == 0 || b % 2 == 0 || c % 2 == 0) cout << 0;
else cout << min (min (a*b, a*c), b*c);
return 0;
}
|
a.cc: In function 'int main()':
a.cc:5:12: error: 'a' was not declared in this scope
5 | cin >> a >> b >> c;
| ^
a.cc:5:17: error: 'b' was not declared in this scope
5 | cin >> a >> b >> c;
| ^
a.cc:5:22: error: 'c' was not declared in this scope
5 | cin >> a >> b >> c;
| ^
|
s681875234
|
p04005
|
C++
|
#include<bits//stdc++.h>
#define int long long
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
int d=max({a,b,c}),e=min({a,b,c});
int f=a+b+c-d-e;
if(d%2==1&&e%2==1&&f%2==1){
cout<<e*f<<endl;
}
else{
cout<<0<<endl;
}
return 0;
}
|
cc1plus: error: '::main' must return 'int'
|
s852490542
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namespace std
long long a,b,c;
int main()
{cin>>a>>b>>c;
if(a%2==0||b%2==0||c%2==0)
{cout<<0;
return 0;
}
cout<<min(min(a*b,a*c),b*c);
return 0;
}
|
a.cc:2:20: error: expected ';' before 'long'
2 | using namespace std
| ^
| ;
3 | long long a,b,c;
| ~~~~
|
s324138208
|
p04005
|
C++
|
v#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < n; i++)
#define repr(i, n) for(int i = n;i >= 0;i--)
#define for1(i, m, n) for(int i = m;i < n;i++)
#define ll long long
#define endl '\n'
using namespace std;
int main()
{
cin.tie(0);
ios::sync_with_stdio(false);
ll int a, b, c;
cin >> a >> b >> c;
if (a % 2 == 0 || b % 2 == 0 || c % 2 == 0) {
cout << 0 << endl;
return 0;
}
ll int min1, min2;
if (a < b) {
min1 = a;
min2 = b;
if (c < a) {
min1 = c;
min2 = a;
} else if (c < b) {
min2 = c;
}
} else {
min1 = b;
min2 = a;
if (c < b) {
min1 = c;
min2 = b;
} else if (c < a) {
min2 = c;
}
}
cout << min1 * min2 << endl;
return 0;
}
|
a.cc:1:2: error: stray '#' in program
1 | v#include <bits/stdc++.h>
| ^
a.cc:1:1: error: 'v' does not name a type
1 | v#include <bits/stdc++.h>
| ^
a.cc: In function 'int main()':
a.cc:12:9: error: 'cin' was not declared in this scope
12 | cin.tie(0);
| ^~~
a.cc:13:9: error: 'ios' has not been declared
13 | ios::sync_with_stdio(false);
| ^~~
a.cc:17:9: error: 'cout' was not declared in this scope
17 | cout << 0 << endl;
| ^~~~
a.cc:40:5: error: 'cout' was not declared in this scope
40 | cout << min1 * min2 << endl;
| ^~~~
|
s135269330
|
p04005
|
C++
|
#include<bits/stdc++.h>
#define lli long long int
#define MOD 1000000007
#define FOR(i,n) for(int i=0;i<(int)N;i++)
#define ALL(x) (x).begin(),(x).end()
using namespace std;
inline int getint(){
int n;
scanf("%d",&n);
return n;
}
inline vector<int> getints(int n){
vector<int> a(n);
for(int i=0;i<n;i++)scanf("%d",&a[i]);
return a;
}
inline string getstr(){
string s;
cin>>s;
return s;
}
void dumpints(vector<int> a){
cout<<"[";
for(int i=0;i<a.size()-1;i++){
cout<<a[i]<<",";
}
cout<<a[a.size()-1]<<"]"<<endl;
}
template<class T> bool ifinclude(vector<T> a,T x){
auto itr=find(a.begin(),a.end(),x);
return distance(a.begin(),itr)!=a.size();
}
int main(void){
vector<lli> a=getints(3);
sort(ALL(a));
if(a[0]%2==0||a[1]%2==0||a[2]%2==0){
cout<<0<<endl;
}else{
cout<<a[0]*a[1]<<endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:40:24: error: conversion from 'vector<int>' to non-scalar type 'vector<long long int>' requested
40 | vector<lli> a=getints(3);
| ~~~~~~~^~~
|
s085253808
|
p04005
|
C++
|
#include <bits/stdc++.h>
#define re register
#define max(a,b) ((a)>(b)?(a):(b))
#define min(a,b) ((a)<(b)?(a):(b))
using namespace std;
#define long long ll;
#define ms(arr) memset(arr, 0, sizeof(arr))
const int inf = 0x3f3f3f3f;
ll a,b,c;
int main()
{
cin>>a>>b>>c;
if(a%2==0||b%2==0||c%2==0) {
cout<<0;
return 0;
}
cout<<min(min(a*b,a*c),b*c);
return 0;
}
|
a.cc:9:1: error: 'll' does not name a type
9 | ll a,b,c;
| ^~
a.cc: In function 'int main()':
a.cc:12:10: error: 'a' was not declared in this scope
12 | cin>>a>>b>>c;
| ^
a.cc:12:13: error: 'b' was not declared in this scope
12 | cin>>a>>b>>c;
| ^
a.cc:12:16: error: 'c' was not declared in this scope
12 | cin>>a>>b>>c;
| ^
|
s450981355
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namespace std;
long long a,b,c;
int main()
{
cin>>a>>b>>c;
cout<<min(a*b*(c&1),min(a*c*(b&1),b*c*(a&1));
exit(0);
}
|
a.cc: In function 'int main()':
a.cc:8:47: error: expected ')' before ';' token
8 | cout<<min(a*b*(c&1),min(a*c*(b&1),b*c*(a&1));
| ~ ^
| )
|
s021271022
|
p04005
|
C++
|
#include <algorithm>
#include <iostream>
using namespace std;
int main(){
long a, b, c, ans;
cin >> a >> b >> c;
if ( a % 2 == 0 || a % 2 == 0 || c % 2 == 0){
ans = 0;
}else if ( a >= b && a >= c ){
ans = b * c;
}else if ( b >= a && b >= c ){
ans = a * c;
}else[
ans = a * b;
}
cout << ans << endl;
}
|
a.cc: In function 'int main()':
a.cc:16:16: error: expected ',' before ';' token
16 | ans = a * b;
| ^
| ,
a.cc:16:16: error: expected identifier before ';' token
a.cc:16:16: error: expected ']' before ';' token
16 | ans = a * b;
| ^
| ]
a.cc: In lambda function:
a.cc:16:16: error: expected '{' before ';' token
a.cc: At global scope:
a.cc:18:3: error: 'cout' does not name a type
18 | cout << ans << endl;
| ^~~~
a.cc:19:1: error: expected declaration before '}' token
19 | }
| ^
|
s049950920
|
p04005
|
C++
|
#include<cstdio>
#include<algprithm>
using namespace std;
int main(){
long a,b,c,ans;
scanf("%ld %ld %ld",&a,&b,&c);
if(a%2&&b%2&&c%2){
ans=min(a*b,a*c);
ans=min(ans,b*c);
}
else
ans=0;
printf("%d\n",ans);
}
|
a.cc:2:9: fatal error: algprithm: No such file or directory
2 | #include<algprithm>
| ^~~~~~~~~~~
compilation terminated.
|
s183597280
|
p04005
|
Java
|
import java.util.*;
import java.util.Arrays;
class Main {
private static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
long[] t = new int[3];
t[0] =Long.parseLong(sc.next());
t[1] =Long.parseLong(sc.next());
t[2] =Long.parseLong(sc.next());
Arrays.sort(t);
if(t[0]%2==1 || t[1]%2==1 || t[2]%2==1){
System.out.println(t[0]*t[1]);
}else{
System.out.println(0);
}
}
}
|
Main.java:9: error: incompatible types: int[] cannot be converted to long[]
long[] t = new int[3];
^
1 error
|
s785520628
|
p04005
|
C++
|
#include<iostream>
#include<algorithm>
#include<stdint>
using namespace std;
int main() {
int64_t A[3];
cin >> A[0] >> A[1] >> A[2];
sort(A, A+3);
if ((A[0] & A[1] & A[2] & 1) > 0) cout << A[0] * A[1];
else cout << 0;
return 0;
}
/*
31536000のコメント解説欄
ここテンプレで用意してるから、A問題とかだとこの先空欄の危険あり
また、コンテスト後に https://31536000.hatenablog.com/ で解説していると思うので、良かったら読んでねー
1つの直方体上、ということでどこかに分割線があると言える
当然だが、分割線はA/2、B/2、C/2のどれかになる
ここで、どれかが偶数ならそこで分割すれば差は0であり、そうでないなら最も大きい値の所で分割すれば差は残りの2要素の積になる
*/
|
a.cc:3:9: fatal error: stdint: No such file or directory
3 | #include<stdint>
| ^~~~~~~~
compilation terminated.
|
s992921903
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(){
int a,b,c;
cin >.a>>b>>c;
if(a%2 == 0 || b%2 == 0|| c%2 == 0){
cout << 0 <<endl;
}
else cout << min({a*b,b*c,c*a}) <<endl;
}
|
a.cc: In function 'int main()':
a.cc:6:8: error: expected primary-expression before '.' token
6 | cin >.a>>b>>c;
| ^
|
s482512463
|
p04005
|
C++
|
#include <algorithm>
#include <iostream>
using namespace std;
#define pi 3.14159265
int main()
{
long long ans = 0, i = 0, j = 0, k = 0, l = 0;
long long a, b, c;
cin >> a >> b >> c;
if (a % 2 == 0 || b % 2 == 0 || c % 2 == 0)
ans = 0;
else
ans=min(a*b,b*c,c*a);;
cout << ans << endl;
return 0;
}
|
In file included from /usr/include/c++/14/algorithm:60,
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 = long long int; _Compare = long long int]':
a.cc:16:10: required from here
16 | ans=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))
| ~~~~~~^~~~~~~~~~
|
s847591565
|
p04005
|
C++
|
#include <algorithm>
#include <iostream>
using namespace std;
#define pi 3.14159265
int main()
{
long long ans = 0, i = 0, j = 0, k = 0, l = 0;
long long a, b, c;
cin >> a >> b >> c;
if (a % 2 == 0 || b % 2 == 0 || c % 2 == 0)
ans = 0;
else
ans=ans= min(a*b,b*c,c*a);;
cout << ans << endl;
return 0;
}
|
In file included from /usr/include/c++/14/algorithm:60,
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 = long long int; _Compare = long long int]':
a.cc:16:15: required from here
16 | ans=ans= 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))
| ~~~~~~^~~~~~~~~~
|
s794026914
|
p04005
|
Java
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
class Program
{
static void Main(string[] args)
{
var A = Console.ReadLine().Split(' ').Select(x => long.Parse(x)).ToArray();
Array.Sort(A);
Console.WriteLine(A[0]*A[1]*(A[2]-A[2]/2)-(A[0] * A[1] * (A[2] / 2)));
}
}
|
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
using System;
^
(use --enable-preview to enable unnamed classes)
Main.java:2: error: class, interface, enum, or record expected
using System.Collections.Generic;
^
Main.java:3: error: class, interface, enum, or record expected
using System.Linq;
^
Main.java:4: error: class, interface, enum, or record expected
using System.Text;
^
Main.java:5: error: class, interface, enum, or record expected
using System.Threading.Tasks;
^
Main.java:11: error: illegal start of expression
var A = Console.ReadLine().Split(' ').Select(x => long.Parse(x)).ToArray();
^
Main.java:11: error: class expected
var A = Console.ReadLine().Split(' ').Select(x => long.Parse(x)).ToArray();
^
Main.java:11: error: ')' or ',' expected
var A = Console.ReadLine().Split(' ').Select(x => long.Parse(x)).ToArray();
^
Main.java:11: error: not a statement
var A = Console.ReadLine().Split(' ').Select(x => long.Parse(x)).ToArray();
^
Main.java:11: error: ';' expected
var A = Console.ReadLine().Split(' ').Select(x => long.Parse(x)).ToArray();
^
10 errors
|
s504003636
|
p04005
|
Java
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
var A = Console.ReadLine().Split(' ').Select(x => long.Parse(x)).ToArray();
Array.Sort(A);
Console.WriteLine(A[0]*A[1]*(A[2]-A[2]/2)-(A[0] * A[1] * (A[2] / 2)));
}
}
}
|
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
using System;
^
(use --enable-preview to enable unnamed classes)
Main.java:2: error: class, interface, enum, or record expected
using System.Collections.Generic;
^
Main.java:3: error: class, interface, enum, or record expected
using System.Linq;
^
Main.java:4: error: class, interface, enum, or record expected
using System.Text;
^
Main.java:5: error: class, interface, enum, or record expected
using System.Threading.Tasks;
^
Main.java:7: error: class, interface, enum, or record expected
namespace ConsoleApp1
^
Main.java:13: error: illegal start of expression
var A = Console.ReadLine().Split(' ').Select(x => long.Parse(x)).ToArray();
^
Main.java:13: error: class expected
var A = Console.ReadLine().Split(' ').Select(x => long.Parse(x)).ToArray();
^
Main.java:13: error: ')' or ',' expected
var A = Console.ReadLine().Split(' ').Select(x => long.Parse(x)).ToArray();
^
Main.java:13: error: not a statement
var A = Console.ReadLine().Split(' ').Select(x => long.Parse(x)).ToArray();
^
Main.java:13: error: ';' expected
var A = Console.ReadLine().Split(' ').Select(x => long.Parse(x)).ToArray();
^
Main.java:19: error: class, interface, enum, or record expected
}
^
12 errors
|
s693135314
|
p04005
|
Java
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
int[] A = new int[3];
A[0] = int.Parse(Console.ReadLine());
A[1] = int.Parse(Console.ReadLine());
A[2] = int.Parse(Console.ReadLine());
Array.Sort(A);
Console.WriteLine(A[0]*A[1]*(A[2]-A[2]/2)-(A[0] * A[1] * (A[2] / 2)));
}
}
}
|
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
using System;
^
(use --enable-preview to enable unnamed classes)
Main.java:2: error: class, interface, enum, or record expected
using System.Collections.Generic;
^
Main.java:3: error: class, interface, enum, or record expected
using System.Linq;
^
Main.java:4: error: class, interface, enum, or record expected
using System.Text;
^
Main.java:5: error: class, interface, enum, or record expected
using System.Threading.Tasks;
^
Main.java:7: error: class, interface, enum, or record expected
namespace ConsoleApp1
^
Main.java:14: error: class expected
A[0] = int.Parse(Console.ReadLine());
^
Main.java:14: error: ';' expected
A[0] = int.Parse(Console.ReadLine());
^
Main.java:14: error: ';' expected
A[0] = int.Parse(Console.ReadLine());
^
Main.java:15: error: class expected
A[1] = int.Parse(Console.ReadLine());
^
Main.java:15: error: ';' expected
A[1] = int.Parse(Console.ReadLine());
^
Main.java:15: error: ';' expected
A[1] = int.Parse(Console.ReadLine());
^
Main.java:16: error: class expected
A[2] = int.Parse(Console.ReadLine());
^
Main.java:16: error: ';' expected
A[2] = int.Parse(Console.ReadLine());
^
Main.java:16: error: ';' expected
A[2] = int.Parse(Console.ReadLine());
^
Main.java:22: error: class, interface, enum, or record expected
}
^
16 errors
|
s718939471
|
p04005
|
C++
|
#include<cstdio>
int a[3],s;
int main(){
int t;
scanf("%d%d%d",&a[0],&a[1],&a[2]);
for(int i=0;i<=2;i++)
if(a[i]%2==0)
s++;a
for(int i=1;i<=2;i++)
for(int j=i;j<=2;j++)
if(a[i]>a[j]){
t=a[i];
a[i]=a[j];
a[j]=t;
}
if(s==2||s==3)
printf("0");
else
printf("%d",a[0]*a[1]);
}
|
a.cc: In function 'int main()':
a.cc:8:30: error: expected ';' before 'for'
8 | s++;a
| ^
| ;
9 | for(int i=1;i<=2;i++)
| ~~~
a.cc:9:21: error: 'i' was not declared in this scope
9 | for(int i=1;i<=2;i++)
| ^
a.cc:10:29: error: 'j' was not declared in this scope
10 | for(int j=i;j<=2;j++)
| ^
|
s264445610
|
p04005
|
C++
|
#include<cstdio>
int a[3],s;
int main(){
int t;
scanf("%d%d%d",&a[0],&a[1],&a[2]);
for(int i=0;i<=2;i++)
if(a[i]%2==0)
s++;a
for(int i=1;i<=2;i++)
for(int j=i;j<=2;j++)
if(a[i]>a[j]){
t=a[i];
a[i]=a[j];
a[j]=t;
}
if(s==2||s==3)
printf("0");
else
printf("%d",a[0]*a[1]);
}
|
a.cc: In function 'int main()':
a.cc:8:30: error: expected ';' before 'for'
8 | s++;a
| ^
| ;
9 | for(int i=1;i<=2;i++)
| ~~~
a.cc:9:21: error: 'i' was not declared in this scope
9 | for(int i=1;i<=2;i++)
| ^
a.cc:10:29: error: 'j' was not declared in this scope
10 | for(int j=i;j<=2;j++)
| ^
|
s060787409
|
p04005
|
C++
|
#include <iostream>
using namespace std;
vector<int> v(3);
int main(){
ios_base::sync_with_stdio(false);
cin >> v[0] >> v[1] >> v[2];
sort(v.begin(), v.end());
if(v[2] & 1){
cout << v[0] * 1LL * v[1] << endl;
} else{
cout << 0 << endl;
}
return 0;
}
|
a.cc:5:1: error: 'vector' does not name a type
5 | vector<int> v(3);
| ^~~~~~
a.cc: In function 'int main()':
a.cc:9:16: error: 'v' was not declared in this scope
9 | cin >> v[0] >> v[1] >> v[2];
| ^
a.cc:10:9: error: 'sort' was not declared in this scope; did you mean 'short'?
10 | sort(v.begin(), v.end());
| ^~~~
| short
|
s589897579
|
p04005
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main()
{
long long a,b,c;
cin>>a>>b>>c;
if(a%2==0||b%2==0||c%2==0)
printf("0");
else
{
long long ans=a*b;
ans=min(ans,a*c);
ans=min(ans,b*c);
}
printf("%lld",ans);
}
|
a.cc: In function 'int main()':
a.cc:15:23: error: 'ans' was not declared in this scope; did you mean 'abs'?
15 | printf("%lld",ans);
| ^~~
| abs
|
s474396379
|
p04005
|
C++
|
#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main(){
ll a, b, c;
cin >> a >> b >> c;
if(a % 2 == 0 || b % 2 == 0 || c % 2 == 0){
cout << 0 << endl;
}else{
cout << min(a * b, b * c, c * a) << 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 = long long int; _Compare = long long int]':
a.cc:11:16: required from here
11 | 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))
| ~~~~~~^~~~~~~~~~
|
s944163311
|
p04005
|
C++
|
// sandeep_007
#include <bits/stdc++.h>
using namespace std;
#define PI acos(-1)
#define mod 1000000007
#define ll long long
#define nitro std::ios_base::sync_with_stdio (false); cin.tie(NULL)
#define pb push_back
#define mp make_pair
#define vi vector < ll >
#define mod 1000000007
bool sortbysec(const pair<ll,ll> &A,
const pair<ll,ll> &b){
return (A.second < b.second);
}
inline ll mx(ll A,ll b){
if(A > b) return A;
else return b;
}
ll power(ll x,ll y,ll p){
ll res = 1;
x = x % p;
while (y > 0){
if (y & 1)
res = (res*x) % p;
y = y>>1;
x = (x*x) % p;
}
return res;
}
ll gcd(ll A,ll b){if(b==0) return A; else return gcd(b,A%b);}
#define N 105
#define X(x,u,v) (b[x][v]-b[x][(u)-1])
#define Y(x,u,v) (a[v][x]-a[(u)-1][x])
int n,m,u,v;short dp[N][N][N][N],a[N][N],b[N][N],Ans;
int main()
{
#ifdef DBG
freopen("in","r",stdin);
#endif
// scanf("%d%d",&n,&m);
cin >> n >> m;
for (int i=1;i<=n;i++){
// scanf("%s",s+1);
string s;
cin >> s;
for (int j=1;j<=m;j++)
{
if (s[j]=='E') u=i,v=j;
if (s[j]=='o') a[i][j]=b[i][j]=1;
a[i][j]+=a[i-1][j];
b[i][j]+=b[i][j-1];
}
}
for (int i=0;i<n;i++){
for (int j=0;j<m;j++){
for (int x1=1;x1+i<=n;x1++){
for (int y1=1;y1+j<=m;y1++){
int x2=x1+i,y2=y1+j;
int tmp=dp[x1][x2][y1][y2];
Ans = max(Ans,dp[x1][x2][y1][y2]);
int x3=max(1,x2-(u-1)),x4=min(n,x1+(n-u)),y3=max(1,y2-(v-1)),y4=min(m,y1+(m-v));
if (x3>x4||y3>y4) continue;
if (x1>1&&x3<x1) dp[x1-1][x2][y1][y2] = max(dp[x1-1][x2][y1][y2],tmp+X(x1-1,max(y1,y3),min(y2,y4)));
if (x2<n&&x4>x2) dp[x1][x2+1][y1][y2] = max(dp[x1][x2+1][y1][y2],tmp+X(x2+1,max(y1,y3),min(y2,y4)));
if (y1>1&&y3<y1) dp[x1][x2][y1-1][y2] = max(dp[x1][x2][y1-1][y2],tmp+Y(y1-1,max(x1,x3),min(x2,x4)));
if (y2<m&&y4>y2) dp[x1][x2][y1][y2+1] = max(dp[x1][x2][y1][y2+1],tmp+Y(y2+1,max(x1,x3),min(x2,x4)));
}
}
}
}
cout << Ans << "\n";
// printf("%d\n",(int)Ans);
}
|
a.cc: In function 'int main()':
a.cc:79:64: error: no matching function for call to 'max(short int&, int)'
79 | if (x1>1&&x3<x1) dp[x1-1][x2][y1][y2] = max(dp[x1-1][x2][y1][y2],tmp+X(x1-1,max(y1,y3),min(y2,y4)));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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:3:
/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: template argument deduction/substitution failed:
a.cc:79:64: note: deduced conflicting types for parameter 'const _Tp' ('short int' and 'int')
79 | if (x1>1&&x3<x1) dp[x1-1][x2][y1][y2] = max(dp[x1-1][x2][y1][y2],tmp+X(x1-1,max(y1,y3),min(y2,y4)));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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, 2 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: candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
5716 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: template argument deduction/substitution failed:
a.cc:79:64: note: mismatched types 'std::initializer_list<_Tp>' and 'short int'
79 | if (x1>1&&x3<x1) dp[x1-1][x2][y1][y2] = max(dp[x1-1][x2][y1][y2],tmp+X(x1-1,max(y1,y3),min(y2,y4)));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:80:64: error: no matching function for call to 'max(short int&, int)'
80 | if (x2<n&&x4>x2) dp[x1][x2+1][y1][y2] = max(dp[x1][x2+1][y1][y2],tmp+X(x2+1,max(y1,y3),min(y2,y4)));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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: template argument deduction/substitution failed:
a.cc:80:64: note: deduced conflicting types for parameter 'const _Tp' ('short int' and 'int')
80 | if (x2<n&&x4>x2) dp[x1][x2+1][y1][y2] = max(dp[x1][x2+1][y1][y2],tmp+X(x2+1,max(y1,y3),min(y2,y4)));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
5706 | max(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
5716 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: template argument deduction/substitution failed:
a.cc:80:64: note: mismatched types 'std::initializer_list<_Tp>' and 'short int'
80 | if (x2<n&&x4>x2) dp[x1][x2+1][y1][y2] = max(dp[x1][x2+1][y1][y2],tmp+X(x2+1,max(y1,y3),min(y2,y4)));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:81:64: error: no matching function for call to 'max(short int&, int)'
81 | if (y1>1&&y3<y1) dp[x1][x2][y1-1][y2] = max(dp[x1][x2][y1-1][y2],tmp+Y(y1-1,max(x1,x3),min(x2,x4)));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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: template argument deduction/substitution failed:
a.cc:81:64: note: deduced conflicting types for parameter 'const _Tp' ('short int' and 'int')
81 | if (y1>1&&y3<y1) dp[x1][x2][y1-1][y2] = max(dp[x1][x2][y1-1][y2],tmp+Y(y1-1,max(x1,x3),min(x2,x4)));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
5706 | max(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
5716 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: template argument deduction/substitution failed:
a.cc:81:64: note: mismatched types 'std::initializer_list<_Tp>' and 'short int'
81 | if (y1>1&&y3<y1) dp[x1][x2][y1-1][y2] = max(dp[x1][x2][y1-1][y2],tmp+Y(y1-1,max(x1,x3),min(x2,x4)));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:82:64: error: no matching function for call to 'max(short int&, int)'
82 | if (y2<m&&y4>y2) dp[x1][x2][y1][y2+1] = max(dp[x1][x2][y1][y2+1],tmp+Y(y2+1,max(x1,x3),min(x2,x4)));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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: template argument deduction/substitution failed:
a.cc:82:64: note: deduced conflicting types for parameter 'const _Tp' ('short int' and 'int')
82 | if (y2<m&&y4>y2) dp[x1][x2][y1][y2+1] = max(dp[x1][x2][y1][y2+1],tmp+Y(y2+1,max(x1,x3),min(x2,x4)));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
5706 | max(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
5716 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: template argument deduction/substitution failed:
a.cc:82:64: note: mismatched types 'std::initializer_list<_Tp>' and 'short int'
82 | if (y2<m&&y4>y2) dp[x1][x2][y1][y2+1] = max(dp[x1][x2][y1][y2+1],tmp+Y(y2+1,max(x1,x3),min(x2,x4)));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
s447352726
|
p04005
|
C++
|
#include <iostream>
using namespace std;
int main() {
ll a, b, c;
cin >> a >> b >> c;
ll da = (a - a / 2) * b * c - a / 2 * b * c;
ll db = (b - b / 2) * a * c - b / 2 * a * c;
ll dc = (c - c / 2) * a * b - c / 2 * a * b;
cout << min(da, min(db, dc)) << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:5:3: error: 'll' was not declared in this scope
5 | ll a, b, c;
| ^~
a.cc:6:10: error: 'a' was not declared in this scope
6 | cin >> a >> b >> c;
| ^
a.cc:6:15: error: 'b' was not declared in this scope
6 | cin >> a >> b >> c;
| ^
a.cc:6:20: error: 'c' was not declared in this scope
6 | cin >> a >> b >> c;
| ^
a.cc:8:5: error: expected ';' before 'da'
8 | ll da = (a - a / 2) * b * c - a / 2 * b * c;
| ^~~
| ;
a.cc:9:5: error: expected ';' before 'db'
9 | ll db = (b - b / 2) * a * c - b / 2 * a * c;
| ^~~
| ;
a.cc:10:5: error: expected ';' before 'dc'
10 | ll dc = (c - c / 2) * a * b - c / 2 * a * b;
| ^~~
| ;
a.cc:12:15: error: 'da' was not declared in this scope
12 | cout << min(da, min(db, dc)) << endl;
| ^~
a.cc:12:23: error: 'db' was not declared in this scope
12 | cout << min(da, min(db, dc)) << endl;
| ^~
a.cc:12:27: error: 'dc' was not declared in this scope
12 | cout << min(da, min(db, dc)) << endl;
| ^~
|
s121440791
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namespace std;
#define NDEBUG
#ifdef DEBUG
#include "../cout11.h"
#undef NDEBUG
#endif
#include <cassert>
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> ii;
typedef pair<ll,ll> llll;
typedef pair<double,double> dd;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef vector<ii> vii;
typedef vector<vector<ii>> vvii;
typedef vector<ll> vll;
#define sz(a) int((a).size())
#define pb push_back
#define FOR(var,from,to) for(int var=(from);var<=(to);++var)
#define rep(var,n) for(int var=0;var<(n);++var)
#define rep1(var,n) for(int var=1;var<=(n);++var)
#define repC2(vari,varj,n) for(int vari=0;vari<(n)-1;++vari)for(int varj=vari+1;varj<(n);++varj)
#define ALL(c) (c).begin(),(c).end()
#define RALL(c) (c).rbegin(),(c).rend()
#define tr(i,c) for(auto i=(c).begin(); i!=(c).end(); ++i)
#define found(s,e) ((s).find(e)!=(s).end())
#define mset(arr,val) memset(arr,val,sizeof(arr))
#define mid(x,y) ((x)+((y)-(x))/2)
#define IN(x,a,b) ((a)<=(x)&&(x)<=(b))
ll gcd(ll a, ll b) { while(a) swap(a, b%=a); return b; }
const ll MOD=1000000007LL;
ll ADD(ll x, ll y) { return (x+y) % MOD; }
ll SUB(ll x, ll y) { return (x-y+MOD) % MOD; }
ll MUL(ll x, ll y) { return x*y % MOD; }
ll POW(ll x, ll e) { ll v=1; for(; e; x=MUL(x,x), e>>=1) if (e&1) v = MUL(v,x); return v; }
ll DIV(ll x, ll y) { /*assert(y%MOD!=0);*/ return MUL(x, POW(y, MOD-2)); }
// ll comb(ll n, ll k) { ll v=1; for(ll i=1; i<=k; i++) v = DIV(MUL(v, n-i+1),i); return v; }
//
ll solve(ll a,ll b,ll c){
ll diff = 0x7fffffff;
if (a % 2) {
diff = min(diff, b*c);
} else {
diff = 0;
}
if (b % 2) {
diff = min(diff, c*a);
} else {
diff = 0;
}
if (c % 2) {
diff = min(diff, a*b);
} else {
diff = 0;
}
return -d;
}
int main() {
int a,b,c; cin >>a>>b>>c;
cout << solve(a,b,c) << endl;
// cout << (solve(N,a) ? "Yes":"No") << endl;
return 0;
}
|
a.cc: In function 'll solve(ll, ll, ll)':
a.cc:66:13: error: 'd' was not declared in this scope
66 | return -d;
| ^
|
s084302888
|
p04005
|
C++
|
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
#define FOR(i,a,b) for(int (i)=(a);(i)<=(b);(i)++)
#define rep(i,n) FOR(i,0,n-1)
#define int long long
int s[200005];
signed main(){
int a,b,c;cin>>a>>b>>c;
if(a&0 || b&0 || c&0) cout <, 0 <<endl;
else
{
int ans = min(a*b,b*c);
ans = min(ans,c*a);
cout << ans << endl;
}
}
//cout << ans << endl;
|
a.cc: In function 'int main()':
a.cc:16:37: error: expected primary-expression before ',' token
16 | if(a&0 || b&0 || c&0) cout <, 0 <<endl;
| ^
a.cc:16:41: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
16 | if(a&0 || b&0 || c&0) cout <, 0 <<endl;
| ~~^~~~~~
|
s701793023
|
p04005
|
C++
|
#include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <vector>
#include <cstdio>
#include <bits/stdc++.h>
#include <set>
#include <stdio.h>
using namespace std;
using ll =long long;
int main (void) {
ll s[3];
cin >> s[0] >> s[1] >> s[2];
if (s[0]*s[1]*s[2]%2==0){
cout << 0;
return 0;
}
sort(s,s+3);
ans=s[0]*s[1];
cout << ans;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:21:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
21 | ans=s[0]*s[1];
| ^~~
| abs
|
s312869176
|
p04005
|
C++
|
#include <iostream>
#include <climits>
#include <stack>
#include <queue>
#include <string>
#include <random>
#include <utility>
#include <cmath>
#include <set>
#include <map>
#include <math.h>
#include <string.h>
#include <iomanip>
#include <stdlib.h>
#include <algorithm>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
long long int INF = 1e18;
double Pi = 3.141592653589;
const int mod = 1000000007;
// memset(a,0,sizeof(a)); →全部0にする
vector<int> G[100005];
std::vector<P> tree[100010];
int dx[8]={1,0,-1,0,1,1,-1,-1};
int dy[8]={0,1,0,-1,1,-1,-1,1};
ll i,j,k;
ll n,m;
ll a,b,c;
ll ans=0;
ll c=0;
int main(){
cin>>a>>b>>c;
if(!(a*b*c&1))ans=0;
else ans=min(a*b,min(b*c,c*a));
cout<<ans<<endl;
return 0;
}
|
a.cc:38:4: error: redefinition of 'll c'
38 | ll c=0;
| ^
a.cc:36:8: note: 'll c' previously declared here
36 | ll a,b,c;
| ^
|
s072923952
|
p04005
|
C++
|
#include <bits/stdc++.h>
#define F(i,j,k) for(int i=(j);i<=(k);++i)
using namespace std;
const int N=100005;
struct V{int head;}v[N];
struct E{int u,v,next;}e[N*2];
int n,m,ecnt=1,degree[N];
inline void add(int x,int y){
e[++ecnt].u=x,e[ecnt].v=y;
e[ecnt].next=v[x].head,v[x].head=ecnt;
e[++ecnt].u=y,e[ecnt].v=x;
e[ecnt].next=v[y].head,v[y].head=ecnt;
degree[x]++,degree[y]++;
}
#define ll long long
int size[N];
ll ans;
void dfs(int x,int f,int fl){
size[x]+=fl,vis[x]=1;
for(int i=v[x].head;i;i=e[i].next){
int y=e[i].v;
if(y==f)continue;
if(!vis[y])dfs(y,x,fl*-1);
size[x]+=size[y];
}
ans+=abs(size[x]);
}
int fa[N];
bool vis[N];
inline int find(int x){return fa[x]=(x==fa[x]?x:find(fa[x]));}
inline void uni(int x,int y){fa[find(x)]=find(y);}
void get(int x){
for(int i=v[x].head;i;i=e[i].next){
int y=e[i].v;
if(!fa[y])fa[y]=x,get(y);
}
}
int main(){
//freopen("txt.in","r",stdin);freopen("txt.out","w",stdout);
scanf("%d %d\n",&n,&m);
int tu,tv;
int U,V;
F(i,1,m){
scanf("%d %d\n",&tu,&tv),add(tu,tv);
if(find(tu)==find(tv))U=tu,V=tv;
else uni(tu,tv);
}
if(n==m){
memset(fa,0,sizeof(fa));
get(U);
int top=0,s[N];
for(int i=V;i;i=fa[i])s[++top]=i;
if(top&1){
dfs(U,0,1);
int temp=size[U];
if(temp%2){printf("-1\n");return 0;}
else{
F(i,1,n)size[U]=0;
size[U]-=temp/2,size[V]-=temp/2;
memset(vis,0,sizeof(vis));
dfs(U,0,1);
printf("%lld\n",ans+temp/2);
}
}
else{
}
}
else{
F(i,1,n)if(degree[i]==1){
dfs(i,0,1);
if(!size[i])printf("%lld\n",ans);
else printf("-1\n");
return 0;
}
}
return 0;
}
|
a.cc: In function 'void dfs(int, int, int)':
a.cc:19:9: error: reference to 'size' is ambiguous
19 | size[x]+=fl,vis[x]=1;
| ^~~~
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:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
272 | size(const _Tp (&)[_Nm]) noexcept
| ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note: 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
262 | size(const _Container& __cont) noexcept(noexcept(__cont.size()))
| ^~~~
a.cc:16:5: note: 'int size [100005]'
16 | int size[N];
| ^~~~
a.cc:19:21: error: 'vis' was not declared in this scope
19 | size[x]+=fl,vis[x]=1;
| ^~~
a.cc:24:17: error: reference to 'size' is ambiguous
24 | size[x]+=size[y];
| ^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
272 | size(const _Tp (&)[_Nm]) noexcept
| ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note: 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
262 | size(const _Container& __cont) noexcept(noexcept(__cont.size()))
| ^~~~
a.cc:16:5: note: 'int size [100005]'
16 | int size[N];
| ^~~~
a.cc:24:26: error: reference to 'size' is ambiguous
24 | size[x]+=size[y];
| ^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
272 | size(const _Tp (&)[_Nm]) noexcept
| ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note: 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
262 | size(const _Container& __cont) noexcept(noexcept(__cont.size()))
| ^~~~
a.cc:16:5: note: 'int size [100005]'
16 | int size[N];
| ^~~~
a.cc:26:18: error: reference to 'size' is ambiguous
26 | ans+=abs(size[x]);
| ^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
272 | size(const _Tp (&)[_Nm]) noexcept
| ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note: 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
262 | size(const _Container& __cont) noexcept(noexcept(__cont.size()))
| ^~~~
a.cc:16:5: note: 'int size [100005]'
16 | int size[N];
| ^~~~
a.cc: In function 'int main()':
a.cc:55:34: error: reference to 'size' is ambiguous
55 | int temp=size[U];
| ^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
272 | size(const _Tp (&)[_Nm]) noexcept
| ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note: 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
262 | size(const _Container& __cont) noexcept(noexcept(__cont.size()))
| ^~~~
a.cc:16:5: note: 'int size [100005]'
16 | int size[N];
| ^~~~
a.cc:58:41: error: reference to 'size' is ambiguous
58 | F(i,1,n)size[U]=0;
| ^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
272 | size(const _Tp (&)[_Nm]) noexcept
| ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note: 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
262 | size(const _Container& __cont) noexcept(noexcept(__cont.size()))
| ^~~~
a.cc:16:5: note: 'int size [100005]'
16 | int size[N];
| ^~~~
a.cc:59:33: error: reference to 'size' is ambiguous
59 | size[U]-=temp/2,size[V]-=temp/2;
| ^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
272 | size(const _Tp (&)[_Nm]) noexcept
| ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note: 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
262 | size(const _Container& __cont) noexcept(noexcept(__cont.size()))
| ^~~~
a.cc:16:5: note: 'int size [100005]'
16 | int size[N];
| ^~~~
a.cc:59:49: error: reference to 'size' is ambiguous
59 | size[U]-=temp/2,size[V]-=temp/2;
| ^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
272 | size(const _Tp (&)[_Nm]) noexcept
| ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note: 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
262 | size(const _Container& __cont) noexcept(noexcept(__cont.size()))
| ^~~~
a.cc:16:5: note: 'int size [100005]'
16 | int size[N];
| ^~~~
a.cc:72:29: error: reference to 'size' is ambiguous
72 | if(!size[i])printf("%lld\n",ans);
| ^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
272 | size(const _Tp (&)[_Nm]) noexcept
| ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note: 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
262 | size(const _Container& __cont) noexcept(noexcept(__cont.size()))
| ^~~~
a.cc:16:5: note: 'int size [100005]'
16 | int size[N];
| ^~~~
|
s121701843
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namespace std;
long long INF=1e15;
signed main(){
ios::sync_with_stdio(false);
cin.tie(0);
int a,b,c;
cin>>a>>b>>c;
long long ans=abs((a/2)*b*c-(a-a/2)*b*c);
ans=min(ans,abs((a*(b/2)*c)-a*(b-b/2)*c));
ans=min(ans,abs((a*b*(c/2))-a*b*(c-c/2)));
cout<<ans<<endl;
}
|
a.cc: In function 'int main()':
a.cc:15:12: error: no matching function for call to 'min(long long int&, int)'
15 | ans=min(ans,abs((a*(b/2)*c)-a*(b-b/2)*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: template argument deduction/substitution failed:
a.cc:15:12: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
15 | ans=min(ans,abs((a*(b/2)*c)-a*(b-b/2)*c));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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, 2 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: candidate expects 1 argument, 2 provided
/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: template argument deduction/substitution failed:
a.cc:15:12: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
15 | ans=min(ans,abs((a*(b/2)*c)-a*(b-b/2)*c));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:16:12: error: no matching function for call to 'min(long long int&, int)'
16 | ans=min(ans,abs((a*b*(c/2))-a*b*(c-c/2)));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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: template argument deduction/substitution failed:
a.cc:16:12: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
16 | ans=min(ans,abs((a*b*(c/2))-a*b*(c-c/2)));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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, 2 provided
/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: candidate expects 1 argument, 2 provided
/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: template argument deduction/substitution failed:
a.cc:16:12: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
16 | ans=min(ans,abs((a*b*(c/2))-a*b*(c-c/2)));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
s023674128
|
p04005
|
C++
|
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <algorithm>
#include <queue>
using namespace std;
typedef long long LL;
const int Maxn = 1e5 + 5;
const int inf = 1 << 30;
const LL Inf = 1LL << 60;
int main ()
{
int a,b,c;
scanf("%d%d%d",&a,&b,&c);
LL s;
s = a*b*c;
if (s%2 == 0) printf("0");
if (s%2 == 1)
{
LL d;
d = min(a*b,b*c);
d = min(d,a*c);
printf("%lld",d);
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:23:32: error: no matching function for call to 'min(LL&, int)'
23 | d = min(d,a*c);
| ~~~^~~~~~~
In file included from /usr/include/c++/14/bits/specfun.h:43,
from /usr/include/c++/14/cmath:3906,
from a.cc:4:
/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: template argument deduction/substitution failed:
a.cc:23:32: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
23 | d = min(d,a*c);
| ~~~^~~~~~~
/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, 2 provided
In file included from /usr/include/c++/14/algorithm:61,
from a.cc:5:
/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: candidate expects 1 argument, 2 provided
/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: template argument deduction/substitution failed:
a.cc:23:32: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
23 | d = min(d,a*c);
| ~~~^~~~~~~
|
s828885951
|
p04005
|
Java
|
import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
long[] a = new long[3];
a[0] = sc.nextLong();
a[1] = sc.nextLong();
a[2] = sc.nextLong();
sc.close();
if(a[0]%2==1 && a[1]%2==1 && a[2]%2==1){
Arrays.sort(a);
System.out.println(a[0]*a[1]);
}else{
System.out.println("0");
}
}
}
|
Main.java:12: error: cannot find symbol
Arrays.sort(a);
^
symbol: variable Arrays
location: class Main
1 error
|
s119788423
|
p04005
|
Java
|
import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
long[] a = new long a;
a[0] = sc.nextLong();
a[1] = sc.nextLong();
a[2] = sc.nextLong();
sc.close();
if(a[0]%2==1 && a[1]%2==1 && a[2]%2==1){
Arrays.sort(a);
System.out.println(a[0]*a[1]);
}else{
System.out.println("0");
}
}
}
|
Main.java:6: error: '[' expected
long[] a = new long a;
^
Main.java:6: error: ']' expected
long[] a = new long a;
^
2 errors
|
s262522195
|
p04005
|
C++
|
use std::io;
fn next_vec() -> Vec<i64> {
let mut buf = String::new();
io::stdin().read_line(&mut buf).unwrap();
buf.split_whitespace().map(|n| n.parse().unwrap()).collect()
}
fn main() {
let v = next_vec();
let a = v[0];
let b = v[1];
let c = v[2];
let ans = if a % 2 != 0 && b % 2 != 0 && c % 2 != 0 {
a * b * c / v.iter().max().unwrap()
} else {
0
};
println!("{:?}", ans);
}
|
a.cc:1:1: error: 'use' does not name a type
1 | use std::io;
| ^~~
a.cc:3:1: error: 'fn' does not name a type
3 | fn next_vec() -> Vec<i64> {
| ^~
a.cc:9:1: error: 'fn' does not name a type
9 | fn main() {
| ^~
|
s722668669
|
p04005
|
C++
|
#include <iostream>
#include <vector>
#include <algorithm>
#include <set>
using namespace std;
int main(void)
{
long a=0;
long b=0;
long c=0;
long res = numeric_limits<long>::max();
cin >> a >> b >> c;
bool has_one_even = a%2 == 0 || b % 2 == 0 || c % 2 == 0;
if(has_one_even)
{
res = 0;
}else
{
res = min (a * b, a * b , b * c);
}
cout << res << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:13:20: error: 'numeric_limits' was not declared in this scope
13 | long res = numeric_limits<long>::max();
| ^~~~~~~~~~~~~~
a.cc:13:35: error: expected primary-expression before 'long'
13 | long res = numeric_limits<long>::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: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 int; _Compare = long int]':
a.cc:21:14: required from here
21 | res = min (a * b, a * b , 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))
| ~~~~~~^~~~~~~~~~
|
s874261763
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namespace std;
char a[503][503],b[503][503];
int main(){
init();
int h,w;
scanf("%d%d",&h,&w);
for(int i=1;i<=h;i++)
scanf("%s",a[i]+1),strcpy(b[i]+1,a[i]+1);
for(int i=1;i<=h;i++)
a[i][1]='#',b[i][w]='#';
for(int i=1;i<=w;i++)
a[h][i]='#',b[1][i]='#';
a[1][1]='.',b[h][w]='.';
for(int i=2;i<h;i+=2)
for(int j=2;j<w;j++)
a[i][j]='#';
for(int i=3;i<h;i+=2)
for(int j=2;j<w;j++)
b[i][j]='#';
for(int i=1;i<=h;i++)
puts(a[i]+1);
puts("");
for(int i=1;i<=h;i++)
puts(b[i]+1);
}
|
a.cc: In function 'int main()':
a.cc:5:9: error: 'init' was not declared in this scope; did you mean 'int'?
5 | init();
| ^~~~
| int
|
s411188521
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, n) for(int i = 0; i < (n); i++)
#define FORR(x, arr) for(auto& x:arr)
#define ITR(x, c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#define MEM(a, x) memset(a, x, sizeof(a))
#define ALL(a) a.begin(), a.end()
#define UNIQUE(a) a.erase(unique(ALL(a)), a.end())
typedef long long ll;
typedef pair<int, int> P;
ll a[5];
int main(int argc, char const *argv[]) {
ios_base::sync_with_stdio(false);
FOR(i, 3) cin >> a[i];
ll mi = 1LL<<60;
FOR(i, 3) {
ll x = 1;
FOR(j, 3) {
if (i != j) ll x *= a[j];
}
if (a[i] & 1) mi = min(mi, x);
else mi = 0;
}
cout << mi << endl;
return 0;
}
|
a.cc: In function 'int main(int, const char**)':
a.cc:21:42: error: expected initializer before '*=' token
21 | if (i != j) ll x *= a[j];
| ^~
|
s774179885
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, n) for(int i = 0; i < (n); i++)
#define FORR(x, arr) for(auto& x:arr)
#define ITR(x, c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#define MEM(a, x) memset(a, x, sizeof(a))
#define ALL(a) a.begin(), a.end()
#define UNIQUE(a) a.erase(unique(ALL(a)), a.end())
typedef long long ll;
typedef pair<int, int> P;
ll a[5];
int main(int argc, char const *argv[]) {
ios_base::sync_with_stdio(false);
FOR(i, 3) cin >> a[i];
ll mi = 1<<60;
FOR(i, 3) {
ll x = 1;
FOR(j, 3) {
if (i != j) ll x *= a[j];
}
if (a[i] & 1) mi = min(mi, x);
else mi = 0;
}
cout << mi << endl;
return 0;
}
|
a.cc: In function 'int main(int, const char**)':
a.cc:17:18: warning: left shift count >= width of type [-Wshift-count-overflow]
17 | ll mi = 1<<60;
| ~^~~~
a.cc:21:42: error: expected initializer before '*=' token
21 | if (i != j) ll x *= a[j];
| ^~
|
s813478870
|
p04005
|
C++
|
// ConsoleApplication1.cpp : コンソール アプリケーションのエントリ ポイントを定義します。
//
#include <iostream>
#include <memory>
using namespace std;
void main()
{
int x, y, z;
cin >> x;
cin >> y;
cin >> z;
if(x >= y && x >= z)
{
if (x % 2 == 0)
{
cout << 0;
return;
}
cout << y * z;
}else if( y >= x && y >= z)
{
if (y % 2 == 0)
{
cout << 0;
return;
}
cout << x * z;
}else
{
if (z % 2 == 0)
{
cout << 0;
return;
}
cout << x * y;
}
}
/*
int main()
{
bool n = false, s = false, w = false, e = false;
while(int c = std::cin.get())
{
if (c == EOF)break;
switch (c)
{
case 'N':
n = true;
break;
case 'S':
s = true;
break;
case 'W':
w = true;
break;
case 'E':
e = true;
break;
}
}
if (n && s && !e && !w || n && s && e && w || !n && !s && e & w || !n && !s && !w && !e)
{
std::cout << "Yes";
}
else
{
std::cout << "No";
}
return 0;
}
*/
|
a.cc:8:1: error: '::main' must return 'int'
8 | void main()
| ^~~~
a.cc: In function 'int main()':
a.cc:20:25: error: return-statement with no value, in function returning 'int' [-fpermissive]
20 | return;
| ^~~~~~
a.cc:28:25: error: return-statement with no value, in function returning 'int' [-fpermissive]
28 | return;
| ^~~~~~
a.cc:36:25: error: return-statement with no value, in function returning 'int' [-fpermissive]
36 | return;
| ^~~~~~
|
s090933716
|
p04005
|
C++
|
#include <bits/stdc++.h>
#define ll long long
#define INF 1000000005
#define MOD 1000000007
#define EPS 1e-10
#define rep(i,n) for(int i=0;i<(int)(n);++i)
#define rrep(i,n) for(int i=(int)(n)-1;i>=0;--i)
#define srep(i,s,t) for(int i=(int)(s);i<(int)(t);++i)
#define each(a,b) for(auto (a): (b))
#define all(v) (v).begin(),(v).end()
#define len(v) (int)(v).size()
#define zip(v) sort(all(v)),v.erase(unique(all(v)),v.end())
#define fi first
#define se second
#define pb push_back
#define show(x) cout<<#x<<" = "<<(x)<<endl
#define spair(p) cout<<#p<<": "<<p.fi<<" "<<p.se<<endl
#define svec(v) cout<<#v<<":";rep(kbrni,v.size())cout<<" "<<v[kbrni];cout<<endl
#define sset(s) cout<<#s<<":";each(kbrni,s)cout<<" "<<kbrni;cout<<endl
#define smap(m) cout<<#m<<":";each(kbrni,m)cout<<" {"<<kbrni.first<<":"<<kbrni.second<<"}";cout<<endl
using namespace std;
typedef pair<int,int> P;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<double> vd;
typedef vector<P> vp;
const int MAX_N = 100005;
int main()
{
cin.tie(0);
ios::sync_with_stdio(false);
ll a,b,c;
cin >> a >> b >> c;
if(a % 2 == 0) || b % 2 == 0 || c % 2 == 0){
cout << "0\n";
}else{
cout << min(a*b,b*c,a*c) << endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:39:20: error: expected primary-expression before '||' token
39 | if(a % 2 == 0) || b % 2 == 0 || c % 2 == 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 = long long int; _Compare = long long int]':
a.cc:42:20: required from here
42 | cout << min(a*b,b*c,a*c) << endl;
| ~~~^~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function
284 | if (__comp(__b, __a))
| ~~~~~~^~~~~~~~~~
|
s917720681
|
p04005
|
C++
|
#include<iostream>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
int ans=min(b*c,min(a*c,a*b);
if(a%2==0||b%2==0||c%2==0)
cout<<ans<<endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:7:31: error: expected ')' before ';' token
7 | int ans=min(b*c,min(a*c,a*b);
| ~ ^
| )
|
s703495681
|
p04005
|
C++
|
import Control.Applicative
import Data.List
import System.IO
main = do
[a,b,c] <- sort <$> map read <$> words <$> getLine :: IO [Int]
putStrLn $ show $ a * b * abs (c `mod` 2)
|
a.cc:7:38: error: stray '`' in program
7 | putStrLn $ show $ a * b * abs (c `mod` 2)
| ^
a.cc:7:42: error: stray '`' in program
7 | putStrLn $ show $ a * b * abs (c `mod` 2)
| ^
a.cc:1:1: error: 'import' does not name a type
1 | import Control.Applicative
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
|
s657033063
|
p04005
|
Java
|
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt(),b = scanner.nextInt(),c = scanner.nextInt();
if(a % 2 == 0 || b % 2 == 0 || c % 2 == 0){
System.out.println("0");
}else{
long ans = 0;
ans = Math.min(a*c,a*c);
ans = Math.min(ans, b*c);
System.out.println(ans);
}
}
}
|
Main.java:4: error: cannot find symbol
Scanner scanner = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:4: error: cannot find symbol
Scanner scanner = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s210162337
|
p04005
|
C++
|
#include<cstring>
#include<cstdlib>
#include<cstdio>
#include<cmath>
#include<iostream>
#define N 101
using namespace std;
int n,m,f[N][N][N][N],sx,sy,h[N][N],l[N][N];
char s[N][N];
int main()
{
cin<<n<<m;
for(int i=1;i<=n;i++)
{
scanf("%s",s[i]+1);
for(int j=1;j<=m;j++) if(s[i][j]=='E') sx=i,sy=j;
}
for(int i=1;i<=n;i++)
for(int j=1;j<=m;j++)
{
l[i][j]=l[i-1][j];
h[i][j]=h[i][j-1];
if(s[i][j]=='o') h[i][j]++,l[i][j]++;
}
int ln=m-sy,rn=sy-1,un=n-sx,dn=sx-1;
for(int i=0;i<=ln;i++)
for(int j=0;j<=rn;j++)
for(int x=0;x<=un;x++)
for(int y=0;y<=dn;y++)
{
int t;
if(i<ln)
{
}
if(j<rn)
{
}
if(x<un)
{
}
if(y<dn)
{
}
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:12:12: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
12 | cin<<n<<m;
| ~~~^~~
| | |
| | int
| std::istream {aka std::basic_istream<char>}
a.cc:12:12: note: candidate: 'operator<<(int, int)' (built-in)
12 | cin<<n<<m;
| ~~~^~~
a.cc:12:12: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'int'
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54,
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:5:
/usr/include/c++/14/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)'
763 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed:
a.cc:12:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
12 | cin<<n<<m;
| ^
/usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
4077 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed:
a.cc:12:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
12 | cin<<n<<m;
| ^
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)'
125 | operator<<(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed:
a.cc:12:9: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte'
12 | cin<<n<<m;
| ^~~
In file included from /usr/include/c++/14/bits/ios_base.h:46:
/usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)'
339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e)
| ^~~~~~~~
/usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed:
a.cc:12:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
12 | cin<<n<<m;
| ^
/usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)'
563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed:
a.cc:12:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
12 | cin<<n<<m;
| ^
/usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)'
573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed:
a.cc:12:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
12 | cin<<n<<m;
| ^
/usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)'
579 | operator<<(basic_ostream<char, _Traits>& __out, char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed:
a.cc:12:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
12 | cin<<n<<m;
| ^
/usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)'
590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed:
a.cc:12:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
12 | cin<<n<<m;
| ^
/usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)'
595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed:
a.cc:12:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
12 | cin<<n<<m;
| ^
/usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)'
654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed:
a.cc:12:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
12 | cin<<n<<m;
| ^
In file included from /usr/include/c++/14/ostream:1022:
/usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)'
307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
| ^~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed:
a.cc:12:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
12 | cin<<n<<m;
| ^
/usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)'
671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:671:5: note: template argument deduction/substitution failed:
a.cc:12:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
12 | cin<<n<<m;
| ^
/usr/include/c++/14/ostream:684:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const signed char*)'
684 | operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:684:5: note: template argument deduction/substitution failed:
a.cc:12:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
12 | cin<<n<<m;
| ^
/usr/include/c++/14/ostream:689:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const unsigned char*)'
689 | operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:689:5: note: template argument deduction/substitution failed:
a.cc:12:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
12 | cin<<n<<m;
| ^
/usr/include/c++/14/ostream:810:5: note: candidate: 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&)'
810 | operator<<(_Ostream&& __os, const _Tp& __x)
| ^~~~~~~~
/usr/include/c++/14/ostream:810:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/ostream: In substitution of 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&) [with _Ostream = std::basic_istream<char>&; _Tp = int]':
a.cc:12:7: required from here
12 | cin<<n<<m;
| ^
/usr/include/c++/14/ostream:810:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
810 | operator<<(_Ostream&& __os, const _Tp& __x)
| ^~~~~~~~
|
s594619786
|
p04005
|
C++
|
#include<cstdio>
#include <iostream>
#include<algorithm>
#include<string>
#include<cstring>
#include<queue>
#include<vector>
#include<functional>
#include<cmath>
#include<map>
#include<stack>
#include<cstdlib>
#include<list>
#include<set>
#include<numeric>
#define MOD 1000000007
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
ll A, B, C;
int main()
{
cin >> A >> B >> C;
if (A % 2 == 0 || B % 2 == 0 || C % 2 == 0) {
cout << 0 << endl;
}
else {
cout << min(B*C,A*B,A*C)<< 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: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:33:14: required from here
33 | cout << min(B*C,A*B,A*C)<< endl;
| ~~~^~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function
284 | if (__comp(__b, __a))
| ~~~~~~^~~~~~~~~~
|
s062690452
|
p04005
|
C++
|
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<string>
#define int long long
using namespace std;
signed main() {
int a, b, c;
cin >> a >> b >> c;
int MAX = LLONG_MAX / 3;
if ((a & 1) == 0 || (b & 1) == 0)MAX = 0;
else {
MAX = min(MAX, min(a, b)*c);
}
if ((b & 1) == 0 || (c & 1) == 0)MAX = 0;
else {
MAX = min(MAX, min(b, c)*a);
}
if ((a & 1) == 0 || (c & 1) == 0)MAX = 0;
else {
MAX = min(MAX, min(a, c)*b);
}
cout << MAX << endl;
}
|
a.cc: In function 'int main()':
a.cc:11:19: error: 'LLONG_MAX' was not declared in this scope
11 | int MAX = LLONG_MAX / 3;
| ^~~~~~~~~
a.cc:4:1: note: 'LLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
3 | #include<algorithm>
+++ |+#include <climits>
4 | #include<string>
|
s347760875
|
p04005
|
C++
|
use std::cmp;
fn main(){
let mut sc = Scanner::new();
while let Ok(a) = sc.wrapped::<i64>() {
let b:i64 = sc.next();
let c:i64 = sc.next();
let mut res = 1000000000i64 * 1000000000;
res = cmp::min(res, c%2 * (a*b));
res = cmp::min(res, a%2 * (b*c));
res = cmp::min(res, b%2 * (c*a));
println!("{}", res);
}
}
// Scanner
#[allow(dead_code)]
struct Scanner {
token_buffer : Vec<String>,
index : usize,
}
#[allow(dead_code)]
impl Scanner {
fn new() -> Scanner{
Scanner { token_buffer: vec![], index: 0 }
}
fn wrapped<T>(& mut self) -> Result<T,&str> where T: std::str::FromStr {
let s = try!(self.fetch_token());
let t = try!(s.parse::<T>().map_err(|_| "Parse error"));
Ok(t)
}
fn next<T>(& mut self) -> T where T: std::str::FromStr {
self.wrapped::<T>().unwrap()
}
fn fetch_token(&mut self) -> Result<&String,&str> {
while self.index >= self.token_buffer.len() {
let mut st = String::new();
while st.trim() == "" {
match std::io::stdin().read_line(&mut st) {
Ok(l) if l > 0 => continue,
Ok(_) => return Err("End of file"),
Err(_) => return Err("Failed to read line"),
}
}
self.token_buffer = st.split_whitespace()
.map(|x| x.to_string())
.collect();
self.index = 0;
}
self.index += 1;
Ok(&self.token_buffer[self.index - 1])
}
}
|
a.cc:18:2: error: invalid preprocessing directive #[
18 | #[allow(dead_code)]
| ^
a.cc:24:2: error: invalid preprocessing directive #[
24 | #[allow(dead_code)]
| ^
a.cc:1:1: error: 'use' does not name a type
1 | use std::cmp;
| ^~~
a.cc:3:1: error: 'fn' does not name a type
3 | fn main(){
| ^~
a.cc:20:5: error: 'token_buffer' does not name a type
20 | token_buffer : Vec<String>,
| ^~~~~~~~~~~~
a.cc:25:6: error: expected initializer before 'Scanner'
25 | impl Scanner {
| ^~~~~~~
|
s012174161
|
p04005
|
C
|
#include<stdio.h>
int main()
{
int a, b, c;
scanf("%d%d%d", &a, &b, &c);
if(a* b* c% 2)
{
if(a>= b)
{
if(a>= c)
printf("%d\n", b* c);
else// a< c
printf("%d\n", a* b);
}
else// a< b
{
if(b>= c)
printf("%d\n", a* c);
else b< c
printf("%d\n", a* b);
}
}
else
printf("0\n");
return 0;
}
|
main.c: In function 'main':
main.c:22:34: error: expected ';' before 'printf'
22 | else b< c
| ^
| ;
23 | printf("%d\n", a* b);
| ~~~~~~
|
s105339015
|
p04005
|
C++
|
#include<cstdio>
#include<cstring>
using namespace std;
int n,m;
char a[505][505];
char b[505][505];
char s[505][505];
int main()
{
//freopen("input","r",stdin); freopen("output","w",stdout);
scanf("%d %d\n",&n,&m);
for(int i=1;i<=n;i++)
gets(s[i]+1);
for(int i=1;i<=n;i++)
for(int j=2;j<=m-1;j++)
{
a[i][j]=s[i][j];
b[i][j]=s[i][j];
if(i%2==0)a[i][j]='#';
else b[i][j]='#';
}
for(int i=1;i<=n;i++)
{
a[i][1]='#';
a[i][m]='.';
b[i][1]='.';
b[i][m]='#';
}
for(int i=1;i<=n;i++)
printf("%s\n",a[i]+1);
printf("\n");
for(int i=1;i<=n;i++)
printf("%s\n",b[i]+1);
}
|
a.cc: In function 'int main()':
a.cc:13:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
13 | gets(s[i]+1);
| ^~~~
| getw
|
s146373511
|
p04005
|
C++
|
#include <iostream>
#include <set>
using namespace std;
int min(a, b){
if(a > b){
return b;
}else{
return a;
}
}
int main(){
int a, b, c;
cin >> a >> b >> c ;
if(a%2 == 0 || b%2 == 0 || c%2 == 0){
cout << 0 << endl;
return 0;
}
int ans = min(a*b, min(b*c, c*a))
cout << ans << endl;
}
|
a.cc:5:9: error: 'a' was not declared in this scope
5 | int min(a, b){
| ^
a.cc:5:12: error: 'b' was not declared in this scope
5 | int min(a, b){
| ^
a.cc:5:13: error: expression list treated as compound expression in initializer [-fpermissive]
5 | int min(a, b){
| ^
a.cc: In function 'int main()':
a.cc:22:19: error: reference to 'min' is ambiguous
22 | int ans = min(a*b, min(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:281:5: note: candidates are: '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:233:5: note: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
233 | min(const _Tp& __a, const _Tp& __b)
| ^~~
a.cc:5:5: note: 'int min'
5 | int min(a, b){
| ^~~
a.cc:22:28: error: reference to 'min' is ambiguous
22 | int ans = min(a*b, min(b*c, c*a))
| ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidates are: '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:233:5: note: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
233 | min(const _Tp& __a, const _Tp& __b)
| ^~~
a.cc:5:5: note: 'int min'
5 | int min(a, b){
| ^~~
|
s235141723
|
p04005
|
C
|
#include<stdio.h>
int main(void){
int num1,num2,num3,num4,num5,num6,num7;
scanf("%d",&num1);
scanf("%d",&num2);
scanf("%d",&num3);
num4=num1*num2*num3;
num5=num1*num2;
num6=num2*num3;
num7=num1*num3;
if(num4%2=0)
{
printf("0\n");
}
else if(num5>=num6&&num5>=num7)
{
printf("%d",num5);
}
else if(num6>=num5&&num6>=num7)
{
printf("%d",num6);
}
else if(num7>=num6&&num7>=num5)
{
printf("%d",num7);
}
return 0;
}
|
main.c: In function 'main':
main.c:11:12: error: lvalue required as left operand of assignment
11 | if(num4%2=0)
| ^
|
s911948400
|
p04005
|
C
|
#include<stdio.h>
int main(void){
int num1,num2,num3,num4,num5,num6,num7;
scanf("%d",&num1);
scanf("%d",&num2);
scanf("%d",&num3);
num4=num1*num2*num3;
num5=num1*num2;
num6=num2*num3;
num7=num1*num3;
if(num4%2=0)
{
printf("0\n");
}
else if(num5>=num6&&num5>=num7)
{
printf("%d",num5);
}
else if(num6>=num5&&num6>=num7)
{
printf("%d",num6);
}
else if(num7>=num6&&num7>=num5)
{
printf("%d",num7);
}
return 0;
}
|
main.c: In function 'main':
main.c:11:12: error: lvalue required as left operand of assignment
11 | if(num4%2=0)
| ^
|
s169716581
|
p04005
|
C
|
#include<stdio.h>
int main(void){
int num1,num2,num3,num4,num5,num6,num7;
scanf("%d",&num1);
scanf("%d",&num2);
scanf("%d",&num3);
num4=num1*num2*num3;
num5=num1*num2;
num6=num2*num3;
num7=num1*num3;
if(num4%2=0)
{
printf("0\n");
}
else if(num5>=num6&&num5>=num7)
{
printf("%d",num5);
}
else if(num6>=num5&&num6>=num7)
{
printf("%d",num6);
}
else if(num7>=num6&&num7>=num5)
{
printf("%d",num7);
}
return 0;
}
|
main.c: In function 'main':
main.c:11:12: error: lvalue required as left operand of assignment
11 | if(num4%2=0)
| ^
|
s672462855
|
p04005
|
C
|
#include<stdio.h>
int main(void){
int num1,num2,num3,num4,num5,num6,num7;
scanf("%d",&num1);
scanf("%d",&num2);
scanf("%d",&num3);
num4=num1*num2*num3;
num5=num1*num2;
num6=num2*num3;
num7=num1*num3;
if(num4%2=0)
{
printf("0\n");
}
else if(num5>=num6&&num5>=num7)
{
printf("%d",num5);
}
else if(num6>=num5&&num6>=num7)
{
printf("%d",num6);
}
else if(num7>=num6&&num7>=num5)
{
printf("%d",num7);
}
return 0;
}
|
main.c: In function 'main':
main.c:11:12: error: lvalue required as left operand of assignment
11 | if(num4%2=0)
| ^
|
s014887718
|
p04005
|
C
|
#include<stdio.h>
int main(void){
int num1,num2,num3,num4num5,num6,num7;
scanf("%d",&num1);
scanf("%d",&num2);
scanf("%d",&num3);
num4=num1*num2*num3;
num5=num1*num2;
num6=num2*num3;
num7=num1*num3;
if(num4%2=0)
{
printf("0\n");
}
else if(num5>=num6&&num5>=num7)
{
printf("%d",num5);
}
else if(num6>=num5&&num6>=num7)
{
printf("%d",num6);
}
else if(num7>=num6&&num7>=num5)
{
printf("%d",num7);
}
return 0;
}
|
main.c: In function 'main':
main.c:7:3: error: 'num4' undeclared (first use in this function); did you mean 'num7'?
7 | num4=num1*num2*num3;
| ^~~~
| num7
main.c:7:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:3: error: 'num5' undeclared (first use in this function); did you mean 'num7'?
8 | num5=num1*num2;
| ^~~~
| num7
|
s339489399
|
p04005
|
C++
|
cube = list(map(int,input().split()))
if len([x for x in cube if x % 2]) == 3:
print(int(cube[0] * cube[1] * cube[2] / min(cube)))
else:
print(0)
|
a.cc:1:1: error: 'cube' does not name a type
1 | cube = list(map(int,input().split()))
| ^~~~
|
s235208744
|
p04005
|
C++
|
#include<stdio.h>
int main(){
_int64 a, b, c;
int d, e, f;
scanf("%lld %lld %lld", &a, &b, &c);
d = a % 2;
e = b % 2;
f = c % 2;
if (d*e*f == 0)printf("%d", 0);
else{
if (a > b){
if (c > a)printf("%lld", a*b);
else printf("%lld", b*c);
}
else{
if (c > b)printf("%lld", a*b);
else printf("%lld", a*c);
}
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:3:9: error: '_int64' was not declared in this scope
3 | _int64 a, b, c;
| ^~~~~~
a.cc:5:34: error: 'a' was not declared in this scope
5 | scanf("%lld %lld %lld", &a, &b, &c);
| ^
a.cc:5:38: error: 'b' was not declared in this scope
5 | scanf("%lld %lld %lld", &a, &b, &c);
| ^
a.cc:5:42: error: 'c' was not declared in this scope
5 | scanf("%lld %lld %lld", &a, &b, &c);
| ^
|
s423349734
|
p04005
|
C++
|
#include<iostream>
using namespace std;
int main() {
long long A, B, C, m;
cin >> A >> B >> C;
if (A >= B && A >= C) {
if (A % 2 == 0) {
cout << 0 << endl;
}
else {
cout << B*C << endl;
}
}
else if (B >= A && B >= C) {
if (B % 2 == 0) {
cout << 0 << endl;
}
else {
cout << A*C << endl;
}
}
else if (C >= B && C >= A) {
if (C % 2 == 0) {
cout << 0 << endl;
}
else {
cout << A*C << endl;
}
} }
|
a.cc:29:10: error: extended character is not valid in an identifier
29 | } }
| ^
a.cc: In function 'int main()':
a.cc:29:10: error: '\U00003000' was not declared in this scope
29 | } }
| ^~
|
s398054909
|
p04005
|
C++
|
#include<iostream>
using namespace std;
int main() {
long long A, B, C, m;
cin >> A >> B >> C;
if (A >= B && A >= C) {
if (A % 2 == 0) {
cout << 0 << endl;
}
else {
cout << B*C << endl;
}
}
else if (B >= A && B >= C) {
if (B % 2 == 0) {
cout << 0 << endl;
}
else {
cout << A*C << endl;
}
}
else if (C >= B && C >= A) {
if (C % 2 == 0) {
cout << 0 << endl;
}
else {
cout << A*C << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:29:10: error: expected '}' at end of input
29 | }
| ^
a.cc:3:12: note: to match this '{'
3 | int main() {
| ^
|
s267057483
|
p04005
|
C++
|
#include<iostream>
using namespace std;
int main() {
long long A, B, C, m;
cin >> A >> B >> C;
if (A >= B && A >= C) {
if (A % 2 == 0) {
cout << 0 << endl;
}
else {
cout << B*C << endl;
}
}else if (B >= A && B >= C) {
if (B % 2 == 0) {
cout << 0 << endl;
}
else {
cout << A*C << endl;
}
}else if (C >= B && C >= A) {
if (C % 2 == 0) {
cout << 0 << endl;
}
else {
cout << A*C << endl;
}
|
a.cc: In function 'int main()':
a.cc:26:18: error: expected '}' at end of input
26 | }
| ^
a.cc:20:37: note: to match this '{'
20 | }else if (C >= B && C >= A) {
| ^
a.cc:26:18: error: expected '}' at end of input
26 | }
| ^
a.cc:3:12: note: to match this '{'
3 | int main() {
| ^
|
s884187512
|
p04005
|
C++
|
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
long long x, y, z;
int red, blue;
cin >> x >> y >> z;
long long minrect = min(x*y, y*z);
minrect = min(minrect, z*x);
long long maxside = max(x, y);
maxside = max(maxside, z);
long long blue = minrect * ((maxside / 2) + (maxside % 2));
long long red = minrect * (maxside / 2);
long long diff = blue - red;
cout << diff << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:15:15: error: conflicting declaration 'long long int blue'
15 | long long blue = minrect * ((maxside / 2) + (maxside % 2));
| ^~~~
a.cc:7:14: note: previous declaration as 'int blue'
7 | int red, blue;
| ^~~~
a.cc:16:15: error: conflicting declaration 'long long int red'
16 | long long red = minrect * (maxside / 2);
| ^~~
a.cc:7:9: note: previous declaration as 'int red'
7 | int red, blue;
| ^~~
|
s789219047
|
p04005
|
Java
|
import java.util.Scanner;
public class Main {
static final Scanner in = new Scanner(System.in);
private static int[] input(){
int a[] = new int[3];
for(int i=0; i<len; i++)
{
a[i] = in.nextInt();
}
return a;
}
private static int solve(int a[])
{
if (a[0]%2 == 0 || a[1]%2==0)
{
return 0;
} else {
return Math.min(a[0]*a[1], a[1]*a[2]);
}
}
public static void main(String[] args) {
System.out.println(solve(input()));
}
}
|
Main.java:9: error: cannot find symbol
for(int i=0; i<len; i++)
^
symbol: variable len
location: class Main
1 error
|
s460043095
|
p04005
|
C++
|
#include <iostream>
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:16: error: no matching function for call to 'min(<brace-enclosed initializer list>)'
7 | cout << min({a*b, b*c, c*a}) << endl;
| ~~~^~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
233 | min(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
281 | min(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate expects 3 arguments, 1 provided
|
s021413857
|
p04005
|
C++
|
test
|
a.cc:1:1: error: 'test' does not name a type
1 | test
| ^~~~
|
s691293405
|
p04005
|
C++
|
test
|
a.cc:1:1: error: 'test' does not name a type
1 | test
| ^~~~
|
s426949017
|
p04005
|
Java
|
#include <iostream>
#include <string>
using namespace std;
int main() {
double a, b, c;
cin >> a >> b >> c;
double result = 0;
long max = a;
if (max < b) {
max = b;
}
if (max < c) {
max = c;
}
if (max % 2 == 0) {
cout << 0;
}
else {
//cout << max << "\n";
result = (a*b*c / max);
cout << (int)result;
}
}
|
Main.java:1: error: illegal character: '#'
#include <iostream>
^
Main.java:2: error: illegal character: '#'
#include <string>
^
Main.java:7: error: not a statement
cin >> a >> b >> c;
^
Main.java:22: error: not a statement
cout << 0;
^
Main.java:27: error: not a statement
cout << (int)result;
^
Main.java:5: error: unnamed classes are a preview feature and are disabled by default.
int main() {
^
(use --enable-preview to enable unnamed classes)
6 errors
|
s022445772
|
p04005
|
C++
|
#include <iostream>
using namespace std;
void main() {
int a, b, c;
cin >> a >> b >> c;
int result = a*b*c;
int max = a;
if (max < b) {
max = b;
}
if (max < c) {
max = c;
}
result = result*(max % 2) / max;
cout << result;
}
|
a.cc:4:1: error: '::main' must return 'int'
4 | void main() {
| ^~~~
|
s277646777
|
p04005
|
C++
|
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
long long a, b, c;
cin >> a >> b >> c;
if (c%2 == 1) {
cout << min(a*b, b*c, a*c) << end;
} else {
cout << 0 << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:13:32: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} and '<unresolved overloaded function type>')
13 | cout << min(a*b, b*c, a*c) << end;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
In file included from /usr/include/c++/14/iostream:41,
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 = std::nullptr_t]'
306 | operator<<(nullptr_t)
| ^~~~~~~~
/usr/include/c++/14/ostream:306:18: note: no known conversion for argument 1 from '<unresolved overloaded functi
|
s548619659
|
p04005
|
C
|
#include <stdio.h>
int min(int a, int b, int c){
int max, mid, min;
if(a <= b){
if(b <= c){
max = c;
mid = b;
min = a;
}else{
max = b;
if(c >= a){
mid = c;
min = a;
}else{
mid = a;
min = c;
}
}
}else{
if(b >= c){
max = a;
mid = b;
min = c;
}else{
min = b;
if(a >= c){
max = a;
mid = c;
}else{
max = c;
mid = a;
}
}
}
return min * mid;
}
int calDiff(int a, int b, int c){
if(a % 2 == 1 && b % 2 == 1 && c % 2 == 1){
return diff = min(a, b, c);
}else{
return 0;
}
}
int main(void){
int a, b, c;
int d;
scanf("%d %d %d", &a, &b, &c);
d = calDiff(a, b, c);
printf("%d", d);
putchar('\n');
return 0;
}
|
main.c: In function 'calDiff':
main.c:41:24: error: 'diff' undeclared (first use in this function)
41 | return diff = min(a, b, c);
| ^~~~
main.c:41:24: note: each undeclared identifier is reported only once for each function it appears in
|
s364660431
|
p04005
|
C
|
#include <stdio.h>
int calDiff(int a, int b, int c){
if(a % 2 == 1 && b % 2 == 1 && c % 2 == 1){
return diff = min(a, b, c);
}else{
return 0;
}
}
int min(int a, int b, int c){
int max, mid, min;
if(a <= b){
if(b <= c){
max = c;
mid = b;
min = a;
}else{
max = b;
if(c >= a){
mid = c;
min = a;
}else{
mid = a;
min = c;
}
}
}else{
if(b >= c){
max = a;
mid = b;
min = c;
}else{
min = b;
if(a >= c){
max = a;
mid = c;
}else{
max = c;
mid = a;
}
}
}
return min * mid;
}
int cal_vol(int max, int mid, int min){
int d;
if(max % 2 == 0){
d = 0;
}else{
d = min * mid * 1;
}
return d;
}
int main(void){
int a, b, c;
int d;
scanf("%d %d %d", &a, &b, &c);
d = calDiff(a, b, c);
printf("%d", d);
putchar('\n');
return 0;
}
|
main.c: In function 'calDiff':
main.c:5:24: error: 'diff' undeclared (first use in this function)
5 | return diff = min(a, b, c);
| ^~~~
main.c:5:24: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:31: error: implicit declaration of function 'min' [-Wimplicit-function-declaration]
5 | return diff = min(a, b, c);
| ^~~
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.