結果

問題 No.2043 Ohuton and Makura
コンテスト
ユーザー vjudge1
提出日時 2025-11-05 15:53:06
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 599 bytes
コンパイル時間 3,525 ms
コンパイル使用メモリ 275,448 KB
実行使用メモリ 7,720 KB
最終ジャッジ日時 2025-11-05 15:53:10
合計ジャッジ時間 3,949 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 4 WA * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define int long long
#define nl "\n"
#define vi vector<int>
#define ip(x)          \
    for (auto &it : x) \
    cin >> it
#define all(x) x.begin(), x.end()

void solve()
{
    int a, b, s;
    cin >> a >> b >> s;
    int c = 0;
    for (int i = 1; i <= min(a, s); i++)
    {
        c += b * (a - i + 1);
    }
    for (int i = 2; i <= min(b, s); i++)
    {
        c += a * (b - i + 1);
    }
    cout << c << nl;
}

signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    int t = 1;
    // cin >> t;
    while (t--)
        solve();
}
0