結果
| 問題 | No.921 ずんだアロー |
| コンテスト | |
| ユーザー |
💕💖💞
|
| 提出日時 | 2019-11-13 18:04:06 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 135 ms / 2,000 ms |
| + 292µs | |
| コード長 | 362 bytes |
| 記録 | |
| コンパイル時間 | 305 ms |
| コンパイル使用メモリ | 21,468 KB |
| 実行使用メモリ | 23,832 KB |
| 最終ジャッジ日時 | 2026-09-01 22:08:44 |
| 合計ジャッジ時間 | 5,006 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 |
ソースコード
from collections import Counter
import math
n = int(input())
xx = list(map(int,input().split()))
ll = [0]*n
c = 0
for i in range(n):
if i == 0:
c += 1
ll[i] = 1
else:
if xx[i-1] == xx[i]:
c += 1
ll[i] = 1
else:
if ll[i-1] != 1:
ll[i] = 1
c += 1
print(c)
💕💖💞