結果

問題 No.1836 Max Matrix
ユーザー sigmanisigmani
提出日時 2022-03-18 15:11:51
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 442 bytes
コンパイル時間 1,533 ms
コンパイル使用メモリ 163,768 KB
実行使用メモリ 10,144 KB
最終ジャッジ日時 2024-04-12 10:21:08
合計ジャッジ時間 4,869 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
10,140 KB
testcase_01 AC 1 ms
6,940 KB
testcase_02 TLE -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
long long mod=998244353;
long long  Y(long long a,long long p,long long mod){
  long long j=1;
  for(int i=1;i<=p;i++)j=(j*a)%mod;
  return j;
}    
int main(){
    int H,W,M;
    cin>>H>>W>>M;
    long long answer=0;
    for(long long i=1;i<=M;i++){
        answer=answer+(Y(M-i+1,H,mod)-Y(M-i,H,mod))*(Y(M-i+1,W,mod)-Y(M-i,W,mod));
        answer=answer%mod;
    }
    cout<<answer;
    
    
}
0