1936 | 2022-12-12 07:46:39 | CodeBreakers | Kvázi-Izogram | python3 | Time limit exceeded 80/100 | 1.075s | 14308 KiB |
#import sys
#sys.stdin=open("input1.txt","r")
x=0
abc = 'abcdefghijklmnopqrstuvwxyz'
n=int(input())
mondatok=[]
for i in range(n):
mondat=input()
mondatok.append(mondat)
def fgv(t):
for k in range(len(t)):
c = 0
for l in range(len(t)):
if t[k]==t[l]:
c+=1
if t[k] not in abc:
c -= 1
if c > 2:
return 0
if c<=2:
return 1
for i in mondatok:
a = ""
for j in i.split():
for k in j:
a+=k
x+=fgv(a.lower())
print(x)
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 18ms | 11164 KiB | ||||
2 | Accepted | 17ms | 11608 KiB | ||||
subtask2 | 30/30 | ||||||
3 | Accepted | 16ms | 11512 KiB | ||||
4 | Accepted | 17ms | 11856 KiB | ||||
5 | Accepted | 17ms | 12064 KiB | ||||
6 | Accepted | 20ms | 12176 KiB | ||||
7 | Accepted | 54ms | 13528 KiB | ||||
subtask3 | 50/50 | ||||||
8 | Accepted | 26ms | 12240 KiB | ||||
9 | Accepted | 26ms | 12344 KiB | ||||
10 | Accepted | 28ms | 12272 KiB | ||||
11 | Accepted | 29ms | 12840 KiB | ||||
12 | Accepted | 30ms | 12564 KiB | ||||
13 | Accepted | 32ms | 12876 KiB | ||||
subtask4 | 0/20 | ||||||
14 | Accepted | 96ms | 13084 KiB | ||||
15 | Accepted | 172ms | 13408 KiB | ||||
16 | Accepted | 333ms | 13832 KiB | ||||
17 | Accepted | 647ms | 14308 KiB | ||||
18 | Time limit exceeded | 1.054s | 6856 KiB | ||||
19 | Time limit exceeded | 1.075s | 7144 KiB | ||||
20 | Time limit exceeded | 1.054s | 7104 KiB |