結果

問題 No.3324 ハイライト動画
コンテスト
ユーザー pitP
提出日時 2025-11-01 15:07:44
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 314 ms / 2,000 ms
+ 392µs
コード長 286 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 862 ms
コンパイル使用メモリ 21,280 KB
実行使用メモリ 37,032 KB
最終ジャッジ日時 2026-07-16 04:00:05
合計ジャッジ時間 7,248 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

N, M = map(int, input().split())
A = list(map(int, input().split())) + [1 << 60]

s = A[0]
l = 1
ans = []
for i in range(1, M + 1):
    if s + l == A[i]:
        l += 1
    else:
        ans.append((s, l))
        s = A[i]
        l = 1

print(len(ans))
for s, l in ans:
    print(s, l)
0