結果
| 問題 | 
                            No.1836 Max Matrix
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2025-10-22 02:07:22 | 
| 言語 | C++23  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 65 ms / 2,000 ms | 
| コード長 | 1,075 bytes | 
| コンパイル時間 | 3,024 ms | 
| コンパイル使用メモリ | 278,824 KB | 
| 実行使用メモリ | 7,716 KB | 
| 最終ジャッジ日時 | 2025-10-22 02:07:27 | 
| 合計ジャッジ時間 | 4,466 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 13 | 
ソースコード
#include<bits/stdc++.h>
#if __has_include(<atcoder/all>)
#include<atcoder/modint>
#endif
using namespace std;
#define LL(...) ll __VA_ARGS__;lin(__VA_ARGS__)
#define fo(i,...) for(auto[i,i##stop,i##step]=for_range<ll>(0,__VA_ARGS__);i<i##stop;i+=i##step)
#define defpp template<ostream&o=cout>void pp(const auto&...a){[[maybe_unused]]const char*c="";((o<<c<<a,c=" "),...);o<<'\n';}void epp(const auto&...a){pp<cerr>(a...);}
#define entry defpp void main();void main2();}int main(){my::io();my::main();}namespace my{
#define use_ml998244353 using ml=atcoder::modint998244353;
namespace my{
auto&operator<<(ostream&o,const atcoder::modint998244353&x){return o<<(int)x.val();}
void io(){cin.tie(nullptr)->sync_with_stdio(0);cout<<fixed<<setprecision(15);}
using ll=long long;
template<class T>constexpr auto for_range(T s,T b){T a=0;if(s)swap(a,b);return array{a-s,b,1-s*2};}
void lin(auto&...a){(cin>>...>>a);}
}
namespace my{entry
void main(){
  LL(H,W,M);
  use_ml998244353
  ml ans=0;
  fo(i,M)ans+=(ml(i+1).pow(H)-ml(i).pow(H))*(ml(i+1).pow(W)-ml(i).pow(W));
  pp(ans);
}}