結果
問題 |
No.2963 Mecha DESU
|
ユーザー |
|
提出日時 | 2025-08-04 13:09:50 |
言語 | cLay (20241019-1) |
結果 |
AC
|
実行時間 | 361 ms / 2,000 ms |
コード長 | 350 bytes |
コンパイル時間 | 3,039 ms |
コンパイル使用メモリ | 189,552 KB |
実行使用メモリ | 12,800 KB |
最終ジャッジ日時 | 2025-08-04 13:10:04 |
合計ジャッジ時間 | 14,023 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 57 |
ソースコード
#define MD 998244353 ll@N,@M,@K,@A[M]; Mint ans = 0; ll cnt[N+1]; rep(i,N+1)cnt[i]=0; sort(A,A+M); for(int it = 0; it < M; ) { int j = it; while(j < M && A[it] == A[j]) j++; rep(k, A[it], N + 1, A[it]) cnt[k] += j - it; it = j; } rep(i, 1, N+1) { ans += 1; Mint t = M-cnt[i]; Mint s = M; ans -= (t/s).pw(K); } wt(ans);