Code Submission Evaluation System Login

Datatähti 2019 alku

Start:2018-10-01 00:00:00
End:2018-10-15 00:00:00
 

Tasks | Messages | Scoreboard | Statistics


CSES - Datatähti 2019 alku - Results
History
2018-10-14 22:10:070
2018-10-14 22:08:290
2018-10-14 22:02:250
2018-10-14 21:56:270
2018-10-14 21:54:540
2018-10-14 21:51:0360
2018-10-14 21:33:200
2018-10-14 21:29:110
2018-10-14 14:38:3460
2018-10-14 14:26:2160
Task:Leimasin
Sender:untokarila
Submission time:2018-10-14 21:51:03
Language:Python3
Status:READY
Score:60

Feedback

groupverdictscore
#1ACCEPTED29
#2ACCEPTED31
#3TIME LIMIT EXCEEDED0

Test results

testverdicttime (s)group
#1ACCEPTED0.04 / 1.001details
#2ACCEPTED0.05 / 1.001details
#3ACCEPTED0.04 / 1.001details
#4ACCEPTED0.06 / 1.001details
#5ACCEPTED0.05 / 1.001details
#6ACCEPTED0.04 / 1.001details
#7ACCEPTED0.05 / 1.001details
#8ACCEPTED0.05 / 1.001details
#9ACCEPTED0.05 / 1.001details
#10ACCEPTED0.05 / 1.001details
#11ACCEPTED0.05 / 1.001details
#12ACCEPTED0.05 / 1.001details
#13ACCEPTED0.05 / 1.001details
#14ACCEPTED0.04 / 1.001details
#15ACCEPTED0.05 / 1.002details
#16ACCEPTED0.04 / 1.002details
#17ACCEPTED0.05 / 1.002details
#18ACCEPTED0.04 / 1.002details
#19ACCEPTED0.04 / 1.002details
#20ACCEPTED0.05 / 1.002details
#21ACCEPTED0.05 / 1.002details
#22ACCEPTED0.05 / 1.002details
#23ACCEPTED0.04 / 1.002details
#24ACCEPTED0.04 / 1.002details
#25ACCEPTED0.05 / 1.002details
#26ACCEPTED0.04 / 1.002details
#27ACCEPTED0.05 / 1.002details
#28ACCEPTED0.04 / 1.002details
#29TIME LIMIT EXCEEDED-- / 1.003details
#30TIME LIMIT EXCEEDED-- / 1.003details
#31ACCEPTED0.86 / 1.003details
#32ACCEPTED0.05 / 1.003details
#33ACCEPTED0.04 / 1.003details
#34TIME LIMIT EXCEEDED-- / 1.003details
#35TIME LIMIT EXCEEDED-- / 1.003details
#36TIME LIMIT EXCEEDED-- / 1.003details
#37ACCEPTED0.06 / 1.003details
#38ACCEPTED0.06 / 1.003details
#39TIME LIMIT EXCEEDED-- / 1.003details
#40TIME LIMIT EXCEEDED-- / 1.003details
#41TIME LIMIT EXCEEDED-- / 1.003details
#42ACCEPTED0.04 / 1.003details

Code

def leimaa():

    tavoite = list(input())
    leimasin = list(input())
    smax = 10*len(tavoite)
    siirrot = 0
    paikat = []
    vanhat_paikat = 0

    while siirrot < smax:

        kelaaja1 = len(tavoite)-len(leimasin)
        while kelaaja1 >= 0:
            if kelaaja1 in paikat:
                kelaaja1 -= 1
                continue
            kelaaja2 = int(kelaaja1)
            kelaaja3 = 0
            oikein = 0
            while kelaaja3 < len(leimasin):

                if leimasin[kelaaja3] == tavoite[kelaaja2] or tavoite[kelaaja2] == "?":
                    oikein += 1
                    kelaaja2 += 1
                    kelaaja3 += 1
                else:
                    break

            if oikein == len(leimasin):
                for i in range(kelaaja1, kelaaja1 + len(leimasin)):
                    tavoite[i] = "?"
                paikat.append(kelaaja1)
                siirrot += 1
                break
            kelaaja1 -= 1

        if tavoite == ["?" for i in tavoite]:
            return print(siirrot), [print(d, end=" ") for d in reversed([i + 1 for i in paikat])]

        if len(paikat) == vanhat_paikat:
            return print(-1)

        vanhat_paikat = len(paikat)


leimaa()

Test details

Test 1

Group: 1

Verdict: ACCEPTED

input
BBBBBBBBBB
B
view   save

correct output
10
10 9 8 7 6 5 4 3 2 1
view   save

user output
10
1 2 3 4 5 6 7 8 9 10
view   save

Test 2

Group: 1

Verdict: ACCEPTED

input
AABBABABAB
AB
view   save

correct output
6
1 9 7 5 3 2
view   save

