結果

問題 No.2683 Two Sheets
ユーザー 👑 p-adicp-adic
提出日時 2024-03-21 10:12:59
言語 cLay
(20240104-1)
結果
WA  
実行時間 -
コード長 295 bytes
コンパイル時間 3,170 ms
コンパイル使用メモリ 174,928 KB
実行使用メモリ 6,676 KB
最終ジャッジ日時 2024-03-21 10:13:04
合計ジャッジ時間 4,207 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#define MD 998244353
ll@H,@W,@A,@B;Mint S=(H-A+1)*(W-B+1);auto f=[S](ll h,ll k){return 2k>h?(h-k)*(h-k+1)+(2k-h)*(h-k+1):k*(k-1)+(h-2k+2)*k;};auto g=[S](ll h,ll k){return(2k>h?(h-k)*(h-k+1)*(2h-2k+1)/3+(2k-h)*(h-k+1)**2:(k-1)*k*(2k-1)/3+(h-2k+2)*k*k)/S;};S=2*f(H,A)*f(W,B)/S-g(H,A)*g(W,B);wt(S);
0