原创 poj 3641 快速冪

Xinlv wrote some sequences on the paper a long time ago, they might be arithmetic or geometric sequences. The numbe

原创 hdu 1754 I Hate It (單點修改+區間最值+裸題)

Time Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 77423

原创 zoj 2110 奇偶性剪枝

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

原创 hdu 1394 逆序對(nlgn+o(n) )

Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 20404

原创 hdu 1372 BFS

A friend of you is doing research on the Traveling Knight Problem (TKP) where you are to find the shortest closed t

原创 hdu 2824 歐拉函數 O(nlogn) 和O(n)

裸題 O(nlogn): #include <cstdio> #include <iostream> #include <algorithm> using namespace std; typedef long long ll;

原创 xcode 如何使用#include

進入Xcode的目錄 usr-》include-》c++—》v1 創建一個名爲bits的文件夾 在裏面添加一個stdc++.h std++.h的內容爲: // C++ includes used for precompil

原创 poj 2524 並查集裸

There are so many different religions in the world today that it is difficult to keep track of them all. You are in

原创 zoj 2100 DFS

It is spring time and farmers have to plant seeds in the field. Tom has a nice field, which is a rectangle with n *

原创 hdu 2817

Problem Description Xinlv wrote some sequences on the paper a long time ago, they might be arithmetic or geometric

原创 hdu 2136

Problem Description Everybody knows any number can be combined by the prime number. Now, your task is telling me

原创 hdu 4506 快速冪

小明自從告別了ACM/ICPC之後,就開始潛心研究數學問題了,一則可以爲接下來的考研做準備,再者可以藉此機會幫助一些同學,尤其是漂亮的師妹。這不,班裏唯一的女生又拿一道數學題來請教小明,小明當然很高興的就接受了。不過等他仔細讀題以

原创 hdu 1247 字典樹

A hat’s word is a word in the dictionary that is the concatenation of exactly two other words in the dictionary.

原创 zoj 3158 DFS

Li Lei and Han Meimei love each other so much that they can not be separated for even one minute. They have promise

原创 zoj 1649 bfs

Angel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is described as a N * M (N, M <= 200)