• <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>
            隨筆-72  評論-126  文章-0  trackbacks-0
            http://acm.zju.edu.cn/onlinejudge/searchProblem.do?contestId=1&titlefrom=0&authorfrom=0&sourcefrom=0&query=provinc
            會對每一道做過的題做一個(gè)簡單的分析,如果有出錯或者不理解可以于我交流

            2104 Let the Balloon Rise Zhejiang Provincial Programming Contest 2004
            數(shù)據(jù)很小,遍歷一下,找到就++,沒有的話就算新的
            2105 Number Sequence Zhejiang Provincial Programming Contest 2004
            找循環(huán)節(jié),開hash[7][7]來找,hash前一個(gè)和后一個(gè)
            2106 Tick and Tick Zhejiang Provincial Programming Contest 2004
            當(dāng)年應(yīng)該是金牌題吧,時(shí)間是連續(xù)的,不能一秒一秒分開來計(jì)算
            我是根據(jù)題目聯(lián)立三個(gè)不等式方程,然后解出交集
            2107 Quoit Design Zhejiang Provincial Programming Contest 2004
            最近點(diǎn)對,二分的思想,據(jù)說數(shù)據(jù)結(jié)構(gòu)書上就有。。。
            2108 Elevator Zhejiang Provincial Programming Contest 2004
            簡單模擬題,求出上升和下降的層數(shù)
            2109 FatMouse' Trade Zhejiang Provincial Programming Contest 2004
            按性價(jià)比排序后貪心
            2110 Tempter of the Bone Zhejiang Provincial Programming Contest 2004
            深搜,加個(gè)奇偶性剪枝
            2111 Starship Troopers Zhejiang Provincial Programming Contest 2004
            神題,不會。。。據(jù)說是樹形DP
            5.13補(bǔ)充:當(dāng)時(shí)看著是的做也不敢做的神題,前幾天學(xué)習(xí)了熟悉樹形DP后練習(xí)了幾道題目再來做這題發(fā)現(xiàn)一點(diǎn)都不難
            樹形+背包+臨街表建圖可以輕松A掉此題


            2474 World Goes Round Zhejiang Provincial Programming Contest 2005
            這題數(shù)據(jù)量好大,n=10,記得在北師大比賽的時(shí)候做過一個(gè)3*3的八數(shù)碼也是這樣轉(zhuǎn)動規(guī)則,當(dāng)時(shí)是預(yù)處理直接秒掉的
            這道狀態(tài)太大,變身為神題了,不會

            不是求最優(yōu)解,所以我猜測應(yīng)該是構(gòu)造出一種方法讓它轉(zhuǎn)到目標(biāo)狀態(tài)
            //我想是不是可以降維,拼好最左邊和最上邊就可以降一維了。。
            至于怎么構(gòu)造沒有想出來。。。。
            尚未做出
            2475 Benny's Compiler Zhejiang Provincial Programming Contest 2005
            判斷有向圖成環(huán),用拓?fù)渑判?,錯了N遍,我都懷疑是不是我的拓?fù)鋵戝e了。。
            后來試了一下原來有惡心數(shù)據(jù),Ai == Bi的時(shí)候這樣的數(shù)據(jù)不要計(jì)算,不然就自己成環(huán)了。
            2476 Total Amount Zhejiang Provincial Programming Contest 2005
            模擬一下,都不用大數(shù)加法,直接用long long就夠了,輸出的時(shí)候分段輸出
            2477 Magic Cube Zhejiang Provincial Programming Contest 2005
            題目說不超過5步,可以用迭代加深搜索,其實(shí)題目意思很直白,就是這道題目很難模擬。
            把魔方的轉(zhuǎn)模擬出來這題目也就做出來了。。
            我把每一種轉(zhuǎn)都計(jì)算出來寫進(jìn)表里,然后按照這個(gè)表轉(zhuǎn)就OK了
            2478 Encoding Zhejiang Provincial Programming Contest 2005
            遍歷一遍比較當(dāng)前字符和前一個(gè)字符就好
            2479 Cover the Rectangular Ground Zhejiang Provincial Programming Contest 2005
            從最左下角的點(diǎn)開始dfs,每次先判斷能不能放上,然后找出當(dāng)前最左下角的點(diǎn)再dfs
            這樣很暴力。。最壞的情況算不來,大概有20!次。。。我暈,一直TLE
            后來我試了下數(shù)據(jù),倒是是我的程序真的效率很低,還是只有一些數(shù)據(jù)都跑不出
            經(jīng)過多次WA和TLE的測試發(fā)現(xiàn)只要有解得數(shù)據(jù)我都能跑出來,無解的就直接搜到死了
            于是我定義如果深搜次數(shù)超過100000就直接跳出,無解
            結(jié)果就AC了。。。。效率還很高,由于內(nèi)存原因拍在第二
            唉,比賽的時(shí)候如果能這樣AC的話就太RP了。。。
            。。求正解。。
            2480 Simplest Task in Windows Zhejiang Provincial Programming Contest 2005
            數(shù)據(jù)量小,直接水掉,從后往前比較for(i = n- 1; i >= 0 ; i --),找到符合的跳出,最后輸出下標(biāo)
            2481 Unique Ascending Array Zhejiang Provincial Programming Contest 2005
            排序后輸出


            2736 Daffodil number Zhejiang Provincial Programming Contest 2006, Preliminary
            水題
            2737 Occurrence Zhejiang Provincial Programming Contest 2006, Preliminary
            題目看清楚后暴力比較久可以
            2738 The Kth BST Zhejiang Provincial Programming Contest 2006, Preliminary
            啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊
            推了一個(gè)下午啊。。。。。竟然WA。。。。。極度郁悶。。。。。

            吃飯回來終于AC了。。。。再郁悶,原來是我對BST的理解有誤,后來紀(jì)哥糾正了,就這樣陷入了誤區(qū)N久。。。。不值得啊。。。
            2739 Color Quantization Zhejiang Provincial Programming Contest 2006, Preliminary
            尚未做出
            2740 Message System Zhejiang Provincial Programming Contest 2006, Preliminary
            用并查集做,判斷是樹還是森林還是圖


            2741 Offside Zhejiang Provincial Programming Contest 2006, Preliminary
            很腦殘的模擬題,我卻腦殘的錯了N編。。。。。
            2742 Toy Bricks Zhejiang Provincial Programming Contest 2006
            尚未做出
            2743 Bubble Shooter Zhejiang Provincial Programming Contest 2006
            先foldfill一下,把連起來的hash掉,然后從最上邊每個(gè)點(diǎn)開始foldfill,看還有幾個(gè)留下
            2744 Palindromes Zhejiang Provincial Programming Contest 2006
            從回文串的性質(zhì)上找規(guī)律,每個(gè)點(diǎn)向左右延長數(shù)回文串個(gè)數(shù)
            2745 01-K Code Zhejiang Provincial Programming Contest 2006
            惡心的推推題,我的方法一定不是最簡單的,我開了四維數(shù)組還轉(zhuǎn)移狀態(tài)
            分別存的是:
            dp[0和1相差幾位,最高到達(dá)過,最低到達(dá)過,n]
            這是很爛的方法,我想了很久才想出來,實(shí)在想不出更好的了
            2746 Rank the Teams Zhejiang Provincial Programming Contest 2006
            尚未做出
            2747 Paint the Wall Zhejiang Provincial Programming Contest 2006
            離散化+hash即可,有點(diǎn)暴力,正解是線段樹
            2748 Free Kick Zhejiang Provincial Programming Contest 2006
            惡心的集合題,開始沒有看到straight "WALL"構(gòu)造出一種最優(yōu)解,結(jié)果WA了
            改了之后也一直WA,錯了無數(shù)次后修改了下求夾角的方法,本來有atan,改成acos竟然AC了~~
            思路:
            先求出沒有wall時(shí)候的夾角,然后減去守門員的范圍,再根據(jù)剩下的角度來求出人數(shù)
            2749 Polarium Zhejiang Provincial Programming Contest 2006
            很好玩的一道題目,有人竟然能TLE 1000+次,而且連續(xù)了半年。。Orz一下
            我跑的比較暴力,效率挺低的
            思路:
            首先枚舉最后的答案:即每行的黑白情況
            然后根據(jù)這個(gè)答案重新畫出一張地圖,每個(gè)能走的點(diǎn)(除了邊界點(diǎn))都只能走且只走一次,然后進(jìn)行DFS
            走到終點(diǎn)的時(shí)候判斷下是否符合條件就AC了(開始的時(shí)候我先判斷走完點(diǎn)再判斷最后一點(diǎn)是否是終點(diǎn),結(jié)果超時(shí)了)
            2750 Idiomatic Phrases Game Zhejiang Provincial Programming Contest 2006
            構(gòu)造出最短路,每個(gè)串的最先4個(gè)和最后4個(gè)就是起點(diǎn)和終點(diǎn),2^16個(gè)點(diǎn),1000條路
            我用鄰接表+堆+bfs加速優(yōu)化10ms



            2849 Attack of Panda Virus Zhejiang Provincial Programming Contest 2007
            按level最小和type最小的優(yōu)先隊(duì)列BFS一下
            2850 Beautiful Meadow Zhejiang Provincial Programming Contest 2007
            水題
            2851 Code Formatter Zhejiang Provincial Programming Contest 2007
            注意出現(xiàn)在后邊的'\t'
            2852 Deck of Cards Zhejiang Provincial Programming Contest 2007
            DP,三維(每組牌的價(jià)值)加滾動數(shù)組能輕松AC
            2853 Evolution Zhejiang Provincial Programming Contest 2007
            矩陣題,有點(diǎn)卡時(shí)間
            我的結(jié)構(gòu)體模板200*200開不下,于是我升級了我的模板,換了一個(gè)全局矩陣
            題目意思理解對套個(gè)矩陣模板就能過了
            2854 Fish and Her Bowl Zhejiang Provincial Programming Contest 2007
            尚未做出
            2855 Google Map Zhejiang Provincial Programming Contest 2007
            用所給公式+遞歸解決
            2856 Happy Life Zhejiang Provincial Programming Contest 2007
            無論什么狀態(tài)都一定能構(gòu)造出可行解的,所以只要while(1)把和小于0的那行變換符號,一直都滿足條件
            2857 Image Transformation Zhejiang Provincial Programming Contest 2007
            水題



            2965 Accurately Say "CocaCola"! The 5th Zhejiang Provincial Collegiate Programming Contest
            數(shù)據(jù)小,暴力下就好,數(shù)據(jù)大的話可以數(shù)學(xué)歸納或者暴力看下規(guī)律
            2966
            Build The Electric System The 5th Zhejiang Provincial Collegiate Programming Contest
            傻傻的最小樹
            2967 Colorful Rainbows The 5th Zhejiang Provincial Collegiate Programming Contest
            正解說是半平面交
            我是用一個(gè)棧,先按b從大到小排序,如果然后遍歷一下,能出現(xiàn)的就放進(jìn)棧里,能把前面的覆蓋掉就把棧里的線段拿出
            正半軸,負(fù)半軸做兩次,再處理一下小細(xì)節(jié)就好了
            2968 Difference Game The 5th Zhejiang Provincial Collegiate Programming Contest
            我先把A數(shù)組和B數(shù)組的數(shù)全部保存C數(shù)組里,然后排序
            再遍歷C數(shù)組,i = 0 to n*2
            i左邊的為B,右邊的為A,然后算出到達(dá)這個(gè)狀態(tài)A到B的個(gè)數(shù)AB和BA
            根據(jù)這兩個(gè)數(shù)算出最小的花費(fèi),X =  Min(AB,BA),Y = |AB - BA|,Ci = X * Y* (Y - 1);
            如果比c小的話舊更新一下res
            如果最后一次都沒更新到得話就是最后的答案一定是負(fù)的
            所以A和B排序下根據(jù)c貪心得到答案
            2969 Easy Task The 5th Zhejiang Provincial Collegiate Programming Contest
            easy task
            2970
            Faster, Higher, Stronger The 5th Zhejiang Provincial Collegiate Programming Contest
            sort
            2971 Give Me the Number The 5th Zhejiang Provincial Collegiate Programming Contest
            模擬下
            2972
            Hurdles of 110m The 5th Zhejiang Provincial Collegiate Programming Contest
            按剩下的能量DP
            2973
            Intelligent Pouring Robot The 5th Zhejiang Provincial Collegiate Programming Contest
            超煩的模擬題
            尚未做出
            2974 Just Pour the Water The 5th Zhejiang Provincial Collegiate Programming Contest
            暴力加循環(huán)節(jié)能過,正解是矩陣,
            K == 0的時(shí)候常常會被忽略,處理一下就好
            2975 Kinds of Fuwas The 5th Zhejiang Provincial Collegiate Programming Contest
            n^3的算法,枚舉任意兩行C(2,n),遍歷列n,找到相同的個(gè)數(shù)x,res+=(x-1)*x/2;
            2976 Light Bulbs The 5th Zhejiang Provincial Collegiate Programming Contest
            枚舉平面上每一個(gè)點(diǎn)取最大值


            3202 Second-price Auction The 6th Zhejiang Provincial Collegiate Programming Contest
            3203 Light Bulb The 6th Zhejiang Provincial Collegiate Programming Contest
            3204 Connect them The 6th Zhejiang Provincial Collegiate Programming Contest
            3205 Derivative The 6th Zhejiang Provincial Collegiate Programming Contest
            3206 Disaster Area Reconstruction The 6th Zhejiang Provincial Collegiate Programming Contest
            3207
            80ers' Memory The 6th Zhejiang Provincial Collegiate Programming Contest
            3208
            Reforestation The 6th Zhejiang Provincial Collegiate Programming Contest
            3209
            Treasure Map The 6th Zhejiang Provincial Collegiate Programming Contest
            3210 A Stack or A Queue? The 6th Zhejiang Provincial Collegiate Programming Contest
            3211 Dream City The 6th Zhejiang Provincial Collegiate Programming Contest
            3212 K-Nice The 6th Zhejiang Provincial Collegiate Programming Contest
            posted on 2009-05-02 21:10 shǎ崽 閱讀(3398) 評論(0)  編輯 收藏 引用
            国产精品成人99久久久久91gav| 亚洲国产成人乱码精品女人久久久不卡| 精品久久久久久久无码 | 久久九九久精品国产免费直播| 久久国产精品99国产精| 国产精品久久久天天影视| 久久激情五月丁香伊人| 久久夜色精品国产噜噜亚洲AV| 久久久久一级精品亚洲国产成人综合AV区| 久久国产色av免费看| 亚洲国产精品一区二区久久| 久久久久成人精品无码中文字幕 | 2021国产成人精品久久| 婷婷久久综合| 日韩va亚洲va欧美va久久| 久久er99热精品一区二区| 2020久久精品亚洲热综合一本| 久久综合久久鬼色| 国产成人久久精品区一区二区| 久久久亚洲欧洲日产国码aⅴ | 久久精品国产精品国产精品污 | 久久电影网一区| 亚洲国产精品久久电影欧美| 久久久久国产一级毛片高清板| 久久久久99精品成人片牛牛影视| 91精品国产91久久久久久| 免费观看久久精彩视频| 欧美黑人激情性久久| 久久人人爽人人爽人人片AV麻烦 | 久久国产精品久久| 人妻无码久久一区二区三区免费 | 久久青青草原国产精品免费 | 国产激情久久久久影院小草 | 久久久久成人精品无码中文字幕 | 狠狠人妻久久久久久综合蜜桃| 91性高湖久久久久| 久久久久久亚洲精品不卡| 色婷婷久久综合中文久久一本| 97视频久久久| 中文字幕热久久久久久久| 久久久久亚洲AV成人片|