結果
| 問題 |
No.2043 Ohuton and Makura
|
| コンテスト | |
| ユーザー |
vjudge1
|
| 提出日時 | 2025-11-05 16:12:37 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 8 ms / 2,000 ms |
| コード長 | 688 bytes |
| コンパイル時間 | 2,864 ms |
| コンパイル使用メモリ | 275,396 KB |
| 実行使用メモリ | 7,720 KB |
| 最終ジャッジ日時 | 2025-11-05 16:12:41 |
| 合計ジャッジ時間 | 4,088 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 |
ソースコード
#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 lop = min(a, s);
int ans = 0;
for (int i = 1; i <= lop; i++)
{
int x = s / i;
if (x == 0)
break;
if (x > b)
x = b;
int area = x * (2 * b - x + 1) / 2;
ans += (a - i + 1) * area;
}
cout << ans << nl;
}
signed main()
{
ios::sync_with_stdio(false);
cin.tie(0);
int t = 1;
// cin >> t;
while (t--)
solve();
}
vjudge1