原创 a100

The 3n + 1 problem Background Problems in Computer Science are often classified as belonging to a certain class o

原创 UVA 167

  The Sultan's Successors The Sultan of Nubia has no children, so she has decided that the country will be split into

原创 ACM POJ

POJ上的一些水題(可用來練手和增加自信) (poj3299,poj2159,poj2739,poj1083,poj2262,poj1503,poj3006,poj2255,poj3094) 初期:一.基本算法: (1)枚舉. (poj

原创 JAVA<總彙>

POJ上的一些水題(可用來練手和增加自信) (poj3299,poj2159,poj2739,poj1083,poj2262,poj1503,poj3006,poj2255,poj3094) 初期:一.基本算法: (1)枚舉. (poj

原创 考試排名 杭電2093

Problem Description 今天的上機考試雖然有實時的Ranklist,但上面的排名只是根據完成的題數排序,沒有考慮 每題的分值,所以並不是最後的排名。給定錄取分數線,請你寫程序找出最後通過分數線的 考生,並將他們的成績按

原创 五大常用算法之一:分治算法

分治算法 一、基本概念    在計算機科學中,分治法是一種很重要的算法。字面上的解釋是“分而治之”,就是把一個複雜的問題分成兩個或更多的相同或相似的子問題,再把子問題分成更小的子問題……直到最後子問題可以簡單的直接求解,原問題的解即子問題

原创 UVA 673

Parentheses Balance You are given a string consisting of parentheses () and [].    A string of this type is said to

原创 UVA 133

The Dole Queue In a serious attempt to downsize (reduce) the dole queue, The New National Green Labour Rhinoceros Pa