結果
問題 |
No.2959 Dolls' Tea Party
|
ユーザー |
|
提出日時 | 2024-10-28 23:30:55 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 586 bytes |
コンパイル時間 | 217 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 112,124 KB |
最終ジャッジ日時 | 2024-10-29 00:13:00 |
合計ジャッジ時間 | 8,469 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 4 |
other | WA * 33 |
ソースコード
import re import sys content = input() pattern = r'^(\d+) (\d+)$' result = re.match(pattern, content) if not result: sys.exit("format error.") N, K = map(int, content.split()) if not (1 <= N and N <= 3*10**5): sys.exit("N") if not (2 <= K and K <= 1300): sys.exit("K") content = input() pattern = r'^(-?\d+)( (-?\d+))*$' result = re.match(pattern, content) if not result: sys.exit("format error.") A = list(map(int, content.split())) if len(A) != N: sys.exit("A") for i in range(N): if not (1 <= A[i] and A[i] <= 998244352): sys.exit("A[i]")