結果
| 問題 | No.3324 ハイライト動画 |
| コンテスト | |
| ユーザー |
学ぶマン
|
| 提出日時 | 2025-12-07 12:22:04 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 170 ms / 2,000 ms |
| コード長 | 291 bytes |
| 記録 | |
| コンパイル時間 | 152 ms |
| コンパイル使用メモリ | 82,384 KB |
| 実行使用メモリ | 113,340 KB |
| 最終ジャッジ日時 | 2025-12-07 12:22:15 |
| 合計ジャッジ時間 | 4,862 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 25 |
ソースコード
N, M = map(int, input().split())
A = list(map(int, input().split()))
ansl = []
scenes = [[A[0]]]
for i in range(1, M):
if A[i] == scenes[-1][-1] + 1:
scenes[-1].append(A[i])
else:
scenes.append([A[i]])
print(len(scenes))
for s in scenes:
print(s[0], len(s))
学ぶマン