原创 一期作業第8題

題目: This problem is also a A + B problem,but it has a little difference,you should determine does (a+b) could be di

原创 LightOJ - 1005

題目: A rook is a piece used in the game of chess which is played on a board of square grids. A rook can only move ve

原创 HYSBZ - 5313

題目: 給定n, 求斐波那契數列F(n) = F(n - 1) + F(n - 2)的第n項模5的值 Input 第一行爲一個整數T, 表示有T (<= 1e6)個詢問。 接下來有T個整數ni(<= 2e9)。 Output T行,對

原创 hdu1686

題目:求模式串在待匹配串中的出現次數。 Input 第一行是一個數字T,表明測試數據組數。之後每組數據都有兩行: 第一行爲模式串,長度不大於10,000; 第二行爲待匹配串,長度不大於1,000,000。(所有字符串只由大寫字母組成)

原创 Gym - 101911J //歐幾里得

題目: Monocarp has decided to buy a new TV set and hang it on the wall in his flat. The wall has enough free space so M

原创 HYSBZ-s456

給你一個n個數的數列,其中某個數出現了超過n div 2次即衆數,請你找出那個數。 Input 第1行一個正整數n。 第2行n個正整數用空格隔開。 Output 一行一個正整數表示那個衆數。 Sample Input 5 3 2 3

原创 hdu1176(第二天題G)

題目: 都說天上不會掉餡餅,但有一天gameboy正走在回家的小徑上,忽然天上掉下大把大把的餡餅。說來gameboy的人品實在是太好了,這餡餅別處都不掉,就掉落在他身旁的10米範圍內。餡餅如果掉在了地上當然就不能吃了,所以gamebo

原创 hdu1069(第二天題E)

題目: A group of researchers are designing an experiment to test the IQ of a monkey. They will hang a banana at the roo

原创 poj1426(第一天題I)

題目: Given a positive integer n, write a program to find out a nonzero multiple m of n whose decimal representation co

原创 poj3279(第一天H題)

題目:Farmer John knows that an intellectually satisfied cow is a happy cow who will give more milk. He has arranged a b

原创 hdu2571第一天(G題)

題目: 穿過幽谷意味着離大魔王lemon已經無限接近了! 可誰能想到,yifenfei在斬殺了一些蝦兵蟹將後,卻再次面臨命運大迷宮的考驗,這是魔王lemon設下的又一個機關。要知道,不論何人,若在迷宮中被困1小時以上,則必死無疑! 可

原创 hdu1087(第一天題F)

題目:Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a g

原创 hdu1506(1505前置)

題目:http://acm.hdu.edu.cn/showproblem.php?pid=1506 題目要求求出最大的面積,那就從左向右檢索 例 2 1 2 2 思路:知道假如一直是 1 2 3 4這樣遞增的情況,那麼面積就是 41或

原创 hdu1505第一天E題

題目:Bob is a strategy game programming specialist. In his new city building game the gaming environment is as follows:

原创 hdu1059(倒數第二天第二題)

題目: Marsha and Bill own a collection of marbles. They want to split the collection among themselves so that both rece