user output
9
1 4 3 2 6 5 8 7 9
view   save

Test 3

Group: 1

Verdict: ACCEPTED

input
AABAAABAAA
AABAA
view   save

correct output
4
6 5 2 1
view   save

user output
4
1 4 6 5
view   save

Test 4

Group: 1

Verdict: ACCEPTED

input
BAAAAAABBB
BAAAAAABB
view   save

correct output
2
2 1
view   save

user output
2
2 1
view   save

Test 5

Group: 1

Verdict: ACCEPTED

input
AAABBABBAA
AAABBABBAA
view   save

correct output
1
1
view   save

user output
1
1
view   save

Test 6

Group: 1

Verdict: ACCEPTED

input
GGGGGGGGGG
G
view   save

correct output
10
10 9 8 7 6 5 4 3 2 1
view   save

user output
10
1 2 3 4 5 6 7 8 9 10
view   save

Test 7

Group: 1

Verdict: ACCEPTED

input
QUUQUUQUQU
QU
view   save

correct output
6
9 7 5 4 2 1
view   save

user output
8
2 1 6 5 4 8 7 9
view   save

Test 8

Group: 1

Verdict: ACCEPTED

input
DWXDWDWXHJ
DWXHJ
view   save

correct output
3
1 4 6
view   save

user output
4
1 5 4 6
view   save

Test 9

Group: 1

Verdict: ACCEPTED

input
FSOCRDGQBB
FSOCRDGQB
view   save

correct output
2
2 1
view   save

user output
2
2 1
view   save

Test 10

Group: 1

Verdict: ACCEPTED

input
OETMIMPUPD
OETMIMPUPD
view   save

correct output
1
1
view   save

user output
1
1
view   save

Test 11

Group: 1

Verdict: ACCEPTED

input
DOWEUOWUEU
DOWEU
view   save

correct output
-1
view   save

user output
-1
view   save

Test 12

Group: 1

Verdict: ACCEPTED

input
JQZYVSIWTE
JQZVYSIWTE
view   save

correct output
-1
view   save

user output
-1
view   save

Test 13

Group: 1

Verdict: ACCEPTED

input
ABABABABA
ABA
view   save

correct output
4
7 5 3 1
view   save

user output
6
1 4 3 6 5 7
view   save

Test 14

Group: 1

Verdict: ACCEPTED

input
AAAAAAAAAA
AAAAAAAAAB
view   save

correct output
-1
view   save

user output
-1
view   save

Test 15

Group: 2

Verdict: ACCEPTED

input
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBB...
B
view   save

correct output
100
100 99 98 97 96 95 94 93 92 91...
view   save

user output
100
1 2 3 4 5 6 7 8 9 10 11 12 13 ...
view   save

Test 16

Group: 2

Verdict: ACCEPTED

input
BABABAAAAAAAAAAAAAAAAAABABAAAA...
BABAAAAAAA
view   save

correct output
36
87 43 24 1 91 79 69 68 67 66 6...
view   save

user output
90
1 4 5 6 7 8 9 11 12 13 14 15 1...
view   save

Test 17

Group: 2

Verdict: ACCEPTED

input
ABABAAAAABABBBBAAAABBBBAABBBBB...
ABABAAAAABABBBBAAAABBBBAABBBBB...
view   save

correct output
22
51 50 43 41 31 28 26 24 21 20 ...
view   save

user output
5
51 50 43 41 1
view   save

Test 18

Group: 2

Verdict: ACCEPTED

input
AAABABAAAABBBBBABABBAABBABABBA...
AABABAAAABBBBBABABBAABBABABBAB...
view   save

correct output
2
1 2
view   save

user output
2
1 2
view   save

Test 19

Group: 2

Verdict: ACCEPTED

input
AABABBBBBBAABBABABBBBBBAABBAAA...
AABABBBBBBAABBABABBBBBBAABBAAA...
view   save

correct output
1
1
view   save

user output
1
1
view   save

Test 20

Group: 2

Verdict: ACCEPTED

input
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSS...
S
view   save

correct output
100
100 99 98 97 96 95 94 93 92 91...
view   save

user output
100
1 2 3 4 5 6 7 8 9 10 11 12 13 ...
view   save

Test 21

Group: 2

Verdict: ACCEPTED

input
NNNININIMNIMKLMXCNIMKLMXCDEIMK...
NIMKLMXCDE
view   save

correct output
18
1 2 3 74 5 79 58 7 84 64 37 10...
view   save

user output
91
1 2 4 3 6 5 8 9 7 11 12 13 14 ...
view   save

Test 22

Group: 2

Verdict: ACCEPTED

input
VYQFNHMVTKOEYCXWINLKLHVFMEPQEU...
VYQFNHMVTKOEYCXWINLKLHVFMEPQEU...
view   save

correct output
3
51 2 1
view   save

