結果

問題 No.2057 Ising Model
ユーザー MagentorMagentor
提出日時 2022-08-26 22:00:42
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 971 bytes
コンパイル時間 3,404 ms
コンパイル使用メモリ 223,548 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-22 00:05:48
合計ジャッジ時間 4,494 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 1 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 1 ms
5,376 KB
testcase_06 AC 2 ms
5,376 KB
testcase_07 AC 1 ms
5,376 KB
testcase_08 AC 1 ms
5,376 KB
testcase_09 AC 2 ms
5,376 KB
testcase_10 AC 2 ms
5,376 KB
testcase_11 AC 1 ms
5,376 KB
testcase_12 WA -
testcase_13 AC 1 ms
5,376 KB
testcase_14 AC 2 ms
5,376 KB
testcase_15 AC 2 ms
5,376 KB
testcase_16 AC 2 ms
5,376 KB
testcase_17 AC 2 ms
5,376 KB
testcase_18 AC 1 ms
5,376 KB
testcase_19 AC 1 ms
5,376 KB
testcase_20 AC 1 ms
5,376 KB
testcase_21 AC 1 ms
5,376 KB
testcase_22 AC 1 ms
5,376 KB
testcase_23 WA -
testcase_24 AC 1 ms
5,376 KB
testcase_25 AC 2 ms
5,376 KB
testcase_26 AC 2 ms
5,376 KB
testcase_27 WA -
testcase_28 AC 2 ms
5,376 KB
testcase_29 AC 1 ms
5,376 KB
testcase_30 AC 2 ms
5,376 KB
testcase_31 AC 2 ms
5,376 KB
testcase_32 AC 2 ms
5,376 KB
testcase_33 AC 2 ms
5,376 KB
testcase_34 AC 2 ms
5,376 KB
testcase_35 AC 1 ms
5,376 KB
testcase_36 AC 1 ms
5,376 KB
testcase_37 AC 2 ms
5,376 KB
testcase_38 AC 1 ms
5,376 KB
testcase_39 AC 2 ms
5,376 KB
testcase_40 AC 2 ms
5,376 KB
testcase_41 AC 2 ms
5,376 KB
testcase_42 AC 1 ms
5,376 KB
testcase_43 AC 2 ms
5,376 KB
testcase_44 AC 2 ms
5,376 KB
testcase_45 WA -
testcase_46 AC 2 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#include <atcoder/all>
using namespace atcoder;
#define rep(i, n) for (int i = 0; i < (long long)(n); i++)
#define REP(i, n) for (int i = 1; i < (long long)(n); i++)
typedef long long ll;
//#pragma GCC target("avx512f")
//#pragma GCC optimize("Ofast")
//#pragma GCC optimize("unroll-loops")
#define updiv(N,X) (N + X - 1) / X
#define l(n) n.begin(),n.end()

#define YesNo(Q) Q==1?cout<<"Yes":cout<<"No"
using P = pair<int, int>;
using mint = modint998244353;
const int MOD = 998244353LL;
const ll INF = 999999999999LL;
ll dvt(ll a,ll b){
    ll res=0;ll aa=a; 
    while(b<=aa){aa /= 2;res++;}
    return res;
}

int main() {
 ll a,b,c;cin>>a>>b>>c;if(a==b){
     
     if(a%2==1){cout << min({(-1)*(a-1)*b-c,(a-1)*b-a*c,-b}) << endl;}
 else{cout << min({(-1)*(a-1)*b,(a-1)*b-a*c,-b}) << endl;}
 }else{
 if(a%2==1){cout << min({(-1)*(a-1)*b-c,(a-1)*b-a*c}) << endl;}
 else{cout << min({(-1)*(a-1)*b,(a-1)*b-a*c}) << endl;}}
}
0