1 n i i 1 i n index = 0; [ index] = 1; = = ; if ( == ) { // [ index ]++; } else if () { if( index == 0 ) { // // // // [ index ]++; = ; } else { // //

Size: px
Start display at page:

Download "1 n i i 1 i n index = 0; [ index] = 1; = = ; if ( == ) { // [ index ]++; } else if () { if( index == 0 ) { // // // // [ index ]++; = ; } else { // //"

Transcription

1 Copyright c 2008 The Japanese Committee for International Olympiad in Informatics

2 1 n i i 1 i n index = 0; [ index] = 1; = = ; if ( == ) { // [ index ]++; } else if () { if( index == 0 ) { // // // // [ index ]++; = ; } else { // // 1-1

3 [ index - 1 ] += [ index ] + 1; index--; } } else { // index++; [ index ] = 1; } = ; n 2 2 n O(n 2 ) O(1) O(n) 100% 1-2

4 2 1 x x. s t. s t n = max{ s, t }. 1 (O(n 4 ) ) s, t. s, s i j (1 i j s ), O( s 2 ). x t ( )., k (1 k t x + 1), t k x x, x y. O( x t )., k x,,., O( s 3 t ). s t, s O( s t min{ s 2, t 2 }), s t.,,, O( x + t ) Boyer Moore., O( s 2 t ). 2 (O(n 3 ) ) s, s t., 1 i s 1 j t i j, s i t j., i j s t, min{ s, t }, O( s t min{ s, t }). (O(n 2 ) ) s t, s t,. 2-1

5 , 0 i s, s i s t. s j t j a j = 1, a j = 0, a 1,..., a t 1 O( t ). 1 i = 1. s = BRACADABRA t = KCADADABRBCRDARA a = i, s t,. O( s t ). 2 n = 50 3, n = , 10..,,,,. s t (G L), G (E T), E (F, K, I, Y), KF (V, G, H), V (K, F, V), K C : 2 2-2

6 3 1 P 1,..., P N 4 M P 0 = 0 N + 1 P 0, P 1,..., P N a, b, c, d (0 a, b, c, d N) S a,b,c,d { Pa + P b + P c + P d P a + P b + P c + P d M S a,b,c,d = 0 P a + P b + P c + P d > M max S a,b,c,d 0 a,b,c,d N 1 (O(N 4 ) ) = 0 N + 1 (N + 1) 4 4 O(N 4 ) 0 a b c d N 4! = = 24 1 N = (O(N 3 log N) ) P a, P b, P c 4 P a + P b + P c + P d M d P d M (P a + P b + P c ) 3-1

7 d P d d P 0,..., P N O(log N) O(N log N) O(N 3 log N) N = (O(N 2 log N) ) (N +1) 2 Q 1 Q 2 Q r (r (N + 1) 2 ) O(N 2 log N) 2 Q i Q i + Q j M j Q j j O(log N) i (1 i r) j O(N 2 log N) O(N 2 log N) N N, M N M

8 ,2 1 Danger(i, j, l) i j l Danger(i, j, l) 0 i = n i = n 1 l < m 1 j k i+1 j (d i,j + d i+1,j ) x i,j x i+1,j + Danger(i + 1, j, l) l < m 1 j k i+2 j (d i,j + d i+2,j ) x i,j x i+2,j + Danger(i + 2, j, l + 1) 1 j k 1 j Danger(1, j, 0) m > 0 1 j k 2 j Danger(2, j, 1) 4-1

9 k m nc i k n i i=0 n 20% 2 1 A B,C A i + 1 j a B, C i j b, j c B Danger(i, j b, l) A Danger(i + 1, j a, l) A C Danger(i, j c, l) A Danger(i + 1, j a, l) A 1 3 memo -1 Danger(i, j, l) memo[i, j, l] = 1 1 memo[i, j, l] memo[i, j, l] 1 memo[i, j, l] k 4-2

10 Danger i, j, l 3 1 2k k 0 Danger i, j, l 2k = n k (m + 1) 2k 2nmk 2 O(nmk 2 ) 3 2 memo memo memo n 1 j k n, 0 l m j, l memo[n, j, l] = 0 n 1 1 j k n 1, 0 l m 1 j, l memo[n, j, l ] = 0 l = m i j l memo[i, j, l] 1 j k i+1 j (d i,j + d i+1,j ) x i,j x i+1,j + memo[i + 1, j, l] l < m 1 j k i+2 j (d i,j + d i+2,j ) x i,j x i+2,j + memo[i + 2, j, l + 1] memo[i, j, l] 1 i 1 j k 1 j memo[1, j, 0] m > 0 1 j k 2 j memo[2, j, 1] 4-3

11 k i j l 2k k 0 l m l m + 1 i 1 j k j k 1 i n i n 2k (m + 1) k n 2nmk 2 2 O(nmk 2 )

12 5 c 0, c 1,, c n i(0 i < n) c i < a 1, a 2 < c i+1 2 a 1, a 2 a 1, a 2 () c 0 n c 0, c 1,, c n 0, 1,, n c n n 2n % w, h 100 n n n O(n 3 ) m(x, y) i(0 i < n) (a i, b i ) (c i, d i ) m (x, y) (a i, b i d i ) 1 (c i + 1, b i d i ) 1 m(x, y) = x k=0 m (k, y) O(n 2 ) m(x, y) = 0 m(x, y) = 0 m(x, y) = 0 x, y m(x, y) m(x±1, y), m(x, y±1) m(x±1, y), m(x, y±1) m(x, y) m(x, y) = 0 x, y m(x, y) = 0 x, y 5-1

13 3 n O(n 2 ) 5-2

京都造形芸術大学 大学院 芸術研究科(通信教育)芸術環境専攻 修士課程 学生募集要項2017

京都造形芸術大学 大学院 芸術研究科(通信教育)芸術環境専攻 修士課程 学生募集要項2017 1. 2. 3. index 1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 6 7 8 1 2 1 1 2 3 4 2 5 3 6 7 5 7 8 4 8 5 9 6 10 1 5 7 8 11 9 12 10 1 2 11 12 5 13 14 15 3 4 16 17 5 18 19 20 4 21 1 22 2 23 3 8

More information

28 27 8 4 10 17 2 27 8 7 14 00 1 27 8 14 15 00 2 27 8 21 15 00 1 4 5 2 6 1 27 ABCD 6 2 2 5 5 8% 108 100 49 2 13 140 22 12 7 153-8501 19 23 03-5478-1225 27 8 4 (1) (2) (3) (1) (2) (3) (4) (5) (6) (7) (8)

More information

... 3... 3... 3... 3... 4... 7... 10... 10... 11... 12... 12... 13... 14... 15... 18... 19... 20... 22... 22... 23 2

... 3... 3... 3... 3... 4... 7... 10... 10... 11... 12... 12... 13... 14... 15... 18... 19... 20... 22... 22... 23 2 1 ... 3... 3... 3... 3... 4... 7... 10... 10... 11... 12... 12... 13... 14... 15... 18... 19... 20... 22... 22... 23 2 3 4 5 6 7 8 9 Excel2007 10 Excel2007 11 12 13 - 14 15 16 17 18 19 20 21 22 Excel2007

More information

http://banso.cocolog-nifty.com/ 100 100 250 5 1 1 http://www.banso.com/ 2009 5 2 10 http://www.banso.com/ 2009 5 2 http://www.banso.com/ 2009 5 2 http://www.banso.com/ < /> < /> / http://www.banso.com/

More information

n=360 28.6% 34.4% 36.9% n=360 2.5% 17.8% 19.2% n=64 0.8% 0.3% n=69 1.7% 3.6% 0.6% 1.4% 1.9% < > n=218 1.4% 5.6% 3.1% 60.6% 0.6% 6.9% 10.8% 6.4% 10.3% 33.1% 1.4% 3.6% 1.1% 0.0% 3.1% n=360 0% 50%

More information

項 目

項 目 1 1 2 3 11 4 6 5 7,000 2 120 1.3 4,000 04 450 < > 5 3 6 7 8 9 4 10 11 5 12 45 6 13 E. 7 B. C. 14 15 16 17 18 19 20 21 22 23 8 24 25 9 27 2 26 6 27 3 1 3 3 28 29 30 9 31 32 33 500 1 4000 0 2~3 10 10 34

More information

●70974_100_AC009160_KAPヘ<3099>ーシス自動車約款(11.10).indb

●70974_100_AC009160_KAPヘ<3099>ーシス自動車約款(11.10).indb " # $ % & ' ( ) * +, -. / 0 1 2 3 4 5 6 7 8 9 : ; < = >? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y " # $ % & ' ( ) * + , -. / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B

More information

tomo_sp1

tomo_sp1 1....2 2....7...14 4....18 5....24 6....30 7....37 8....44...50 http://blog.garenet.com/tomo/ Copyright 2008 1. Copyright 2008 Copyright 2008 Copyright 2008 Copyright 2008 Copyright 2008 Copyright 2008

More information

untitled

untitled Copyright 3269 34 Copyright 3269 34 Copyright 3269 34 Copyright 3269 34 Copyright 3269 34 Copyright 3269 34 Copyright 3269 34 Copyright 3269 34 Copyright 3269 34 Copyright 3269 34 Copyright 3269 34 Copyright

More information

2. (297) 91 (365) (366) (371) (673) (938) (64) 85 (91) (631) (561) (302) (616) 63 (906) 68 (338) (714) (747) (169) (718) 62 (1,063) 67 (714) (169) (90

2. (297) 91 (365) (366) (371) (673) (938) (64) 85 (91) (631) (561) (302) (616) 63 (906) 68 (338) (714) (747) (169) (718) 62 (1,063) 67 (714) (169) (90 1. (297) 91 (365) (366) (938) (371) (673) 68 (338) (473) (864) (396) (939) (217) (616) 89 (371) (673) (91) (938) (297) 82 (302) (938) (631) (297) (616) (91) 76 (203) 81 (561) (263) (64) (644) (616) 65

More information

2. (1,009) 45 (368) (226) (133) (54) (260) 25 (446) 30 (774) (156) (805) (244) (652) 22 (128) (652) (157) (597) (805) (446) 30 (774) 35 (238) (581) (1

2. (1,009) 45 (368) (226) (133) (54) (260) 25 (446) 30 (774) (156) (805) (244) (652) 22 (128) (652) (157) (597) (805) (446) 30 (774) 35 (238) (581) (1 1. (189) 42 (133) (362) (93) (1,009) (260) (331) (189) (581) (238) (123) (140) (123) (362) (140) (238) (189) (581) (140) 41 (260) (93) (362) (1,009) (189) 21 (440) 26 (805) (597) (128) (446) (157) (362)

More information

「産業上利用することができる発明」の審査の運用指針(案)

「産業上利用することができる発明」の審査の運用指針(案) 1 1.... 2 1.1... 2 2.... 4 2.1... 4 3.... 6 4.... 6 1 1 29 1 29 1 1 1. 2 1 1.1 (1) (2) (3) 1 (4) 2 4 1 2 2 3 4 31 12 5 7 2.2 (5) ( a ) ( b ) 1 3 2 ( c ) (6) 2. 2.1 2.1 (1) 4 ( i ) ( ii ) ( iii ) ( iv)

More information

untitled

untitled 280 200 5 7,800 6 8,600 28 1 1 18 7 8 2 ( 31 ) 7 42 2 / / / / / / / / / / 1 3 (1) 4 5 3 1 1 1 A B C D 6 (1) -----) (2) -- ()) (3) ----(). ()() () ( )( )( )( ) ( ) ( )( )( )( ) () (). () ()() 7 () ( ) 1

More information

総合補償保険(普通傷害保険)ご契約のしおり

総合補償保険(普通傷害保険)ご契約のしおり 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 0120-25-7474 27 28 29 1170 33192 33128 37152 28245 1473 57 80 30 31 3510565 32 180 32 32 180 33 180 181 13 180 180 104 11 34 180 10

More information

普通傷害保険ご契約のしおり

普通傷害保険ご契約のしおり 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 0120-25-7474 22 23 24 25 1170 33192 33128 37152 28245 1473 57 80 26 27 3510565 28 180 32 32 180 29 180 181 13 180 180 104 11 30 180 10 90 180 31 32

More information

森林火災保険ご契約のしおり

森林火災保険ご契約のしおり 1 0120-25-7474 2 20 3 50 50 50 20 20 80 1 4 30 125cc 5 500 30 10 20 20 300 72 301,000 6 19 7 19 19 14 32 12 8 13 15 16 16 1820 17 20 9 26 30 180 90 22118 60 180 24205 28 80 10 500 500 500 20 20 20 300

More information

2

2 1 2 119 119 5 500 1 30 102 1 113 3 4 120 2 3 113 5 230 1 1 3 4 5 6 7 8 1 [email protected] 2 9 3 ( ) 10 11 12 4 1. 2. 3. 4. 13 5 14 15 16 17 18 19 [ ] [ ] 20 [ ] [ ] [ ] 21 22 [ ] 23 < > < >

More information

1 1 2 65

1 1 2 65 3 3 2000 6 14 2 30 4 2 1 1 2 65 1!?? < > 3 2 2 100 19 19 100 100 100 < > 19 2 2 2 2 < > 2000 2000 50 1945 5 50 1945 5 45 20 20 4 1945 4 5 5 5 100 50 20 5 2 20 5 20 5 5 6 20 6 19 5 5 6 5 6 2 20 6 21

More information

AHPを用いた大相撲の新しい番付編成

AHPを用いた大相撲の新しい番付編成 5304050 2008/2/15 1 2008/2/15 2 42 2008/2/15 3 2008/2/15 4 195 2008/2/15 5 2008/2/15 6 i j ij >1 ij ij1/>1 i j i 1 ji 1/ j ij 2008/2/15 7 1 =2.01/=0.5 =1.51/=0.67 2008/2/15 8 1 2008/2/15 9 () u ) i i i

More information

untitled

untitled 1 ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) 2 ( ) 1 ( ) ( ) ( ) ( ) 3 ( ) a b ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) 4 ( ) ( ) ( ) ( ) ( ) ( ) < > 5 a b c d ( ) ( ) ( ) ( ) ( ) 18 73 ( ) ( ) a b 6 6 c ( ) (

More information

*2015カタログ_ブック.indb

*2015カタログ_ブック.indb -319 -320 -321 -322-40 1600-20 0 20 40 60 80 100 1600 1000 600 400 200 100 60 40 20 VG 22 VG 32 VG 46 VG 68 VG 100 36 16 ν opt. 10 5 5-40 -25-10 0 10 30 50 70 90 115 t min = -40 C t max = +115 C 0.5 0.4

More information

ICT 5,293 (2012 3 31 ) http://www.nttcom.co.jp/employ/recruit/ 4. IT IT / / IT / / . BB http://recruit.softbank.jp/graduate/ 3-7-1 28 29 URL.http://www.nliro.or.jp 2014 . ( ) 10 ( ) < > / < > . ( )

More information

2

2 1 2 10 14 945 3000 2012 3 10 4 5 6 7 8 9 10 11 12 2011 11 21 12301430 (1215 ) 13 6 27 17 () ( ) ( ) (112360) 2 (1157) (119099) ((11861231) )( ) (11641205) 3 (1277) 3 4 (1558) (1639)() 12 (1699)( ) 7 (1722)

More information