Task: | Kirjat |
Sender: | ollpu |
Submission time: | 2015-10-01 11:07:43 +0300 |
Language: | Python2 |
Status: | READY |
Result: | 0 |
group | verdict | score |
---|---|---|
#1 | RUNTIME ERROR | 0 |
#2 | RUNTIME ERROR | 0 |
#3 | RUNTIME ERROR | 0 |
test | verdict | time | group | |
---|---|---|---|---|
#1 | RUNTIME ERROR | 0.05 s | 1 | details |
#2 | RUNTIME ERROR | 0.05 s | 1 | details |
#3 | RUNTIME ERROR | 0.06 s | 1 | details |
#4 | RUNTIME ERROR | 0.05 s | 1 | details |
#5 | RUNTIME ERROR | 0.06 s | 1 | details |
#6 | RUNTIME ERROR | 0.07 s | 1 | details |
#7 | RUNTIME ERROR | 0.07 s | 1 | details |
#8 | RUNTIME ERROR | 0.06 s | 1 | details |
#9 | RUNTIME ERROR | 0.06 s | 1 | details |
#10 | RUNTIME ERROR | 0.05 s | 1 | details |
#11 | RUNTIME ERROR | 0.14 s | 1 | details |
#12 | RUNTIME ERROR | 0.06 s | 1 | details |
#13 | RUNTIME ERROR | 0.05 s | 1 | details |
#14 | RUNTIME ERROR | 0.05 s | 1 | details |
#15 | RUNTIME ERROR | 0.06 s | 1 | details |
#16 | RUNTIME ERROR | 0.07 s | 1 | details |
#17 | RUNTIME ERROR | 0.06 s | 1 | details |
#18 | RUNTIME ERROR | 0.06 s | 1 | details |
#19 | RUNTIME ERROR | 0.05 s | 1 | details |
#20 | RUNTIME ERROR | 0.06 s | 1 | details |
#21 | RUNTIME ERROR | 0.06 s | 2 | details |
#22 | RUNTIME ERROR | 0.07 s | 2 | details |
#23 | RUNTIME ERROR | 0.05 s | 2 | details |
#24 | RUNTIME ERROR | 0.06 s | 2 | details |
#25 | RUNTIME ERROR | 0.06 s | 2 | details |
#26 | RUNTIME ERROR | 0.06 s | 2 | details |
#27 | RUNTIME ERROR | 0.05 s | 2 | details |
#28 | RUNTIME ERROR | 0.06 s | 2 | details |
#29 | RUNTIME ERROR | 0.05 s | 2 | details |
#30 | RUNTIME ERROR | 0.06 s | 2 | details |
#31 | RUNTIME ERROR | 0.05 s | 2 | details |
#32 | RUNTIME ERROR | 0.06 s | 2 | details |
#33 | RUNTIME ERROR | 0.05 s | 2 | details |
#34 | RUNTIME ERROR | 0.06 s | 2 | details |
#35 | RUNTIME ERROR | 0.05 s | 2 | details |
#36 | RUNTIME ERROR | 0.06 s | 2 | details |
#37 | RUNTIME ERROR | 0.07 s | 2 | details |
#38 | RUNTIME ERROR | 0.06 s | 2 | details |
#39 | RUNTIME ERROR | 0.06 s | 2 | details |
#40 | RUNTIME ERROR | 0.06 s | 2 | details |
#41 | RUNTIME ERROR | 0.07 s | 3 | details |
#42 | RUNTIME ERROR | 0.07 s | 3 | details |
#43 | RUNTIME ERROR | 0.06 s | 3 | details |
#44 | RUNTIME ERROR | 0.06 s | 3 | details |
#45 | RUNTIME ERROR | 0.06 s | 3 | details |
#46 | RUNTIME ERROR | 0.07 s | 3 | details |
#47 | RUNTIME ERROR | 0.06 s | 3 | details |
#48 | RUNTIME ERROR | 0.06 s | 3 | details |
#49 | RUNTIME ERROR | 0.06 s | 3 | details |
#50 | RUNTIME ERROR | 0.06 s | 3 | details |
#51 | RUNTIME ERROR | 0.06 s | 3 | details |
#52 | RUNTIME ERROR | 0.06 s | 3 | details |
#53 | RUNTIME ERROR | 0.06 s | 3 | details |
#54 | RUNTIME ERROR | 0.06 s | 3 | details |
#55 | RUNTIME ERROR | 0.05 s | 3 | details |
#56 | RUNTIME ERROR | 0.07 s | 3 | details |
#57 | RUNTIME ERROR | 0.05 s | 3 | details |
#58 | RUNTIME ERROR | 0.07 s | 3 | details |
#59 | RUNTIME ERROR | 0.06 s | 3 | details |
#60 | RUNTIME ERROR | 0.06 s | 3 | details |
Code
ÿþ# ! / u s r / b i n / e n v p y t h o n # - * - c o d i n g : u t f - 8 - * - f r o m s y s i m p o r t s t d i n f r o m s y s i m p o r t s t d o u t i m p o r t s y s d e f r e a d l i n e ( ) : r e t u r n s t d i n . r e a d l i n e ( ) . s t r i p ( ) n = i n t ( r e a d l i n e ( ) ) u o l e v i = r e a d l i n e ( ) . s p l i t ( ' ' ) m a i j a = r e a d l i n e ( ) . s p l i t ( ' ' ) k a a l e p p i = [ 0 ] * n p a i n o = [ ] # x = k i r j a , y = p ä i v ä , [ k i r j a ] [ p ä i v ä ] v a r a t t u = [ [ F a l s e f o r x i n x r a n g e ( n ) ] f o r y i n x r a n g e ( n ) ] f o r y i n x r a n g e ( n ) : u o l = i n t ( u o l e v i [ y ] ) u o l e v i [ y ] = u o l m a i = i n t ( m a i j a [ y ] ) m a i j a [ y ] = m a i p a i n o . a p p e n d ( u o l + m a i ) v a r a t t u [ u o l - 1 ] [ y ] = T r u e v a r a t t u [ m a i - 1 ] [ y ] = T r u e p a i n o _ o r d e r = s o r t e d ( x r a n g e ( l e n ( p a i n o ) ) , k e y = l a m b d a k : p a i n o [ k ] ) d e f s e t _ k a a l e p p i ( y , v ) : g l o b a l k a a l e p p i k a a l e p p i [ y ] = v d e f f i n d ( x ) : # E t s i "