# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
382925 | Alexandra | Karte (COCI15_karte) | Cpython 3 | 19 ms | 3072 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
s = input()
v = []
out = [13 for i in range (4)]
dupli = []
for i in range (0, len(s), 3):
a = [s[i], int(s[i+1]+s[i+2])]
v.append(a)
for i in range (len(v)):
for j in range (len(v)):
if i==j:
continue
elif v[i]==v[j]:
if v[i] not in dupli:
dupli.append(v[i])
if len(dupli)!=0:
print ("GRESKA")
else:
for i in range (len(v)):
if v[i][0] == "P":
out[0] -= 1
elif v[i][0] == "K":
out[1] -= 1
elif v[i][0] == "H":
out[2] -= 1
elif v[i][0] == "T":
out[3] -= 1
print (str(out[0]) + " " + str(out[1]) + " " + str(out[2]) + " " + str(out[3]))
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |