Submission #3027508
Source Code Expand
def a_colorful_slimes_2(N, A): import itertools straight_group = itertools.groupby(A) ans = 0 for _, group in straight_group: ans += len(list(group)) // 2 return ans N = int(input()) A = [int(i) for i in input().split()] print(a_colorful_slimes_2(N, A))
Submission Info
Submission Time | |
---|---|
Task | A - Colorful Slimes 2 |
User | kenseiQ |
Language | Python (3.4.3) |
Score | 200 |
Code Size | 292 Byte |
Status | AC |
Exec Time | 17 ms |
Memory | 3060 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 200 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | example_0, example_1, example_2, example_3 |
All | example_0, example_1, example_2, example_3, handmade_0, handmade_1, rand_0, rand_1, smallcolor_0, smallcolor_1, smallcolor_2, smallcolor_3, smallcolor_4 |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
example_0 | AC | 17 ms | 2940 KB |
example_1 | AC | 17 ms | 3060 KB |
example_2 | AC | 17 ms | 3060 KB |
example_3 | AC | 17 ms | 3060 KB |
handmade_0 | AC | 17 ms | 3060 KB |
handmade_1 | AC | 17 ms | 3060 KB |
rand_0 | AC | 17 ms | 3060 KB |
rand_1 | AC | 17 ms | 3060 KB |
smallcolor_0 | AC | 17 ms | 3060 KB |
smallcolor_1 | AC | 17 ms | 3060 KB |
smallcolor_2 | AC | 17 ms | 3060 KB |
smallcolor_3 | AC | 17 ms | 3060 KB |
smallcolor_4 | AC | 17 ms | 3060 KB |