結果
問題 |
No.2683 Two Sheets
|
ユーザー |
👑 |
提出日時 | 2024-03-21 10:12:59 |
言語 | cLay (20241019-1) |
結果 |
WA
|
実行時間 | - |
コード長 | 295 bytes |
コンパイル時間 | 3,027 ms |
コンパイル使用メモリ | 174,776 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-09-30 10:02:58 |
合計ジャッジ時間 | 3,058 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 WA * 6 |
ソースコード
#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);