結果
問題 | No.84 悪の算盤 |
ユーザー |
👑 |
提出日時 | 2019-04-27 23:47:58 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 403 bytes |
コンパイル時間 | 571 ms |
コンパイル使用メモリ | 71,720 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-30 02:24:00 |
合計ジャッジ時間 | 1,310 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
ソースコード
#include <cstdio> #include <cstdlib> #include <cstddef> #include <vector> #include <algorithm> #include <cmath> #include <string> #include <iostream> #include <iomanip> #define L64 long long #define MOD (1000000007LL) int main(void) { L64 r, c; std::cin >> r >> c; if(r != c){ std::cout << (r * c + 1) / 2 - 1 << std::endl; } else { std::cout << (r * c + 3) / 4 - 1 << std::endl; } }