結果
問題 | No.84 悪の算盤 |
ユーザー |
![]() |
提出日時 | 2018-07-15 14:09:23 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 680 bytes |
コンパイル時間 | 868 ms |
コンパイル使用メモリ | 88,908 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-06 08:31:15 |
合計ジャッジ時間 | 1,502 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
ソースコード
#include <cstdio> #include <cstdlib> #include <cmath> #include <climits> #include <cfloat> #include <map> #include <utility> #include <set> #include <iostream> #include <memory> #include <string> #include <vector> #include <algorithm> #include <functional> #include <sstream> #include <complex> #include <stack> #include <queue> #include <iomanip> using namespace std; #define INF 1e9 #define PI acos(-1) typedef long long ll; int main() { ll ans; ll r, c; cin >> r >> c; if (r == c) { if (r*c%2==0)ans=(r*c/4-1); else ans = (r*c / 4); } else { if (r*c%2==0) ans = r * c / 2 - 1; else ans = r * c / 2;//中心点で+1 } cout << ans << endl; return 0; }