submission_id
stringlengths 10
10
| problem_id
stringlengths 6
6
| language
stringclasses 3
values | code
stringlengths 1
522k
| compiler_output
stringlengths 43
10.2k
|
|---|---|---|---|---|
s622683176
|
p04004
|
C++
|
import java.util.Scanner;
public class Main {
static Scanner sc = new Scanner(System.in);
static long MOD = 1_000_000_007;
static long[] pow3 = new long[1_000_000];
static long[] fact = new long[1_000_000];
static long[] finv = new long[1_000_000];
static int N, M, K;
public static void main(String[] args) {
N = sc.nextInt();
M = sc.nextInt();
K = sc.nextInt();
if (N > 1000 || M > 1000 || K > 1000) return;
pow3[0] = 1;
fact[0] = 1;
finv[0] = inv(1);
for (int i = 1; i < pow3.length; ++i) {
pow3[i] = pow3[i - 1] * 3 % MOD;
fact[i] = fact[i - 1] * i % MOD;
finv[i] = inv(fact[i]);
}
long ans = 0;
for (int i = 0; i <= M; ++i) {
for (int j = 0; j <= K; ++j) {
ans += solve(i, j);
ans %= MOD;
}
}
System.out.println(ans);
}
static long solve(int b, int c) {
long ret = pow3[M - b] * pow3[K - c] % MOD;
ret *= fact[N - 1 + b + c];
ret %= MOD;
ret *= finv[N - 1];
ret %= MOD;
ret *= finv[b];
ret %= MOD;
ret *= finv[c];
ret %= MOD;
return ret;
}
static long inv(long v) {
return pow(v, MOD - 2);
}
static long pow(long v, long p) {
if (p == 0) return 1;
if (p == 1) return v;
long ret = pow(v, p / 2);
ret *= ret;
ret %= MOD;
if (p % 2 == 1) {
ret *= v;
ret %= MOD;
}
return ret;
}
}
|
a.cc:1:1: error: 'import' does not name a type
1 | import java.util.Scanner;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class Main {
| ^~~~~~
|
s979525018
|
p04004
|
C++
|
#include <bits/stdc++.h>
using namespace std;
#define PB push_back
#define MP make_pair
#define LL long long
#define int LL
#define FOR(i,a,b) for(int i = (a); i <= (b); i++)
#define RE(i,n) FOR(i,1,n)
#define REP(i,n) FOR(i,0,(int)(n)-1)
#define R(i,n) REP(i,n)
#define VI vector<int>
#define PII pair<int,int>
#define LD long double
#define FI first
#define SE second
#define st FI
#define nd SE
#define ALL(x) (x).begin(), (x).end()
#define SZ(x) ((int)(x).size())
template<class C> void mini(C& _a4, C _b4) { _a4 = min(_a4, _b4); }
template<class C> void maxi(C& _a4, C _b4) { _a4 = max(_a4, _b4); }
template<class TH> void _dbg(const char *sdbg, TH h){ cerr<<sdbg<<'='<<h<<endl; }
template<class TH, class... TA> void _dbg(const char *sdbg, TH h, TA... a) {
while(*sdbg!=',')cerr<<*sdbg++;cerr<<'='<<h<<','; _dbg(sdbg+1, a...);
}
template<class T> ostream& operator<<(ostream& os, vector<T> V) {
os << "["; for (auto& vv : V) os << vv << ","; os << "]";
return os;
}
#ifdef LOCAL
#define debug(...) _dbg(#__VA_ARGS__, __VA_ARGS__)
#else
#define debug(...) (__VA_ARGS__)
#define cerr if(0)cout
#endif
const LD kPi = 2 * acos(0);
struct CD {
LD re, im;
CD operator=(LD a) { re = a; im = 0; return *this; }
CD operator*(CD& z) { return {re * z.re - im * z.im, re * z.im + im * z.re}; }
void operator*=(CD& z) { *this = (*this * z); }
CD operator+(CD& z) { return {re + z.re, im + z.im}; }
CD operator-(CD& z) { return {re - z.re, im - z.im}; }
void operator/=(LD f) { re /= f; im /= f; }
};
struct FFT {
private:
CD *A, *B, *tmp, *res, *omega;
int *rev_perm;
int max_dep;
// not needed if this is going to be used just once
void Clear(int n) {
REP (i, n) { A[i] = B[i] = res[i] = tmp[i] = 0; }
}
void fft(CD* from, CD* to, int depth, bool inv){
int N = (1 << depth);
REP (i, N) { to[rev_perm[i] >> (max_dep - depth)] = from[i]; }
RE (m, depth) {
int step = (1 << m);
for (int pos = 0; pos < N; pos += step){
int cur = 0;
int delta = (1 << (max_dep - m));
if (!inv) { cur = (1 << max_dep); delta *= -1; }
REP (k, step / 2) {
CD a = to[pos + k],
b = omega[cur] * to[pos + k + step / 2];
to[pos + k] = a + b;
to[pos + k + step / 2] = a - b;
cur += delta;
}
}
}
if (inv) { REP (i, N) { to[i] /= N; } }
}
public:
FFT(int max_deg) { // max degree of a polynomial given as input
max_dep = 0;
while ((1 << max_dep) <= 2 * max_deg) { max_dep++; }
max_deg = (1 << max_dep) + 20;
A = new CD[max_deg]; B = new CD[max_deg];
res = new CD[max_deg]; tmp = new CD[max_deg];
omega = new CD[max_deg]; rev_perm = new int[max_deg];
int N = (1 << max_dep);
LD ang = 2 * kPi / N;
REP (i, N + 1) { omega[i] = {cos(i * ang), sin(i * ang)}; }
rev_perm[0] = 0;
int h = -1;
RE (i, N) {
if ((i & (i - 1)) == 0) { h++; }
rev_perm[i] = rev_perm[i ^ (1 << h)] | (1 << (max_dep - h - 1));
}
}
VI mul_less_exact(VI Q, VI R, int P) {
int depth = 0, size = 1;
int N = SZ(Q) + SZ(R) - 1;
while (size < N) { depth++; size *= 2; }
Clear(size);
// start miejsca, w ktorym jak mozna mniejsza dokladnosc, to zmien na komentarze
// P,Q \in R[x], A = Q * (1+i)/2 + R * (1-i)/2 -> Re(A^2) = P*Q
REP (i, SZ(Q)) {
//A[i] = CD{.5 * Q[i], .5 * Q[i]};
A[i] = Q[i];
}
REP (i, SZ(R)) {
//A[i] = A[i] + CD{.5 * R[i], -.5 * R[i]};
B[i] = R[i];
}
//fft(A, tmp, depth, false);
//REP (i, size) tmp[i] *= tmp[i];
fft(A, res, depth, false);
fft(B, tmp, depth, false);
REP (i, size) tmp[i] *= res[i];
// koniec
fft(tmp, res, depth, true);
VI ans;
REP (i, N) { ans.PB((long long)round(res[i].re) % P); }
return ans;
}
VI Prepare(VI& v, int base, int b_pow) {
VI ans;
for (int x : v) { ans.PB(b_pow ? x / base : x % base); }
return ans;
}
int Sum(VI& v, int P) { // debug/assert purposes only
return accumulate(ALL(v), 0LL) % P;
}
VI mul_exact(VI Q, VI R, int P) {
int base = 32000;
int pows[] = {1, base, (int)1LL * base * base % P};
VI ans(SZ(Q) + SZ(R) - 1);
REP (q, 2) {
VI W = Prepare(Q, base, q);
REP (r, 2) {
VI V = Prepare(R, base, r);
// jezeli bedzie za wolno, to można policzyc tylko 4 transformaty w przod
// bo teraz dla kazdej z 4 czesci jest liczona podwojnie (przyspieszenie * 2/3)
VI C = mul_less_exact(W, V, P);
REP (i, SZ(C)) { ans[i] = (ans[i] + 1LL * C[i] * pows[q + r]) % P; }
}
}
debug(Sum(ans, P), 1LL * Sum(Q, P) * Sum(R, P) % P); // DEBUG!!
assert(Sum(ans, P) == 1LL * Sum(Q, P) * Sum(R, P) % P); // DEBUG!!
return ans;
}
};
int P = 1e9 + 7;
int pot(int a,int w){
int r = 1;
while(w){
if(w&1)
r = r * a % P;
w /= 2;
a = a * a % P;
}
return r;
}
int odw(int a){
return pot(a,P-2);
}
const int MAX = 4e5;
int sil[MAX];
int a,b,c;
FFT fft(int(1e5)+2);
int32_t main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout << fixed << setprecision(11);
cerr << fixed << setprecision(6);
sil[0] = 1;
for(int i = 1; i < MAX; i++)
sil[i] = sil[i-1] * i % P;
cin >> a >> b >> c;
vector<int> x,y;
R(i,b+1){
x.PB(odw(sil[b-i]));
}
R(i,c+1){
y.PB(odw(sil[c-i]));
}
debug(x,y);
vector<int> spl = fft.mul_exact(x,y,P);
debug(spl);
int res = 0;
int mn = odw(sil[a-1]);
R(i,SZ(spl)){
debug(sil[a-1+b+c-i], mn,spl[i]);
res += sil[a-1+b+c-i] * mn % P * spl[i] % P;
debug(res);
mn*=3;
mn%=P;
}
cout << res%P << endl;
}
|
a.cc:6:12: error: expected primary-expression before 'long'
6 | #define LL long long
| ^~~~
a.cc:7:13: note: in expansion of macro 'LL'
7 | #define int LL
| ^~
a.cc:175:9: note: in expansion of macro 'int'
175 | FFT fft(int(1e5)+2);
| ^~~
|
s232247181
|
p04004
|
C++
|
#include "bits/stdc++.h"
#include <gmp.h>
using namespace std;
#define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i))
#define rer(i,l,u) for(int (i)=(int)(l);(i)<=(int)(u);++(i))
#define reu(i,l,u) for(int (i)=(int)(l);(i)<(int)(u);++(i))
static const int INF = 0x3f3f3f3f; static const long long INFL = 0x3f3f3f3f3f3f3f3fLL;
typedef vector<int> vi; typedef pair<int, int> pii; typedef vector<pair<int, int> > vpii; typedef long long ll;
template<typename T, typename U> static void amin(T &x, U y) { if(y < x) x = y; }
template<typename T, typename U> static void amax(T &x, U y) { if(x < y) x = y; }
template<int MOD>
struct ModInt {
static const int Mod = MOD;
unsigned x;
ModInt() : x(0) {}
ModInt(signed sig) { int sigt = sig % MOD; if(sigt < 0) sigt += MOD; x = sigt; }
ModInt(unsigned unsig) { x = unsig % MOD; }
ModInt(signed long long sig) { int sigt = sig % MOD; if(sigt < 0) sigt += MOD; x = sigt; }
int get() const { return (int)x; }
ModInt &operator+=(ModInt that) { if((x += that.x) >= MOD) x -= MOD; return *this; }
ModInt &operator-=(ModInt that) { if((x += MOD - that.x) >= MOD) x -= MOD; return *this; }
ModInt &operator*=(ModInt that) { x = (unsigned long long)x * that.x % MOD; return *this; }
ModInt &operator/=(ModInt that) { return *this *= that.inverse(); }
ModInt operator+(ModInt that) const { return ModInt(*this) += that; }
ModInt operator-(ModInt that) const { return ModInt(*this) -= that; }
ModInt operator*(ModInt that) const { return ModInt(*this) *= that; }
ModInt operator/(ModInt that) const { return ModInt(*this) /= that; }
ModInt inverse() const {
signed a = x, b = MOD, u = 1, v = 0;
while(b) {
signed t = a / b;
a -= t * b; std::swap(a, b);
u -= t * v; std::swap(u, v);
}
if(u < 0) u += Mod;
ModInt res; res.x = (unsigned)u;
return res;
}
};
template<int MOD> ModInt<MOD> operator^(ModInt<MOD> a, unsigned long long k) {
ModInt<MOD> r = 1;
while(k) {
if(k & 1) r *= a;
a *= a;
k >>= 1;
}
return r;
}
typedef ModInt<1000000007> mint;
#if defined(_WIN32)
extern "C" {
void* __stdcall LoadLibraryA(const char *name);
void* __stdcall GetProcAddress(void *handle, const char *name);
}
struct DynamicLibrary {
DynamicLibrary(const char *name) { _handle = LoadLibraryA(name); }
void *get(const char *name) const { void *p = GetProcAddress(_handle, name); if(!p) std::cerr << "can't find: " << name << std::endl, std::abort(); return p; }
void *_handle;
} gmp("mpir.dll");
#else
extern "C" {
void* __libc_dlopen_mode(const char *x, int y);
void* __libc_dlsym(void *x, const char *y);
}
struct DynamicLibrary {
DynamicLibrary(const char *name) { _handle = __libc_dlopen_mode(name, 2); }
void *get(const char *name) const { void *p = __libc_dlsym(_handle, name); if(!p) std::cerr << "can't find: " << name << std::endl, std::abort(); return p; }
void *_handle;
} gmp("/usr/lib/i386-linux-gnu/libgmp.so.10");
#endif
#define EXPAND_MACRO_TO_STR_2(a) #a
#define EXPAND_MACRO_TO_STR(a) EXPAND_MACRO_TO_STR_2(a)
#define DECL_GMP(name) const auto my_##name = (decltype(::name)*)gmp.get(EXPAND_MACRO_TO_STR(name))
DECL_GMP(mpn_mul);
DECL_GMP(mpn_sqr);
inline int getBitSize(unsigned x) {
#ifndef __GNUC__
unsigned long res;
_BitScanReverse(&res, x);
return static_cast<int>(res) + 1;
#else
return 32 - __builtin_clz(x);
#endif
}
enum { WordBits = sizeof(mp_limb_t) * 8 };
typedef unsigned Num;
enum { NumBits = sizeof(Num) * 8 };
typedef int Size;
typedef const mint *SrcPoly;
typedef mint *DstPoly, SrcDstPoly;
typedef const mp_limb_t *SrcPtr;
typedef mp_limb_t *DstPtr, *SrcDstPtr;
void zeroPolynomial(DstPoly resp, Size resn) {
for(Size i = 0; i < resn; ++ i)
resp[i] = mint();
}
void addPolynomial(DstPoly resp, SrcPoly xp, SrcPoly yp, Size xyn) {
for(Size i = 0; i < xyn; ++ i)
resp[i] = xp[i] + yp[i];
}
void subtractPolynomial(DstPoly resp, SrcPoly xp, SrcPoly yp, Size xyn) {
for(Size i = 0; i < xyn; ++ i)
resp[i] = xp[i] - yp[i];
}
void multiplyConstantPolynomial(DstPoly resp, SrcPoly xp, Size xn, mint y) {
for(Size i = 0; i < xn; ++ i)
resp[i] = xp[i] * y;
}
void packToBits(DstPtr resp, int resn, SrcPoly xp, Size xn, int width, int stride) {
if(width > WordBits) {
std::cerr << "unimplemented" << std::endl;
std::abort();
}
for(Size i = 0; i < resn; ++ i)
resp[i] = 0;
Size pos = 0;
int sa = stride / WordBits, sb = stride % WordBits;
int offset = 0;
for(Size i = 0; i < xn; ++ i) {
assert(pos < resn);
mp_limb_t x = static_cast<mp_limb_t>(xp[i].get());
int right = offset + width;
resp[pos] |= x << offset;
if(right > WordBits) {
assert(pos + 1 < resn);
resp[pos + 1] |= x >> (WordBits - offset);
}
pos += sa;
if((offset += sb) >= WordBits)
offset -= WordBits, ++ pos;
}
}
void unpackFromBitsMod(DstPoly resp, Size resn, SrcPtr xp, Size xn, int stride) {
assert(stride > 0);
int K = (stride - 1) / NumBits + 1, rems = stride - (K - 1) * NumBits;
Num remmask = ((Num)2 << (rems - 1)) - 1;
const mint Base = mint(~0U) + 1;
std::unique_ptr<Num[]> buf(new Num[K]);
Num *nums = buf.get();
Size pos = 0, offset = 0;
for(Size i = 0; i < resn; ++ i) {
for(int k = 0; k < K; ++ k) {
int smallwidth = k < K - 1 ? NumBits : rems;
if(pos >= xn) {
nums[k] = 0;
offset += smallwidth;
continue;
}
Num num = static_cast<Num>(xp[pos] >> offset);
offset += smallwidth;
if(pos + 1 < xn && offset > WordBits)
num |= static_cast<Num>(xp[pos + 1] << (WordBits - (offset - smallwidth)));
nums[k] = num;
if(offset >= WordBits)
offset -= WordBits, ++ pos;
}
nums[K - 1] &= remmask;
mint cur = mint(nums[K - 1]);
for(int k = K - 2; k >= 0; -- k) {
cur *= Base;
cur += nums[k];
}
resp[i] = cur;
}
}
void multiplyPolynomial(DstPoly resp, Size resn, SrcPoly xp, Size xn, SrcPoly yp, Size yn) {
if(xn > resn) xn = resn;
if(yn > resn) yn = resn;
if(resn > xn + yn - 1) {
zeroPolynomial(resp + (xn + yn - 1), resn - (xn + yn - 1));
resn = xn + yn - 1;
}
if(xn < yn) std::swap(xp, yp), std::swap(xn, yn);
if(yn == 0) {
zeroPolynomial(resp, resn);
return;
}
if(yn == 1) {
multiplyConstantPolynomial(resp, xp, xn, yp[0]);
zeroPolynomial(resp + xn, resn - xn);
return;
}
int width = getBitSize(mint::Mod - 1);
int stride = width * 2 + getBitSize(yn - 1);
if(xp == yp && xn == yn) {
Size tmpxn = static_cast<Size>(((long long)xn * stride - 1) / WordBits + 1);
Size tmpzn = tmpxn + tmpxn;
std::unique_ptr<mp_limb_t[]> tmpbuf(new mp_limb_t[tmpxn + tmpzn]);
mp_limb_t *tmpx = tmpbuf.get(), *tmpz = tmpx + tmpxn;
packToBits(tmpx, tmpxn, xp, xn, width, stride);
my_mpn_sqr(tmpz, tmpx, tmpxn);
unpackFromBitsMod(resp, resn, tmpz, tmpzn, stride);
} else {
Size tmpxn = static_cast<Size>(((long long)xn * stride - 1) / WordBits + 1);
Size tmpyn = static_cast<Size>(((long long)yn * stride - 1) / WordBits + 1);
Size tmpzn = tmpxn + tmpyn;
std::unique_ptr<mp_limb_t[]> tmpbuf(new mp_limb_t[tmpxn + tmpyn + tmpzn]);
mp_limb_t *tmpx = tmpbuf.get(), *tmpy = tmpx + tmpxn, *tmpz = tmpy + tmpyn;
packToBits(tmpx, tmpxn, xp, xn, width, stride);
packToBits(tmpy, tmpyn, yp, yn, width, stride);
my_mpn_mul(tmpz, tmpx, tmpxn, tmpy, tmpyn);
unpackFromBitsMod(resp, resn, tmpz, tmpzn, stride);
}
}
vector<mint> fact, factinv;
void nCr_computeFactinv(int N) {
N = min(N, mint::Mod - 1);
fact.resize(N + 1); factinv.resize(N + 1);
fact[0] = 1;
rer(i, 1, N) fact[i] = fact[i - 1] * i;
factinv[N] = fact[N].inverse();
for(int i = N; i >= 1; i --) factinv[i - 1] = factinv[i] * i;
}
mint nCr(int n, int r) {
if(n >= mint::Mod)
return nCr(n % mint::Mod, r % mint::Mod) * nCr(n / mint::Mod, r / mint::Mod);
return r > n ? 0 : fact[n] * factinv[n - r] * factinv[r];
}
int main() {
int N; int M; int K;
while(~scanf("%d%d%d", &N, &M, &K)) {
nCr_computeFactinv(N + M + K);
vector<mint> p(M + 1), q(K + 1);
rep(i, M + 1) p[i] = factinv[i];
rep(i, K + 1) q[i] = factinv[i];
vector<mint> pq(M + K + 1);
multiplyPolynomial(pq.data(), pq.size(), p.data(), p.size(), q.data(), q.size());
mint ans;
rer(mk, 0, M + K) {
mint sum = pq[mk];
sum *= fact[N - 1 + mk];
sum *= factinv[N - 1];
ans = ans * 3 + sum;
}
printf("%d\n", ans.get());
}
return 0;
}
|
/usr/bin/ld: /tmp/cc1PXXUO.o: in function `DynamicLibrary::DynamicLibrary(char const*)':
a.cc:(.text._ZN14DynamicLibraryC2EPKc[_ZN14DynamicLibraryC5EPKc]+0x1d): undefined reference to `__libc_dlopen_mode'
/usr/bin/ld: /tmp/cc1PXXUO.o: in function `DynamicLibrary::get(char const*) const':
a.cc:(.text._ZNK14DynamicLibrary3getEPKc[_ZNK14DynamicLibrary3getEPKc]+0x22): undefined reference to `__libc_dlsym'
collect2: error: ld returned 1 exit status
|
s564564286
|
p04005
|
C++
|
#include <stdio.h>
#include <iostream>
#include <algorithm>
#include <vector>
#include <cmath>
#include <string>
#include <iomanip>
#include <bits/stdc++.h>
#include <fstream>
#include <map>
using namespace std;
typedef long long ll;
#define INF 1000000000000 //10^12:極めて大きい値,∞
#define REP(i,n) for(ll i=0;i<(ll)(n);i++)
#define REPD(i,n) for(ll i=n-1;i>=0;i--)
#define FOR(i,a,b) for(ll i=a;i<=(ll)(b);i++)
#define FORD(i,a,b) for(ll i=a;i>=(ll)(b);i--)
int main(){
vector<ll> A{0,0,0};
bool flag = true;
cin >> A[0] >> A[1] >> A[2];
sort(A.begin(),A.end());
REP(i,3){
if(A[i]%2==1){
flag = false;
}
}
if(flag){
cout >> 0 >> endl;
return 0;
}
else{
ll result = A[0]*A[1];
cout >> result >> endl;
return 0;
}
}
|
a.cc: In function 'int main()':
a.cc:31:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
31 | cout >> 0 >> endl;
| ~~~~ ^~ ~
| | |
| | int
| std::ostream {aka std::basic_ostream<char>}
a.cc:31:10: note: candidate: 'operator>>(int, int)' (built-in)
31 | cout >> 0 >> endl;
| ~~~~~^~~~
a.cc:31:10: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int'
In file included from /usr/include/c++/14/string:55,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:2:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:31:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
31 | cout >> 0 >> endl;
| ^
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:31:5: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
31 | cout >> 0 >> endl;
| ^~~~
In file included from /usr/include/c++/14/istream:1109,
from /usr/include/c++/14/iostream:42:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:31:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
31 | cout >> 0 >> endl;
| ^
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:31:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
31 | cout >> 0 >> endl;
| ^
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:31:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
31 | cout >> 0 >> endl;
| ^
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:31:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
31 | cout >> 0 >> endl;
| ^
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:31:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
31 | cout >> 0 >> endl;
| ^
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:31:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
31 | cout >> 0 >> endl;
| ^
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = int]':
a.cc:31:13: required from here
31 | cout >> 0 >> endl;
| ^
/usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
In file included from a.cc:7:
/usr/include/c++/14/iomanip:76:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Resetiosflags)'
76 | operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:76:5: note: template argument deduction/substitution failed:
a.cc:31:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
31 | cout >> 0 >> endl;
| ^
/usr/include/c++/14/iomanip:106:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setiosflags)'
106 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:106:5: note: template argument deduction/substitution failed:
a.cc:31:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
31 | cout >> 0 >> endl;
| ^
/usr/include/c++/14/iomanip:137:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setbase)'
137 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:137:5: note: template argument deduction/substitution failed:
a.cc:31:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
31 | cout >> 0 >> endl;
| ^
/usr/include/c++/14/iomanip:177:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setfill<_CharT>)'
177 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:177:5: note: template argument deduction/substitution failed:
a.cc:31:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
31 | cout >> 0 >> endl;
| ^
/usr/include/c++/14/iomanip:207:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setprecision)'
207 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setprecision __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:207:5: note: template argument deduction/substitution failed:
a.cc:31:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
31 | cout >> 0 >> endl;
| ^
/usr/include/c++/14/iomanip:237:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setw)'
237 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setw __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:237:5: note: template argument deduction/substitution failed:
a.cc:31:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
31 | cout >> 0 >> endl;
| ^
/usr/include/c++/14/iomanip:271:5: note: candidate: 'template<class _CharT, class _Traits, class _MoneyT> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Get_money<_MoneyT>)'
271 | operator>>(basic_istream<_CharT, _Traits>& __is, _Get_money<_MoneyT> __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:271:5: note: template argument deduction/substitution failed:
a.cc:31:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_is
|
s763111391
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll INF = 1e18;
const int N = 2010;
ll n, x, a[N], ans, dp[N][2];
void init() {
for (ll i = 0; i < n; i++)
dp[i][0] = dp[i][1] = INF;
}
ll get(ll start) {
init();
dp[start][0] = a[start];
for (ll step = 1; step < n; step++) {
ll i = (start + step) % n, prev = (i - 1 + n) % n;
dp[i][0] = min(dp[prev][0], dp[prev][1]) + a[i];
dp[i][1] = min(dp[prev][0], dp[prev][1]) + a[start] + x;
}
ll prev = (start - 1 + n) % n;
return min(dp[prev][0], dp[prev][1]);
}
int main() {
cin >> n >> x;
for (ll i = 0; i < n; i++)
cin >> a[i];
reverse(a.begin(), a.end());
ans = INF;
for (int i = 0; i < n; i++)
ans = min(ans, get(i));
cout << ans;
}
|
a.cc: In function 'int main()':
a.cc:32:19: error: request for member 'begin' in 'a', which is of non-class type 'll [2010]' {aka 'long long int [2010]'}
32 | reverse(a.begin(), a.end());
| ^~~~~
a.cc:32:30: error: request for member 'end' in 'a', which is of non-class type 'll [2010]' {aka 'long long int [2010]'}
32 | reverse(a.begin(), a.end());
| ^~~
|
s536884363
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
long long a, b, c;
cin >> a >> b >> c;
long long all = a*b*c;
if (all % 2LL == 0) cout << 0 << endl;
else {
long long ans = min(a*b, b*c, c*a);
cout << ans << endl;
}
}
|
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = long long int; _Compare = long long int]':
a.cc:11:28: required from here
11 | long long 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))
| ~~~~~~^~~~~~~~~~
|
s938182661
|
p04005
|
C++
|
#include <iostream>
#include <algorithm>
using namespace std;
int const NMAX = 100;
int v[1 + NMAX + 1];
int main() {
unsigned long long a, b, c;
cin >> a >> b >> c;
cout << min(abs(((a / 2) + a % 2) * (b * c) - ((a / 2)) * (b * c) ),min(abs(((b / 2) + b % 2) * (a * c) - ((b / 2)) * (a * c) ), abs(((c / 2) + c % 2) * (b * a) - ((c / 2)) * (b * a) )));
return 0;
}
|
a.cc: In function 'int main()':
a.cc:13:18: error: call of overloaded 'abs(long long unsigned int)' is ambiguous
13 | cout << min(abs(((a / 2) + a % 2) * (b * c) - ((a / 2)) * (b * c) ),min(abs(((b / 2) + b % 2) * (a * c) - ((b / 2)) * (a * c) ), abs(((c / 2) + c % 2) * (b * a) - ((c / 2)) * (b * a) )));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/cstdlib:79,
from /usr/include/c++/14/ext/string_conversions.h:43,
from /usr/include/c++/14/bits/basic_string.h:4154,
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:1:
/usr/include/stdlib.h:980:12: note: candidate: 'int abs(int)'
980 | extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
| ^~~
In file included from /usr/include/c++/14/cstdlib:81:
/usr/include/c++/14/bits/std_abs.h:137:3: note: candidate: 'constexpr __float128 std::abs(__float128)'
137 | abs(__float128 __x)
| ^~~
/usr/include/c++/14/bits/std_abs.h:85:3: note: candidate: 'constexpr __int128 std::abs(__int128)'
85 | abs(__GLIBCXX_TYPE_INT_N_0 __x) { return __x >= 0 ? __x : -__x; }
| ^~~
/usr/include/c++/14/bits/std_abs.h:79:3: note: candidate: 'constexpr long double std::abs(long double)'
79 | abs(long double __x)
| ^~~
/usr/include/c++/14/bits/std_abs.h:75:3: note: candidate: 'constexpr float std::abs(float)'
75 | abs(float __x)
| ^~~
/usr/include/c++/14/bits/std_abs.h:71:3: note: candidate: 'constexpr double std::abs(double)'
71 | abs(double __x)
| ^~~
/usr/include/c++/14/bits/std_abs.h:61:3: note: candidate: 'long long int std::abs(long long int)'
61 | abs(long long __x) { return __builtin_llabs (__x); }
| ^~~
/usr/include/c++/14/bits/std_abs.h:56:3: note: candidate: 'long int std::abs(long int)'
56 | abs(long __i) { return __builtin_labs(__i); }
| ^~~
a.cc:13:78: error: call of overloaded 'abs(long long unsigned int)' is ambiguous
13 | cout << min(abs(((a / 2) + a % 2) * (b * c) - ((a / 2)) * (b * c) ),min(abs(((b / 2) + b % 2) * (a * c) - ((b / 2)) * (a * c) ), abs(((c / 2) + c % 2) * (b * a) - ((c / 2)) * (b * a) )));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/stdlib.h:980:12: note: candidate: 'int abs(int)'
980 | extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
| ^~~
/usr/include/c++/14/bits/std_abs.h:137:3: note: candidate: 'constexpr __float128 std::abs(__float128)'
137 | abs(__float128 __x)
| ^~~
/usr/include/c++/14/bits/std_abs.h:85:3: note: candidate: 'constexpr __int128 std::abs(__int128)'
85 | abs(__GLIBCXX_TYPE_INT_N_0 __x) { return __x >= 0 ? __x : -__x; }
| ^~~
/usr/include/c++/14/bits/std_abs.h:79:3: note: candidate: 'constexpr long double std::abs(long double)'
79 | abs(long double __x)
| ^~~
/usr/include/c++/14/bits/std_abs.h:75:3: note: candidate: 'constexpr float std::abs(float)'
75 | abs(float __x)
| ^~~
/usr/include/c++/14/bits/std_abs.h:71:3: note: candidate: 'constexpr double std::abs(double)'
71 | abs(double __x)
| ^~~
/usr/include/c++/14/bits/std_abs.h:61:3: note: candidate: 'long long int std::abs(long long int)'
61 | abs(long long __x) { return __builtin_llabs (__x); }
| ^~~
/usr/include/c++/14/bits/std_abs.h:56:3: note: candidate: 'long int std::abs(long int)'
56 | abs(long __i) { return __builtin_labs(__i); }
| ^~~
a.cc:13:135: error: call of overloaded 'abs(long long unsigned int)' is ambiguous
13 | cout << min(abs(((a / 2) + a % 2) * (b * c) - ((a / 2)) * (b * c) ),min(abs(((b / 2) + b % 2) * (a * c) - ((b / 2)) * (a * c) ), abs(((c / 2) + c % 2) * (b * a) - ((c / 2)) * (b * a) )));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/stdlib.h:980:12: note: candidate: 'int abs(int)'
980 | extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
| ^~~
/usr/include/c++/14/bits/std_abs.h:137:3: note: candidate: 'constexpr __float128 std::abs(__float128)'
137 | abs(__float128 __x)
| ^~~
/usr/include/c++/14/bits/std_abs.h:85:3: note: candidate: 'constexpr __int128 std::abs(__int128)'
85 | abs(__GLIBCXX_TYPE_INT_N_0 __x) { return __x >= 0 ? __x : -__x; }
| ^~~
/usr/include/c++/14/bits/std_abs.h:79:3: note: candidate: 'constexpr long double std::abs(long double)'
79 | abs(long double __x)
| ^~~
/usr/include/c++/14/bits/std_abs.h:75:3: note: candidate: 'constexpr float std::abs(float)'
75 | abs(float __x)
| ^~~
/usr/include/c++/14/bits/std_abs.h:71:3: note: candidate: 'constexpr double std::abs(double)'
71 | abs(double __x)
| ^~~
/usr/include/c++/14/bits/std_abs.h:61:3: note: candidate: 'long long int std::abs(long long int)'
61 | abs(long long __x) { return __builtin_llabs (__x); }
| ^~~
/usr/include/c++/14/bits/std_abs.h:56:3: note: candidate: 'long int std::abs(long int)'
56 | abs(long __i) { return __builtin_labs(__i); }
| ^~~
|
s956227096
|
p04005
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main() {
ll edge[3];
bool even = false;
for (int i = 0; i < 3; ++i) {
cin >> edge[i];
if (edge[i] % 2 == 0) even = true;
}
sort(edge, edge + 3);
cout << (even ? 0 : edge[0] * edge[1]) << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:5:5: error: 'll' was not declared in this scope
5 | ll edge[3];
| ^~
a.cc:8:16: error: 'edge' was not declared in this scope
8 | cin >> edge[i];
| ^~~~
a.cc:11:10: error: 'edge' was not declared in this scope
11 | sort(edge, edge + 3);
| ^~~~
|
s954464889
|
p04005
|
C++
|
#include <bits/stdc++.h>
using ll = long long;
using namespace std;
#define rep(i,n) for(int i=0, i##_len=(int)(n); i<i##_len; i++)
#define reps(i,n) for(int i=1 , i##_len=(int)(n);i<=i##_len;i++)
#define rrep(i,n) for(int i=((int)(n)-1);i>=0;i--)
#define rreps(i,n) for(int i=((int)(n));i>0;i--)
#define repi(i,x) for(auto i=(x).begin(),i##_fin=(x).end();i!=i##_fin;i++)
#define all(x) (x).begin(), (x).end()
#define F first
#define S second
#define mp make_pair
#define pb push_back
#define solve(a) ((a)?"Yes":"No")
typedef vector<int> Vi;
typedef vector<Vi> VVi;
typedef pair<int , int> Pi;
typedef vector<Pi> VPi;
typedef vector<long long> V;
typedef vector<V> VV;
typedef pair<long long , long long> P;
typedef vector<P> VP;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1;} return 0;}
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1;} return 0;}
const long long INFLL = 1LL<<60;
const int INF = 1<<30;
const double PI=acos(-1);
int main(){
ll a,b,c;
ll ans = 0;
cin >>a>>b>>c;
if (a % 2 and b % 2 and c % 2) {
ans = min{a * b, b * c, c * a};
} else {
ans = 0LL;
}
cout<<ans<<endl;
}
|
a.cc: In function 'int main()':
a.cc:33:23: error: cannot resolve overloaded function 'min' based on conversion to type 'll' {aka 'long long int'}
33 | ans = min{a * b, b * c, c * a};
| ^~~
|
s530128905
|
p04005
|
C++
|
#include <bits/stdc++.h>
using ll = long long;
using namespace std;
#define rep(i,n) for(int i=0, i##_len=(int)(n); i<i##_len; i++)
#define reps(i,n) for(int i=1 , i##_len=(int)(n);i<=i##_len;i++)
#define rrep(i,n) for(int i=((int)(n)-1);i>=0;i--)
#define rreps(i,n) for(int i=((int)(n));i>0;i--)
#define repi(i,x) for(auto i=(x).begin(),i##_fin=(x).end();i!=i##_fin;i++)
#define all(x) (x).begin(), (x).end()
#define F first
#define S second
#define mp make_pair
#define pb push_back
#define solve(a) ((a)?"Yes":"No")
typedef vector<int> Vi;
typedef vector<Vi> VVi;
typedef pair<int , int> Pi;
typedef vector<Pi> VPi;
typedef vector<long long> V;
typedef vector<V> VV;
typedef pair<long long , long long> P;
typedef vector<P> VP;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1;} return 0;}
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1;} return 0;}
const long long INFLL = 1LL<<60;
const int INF = 1<<30;
const double PI=acos(-1);
int main(){
ll a,b,c;
ll ans=0LL;
cin >>a>>b>>c;
if(a%2 or b%2 or c%2){ans=0LL;}else{
ans=min(a*b,b*c,c*a);
}
cout<<ans<<endl;
}
|
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = long long int; _Compare = long long int]':
a.cc:34:10: required from here
34 | 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))
| ~~~~~~^~~~~~~~~~
|
s141914340
|
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({a,b,c)} * (a+b+c-min({a,b,c})-max({a,b,c})) << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:10:23: error: expected '}' before ')' token
10 | cout << min({a,b,c)} * (a+b+c-min({a,b,c})-max({a,b,c})) << endl;
| ~ ^
a.cc:10:24: error: expected ';' before '}' token
10 | cout << min({a,b,c)} * (a+b+c-min({a,b,c})-max({a,b,c})) << endl;
| ^
| ;
a.cc:10:26: error: invalid type argument of unary '*' (have 'long long int')
10 | cout << min({a,b,c)} * (a+b+c-min({a,b,c})-max({a,b,c})) << endl;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc: At global scope:
a.cc:12:17: error: expected declaration before '}' token
12 | }
| ^
|
s254190368
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namespace std;
#define int long long
typedef pair<int,int> P;
int INF = 1e9+7;
int mod = 100000;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
signed main() {
int A,B,C;
cin >> A >> B >> C;
if(A%2 == 0 || B%2 == 0 || C%2 == 0) {
cout << 0 << endl;
return 0
}
cout << min({A*B,A*C,B*C}) << endl;
}
|
a.cc: In function 'int main()':
a.cc:14:17: error: expected ';' before '}' token
14 | return 0
| ^
| ;
15 | }
| ~
|
s882519300
|
p04005
|
C++
|
// IOI 2021
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define ends ' '
#define die(x) return cout << x << endl, 0
#define all(v) v.begin(), v.end()
#define sz(x) (int)(x.size())
void debug_out() { cerr << endl; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) { cerr << ends << H; debug_out(T...); }
#define debug(...) cerr << "{" << #__VA_ARGS__ << "}:", debug_out(__VA_ARGS__)
typedef long long ll;
typedef pair<int, int> pii;
const int INF = 1e9;
const ll MOD = 1e9 + 7;
////////////////////////////////////////////////////////////////////
const int N = 1e5 + 5;
int A[3];
int main() {
ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
mt19937 Rnd(time(0));
bool e = 0;
for (int i = 0; i < 3; i++) cin >> A[i], e |= (A[i] % 2 == 0);
sort(A, A + n);
if (e) die(0);
cout << A[0] * A[1] << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:32:21: error: 'n' was not declared in this scope
32 | sort(A, A + n);
| ^
|
s473743511
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define ll long long
#define P pair<ll,ll>
#define all(v) (v).begin(),(v).end()
const ll mod = 1e9+7;
const ll INF = 1e18;
const double pi = acos(-1.0);
int main(void)
{
ll a,b,c,ans; cin>>a>>b>>c;
ll sum=a+b+c;
ans = a*b*c-max({a,b,c})*(min({a,b,c}))*(sum-max({a,b,c}-min({a,b,c})));
cout<<ans<<endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:17:61: error: expected ')' before '-' token
17 | ans = a*b*c-max({a,b,c})*(min({a,b,c}))*(sum-max({a,b,c}-min({a,b,c})));
| ~ ^
| )
|
s304155574
|
p04005
|
C++
|
#include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
using ll=long long;
using namespace std;
int main(){
vector<ll> a(3);
rep(i,3) cin>>a[i];
if(a[0]%2==0 ||a[1]%2==0 ||a[2]%2==0) cout<<0<<"\n";
else{
sort(a.begin(),a.end());
cout<<a[0]*a[1]*(a[2]-a[2]/2)-a[0]*a[1]*(a[2]/2)<<"\n";
return 0;
}
|
a.cc: In function 'int main()':
a.cc:14:2: error: expected '}' at end of input
14 | }
| ^
a.cc:6:11: note: to match this '{'
6 | int main(){
| ^
|
s426231690
|
p04005
|
C++
|
#include <iostream>
#include <bits/stdc++.h>
#include <vector>
#include <algorithm>
#include <cctype>
#include <string>
#include <map>
#include <set>
#include <math.h>
#include <cmath>
#define ll long long
using namespace std;
using P = pair<int,int>;
int main(){
int A, B, C, X, mn, md, mx;
cin >> A >> B >> C;
ll ans;
if(A%2 != 0 && B%2 != 0 && C%2 != 0){
X = max(A, B);
mn = min(A, B);
mx = max(X, C);
md = min(X, C);
ans = ll((mx/2+1)*md*mn) - ll((mx/2)*md*mn);
cout << ans << endl;
}else{
cout << 0 << endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:11:12: error: expected primary-expression before 'long'
11 | #define ll long long
| ^~~~
a.cc:28:11: note: in expansion of macro 'll'
28 | ans = ll((mx/2+1)*md*mn) - ll((mx/2)*md*mn);
| ^~
|
s540048497
|
p04005
|
C++
|
#include<bits/stdc++.h>
using namespace std;
const int N=2000+10;
typedef long long ll;
const ll llf=(1ll<<63)-1;
ll dp[N][N],a[N];
int main()
{
int n;
ll x,ans=llf;
scanf("%d%lld",&n,&x);
for(int i=1;i<=n;i++)
{
scanf("%lld",&a[i]);
dp[0][i]=a[i];
}
for(int i=1;i<=n-1;i++)
{
for(int j=1;j<=n;j++)
{
int ind=j-i;
if(ind<=0) ind=n+ind;
dp[i][j]=min(dp[i-1][j],a[ind]);
}
}
for(int i=0;i<=n-1;i++)
{
ll ant=0;
for(int j=1;j<=n;j++)
ant+=dp[i][j];
ans=min(ans,ant+i*x);
// cout<<ans<<endl;
}
|
a.cc:7:23: warning: integer overflow in expression of type 'long long int' results in '9223372036854775807' [-Woverflow]
7 | const ll llf=(1ll<<63)-1;
| ~~~~~~~~~^~
a.cc: In function 'int main()':
a.cc:35:6: error: expected '}' at end of input
35 | }
| ^
a.cc:10:1: note: to match this '{'
10 | {
| ^
|
s041697088
|
p04005
|
C++
|
#include <iostream>
#include <algorithm>
using namespace std;
int A;
int B;
int C;
int main(){
cin >> A >> B >> C;
if(A % 2 == 0 || B % 2 == 0 || C % 2 == 0){
cout << "0";
}
else{
cout << min(A * B, B * C, C * A);
}
}
|
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:15:16: required from here
15 | cout << min(A * B, B * C, C * A);
| ~~~^~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function
284 | if (__comp(__b, __a))
| ~~~~~~^~~~~~~~~~
|
s823293606
|
p04005
|
Java
|
import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int[] side = new int[3];
for(int i = 0;i<side.length;i++) side[i] = sc.nextInt();
if(side[0]%2==0||side[1]%2==0||side[2]%2==0){
System.out.println(0);
} else {
long tmp = Math.min(side[1]*side[2],side[2]*side[0]);
long tmp2 = side[0]*side[1]l;
System.out.println(Math.min(tmp2,tmp));
}
}
}
|
Main.java:11: error: ';' expected
long tmp2 = side[0]*side[1]l;
^
1 error
|
s501587536
|
p04005
|
C++
|
#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
using namespace std;
int main() {
int a,b,c;
cin >> a >> b >> c;
if(a%2 * b%2 * 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 = int; _Compare = int]':
a.cc:10:19: required from here
10 | else 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))
| ~~~~~~^~~~~~~~~~
|
s118518399
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namespace std;
#define int long long
signed 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,A*C,B*C) << endl;
}
}
|
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = long long int; _Compare = long long int]':
a.cc:11:20: required from here
11 | cout << min(A*B,A*C,B*C) << endl;
| ~~~^~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function
284 | if (__comp(__b, __a))
| ~~~~~~^~~~~~~~~~
|
s207514978
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define FOR(i, m, n) for (int i = (m); i < (n); i++)
#define FORR(i, m, n) for (int i = (m); i >= (n); i--)
#define REP(i, n) FOR(i, 0, (n))
#define REPR(i, n) FORR(i, (n) - 1, 0)
#define REP1(i, n) FOR(i, 1, (n) + 1)
#define REPS(c, s) for (char c : s)
#define ALL(c) (c).begin(), (c).end()
#define SORT(c) sort(ALL(c))
#define REV(c) reverse(ALL(c))
#define sz(v) (int)v.size()
#define endl '\n';
template<class T> inline bool chmin(T& a, T b) {if (a > b) {a = b; return true;} return false;}
template<class T> inline bool chmax(T& a, T b) {if (a < b) {a = b; return true;} return false;}
const int MOD = 1000000007;
const int INF = 1000000001;
const ll LINF = 1000000001000000001LL;
void solve();
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout << fixed << setprecision(numeric_limits<double>::max_digits10);
solve();
return 0;
}
void solve() {
ll a, b, c;
cin >> a >> b >> c;
if (a % 2 == 0 or b % 2 == 0 or c % 2 == 0) {
cout << 0 << endl;
return;
}
auto f = [&](int x, int y, int z) {return (x / 2 + 1) * y * z - x / 2 * y * z;};
ll mn = INF;
chmin(mn, f(a, b, c));
chmin(mn, f(b, a, c));
chmin(mn, f(c, b, a));
cout << mn << endl;
}
|
a.cc: In function 'void solve()':
a.cc:44:10: error: no matching function for call to 'chmin(ll&, int)'
44 | chmin(mn, f(a, b, c));
| ~~~~~^~~~~~~~~~~~~~~~
a.cc:17:31: note: candidate: 'template<class T> bool chmin(T&, T)'
17 | template<class T> inline bool chmin(T& a, T b) {if (a > b) {a = b; return true;} return false;}
| ^~~~~
a.cc:17:31: note: template argument deduction/substitution failed:
a.cc:44:10: note: deduced conflicting types for parameter 'T' ('long long int' and 'int')
44 | chmin(mn, f(a, b, c));
| ~~~~~^~~~~~~~~~~~~~~~
a.cc:45:10: error: no matching function for call to 'chmin(ll&, int)'
45 | chmin(mn, f(b, a, c));
| ~~~~~^~~~~~~~~~~~~~~~
a.cc:17:31: note: candidate: 'template<class T> bool chmin(T&, T)'
17 | template<class T> inline bool chmin(T& a, T b) {if (a > b) {a = b; return true;} return false;}
| ^~~~~
a.cc:17:31: note: template argument deduction/substitution failed:
a.cc:45:10: note: deduced conflicting types for parameter 'T' ('long long int' and 'int')
45 | chmin(mn, f(b, a, c));
| ~~~~~^~~~~~~~~~~~~~~~
a.cc:46:10: error: no matching function for call to 'chmin(ll&, int)'
46 | chmin(mn, f(c, b, a));
| ~~~~~^~~~~~~~~~~~~~~~
a.cc:17:31: note: candidate: 'template<class T> bool chmin(T&, T)'
17 | template<class T> inline bool chmin(T& a, T b) {if (a > b) {a = b; return true;} return false;}
| ^~~~~
a.cc:17:31: note: template argument deduction/substitution failed:
a.cc:46:10: note: deduced conflicting types for parameter 'T' ('long long int' and 'int')
46 | chmin(mn, f(c, b, a));
| ~~~~~^~~~~~~~~~~~~~~~
|
s675294039
|
p04005
|
C++
|
#include <bits/stdc++.h>
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,min(b*c,c*a)) << endl;
}
}
|
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;
| ^
|
s278877274
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(){
int a,b,c;
cin >> a >> b >> c;
int d=max(a,max(b,c));
int e=min(a,min(b,c));
int f=a+b+c-d-e;
if(d%2==0){
cout << 0 << endl;
}
else{
cout << e*f << endl;
}a
}
|
a.cc: In function 'int main()':
a.cc:17:5: error: expected ';' before '}' token
17 | }a
| ^
| ;
18 | }
| ~
|
s813471364
|
p04005
|
C++
|
#include <iostream>
#include <vector>
#include <cstdlib>
using namespace std;
int main() {
long long a[3];
cin>>a[0]>>a[1]>>a[2];
int counter=0;
sort(a,a+3);
for(int i=0; i<3;i++){
if(a[i]%2==0){
counter++;}}
if(counter>0)
cout<<0<<endl;
else
cout<<a[0]*a[1]<<endl;
}
|
a.cc: In function 'int main()':
a.cc:9:5: error: 'sort' was not declared in this scope; did you mean 'short'?
9 | sort(a,a+3);
| ^~~~
| short
|
s410637255
|
p04005
|
C++
|
#include <iostream>
#include <vector>
#include <cstdlib>
using namespace std;
int main() {
long long a[3];
cin>>a[0]>>a[1]>>a[2];
int counter1=0;
int counter2=0;
int answer=0;
int a=0;
sort(a,a+3);
for(int i=0; i<3;i++){
if(a[i]%2==0){
counter++;}}
if(counter>0)
cout<<0<<endl;
else
cout<<a[0]*a[1]<<endl;
}
|
a.cc: In function 'int main()':
a.cc:11:9: error: conflicting declaration 'int a'
11 | int a=0;
| ^
a.cc:6:15: note: previous declaration as 'long long int a [3]'
6 | long long a[3];
| ^
a.cc:12:5: error: 'sort' was not declared in this scope; did you mean 'short'?
12 | sort(a,a+3);
| ^~~~
| short
a.cc:15:5: error: 'counter' was not declared in this scope; did you mean 'counter2'?
15 | counter++;}}
| ^~~~~~~
| counter2
a.cc:16:8: error: 'counter' was not declared in this scope; did you mean 'counter2'?
16 | if(counter>0)
| ^~~~~~~
| counter2
|
s337709569
|
p04005
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main(){
int A, B, C;
cin >> A >> B >> C;
x=abs(ceil((double)A/2)*B*C-floor((double)A/2)*B*C);
y=abs(ceil((double)B/2)*A*C-floor((double)B/2)*A*C);
z=abs(ceil((double)C/2)*B*A-floor((double)C/2)*B*A);
cout << min(min(x,y),z) <<endl;
}
|
a.cc: In function 'int main()':
a.cc:8:3: error: 'x' was not declared in this scope
8 | x=abs(ceil((double)A/2)*B*C-floor((double)A/2)*B*C);
| ^
a.cc:9:3: error: 'y' was not declared in this scope
9 | y=abs(ceil((double)B/2)*A*C-floor((double)B/2)*A*C);
| ^
a.cc:10:3: error: 'z' was not declared in this scope
10 | z=abs(ceil((double)C/2)*B*A-floor((double)C/2)*B*A);
| ^
|
s593030578
|
p04005
|
C++
|
#include <iostream>
#include <vector>
using namespace std;
int main() {
int N, M, X;
cin >> N >> M >> X;
int a[3];
a[0] = N;
a[1] = M;
a[2] = X;
sort(a,a+3);
if(N%2 == 0 || M%2 == 0 || X%2 == 0){
cout << "0" << endl;
}
else{
cout << a[0]*a[1] << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:15:3: error: 'sort' was not declared in this scope; did you mean 'short'?
15 | sort(a,a+3);
| ^~~~
| short
|
s439593306
|
p04005
|
C++
|
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <iostream>
#include <vector>
using namespace std;
int main(){
vector<int> hen;
int x;
for (int i = 0; i < 3; i++) {
cin >> x;
hen.push_back(x);
}
for (auto j: hen) {
if (j % 2 == 0) {
cout << "0" << endl;
return 0;
}
}
sort(hen.begin(), hen.end());
cout << hen.at(0) * hen.at(1) << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:25:5: error: 'sort' was not declared in this scope; did you mean 'short'?
25 | sort(hen.begin(), hen.end());
| ^~~~
| short
|
s541935498
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
vector<long> a(3);
cin >> a.at(0) >> a.at(1) >> a.at(2);
sort(a.begin(), a.end());
if (a % 2 == 0 || b % 2 == 0 || c % 2 == 0)
cout << 0;
else
cout << (ceil(a.at(2) / 2.0) * a.at(1) * a.at(0)) - (floor(a.at(2) / 2.0) * a.at(1) * a.at(0));
return 0;
}
|
a.cc: In function 'int main()':
a.cc:11:9: error: no match for 'operator%' (operand types are 'std::vector<long int>' and 'int')
11 | if (a % 2 == 0 || b % 2 == 0 || c % 2 == 0)
| ~ ^ ~
| | |
| | int
| std::vector<long int>
In file included from /usr/include/c++/14/valarray:605,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166,
from a.cc:1:
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom1, class _Dom2> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Expr, std::_Expr, _Dom1, _Dom2>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const _Expr<_Dom1, typename _Dom1::value_type>&, const _Expr<_Dom2, typename _Dom2::value_type>&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:11:11: note: 'std::vector<long int>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
11 | if (a % 2 == 0 || b % 2 == 0 || c % 2 == 0)
| ^
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Expr, std::_Constant, _Dom, typename _Dom::value_type>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const _Expr<_Dom1, typename _Dom1::value_type>&, const typename _Dom::value_type&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:11:11: note: 'std::vector<long int>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
11 | if (a % 2 == 0 || b % 2 == 0 || c % 2 == 0)
| ^
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Constant, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const typename _Dom::value_type&, const _Expr<_Dom1, typename _Dom1::value_type>&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:11:11: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int'
11 | if (a % 2 == 0 || b % 2 == 0 || c % 2 == 0)
| ^
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Expr, std::_ValArray, _Dom, typename _Dom::value_type>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const _Expr<_Dom1, typename _Dom1::value_type>&, const valarray<typename _Dom::value_type>&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:11:11: note: 'std::vector<long int>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
11 | if (a % 2 == 0 || b % 2 == 0 || c % 2 == 0)
| ^
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_ValArray, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const valarray<typename _Dom::value_type>&, const _Expr<_Dom1, typename _Dom1::value_type>&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:11:11: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int'
11 | if (a % 2 == 0 || b % 2 == 0 || c % 2 == 0)
| ^
/usr/include/c++/14/valarray:1200:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_ValArray, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__modulus, _Tp>::result_type> std::operator%(const valarray<_Tp>&, const valarray<_Tp>&)'
1200 | _DEFINE_BINARY_OPERATOR(%, __modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1200:1: note: template argument deduction/substitution failed:
a.cc:11:11: note: 'std::vector<long int>' is not derived from 'const std::valarray<_Tp>'
11 | if (a % 2 == 0 || b % 2 == 0 || c % 2 == 0)
| ^
/usr/include/c++/14/valarray:1200:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_ValArray, std::_Constant, _Tp, _Tp>, typename std::__fun<std::__modulus, _Tp>::result_type> std::operator%(const valarray<_Tp>&, const typename valarray<_Tp>::value_type&)'
1200 | _DEFINE_BINARY_OPERATOR(%, __modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1200:1: note: template argument deduction/substitution failed:
a.cc:11:11: note: 'std::vector<long int>' is not derived from 'const std::valarray<_Tp>'
11 | if (a % 2 == 0 || b % 2 == 0 || c % 2 == 0)
| ^
/usr/include/c++/14/valarray:1200:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Constant, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__modulus, _Tp>::result_type> std::operator%(const typename valarray<_Tp>::value_type&, const valarray<_Tp>&)'
1200 | _DEFINE_BINARY_OPERATOR(%, __modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1200:1: note: template argument deduction/substitution failed:
a.cc:11:11: note: mismatched types 'const std::valarray<_Tp>' and 'int'
11 | if (a % 2 == 0 || b % 2 == 0 || c % 2 == 0)
| ^
a.cc:11:21: error: 'b' was not declared in this scope
11 | if (a % 2 == 0 || b % 2 == 0 || c % 2 == 0)
| ^
a.cc:11:35: error: 'c' was not declared in this scope
11 | if (a % 2 == 0 || b % 2 == 0 || c % 2 == 0)
| ^
|
s903587155
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
if(a%2==1 && b%2==1 && c%2==1){
ans = min (a*b, b*c);
ans = min (ans, c*a);
cout << ans << endl;
}
else cout << 0 << endl;
}
|
a.cc: In function 'int main()':
a.cc:7:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
7 | ans = min (a*b, b*c);
| ^~~
| abs
|
s352952351
|
p04005
|
C++
|
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
#define REP(inc, bgn, end) for (int inc = bgn; inc < end; inc++)
int main() {
int a, b, c;
cin >> a >> b >> c;
if (a % 2 == 0 || b % 2 == 0 || c % 2 == 0) {
cout << 0 << endl;
exit(0);
}
cout << min(a * b, b * c, c * a) << endl;
}
|
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:2:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:18:16: required from here
18 | 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))
| ~~~~~~^~~~~~~~~~
|
s715563658
|
p04005
|
C++
|
#include <iostream>
int main()
{
//若有边长为偶数,结果为0;
//皆为奇数,结果为两短边之积乘1。
int a,b,c,max;
cin>>a>>b>>c;
if(a%2==0||b%2==0||c%2==0) cout<<"0";
else {
max=a;
if(b>a) max=b;
if(c>b) max=c;
if(max==a) cout<<b*c;
else if(max==b) cout<<a*c;
else if(max==c) cout<<a*b;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
7 | cin>>a>>b>>c;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:8:36: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
8 | if(a%2==0||b%2==0||c%2==0) cout<<"0";
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:13:28: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
13 | if(max==a) cout<<b*c;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:14:33: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
14 | else if(max==b) cout<<a*c;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:15:33: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
15 | else if(max==c) cout<<a*b;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
|
s007112450
|
p04005
|
C
|
#include<iostream>
#include<math.h>
#include<algorithm>
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
{
int d = max(a, max(b, c));
if (d == a)cout << b * c << endl;
else if (d == b)cout << a * c << endl;
else if (d == c)cout << b * a << endl;
}
return 0;
}
|
main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s258610426
|
p04005
|
C++
|
#include<iostream>
using namespace std;
int a, b, c, ab, bc, ac;
int min;
int main()
{
cin >> a >> b >> c;
ab = a * b;
min = ab;
bc = b * c;
if (bc < min)
min = bc;
ac = a * c;
if (ac < min)
min = ac;
if (min == ab)
{
int temp;
temp = (c - c / 2) - c / 2;
temp = temp * ab;
cout << temp;
return 0;
}
if (min == bc)
{
int temp;
temp = (a - a / 2) - a / 2;
temp = temp * bc;
cout << temp;
return 0;
}
if (min == ac)
{
int temp;
temp = (b - b / 2) - b / 2;
temp = temp * ac;
cout << temp;
return 0;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:9:9: error: reference to 'min' is ambiguous
9 | min = ab;
| ^~~
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:4:5: note: 'int min'
4 | int min;
| ^~~
a.cc:11:18: error: reference to 'min' is ambiguous
11 | if (bc < min)
| ^~~
/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:4:5: note: 'int min'
4 | int min;
| ^~~
a.cc:12:17: error: reference to 'min' is ambiguous
12 | min = bc;
| ^~~
/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:4:5: note: 'int min'
4 | int min;
| ^~~
a.cc:14:18: error: reference to 'min' is ambiguous
14 | if (ac < min)
| ^~~
/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:4:5: note: 'int min'
4 | int min;
| ^~~
a.cc:15:17: error: reference to 'min' is ambiguous
15 | min = ac;
| ^~~
/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:4:5: note: 'int min'
4 | int min;
| ^~~
a.cc:16:13: error: reference to 'min' is ambiguous
16 | if (min == ab)
| ^~~
/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:4:5: note: 'int min'
4 | int min;
| ^~~
a.cc:24:13: error: reference to 'min' is ambiguous
24 | if (min == bc)
| ^~~
/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:4:5: note: 'int min'
4 | int min;
| ^~~
a.cc:32:13: error: reference to 'min' is ambiguous
32 | if (min == ac)
| ^~~
/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:4:5: note: 'int min'
4 | int min;
| ^~~
|
s918950796
|
p04005
|
C++
|
#include<iostream>
using namespace std;
int a, b, c, ab, bc, ac;
int min;
int main()
{
cin >> a >> b >> c;
ab = a * b;
min = ab;
bc = b * c;
if (bc < min)
min = bc;
ac = a * c;
if (ac < min)
min = ac;
if (min == ab)
{
int temp;
temp = (c - c / 2) - c / 2;
temp = temp * ab;
cout << temp;
return 0;
}
if (min == bc)
{
int temp;
temp = (a - a / 2) - a / 2;
temp = temp * bc;
cout << temp;
return 0;
}
if (min == ac)
{
int temp;
temp = (b - b / 2) - b / 2;
temp = temp * ac;
cout << temp;
return 0;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:9:9: error: reference to 'min' is ambiguous
9 | min = ab;
| ^~~
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:4:5: note: 'int min'
4 | int min;
| ^~~
a.cc:11:18: error: reference to 'min' is ambiguous
11 | if (bc < min)
| ^~~
/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:4:5: note: 'int min'
4 | int min;
| ^~~
a.cc:12:17: error: reference to 'min' is ambiguous
12 | min = bc;
| ^~~
/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:4:5: note: 'int min'
4 | int min;
| ^~~
a.cc:14:18: error: reference to 'min' is ambiguous
14 | if (ac < min)
| ^~~
/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:4:5: note: 'int min'
4 | int min;
| ^~~
a.cc:15:17: error: reference to 'min' is ambiguous
15 | min = ac;
| ^~~
/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:4:5: note: 'int min'
4 | int min;
| ^~~
a.cc:16:13: error: reference to 'min' is ambiguous
16 | if (min == ab)
| ^~~
/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:4:5: note: 'int min'
4 | int min;
| ^~~
a.cc:24:13: error: reference to 'min' is ambiguous
24 | if (min == bc)
| ^~~
/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:4:5: note: 'int min'
4 | int min;
| ^~~
a.cc:32:13: error: reference to 'min' is ambiguous
32 | if (min == ac)
| ^~~
/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:4:5: note: 'int min'
4 | int min;
| ^~~
|
s298157139
|
p04005
|
C
|
#include<iostream>
#include<algorithm>
using namespace std;
int main(){
long long a[3];
cin>>a[0]>>a[1]>>a[2];
sort(a,a+3);
if(a[2]%2==0){
cout<<"0"<<endl;
}
else{
cout<<a[1]*a[2]<<endl;
}
return 0;
}
|
main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s685283049
|
p04005
|
C
|
#include<iostream>
#include<cstdio>
using namespace std;
int main(){
long long a, b, c, jShu = 0x3f3f3f3f3f3f3f3f;
cin >> a >> b >> c;
if(a%2 && b*c < jShu) jShu = b*c;
if(!(a%2)) jShu = 0;
if(b%2 && a*c < jShu) jShu = a*c;
if(!(b%2)) jShu = 0;
if(c%2 && a*b < jShu) jShu = a*b;
if(!(c%2)) jShu = 0;
cout << jShu << endl;
}
|
main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s664054205
|
p04005
|
C++
|
#include<iostream>
using namespace std;
int a, b, c, ab, bc, ac;
int min;
int main()
{
cin >> a >> b >> c;
ab = a * b;
min = ab;
bc = b * c;
if (bc < min)
min = bc;
ac = a * c;
if (ac < min)
min = ac;
if (min == ab)
{
int temp;
temp = (c - c / 2) - c / 2;
temp = temp * ab;
cout << temp;
return 0;
}
if (min == bc)
{
int temp;
temp = (a - a / 2) - a / 2;
temp = temp * bc;
cout << temp;
return 0;
}
if (min == ac)
{
int temp;
temp = (b - b / 2) - b / 2;
temp = temp * ac;
cout << temp;
return 0;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:9:9: error: reference to 'min' is ambiguous
9 | min = ab;
| ^~~
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:4:5: note: 'int min'
4 | int min;
| ^~~
a.cc:11:18: error: reference to 'min' is ambiguous
11 | if (bc < min)
| ^~~
/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:4:5: note: 'int min'
4 | int min;
| ^~~
a.cc:12:17: error: reference to 'min' is ambiguous
12 | min = bc;
| ^~~
/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:4:5: note: 'int min'
4 | int min;
| ^~~
a.cc:14:18: error: reference to 'min' is ambiguous
14 | if (ac < min)
| ^~~
/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:4:5: note: 'int min'
4 | int min;
| ^~~
a.cc:15:17: error: reference to 'min' is ambiguous
15 | min = ac;
| ^~~
/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:4:5: note: 'int min'
4 | int min;
| ^~~
a.cc:16:13: error: reference to 'min' is ambiguous
16 | if (min == ab)
| ^~~
/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:4:5: note: 'int min'
4 | int min;
| ^~~
a.cc:24:13: error: reference to 'min' is ambiguous
24 | if (min == bc)
| ^~~
/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:4:5: note: 'int min'
4 | int min;
| ^~~
a.cc:32:13: error: reference to 'min' is ambiguous
32 | if (min == ac)
| ^~~
/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:4:5: note: 'int min'
4 | int min;
| ^~~
|
s111456070
|
p04005
|
C++
|
#include<iostream>
#include<alogrithm>
using namespace std;
int main(){
int a[3];
cin>>a[0]>>a[1]>>a[2];
sort(a,a+3);
if(a[2]%2==0){
cout<<0<<endl;
}else{
cout<<a[0]*a[1]<<endl;
}
return 0;
}
|
a.cc:2:9: fatal error: alogrithm: No such file or directory
2 | #include<alogrithm>
| ^~~~~~~~~~~
compilation terminated.
|
s628289380
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
int a,b,c;
cin>.a>>b>>c;
if(a%2==1 && b%2==1 && c%2==1) {
cout<<min(a*b,min(b*c,c*a));
}
else cout<<0;
}
|
a.cc: In function 'int main()':
a.cc:7:13: error: expected primary-expression before '.' token
7 | cin>.a>>b>>c;
| ^
|
s825773455
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
vector<int> a(3);
cin>>a[0]>>a[1]>>a[2];
if(a%2==1 && b%2==1 && c%2==1) {
sort(a.begin(),a.end());
cout<<a[0]*a[1];
}
else cout<<0;
}
|
a.cc: In function 'int main()':
a.cc:8:9: error: no match for 'operator%' (operand types are 'std::vector<int>' and 'int')
8 | if(a%2==1 && b%2==1 && c%2==1) {
| ~^~
| | |
| | int
| std::vector<int>
In file included from /usr/include/c++/14/valarray:605,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166,
from a.cc:1:
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom1, class _Dom2> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Expr, std::_Expr, _Dom1, _Dom2>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const _Expr<_Dom1, typename _Dom1::value_type>&, const _Expr<_Dom2, typename _Dom2::value_type>&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:8:10: note: 'std::vector<int>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
8 | if(a%2==1 && b%2==1 && c%2==1) {
| ^
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Expr, std::_Constant, _Dom, typename _Dom::value_type>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const _Expr<_Dom1, typename _Dom1::value_type>&, const typename _Dom::value_type&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:8:10: note: 'std::vector<int>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
8 | if(a%2==1 && b%2==1 && c%2==1) {
| ^
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Constant, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const typename _Dom::value_type&, const _Expr<_Dom1, typename _Dom1::value_type>&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:8:10: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int'
8 | if(a%2==1 && b%2==1 && c%2==1) {
| ^
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Expr, std::_ValArray, _Dom, typename _Dom::value_type>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const _Expr<_Dom1, typename _Dom1::value_type>&, const valarray<typename _Dom::value_type>&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:8:10: note: 'std::vector<int>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
8 | if(a%2==1 && b%2==1 && c%2==1) {
| ^
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_ValArray, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const valarray<typename _Dom::value_type>&, const _Expr<_Dom1, typename _Dom1::value_type>&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:8:10: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int'
8 | if(a%2==1 && b%2==1 && c%2==1) {
| ^
/usr/include/c++/14/valarray:1200:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_ValArray, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__modulus, _Tp>::result_type> std::operator%(const valarray<_Tp>&, const valarray<_Tp>&)'
1200 | _DEFINE_BINARY_OPERATOR(%, __modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1200:1: note: template argument deduction/substitution failed:
a.cc:8:10: note: 'std::vector<int>' is not derived from 'const std::valarray<_Tp>'
8 | if(a%2==1 && b%2==1 && c%2==1) {
| ^
/usr/include/c++/14/valarray:1200:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_ValArray, std::_Constant, _Tp, _Tp>, typename std::__fun<std::__modulus, _Tp>::result_type> std::operator%(const valarray<_Tp>&, const typename valarray<_Tp>::value_type&)'
1200 | _DEFINE_BINARY_OPERATOR(%, __modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1200:1: note: template argument deduction/substitution failed:
a.cc:8:10: note: 'std::vector<int>' is not derived from 'const std::valarray<_Tp>'
8 | if(a%2==1 && b%2==1 && c%2==1) {
| ^
/usr/include/c++/14/valarray:1200:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Constant, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__modulus, _Tp>::result_type> std::operator%(const typename valarray<_Tp>::value_type&, const valarray<_Tp>&)'
1200 | _DEFINE_BINARY_OPERATOR(%, __modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1200:1: note: template argument deduction/substitution failed:
a.cc:8:10: note: mismatched types 'const std::valarray<_Tp>' and 'int'
8 | if(a%2==1 && b%2==1 && c%2==1) {
| ^
a.cc:8:18: error: 'b' was not declared in this scope
8 | if(a%2==1 && b%2==1 && c%2==1) {
| ^
a.cc:8:28: error: 'c' was not declared in this scope
8 | if(a%2==1 && b%2==1 && c%2==1) {
| ^
|
s178664345
|
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(A*B, B*C, C*A) << endl;
}
}
|
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = long long int; _Compare = long long int]':
a.cc:10:20: required from here
10 | 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))
| ~~~~~~^~~~~~~~~~
|
s841757593
|
p04005
|
C++
|
#include<iostream>
using namespace std;
int main(){
long a,b,c;cin>>a>>b>>c;
if(a%2==b%2==c%2==0)cout<<0<<endl;
else cout<<min({a*b,b*c,c*a});
}
|
a.cc: In function 'int main()':
a.cc:6:17: error: no matching function for call to 'min(<brace-enclosed initializer list>)'
6 | else cout<<min({a*b,b*c,c*a});
| ~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
233 | min(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
281 | min(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate expects 3 arguments, 1 provided
|
s098828108
|
p04005
|
C++
|
#include <bits/stdc++.h>
#define int long long
#define pb push_back
#define l first
#define r second
using namespace std;
const int maxn = 2e5 + 1;
signed main() {
ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
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, b * c, a * c);
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:19:20: required from here
19 | cout << min(a * b, b * c, a * c);
| ~~~^~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function
284 | if (__comp(__b, __a))
| ~~~~~~^~~~~~~~~~
|
s201261476
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(){
long long int a , b , c; cin >> a >> b >> c;
if( a % 2 == 0 || b % 2 == 0 || c % 2 == 0 ) { cout << 0 << endl; return 0; }
int min=1000000000;
int diff = ( a - a / 2 ) * b * c - a / 2 * b * c;
if( min > diff ) min = diff;
diff = a * ( b - b / 2 ) * c - a * ( b / 2 ) * c;
if( min > diff ) min = diff;
diff = a * b * ( c - c / 2 ) - a * b * ( c / 2 );
if( min > diff ) min = diff;
cout << min << endl;
|
a.cc: In function 'int main()':
a.cc:13:21: error: expected '}' at end of input
13 | cout << min << endl;
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s695046360
|
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; return 0; }
int min=2000000000;
int block;
int block = a / 2 * b * c;
int diff;
int diff = ( a / 2 + 1) * b * c - block;
if( min > diff ) min = diff;
block = a * b / 2 * c;
diff = a * ( b / 2 + 1 ) * c - block;
if( min > diff ) min = diff;
block = a * b * c / 2;
diff = a * b * ( c / 2 + 1) - block;
if( min > diff ) min = diff;
cout << min << endl;
}
|
a.cc: In function 'int main()':
a.cc:9:13: error: redeclaration of 'int block'
9 | int block = a / 2 * b * c;
| ^~~~~
a.cc:8:13: note: 'int block' previously declared here
8 | int block;
| ^~~~~
a.cc:11:13: error: redeclaration of 'int diff'
11 | int diff = ( a / 2 + 1) * b * c - block;
| ^~~~
a.cc:10:13: note: 'int diff' previously declared here
10 | int diff;
| ^~~~
|
s590877753
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(){
long long int a,b,c;
cin>>a>>b>>c;
long long int ab,abc,ans;
ab=a*b;
abc=a*b*c;
ans=abc-(ab*(c/2)*2);
cout<<ans<<endl;
return 0;
|
a.cc: In function 'int main()':
a.cc:15:12: error: expected '}' at end of input
15 | return 0;
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s299716280
|
p04005
|
C++
|
5 3 5
|
a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 5 3 5
| ^
|
s182757282
|
p04005
|
C++
|
#include <bits/stdc++.h>
#include <math.h>
#define rep(i, n) for(int i = 0; i < n; ++i)
using namespace std;
int main() {
int64_t a, b, c;
cin >> a >> b >> c;
if(a % 2 == 1 && b % 2 == 1 && c % 2 == 1){
vector<int64_t> v;
v.push_back(a); v.push_back(b); v.push_back(c);
sort(v.begin(), b.end());
cout << v[0] * v[1] << endl;
}
else cout << 0 << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:12:23: error: request for member 'end' in 'b', which is of non-class type 'int64_t' {aka 'long int'}
12 | sort(v.begin(), b.end());
| ^~~
|
s167672564
|
p04005
|
C++
|
#include <bits/stdc++.h>
#include <math.h>
#define rep(i, n) for(int i = 0; i < n; ++i)
using namespace std;
int main() {
int64_t a, b, c;
cin >> a >> b >> c;
if(a % 2 == 1 && b % 2 == 1 && c % 2 == 1){
vector<int64_t> v = {a, b, c};
sort(v.begin(), b.end());
cout << v[0] * v[1] << endl;
}
else cout << 0 << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:11:23: error: request for member 'end' in 'b', which is of non-class type 'int64_t' {aka 'long int'}
11 | sort(v.begin(), b.end());
| ^~~
|
s809103144
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main()
{
array<long, 3> Edge; //3辺を入れる配列
long result = 0;
bool odd = true;
cin >> Edge[0] >> Edge[1] >> Edge[2]; //配列に入力
//配列のサイズ分forして、偶数があったらoddにfalseを入れる。
for (int i : Edge)
{
if (i % 2 == 0)
{
odd = false;
}
}
//奇数だったら、小さい順にソートして上から1,2の積を変数に代入
if (odd)
{
// sort(Edge.begin(), Edge.end());
result = min({Edge[0] * Edge[1], Edge[1] * Edge[2], Edge[2] * Edge[0]});
}
//出力。偶数の場合は、宣言する際に0を代入しているのでそのままで良い
cout << result << endl;
return 0;
|
a.cc: In function 'int main()':
a.cc:31:14: error: expected '}' at end of input
31 | return 0;
| ^
a.cc:5:1: note: to match this '{'
5 | {
| ^
|
s482115579
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main()
{
const int n = 3;
int result = 0;
array<int, n> Edge;
cin >> Edge[0] >> Edge[1] >> Edge[2];
bool result = true;
for (int i = 0; i < n; i++)
{
if (Edge[i] % 2 == 0)
{
result = false;
}
}
if (result)
{
sort(Edge.begin(), Edge.end());
result = Edge[0] * Edge[1];
}
else
{
result = 0;
}
cout << result << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:11:10: error: conflicting declaration 'bool result'
11 | bool result = true;
| ^~~~~~
a.cc:7:9: note: previous declaration as 'int result'
7 | int result = 0;
| ^~~~~~
|
s133342702
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namespace std;
using Int = long long;
#define PUTS(x) cout << (x) << endl;
vector<Int> IntsIn(int n) {
auto v = vector<Int>(0);
for (int i = 0; i < n; i++) {
Int a;
cin >> a;
v.push_back(a);
}
return v;
}
int main() {
auto v = IntsIn(3);
auto ans = 0;
if (v[0] * v[1] * v[2] % 2 != 0) {
ans = Min(v[0] * v[1], v[1] * v[2], v[2] * v[0]);
}
PUTS(ans);
}
|
a.cc: In function 'int main()':
a.cc:19:15: error: 'Min' was not declared in this scope; did you mean 'sin'?
19 | ans = Min(v[0] * v[1], v[1] * v[2], v[2] * v[0]);
| ^~~
| sin
|
s651114974
|
p04005
|
C++
|
#include <iostream>
#include <algorithm>
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 {
ll mid = a+b+c-max({a,b,c})-min({a,b,c});
cout << min({a,b,c}) * mid << endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:10:5: error: 'll' was not declared in this scope
10 | ll mid = a+b+c-max({a,b,c})-min({a,b,c});
| ^~
a.cc:10:31: error: expected primary-expression before ')' token
10 | ll mid = a+b+c-max({a,b,c})-min({a,b,c});
| ^
a.cc:10:44: error: expected primary-expression before ')' token
10 | ll mid = a+b+c-max({a,b,c})-min({a,b,c});
| ^
a.cc:11:28: error: 'mid' was not declared in this scope
11 | cout << min({a,b,c}) * mid << endl;
| ^~~
|
s998313718
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namesace std;
int main(){
long long arr[3];
cin>>arr[0]>>arr[1]>>arr[2];
sort(arr,arr+3);
if( (arr[0]&1) && (arr[1]&1) && (arr[2]&1)){
cout<<arr[0]*arr[1]<<endl;
}
else cout<<"0\n";
return 0;
}
|
a.cc:2:7: error: expected nested-name-specifier before 'namesace'
2 | using namesace std;
| ^~~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | cin>>arr[0]>>arr[1]>>arr[2];
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:7:3: error: 'sort' was not declared in this scope; did you mean 'std::sort'?
7 | sort(arr,arr+3);
| ^~~~
| std::sort
In file included from /usr/include/c++/14/algorithm:86,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: 'std::sort' declared here
296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
| ^~~~
a.cc:9:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
9 | cout<<arr[0]*arr[1]<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:9:30: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
9 | cout<<arr[0]*arr[1]<<endl;
| ^~~~
| std::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:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:12:8: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
12 | else cout<<"0\n";
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
|
s914307221
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namesace std;
int main(){
int arr[3];
cin>>arr[0]>>arr[1]>>arr[2];
sort(arr,arr+3);
if( (arr[0]&1) && (arr[1]&1) && (arr[2]&1)){
cout<<arr[0]*arr[1]<<endl;
}
else cout<<"0\n";
return 0;
}
|
a.cc:2:7: error: expected nested-name-specifier before 'namesace'
2 | using namesace std;
| ^~~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | cin>>arr[0]>>arr[1]>>arr[2];
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:7:3: error: 'sort' was not declared in this scope; did you mean 'std::sort'?
7 | sort(arr,arr+3);
| ^~~~
| std::sort
In file included from /usr/include/c++/14/algorithm:86,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: 'std::sort' declared here
296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
| ^~~~
a.cc:9:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
9 | cout<<arr[0]*arr[1]<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:9:30: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
9 | cout<<arr[0]*arr[1]<<endl;
| ^~~~
| std::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:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:12:8: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
12 | else cout<<"0\n";
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
|
s023246939
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main () {
int A, B, C;
int A = 2, B =2, C=4;
cout << A*B*C-A*A*A-B*B*B << endl;
}
|
a.cc: In function 'int main()':
a.cc:6:7: error: redeclaration of 'int A'
6 | int A = 2, B =2, C=4;
| ^
a.cc:5:7: note: 'int A' previously declared here
5 | int A, B, C;
| ^
a.cc:6:14: error: redeclaration of 'int B'
6 | int A = 2, B =2, C=4;
| ^
a.cc:5:10: note: 'int B' previously declared here
5 | int A, B, C;
| ^
a.cc:6:20: error: redeclaration of 'int C'
6 | int A = 2, B =2, C=4;
| ^
a.cc:5:13: note: 'int C' previously declared here
5 | int A, B, C;
| ^
|
s267116906
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main () {
int A, B, C;
int A = 2, B =2, C=4;
cout << A*B*C-A*A*A-B*B*B << endl;
}
|
a.cc: In function 'int main()':
a.cc:6:7: error: redeclaration of 'int A'
6 | int A = 2, B =2, C=4;
| ^
a.cc:5:7: note: 'int A' previously declared here
5 | int A, B, C;
| ^
a.cc:6:14: error: redeclaration of 'int B'
6 | int A = 2, B =2, C=4;
| ^
a.cc:5:10: note: 'int B' previously declared here
5 | int A, B, C;
| ^
a.cc:6:20: error: redeclaration of 'int C'
6 | int A = 2, B =2, C=4;
| ^
a.cc:5:13: note: 'int C' previously declared here
5 | int A, B, C;
| ^
|
s642034927
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main () {
int = A, B, C;
cin >> A >> B >> C;
cout << A*B*C-A*A*A-B*B*B << endl;
}
|
a.cc: In function 'int main()':
a.cc:5:7: error: expected unqualified-id before '=' token
5 | int = A, B, C;
| ^
a.cc:6:10: error: 'A' was not declared in this scope
6 | cin >> A >> B >> C;
| ^
a.cc:6: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;
| ^
|
s218715147
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main () {
int = A, B, C;
cin >> A, B, C;
cout << A*B*C-A*A*A-B*B*B << endl;
}
|
a.cc: In function 'int main()':
a.cc:5:7: error: expected unqualified-id before '=' token
5 | int = A, B, C;
| ^
a.cc:6:10: error: 'A' was not declared in this scope
6 | cin >> A, B, C;
| ^
a.cc:6:13: error: 'B' was not declared in this scope
6 | cin >> A, B, C;
| ^
a.cc:6:16: error: 'C' was not declared in this scope
6 | cin >> A, B, C;
| ^
|
s646494706
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namespace std;
#define int long long
int ans(int l,int b,int h){
if (l%2==0 || b%2==0 || h%2==0){
return(0);
}
if(l%2==1 & b%2==1 & h%2==1){
int multi[3];
int lb = l*b;
int bh = b*h;
int lh = l*h;
multi[0] = lb;
multi[1] = bh;
multi[2] = lh;
int k = sizeof(multi)/sizeof(multi[0]);
sort(multi, multi+k);
return(multi[0]);
}
}
int main(){
int a,b,c;
cin >> a;
cin >> b;
cin >> c;
cout << ans(a,b,c);
}
|
cc1plus: error: '::main' must return 'int'
a.cc: In function 'long long int ans(long long int, long long int, long long int)':
a.cc:22:1: warning: control reaches end of non-void function [-Wreturn-type]
22 | }
| ^
|
s667399315
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namespace std;
#define int long long
int ans(int l,int b,int h){
if (l%2==0 || b%2==0 || h%2==0){
return(0);
}
if(l%2==1 & b%2==1 & h%2==1){
int multi[3];
int lb = l*b;
int bh = b*h;
int lh = l*h;
multi[0] = lb;
multi[1] = bh;
multi[2] = lh;
int k = sizeof(multi)/sizeof(multi[0]);
sort(multi, multi+k);
return(multi[0]);
}
}
int main(){
int a,b,c;
cin >> a;
cin >> b;
cin >> c;
cout << ans(a,b,c);
}
|
cc1plus: error: '::main' must return 'int'
a.cc: In function 'long long int ans(long long int, long long int, long long int)':
a.cc:20:1: warning: control reaches end of non-void function [-Wreturn-type]
20 | }
| ^
|
s041859539
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namespace std;
#define int long long
int ans(int l,int b,int h){
if (l%2==0 || b%2==0 || h%2==0){
return(0);
}
if(l%2==1 & b%2==1 & h%2==1){
int multi[3];
int lb = l*b;
int bh = b*h;
int lh = l*h;
multi[0] = lb;
multi[1] = bh;
multi[2] = lh;
sort(multi, multi+k);
return(multi[0]);
}
}
signed main(){
int a,b,c;
cin >> a;
cin >> b;
cin >> c;
cout << ans(a,b,c);
}
|
a.cc: In function 'long long int ans(long long int, long long int, long long int)':
a.cc:18:27: error: 'k' was not declared in this scope
18 | sort(multi, multi+k);
| ^
a.cc:21:1: warning: control reaches end of non-void function [-Wreturn-type]
21 | }
| ^
|
s491967797
|
p04005
|
Java
|
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int A = sc.nextInt();
int B = sc.nextInt();
int C = sc.nextInt();
if (A%2 == 0 || B%2 == 0 || C%2 ==0) {
System.out.println(0);
return;
}
System.out.println(Math.min(Math.min((long) A*B, (long) B*C, (long) C*A)));
}
}
|
Main.java:14: error: no suitable method found for min(long,long,long)
System.out.println(Math.min(Math.min((long) A*B, (long) B*C, (long) C*A)));
^
method Math.min(int,int) is not applicable
(actual and formal argument lists differ in length)
method Math.min(long,long) is not applicable
(actual and formal argument lists differ in length)
method Math.min(float,float) is not applicable
(actual and formal argument lists differ in length)
method Math.min(double,double) is not applicable
(actual and formal argument lists differ in length)
1 error
|
s317157317
|
p04005
|
C++
|
#include <bits/stdc++.h>
#include <algorithm>
using namespace std;
int main() {
long long int a,b,c;
cin >> a>>b>>c;
long long int d =(a%2)*(b%2)*(c%2)*min(a*b,c*b,a*c);
cout << d << 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:9:41: required from here
9 | long long int d =(a%2)*(b%2)*(c%2)*min(a*b,c*b,a*c);
| ~~~^~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function
284 | if (__comp(__b, __a))
| ~~~~~~^~~~~~~~~~
|
s382779871
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int a, b, c;
int res[3];
int solve() {
if (a%2==0 || b%2==0 || c%2==0) return 0;
else {
res[3] = {a, b, c};
sort (res.begin(), res.end());
return res[0]*res[1];
}
int main() {
cin >> a >> b >> c;
cout << res << endl;
}
|
a.cc: In function 'int solve()':
a.cc:8:22: error: cannot convert '<brace-enclosed initializer list>' to 'int' in assignment
8 | res[3] = {a, b, c};
| ^
a.cc:9:15: error: request for member 'begin' in 'res', which is of non-class type 'int [3]'
9 | sort (res.begin(), res.end());
| ^~~~~
a.cc:9:28: error: request for member 'end' in 'res', which is of non-class type 'int [3]'
9 | sort (res.begin(), res.end());
| ^~~
a.cc:12:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
12 | int main() {
| ^~
a.cc:12:9: note: remove parentheses to default-initialize a variable
12 | int main() {
| ^~
| --
a.cc:12:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:12:12: error: a function-definition is not allowed here before '{' token
12 | int main() {
| ^
a.cc:15:2: error: expected '}' at end of input
15 | }
| ^
a.cc:5:13: note: to match this '{'
5 | int solve() {
| ^
|
s755403506
|
p04005
|
C++
|
#include <iostream>
#include <algorithm>
using namespace std;
#define rep(i,n) for(ll i=0;i<n;i++)
int main(){
ll A[3];
int cnt = 0;
rep(i,3){
cin >> A[i];
if (A[i] % 2 == 0) cnt++;
}
sort(A,A+3);
//cout << A[0] << endl;
if (cnt){
cout << 0 << endl;
return 0;
}
if (!cnt){
//cout << 1 << endl;
cout << A[0] * A[1] << endl;
return 0;
}
}
|
a.cc: In function 'int main()':
a.cc:8:5: error: 'll' was not declared in this scope
8 | ll A[3];
| ^~
a.cc:10:9: error: expected ';' before 'i'
10 | rep(i,3){
| ^
a.cc:5:25: note: in definition of macro 'rep'
5 | #define rep(i,n) for(ll i=0;i<n;i++)
| ^
a.cc:10:9: error: 'i' was not declared in this scope
10 | rep(i,3){
| ^
a.cc:5:29: note: in definition of macro 'rep'
5 | #define rep(i,n) for(ll i=0;i<n;i++)
| ^
a.cc:11:16: error: 'A' was not declared in this scope
11 | cin >> A[i];
| ^
a.cc:14:10: error: 'A' was not declared in this scope
14 | sort(A,A+3);
| ^
|
s471035641
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namespace std;
double a , b , c , z;
int main()
{
cin >> a >> b >> c;
if (a % 2 == 0 || b % 2 == 0 || c % 2 == 0){
cout << 0;
return 0;
}
z = a * b * c / max({a , b , c});
cout << z;
}
|
a.cc: In function 'int main()':
a.cc:10:15: error: invalid operands of types 'double' and 'int' to binary 'operator%'
10 | if (a % 2 == 0 || b % 2 == 0 || c % 2 == 0){
| ~ ^ ~
| | |
| | int
| double
a.cc:10:29: error: invalid operands of types 'double' and 'int' to binary 'operator%'
10 | if (a % 2 == 0 || b % 2 == 0 || c % 2 == 0){
| ~ ^ ~
| | |
| | int
| double
a.cc:10:43: error: invalid operands of types 'double' and 'int' to binary 'operator%'
10 | if (a % 2 == 0 || b % 2 == 0 || c % 2 == 0){
| ~ ^ ~
| | |
| | int
| double
|
s722257813
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namespace std;
long long a , b , c , z;
int main()
{
cin >> a >> b >> c;
if (a % 2 == 0 || b % 2 == 0 || c % 2 == 0){
cout << 0;
return 0;
}
z = a * b * c / max( a , max(b , c))
cout << z;
}
|
a.cc: In function 'int main()':
a.cc:14:45: error: expected ';' before 'cout'
14 | z = a * b * c / max( a , max(b , c))
| ^
| ;
15 | cout << z;
| ~~~~
|
s826535611
|
p04005
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int a , b , c , x , ans1 = 0 , ans2 = 0;
int main()
{
cin >> a >> b >> c;
if (a % 2 == 0 || b % 2 == 0 || c % 2 == 0){
cout << 0;
retutn 0;
}
x = max(a , max(b , c)) / 2;
if(a == max(a , max(b , c))){
ans1 += x * b * c;
ans2 += (x+1) * b * c;
}
else if(b == max(a , max(b , c))){
ans1 += x * a * c;
ans2 += (x+1) * a * c;
}
else if(c == max(a , max(b , c))){
ans1 += x * a * b;
ans2 += (x+1) * a * b;
}
cout << abs(ans1 , abs2);
}
|
a.cc: In function 'int main()':
a.cc:12:17: error: 'retutn' was not declared in this scope
12 | retutn 0;
| ^~~~~~
a.cc:28:28: error: 'abs2' was not declared in this scope; did you mean 'ans2'?
28 | cout << abs(ans1 , abs2);
| ^~~~
| ans2
|
s324698676
|
p04005
|
C++
|
#inclede<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
cout<<a*b*c<<endl;
return 0;
}
|
a.cc:1:2: error: invalid preprocessing directive #inclede; did you mean #include?
1 | #inclede<bits/stdc++.h>
| ^~~~~~~
| include
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope
5 | cin>>a>>b>>c;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | #inclede<bits/stdc++.h>
a.cc:6:5: error: 'cout' was not declared in this scope
6 | cout<<a*b*c<<endl;
| ^~~~
a.cc:6:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:6:18: error: 'endl' was not declared in this scope
6 | cout<<a*b*c<<endl;
| ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
+++ |+#include <ostream>
1 | #inclede<bits/stdc++.h>
|
s198602716
|
p04005
|
C++
|
#inclede<bits/stdc++.h>
using namespace sdt;
int main(){
int a,b,c;
cin>>a>>b>>c;
cout<<a*b*c<<endl;
return 0;
}
|
a.cc:1:2: error: invalid preprocessing directive #inclede; did you mean #include?
1 | #inclede<bits/stdc++.h>
| ^~~~~~~
| include
a.cc:2:17: error: 'sdt' is not a namespace-name
2 | using namespace sdt;
| ^~~
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope
5 | cin>>a>>b>>c;
| ^~~
a.cc:6:5: error: 'cout' was not declared in this scope
6 | cout<<a*b*c<<endl;
| ^~~~
a.cc:6:18: error: 'endl' was not declared in this scope
6 | cout<<a*b*c<<endl;
| ^~~~
|
s198856814
|
p04005
|
C++
|
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define fo(a,b) for(int a=0;a<b;a++)
#define Sort(a) sort(a.begin(),a.end())
#define rev(a) reverse(a.begin(),a.end())
#define fi first
#define se second
#define co(a) cout<<a<<endl
#define sz size()
#define bgn begin()
#define en end()
#define pb(a) push_back(a)
#define pp() pop_back()
#define V vector
#define P pair
#define V2(a,b,c) V<V<int>> a(b,V<int>(c))
#define V2a(a,b,c,d) V<V<int>> a(b,V<int>(c,d))
#define incin(a) int a; cin>>a
#define yuko(a) setprecision(a)
#define uni(a) a.erase(unique(a.begin(),a.end()),a.end())
//#define min min<int>
//#define max max<int>
template<class T>
void cou(vector<vector<T>> a){
int b=a.size();
int c=a[0].size();
fo(i,b){
fo(j,c){
cout<<a[i][j];
if(j==c-1)
cout<<endl;
else
cout<<' ';
}
}
}
/*template<>
void cou(vector<vector<char>> a){
int b=a.size();
int c=a[0].size();
fo(i,b){
fo(j,c){
cout<<a[i][j];
if(j==c-1)
cout<<endl;
else
cout<<' ';
}
}
}*/
int wari(int a,int b) {
if(a%b==0)
return a/b;
else
return a/b+1;
}
int keta(int a){
double b=a;
b=log10(b);
int c=b;
return c+1;
}
int souwa(int a){
return a*(a+1)/2;
}
/*int lcm(int a,int b){
int d=a,e=b,f;
if(a<b)
swap(a,b);
int c,m=1;
while(m){
c=a%b;
if(c==0){
f=b;
m--;
}
else{
a=b;
b=c;
}
}
return d*e/f;
}
*/ int gcm(int a,int b){
int d=a,e=b,f;
if(a<b)
swap(a,b);
int c,m=1;
while(m){
c=a%b;
if(c==0){
f=b;
m--;
}
else{
a=b;
b=c;
}
}
return f;
}/*
/*bool prime(int a){
if(a<2)
return false;
else if(a==2)
return true;
else if(a%2==0)
return false;
double b=sqrt(a);
for(int i=3;i<=b;i+=2){
if(a%i==0){
return false;
}
}
return true;
}*/
bool prime(const unsigned long long n){
switch(n){
case 0: // fall-through
case 1: return false;
case 2: // fall-through
case 3: return true;
} // n > 3 が保証された
if(n%2 == 0) return false;
if(n%3 == 0) return false;
// 2と3の倍数でないので6の倍数ではないことが保証された
if(n%6 != 1 && n%6 != 5) return false;
// 6の倍数前後の数(素数かもしれない数)であることが保証された
// 6の倍数前後の数を使って試し割りをする
for(unsigned long long i=5;i*i<=n;i+=6){
if(n%i == 0) return false; // 6n-1
if(n%(i+2) == 0) return false; // 6n+1
}
return true;
}
struct Union{
vector<int> par;
Union(int a){
par= vector<int>(a,-1);
}
int find(int a){
if(par[a]<0)
return a;
else
return par[a]=find(par[a]);
}
bool same(int a,int b){
return find(a)==find(b);
}
int Size(int a){
return -par[find(a)];
}
void unite(int a,int b){
a=find(a);
b=find(b);
if(a==b)
return;
if(Size(b)>Size(a))
swap<int>(a,b);
par[a]+=par[b];
par[b]=a;
}
};
int ketas(int a){
string b=to_string(a);
int c=0;
fo(i,keta(a)){
c+=b[i]-'0';
}
return c;
}
/*int gcm(int a,int b){
if(b==0)
return a;
return gcm(b,a%b);
}*/
int lcm(int a,int b){
return a/gcm(a,b)*b;
}
/*struct aa{
vector<int> gt;
aa(int n){
gt= vector<int>(n, 1);
}
void c(V<int> d,int b){
if(d[b]==0){
gt[d[b]-1]++;
gt[gt.sz-1]++;
}
else{
gt[d[b]-1]++;
c(d,d[d[b]]-1);
}
}
void cok(int a){
cout<<gt[a-1]<<endl;
fo(i,a-1)
cout<<gt[i]<<endl;
}
};
*/
/*struct dfs(){
}*/
bool fe(int a,int b){
a%=10;
b%=10;
if(a==0)
a=10;
if(b==0)
b=10;
if(a>b)
return true;
else
return false;
}
signed main(){
V<int> a(3);
cin>>a[0]>>a[1]>>a[2];
Sort(a);
if(a[0]%2==1&&a[1]%2==1&&a[2]%2==1&&)
cout<<a[0]*a[1]<<endl;
else
cout<<0<<endl;
}
|
a.cc: In function 'int main()':
a.cc:226:39: error: expected primary-expression before ')' token
226 | if(a[0]%2==1&&a[1]%2==1&&a[2]%2==1&&)
| ^
|
s600770914
|
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 if {
int ans;
ans = min (a*c, min (a*b, b*c));
cout << ans << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:9:3: error: 'else' without a previous 'if'
9 | else if {
| ^~~~
a.cc:9:11: error: expected '(' before '{' token
9 | else if {
| ^
| (
|
s835330560
|
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;
if else {
int ans;
ans = min (a*c, min (a*b, b*c));
cout << ans << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:9:6: error: expected '(' before 'else'
9 | if else {
| ^~~~
| (
|
s885509223
|
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;
if else {
int ans;
ans = min (a*c, min (a*b, b*c));
cout << ans << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:9:6: error: expected '(' before 'else'
9 | if else {
| ^~~~
| (
|
s936395810
|
p04005
|
C++
|
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
#define all(X) (X).begin(), (X).end()
#define cmp_all(X) (X).begin(), (X).end(), cmp
#define B begin()
#define E end()
#define sz size()
#define skip continue
#define ppi pair<pair<int, int>, int>
#define pii pair<int, int>
#define pli pair<ll, int>
#define pcc pair<char, char>
#define F first
#define S second
using namespace std;
const int maxn = 1e7 + 17;
const int MAXN = maxn * 4;
const int darr = 1e3 + 17;
const ll INF = 1e17 + 5;
const int mod = 1e9 + 7;
void Need_For_Speed () {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
}
int a, b, c;
int main () {
Need_For_Speed();
cin >> a >> b >> c;
if (a % 2 == 0 || b % 2 == 0 || c % 2 == 0) {
cout << 0;
return 0;
}
cout << min(a * b, b * c, a * c);
return 0;
}
|
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:46:13: required from here
46 | cout << min(a * b, b * c, a * c);
| ~~~^~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function
284 | if (__comp(__b, __a))
| ~~~~~~^~~~~~~~~~
|
s453724424
|
p04005
|
C++
|
#include<iostream>
using namespace std;
long long a[10000];
int main(){
cin>>a[0]>>a[1]>>a[2];
sort(a,a+3);
cout<<((a[0]&1&a[1]&1&a[2]&1)?a[0]*a[1]:0)<<endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:6:5: error: 'sort' was not declared in this scope; did you mean 'short'?
6 | sort(a,a+3);
| ^~~~
| short
|
s524130136
|
p04005
|
C++
|
#include<iostream>
#include<algorithm>
long long a[3];
int main(){
std::cin>>a[0]>>a[1]>>a[2];
sort(a,a+3);
std::cout<<((a[0]&1&a[1]&1&a[2]&1)?a[0]*a[1]:0)<<endl;
}
|
a.cc: In function 'int main()':
a.cc:6:5: error: 'sort' was not declared in this scope; did you mean 'std::sort'?
6 | sort(a,a+3);
| ^~~~
| std::sort
In file included from /usr/include/c++/14/algorithm:86,
from a.cc:2:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: 'std::sort' declared here
296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
| ^~~~
a.cc:7:54: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
7 | std::cout<<((a[0]&1&a[1]&1&a[2]&1)?a[0]*a[1]:0)<<endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s047908202
|
p04005
|
C++
|
#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<bitset>
#include<set>
#include<map>
#include<stack>
#include<queue>
#include<deque>
#include<list>
#include<iomanip>
#include<cmath>
#include<cstring>
using namespace std;
#define repr(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define rep(i, n) repr(i, 0, n)
#define INF 2e9
#define MOD 1000000007
//#define MOD 998244353
#define LINF (long long)4e18
#define jck 3.141592
using ll = long long;
using Pi = pair<int,int>;
using Pl = pair<ll,ll>;
int main(){
ll A,B,C; cin >> A >> B >> C;
ll ans = 0;
if(A % 2 == 0 || B % 2 == 0 || C % 2 == 0) ans = 0;
else ans = min(A*B,B*C,C*A);
cout << ans << 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:34:16: required from here
34 | else 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))
| ~~~~~~^~~~~~~~~~
|
s268190538
|
p04005
|
C++
|
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <cstdio>
#include <math.h>
#include <set>
#include <map>
#include <queue>
#include <string>
#include <string.h>
#include <bitset>
#define REP(i,a,n) for(int i=a;i<=n;++i)
#define PER(i,a,n) for(int i=n;i>=a;--i)
#define hr putchar(10)
#define pb push_back
#define lc (o<<1)
#define rc (lc|1)
#define mid ((l+r)>>1)
#define ls lc,l,mid
#define rs rc,mid+1,r
#define x first
#define y second
#define io std::ios::sync_with_stdio(false)
#define endl '\n'
#define DB(a) ({REP(__i,1,n) cout<<a[__i]<<' ';hr;})
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
const int P = 1e9+7, INF = 0x3f3f3f3f;
ll gcd(ll a,ll b) {return b?gcd(b,a%b):a;}
ll qpow(ll a,ll n) {ll r=1%P;for (a%=P;n;a=a*a%P,n>>=1)if(n&1)r=r*a%P;return r;}
ll inv(ll x){return x<=1?1:inv(P%x)*(P-P/x)%P;}
inline int rd() {int x=0;char p=getchar();while(p<'0'||p>'9')p=getchar();while(p>='0'&&p<='9')x=x*10+p-'0',p=getchar();return x;}
//head
#ifdef ONLINE_JUDGE
const int N = 1e6+10;
#else
const int N = 111;
#endif
// base and base_digits must be consistent
constexpr int base = 1000000000;
constexpr int base_digits = 9;
struct bigint {
// value == 0 is represented by empty z
vector<int> z; // digits
// sign == 1 <==> value >= 0
// sign == -1 <==> value < 0
int sign;
bigint() : sign(1) {}
bigint(long long v) { *this = v; }
bigint &operator=(long long v) {
sign = v < 0 ? -1 : 1; v *= sign;
z.clear(); for (; v > 0; v = v / base) z.push_back((int) (v % base));
return *this;
}
bigint(const string &s) { read(s); }
bigint &operator+=(const bigint &other) {
if (sign == other.sign) {
for (int i = 0, carry = 0; i < other.z.size() || carry; ++i) {
if (i == z.size())
z.push_back(0);
z[i] += carry + (i < other.z.size() ? other.z[i] : 0);
carry = z[i] >= base;
if (carry)
z[i] -= base;
}
} else if (other != 0 /* prevent infinite loop */) {
*this -= -other;
}
return *this;
}
friend bigint operator+(bigint a, const bigint &b) { return a += b; }
bigint &operator-=(const bigint &other) {
if (sign == other.sign) {
if (sign == 1 && *this >= other || sign == -1 && *this <= other) {
for (int i = 0, carry = 0; i < other.z.size() || carry; ++i) {
z[i] -= carry + (i < other.z.size() ? other.z[i] : 0);
carry = z[i] < 0;
if (carry)
z[i] += base;
}
trim();
} else {
*this = other - *this;
this->sign = -this->sign;
}
} else {
*this += -other;
}
return *this;
}
friend bigint operator-(bigint a, const bigint &b) { return a -= b; }
bigint &operator*=(int v) {
if (v < 0) sign = -sign, v = -v;
for (int i = 0, carry = 0; i < z.size() || carry; ++i) {
if (i == z.size())
z.push_back(0);
long long cur = (long long) z[i] * v + carry;
carry = (int) (cur / base);
z[i] = (int) (cur % base);
}
trim();
return *this;
}
bigint operator*(int v) const { return bigint(*this) *= v; }
friend pair<bigint, bigint> divmod(const bigint &a1, const bigint &b1) {
int norm = base / (b1.z.back() + 1);
bigint a = a1.abs() * norm;
bigint b = b1.abs() * norm;
bigint q, r;
q.z.resize(a.z.size());
for (int i = (int) a.z.size() - 1; i >= 0; i--) {
r *= base;
r += a.z[i];
int s1 = b.z.size() < r.z.size() ? r.z[b.z.size()] : 0;
int s2 = b.z.size() - 1 < r.z.size() ? r.z[b.z.size() - 1] : 0;
int d = (int) (((long long) s1 * base + s2) / b.z.back());
r -= b * d;
while (r < 0)
r += b, --d;
q.z[i] = d;
}
q.sign = a1.sign * b1.sign;
r.sign = a1.sign;
q.trim();
r.trim();
return {q, r / norm};
}
friend bigint sqrt(const bigint &a1) {
bigint a = a1;
while (a.z.empty() || a.z.size() % 2 == 1)
a.z.push_back(0);
int n = a.z.size();
int firstDigit = (int) ::sqrt((double) a.z[n - 1] * base + a.z[n - 2]);
int norm = base / (firstDigit + 1);
a *= norm;
a *= norm;
while (a.z.empty() || a.z.size() % 2 == 1)
a.z.push_back(0);
bigint r = (long long) a.z[n - 1] * base + a.z[n - 2];
firstDigit = (int) ::sqrt((double) a.z[n - 1] * base + a.z[n - 2]);
int q = firstDigit;
bigint res;
for (int j = n / 2 - 1; j >= 0; j--) {
for (;; --q) {
bigint r1 = (r - (res * 2 * base + q) * q) * base * base +
(j > 0 ? (long long) a.z[2 * j - 1] * base + a.z[2 * j - 2] : 0);
if (r1 >= 0) {
r = r1;
break;
}
}
res *= base;
res += q;
if (j > 0) {
int d1 = res.z.size() + 2 < r.z.size() ? r.z[res.z.size() + 2] : 0;
int d2 = res.z.size() + 1 < r.z.size() ? r.z[res.z.size() + 1] : 0;
int d3 = res.z.size() < r.z.size() ? r.z[res.z.size()] : 0;
q = (int) (((long long) d1 * base * base + (long long) d2 * base + d3) / (firstDigit * 2));
}
}
res.trim();
return res / norm;
}
bigint operator/(const bigint &v) const { return divmod(*this, v).first; }
bigint operator%(const bigint &v) const { return divmod(*this, v).second; }
bigint &operator/=(int v) {
if (v < 0) sign = -sign, v = -v;
for (int i = (int) z.size() - 1, rem = 0; i >= 0; --i) {
long long cur = z[i] + rem * (long long) base;
z[i] = (int) (cur / v);
rem = (int) (cur % v);
}
trim();
return *this;
}
bigint operator/(int v) const { return bigint(*this) /= v; }
int operator%(int v) const {
if (v < 0) v = -v;
int m = 0;
for (int i = (int) z.size() - 1; i >= 0; --i)
m = (int) ((z[i] + m * (long long) base) % v);
return m * sign;
}
bigint &operator*=(const bigint &v) { return *this = *this * v; }
bigint &operator/=(const bigint &v) { return *this = *this / v; }
bool operator<(const bigint &v) const {
if (sign != v.sign)
return sign < v.sign;
if (z.size() != v.z.size())
return z.size() * sign < v.z.size() * v.sign;
for (int i = (int) z.size() - 1; i >= 0; i--)
if (z[i] != v.z[i])
return z[i] * sign < v.z[i] * sign;
return false;
}
bool operator>(const bigint &v) const { return v < *this; }
bool operator<=(const bigint &v) const { return !(v < *this); }
bool operator>=(const bigint &v) const { return !(*this < v); }
bool operator==(const bigint &v) const { return !(*this < v) && !(v < *this); }
bool operator!=(const bigint &v) const { return *this < v || v < *this; }
void trim() {
while (!z.empty() && z.back() == 0) z.pop_back();
if (z.empty()) sign = 1;
}
bool isZero() const { return z.empty(); }
friend bigint operator-(bigint v) {
if (!v.z.empty()) v.sign = -v.sign;
return v;
}
bigint abs() const {
return sign == 1 ? *this : -*this;
}
long long longValue() const {
long long res = 0;
for (int i = (int) z.size() - 1; i >= 0; i--)
res = res * base + z[i];
return res * sign;
}
friend bigint gcd(const bigint &a, const bigint &b) {
return b.isZero() ? a : gcd(b, a % b);
}
friend bigint lcm(const bigint &a, const bigint &b) {
return a / gcd(a, b) * b;
}
void read(const string &s) {
sign = 1;
z.clear();
int pos = 0;
while (pos < s.size() && (s[pos] == '-' || s[pos] == '+')) {
if (s[pos] == '-')
sign = -sign;
++pos;
}
for (int i = (int) s.size() - 1; i >= pos; i -= base_digits) {
int x = 0;
for (int j = max(pos, i - base_digits + 1); j <= i; j++)
x = x * 10 + s[j] - '0';
z.push_back(x);
}
trim();
}
friend istream &operator>>(istream &stream, bigint &v) {
string s; stream >> s;
v.read(s);
return stream;
}
friend ostream &operator<<(ostream &stream, const bigint &v) {
if (v.sign == -1)
stream << '-';
stream << (v.z.empty() ? 0 : v.z.back());
for (int i = (int) v.z.size() - 2; i >= 0; --i)
stream << setw(base_digits) << setfill('0') << v.z[i];
return stream;
}
static vector<int> convert_base(const vector<int> &a, int old_digits, int new_digits) {
vector<long long> p(max(old_digits, new_digits) + 1);
p[0] = 1;
for (int i = 1; i < p.size(); i++)
p[i] = p[i - 1] * 10;
vector<int> res;
long long cur = 0;
int cur_digits = 0;
for (int v : a) {
cur += v * p[cur_digits];
cur_digits += old_digits;
while (cur_digits >= new_digits) {
res.push_back(int(cur % p[new_digits]));
cur /= p[new_digits];
cur_digits -= new_digits;
}
}
res.push_back((int) cur);
while (!res.empty() && res.back() == 0)
res.pop_back();
return res;
}
typedef vector<long long> vll;
static vll karatsubaMultiply(const vll &a, const vll &b) {
int n = a.size();
vll res(n + n);
if (n <= 32) {
for (int i = 0; i < n; i++)
for (int j = 0; j < n; j++)
res[i + j] += a[i] * b[j];
return res;
}
int k = n >> 1;
vll a1(a.begin(), a.begin() + k);
vll a2(a.begin() + k, a.end());
vll b1(b.begin(), b.begin() + k);
vll b2(b.begin() + k, b.end());
vll a1b1 = karatsubaMultiply(a1, b1);
vll a2b2 = karatsubaMultiply(a2, b2);
for (int i = 0; i < k; i++)
a2[i] += a1[i];
for (int i = 0; i < k; i++)
b2[i] += b1[i];
vll r = karatsubaMultiply(a2, b2);
for (int i = 0; i < a1b1.size(); i++)
r[i] -= a1b1[i];
for (int i = 0; i < a2b2.size(); i++)
r[i] -= a2b2[i];
for (int i = 0; i < r.size(); i++)
res[i + k] += r[i];
for (int i = 0; i < a1b1.size(); i++)
res[i] += a1b1[i];
for (int i = 0; i < a2b2.size(); i++)
res[i + n] += a2b2[i];
return res;
}
bigint operator*(const bigint &v) const {
vector<int> a6 = convert_base(this->z, base_digits, 6);
vector<int> b6 = convert_base(v.z, base_digits, 6);
vll a(a6.begin(), a6.end());
vll b(b6.begin(), b6.end());
while (a.size() < b.size())
a.push_back(0);
while (b.size() < a.size())
b.push_back(0);
while (a.size() & (a.size() - 1))
a.push_back(0), b.push_back(0);
vll c = karatsubaMultiply(a, b);
bigint res;
res.sign = sign * v.sign;
for (int i = 0, carry = 0; i < c.size(); i++) {
long long cur = c[i] + carry;
res.z.push_back((int) (cur % 1000000));
carry = (int) (cur / 1000000);
}
res.z = convert_base(res.z, 6, base_digits);
res.trim();
return res;
}
};
int main() {
ll a[10];
int n = 3;
REP(i,1,n) cin>>a[i];
sort(a+1,a+1+n);
bigint ans = a[1];
REP(i,2,n) ans = ans*a[i];
do {
bigint s = a[1]*a[2];
ans = min(ans, s*(a[3]-a[3]/2*2));
} while (next_permutation(a+1,a+1+3));
cout<<ans<<endl;
}
|
a.cc:35:1: error: extended character is not valid in an identifier
35 |
| ^
a.cc:36:1: error: extended character is not valid in an identifier
36 |
| ^
a.cc:37:1: error: extended character is not valid in an identifier
37 |
| ^
a.cc:43:1: error: extended character is not valid in an identifier
43 |
| ^
a.cc:44:1: error: extended character is not valid in an identifier
44 |
| ^
a.cc:45:1: error: extended character is not valid in an identifier
45 |
| ^
a.cc:46:1: error: extended character is not valid in an identifier
46 |
| ^
a.cc:50:1: error: extended character is not valid in an identifier
50 |
| ^
a.cc:50:1: error: extended character is not valid in an identifier
a.cc:52:1: error: extended character is not valid in an identifier
52 | // value == 0 is represented by empty z
| ^
a.cc:52:1: error: extended character is not valid in an identifier
a.cc:52:1: error: extended character is not valid in an identifier
a.cc:52:1: error: extended character is not valid in an identifier
a.cc:53:1: error: extended character is not valid in an identifier
53 | vector<int> z; // digits
| ^
a.cc:53:1: error: extended character is not valid in an identifier
a.cc:53:1: error: extended character is not valid in an identifier
a.cc:53:1: error: extended character is not valid in an identifier
a.cc:54:1: error: extended character is not valid in an identifier
54 |
| ^
a.cc:54:1: error: extended character is not valid in an identifier
a.cc:55:1: error: extended character is not valid in an identifier
55 | // sign == 1 <==> value >= 0
| ^
a.cc:55:1: error: extended character is not valid in an identifier
a.cc:55:1: error: extended character is not valid in an identifier
a.cc:55:1: error: extended character is not valid in an identifier
a.cc:56:1: error: extended character is not valid in an identifier
56 | // sign == -1 <==> value < 0
| ^
a.cc:56:1: error: extended character is not valid in an identifier
a.cc:56:1: error: extended character is not valid in an identifier
a.cc:56:1: error: extended character is not valid in an identifier
a.cc:57:1: error: extended character is not valid in an identifier
57 | int sign;
| ^
a.cc:57:1: error: extended character is not valid in an identifier
a.cc:57:1: error: extended character is not valid in an identifier
a.cc:57:1: error: extended character is not valid in an identifier
a.cc:58:1: error: extended character is not valid in an identifier
58 |
| ^
a.cc:58:1: error: extended character is not valid in an identifier
a.cc:59:1: error: extended character is not valid in an identifier
59 | bigint() : sign(1) {}
| ^
a.cc:59:1: error: extended character is not valid in an identifier
a.cc:59:1: error: extended character is not valid in an identifier
a.cc:59:1: error: extended character is not valid in an identifier
a.cc:60:1: error: extended character is not valid in an identifier
60 | bigint(long long v) { *this = v; }
| ^
a.cc:60:1: error: extended character is not valid in an identifier
a.cc:60:1: error: extended character is not valid in an identifier
a.cc:60:1: error: extended character is not valid in an identifier
a.cc:61:1: error: extended character is not valid in an identifier
61 |
| ^
a.cc:61:1: error: extended character is not valid in an identifier
a.cc:62:1: error: extended character is not valid in an identifier
62 | bigint &operator=(long long v) {
| ^
a.cc:62:1: error: extended character is not valid in an identifier
a.cc:62:1: error: extended character is not valid in an identifier
a.cc:62:1: error: extended character is not valid in an identifier
a.cc:63:1: error: extended character is not valid in an identifier
63 | sign = v < 0 ? -1 : 1; v *= sign;
| ^
a.cc:63:1: error: extended character is not valid in an identifier
a.cc:63:1: error: extended character is not valid in an identifier
a.cc:63:1: error: extended character is not valid in an identifier
a.cc:63:1: error: extended character is not valid in an identifier
a.cc:63:1: error: extended character is not valid in an identifier
a.cc:63:1: error: extended character is not valid in an identifier
a.cc:63:1: error: extended character is not valid in an identifier
a.cc:64:1: error: extended character is not valid in an identifier
64 | z.clear(); for (; v > 0; v = v / base) z.push_back((int) (v % base));
| ^
a.cc:64:1: error: extended character is not valid in an identifier
a.cc:64:1: error: extended character is not valid in an identifier
a.cc:64:1: error: extended character is not valid in an identifier
a.cc:64:1: error: extended character is not valid in an identifier
a.cc:64:1: error: extended character is not valid in an identifier
a.cc:64:1: error: extended character is not valid in an identifier
a.cc:64:1: error: extended character is not valid in an identifier
a.cc:65:1: error: extended character is not valid in an identifier
65 | return *this;
| ^
a.cc:65:1: error: extended character is not valid in an identifier
a.cc:65:1: error: extended character is not valid in an identifier
a.cc:65:1: error: extended character is not valid in an identifier
a.cc:65:1: error: extended character is not valid in an identifier
a.cc:65:1: error: extended character is not valid in an identifier
a.cc:65:1: error: extended character is not valid in an identifier
a.cc:65:1: error: extended character is not valid in an identifier
a.cc:66:1: error: extended character is not valid in an identifier
66 | }
| ^
a.cc:66:1: error: extended character is not valid in an identifier
a.cc:66:1: error: extended character is not valid in an identifier
a.cc:66:1: error: extended character is not valid in an identifier
a.cc:67:1: error: extended character is not valid in an identifier
67 |
| ^
a.cc:67:1: error: extended character is not valid in an identifier
a.cc:68:1: error: extended character is not valid in an identifier
68 | bigint(const string &s) { read(s); }
| ^
a.cc:68:1: error: extended character is not valid in an identifier
a.cc:68:1: error: extended character is not valid in an identifier
a.cc:68:1: error: extended character is not valid in an identifier
a.cc:69:1: error: extended character is not valid in an identifier
69 |
| ^
a.cc:69:1: error: extended character is not valid in an identifier
a.cc:70:1: error: extended character is not valid in an identifier
70 | bigint &operator+=(const bigint &other) {
| ^
a.cc:70:1: error: extended character is not valid in an identifier
a.cc:70:1: error: extended character is not valid in an identifier
a.cc:70:1: error: extended character is not valid in an identifier
a.cc:71:1: error: extended character is not valid in an identifier
71 | if (sign == other.sign) {
| ^
a.cc:71:1: error: extended character is not valid in an identifier
a.cc:71:1: error: extended character is not valid in an identifier
a.cc:71:1: error: extended character is not valid in an identifier
a.cc:71:1: error: extended character is not valid in an identifier
a.cc:71:1: error: extended character is not valid in an identifier
a.cc:71:1: error: extended character is not valid in an identifier
a.cc:71:1: error: extended character is not valid in an identifier
a.cc:72:1: error: extended character is not valid in an identifier
72 | for (int i = 0, carry = 0; i < other.z.size() || carry; ++i) {
| ^
a.cc:72:1: error: extended character is not valid in an identifier
a.cc:72:1: error: extended character is not valid in an identifier
a.cc:72:1: error: extended character is not valid in an identifier
a.cc:72:1: error: extended character is not valid in an identifier
a.cc:72:1: error: extended character is not valid in an identifier
a.cc:72:1: error: extended character is not valid in an identifier
a.cc:72:1: error: extended character is not valid in an identifier
a.cc:72:1: error: extended character is not valid in an identifier
a.cc:72:1: error: extended character is not valid in an identifier
a.cc:72:1: error: extended character is not valid in an identifier
a.cc:72:1: error: extended character is not valid in an identifier
a.cc:73:1: error: extended character is not valid in an identifier
73 | if (i == z.size())
| ^
a.cc:73:1: error: extended character is not valid in an identifier
a.cc:73:1: error: extended character is not valid in an identifier
a.cc:73:1: error: extended character is not valid in an identifier
a.cc:73:1: error: extended character is not valid in an identifier
a.cc:73:1: error: extended character is not valid in an identifier
a.cc:73:1: error: extended character is not valid in an identifier
a.cc:73:1: error: extended character is not valid in an identifier
a.cc:73:1: error: extended character is not valid in an identifier
a.cc:73:1: error: extended character is not valid in an identifier
a.cc:73:1: error: extended character is not valid in an identifier
a.cc:73:1: error: extended character is not valid in an identifier
a.cc:73:1: error: extended character is not valid in an identifier
a.cc:73:1: error: extended character is not valid in an identifier
a.cc:73:1: error: extended character is not valid in an identifier
a.cc:73:1: error: extended character is not valid in an identifier
a.cc:74:1: error: extended character is not valid in an identifier
74 | z.push_back(0);
| ^
a.cc:74:1: error: extended character is not valid in an identifier
a.cc:74:1: error: extended character is not valid in an identifier
a.cc:74:1: error:
|
s592995144
|
p04005
|
C++
|
#include<bits/stdc++.h>
using namespace std;
// #define DEBUG
// #define TIME
/*
Learn : -
Problem Type : -
Source : -
*/
#pragma GCC optimize ("Ofast")
#define sint( a ) int a; qread(a);
#define sint2( a, b ) int a,b; qread(a),qread(b);
#define sint3( a, b, c ) int a,b,c; qread(a),qread(b),qread(c);
#define int1( a ) qread(a);
#define int2( a, b ) qread(a),qread(b);
#define int3( a, b, c ) qread(a),qread(b),qread(c);
#define mkp make_pair
#define mkt make_tuple
#define pb emplace_back
#define inf INT_MAX
#define all( x ) (x).begin(),(x).end()
#define F first
#define S second
#define sdouble( a ) double a; scanf("%lf",&a);
#define slong( a ) long long a; scanf("%lld",&a);
#define cstring( a, x ) char a[x]; scanf("%s",a);
#define sstring( a ) string a;cin>>a;
#define rev( s ) reverse(all(s));
#define FOR( a, b, c ) for(int a=b;a<c;a++)
#define ROF( a, b, c ) for(int a=b;a>c;a--)
#define pause system("pause")
#define endl printf("\n")
#define fastio {ios::sync_with_stdio(false);cin.tie(NULL);}
#define null NULL
#ifdef DEBUG
#define debug(x) cout<< #x << " = " << x;endl;
#else
#define debug( x )
#endif
#define OPEN freopen("input.txt","r",stdin)
#define SEND freopen("output.txt","w",stdout)
#ifdef COM
#define IN(x)
#define OUT(x)
#else
#define IN( x ) freopen(x,"r",stdin);
#define OUT( x ) freopen(x,"w",stdout);
#endif
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector <ii> vii;
typedef long long ll;
void qread( int &x )
{
int neg = 1;
x = 0;
register char c = getchar();
while(c < '0' || c > '9')
{
if(c == '-')neg = -1;
c = getchar();
}
while(c >= '0' && c <= '9')x = 10 * x + c - '0', c = getchar();
x *= neg;
}
void Wl( int x )
{
printf("%d\n", x);
}
void Wl( double x )
{
printf("%lf\n", x);
}
void Wl( string x )
{
printf("%s\n", x.c_str());
}
void Wl( ll x )
{
printf("%lld\n", x);
}
void W( int x )
{
printf("%d ", x);
}
void W( double x )
{
printf("%lf ", x);
}
void W( string x )
{
printf("%s ", x.c_str());
}
void W( ll x )
{
printf("%lld ", x);
}
ll a[5];
int main()
{
int3(a[0],a[1],a[2]);
for(int i=0;i<3;i++)
if(a[i]%2==0)
{
printf("0\n");
return 0;
}
printf("%lld\n",min(a[0]*a[1],min(a[0]*a[2],a[1]*a[2])));
}
|
a.cc: In function 'void qread(int&)':
a.cc:59:23: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
59 | register char c = getchar();
| ^
a.cc: In function 'int main()':
a.cc:111:13: error: cannot bind non-const lvalue reference of type 'int&' to a value of type 'll' {aka 'long long int'}
111 | int3(a[0],a[1],a[2]);
| ~~~^
a.cc:17:31: note: in definition of macro 'int3'
17 | #define int3( a, b, c ) qread(a),qread(b),qread(c);
| ^
a.cc:55:18: note: initializing argument 1 of 'void qread(int&)'
55 | void qread( int &x )
| ~~~~~^
a.cc:111:18: error: cannot bind non-const lvalue reference of type 'int&' to a value of type 'll' {aka 'long long int'}
111 | int3(a[0],a[1],a[2]);
| ~~~^
a.cc:17:40: note: in definition of macro 'int3'
17 | #define int3( a, b, c ) qread(a),qread(b),qread(c);
| ^
a.cc:55:18: note: initializing argument 1 of 'void qread(int&)'
55 | void qread( int &x )
| ~~~~~^
a.cc:111:23: error: cannot bind non-const lvalue reference of type 'int&' to a value of type 'll' {aka 'long long int'}
111 | int3(a[0],a[1],a[2]);
| ~~~^
a.cc:17:49: note: in definition of macro 'int3'
17 | #define int3( a, b, c ) qread(a),qread(b),qread(c);
| ^
a.cc:55:18: note: initializing argument 1 of 'void qread(int&)'
55 | void qread( int &x )
| ~~~~~^
|
s877071091
|
p04005
|
C++
|
#include <bits/stdc++.h>
const int MOD = 1000000007;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define copy(from, to) copy(from.begin(), from.end(), back_inserter(to))
#define sort(a) sort(a.begin(), a.end())
#define reverse(s) reverse(s.begin(), s.end())
#define p(s) cout << (s) << endl
typedef long long ll;
using namespace std;
template<class T>
void load(vector<T> &v, int n) {
for (int i = 0; i < n; ++i) {
T t;
cin >> t;
v.push_back(t);
}
}
template<class T>
T max(vector<T> &v) {
return *max_element(v.begin(), v.end());
}
template<class T>
T min(vector<T> &v) {
return *min_element(v.begin(), v.end());
}
void py(bool isUpper = false) {
if (isUpper) {
p("YES");
} else {
p("Yes");
}
}
void pn(bool isUpper = false) {
if (isUpper) {
p("NO");
} else {
p("No");
}
}
int main() {
ll a, b, c;
cin >> a >> b >> c;
ll sum = a * b * c;
ll d = abs(sum - 2 * (a / 2) * b * c);
ll e = abs(sum - 2 * a * (b / 2) * c);
ll f = abs(sum - 2 * a * b * (c / 2));
p(min({d, e, f}))
}
|
a.cc: In function 'int main()':
a.cc:58:1: error: expected ';' before '}' token
58 | }
| ^
|
s153137555
|
p04005
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main(){
long long a,b,c;
cin >> a >> b >> c;
cout << min{a*b,b*c,c*a} << endl;
}
|
a.cc: In function 'int main()':
a.cc:6:8: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '<unresolved overloaded function type>')
6 | cout << min{a*b,b*c,c*a} << endl;
| ~~~~~^~~~~~
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127,
from a.cc:1:
/usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'}
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]'
125 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
125 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
135 | operator<<(ios_base& (*__pf) (ios_base&))
| ^~~~~~~~
/usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)'
135 | operator<<(ios_base& (*__pf) (ios_base&))
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
174 | operator<<(long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long int'
174 | operator<<(long __n)
| ~~~~~^~~
/usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
178 | operator<<(unsigned long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long unsigned int'
178 | operator<<(unsigned long __n)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
182 | operator<<(bool __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool'
182 | operator<<(bool __n)
| ~~~~~^~~
In file included from /usr/include/c++/14/ostream:1022:
/usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]'
96 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int'
97 | operator<<(short __n)
| ~~~~~~^~~
/usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
189 | operator<<(unsigned short __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short unsigned int'
189 | operator<<(unsigned short __n)
| ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]'
110 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int'
111 | operator<<(int __n)
| ~~~~^~~
/usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
200 | operator<<(unsigned int __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'unsigned int'
200 | operator<<(unsigned int __n)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
211 | operator<<(long long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int'
211 | operator<<(long long __n)
| ~~~~~~~~~~^~~
/usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
215 | operator<<(unsigned long long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long unsigned int'
215 | operator<<(unsigned long long __n)
| ~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
231 | operator<<(double __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:231:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'double'
231 | operator<<(double __f)
| ~~~~~~~^~~
/usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
235 | operator<<(float __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:235:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float'
235 | operator<<(float __f)
| ~~~~~~^~~
/usr/include/c++/14/ostream:243:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
243 | operator<<(long double __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:243:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long double'
243 | operator<<(long double __f)
| ~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:301:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
301 | operator<<(const void* __p)
| ^~~~~~~~
/usr/include/c++/14/ostream:301:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const void*'
301 | operator<<(const void* __p)
| ~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:306:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::nullptr_t) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; std::nullptr_t = std::nu
|
s275615078
|
p04005
|
C++
|
#include<bits/stdc++.h>
#include<algorithm>
using namespace std;
int main(){
long long x,y,z;
cin>>x >>y >>z;
if(x%2==0||y%2==0||z%2==0){
cout<<0<<endl;
}else{
cout<<min(x*y,y*z,z*x)<<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:18: required from here
11 | cout<<min(x*y,y*z,z*x)<<endl;
| ~~~^~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function
284 | if (__comp(__b, __a))
| ~~~~~~^~~~~~~~~~
|
s795717831
|
p04005
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main(){
long long x,y,z;
cin>>x >>y >>z;
if(x%2==0||y%2==0||z%2==0){
cout<<0<<endl;
}else{
cout<<min(x*y,y*z,z*x)<<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:10:18: required from here
10 | cout<<min(x*y,y*z,z*x)<<endl;
| ~~~^~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function
284 | if (__comp(__b, __a))
| ~~~~~~^~~~~~~~~~
|
s516220509
|
p04005
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main(){
long long x,y,z;
cin>>x >>y >>z;
if(x%2==0||y%2==0||z%2==0){
cout<<0<<endl;
}else{
cout<<x*y*z/max(x,y,z)<<endl;
}
return 0;
}
|
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = long long int; _Compare = long long int]':
a.cc:10:24: required from here
10 | cout<<x*y*z/max(x,y,z)<<endl;
| ~~~^~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
306 | if (__comp(__a, __b))
| ~~~~~~^~~~~~~~~~
|
s348918109
|
p04005
|
C++
|
#include<bits/std++.h>
using namespace std;
int main(){
long long x,y,z;
cin>>x >>y >>z;
if(x%2==0||y%2==0||z%2==0){
cout<<0<<endl;
}else{
cout<<x*y*z/max(x,y,z)<<endl;
}
return 0;
}
|
a.cc:1:9: fatal error: bits/std++.h: No such file or directory
1 | #include<bits/std++.h>
| ^~~~~~~~~~~~~~
compilation terminated.
|
s688481038
|
p04005
|
C++
|
include<bits/stdc++.h>
using namespace std;
long min1(long long a,long long b,long long c){
return min(min(a*b,a*c),b*c);
}
int main() {
long long a,b,c;
cin>>a>>b>>c;
if(!(a%2)||!(b%2)||!(c%2)) {
cout<<0;
return 0;
}
cout<<min1(a,b,c);
return 0;
}
|
a.cc:1:1: error: 'include' does not name a type
1 | include<bits/stdc++.h>
| ^~~~~~~
a.cc: In function 'long int min1(long long int, long long int, long long int)':
a.cc:4:20: error: 'min' was not declared in this scope; did you mean 'min1'?
4 | return min(min(a*b,a*c),b*c);
| ^~~
| min1
a.cc:4:16: error: 'min' was not declared in this scope; did you mean 'min1'?
4 | return min(min(a*b,a*c),b*c);
| ^~~
| min1
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope
8 | cin>>a>>b>>c;
| ^~~
a.cc:10:17: error: 'cout' was not declared in this scope
10 | cout<<0;
| ^~~~
a.cc:13:9: error: 'cout' was not declared in this scope
13 | cout<<min1(a,b,c);
| ^~~~
|
s575432023
|
p04005
|
C++
|
#include<bits/srdc++.h>
using namespace std;
int main(){
int a,b,c,m;cin>>a>>b>>c;
if(a%2||b%2||c%2)cout<<0<<endl;
else{
m=min(a,b);
m=min(m,c);
cout<<a*b*c/m<<endl;
}
}
|
a.cc:1:9: fatal error: bits/srdc++.h: No such file or directory
1 | #include<bits/srdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s366392606
|
p04005
|
C++
|
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <stack>
#include <list>
#include <queue>
#include <deque>
#include <algorithm>
#include <numeric>
#include <utility>
#include <complex>
#include <functional>
using namespace std;
const int MOD = 1000000007;
typedef long long ll;
typedef pair<ll, ll> p;
const int INF = (1 << 28);
const int dx[4] = {0, 1, 0, -1}, dy[4] = {-1, 0, 1, 0};
const int Dx[8] = {0, 1, 1, 1, 0, -1, -1, -1}, Dy[8] = {-1, -1, 0, 1, 1, 1, 0, -1};
#define yes cout << "Yes" << endl
#define YES cout << "YES" << endl
#define no cout << "No" << endl
#define NO cout << "NO" << endl
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define INF 2e9
#define ALL(v) v.begin(), v.end()
ll c, a, b;
int main()
{
cin.tie(0);
ios::sync_with_stdio(false);
cin >> a >> b >> c;
if(a%2==0||b%2==0||c%2==0)
cout<<0<<"\n", return 0;
cout << min(a*b,min(a*c,b*c)) << "\n";
}
|
a.cc: In function 'int main()':
a.cc:42:24: error: expected primary-expression before 'return'
42 | cout<<0<<"\n", return 0;
| ^~~~~~
|
s680534810
|
p04005
|
C
|
#include <stdio.h>
int main(){
double a,b,c,s=1;
scanf("%lf%lf%lf",&a,&b,&c);
if(a%2&&b%2&&c%2){
if(a>=b&&a>=c)s=a;
else if(b>=a&&b>=c)s=b;
else if(c>=a&&c>=b)s=c;
}else a=0;
printf("%d",(int)((a*b*c)/s));
return 0;
}
|
main.c: In function 'main':
main.c:5:7: error: invalid operands to binary % (have 'double' and 'int')
5 | if(a%2&&b%2&&c%2){
| ^
main.c:5:12: error: invalid operands to binary % (have 'double' and 'int')
5 | if(a%2&&b%2&&c%2){
| ^
main.c:5:17: error: invalid operands to binary % (have 'double' and 'int')
5 | if(a%2&&b%2&&c%2){
| ^
|
s174552924
|
p04005
|
C++
|
#include<iostream>
#include<algorithm>
using namespace std;
int main() {
long long a,b,c;
cin >> a >> b >> c;
if(a%2==||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:11: error: expected primary-expression before '||' token
7 | if(a%2==||b%2==0||c%2==0) {
| ^~
|
s669882713
|
p04005
|
C++
|
#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
vector<int> dim(3);
cin >> dim[0] >> dim[1] >> dim[2];
if((dim[0] % 2 == 0) ||(dim[1] % 2 == 0) || (dim[2] % 2 == 0)){
cout << "0" << endl;
return 0;
}
sort(dim.begin(), dim.end());
cout << dim[0] * dim[1];
return 0;
}
|
a.cc: In function 'int main()':
a.cc:8:5: error: 'vector' was not declared in this scope
8 | vector<int> dim(3);
| ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
2 | #include <algorithm>
+++ |+#include <vector>
3 |
a.cc:8:12: error: expected primary-expression before 'int'
8 | vector<int> dim(3);
| ^~~
a.cc:9:12: error: 'dim' was not declared in this scope; did you mean 'div'?
9 | cin >> dim[0] >> dim[1] >> dim[2];
| ^~~
| div
|
s112717102
|
p04005
|
C++
|
#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
vector<int> dim(3);
cin >> dim[0] >> dim[1] >> dim[2];
if((dim[0] % 2 == 0) ||(dim[1] % 2 == 0) || (dim[2] % 2 == 0)){
cout << "0" << endl;
return 0;
}
sort(dim.begin(), dim.end());
cout << abs((dim[0] * dim[1] * (dim[2] / 2)) - (dim[0]* dim[1] * (dim[2] - (dim[2] / 2))));
return 0;
}
|
a.cc: In function 'int main()':
a.cc:8:5: error: 'vector' was not declared in this scope
8 | vector<int> dim(3);
| ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
2 | #include <algorithm>
+++ |+#include <vector>
3 |
a.cc:8:12: error: expected primary-expression before 'int'
8 | vector<int> dim(3);
| ^~~
a.cc:9:12: error: 'dim' was not declared in this scope; did you mean 'div'?
9 | cin >> dim[0] >> dim[1] >> dim[2];
| ^~~
| div
|
s996895607
|
p04005
|
C++
|
#include <iostream>
#include <algorithm>
using namespace std;
int main(void){
int a,b,c;
cin >> a >> b >> c;
if((a * b * 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/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: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))
| ~~~~~~^~~~~~~~~~
|
s086320319
|
p04005
|
C++
|
#include <iostream>
#include <algorithm>
using namespace std;
int main(void){
int a,b,c;
cin >> a >> b >> c;
if((a * b * 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/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: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))
| ~~~~~~^~~~~~~~~~
|
s039944367
|
p04005
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main ()
{
ll a,b,c,t;
cin>>a>>b>>c;
if(a%2==0||b%2==0||c%2==0){
cout<<'0'<<endl;
}
else{
t = min(min(a*b,b*c),c*a);
cout<<t<<endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:7:4: error: 'll' was not declared in this scope
7 | ll a,b,c,t;
| ^~
a.cc:8:8: error: 'a' was not declared in this scope
8 | cin>>a>>b>>c;
| ^
a.cc:8:11: error: 'b' was not declared in this scope
8 | cin>>a>>b>>c;
| ^
a.cc:8:14: error: 'c' was not declared in this scope
8 | cin>>a>>b>>c;
| ^
a.cc:13:3: error: 't' was not declared in this scope; did you mean 'tm'?
13 | t = min(min(a*b,b*c),c*a);
| ^
| tm
|
s924623658
|
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, a+n);
for (int i = 0; i<3; i++) {
if (a[i]%2 == 0)
count ++;
}
if (count == 0)
cout << min(a*b, min(a*c,b*c)) << endl;
else
cout << "0" << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:7:14: error: 'n' was not declared in this scope
7 | sort (a, a+n);
| ^
a.cc:13:19: error: 'b' was not declared in this scope
13 | cout << min(a*b, min(a*c,b*c)) << endl;
| ^
a.cc:13:28: error: 'c' was not declared in this scope
13 | cout << min(a*b, min(a*c,b*c)) << endl;
| ^
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.