結果
| 問題 | No.2894 Monotonic Intervals |
| コンテスト | |
| ユーザー |
timi
|
| 提出日時 | 2024-09-20 21:24:24 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 66 ms / 2,000 ms |
| + 320µs | |
| コード長 | 321 bytes |
| 記録 | |
| コンパイル時間 | 579 ms |
| コンパイル使用メモリ | 96,080 KB |
| 実行使用メモリ | 84,352 KB |
| 最終ジャッジ日時 | 2026-09-01 00:22:25 |
| 合計ジャッジ時間 | 3,194 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 |
ソースコード
# import heapq
# from heapq import heappop,heappush,heapify
# from sys import stdin, setrecursionlimit
# input = stdin.readline
# readline = stdin.readline
# from collections import deque,defaultdict
#N,Q=map(int, input().split())
now='?'
N=int(input())
S=input()
c=0
for s in S:
if now!=s:
c+=1
now=s
print(c)
timi