結果
| 問題 | No.2043 Ohuton and Makura |
| コンテスト | |
| ユーザー |
Manuel1024
|
| 提出日時 | 2023-09-11 04:39:29 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 323 bytes |
| 記録 | |
| コンパイル時間 | 494 ms |
| コンパイル使用メモリ | 76,656 KB |
| 実行使用メモリ | 6,272 KB |
| 最終ジャッジ日時 | 2026-03-17 20:51:39 |
| 合計ジャッジ時間 | 1,183 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 |
ソースコード
#include <iostream>
#include <algorithm>
using namespace std;
using ll = long long;
int main(){
int a, b, s; cin >> a >> b >> s;
ll ans = 0;
for(int h = 1; h <= b; h++){
int w = min(a, s/h);
ans += 1LL*(b-h+1)*(1LL*a*(a+1)/2-1LL*(a-w)*(a-w+1)/2);
}
cout << ans << endl;
return 0;
}
Manuel1024