結果

問題 No.853 河原の石
ユーザー leaf_1415
提出日時 2019-07-26 23:11:53
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 406 bytes
コンパイル時間 886 ms
コンパイル使用メモリ 66,448 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-02 09:19:34
合計ジャッジ時間 2,474 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 3 WA * 54
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <stdio.h>
#include <stdlib.h>
#include <unordered_map>
#define llint long long
#define mod 1000000007

using namespace std;

llint h, w;

int main(void)
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	
	cin >> h >> w;
	w = abs(w);
	
	llint ans = w;
	if(h > 1){
		ans += (h-1)*((w+1)/2);
	}
	cout << ans << endl;
	
	return 0;
}
0