原创 1105. Word Index

Encoding schemes are often used in situations requiring encryption or information storage/transmission economy. Here, w

原创 拓撲排序 2892. Task

Peter is very interested in Artificial Intelligence. His teacher leaves him several problems. Since he is not very fam

原创 4003. I-number

The I-number of x is defined to be an integer y, which satisfied the the conditions below: 1. y>x; 2. the sum of each

原创 3823. Divisible Subsquences

題目大意:給定一個數和一個序列  計算這個序列中有多少個子序列的和是這個數的倍數。 思路:a[i]+a[i+1]+..+a[j] = s[j]-s[i],如果要和是其倍數, 則表示s[j]-s[i]能夠整除那個數,只要s[j]和s[i]對

原创 4043. Magic Pen 6

In HIT, many people have a magic pen. Lilu0355 has a magic pen, darkgt has a magic pen, discover has a magic pen. Rece

原创 1525. One Person "The Price is Right"

題目大意:每個人允許猜 G 次,有 L 生命線。猜低或猜高了,耗費一次猜得機會,猜高了,還              會浪費一生命線。    先從搜索考慮。設f(g,l)表示有g次機會,l條生命線時可以猜到的最大價格範圍。  

原创 2908. Annoying painting tool

水題 題目大意是輸入n和m,代表有n行m列像素點,初始所有的像素均爲白色,即爲0,然後給定一個r*c的舉證,在這個範圍內發像素均改變它的顏色,黑變白,白變黑,問有至少多少次操作使最終變成給定的像素矩陣。 所以用反向思維,求最終用多少次操作