結果
問題 |
No.2043 Ohuton and Makura
|
ユーザー |
|
提出日時 | 2025-03-15 12:34:07 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 15 ms / 2,000 ms |
コード長 | 1,186 bytes |
コンパイル時間 | 6,696 ms |
コンパイル使用メモリ | 332,760 KB |
実行使用メモリ | 7,324 KB |
最終ジャッジ日時 | 2025-03-15 12:34:16 |
合計ジャッジ時間 | 7,467 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 |
ソースコード
#include<bits/stdc++.h> #include<atcoder/all> using namespace std; namespace my{ #define LL(...) ll __VA_ARGS__;lin(__VA_ARGS__) #define FO(n) for(ll ij=n;ij-->0;) #define FOR(i,...) for(auto[i,i##stop,i##step]=range(0,__VA_ARGS__);i<i##stop;i+=i##step) #define fo(i,...) FO##__VA_OPT__(R)(i __VA_OPT__(,__VA_ARGS__)) #define schrodinger(p,c) (p?c:remove_cvref_t<decltype(c)>{}) #define single_testcase void solve();}int main(){my::io();my::solve();}namespace my{ void io(){cin.tie(nullptr)->sync_with_stdio(0);cout<<fixed<<setprecision(15);} using ll=long long; constexpr auto range(ll s,ll b){ll a=0;if(s)swap(a,b);return array{a-s,b,1-s*2};} constexpr auto range(ll s,ll a,ll b,ll c=1){return array{a-s,b,(1-s*2)*c};} const string newline{char(10)}; const string space{char(32)}; auto max(auto...a){return max(initializer_list<common_type_t<decltype(a)...>>{a...});} void lin(auto&...a){(cin>>...>>a);} void pp(const auto&...a){ll n=sizeof...(a);((cout<<a<<schrodinger(--n>0,space)),...);cout<<newline;} single_testcase void solve(){ LL(A,B,S); ll ans=0; fo(a,1,S+1){ fo(b,1,S/a+1){ if(a>A||b>B)continue; ans+=max((A-a+1)*(B-b+1),0); } } pp(ans); }}