結果
問題 | No.84 悪の算盤 |
ユーザー |
![]() |
提出日時 | 2015-06-21 10:54:54 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 269 bytes |
コンパイル時間 | 1,137 ms |
コンパイル使用メモリ | 157,556 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-07 15:35:05 |
合計ジャッジ時間 | 1,697 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 5 WA * 5 |
ソースコード
#include <bits/stdc++.h>using namespace std;int main(){int r,c; cin>>r>>c;if(r==c){cout<<(long long int)(r+1)/2*(c+1)/2-1<<endl;}else if(r%2==1&&c%2==1){cout<<(long long int)(r/2)*c+c/2<<endl;}else cout<<(long long int)(r*c/2-1)<<endl;return 0;}