Submission #3788345


Source Code Expand

N = int(input())
S = input().split()
s = 0
for j in range(1, N//2+1):
	s += sum([all([S[i] == S[i+k] for k in range(1, j+1)]) for i in range(0, N-j)]) * ((-1) ** (j-1))
	
print(s, flush=True)

Submission Info

Submission Time
Task A - Colorful Slimes 2
User atokishi
Language Python (3.4.3)
Score 0
Code Size 197 Byte
Status WA
Exec Time 30 ms
Memory 3064 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 200
Status
AC × 3
WA × 1
AC × 11
WA × 2
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 18 ms 2940 KB
example_1 AC 18 ms 3060 KB
example_2 WA 18 ms 2940 KB
example_3 AC 18 ms 3060 KB
handmade_0 AC 17 ms 3060 KB
handmade_1 AC 18 ms 2940 KB
rand_0 AC 18 ms 3060 KB
rand_1 AC 18 ms 2940 KB
smallcolor_0 WA 26 ms 3060 KB
smallcolor_1 AC 30 ms 3064 KB
smallcolor_2 AC 28 ms 3060 KB
smallcolor_3 AC 27 ms 2940 KB
smallcolor_4 AC 28 ms 2940 KB