Red Huang

Red Huang

bruteforce

Codeforces Round #110 (Div. 1) A. Message
其實就只是暴力查找而已... Copy // // GGGGGGGGGGGGG CCCCCCCCCCCCC AAA // GGG::::::::::::G CCC::::::::::::C…
AOJ 1316 The Sorcerer's Donut
全部列舉出來 然後暴力的放進去 hash 搞定 Copy /\* \* GCA : "Computer is artificial subject absolutely,Math is God" \*/ #include <iostream> #include…
uva 10317
暴力剪枝就對了 一開始 dfs 弄錯了吃了 WA,剪枝沒剪好 TLE 最後終於 AC 了 Copy /\* \* GCA : "Computer is artificial subject absolutely,Math is God" \*/ #include…
TopCoder SRM 196 DIV2 ClapLight
本來想說是用二分法,不過沒有二分的那種關係,而且測資滿小的直接掃過去就好了 Copy /\* \* GCA : "Computer is artificial subject absolutely,Math is God" \*/ #include…
Codeforces Round #200(Div .2) B.Simple Molecules
一樣滿水的,枚舉最大的點從 0 數到他的 valence number,兩個點在減掉之後看有沒有相等即可 Copy // // GGGGGGGGGGGGG CCCCCCCCCCCCC AAA // GGG:::…
uva 10309
經典題,只要枚舉第一排即可 因為目標都是為了讓所有的電燈關起來,所以我只要把上一排的燈按掉 不按掉的話 這一排就沒有任何燈泡能夠把它按掉,所以一定要按掉 按完之後 能夠剛剛好在最後一排燈泡都暗的 就是答案 Copy // // GGGGGGGGGGGGG…
uva 10730
一開始往 LIS 那方面想,發現完全想歪了 記錄每個數字的位置,枚舉公差,在判斷位置就好了 Copy // // GGGGGGGGGGGGG CCCCCCCCCCCCC AAA // GGG::::::::::…
Ownership of this blog data is guaranteed by blockchain and smart contracts to the creator alone.