結果

問題 No.982 Add
ユーザー ninoinui
提出日時 2020-02-11 14:30:37
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 151 bytes
コンパイル時間 1,432 ms
コンパイル使用メモリ 165,596 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-01 07:40:19
合計ジャッジ時間 2,017 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 17 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
  int A, B;
  cin >> A >> B;
  cout << ((A % 2 == B % 2) ? -1 : (--A * --B) / 2) << "\n";
}
0