1932 | 2022-12-11 23:36:50 | mintaaron | Kvázi-Izogram | python3 | Time limit exceeded 80/100 | 1.082s | 13964 KiB |
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 | 17ms | 11160 KiB | ||||
2 | Accepted | 17ms | 11212 KiB | ||||
subtask2 | 30/30 | ||||||
3 | Accepted | 17ms | 11568 KiB | ||||
4 | Accepted | 17ms | 11892 KiB | ||||
5 | Accepted | 17ms | 12200 KiB | ||||
6 | Accepted | 19ms | 12528 KiB | ||||
7 | Accepted | 54ms | 13964 KiB | ||||
subtask3 | 50/50 | ||||||
8 | Accepted | 25ms | 12324 KiB | ||||
9 | Accepted | 27ms | 12400 KiB | ||||
10 | Accepted | 28ms | 12452 KiB | ||||
11 | Accepted | 29ms | 12544 KiB | ||||
12 | Accepted | 30ms | 12516 KiB | ||||
13 | Accepted | 32ms | 12656 KiB | ||||
subtask4 | 0/20 | ||||||
14 | Accepted | 96ms | 12816 KiB | ||||
15 | Accepted | 172ms | 12700 KiB | ||||
16 | Accepted | 330ms | 13184 KiB | ||||
17 | Accepted | 648ms | 13780 KiB | ||||
18 | Time limit exceeded | 1.062s | 6256 KiB | ||||
19 | Time limit exceeded | 1.082s | 6340 KiB | ||||
20 | Time limit exceeded | 1.082s | 6536 KiB |