user output
3
1 50 51
view   save

Test 23

Group: 2

Verdict: ACCEPTED

input
IISNROLHLOJIWPTVFHFLUQRIROVLYP...
ISNROLHLOJIWPTVFHFLUQRIROVLYPM...
view   save

correct output
2
1 2
view   save

user output
2
1 2
view   save

Test 24

Group: 2

Verdict: ACCEPTED

input
WPMEMERJXXADLKONUZPUUFTPSXDHIV...
WPMEMERJXXADLKONUZPUUFTPSXDHIV...
view   save

correct output
1
1
view   save

user output
1
1
view   save

Test 25

Group: 2

Verdict: ACCEPTED

input
LNSBGZAWFJZAWFJWFJLNSBLNSBGZAL...
LNSBGZAWFJ
view   save

correct output
-1
view   save

user output
-1
view   save

Test 26

Group: 2

Verdict: ACCEPTED

input
IPIPYFUMRIPYFUMRLPIIIPYFIPYFUM...
IPYFUMRLPSYSBQWHGXQWLHBXMXXEYB...
view   save

correct output
-1
view   save

user output
-1
view   save

Test 27

Group: 2

Verdict: ACCEPTED

input
ABABABABABABABABABABABABABABAB...
ABA
view   save

correct output
49
97 95 93 91 89 87 85 83 81 79 ...
view   save

user output
96
1 4 3 6 5 8 7 10 9 12 11 14 13...
view   save

Test 28

Group: 2

Verdict: ACCEPTED

input
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...
view   save

correct output
-1
view   save

user output
-1
view   save

Test 29

Group: 3

Verdict: TIME LIMIT EXCEEDED

input
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBB...
view   save

correct output
1000
1000 999 998 997 996 995 994 9...
view   save

user output
(no output)
view   save

Test 30

Group: 3

Verdict: TIME LIMIT EXCEEDED

input
BBBBBBBBAABBBBBBBBAABBBBBBBAAB...
view   save

correct output
218
1 626 607 519 415 5 975 957 92...
view   save

user output
(no output)
view   save

Test 31

Group: 3

Verdict: ACCEPTED

input
AABBBABAABABAAABBAAAAAAABBBAAB...
view   save

correct output
55
569 639 403 761 663 437 172 90...
view   save

user output
647
228 155 115 52 44 1 262 263 26...
view   save

Test 32

Group: 3

Verdict: ACCEPTED

input
ABBAAABAAABAAAAABBABABBABBABBB...
view   save

correct output
2
2 1
view   save

user output
2
2 1
view   save

Test 33

Group: 3

Verdict: ACCEPTED

input
BAAABBABBBAAAABAAAABBBBABAABAA...
view   save

correct output
1
1
view   save

user output
1
1
view   save

Test 34

Group: 3

Verdict: TIME LIMIT EXCEEDED

input
UUUUUUUUUUUUUUUUUUUUUUUUUUUUUU...
view   save

correct output
1000
1000 999 998 997 996 995 994 9...
view   save

user output
(no output)
view   save

Test 35

Group: 3

Verdict: TIME LIMIT EXCEEDED

input
KSBMRKKSBMRZXBDKSKSBMRZXBDAMRZ...
view   save

correct output
178
723 731 1 935 857 820 760 735 ...
view   save

user output
(no output)
view   save

Test 36

Group: 3

Verdict: TIME LIMIT EXCEEDED

input
ILYLILYLVJILYLVJZCCQDLFRLSXZDM...
view   save

correct output
21
671 54 747 504 113 1 856 764 5...
view   save

user output
(no output)
view   save

Test 37

Group: 3

Verdict: ACCEPTED

input
ZZJZNKHDLJBPXIAZNJIIGBEEJFSDAF...
view   save

correct output
2
1 2
view   save

user output
2
1 2
view   save

Test 38

Group: 3

Verdict: ACCEPTED

input
FIMWTOLSRKOWYDPCOFUJZMXJEJFKSU...
view   save

correct output
1
1
view   save

user output
1
1
view   save

Test 39

Group: 3

Verdict: TIME LIMIT EXCEEDED

input
AIVHCGUMKSTIYBRNPONXHRFVBKPYHX...
view   save

correct output
-1
view   save

user output
(no output)
view   save

Test 40

Group: 3

Verdict: TIME LIMIT EXCEEDED

input
QPMSLIDCLFLBEXGVVQQNSVKJYXGETC...
view   save

correct output
-1
view   save

user output
(no output)
view   save

Test 41

Group: 3

Verdict: TIME LIMIT EXCEEDED

input
ABABABABABABABABABABABABABABAB...
view   save

correct output
499
997 995 993 991 989 987 985 98...
view   save

user output
(no output)
view   save

Test 42

Group: 3

Verdict: ACCEPTED

input
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...
view   save

correct output
-1
view   save

user output
-1
view   save