結果
問題 | No.921 ずんだアロー |
ユーザー | nebukuro09 |
提出日時 | 2019-11-08 21:39:16 |
言語 | D (dmd 2.109.1) |
結果 |
AC
|
実行時間 | 15 ms / 2,000 ms |
コード長 | 482 bytes |
コンパイル時間 | 751 ms |
コンパイル使用メモリ | 117,224 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-22 02:59:38 |
合計ジャッジ時間 | 1,837 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
ソースコード
module simple;import std.stdio, std.array, std.string, std.conv, std.algorithm; import std.typecons, std.range, std.random, std.math, std.container; import std.numeric, std.bigint, core.bitop, std.bitmanip, core.stdc.string; void main() { auto N = readln.chomp.to!int; auto A = readln.split.map!(to!int).array; int ans = N; for (int i = 0; i < N - 1; ++i) { if (A[i] != A[i+1]) { ans -= 1; i += 1; } } ans.writeln; }