結果
問題 | No.2057 Ising Model |
ユーザー |
|
提出日時 | 2022-08-26 22:02:45 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 177 bytes |
コンパイル時間 | 1,752 ms |
コンパイル使用メモリ | 165,300 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-13 22:38:34 |
合計ジャッジ時間 | 2,908 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 40 WA * 4 |
ソースコード
#include<bits/stdc++.h>using namespace std;using ll=long long;int main(){ll N,A,B;cin>>N>>A>>B;cout<<min(-A*(N-1)-B*(N%2),-B*N+A*(N-1))<<endl;return 0;}