ããã°ã©ããŒã®åœé倧äŒã§ãããã·ã¢ã³ãŒãã«ãã2016ã®æ¬¡ã®äºéžã©ãŠã³ããçµãããŸãã ã ãããŠã確ç«ãããäŒçµ±ã«åŸã£ãŠãæåŸã®ã©ãŠã³ãã§åºå Žè ã«æäŸãããåé¡ã®è§£æ±ºçãç¥ãããšãå§ããŸãã ä»åã¯6ã€ã®ã¿ã¹ã¯ããããŸãããããããã解決ããããã«ãŸã 2æéãå²ãåœãŠãããŠããŸããã 604人ã次ã®ã©ãŠã³ãã®ããã«æŠã£ã ã RCCã¯ãè±èªã話ãåå è ãå«ãåããŠéå¬ãããŸãã çµæã¯ããã«çŸããŸãã-ãã·ã¢èªã話ãããã°ã©ããŒã¯æ·±å»ãªç«¶äºã«çŽé¢ããã§ãããã 50人ã決åæŠã«é²ã¿ããã®ãã¡19人ã¯ãã·ã¢èªåã®åå è ã§ã¯ãããŸããã ãã¡ã€ããªã¹ãã®äžã«ã¯ããã·ã¢ããŠã¯ã©ã€ãããã©ã«ãŒã·ããªãã¢ãã¢ãã¹ãããã¢ãã¢ã«ã¡ãã¢ãããŒã©ã³ããã¹ã€ã¹ããã£ã³ã©ã³ããæ¥æ¬ãäžåœãéåœã®ä»£è¡šè ãããŸãã
ã¿ã¹ã¯A.è©Šéš
ç¶æ
å¶éæé 2ç§
256 MBã®ã¡ã¢ãªå¶é
ããã«ãã³ãªã€ã¯éèŠãªã³ã³ãããŒã«ãäœæããå¿ èŠããããããæ éã«æºåããããšã«ããŸããã 圌ã¯ãã³ã³ãããŒã«ã«nåã®ãªãã·ã§ã³ãããããã®ãã¡içªç®ã1ããm iãŸã§ã®çªå·ãä»ããããm iåã®ã¿ã¹ã¯ã§æ§æãããããšãçºèŠããŸããã åãªãã·ã§ã³ã®ã¿ã¹ã¯ããšã«ãKolyaã¯æét ijåãæšå®ããŸããã
å¶åŸ¡äžã圌ã¯ã¿ã¹ã¯ãããŒãžã§ã³å ã«ããé åºã§å³å¯ã«è§£æ±ºããããšãèšç»ããŠããŸãã äœæ¥ã¯tåéç¶ãã³ã³ãããŒã«ã®çµäºãŸã§ã«åŒãæž¡ããªããã°ãªããŸããã ãã¡ãããKolyaã¯ã³ã³ãããŒã«ãç¡å¹ã«ããããšãã§ããŸããã圌ã¯ãããããŸãæ£ç¢ºã§ã¯ãªããšèããŠããŸãã ãããã£ãŠãç§ã¯ãã£ã1ã€ã®ã¿ã¹ã¯ãçä»ããæºåãã§ããŠããŸãã 圌ã¯ã t 0åãå²ãåœãŠã®åãæ¶ãã«è²»ãããŸãã
ä»ã圌ã¯ãã®ãã¹ãŠã®æ å ±ãç¥ã£ãŠããããã®ãªãã·ã§ã³ã«åºããããå Žåã«è§£æ±ºããæéãããã¿ã¹ã¯ã®æ°ãåãªãã·ã§ã³ããšã«èŠã€ããããšèããŠããŸãã
å ¥å圢åŒ
æåã®è¡ã«ã¯ã3ã€ã®æŽæ°n ã t ãããã³t 0 ïŒ1â€nâ€100ã1â€tâ€10000ã1â€t 0â€100ïŒãå«ãŸããŠããŸã-ãªãã·ã§ã³ã®æ°ãã³ã³ãããŒã«ã®æéãããã³Kolyaãã¿ã¹ã¯ã®æžã蟌ã¿ã«è²»ããæéã§ãã
次ã®nè¡ã«ã¯ããªãã·ã§ã³ã®èª¬æãå«ãŸããŠããŸãã æåã®æ°m i ïŒ1â€m iâ€100ïŒã¯ããªãã·ã§ã³iã®ãžã§ãã®æ°ã§ãã 次ã®m iã¯t ijã«çªå·ãä»ããŸãïŒ1â€t ijâ€100ïŒ-Kolyaãiçªç®ã®ãªãã·ã§ã³ã®jçªç®ã®ã¿ã¹ã¯ã®è§£æ±ºã«è²»ããæéã
åºå圢åŒ
åãªãã·ã§ã³ã«ã€ããŠã1è¡ã®æŽæ°-Kolyaããã®ãªãã·ã§ã³ã«ééããå Žåã«è§£æ±ºããæéãããã¿ã¹ã¯ã®æ°ãæ°ããè¡ã«åºåããŸãã
äŸ
å ¥åããŒã¿
4 45 5
5 10 10 10 10 10
4 30 10 10 10
3 40 40 5
1,100
ã€ã³ããªã³ã
5
4
2
1
解決ç
Kolyaã解決ããã¿ã¹ã¯ã®ãã¬ãã£ãã¯ã¹ã«ã€ããŠèª¬æããŸãã ãã¹ãŠã®ã¿ã¹ã¯ãèªåã§è§£æ±ºããå Žåã«è²»ããæéãšããã®å Žåã®1ã€ã®ã¿ã¹ã¯ã«è²»ããæ倧æéãèŠã€ããŸãã 圌ãååŽããå Žåã圌ãè¡ããã®ã®äžã§æãé·ãã¿ã¹ã¯ãååŽããå¿ èŠãããããšã¯æããã§ãã ãããŠãã³ãªã€ãè²»ããæéã¯S -maxïŒ0ã M - t 0 ïŒã§ãã ããã§ãä»åãtãè¶ ããªãæ倧ã®ãã¬ãã£ãã¯ã¹ãèŠã€ããŸãã
åé¡B.ã€ã¹ã
ç¶æ
å¶éæé 2ç§
256 MBã®ã¡ã¢ãªå¶é
åäŸã®é ãå°ããªã€ã¹ããå°å¹Žãã£ãªãšäžç·ã«å®¶ã«äœãã§ããŸããã åèšã§ãã€ã¹ãã«ã¯èãnæ¬ããããã®ãã¡ã®ããã€ãã¯å³è¶³ã§ãäžéšã¯å·Šè¶³ã§ããã æ¯æ¥ãã€ã¹ãã¯è¶³ã®äžéšã®ã¿ã䜿çšããŸããããåžžã«å°ãªããšã1æ¬ã®å·Šè¶³ãšå°ãªããšã1æ¬ã®å³è¶³ã䜿çšããŠããŸããã
æ¯æ¥ããã£ã«ã¯ããŒãã«2ã€ã®æ°åãæžãçããŸããããã®æ¥ã«ã€ã¹ãã䜿çšãã巊足ãšå³è¶³ã®æ°ã§ãã
ãã£ãªã¢ã¯ãã¡ã¢ããã ã«ãã®å·Šè¶³ã®æ°ãšå³è¶³ã®æ°ãç解ããããšèããŠããŸãã æ®å¿µãªããããã£ã«ã¯å®ç§ã§ã¯ãªããããã€ãã®ãšã³ããªã§ééããç¯ããå¯èœæ§ããããŸãã Filyaã¯ãã€ã¹ãã«å°ãªããšãl iã®å·Šèãšå°ãªããšãr iã®å³èãããå Žåããšã³ããªl i ã r iãæ£ãããšèŠãªããŸãã
å¯èœãªéãå€ãã®ãšã³ããªãæ£ããããã«ãäœæ¬ã®ã ã«ãã巊足ãšå³è¶³ãæã£ãŠããå¯èœæ§ããããã圌ã«ç解ãããŠãã ããã
å ¥å圢åŒ
å ¥åã«ã¯ãããã€ãã®ãã¹ãã¹ã€ãŒããå«ãŸããŸãã æåã®è¡ã«ã¯ããã¹ãæ°t ïŒ1â€tâ€10,000ïŒãå«ãŸããŠããŸãã
åãã¹ãã®èª¬æã¯æ¬¡ã®ãšããã§ãããã¹ãã®èª¬æã®æåã®è¡ã«ã¯æ°ån ïŒ2â€nâ€10 9 ïŒ-ã€ã¹ãã®è¶³ã®åèšæ°ãå«ãŸãã2çªç®ã®è¡ã«ã¯æ°åm ïŒ1â€mâ€10 5 ïŒ-ã¬ã³ãŒãã®æ°ãå«ãŸããŸãã
次ã®mè¡ã«ã¯ã2ã€ã®æ°å€l iããã³r i ïŒ 1â€l i ã r iâ€nïŒ-ãã£ãªã®èšé²ã«ãããšãããããiæ¥ç®ã«ã€ã¹ãã䜿çšããå·Šå³ã®è¶³ã®æ°ãå«ãŸããŸãã
ãã¹ãŠã®ãã¹ãã®ã¬ã³ãŒãã®ç·æ°ã¯10 5ãè¶ ããŸããã
åºå圢åŒ
ãã¹ãããšã«ãå¥ã ã®è¡ã«ããã®çã-ã€ã¹ãã®å·Šå³ã®è¶³ã®æ°ãå°å·ããŸããããã«ãããå¯èœãªéãå€ãã®ã¬ã³ãŒããæ£ããããšãããããŸãã
äŸ
å ¥åããŒã¿
3
4
3
1 2
1 3
1 4
2
2
2 2
1 2
5
4
1 4
2 3
3 2
4 1
ã€ã³ããªã³ã
1 3
1 1
1 4
解決ç
ãã®åé¡ã解決ããã«ã¯ããã¹ãŠã®ã¬ã³ãŒããå·Šèã®æ°ã§äžŠã¹æ¿ããŸãã 次ã«ãå·Šèã®æ°ãæé ã§äžŠã¹æ¿ããŸãã å·Šèãl iã®å Žåãæåã®iãšã³ããªã¯æœåšçã«trueã«ãªããåŸç¶ã®ãšã³ããªã¯ãã¹ãŠæ£ãããªãå¯èœæ§ããããŸãïŒ l iã«çããèã®æ°ãé€ãïŒã
次ã«ãæåã®iããããã€ã®ã¬ã³ãŒããæ£ãããã調ã¹ãå¿ èŠããããŸãã r jâ€n-l iã®å Žåãæ°å€jâ€iã®ã¬ã³ãŒãã¯çã§ãã ãã®ãããªr jããã¹ãŠèŠã€ããããšã¯æšæºçãªã¿ã¹ã¯ã§ãããããšãã°ã»ã°ã¡ã³ãã®ããªãŒã«ãã£ãŠè§£æ±ºãããŸãã
ãŸããçãã®æ°å€ã®åèšãnã«çãããªãããã«æ³šæãããã¹ãŠã®ãšã³ããªãæ£ãããªãå Žåãæ£ããåŠçããå¿ èŠããããŸããã
åé¡C.ãã€ããªããªãŒ
ç¶æ
4ç§ã®å¶éæé
256 MBã®ã¡ã¢ãªå¶é
Vasyaã®å ŽåãçåŸã¯å®å šãªäºåæšãæé·ãããå¿ èŠãããããã®ãã¹ãŠã®èã®æ ¹ãŸã§ã®è·é¢ã¯åãã§ãã
äžæãããããªãŒã¯ãé ç¹ã®1ã€ãã«ãŒãã§ãããµã€ã¯ã«ã®ãªãæ¥ç¶ãããç¡åã°ã©ãã§ããããšãæãåºããŠãã ããã é ç¹ã®èŠªã¯ãã«ãŒãã«æãè¿ãé£æ¥ããŒãã§ãããã«ãŒãã«ã¯èŠªããããŸããã ããŒã¯ã®æ®ãã®é£äººã¯åœŒå¥³ã®æ¯åãšåŒã°ããŸãã æ¯åã®ããªãå±±é ã¯èãšåŒã°ããŸãã å®å šãªäºåæšãšã¯ãåé ç¹ãèã§ã¯ãªããã¡ããã©2人ã®æ¯åãæã€äžæããªãŒã§ãã
æ®å¿µãªãããåŠæäžãVasyaã¯ããã°ã©ãã³ã°ç«¶æã«å€ãã®æéãè²»ãããããªãŒã®æé·ãå®éã«ç£èŠããŸããã§ããã ãã¹ãã®æ°æ¥åã«ãVasyaã¯èªåãæšãè²ãŠãããšã«æ°ä»ããŸããããããããããã¯ééã£ãŠããŠãæ ¹ããæã£ãŠããŸããã§ããã Vasyaèªèº«ã¯ãããªãŒã®ã«ãŒãã«ãã£ãŠããªãŒã®ä»»æã®é ç¹ãéžæããé ç¹ãè¿œå ããããšã«ãããããããå¿ èŠãªå®å šãªãã€ããªããªãŒãååŸããããšããŸãã ããæ¥ãVasyaã¯ããªãŒã«æ°ããããŒã¯ãè¿œå ããæ¢åã®ããŒã¯ã®1ã€ã®æ¯åã«ããããšãã§ããŸãã
Vasyaã¯ãã¿ã¹ã¯ãå®äºããããšãã§ãããã©ãããã«ãŒããéžæããå¿ èŠãããé ç¹ãããã³ã¿ã¹ã¯ã«è²»ããæå°æ¥æ°ã調ã¹ãããšèããŠããŸãã ã«ãŒãã«ãã£ãŠéžæå¯èœãªé ç¹ãããã€ããããå®å šãªãã€ããªããªãŒãååŸã§ããå Žåããã®ãã¹ãŠã®èã¯æçæ¥æ°ã§ã«ãŒããŸã§ã®è·é¢ãåãã§ãããããæå°æ°ã®é ç¹ãå¿ èŠã§ãã
å¿ èŠãªæ¥æ°ã衚瀺ãããšããVasyaã¯ãã®æ°ã10 9 + 7ã§å²ã£ãæ®ãã ããèŠãããšæã£ãŠããŸããVasyaã¯ãæ®ãã®åã§ã¯ãªããããªãŒã®åœ¢æãå®äºããããšãã§ããæ¥æ°ãæå°éã«ããªããã°ãªããªãããšã«æ³šæããŠãã ãã10 9 + 7ã§ã¯ãæ®ãã¯æ€éã®çŽåã«æçšããªããã°ãªããŸããã
å ¥å圢åŒ
å ¥åã«ã¯ãããã€ãã®ãã¹ãã¹ã€ãŒããå«ãŸããŸãã æåã®è¡ã«ã¯ããã¹ãã®æ°tãå«ãŸããŠããŸãã
次ã®tãã¹ãã®ããããã¯ã次ã®ããã«èª¬æãããŸãããã¹ãã®èª¬æã®æåã®è¡ã«ã¯ãåäžã®æŽæ°n ïŒ2â€nâ€2â¢10 5 ïŒ-ããªãŒå ã®é ç¹ã®æ°ãå«ãŸããŸãã ãã¹ãèšè¿°ã®æ¬¡ã®n -1è¡ã¯ãæ°å€ã®ãã¢u i ã v i ïŒ 1â€u i ã v iâ€nïŒ -içªç®ã®ãšããžã§æ¥ç¶ãããé ç¹ã®æ°ãäžããŸãã ãªããããªãŒã圢æããããšãä¿èšŒãããŸãã
ãã¹ãŠã®ãã¹ãã§ã®æ°å€nã®åèšã2â¢10 5ãè¶ ããªãããšãä¿èšŒãããŠããŸãã
åºå圢åŒ
åãã¹ãã®åçãåå¥ã®è¡ã«å°å·ããŸãã
é ç¹ãã«ãŒããšããŠéžæã§ããããã®åŸãäžå®ã®æ¥æ°åŸã«å®å šãªãã€ããªããªãŒãåŸããããã®ãã¹ãŠã®èãã«ãŒããŸã§ã®è·é¢ãåãå Žåã-1ãåºåããŸãã
ãã以å€ã®å Žåã¯ã2ã€ã®æŽæ°ãå°å·ããŸã-ã«ãŒããšããŠéžæããé ç¹ã®æ°ãšãVasyaãå¿ èŠãšããæ¥æ°ã10 9 + 7ã§å²ã£ãäœãã§ããæçæéã§ã¿ã¹ã¯ãå®äºã§ããé ç¹ãè€æ°ããå Žåã¯ãæå°æ°ã§é ç¹ãå°å·ããŸãã
äŸ
å ¥åããŒã¿
3
3
1 3
3 2
4
4 2
3 2
3 1
5
1 2
1 3
1 4
1 5
ã€ã³ããªã³ã
3 0
2 3
-1
解決ç
Vasyaãè²»ããå¿ èŠã®ããæ¥æ°ãæå°åããã«ã¯ãçµæã®ãã€ããªããªãŒã®é«ããæå°åããå¿ èŠããããŸã-æçµããªãŒã®ãªãŒãã®æ·±ããhã®å ŽåãVasyaã¯å¿ èŠãªé ç¹æ°ãäžæåæ¢ããããã«2 h -1- næ¥ãè²»ãããŸãã
ããªãŒå ã«3ãè¶ ãã次æ°ã®é ç¹ãããå Žåãã¿ã¹ã¯ãå®äºã§ããªãããšã«æ³šæããŠãã ãããå®å šãªãã€ããªããªãŒã§ã¯ããã¹ãŠã®é ç¹ã«3ã€ä»¥äžã®è¿åãããããŸããã çãã®ã«ãŒãã«ã¯æ£ç¢ºã«2人ã®æ¯åãããããšã«æ³šæããŠãã ããã
ãããã£ãŠãåé¡ã解決ããã«ã¯ãã«ãŒãïŒæ¬¡æ°ã2以äžã®é ç¹ïŒãæŽçããããããä»ã®ãã¹ãŠãŸã§ã®è·é¢ã®æ倧å€ãæå°ã«ãªãããã«é ç¹ãéžæããå¿ èŠããããŸãã ããã¯ãçµæã®ããªãŒã®é«ãã«ãªããŸãã
ã¿ã¹ã¯D.è©Šéšç®¡ãšè©Šè¬
ç¶æ
å¶éæé 2ç§
256 MBã®ã¡ã¢ãªå¶é
ä»æ¥ãååŠã®å çã¯ããã£ã¢ã«éåžžã«éèŠãªä»äºãäžããŸãã-è©Šéšç®¡ã«è©Šè¬ãå ¥ããããšã 圌ã¯ã næ¬ã®ãã¥ãŒããšmåã®è©Šè¬ãäžããããŸããã åãã¥ãŒãã«ã€ããŠã min iããã³max iãæ¢ç¥ã§ã-ããããã«å ¥ããããšãã§ããããªãªããã«åäœã®æ¶²äœã®æå°ããã³æ倧ç·éããªãã³ã«è©Šè¬çªå·c iããã³çªå·p iã§ãã åè©Šè¬ã«ã€ããŠãæ°v iãç¥ãããŠããŸã-ããã«ã¯äœããªãªããã«ãããŸããã æåž«ã¯ãPetyaã«ãã¹ãŠã®è©Šè¬ã泚ãã§ã içªç®ã®è©Šéšç®¡å ã®ãã¹ãŠã®æ¶²äœã®å°ãªããšãp iããŒã»ã³ããè©Šè¬c iã§å ããããåè©Šéšç®¡ã§min iããã³max iã®å¶éãæºããããã«èŠæ±ããŸãã ãã¹ãŠã®è©Šè¬ãå®å šã«ããŒãå¿ èŠããããŸãã ååŠåå¿ãè©Šè¬éã®å€åã¯çºçããªããšæ³å®ããŠããŸãã
Petyaãæåž«ã®ã¿ã¹ã¯ãå®äºããã®ãæäŒããã圌ãã©ã®ããã«ããããšããŠãã圌ã¯ãããã§ããªããšèšãã
ããšãã°ãäŸã®æåã®ãã¹ãã±ãŒã¹ã§ã¯ã次ã®çããæ©èœããŸãã
- æåã®è©Šéšç®¡ã«3ããªãªããã«ã®æåã®è©Šè¬ãš2ããªãªããã«ã®2çªç®ã®è©Šè¬ã泚ããŸãã
- 4ããªãªããã«ã®3çªç®ã®è©Šè¬ãš1ããªãªããã«ã®2çªç®ã®è©Šè¬ã2çªç®ã®è©Šéšç®¡ã«æ³šããŸãã
- 4çªç®ã®è©Šè¬3ããªãªããã«ãš2çªç®ã®è©Šè¬1ããªãªããã«ãæåŸã®è©Šéšç®¡ã«æ³šããŸãã
ãã®å Žåã min iããã³max iã®ãã¹ãŠã®å¶éãããã³è©Šéšç®¡å ã®è©Šè¬ã®å²åã®å¶éãæºããããŸããæåã®è©Šéšç®¡ã§ã¯3/5 =æåã®è©Šè¬ã®60ïŒ ã2çªç®ã®è©Šéšç®¡ã§ã¯4/5 = 3çªç®ã®è©Šè¬ã®80ïŒ in vitro 3/4 = 75ïŒ â¥4çªç®ã®è©Šè¬ã®70ïŒ ã ãŸãããã¹ãŠã®è©Šè¬ãå®å šã«ããŒããŠãããããæåž«ããäžãããããã¹ãŠã®èŠä»¶ãæºããããçãã¯æ£ããã§ãã
å ¥å圢åŒ
å ¥åã«ã¯ãããã€ãã®ãã¹ãã¹ã€ãŒããå«ãŸããŸãã æåã®è¡ã«ã¯ããã¹ãã®æ°t ïŒ1â€tâ€100ïŒãå«ãŸããŠããŸãã
次ã®tãã¹ãã®ããããã¯ã次ã®ããã«èª¬æãããŠããŸãããã¹ãã®èª¬æã®æåã®è¡ã«ã¯ããããã2ã€ã®æ°å€n ã m ïŒ1â€nãmâ€10 5 ïŒ-ãã¥ãŒããšè©Šè¬ã®æ°ãå«ãŸããŸãã
次ã®nè¡ã®içªç®ã«ã¯ã4ã€ã®æŽæ°min i ã max i ã c i ã p i ïŒ 1â€min iâ€max iâ€10 5ã1â€c iâ€mã1â€p iâ€100ïŒãå«ãŸããŸãã içªç®ã®ãã¥ãŒãã«æ³šãããšãã§ãã液äœã®ããªãªããã«ã®æå°ããã³æ倧ç·æ°ããããããã¥ãŒãå ã®è©Šè¬æ°ããã³ãã®æå°å²åã
ãã¹ãã®èª¬æã®æåŸã®è¡ã«ã¯ã måã®æŽæ°v i ïŒ1â€v iâ€10 5 ïŒ-Petyaã®içªç®ã®è©Šè¬ã®ããªãªããã«æ°ãå«ãŸããŠããŸãã
ãã¹ãŠã®ãã¹ãã§nã®åèšãšmã®åèšã10 5ãè¶ ããªãããšãä¿èšŒãããŠããŸãã
åºå圢åŒ
åãã¹ãã«ã€ããŠããã®çããå°å·ããŸãã
çããååšããå Žåãæåã®è¡ã«YESãå°å·ãã次ã®nè¡ã®içªç®ã«æåã«çªå·k - içªç®ã®è©Šéšç®¡å ã®ç°ãªãè©Šè¬ã®æ°ã次ã«kçµã®æ£ã®æ°id ã v-è©Šéšç®¡å ã®è©Šè¬ã®æ°ãšãã®éãå°å·ããŸãã è€æ°ã®åçãããå Žåã¯ãã©ãã§ãå°å·ã§ããŸãã
ãã¹ããžã®åçãååšããªãå Žåã¯ã1è¡ã«NOãåºåããŸãã
åé¡ã«èšèŒãããŠãããã¹ãŠã®æ¡ä»¶ãæºããããçžå¯Ÿèª€å·®ãŸãã¯çµ¶å¯Ÿèª€å·®ã10 -6ãè¶ ããªãå Žåãçãã¯æ£ãããšã¿ãªãããŸãã
äŸ
å ¥åããŒã¿
2
3 4
5 8 1 60
4 6 3 80
3 4 4 70
3 4 4 3
3 4
6 8 1 60
4 6 3 80
3 4 4 70
3 4 4 3
ã€ã³ããªã³ã
ã¯ã
2 1 3.0000000000 2 2.0000000000
2 2 1.0000000000 3 4.0000000000
2 2 1.0000000000 4 3.0000000000
ãã
解決ç
ããã€ãã®æ®µéã§å»ºèšçãªã¢ã«ãŽãªãºã ãæ瀺ããŸãã
- sumïŒmin i ïŒ> sumïŒv i ïŒã®å Žå-çãã¯ããŒã§ãã
- sumïŒmax i ïŒ<sumïŒv i ïŒã®å Žå-çãã¯ããŒã§ãã
- min i ⢠p i / 100 mlã®è©Šè¬c iãåãã¥ãŒãã«æ³šããŸãã
- ãã®åŸãåè©Šè¬iã«ã€ããŠã c j = iã®ãã¥ãŒããæé p jã§ãœãŒãããæ®ãã®è©Šè¬çªå·iãé çªã«æ³šããŸãã
- åãã¥ãŒãã«æ³šå ¥ããŸãïŒæ倧j-æå°j ïŒ p j / 100ããªãªããã«ã®içªç®ã®è©Šè¬ããŸãã¯ããããªããªã£ãå Žåã¯ãã以äžã
- æ®ãã®è©Šè¬ãä»»æã®æ¹æ³ã§ãã¥ãŒãã«æ³šããŸããiçªç®ã®ãã¥ãŒãã§ã¯ãèŠçŽi â¢100 / p iãè¶ ããªãéã®æ¶²äœãè¿œå ã§ããŸãïŒèŠçŽiã¯çŸæç¹ã§ã®æ¶²äœã®åèšéã§ãïŒã
- æµåºã倱æãã液äœãæ®ã£ãŠããå Žåãçãã¯ããŒã§ãã
- æ®ã£ãŠããå¯äžã®åé¡ã¯ãäžéšã®è©Šéšç®¡ã§ã¯æ¶²äœã1ããªãªããã«æªæºã§ããããšã§ãã
- ãããä¿®æ£ããã«ã¯ãè©Šéšç®¡iã§ãæåã«c j以å€ã®ãã¹ãŠã®è©Šéšç®¡jè©Šè¬ããiçªç®ã®è©Šéšç®¡ã«ç§»ããå°ãªããšãjã®è©Šéšç®¡ã«æ¶²äœjãæ®ãããã«ããŸãã
- ããã§ååã§ãªãå Žåã¯ãæ®ãã®è©Šéšç®¡jãã液äœæ°c jã移ããŸãïŒããã§ãããŒã»ã³ããŒãžã®æ¡ä»¶ãæãªãããããšã¯ãããŸããïŒã
ãããã®ã¢ã¯ã·ã§ã³ã®åŸãè©Šè¬ã®ãã¥ãŒããžã®åé¢ã¯ãåžžã«åé¡ã®ãã¹ãŠã®æ¡ä»¶ãæºãããŸãã
æåŸã«ããã®åé¡ã§ã¯ãæ£ç¢ºæ§ã«åé¡ãããå¯èœæ§ãããããšã«æ³šæããŠãã ããã sense審å¡ã®ãã¹ãã¯ãã®æå³ã§éåžžã«äººéçã«æ§ç¯ãããŸããããã©ãŠã³ãåŸãPyotr MitrichevïŒäºéžã©ãŠã³ãã§ã®åå©ãç¥çŠããŸãïŒã¯ã粟床ã®å€§å¹ ãªäœäžãçºçãããã¹ãã瀺ããŸããã å°æ¥çã«ã¯ãå®æ°ã®åé¡ã«ãããæ£ç¢ºæ§ã®åŸ®åŠããåé¿ããããšããŸãã
ã¿ã¹ã¯E.äž¡æ¿
ç¶æ
4ç§ã®å¶éæé
256 MBã®ã¡ã¢ãªå¶é
圌ã®é·å¹Žã«ããã£ãŠããã«ã€ã¯nåã®ã³ã€ã³ã®ã³ã¬ã¯ã·ã§ã³ãçµã¿ç«ãŠãŠããŸããã 圌ã¯ãããã®ã³ã€ã³ããã¹ãŠäžåã«äžŠã¹ãŸããã ãã®å Žåãè¡ã®içªç®ã®ã³ã€ã³ã®é¡é¢é¡ã¯a iã§ãã
ãã«ã€ã¯å¥ã®æ è¡ã«åºãããŸããããã¬ãŒãã³ã°ãã£ã³ãã®æéã¯ã»ãšãã©ãããŸããã ãã®ããã圌ã¯ã³ã€ã³ã®äžéšãäžåã«äžŠã¹ãããšæã£ãŠãããã³ã€ã³ãååã«ããããšãæãã§ããŸãã
Boryaã¯ããã€ãã®è³ªåã«çããããšæã£ãŠããŸãã Boryaã¯ãåèŠæ±ã§ã içªç®ããrçªç®ãŸã§ã®ãã¹ãŠã®ã³ã€ã³ãåãåã£ãå Žåã«ãå€æŽããã«æ¯æãããšãã§ããªãæäœéé¡ãç¥ããããšèããŠããŸãã ããæ£åŒã«ã¯ã圌ã¯l iããr iãŸã§ã®æ°ã®ã³ã€ã³ã®ãµãã»ãããéžæããããšãäžå¯èœãªæå°ã®æ£ã®æŽæ°zãèŠã€ããããšèããŠããŸãã
å ¥å圢åŒ
æåã®è¡ã«ã¯ã2ã€ã®æŽæ°nããã³m ïŒ1â€nãmâ€150 000ïŒ-Boriãæã£ãŠããã³ã€ã³ã®æ°ãšãªã¯ãšã¹ãã®æ°ãå«ãŸããŠããŸãã 次ã®è¡ã«ã¯nåã®æ°åa i ïŒ1â€a iâ€10 9 ïŒ -içªç®ã®ã³ã€ã³ã®åç®å€ãå«ãŸããŠããŸãã
次ã®mè¡ã«ã¯ã2ã€ã®æ°å€l iããã³r i ïŒ1â€l iâ€r iâ€n ïŒ-ã¯ãšãªã®èª¬æãå«ãŸããŸãã
åºå圢åŒ
måã®ãªã¯ãšã¹ãã®ããããã«ã€ããŠã l içªç®ããr içªç®ãŸã§ã®ã³ã€ã³ã䜿çšããŠãå€æŽãªãã§æ¯æãããšã®ã§ããªãæå°é¡ãå°å·ããŸãã
äŸ
å ¥åããŒã¿
5 5
2 1 5 3 1
1 5
1 3
1 1
2 4
2 5
ã€ã³ããªã³ã
13
4
1
2
11
解決ç
ã³ã€ã³ã®ç¹å®ã®ã»ããã§äžããããšãã§ããªãæå°ã®éé¡ãèŠã€ããæ¹æ³ãæ€èšããŠãã ããã ç¹°ãè¿ãçããèŠã€ããŸãã æåã¯ãéé¡ããŒãã§ãããšããæ³åã§ãããã³ã€ã³ã䜿çšããŸããã§ããã
次ã®ã¹ãããã§ãå€ãXãè¶ ããªããã¹ãŠã®ã³ã€ã³ã調ã¹ã YãŸã§ã®éé¡ãæ¯æãããšãã§ãããšããŸãã ãããããXãè¶ ãããY + 1ãè¶ ããªãã³ã¹ãã®ã³ã€ã³ã®åèšå€ãåèšã«çããããŸãã åèš= 0ã®å Žåã Y + 1ã®å Žåããã®ã»ããã®äœ¿çšã¯æ³åã§ããŸããã ãã以å€ã®å Žåã¯ãå€ãY + 1以äžã®ãã¹ãŠã®ã³ã€ã³ãèæ ®ããããšããæ¡ä»¶ã«ç§»ããŸããããY + sumãŸã§ã®éé¡ãæ³åã§ããŸãã
調ã¹ãæ倧ã³ã€ã³ã®å€ã¯ãå°ãªããšããã£ããããæ°ãšåããããéãæé·ããããšã«æ³šæããŠãã ããã ãããã£ãŠããã®ããã»ã¹ã¯OïŒlog AnswerïŒã®ç¹°ãè¿ãã§çµäºããŸãã
å ã®åé¡ã解決ããã«ã¯ãã»ã°ã¡ã³ãäžã®Xããå°ããæ°ã®åèšãèŠã€ããæ¹æ³ãåŠã¶å¿ èŠããããŸãã OïŒlog nïŒã§ãããè¡ããšã OïŒm log n log AnswerïŒã§åèšã§åé¡ã解決ã§ããŸã ã
ãã®ã¿ã¹ã¯ã¯æšæºã§ãã ç·åœ¢ã®ã¡ã¢ãªéãå¿ èŠãšããæ¹æ³ãæ€èšããŠãã ããã ãããè¡ãã«ã¯ãå ã®é åå ã®ãã¹ãŠã®æ°å€ã䞊ã¹æ¿ãããã¹ãŠã®èŠæ±ã«äžŠè¡ããŠå¿çããŸãã 次ã®å埩ã§ã¯ãåãªã¯ãšã¹ãã«ã€ããŠãçŸåšåãåãããšãã§ããæ倧éé¡ãããããŸãã ãã¹ãŠã®ãªã¯ãšã¹ãããœãŒãããŸãã 次ã«ãå ã®é åã®çªå·ãæé ã§ãã§ã³ãŠã£ãã¯ããªãŒã«è¿œå ãã次ã®èŠæ±ã«é©åãªã¿ã€ãã³ã°ã§å¢çç·ãæŽæ°ããŸãã
ã¿ã¹ã¯f
ç¶æ
5ç§ã®å¶éæé
256 MBã®ã¡ã¢ãªå¶é
Gnome Pashaã¯Gnome Math Cupã®äºéžã©ãŠã³ããæžããŸãã åé¡FãšããŠä»¥äžãææ¡ãããŠããŸãã
nåã®èªç¶æ°a 1 ã a 2 ã...ã a nããã³èªç¶æ°dãäžããããå Žåã a 1 x 1 + aã§ãããããªéãŒãæŽæ°x 1 ã x 2 ã...ã x nã®ã»ãããèŠã€ããå¿ èŠããããŸãã 2 x 2 + ... + a n x n = d ããŒã ã®ä¹ç®ãšå ç®ã¯äžååã§ããããããã¹ãŠã®æ°å€d ã a iã¯10 6ãè¶ ãããæ°å€x iã¯-10 6ã10 6ã§ãªããã°ãªããŸãããã0ã«çãããªãå¿ èŠããããŸãã
Pashaãåé¡ã®æ¡ä»¶ãæºããå°ãªããšã1ã€ã®ã»ããx iãèŠã€ããã®ãæäŒãããäž»å¬è ã貧匱ãªãã¹ããè¡ããçãããªãããšã圌ã«ç¥ãããŸãã
å ¥å圢åŒ
å ¥åã®æåã®è¡ã«ã¯ããã¹ãã®æ°ã§ããtãå«ãŸããŠããŸãã åãã¹ãã¯2è¡ã§äžããããŸãã æåã®è¡ã«ã¯2ã€ã®æ°å€nãšdãå«ãŸããŠããŸãïŒ1â€nâ€10 5ã1â€dâ€10 6 ïŒã 2è¡ç®ã«ã¯ã nåã®æ°å€a i ïŒ1â€a iâ€10 6 ïŒãå«ãŸããŸãã ãã¹ãŠã®ãã¹ãã®nã®åèšã¯10 5ãè¶ ããŸããã
åºå圢åŒ
åãã¹ãã®åçãå°å·ããŸãã å¿ èŠãªã»ããx iãååšããå Žåã1è¡ç®ã«YESãå°å·ãã2è¡ç®ã«é©åãªã»ãããå°å·ããŸãã ãã以å€ã®å Žåã¯ããã¹ãããªã³ããžã®åçã®1è¡ã§NOã
äŸ
å ¥åããŒã¿
2
2 1
2 3
3 3
2 3 1000
ã€ã³ããªã³ã
ã¯ã
2 -1
ã¯ã
503 -1 -1
解決ç
çãNOã¯ã dããã¹ãŠã®æ°a iã®æ倧é€æ°ã§å²ãåããªãå Žåã®1ã€ã®å Žåã®ã¿ã§ãã ãã以å€ã®å Žåãçãã¯åžžã«ååšããŸãã ãŸãããã¹ãŠã®a iãšdãgcdïŒ a 1 ã...ã a n ïŒã§é€ç®ããåŸãå€ãå¶éããã«å°ãªããšãããã€ãã®çããåŸãæ¹æ³ãåŠã³ãŸãã n = 1ã®å Žåã x 1 = d / a 1ã§ãã ä»ã®å Žåãåæ¥é èŸ[1ã p ]ã«å¯ŸããŠx iãpãéžæãã a 1 x 1ãp + ... + a p x pãp = gcdïŒ a 1 ã...ã a p ïŒ ããã¯åž°çŽæ³ã«ãã£ãŠè¡ãããŸãã x 1ã1 =1ããã§ã«x iãpãèŠã€ãã x iãp + 1ãèŠã€ããããšããŸããæ¡åŒµãŠãŒã¯ãªããã¢ã«ãŽãªãºã ã䜿çšããŠã sãštãèŠã€ããŸããsâ¢gcdïŒ a 1 ã...ã a p ïŒ + t ⢠a p + 1 = gcdïŒgcdïŒ a 1 ã...ã a p ïŒã a p + 1 ïŒ= gcdïŒ a 1 ã...ã a p + 1 ïŒã 次ã«ã iâ€p x iã®å Žåãp + 1 = s x iãpããã³x p + 1ãp + 1 = tã§ãã x iãnãåãåã£ããã x i = d / gcdïŒ a 1 ã...ã a n ïŒ x iãn = dx iãnãèšç®ããŸãã ãã®ãœãªã¥ãŒã·ã§ã³ã¯OïŒn 2 ïŒã§æ©èœããŸãããå¶éã«é©åããŸããã äœæ¥æéãççž®ããããã«ãæå€§å ±éå åãã»ããå šäœãšåãã§ãããåæžã§ããªããããªãµãã»ãããiããéžæããŸãã ãããè¡ãããã«ãç°ãªãçŽ æ°ã®æ°ãæžããå Žåã 1ããnãŸã§å埩ãããµãã»ããå ã®æ°ãåããŸãã ãããã£ãŠã10 6以äžã®æ°ã®çŽ æ°ã®æ倧æ°ã¯7ã§ãããããéžæãããµãã»ããã«ã¯7å以äžã®èŠçŽ ãå«ãŸããŸãããµãã»ããã®æ°ã«ã€ããŠã¯ã説æããã¢ã«ãŽãªãºã ãå®è¡ããã»ããã«å«ãŸããŠããªãæ°ã«ã€ããŠã¯ãåã«xãèšå®ããŸãi = 0ã
çŸåšãã¢ã«ãŽãªãºã ã¯OïŒnïŒã«å¯ŸããŠæ©èœããŸããã x iã¢ãžã¥ãã10 6ãè¶ ããªããšããæ¡ä»¶ã¯æºããããããããã®éã«ãŒãããã£ãŠã¯ãªããŸããã ãããè¡ãããã«ãæ£èŠåæé ã説æããŸãã ãŸãã x iã®æåã®æ¡ä»¶ãæºãããŸãã ãŸãã i > 1ã®ãã¹ãŠã®x iãéè² ã§a 1æªæºã«ããŸãã ããã¯ãåçã®å€æŽã®åçŽãªæäœã«ãã£ãŠè¡ãããŸããx1 ka iããæžç®ãã x i ka 1ã«è¿œå ããŸããããã§ã k = ïŒx i mod a 1 - x i ïŒ/ a 1ã§ãã x 1ã¢ãžã¥ãã¯|ãè¶ ããããšãã§ããªããããæŒç®ã®çµæã¯64ãããããŒã¿åã«é©åããããšã«æ³šæããŠãã ããã d-a 2 x 2 -...- a n x n | <10 6 â¢10 6 â¢10 5 ã ããã§ã2çªç®ããæåŸãŸã§ãã¹ãŠã®x iã調㹠ãããããã§æäœãé çªã«å®è¡ããŸãïŒ x iãã1ãåŒãã x 1ã« a iãè¿œå ããŸãã x 1 ã...ã x iã«æäœãé©çšããåŸã0â¥x 1â¥â10 6ã«ãªã iãååšããããšã«æ³šæããŠãã ããã ãã®ãããªiãååšããªããšãããšããã¹ãŠã®x iã¯è² ã«ãªããããã¯èµ·ããåŸãŸãããa1 x 1 + ... a n x nã¯d ãã€ãŸãæ£ã®æ°ãäžããããã§ãã ååŸæ¹æ³ãåŠãã åŸ| x i | â€10 6ã®å ŽåããããããŒã以å€ã®ãŸãŸã«ããŸãã ãããã1ã€ãé€ããã¹ãŠã®ãŒãããã¢ã«åå²ããŸãã åãã¢iãšj㧠ã x i = a jãšx j = âa iãå²ãåœãŠãŸãã x p = 0ã®ã€ã³ããã¯ã¹pã®ã¿ãæ®ã£ãŠããå ŽåããããŸããããã€ãã®ã±ãŒã¹ãæ€èšããŸãã
- ã¢ãžã¥ããa pã«çãããªãx jãååšããå Žåã次ã®æŒç®ã䜿çšããŸãïŒ x jããsign ïŒx j ïŒa pãæžç®ãã x pã«sign ïŒx j ïŒa jãè¿œå ããŸãã
- ãã®ãããªx jãååšããªãããpâ€5â¢10 5ã®å ŽåãæŒç®ã¯ä»»æã®x jã«é©çšã§ããŸãã笊å·ïŒx j ïŒa pãx jã«è¿œå ãã x pãã笊å·ïŒx j ïŒa pãæžç®ããŸãã
- ãã以å€ã®å Žåã a q â a pã§ãããããªqããªããã°ãªããŸããã ãããååšããªãå Žåããã¹ãŠã®a i = a 1ã§ããããããã£ãŠãæå€§å ¬çŽæ°a i = a 1 = 1ãžã®æ£èŠåã«ããã2çªç®ã®ã±ãŒã¹ãæºããããã¯ãã§ãã x qãã笊å·ïŒx j ïŒa pãæžç®ãã x pã«ç¬Šå·ïŒx j ïŒa qãè¿œå ããŸãã ãã®åŸã x qã¯ãŒãã«ãªããŸãã ããããçŸåšã n > 2ã®å Žåãæåã®ã±ãŒã¹ãqã«åœãŠã¯ãŸã ã n = 2ã®å Žåã d = a q a pâ€10 6ãªã®ã§2çªç®ã®ã±ãŒã¹ãqã«åœãŠã¯ãŸããŸãã
çªå·ã64ãããã®ããŒã¿åã«é©åããããã«ãæåã®æ®µèœã§èª¬æããã¢ã«ãŽãªãºã ã®åãã¬ãã£ãã¯ã¹ã«å¯ŸããŠæ£èŠåæäœãå®è¡ããå¿ èŠãããããšã«æ³šæããŠãã ããã 詳现ã«ã€ããŠã¯ããã¹ãã§æ²ç€ºãããju審決å®ã³ãŒããåç §ã§ããŸãã
***
ãã·ã¢ã³ãŒãã«ãããã£ã³ããªã³ã·ããã¯ããã·ã¢ã®ITç£æ¥ã®çºå±ãç®çãšããMail.Ruã°ã«ãŒãã®åãçµã¿ã®1ã€ã§ããã IT.Mail.RuãªãœãŒã¹ã«ãã£ãŠçµ±åãããŠããŸãã IT.Mail.Ruãã©ãããã©ãŒã ã¯ãITã«èå³ãããããã®åéã§å°éçã«éçºããããšåªåããŠãã人ã ã®ããã«äœæãããŸããã ãã®ãããžã§ã¯ãã¯ããã¯ãããŒã¯MSTUã§ã®æè²ãããžã§ã¯ãã§ãããã·ã¢AIã«ããããã·ã¢ã³ãŒãã«ããããã·ã¢ãã£ãããããŒãºã«ããã®ãã£ã³ããªã³ã·ãããçµã¿åããããã®ã§ãã ããŠãã³ãã¢ã¹ã¯ã¯å·ç«å€§åŠãã¯ãã¹ãã£ã¢ MIPTã®M.V. LomonosovãšTechnotrek ããã«ãIT.Mail.Ruã§ã¯ã人æ°ã®ããããã°ã©ãã³ã°èšèªã®ç¥èããã¹ãããããITã®äžçããéèŠãªãã¥ãŒã¹ãåŠãã ããé¢é£ããã€ãã³ããITãããã¯ã«é¢ããè¬çŸ©ã®æŸéãèŠããèŠããããããã«ãã¹ãã䜿çšã§ããŸãã