2007-08-01ãã1ã¶æéã®è¨äºä¸è¦§
ãã¤ãªã®æ代ã§ãªããè¾²æ¥ã®æ代.
topcoderã©ã³ãã³ã°No.1ã®Petrã®è¨äºããã£ããã§æ¦ç¥ãè¨ãã¦ã¿ããçã¾ãã¯1985å¹´ã§ãè²ã ãªã³ã³ãã¹ãã§åªåãã¦ãã¨ã®ãã¨ãã¾ããtopcoderã®ä¸ä½ã«ãã人ãã¡ã¯ACMã§æ´»èºãã¦ãã大å¦çãæ®ã©ã¨ã®äºãCï¼ã使ã£ã¦ãçç±ã¯ãããã¾ã§ä½¿ã£ã¦ããPascalãâ¦
æè¿ã¯ã¢ã«ã´ãªãºã ã«ã¤ãã¦è²ã ã¨åãå ¥ãã¦ãã¾ããç´ æ°åé¡ã解ãå ´åã大æµã¨ã©ã¹ãããã¹ã®ç¯©ã使ãã°è§£ããã®ã§ããã©ãä»ã«ããã¢ã«ã´ãªãºã ãªãããªï½ ã¨èª¿æ»ä¸ãã¨ã¯ãã£ã¦ããåé¡ã解ãæã«ã¯è³æã¨ãä¸åç¡ãã®ã§ããªãã¹ãåãããããã¢ã«ã´ãªâ¦
ç¾ä»£ã®ã·ã³ãã¬ã©ã¹ãã¼ãªã¼ã®ä¸ã§ãJ, K ãã¼ãªã³ã°ã®ããªã¼ããã¿ã¼ã¯è¨æ¶ã«æ°ããã ã¨ã¯ãããã®ã®ããã®æ¬ã¯åãããä¸æã売ãã¦ãã訳ã§ã¯ãªãã失æ¥ä¸ã®ãã¼ãªã³ã°ãï¼ï¼ç¤¾ï¼ã«æã¡è¾¼ã¿ãæ¸ãã¦ãã£ã¨åºçã«æã¡è¾¼ã¿ï¼ï¼ï¼ï¼ãã«ãå¾ãã¨ã®è©±ã§ããâ¦
ã¢ã«ã¦ã³ãã¨ã£ãã ã¡ãªã¿ã«TopCoderå ã®æ å ±ã¯ã¢ã«ã¦ã³ãããªãã¨è¦ãããªããã®ãå¤ãã®ã§ãèå³ã®ãã人ã¯ãå¤å°é¢åã§ãã¢ã«ã¦ã³ããã¨ã£ã¦ãããã¨ãå¿ è¦ã¨ããããã©ã³ãã³ã°ãè¦ãéããtopã¯ãã·ã¢ã¨ä¸å½ã¨ãã¼ã©ã³ãããããå¼·ãã. ã¬ã¼ãã£ã³ã°3â¦
ã¿ã¤ãã«ã¯å¤åéãããã©ãèªãã§ãããNHKã®åæãã¾ã¨ããæ¬ãéèå·¥å¦ã£ã¦ã®ã¯ã¤ã¾ãè£å®åå¼ã ã®ããªãã·ã§ã³åå¼ã ã®ãã©ãã®ããã®ã§.. ã£ã¦å 容ã ã£ããï¼ã¶ã£ã¡ãããã¾ãå 容ãç解ã§ããªãã£ã(ï¾âï½)ï¼ã¡ã¨ç«ã¡èªã¿ããã«ã¯ãã¤ãæ¬ã ã£ãããâ¦
ã·ã§ã¼ãã³ã¼ãã£ã³ã°ããããã©ãåé¡èªä½è§£ãã®ãé¢ç½ãã®ã§ãï¼ï¼ï¼å解ãäºãå½é¢ã®ç®æ¨ã«ããããªãç¹ã«ããããããã¢ã«ã´ãªãºã ã使ã£ã¦ãåé¡ãä¸å¿ã«è§£ãã¦ããããã
100 ! = 9.33262154 à 10^157 ã¨ãªã£ã. ä¸8æ¡ã¾ã§ããè¨ç®ãã¦ãããªãã®ã
çµæ§é ãã¨æããCã§quick sortããæã®10å以ä¸ã®é度ã ã£ãã.. ã¾ããã¹ãã¨ããã¦ãªãã®ã§è©³ãããã¨ã¯åãããªãããã©ããå¤åããã ã¨æãã
Knuthå çã®Texã®ã½ã¼ã¹ã®ãã¨ãæãåºããããã°ãè¦ã¤ãããã³ã«ãPIã®å®ç¾©ã®3.1415.. ã®æ¡ãï¼ã¤ãã¤å¢ããã¦ããæ¹å¼ã ã¨è¨æ¶ãã¦ãããããã¨åãèããshort codingã«ãå°å ¥ããã°ãããã£ããããæ°ãåºãã¯ã.ãããPJOã®ã³ã¼ãã£ã¦å¤§é¨åãC++ã ã¨â¦
libcãã使ããã«ãèªåã®æ¸ããã³ã¼ããã使ããªãããããã£ã人ã¯æ¦ãã¦ãããªãã«åªç§ã§å¤§å¦ã®ææã¨ãã«å¤ãã¿ã¤ãã¨ã®äºãããã人ã®ã³ã¼ããã³ãããã¾ãã£ã¦ãèªåã§èãããã¨ãããªã人ãããã¨ã®ãã¨ããã£ã¡ã¯çµæ§è¦ããããããããªããã©ãæ¦â¦
é£ããããªåé¡ã2ï¼3é¡æ®ãã¦å¤§ä½èªã¿çµãã£ãããã¨ã¯å®è·µããã®ã¿ãªã®ã ããããã«ãã¦CãããC++ããããã¯Javaã使ããããªã£ã¦ããããã¼ãï½ã¨ããããPOJã®åé¡ã解ãã®ã¯è¯ãã¨ãã¦ãã©ãããé çªã«è§£ãã¦ããã°ããã®ã ãããï¼ åé¡ãå¤ããã¦ãâ¦
930 solvã§19ä½ããã 解ãããã§ããããã 1ä½ã®äººã¯ã©ãã ã解ãã¦ãã®ãã..
以ä¸ã®ãããªå¼ãè©ä¾¡ããã¨ã i;main(){printf("%d %d\n",i++,i++);} 1 0 ã¨ããçµæãå¾ãããããã¼ãï½0 1ãã¨ãããããããããããªãã®ãï½ ä¸æè°ãããã«éãä¾ã試ãã¦ã¿ãã i; main(){printf("%d %d\n",i,i++);} 1 0 i;main(){printf("%d %d\n",â¦
ICPCã®äºé¸åé¡ãshort codingã®ç·´ç¿ãã¦ã解ãã¦ã¿ããåé¡ã¯æ¥æ¬äºé¸ã®ï¼åç®ãåé¡ã¯ã¡ãªã¿ã«ããã«ããã¾ã.POJã®3325çªç®ã§ããæ£ççã70overã¨ããç°¡åãªåé¡ãã¶ã£ã¡ããquick sortããã ãã§ã.short codingã®ç·´ç¿ã«ã¯ãã£ã¦ã¤ããã¨ããã¨ãshort â¦
æåãªè©±ãèªåè»ç£æ¥ã¨äºè§ã®ã¬ãã«ï¼ï¼ãã¯ãå¤ãæ å ±ãããããªããï¼ã¨ã®ãã¨ãããã®ããã§ãæ¥æ¬ã«ã«ã¸ããã§ããªãã¨ãã話ãããã¨ã®ãã¨.. ã¡ãªã¿ã«ãï¼ï¼å åã¯æ¥æ¬ã®å½å®¶äºç®ã®ååï¼ï¼ã ã£ãæ°ããã) ã©ãã ãå²ãã¦ããã®ãã¨å°ä¸æéã 30å â¦
ãã®è¨äºã«ããããã«ãç©çã¯åå¦ã¯ä»£è¡ä¸å¯è½ãªããã (ã¨ãããç¡çwï¼ãæ å ±ç§å¦ãå°ãããã¨ã®ãã¨ãã¾ãæ å ±ã¨ãæ°å¦ï¼ã¬ãã«ã«ãããã ããã)ãªãç¡çã§ããªãæ°ãããã ãã¡ã®å°éã®æ©æ¢°ã§ã¯ç¡çã£ã½ãã
å ¥ååé¡ã®å®ç³ã¯ for(;~scanf();) ã使ã£ã¦ãå®éã®ãã¹ãã®æã«ã¯å ¥åâC-dã§EOFã¨ãã£ãæµãã«ãªãã ã¨ããããã¡ã¢ã¡ã¢
Cè¨èªã®é¢æ°å é¨ã§ãint a;ã¨ãã¨ãã£ãå ´åããã¼ã«ã«å¤æ°ãªã®ã§åæåãããªãããã¤ã³ã¿ã¨ã使ãæ¼ç®ãããã¨ãã¯ã¾ããã¤ã³ãã§ãããã¨ã®äºãCè¨èªFAQã«è¡ã£ããå¿ ãã¨ãã£ã¦ããã»ã©ããã¼ã«ã«å¤æ°ã®ç½ ã«ã¯ã¾ãã¾ãã(ï¾âï½)çãªè³ªåãåºã¦ãããã¨ééâ¦
ããããã®å¥³ã®åï¼ãããã«ãããããï½ï¼ãåºã¦ãã漫ç»ããªããªãã®é¢ç½ãã ã£ãã®ã§ããããããããã¿ã¤ãã«ãå¿ããããªãã ã£ãããªã..ä½ç»ã¯ããã¾ããã²ãã«ä¼¼ã¦ããæ°ãããã
è²ã ãªæå³ã§ã¯ãªãªãã£ã®é«ãéèªã§ããCourierãèªãã§ãããç¸å¤ãããã®ã¯ãªãªãã£ã®é«ãã§ããã以ä¸ã¯è¦ãã¦ãå 容ã«ã¤ãã¦ã®ææå°æ¹¾ã§ã¯æè©ä¸ã«æ¹æãã¤ãæ²ã売ãã¦ãã¨ã®äºãä¸å½å¿ã®æ¦å°ã¨ããæè©ã«ããããæ²ãã¯ãã£ã¦ãã£ã¦ã®ãé©ããæ¥æ¬ãâ¦
ç¥ãåãã®ä¸å¦çã¯è²ã ã¨ããã°ã©ã ãã§ããããã§ãCã¨ãPerlã¨ãRubyã ã®ãé§ä½¿ãã¦ãããããã¨ããã°ã©ã ãçµãã§ãã¨ã®äºãåãã§ãã(ï¾âï½) ã¡ãªã¿ã«networkã²ã¼ã ã¨ãCã§ä½ã£ã¦ãã¨ã®äº.. å°å¦çã®ãããããããã§ã«è²ã ã¨ããã£ã¦ããããã§ã.ãâ¦
javascript:{for(i=0;i++<100;alert(i%5?a||i:a+"Buzz"))a=i%3?"":"Fizz"} ãã¢ãã¬ã¹ãã¼ã«æã¤ã¨çµæãå¾ããã.ã·ã§ã¼ãã³ã¼ãã¼ã¯æ¬å½ã«é¢ç½ããã¨èãã¾ãã(ï¾âï½) ç¹ã«ã?a||iã®é¨åã¨ããããããã¡ãªã¿ã«æçã¯BASHã®43ãã¤ãã¨ã®äº. 2ä½ã®PERLã¨ã¯â¦
Short Codingã«æ¸ãã¦ããã¨ãããä¸çªåãã®åé¡ã52Bã§æ稿ããããã¾å¦çãæããã¦Acceptããããããããã®POJã·ã¹ãã ã¯ãããã§ããããã£ã¨ããéã«ã³ã¼ãã®å¤å®å¦çãæããããã©ããã風ã«å é¨å¦çããã¦ãã®ã ãã解ããåé¡ã«ã¯Ããã¤ããããä»â¦
ircã®#emacs logããè»¢è¼ Emacs cheat sheetã¨ã£ã¦ãããããããã®ã§ãå§ããã¨ããããããã«ã®ã£ã¦ãã³ãã³ãå ¨é¨è¦ããããemacsã®ä¾¿å©ããããããããã£ã¦ããã¨æããå 容çã«ã¯ãã®ä»ã®äººã«ã¯ç©è¶³ããªããããããªããã©.
ã¯ã¦ãã®ä»¥ä¸ã®ãããªè¨äºå 容ã«ããã¦, ãã®ã¨ã³ããªã¼ãããã¯ãã¼ã¯ãã¦ããã¦ã¼ã¶ã¼ (5 +1) ãã®+1ã¦ãªããªãã ãã... è¬ã ï½ãã¨å ¨ãé¢ä¿ãªãã®ã ãã©ãxpathç³»ã®é¢æ°ã®å¦çã£ã¦ãããªãã«é«éï¼ãªã®ããª. ãã æ°ã«ãªã£ãã ããæ¬å½ã«ï½
javascriptã§ããã¹ããèªåã§èªã¾ããã¹ã¯ãªããã®ã½ã¼ã¹ããªããªãé¢ç½ããé空æ庫ã¨ãæ°èã®è¨äºã¨ãããããã£ãæãã®javascriptã使ã£ã¦èªã¾ããã¨ããã®ããªã¨æã£ããããã¹ããèªã¾ããæ±ç¨ã©ã¤ãã©ãªã¨ããããããªæ°ããããã ãã©.. ãã¼ãï½ãâ¦
æ å ã«æã£ã¦ãã£ãã®ã ããã©ããæå¤ã¨è§£ããåé¡ãå¤ãã¦é©ããããã¯ãæçã¨ãã¯æ £ããªã®ããª. ãªãã¨ããããããã¯å¤§æµã®åé¡ã¯ä¸ç®ã§ãããã¨ãã£ã¦ãããã¦ãã. ä¸æã®èãä¼ãã«ä¼¼ããã£ã¦è«ºãããããå²ç¢ãããããã ã£ãï¼ããã¨ã å°æ£ããªï¼â¦
æ¸åºã«ããã¦ãã®ã§ç«ã¡èªã¿ãã¦ã¿ã. ãã£ããã¨foræã®ä¸ã«getsã¨ããscanfé¢æ°ã¨ãã使ããã¦ãã®ãå°è±¡çã ã£ãããã¨~使ãã¾ããï½ã³ã¼ãã¨ãã¦ã¯ãããªæã main(n){gets(&n);putchar(n%5+5);} #includeãããã¦ãªãï½ ãããããããï½ ããããªããâ¦
JRã«ã¤ãã¦ã®æ¬ãã¿ã¤ãã«ã¯ã©å¿ãããã®ã ããã©ããã¨ããããè¦ãã¦ããé¨åã ãã§ãã¡ã¢ã£ã¦ãã æ°å¹¹ç·ã®è»ä¸¡ã®ç·ééã¯ãversin upãããã¨ã«è»½éåããã¦ãããï¼0ç³»900å¾åtãªã®ã«å¯¾ããææ°ã®N700ã¯700t) æ°å¹¹ç·ã®è»ä½ã®ç´ æã¯0ç³»ã¨100ç³»ï¼ã¯made oâ¦