Successfully reported this slideshow.
Upcoming SlideShare
×

# ICPC国内予選F解説

4,168 views

Published on

matroid intersection

Published in: Technology
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Dating for everyone is here: ❶❶❶ http://bit.ly/2F90ZZC ❶❶❶

Are you sure you want to  Yes  No
• Sex in your area is here: ♥♥♥ http://bit.ly/2F90ZZC ♥♥♥

Are you sure you want to  Yes  No

### ICPC国内予選F解説

1. 1. 2015/07/23 © 9 mo 7“; B / ut" I7~1\$i£ F wﬁiiéﬁ w&0ELtv+n4Hw%m Fiﬁ}? (©tmaehara)
2. 2. Faﬁﬁﬁéﬁﬁﬁ «- a%raw"a 7 G = (V, E): aEE%v! ;5zkn<'5z vs M 0 %-\$3‘Z(3t§5'>*w(e) E ZZOE 5 N)l»l(e) E {A, B}"&’E '3 o A\$3'Z73*'TJ'3"Elc2|§’C'3I'>%> J: 5 7Zt\$1‘ﬁ£7|!0)5 75 —§%”cL°E; ODE 3KK’)¢JZ
3. 3. 3.*§Eﬁ’= E( 5 '75 ‘J ‘)1 \$}§\$l]) A&®E\$Eé%+AbEE\$EwA wmvaﬁmgmxzru) @- T()) 73* TJ'§*'Zk2|§A7f3'Z€‘ {\$0 T l, 1’L(i', T(A)(iEE: "ciEﬁ’= I'= -19%: w; ‘(T) = w(T) + A X T0) A\$3‘Z7|§§<‘5I HE§'zi? ﬁﬁ\$’& T*<‘: 3'5 t 1U)(T())) g 'w>(T*) A1‘3'Z2|§’s'\$5I7J"%L; L0)‘C'w(T())) 3 w(T*)
4. 4. 7|‘”f ‘J | ~ lac M: mu? » T(A)(3t¥§§§5I35§ we Lnzw @- ‘E”cf%.5(/3 k: E [[61, ]<32](CO l, _C A1‘3lZk71§(D | /| ST7'JW\$T: E = > r A\$§aE: ‘s’v0) T(A)J (: ;\$aLoo"(m(: £+éa (Kruska| "C'A\$3‘Z’E’1§5'E3'§>JZ5 5z47"IJ«r0a“z>> ->I<C 0) '| ‘EF_’E% 0) “E 0) 75' E15 F'u'175'= E7J" Yandex Algorithm 2015 Round 2.2 (C . ':| :': _C L7.': % 5 -0?’ 3/ 19
5. 5. 7|‘”f ‘J | ~ 0)§IE|3H( ¥\$f'= E) ﬁﬂ éiE?7|<J wﬁiﬁ/ AIE; #31:). E? E:u':0) éi§, ?7|iT1,T2<‘: Ego) e E T1T2(: ’3l, ‘C 3?_)5f€T2T173W\$7:l—: Lz, T1—e+f, T2+e—f73" teugmxtma ago ﬁxxxsmxj 0)§¥£&’x_§\$E). ‘EE%?0)nE; -'¢IJé1‘§, E7|<T1, T22: EEG) e 6 T1 T2(Z’) [AT 323%» f€T2T173*'? ¥7(£L, , T1 —e+f, T2+e—f7J" aeuﬁmgmxama EEC) §IEEJ51. é1§E7K§1’ﬁCL‘IE(/3 e, _f€‘t 5. 10(6) 75 'w(_f)<‘: 5'5 t §ﬁbEE55@#, \$0§U\$H\$tE5 4/ 19
6. 6. \$4:/ hwﬁwﬁ 761 21:0) EE: 'i’J‘§i3Z7K T1, 792 21:0) EE"i/1\$3t§Z7KT2 E’ C 5) MST5'§1ﬁ. ’L§IE7J‘5 T1 T2<‘: T2 T1®1‘3lZ’E‘ 3'51ﬁ_C'?3. 3'§1§5_5t T15: T211/5 ‘J’7"1:tEFni"E—C'1'/ f*'§'"Oi’i’D"< 571535 : ’ﬁ5Té0 £23‘: t ‘C'T173‘B T2’E? 'ﬁE. =:S'{F /111 73*"C'%5 /17x_| :’C'1 3i‘~5E33«‘: 5, A\$3'Z2|§ﬁ(iT%'/217Z-_"(‘f2'Z1l: w\$%\$®AH\$ﬂ#khmm®? ,%®ﬁ®? &t®k# : ®K1LEmﬁ? %®TEﬂ#%5
7. 7. t0m? ,N5x@AE§ALT min. f(a: ) -1- )g(:1:) c‘: §1ﬁ3'5\$\$£"a"r 5 ’7"5 ‘J°J": L ﬁ’= }§\$| JJ t L5 (c£575>§1\$E%ﬁ\$) HEx—'ciE'l| :ﬁ¥1"‘C'0)*i‘E-': |:. '5' '3 : “J '9 ; LlZ1|%“C'3'
8. 8. CC7J‘5?| ~|I| ’f F
9. 9. 3.*§E2”5|Jﬁ’4’= ( ? |~ III 4 F 35%) %(atC0)F: FJi'= E(iT E31153? | ~|Z|4 F§%J ‘C? ’ L(: fB< 7 | ~|I| ’f F0)—F}§<“Eﬁ(: ’Jl, ’CEﬁEHL; éE? '
10. 10. 7 | ~III4 F( Eﬁ’sEI: cJ:5E%) \$1%‘Ec‘: .’§. ‘f5\$J‘\$€r1i’9EB Q 2E0). ‘ﬁﬂ(E, l3)73"7 F III 4 F iff an 3750 o Iifaff/ )X, Y€Bt e€XYI: ’JI. IC \$35f€YX7JW¥4:Eb‘CX—e+f, Y+e—fEB I= {I§E: I§B, B€B}:5J\$1"L\$f: *.‘1i’aE o §i§, E7|! \$I7I<Ii7 | ~ III 4 F ( é1‘ﬁ, I7|<3'E1ﬁ’AIi¥) 0 35%/ Iéi§, E7IiéI7l<I; t7 | ~ III 4 F ( HEs—'¢IIéi§, ?7|<3'E1£’&’z§\$£¥) an A\$3'Z73"Tf§Zk2I§IC'\$>5 \$3‘Z\$§\$I7JSI; t7 F III 4 F 9/ 19
11. 11. ? I III 4 F 0)aE'§iE'I\$IEiE Wiulaeww : E —> RI: wrap HE: -'aiEI| :F'uEIx'? =E min. w(X) s. t. X E B §§(Eaﬁ%7hn4F®%ﬁHﬁE) X 73*‘ :0) BE: -'¢iEI| :F'uEI: i'r§0) n%i? ﬁﬁ\$‘C' \$3 Z9 ; IZ§+\$a‘%I¢I: ; II%?0)eeXt f eEX: X—e+f EBI: ’)I. ‘C w(X) S w(X — e+ f)-
12. 12. 7ID4F®%ﬁﬁﬁﬁ®ﬂ% M§ﬁm%Bb. +ﬁﬁ®a X‘: /E ‘J ’J"f'tE%"E(/3 fé-I|13|E’C'—%i&LH'E: —'<iEﬁ\$X*’aEt U . X 75 X* c‘: IJiEL; IC3'E1fa'&’AIj¥3'5 %1‘1=73‘B, <‘: "5 3'E1£'&L: ICE X0)Ec7>*I; t7F% or i%7JI: I i%7JI]0)c‘: 2* X*0)E5’>*I; t;‘IE? ’}‘? '5 73", % 9(I. I1EE: —'aiE'| \$I. I 59% JIOT, <‘: "’)3"E1ﬁLz? £E5’>*Ii7F§ 4iE: > 7.’3'E1ﬁ? §:XIC¢JI U i&I. EE: *4iIﬁﬁ’= I°= X*'73"45'I= '5 115 73" C1’LIEIZ—§i&I. ’60)’a"H¥'3 7'. ':C<‘: IC7T’E; ct’) TX = X*
13. 13. E%ﬁi min. w(X) s. t. X E B 1. X = (Z)7J‘I5 Fa'-ﬁiléu‘ 2mX+eEIU5eEE#ﬁEbEHﬂﬁ%T 3. e E argmin{w(e) : X + e E I}"& XI: iE1]| ZI, 2/ EE- E&Eu7hD4FLw%ﬁmﬁEEﬁ%Eﬁ<
14. 14. Emiwﬁﬁﬁﬂw <—4wwmH; %#%ﬁﬁ@@&ﬁt¢: a&m% X§mm. eeX, X—e+feBE%z5 e1J"E§X; ‘i= CC'iE7JIJé TL5 TIEIIOD C c‘: ‘E 557; 5 r‘: ft iE1JIJ‘C'%‘-3 5 I| §‘e¥ﬁ7'. ':"o 7:: I13”. L 73‘ L Eﬁﬁizﬁd) E31? 73‘ B w@)swU? m®? ,%ﬁﬁﬁﬂ#E%énE.
15. 15. E59 IT'S 7 F III 4 F §%F= EIE'= E EU E_I:0)7 F III 4 F B1,B2. \$\$§1_’Iaa§I§w : E —> RIC \$155 EE: "c5EII3Ian'17T= E min. w(X) s. t. X 6 B1 0 B2 FF'= FI%§IaII éﬁm t I AI‘3'ZT£"Ek: II§IJ 037 FIII4 Fs*c%
16. 16. 7 F III 4 F §%0) aEs"ziE'| ‘SEIEIE EE(7FD4F§%®%ﬁH; ﬂW%X ’w(X)Sw(X—€1+J°1—'°°—€r+fv~) where X_ei+. fiEB1» X+. fi_ei+1 €32. 03¢‘: =8 XIaIH5iE 4 >‘ — °J": X7J‘5 61¢‘: f1"é5'EI‘§&Lz'C5'7*5 B2 FﬁIIﬁ’= 'J"& EBI5 (D T‘ 62 E I; ?Ia 'C 4E'I'fEI'? B1 FﬁIIﬁ’1'~J’EI': I§i5 (D T‘ f2 E I3?1?I. 'C IEIF5
17. 17. HEs—'ciE'| ‘EEI§'5i¥I: I ‘;3IEEEH%IE'a'1“C' ¥| IEIC' 2* 5 _XtEX#BE52ﬂ757E%i5 (eﬁEmEﬁ, fHEﬂEé) 7.-EIﬂ'IIE, 'I%IC E55‘ —w(e), 7E‘I, EJIIE. '§IC E55‘ w(f) E §<? II7E'Ts e E X: f e EXb*'B1?-s*cIﬁEIﬁEcDt 3 (e, j-‘)I. :I3E e E X: f e EXbIB2?-sfiﬁﬁlﬁawt 3 (j-‘, e)I: I3E C 0) U" 5 7 IC'E'5'c%_. ELI”t%F'nEI%E"a” ﬁ’= I=< c‘: EEs—'aﬁ'| ‘\$7J*' ¥IIEEIﬁI3: H'Es—'c§_€I“t%II5€-I’) ICIEIJEISE55 t 7)LII"J 7i'LIII5 7215 ( 2 E‘| I’7'57 E51537‘) 5‘J’J"t IiE<‘: /1/EEC 511%)
18. 18. SEE &hU#EUTm5:t: I 7 F III 4 F 3'E%IC'ﬁ’= I=I‘I5 F'uEI7?EI3t’E; 0 c‘: FéE'I\$I. I ﬁ\$I‘I5 J T—%§%7wjUXAHﬁﬁﬁﬂEEH? ﬂ<iitﬁﬁ bbb, §WWUﬁE®%é, £otUv5U%ﬁ#ﬁE = >—%7Fn4F§%E¥%55t ﬁm? §J0£%%§mEE55&¥%£i% EWmu7Fn4F§%Eﬁ<%§wﬁﬁ; I7Fn4F§%®%ﬁﬁEﬂJEﬁ%m5%
19. 19. F F'n'15'§I. I \$615‘ 5 EE>'—ziEI\$I§IE @- X73" FF: :EIE'LE0) EEs"ciIﬁﬁ’= I iff XIII A1525‘ TI3”'§l<:2I§’é‘5’7* w(X) g w(X — e + f); e, _f: IEI5 NIL‘ 3'EIﬁEIﬁ"é = > . ‘ﬁ‘§TH%I: C 0) %I*I= b*'757': 2‘ I15 7:'; ‘£7?; B IEIIG E IEﬁ’= I= Eg<74¥7x ﬁ%E§Eﬁ(A&ﬁ<-Ahé-ﬁ<-An5)Et5 Cnﬂﬁwté, -ﬂEm0mLTﬁhﬁ§E£#tn5 £4 ‘J I~ : I TI'§*'ZkIIEIJ 0)? I~ III4 FbIi%FJ\$I: IZ27¥L7t; L0)t- I i§\$ﬁH'~J7:; 351521 ’E4‘%‘Z5 aZ§b*'£I%< 72:2 ’CL5 ( Trs= tkI@ﬁ%II%'~J0> 15%. \$E7373*'IﬁI7 I~ III 4 Ft-t W5) 18/ 19
20. 20. ﬁ’4’= "1é. '~I§| J ‘ICE: 0 I355 / UL AQWEIJ T MST o AI‘3‘ZﬁO"< 7:'IETIT'—%§"t< I‘3‘Z§Iﬁ 2 O E: 0 AI‘3'Z7': " I7‘ T‘ MST oBHE1\$TOH§ﬁ t" 75 B E e, f7J*'”£I| :.II 7J‘b‘5 ﬂ%F'aEI"& §¥IIIﬁI9”5 t HE: —'<ﬁ'I‘€EIE'£E0) EIZ1"L’E I'1E§r"£IT' E? 5