Àè¤Ë¼ê³¤·¿¸À¸ì¤ÎÎã¤È¤·¤Æ¼¨¤·¤¿¡¢¡ÖÆó¤Ä¤Î¿ô¤ÎϤòµá¤á¤ë¡×¥×¥í¥°¥é¥à¤ËÂÐ ±þ¤¹¤ë¥ª¥Ö¥¸¥§¥¯¥È»Ø¸þ¥×¥í¥°¥é¥à¤ò¹Í¤¨¤Þ¤·¤ç¤¦¡£¤Þ¤º¡¢¤¤¤í¤¤¤í¤Ê»Å»ö¤òÍê ¤à¥ª¥Ö¥¸¥§¥¯¥È¡ÊÇÐÍ¥¡Ë¤ò·è¤á¤Þ¤¹¡£¤³¤Î¾ì¹ç¤Ï·×»»¤ò¤·¤Æ¤¯¤ì¤ëÅÅÂ¥ª¥Ö¥¸¥§ ¥¯¥È¤Ç¤¹¡£¤³¤Î¥ª¥Ö¥¸¥§¥¯¥È¤Îµ¡Ç½¤òµ½Ò¤¹¤ë¥¯¥é¥¹¤Î¥×¥í¥°¥é¥à¤È¡¢¥ª¥Ö¥¸¥§ ¥¯¥È¤Ë»Å»ö¤òÍê¤à¼ê½ç¤ò½ñ¤¤¤¿Æó¤Ä¤Î¥×¥í¥°¥é¥à¤ò¤Þ¤È¤á¤¿¤â¤Î¤òºî¤ê¤Þ¤·¤ç¤¦¡£
½é´ü¤ÎÅÅÂî¤ÏµÕ¥Ý¡¼¥é¥ó¥É»»Ë¡¤È¤¤¤¦¼êË¡¤ò»È¤Ã¤Æ¤¤¤Þ¤·¤¿¡£º£¤ÎÅÅÂî¤Ç ¤Ï¡¢ ¤ò·×»»¤¹¤ë¾ì¹ç¡¢¡¢¡¢¡¢ ¤È¿ô ¼°¤Î½ç¤Ë¥¡¼¤ò²¡¤·¤Þ¤¹¤¬¡¢½é´ü¤ÎÅÅÂî¤Ç¤Ï¤Þ¤º¿ô»ú¤òÆþ¤ì¡¢¼¡¤Ë¤½¤Î¿ô»ú¤ò ¤É¤¦°·¤¦¤«¤Îºî¶È¥¡¼¤ò²¡¤¹¤È¤¤¤Ã¤¿¤³¤È¤ò·«¤êÊÖ¤·¤Þ¤·¤¿¡£ºÇ½é¤Ë¿ô»ú¤òÆþ¤ì¡¢ ¿ô»úÆþÎϤ¬½ª¤Ã¤¿¤³¤È¤ò ¥¡¼¤Ç¼¨¤·¤Þ¤¹¡£¤·¤¿¤¬¤Ã¤Æ¡¢ ¥¡¼¤ÏÉÔɬÍפǡ¢Âå¤ï¤ê¤Ë ¥¡¼¤¬¤¢¤ê¤Þ¤·¤¿¡£ ¤ò·×»»¤¹ ¤ë¤Ë¤Ï¡¢¡¢¡¢¡¢ ¤È²¡¤·¤Þ¤¹¡£¤³¤Î¤è¤¦ ¤ÊÅÅÂî¤òÁ°Äó¤Ë¤·¤Æ¡¢ÅÅÂî¤Îͤ¹¤ë¥á¥ó¥ÐÊÑ¿ô¤È¡¢¤½¤Î¿¶¤ëÉñ¤¤Êý¡Ê¥á¥ó¥Ð´Ø¿ô¡Ë ¤òÄêµÁ¤·¤Þ¤¹¡£
¤³¤Î¤è¤¦¤Ë¥á¥ó¥ÐÊÑ¿ô¤È¥á¥ó¥Ð´Ø¿ô¤¬°ìÂΤˤʤ俳µÇ°¤ò¥¯¥é¥¹¤È¤è¤Ó¤Þ¤¹¡£ ¥×¥í¥°¥é¥à¤Ë¤Ï¡¢¤Þ¤º°Ê¾å¤Ë¼¨¤·¤¿¤è¤¦¤Ê¥¯¥é¥¹¤ÎÄêµÁ¤ò½ñ¤¤Þ¤¹¡£¥ª¥Ö¥¸¥§¥¯ ¥È¡ÊÇÐÍ¥¡Ë¤È¤Ï¡¢¤³¤ÎÀ¼Á¤ò¤â¤Ã¤¿¥¯¥é¥¹¤Ë°¤¹¤ë°ì°÷¤È¤¤¤¦¤³¤È¤Ë¤Ê¤ê¤Þ¤¹¡£
·×»»¤ò°ÍÍꤹ¤ë¦¤Î¥×¥í¥°¥é¥à¤Ï¡¢ÅÅÂî·¿¤Î¥¯¥é¥¹¤ÎÀ¼Á¤ò¤â¤Ã¤¿¥ª¥Ö¥¸¥§¥¯¥È ¡ÊÇÐÍ¥¡Ë¤Ë¥á¥Ã¥»¡¼¥¸¤òÁ÷¤ë·Á¼°¤Ç½ñ¤¤Þ¤¹¡£
¥ª¥Ö¥¸¥§¥¯¥È¤Ç¤¢¤ëÅÅÂî¤òµ¼¿Í²½¤·¤Æ¤ß¤Þ¤·¤ç ¤¦¡£¡ÖÅÅÂî¡×¤È»×¤ï¤Ê¤¤¤Ç,¡ÖÅÅÂ¤ó¡×¤È»×¤¦¤Î¤Ç¤¹¡£¡ÖÅÅÂ¤ó¡¢²Ã¤¨¤Æ¤¯ ¤À¤µ¤¤¡×¤È¤¤¤¦Êý¤¬¡¢¤¤¤«¤Ë¤â¥ª¥Ö¥¸¥§¥¯¥È»Ø¸þŪ¤Ç¤·¤ç¤¦¡£¥¯¥é¥¹¤È¤ÏÅÅÂ ¤ó¤Î¤â¤Ã¤Æ¤¤¤ëÆâÉô¾ðÊó¤È¡¢¤½¤Î¤Ç¤¤ë»Å»ö¤òµ½Ò¤·¤¿¤â¤Î¤È¹Í¤¨¤ë¤³¤È¤¬¤Ç¤¡¢ ÍøÍѼԤϡ¢µ¼¿Í²½¤µ¤ì¤¿¥ª¥Ö¥¸¥§¥¯¥È¤Ë»Å»ö¤òÍê¤à¤À¤±¤Ç¤è¤¤¤³¤È¤Ë¤Ê¤ê¤Þ¤¹¡£
¤³¤¦¤·¤¿¥×¥í¥°¥é¥à¤Î´ðËÜŪ³µÇ°¤Ï¡¢C ¤Ë½¬½Ï¤·¤Æ¤¤¤ë¿Í¤Ë¤Ï¤Ê¤«¤Ê¤«¼õ¤±Æþ¤ì ¤¬¤¿¤¤¤â¤Î¤Ç¤¹¡£C ¤Ï´Ø¿ô¸Æ½Ð¤·¤ò´ðËܤˤ¹¤ë¤Î¤ËÂФ·¡¢C++ ¤Ï¥á¥Ã¥»¡¼¥¸Á÷ÉÕ ¤ò´ðËܤˤ·¤Æ¤¤¤ë¤«¤é¤Ç¤¹¡£¤É¤¦¤·¤Æ¤âÍý²ò¤Ç¤¤Ê¤¯¤Ê¤Ã¤¿¤é¡¢¡ÖÅÅÂ¤ó¡×¤Ë ¸«¤é¤ì¤ë¤è¤¦¤Ë¡¢¥ª¥Ö¥¸¥§¥¯¥È¤Îµ¼¿Í²½¤ò»×¤¤µ¯¤³¤·¤Æ¤¯¤À¤µ¤¤¡£¥ª¥Ö¥¸¥§¥¯¥È ¤ò¶Ëü¤Ëµ¼¿Í²½¤·¤ÆÍý²ò¤¹¤ëɬÍפϤ¢¤ê¤Þ¤»¤ó¤¬¡¢C ¤Ë½¬½Ï¤·¤Æ¤¤¤ë¤¬ C++ ¤Ï »Ï¤á¤Æ¤Ç¤¢¤ë¤È¤¤¤¦¿Í¤¬¡¢¥ª¥Ö¥¸¥§¥¯¥È»Ø¸þ¸À¸ì¤ÎÍý²ò¤Ë¤Ä¤Þ¤Å¤¤¤¿¤È¤¤Ë¤Ï¡¢ À§Èó¡Öµ¼¿Í²½¡×¤Î³µÇ°¤ò»×¤¤½Ð¤·¤Æ¤¯¤À¤µ¤¤¡£
¤³¤³¤Ç¡¢¥¯¥é¥¹¤È¥ª¥Ö¥¸¥§¥¯¥È¤Î´Ø·¸¤¬¤è¤¯¤ï¤«¤é¤Ê¤¯¤Ê¤Ã¤¿¿Í¤â¤¤¤ë¤«¤â¤·¤ì ¤Þ¤»¤ó¡£²þ¤á¤ÆÀâÌÀ¤¹¤ë¤È¡¢¥¯¥é¥¹¤Ï¥ª¥Ö¥¸¥§¥¯¥È¤ÎÀ¼Á¤òÄêµÁ¤·¤Æ¤ª¤ê¡¢¥ª¥Ö ¥¸¥§¥¯¥È¤Ï¤½¤ÎÀ¼Á¤ò¤â¤Ã¤¿¿Í¤½¤Î¤â¤Î¤òɽ¤·¤Æ¤¤¤Þ¤¹¡£Î㤨¤ÐÅÅÂî¤Ë»Å»ö ¤òÍê¤àºÝ¡¢Îã¤Ç¤Ï¡ÖÅÅÂ...¡×¤Î¤è¤¦¤Ë½ñ¤¤Þ¤·¤¿¤¬¡¢¼Â¤Ï¡¢ÅÅÂ¥é¥¹¤Î° À¤ò¤â¤Ã¤¿¡Ö¤¢¤ëÆÃÄê¤ÎÅÅÂî¡×¤Ë»Å»ö¤òÍê¤ó¤Ç¤¤¤¿¤Î¤Ç¤¹¡£¤·¤¿¤¬¤Ã¤Æ,¡ÖÅÅÂî¡× ¥¯¥é¥¹¤Î°À¤ò¤â¤Ä¥ª¥Ö¥¸¥§¥¯¥È¡ÖÅÅÂî A ¤µ¤ó¡×¤Ë¤Ï 2 ¾è·×»»¤òÍê¤ß,Ê̤Υª¥Ö ¥¸¥§¥¯¥È¡ÖÅÅÂî B ¤µ¤ó¡×¤Ë¤Ï²Ã»»¤òÍê¤à¤È¤¤¤Ã¤¿¤³¤È¤â¤Ç¤¤Þ¤¹¡£¤Á¤Ê¤ß¤Ë¡¢ ¤½¤ì¤¾¤ì¤ÎÅÅÂ¤ó¤ÏÆÈΩ¤·¤¿¥ì¥¸¥¹¥¿¤ò¤â¤Ã¤Æ¤¤¤ë¤³¤È¤ò»×¤¤µ¯¤³¤·¤Æ¤¯¤À¤µ ¤¤¡£¤Þ¤¹¤Þ¤¹µ¼¿Í²½¤Î¥¤¥á¡¼¥¸¤¬¶ñÂÎŪ¤Ë¤Ê¤Ã¤¿¤Ç¤·¤ç¤¦¡£
¤½¤ì¤Ç¤ÏÁá®¥×¥í¥°¥é¥à¤òºî¤Ã¤Æ¤ß¤Þ¤·¤ç¤¦¡£ËÜʪ¤ÎÅÅÂî¤Ç¤ÏÅÅÂî¤Ë³°Éô¤« ¤éľÀܥǡ¼¥¿¤òÆþ¤ì¤ë¤³¤È¤â¤Ç¤¤Þ¤¹¤·¡¢¥ì¥¸¥¹¥¿¤ÎÆâÍƤϾï¤Ëɽ¼¨Éô¤Ëɽ¼¨¤µ ¤ì¤Þ¤¹¡£¤³¤Î¤è¤¦¤ËÀ߷פ¹¤ë¤³¤È¤â¤Ç¤¤Þ¤¹¤¬¡¢·×»»µ¡¤Î¾ì¹ç¤ÏÍøÍѼԤ˥ǡ¼¥¿ ¤ÎÆþÎϤòÆþ¤ì¤ë¤è¤¦ÆÄÂ¥¤µ¤»¤¿¤ê¡¢½ÐÎϤ⤿¤À¿ô»ú¤ò¥Ç¥£¥¹¥×¥ì¥¤¤Ëɽ¼¨¤µ¤»¤ë ¤Î¤Ç¤Ï¤Ê¤¯¡¢³Ê¹¥Îɤ¯É½¼¨¤µ¤»¤ë¤³¤È¤¬¤è¤¯¤Ê¤µ¤ì¤Þ¤¹¡£¤³¤¦¤·¤¿ÅÀ¤òÇÛθ¤· ¤Æ¡¢¤Þ¤ºÀ°¿ô¤Î²Ã¸º»»¤ò¼Â¹Ô¤Ç¤¤ëÅÅÂ¥é¥¹¤òÄêµÁ¤·¡¢¼¡¤Ë¤½¤ì¤ò»È¤Ã¤ÆǤ°Õ ¤ÎÆó¤Ä¤Î¿ô¤ÎϤò·×»»¤¹¤ë¥×¥í¥°¥é¥à¤ò¿Þ1.1¤Ë¼¨¤·¤Þ¤¹¡£ ºÙ¤«¤¤ÆâÍƤϤޤÀ¤ï¤«¤é¤Ê¤¤¤«¤â¤·¤ì¤Þ¤»¤ó¤¬¡¢¤ª¤ª¤è¤½º£¤Þ¤Ç¤Ë½Ò¤Ù¤¿¤³¤È¤¬ ½ñ¤«¤ì¤Æ¤¤¤ë¤³¤È¤¬¤ï¤«¤ë¤È»×¤¤¤Þ¤¹¡£
¤Þ¤º¡¢³Æ¹Ô¤Î¡Ö/*¡×¤«¤é¡Ö*/¡×¤Î´Ö¤ä¡¢¡Ö//¡×¤Î¤¢¤È¤Îµ½Ò¤Ï ¥³¥á¥ó¥È¤È¤è¤Ð¤ì¡¢ ¥×¥í¥°¥é¥à¤ÎÉôʬ¤ËÂФ¹¤ëÀâÌÀ¤òÍ¿¤¨¤ë¤â¤Î¤Ç¤¹¡£¥³ ¥á¥ó¥È¤Ï·×»»µ¡¤Ø¤ÎÌ¿Îá¤È¤Ï²ò¼á¤µ¤ì¤Ê¤¤Éôʬ¤Ç¡¢¥×¥í¥°¥é¥à¤Î½èÍý¤Ë²¿¤é±Æ ¶Á¤ò¤â¤Á¤Þ¤»¤ó¤¬¡¢¥×¥í¥°¥é¥à¤òÆɤà¿Í¤Ë¤È¤Ã¤Æ¤Ï½ÅÍפʾðÊó¤òÍ¿¤¨¤Þ¤¹¡£ /*...*/ ¤Ï¹Ô¤ò¤Þ¤¿¤¬¤Ã¤Æ¤â͸ú¤Ç¤¹¤¬¡¢ //... ¤Ï¤½¤Î¹Ô¤À¤±Í¸ú¤È¤Ê¤ê¤Þ¤¹¡£ ¤³¤ÎÎã¤Ç¤Ï¥³¥á¥ó¥È¤¬ ¤ä¤ä¿¤¹¤®¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¤¬¡¢°ìÈ̤ˡ¢¥³¥á¥ó¥È¤Ï¿¤¤Êý¤¬¡¢Â¾¿Í¤Ë¤âÊØÍø¤Ç ¤¹¤·¡¢¼«Ê¬¤Ë¤È¤Ã¤Æ¤â¤¢¤ëÄøÅÙ»þ´Ö¤¬Î©¤Ã¤Æ¤«¤éÆɤà¾ì¹ç¤Ë¤Ï¤¿¤¤¤Ø¤óÊØÍø¤Ê¤Î ¤Ç¡¢¤Ê¤ë¤Ù¤¯ÉÕ¤±¤ë¤è¤¦ÅØÎϤ·¤Æ¤¯¤À¤µ¤¤¡£
¥×¥í¥°¥é¥à¤Ë¤Ï¡¢¥ª¥Ö¥¸¥§¥¯¥È¤Îµ¡Ç½¤òµ¤·¤¿¥¯¥é¥¹¤ÎÄêµÁ¤È¡¢¤½¤ì¤òÍøÍѤ¹¤ë ¥×¥í¥°¥é¥à¤ÎÆó¤Ä¤ÎÉôʬ¤¬É¬ÍפǤ¹¡£¥ª¥Ö¥¸¥§¥¯¥È¤È¤Ï¤³¤Î¾ì¹çÅÅÂî¤Ç¤¢¤ê¡¢¥¯ ¥é¥¹¤È¤Ï¤½¤ÎÅÅÂî¤Î¤â¤Äµ¡Ç½¤òµºÜ¤·¤¿ÄêµÁʸ¤Ç¤¹¡£¤Þ¤¿¡¢C ¤Î¥×¥í¥°¥é ¥à¤Ë¤Ïɬ¤º main ¤È¤¤¤¦Ì¾¤Î´Ø¿ô¤¬É¬Íפǡ¢¥×¥í¥°¥é¥à¤ò¼Â¹Ô¤¹¤ë¤È¡¢¤³¤Î´Ø¿ô ¤ÎºÇ½é¤«¤éºî¶È¤ò³«»Ï¤·¤Þ¤¹¤Î¤Ç¡¢¤³¤ÎÎã¤Ç¤Ï¡¢¤½¤³¤ËÅÅÂî¤ò»È¤¦ºî¶È¤ò½ñ¤¤Þ ¤¹¡£