結果
問題 | No.2830 Don't Stop the Game |
ユーザー | tassei903 |
提出日時 | 2024-08-02 22:58:47 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 82 ms / 2,000 ms |
コード長 | 964 bytes |
コンパイル時間 | 359 ms |
コンパイル使用メモリ | 82,464 KB |
実行使用メモリ | 69,880 KB |
最終ジャッジ日時 | 2024-08-02 22:58:51 |
合計ジャッジ時間 | 3,520 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 58 ms
68,784 KB |
testcase_01 | AC | 61 ms
68,068 KB |
testcase_02 | AC | 60 ms
68,020 KB |
testcase_03 | AC | 60 ms
68,484 KB |
testcase_04 | AC | 61 ms
69,880 KB |
testcase_05 | AC | 61 ms
69,652 KB |
testcase_06 | AC | 61 ms
68,616 KB |
testcase_07 | AC | 60 ms
68,824 KB |
testcase_08 | AC | 60 ms
68,608 KB |
testcase_09 | AC | 59 ms
69,392 KB |
testcase_10 | AC | 60 ms
68,892 KB |
testcase_11 | AC | 60 ms
69,044 KB |
testcase_12 | AC | 60 ms
69,292 KB |
testcase_13 | AC | 59 ms
68,500 KB |
testcase_14 | AC | 59 ms
67,804 KB |
testcase_15 | AC | 82 ms
68,224 KB |
testcase_16 | AC | 61 ms
67,868 KB |
testcase_17 | AC | 60 ms
68,792 KB |
testcase_18 | AC | 61 ms
68,592 KB |
testcase_19 | AC | 61 ms
69,728 KB |
ソースコード
import sys input = lambda :sys.stdin.readline()[:-1] ni = lambda :int(input()) na = lambda :list(map(int,input().split())) yes = lambda :print("yes");Yes = lambda :print("Yes");YES = lambda : print("YES") no = lambda :print("no");No = lambda :print("No");NO = lambda : print("NO") ####################################################################### mod = 998244353 n = 30 p = list(range(1, n+1)) ans = 0 from random import randint a = [randint(1, 10) for i in range(n)] #print(a) b = [0] * n print(2*n, flush=True) for i in range(n): print(2, flush=True) print(*p, flush=True) b = [b[j] + sum(a[p[i]-1]*pow(j+1, i, mod) for i in range(n)) for j in range(n)] p = p[1:] + [p[0]] #print(b) for i in range(1, n+1): for j in range(n): ans += pow(i, j, mod) ans %= mod x = pow(ans, mod-2, mod) for i in range(n): print(4, flush=True) print(i+1, x, flush=True) b[i] = (b[i] * x) % mod #print(sum(a), sum(b) % mod)