Submission #11639769


Source Code Expand

from itertools import permutations as pr
s = "0" + input()
l = len(s) - 1
c = l * ~-l * 2
for i, j in pr(range(1, l+1), 2):
    if (i > j and s[i] == "D") or (i < j and s[i] == "U"):
        c -= 1
print(c)

Submission Info

Submission Time
Task B - Evilator
User orangecolor
Language Python (3.4.3)
Score 0
Code Size 213 Byte
Status TLE
Exec Time 2104 ms
Memory 7924 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 400
Status
AC × 2
AC × 4
TLE × 8
Set Name Test Cases
Sample s1.txt, s2.txt
All 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, s1.txt, s2.txt
Case Name Status Exec Time Memory
01.txt TLE 2104 ms 7924 KB
02.txt TLE 2104 ms 7924 KB
03.txt TLE 2104 ms 7924 KB
04.txt TLE 2104 ms 7924 KB
05.txt TLE 2104 ms 7924 KB
06.txt TLE 2104 ms 7924 KB
07.txt TLE 2104 ms 7924 KB
08.txt TLE 2104 ms 7924 KB
09.txt AC 17 ms 3060 KB
10.txt AC 17 ms 3060 KB
s1.txt AC 17 ms 3060 KB
s2.txt AC 17 ms 3060 KB