結果
| 問題 |
No.3324 ハイライト動画
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-11-02 10:45:15 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 407 ms / 2,000 ms |
| コード長 | 286 bytes |
| コンパイル時間 | 452 ms |
| コンパイル使用メモリ | 12,160 KB |
| 実行使用メモリ | 34,064 KB |
| 最終ジャッジ日時 | 2025-11-02 10:45:22 |
| 合計ジャッジ時間 | 7,643 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 25 |
ソースコード
n, m = map(int, input().split())
a = list(map(int, input().split()))
ans = [(a[0], 1)]
for i in range(m - 1):
if a[i+1] == a[i] + 1:
s, l = ans[-1]
ans[-1] = (s, l + 1)
else:
ans.append((a[i+1], 1))
print(len(ans))
for s, l in ans:
print(s, l)