結果
| 問題 | No.3324 ハイライト動画 |
| コンテスト | |
| ユーザー |
tokugh
|
| 提出日時 | 2025-11-01 15:26:30 |
| 言語 | Julia (2.11.2) |
| 結果 |
AC
|
| 実行時間 | 916 ms / 2,000 ms |
| コード長 | 536 bytes |
| 記録 | |
| コンパイル時間 | 253 ms |
| コンパイル使用メモリ | 7,716 KB |
| 実行使用メモリ | 258,204 KB |
| 最終ジャッジ日時 | 2025-11-01 15:26:51 |
| 合計ジャッジ時間 | 20,377 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 25 |
ソースコード
toI(s=readline()) = parse(Int,s)
toVI(s=readline()) = map(toI,eachsplit(s))
rep(f,n) = [f() for _ in 1:n]
@enum YN Yes=1 No=0
function (@main)(ARGS)
n,m = toVI()
a = toVI()
res = solve(n,m,a)
println(length(res))
for (s,l) in res
println(s," ",l)
end
end
function solve(n,m,a)
res = Tuple{Int,Int}[]
now = -1
for x in a
if now+1 == x
s,l = res[end]
res[end] = (s,l+1)
else
push!(res,(x,1))
end
now = x
end
res
end
tokugh