原创 To the Max POJ - 1050

Given a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1*

原创 Tempter of the Bone HDU - 1010 dfs+剪枝

The doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began t

原创 Sum of Consecutive Prime Numbers POJ - 2739 素數打表—埃氏篩法

Some positive integers can be represented by a sum of one or more consecutive prime numbers. How many such representat

原创 poj 1088 dfs+記憶化搜索

Michael喜歡滑雪百這並不奇怪, 因爲滑雪的確很刺激。可是爲了獲得速度,滑的區域必須向下傾斜,而且當你滑到坡底,你不得不再次走上坡或者等待升降機來載你。Michael想知道載一個區域中最長底滑坡。區域由一個二維數組給出。數組的每個數

原创 GCD HDU - 1695 莫比烏斯模板

Given 5 integers: a, b, c, d, k, you're to find x in a...b, y in c...d that GCD(x, y) = k. GCD(x, y) means the greatest

原创 hdu Character Encoding 容斥

In computer science, a character is a letter, a digit, a punctuation mark or some other similar symbol. Since computers

原创 Evacuation POJ - 3057 二分圖匹配+bfs

Fires can be disastrous, especially when a fire breaks out in a room that is completely filled with people. Rooms usua

原创 hdu 6396 Swordsman 讀入優化+思維

roblem Description Lawson is a magic swordsman with k kinds of magic attributes v1,v2,v3,…,vk. Now Lawson is faced with

原创 hdu 6395 Sequence 分塊+矩陣快速冪

  Problem Description Let us define a sequence as below   ⎧⎩⎨⎪⎪⎪⎪⎪⎪F1F2Fn===ABC⋅Fn−2+D⋅Fn−1+⌊Pn⌋   Your job is simple,

原创 bzoj 2818 Gcd 線性篩歐拉+想法

Description 給定整數N,求1<=x,y<=N且Gcd(x,y)爲素數的 數對(x,y)有多少對.   Input 一個整數N Output 如題 Sample Input 4   Sample Output 4 HINT  

原创 牛客網暑期ACM多校訓練營(第四場) G

鏈接:https://www.nowcoder.com/acm/contest/142/G 來源:牛客網   題目描述 The mode of an integer sequence is the value that appears m

原创 Anton and School - 2 CodeForces - 785D 組合數學 範德蒙恆等式

As you probably know, Anton goes to school. One of the school subjects that Anton studies is Bracketology. On the Brack

原创 Problem A. Ascending Rating hdu 6319 單調棧

Problem Description Before the start of contest, there are n ICPC contestants waiting in a long queue. They are labeled

原创 hdu 5094 Maze 狀壓 bfs

Problem Description This story happened on the background of Star Trek. Spock, the deputy captain of Starship Enterpris

原创 狀壓 bfs

http://119.23.43.230/problem.php?id=1234 題目描述 小z喜歡上了一個迷宮遊戲,這個遊戲是這樣的,有一個N*M的迷宮(即N行M列的迷宮)保證0<N<=500,0<M<=500 左上角座標(1,1)爲入