結果

問題 No.1603 Manhattan Social Distance
ユーザー mamimume____momamimume____mo
提出日時 2021-07-16 22:26:17
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 493 bytes
コンパイル時間 1,641 ms
コンパイル使用メモリ 164,812 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-06 09:52:15
合計ジャッジ時間 1,804 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int INF = 1000000000;
const ll INFL = 2e18;
template <class T>bool chmin(T &a, T b){ if (a > b) { a = b; return true;} else return false;}
template <class T>bool chmax(T &a, T b){ if (a < b) { a = b; return true;} else return false;}

int main() {
    int H,W,N;
    cin >> N >> H >> W;

    ll ans = 0;
    ans += (ll)(W - 1) * (N - N/2) * (N/2);
    ans += (ll)(H - 1) * (N - N/2) * (N/2);
    cout << ans << endl;
}
0