• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            The Sun Also Rises

            Algorithm, Mathematica, 計算機科學, C++, photography, GNU/Linux的討論空間

              C++博客 :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
              73 隨筆 :: 6 文章 :: 169 評論 :: 0 Trackbacks

            #

            500分的題。。。
            由于之前看到過chomp game,(《Game Theory》的練習里有),然后開始試圖推公式之類的。。。在wiki上找到rectangle情況先手必勝的證明:

            Who wins?

            Chomp belongs to the category of impartial 2-player perfect information games.

            It turns out that for any rectangular starting position bigger than 1 × 1 the 1st player can win. This can be shown using a strategy-stealing argument: assume that the 2nd player has a winning strategy against any initial 1st player move. Suppose then, that the 1st player takes only the bottom right hand square. By our assumption, the 2nd player has a response to this which will force victory. But if such a winning response exists, the 1st player could have played it as his first move and thus forced victory. The 2nd player therefore cannot have a winning strategy.

            Computers can easily calculate winning moves for this game on two-dimensional boards of reasonable size.


            很優美的證明。。。只可惜不能提供任何strategy...-_-bbbbbbbb
            最后終于悟出來這題規定棋盤3*n, n<=100,所以就100*100*100的dp就行了。。-_-bbbbbbbbbb


            p.s. wiki : Chomp Game


            p.s. 確實覺得一知半解是一個很容易出錯的情況...因為如果完全不知道思維也就沒有任何限制了,曾經看到過么...感覺會有點緊張(想要趕緊搞掉的那種感覺) & 試圖用記憶中的套路去做...但有時候可能沒有關系(例如這個game, 先手必勝的證明并不能提供任何先手如何operate的信息...,如果繼續往這個上面想就直接掛了...-_-bbbbbbb)
            還有就是有可能會出現類似于"當時為什么不仔細推清楚"之類的念頭...這個seems容易解決...

            感覺如果是完全陌生的題想法通常容易比較open, 如果感覺這個模型熟悉一般都會試圖往熟悉的模型上套...大多數情況下這樣確實可以節省時間...但是如果失去了open的思維 + 熟悉的模型無法解決就orz了...


            posted @ 2008-02-17 04:15 FreePeter 閱讀(1026) | 評論 (4)編輯 收藏

            基于AJAX的一個在瀏覽器內的瀏覽器~~~
            好東西。。。可以用來看wiki的articles~~~
            and Under GPL~~~~~~~~~

            http://gollum.easycp.de/en/
            posted @ 2008-02-17 00:15 FreePeter 閱讀(556) | 評論 (0)編輯 收藏

            [Overview] Arab and North Africa 2007, ANARC2007

            Judging Olympia
            弱智題
            Hide That Number
            利用mod11的性質直接算出前面應該補充什么。
            Rotating Rings
            每層判斷是否可行。
            A Tale from the Dark Side of the Moon
            據說是無聊題
            Fermat's Chirstmas Theorem
            預處理素數列表 + 直接回答,注意2也是第二類素數
            Incidental Points
            經典題,枚舉一個點,算出其他點相對于它的向量,問題就變成count同樣的向量有多少個,sort / hash都可以。。。

            簡單的DP題
            The Writer's Club
            writer之間求一下傳遞閉包,然后把所有是某個writer的reader合并起來,可以用32位壓int來優化.
            Moving Sticks
            據說直接搜就可以了。To be written
            Johnny Hates Math
            經典的DP,用BFS來實現。內存稍微有點緊。


            posted @ 2008-02-16 18:24 FreePeter 閱讀(1242) | 評論 (3)編輯 收藏

            Northwestern Europe (NWERC) 2007 解題報告
            Central Europe 2007解題報告
            Southeastern Europe 2007解題報告

            順便增加以下這三個頁面的PR...~~~
            posted @ 2008-02-09 19:54 FreePeter 閱讀(1224) | 評論 (1)編輯 收藏

            Trouble Loading Firmware 2

            If you get the following:

            ipw2200: Detected Intel PRO/Wireless 2200BG Network Connection
            ipw2200: ipw2200-bss.fw request_firmware failed: Reason -2
            ipw2200: Unable to load firmware: -2
            ipw2200: failed to register network device
            ACPI: PCI interrupt for device 0000:03:03.0 disabled
            ipw2200: probe of 0000:03:03.0 failed with error -5

            In the latest distribution of Gentoo(kernel>=2.6.23-r3, and udev>=115-r1), everything configuration files are OK now. You may find

                SUBSYSTEM=="firmware", ACTION=="add", RUN+="firmware.sh 

            in the file/etc/udev/rules.d/50-udev.rules. Even list ipw2200 in /etc/modules.autoload/kernel-2.6 is unnecessary now.

            However, if you compiled the driver into the kernel, you may suffer this problem. One way to solve it is to regenerate the kernel and compile the driver as a module.

            Also you may apply this patch : http://ipw2200.sourceforge.net/patches/ipw2200-1.2.2-close_intf.patch

            For more informations, visit : http://bugs.gentoo.org/show_bug.cgi?id=202557

            If it's not because of this, or you use a relatively old version of kernel, you may read the solutions below.



            The reason is very simple (From bugzilla id 202557)
            When the ipw2200 driver is built into the kernel (not as a module), it attempts to load firmware from a file on disk while the kernel is initializing, which of course fails because there is no filesystem at this point in time.


            The whole article can be found in http://gentoo-wiki.com/HARDWARE_ipw2200
            posted @ 2008-02-05 10:24 FreePeter 閱讀(445) | 評論 (0)編輯 收藏

            注:是昨天的事情了。。。8過沒找到哪里可以改發布時間。。。-_-bbbbbbbbbb


            早上給小白菜打了個電話。。。
            于是他說。。他今天下午正好要和一群人聚。。。
            于是把我也push_back()了。。。
            我暈。。。這么大的雪。。。恩。。。精神可嘉。。。

            于是我就英勇無畏的去了。。。
            然后發現他們居然是K歌。。。-_-bbbbbbbbbbbbbbbbbbbbbbbbbb
            話說某件事情以后我對K歌都有心理陰影了不是。。。
            好吧。。。誰怕誰。。。
            然后發現小白菜拖來個(2)班的女生。。。結果我就被萌住了。。。嘿嘿以后對K歌估計就沒有心理陰影了~~~~~

            發現《美人魚》唱起來沒有想象中的走調~~~
            恩。。。進步很大。。。

            K完歌大家去吃日本料理。。。
            名字叫金田中還是啥的。。。細節不要在意。。。
            比較好吃。。。當然有可能是因為小白菜 & zt比較會點。。。
            那個煎秋刀魚相當之好吃啊。。。(話說zt ms在YY上一大盆。。。當然這樣的代價可能是我們要留下來刷盤子。。。:P)
            生魚片也不錯。。。應該是因為那個芥末不沖。。。我還是很怕芥末的沖味的。。。
            (據小白菜說。。。正宗的日本芥末是不沖的。。。中國產的比較沖。。。
            那為蝦米我在日本吃的時候也這么沖呢。。。難道是中國進口的。。。-_-bbbbbbbbbbbbb)



            最后發現wireless配置不成功。。。
            我哭。。。為蝦米就是load firmware失敗呢。。。T_T
            freepeter@localhost /sbin $ dmesg | grep ipw2200
            ipw2200: Intel(R) PRO/Wireless 2200/2915 Network Driver, 1.2.2kmrq
            ipw2200: Copyright(c) 2003-2006 Intel Corporation
            ipw2200: Detected Intel PRO/Wireless 2200BG Network Connection
            ipw2200: ipw2200-bss.fw request_firmware failed: Reason -2
            ipw2200: Unable to load firmware: -2
            ipw2200: failed to register network device
            ipw2200: probe of 0000:02:03.0 failed with error -5



            posted @ 2008-02-03 19:45 FreePeter 閱讀(228) | 評論 (0)編輯 收藏

            同學是從香港買的V3224AU,因為預裝的是繁體的Vista非常之不習慣,然后幫忙裝XP.

            裝驅動的時候找到了這里,但裝好驅動以后系統ms有各種各樣的詭異問題。。。
            其中包括無法正常關機(-_-bbb,雖然我在XP下還是碰到過些的,但剛裝好系統2天就這樣還真沒碰見過。。。-_-bbbbbbb)
            容易死機(這個問題在后來重裝withSP2XP后非常明顯,因此懷疑是雙核本本和XP的兼容性問題)
            因為不確定是否是驅動的小不兼容問題,然后就先湊合著。
            (后來發現似乎只要是AU/TU系的驅動都可以通用,因為都是通用的驅動,比如nForce, GeForce Go, etc, 而且HP官方的XP驅動下載AU和TU的不同機型的驅動指向相同的鏈接似乎也證明了這一點

            最近瀏覽了下論壇的帖子發現確實HP對XP的驅動支持不完美。。。(打死HP...-_-bbbb,有vista了好歹也照顧下向后兼容。。。)
            所以建議還是做vista & XP雙啟動~
            總的說來本本還是很容易出兼容性問題的,如果廠商不支持。。。誒。。。
            要不是別人的本本我考慮直接裝個gentoo玩玩~~~。。。



            我現在的裝法:
            1. 一套OEM版的簡體中文vista & HP OEM版的XP with SP2
            如何制作雙系統見這篇帖子
            2. 驅動是老大發布的最新驅動
            3. 關于雙核的安裝,我的安裝順序是
            AMD官方驅動 -> 微軟KB924441補丁(ms是雙核和ACPI的no respond補丁) -> AMD加速補丁
            這三個東西那張光盤上都有。
            至于還有一個微軟KB896256補丁,官方介紹是
            Install this update to fix a situation where your Windows-based systemthat supports processor power management features, and is equipped withmultiple processors, may experience decreased performance.
            簡稱就是accerlate的。。。你看AMD不是有官方的補丁了么。。。而且這個補丁傳說中還要手動編輯注冊表打開,一定有JQ。。。于是我就不裝了。。。

            效果暫時似乎還不錯,先用一段時間再看看如何。。。




            歡迎大家交流想法 & 方法 & 拍磚~
            p.s. 今天在一個人的QQ空間上看到一個HP OEM & 集成驅動版的XP
            http://191182924.qzone.qq.com/
            不知道有沒有人試過呢?


            posted @ 2008-02-03 19:38 FreePeter 閱讀(530) | 評論 (0)編輯 收藏

            http://linux.oneandoneis2.org/LNW.htm

            關于這段話

            Something to bear in mind, however, is that "training wheels" are often available as "optional extras" for Linux software: They might not be obvious, but frequently they're available.

            Take mplayer. You use it to play a video file by typing mplayer filename in a terminal. You fastforward & rewind using the arrow keys and the PageUp & PageDown keys. This is not overly "user-friendly". However, if you instead type gmplayer filename, you'll get the graphical frontend, with all its nice, friendly , familiar buttons.

            Take ripping a CD to MP3 (or Ogg): Using the command-line, you need to use cdparanoia to rip the files to disc. Then you need an encoder. . . It's a hassle, even if you know exactly how to use the packages (imho). So download & install something like Grip. This is an easy-to-use graphical frontend that uses cdparanoia and encoders behind-the-scenes to make it really easy to rip CDs, and even has CDDB support to name the files automatically for you. 

            The same goes for ripping DVDs: The number of options to pass to transcode is a bit of a nightmare. But using dvd::rip to talk to transcode for you makes the whole thing a simple, GUI-based process which anybody can do.

            So to avoid #5b issues: Remember that "training wheels" tend to be bolt-on extras in Linux, rather than being automatically supplied with the main product. And sometimes, "training wheels" just can't be part of the design.



            關于trainning wheels的問題。。。我個人比較贊同毛大牛的觀點
            i.e. 我們要先最naive地走一遍,了解它究竟是如何工作的,then 我們可以使用各種輔助工具。
            我以為,沒有必要每次重新發明一個輪子,但我個人比較傾向于先了解一下輪子是怎么做出來的。。。然后當然不會自己造輪子,而是使用最好用的輪子~~~我相信這無論是對我使用輪子還是在需要的時候對輪子做出點小變動都是及其有幫助的。

            這篇文章還沒來得及看:

            Computer Science Education: Where Are the Software Engineers of Tomorrow?
            我個人覺得這年頭framework封裝的太好了。。。大多數人都可以很快的學會如何快速的用這些輪子、引擎做成一個汽車。但絕大多數人不知道輪子、引擎的制作原理了。。。
            恩。。。學習還是C++好啊~~~用起來顯然是Java...
            Lisp & C++ & Qt & Python...


            posted @ 2008-02-01 01:04 FreePeter 閱讀(349) | 評論 (2)編輯 收藏

            最近看GTD & ZTD很熱。。。
            有些東西很value...但有些東西。。。有點郁悶。。。
            而且我一向覺得這種東西應該是因人而異的。。。不能完全實踐某一個。。。
            于是考慮YY一個PPTD...~~~

            0. PPTD是會隨時修正 / 改變的。。。(i.e. open的,會吸收任何我認為對我好的東西)
            另外遵循CCPL協議(就是本blog的協議。。。)

            以上都可算作廢話。。。

            ---------------------------------------------------------------------------------------------------

            1. 關于事情處理的問題。
            我個人比較贊同簡約話生活(但不簡單),因此我大體比較贊同的方式是 專門時間段時間規劃 + 忘掉時間表(seems from Lunarmony)。
            比較贊同那個MIT(Most Important Things)原則。。。也就是有一些事情是安置好要做的,這些事情不多。排一個較高priority~

            然后問題就是。。。別的事情怎么辦?
            原則上可以排一個相對優先級,然后挑重要的作。
            但是實踐中發現。。。試圖挑的過程中會羅列大量的事情。。。然后feeling stress || 都想作完的感覺 || 反復思考先作哪件事好呢?。。。
            雖然我告訴自己反復思考毫無益處。。。但是。。。-_-bbbbbbbbbbb

            確實我覺得有些東西不是思考的。。。如果告訴自己,我應該基于什么原則選擇事情。。。然后打分。。。挑最重要的。。。我覺得MITs這樣還不錯。。。如果所有的事情都這樣...人畢竟不是操作系統。。。-_-bbbbbbbbbb

            我記得2年前的我實踐過一個方式叫做“拒絕思考 / follow your heart”
            簡稱就是想到一件事情,然后覺得差不多,就去作,別的就懶得管了。。。然后等到下一個切換點再選別的事情去做。
            現在覺得這個方法還是挺不錯的,因為其實跳出來的第一件事情往往是你認為比較重要的。。。當然你要有專門的時間來考慮一下哪些事情比較重要。。。~~~
            MITs已經被專門 done了。。。
            主要的問題(也是我后來drop掉的原因)是有一些事情(如果跳不出來)會一直不去作,簡稱進程會餓死。。。-_-bbbbbbbbbbbbb
            還有就是不知道要做什么事情的時候。。。恩。。。



            posted @ 2008-01-29 01:03 FreePeter 閱讀(323) | 評論 (0)編輯 收藏

            cppblog提供隨筆 & 文章2中post方式。
            于是按照我的理解,隨筆就是比較敏捷 & 快速發布 & 不成熟 & 試驗性質的東東(例如關于某道題的一些想法 & 大體思路)
            文章是比較summary的東東。
            所以解題報告什么的還是丟到文章(article )里去吧。

            唯一的問題是。。。
            測試了一下發現如果直接訂閱我的blog RSS, 文章是不會顯示出來的。。。
            沒什么大問題。。。不行手動通過隨筆發文章的link.


            posted @ 2008-01-29 00:40 FreePeter 閱讀(371) | 評論 (0)編輯 收藏

            僅列出標題
            共8頁: 1 2 3 4 5 6 7 8 
            Creative Commons License
            This site is licensed under a Creative Commons Attribution-Share Alike 2.5 China Mainland License. 本站采用創作共用版權協議, 要求署名、相同方式共享. 轉載本站內容必須也遵循“署名-相同方式共享”的創作共用協議. This site is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
            久久精品国产亚洲欧美| 久久久久久青草大香综合精品| 久久免费99精品国产自在现线| 久久青青草原精品国产软件| 综合久久给合久久狠狠狠97色| 四虎国产精品成人免费久久| 99麻豆久久久国产精品免费| 久久国产成人午夜AV影院| 国产精品久久新婚兰兰| 精品久久久久久亚洲| 亚洲AV伊人久久青青草原| 日韩乱码人妻无码中文字幕久久| 国产精品久久一区二区三区| 青青草原综合久久大伊人| 狠狠色丁香久久婷婷综| 久久人人爽人人爽人人片AV高清| 久久91精品久久91综合| 日本加勒比久久精品| 九九久久99综合一区二区| 欧美日韩精品久久免费| 久久久久久青草大香综合精品| 久久亚洲美女精品国产精品| 亚洲国产精品嫩草影院久久| 久久精品国产99国产电影网| 色婷婷综合久久久久中文一区二区| 久久久久亚洲av毛片大| 91精品国产91久久| 久久久婷婷五月亚洲97号色| 性做久久久久久久久| 久久精品国产99久久丝袜| 久久精品国产半推半就| 国产精品毛片久久久久久久 | 人妻无码中文久久久久专区| 色狠狠久久综合网| 一极黄色视频久久网站| 色婷婷久久久SWAG精品| 伊人久久无码精品中文字幕| 久久久久久久综合狠狠综合| 久久频这里精品99香蕉久| 久久精品国产亚洲AV不卡| 亚洲国产另类久久久精品 |