原创 HDU 3191 次短路 How Many Paths Are There

http://acm.hdu.edu.cn/showproblem.php?pid=3191#include<iostream> #include<algorithm> #define N 55 #define M 10000 #defi

原创 HDU 3231 Box Relations

http://acm.hdu.edu.cn/showproblem.php?pid=3231 #include<iostream> using namespace std; #define N 2001 #define M 500000

原创 AC自動機加矩陣

#include<iostream> #include<queue> #include<map> #include<cmath> using namespace std; #define N 35 #define M 26 #define

原创 HDU 2586 How far away ?

http://acm.hdu.edu.cn/showproblem.php?pid=2586 #include<iostream> using namespace std; #define N 40001 #define M 201 st

原创 HDU 2482 Transit search

http://acm.hdu.edu.cn/showproblem.php?pid=2482#include<iostream> #include<cmath> #include<vector> #include<string> #inc

原创 HDU 2653 Waiting ten thousand years for Love

http://acm.hdu.edu.cn/showproblem.php?pid=2653#include<iostream> #include<queue> using namespace std; #define N 81 bool

原创 HDU 1435 Stable Match

http://acm.hdu.edu.cn/showproblem.php?pid=1435#include<iostream> #include<queue> #include<cstring> #include<cstdio> #in

原创 HDU 3450 Counting Sequences

http://acm.hdu.edu.cn/showproblem.php?pid=3450#include<iostream> #include<algorithm> using namespace std; #define mod 9

原创

#include<iostream> using namespace std; #define N 1000001 struct node{ double x,y; }p[N]; int n; void cal_c(){ node u

原创 HDU 2722 Here We Go(relians) Again

http://acm.hdu.edu.cn/showproblem.php?pid=2722#include<iostream> #include<queue> using namespace std; #define N 450 #de

原创 HDU 2492 Ping pong

http://acm.hdu.edu.cn/showproblem.php?pid=2492 #include<iostream> using namespace std; #define N 100001 #define M 20001

原创 RMQ

#include<iostream> #include<cstdio> #include<cstring> using namespace std; #define MAX(x,y) (x>y?x:y) #define N 200010

原创 歐拉函數(轉)

相關題目: http://acm.hdu.edu.cn/showproblem.php?pid=2824 pku 2478(與前n個數互質的個數的求和) http://acm.hdu.edu.cn/showproblem.php?pi

原创 HDU 2768 Cat vs. Dog

http://acm.hdu.edu.cn/showproblem.php?pid=2768#include<iostream> using namespace std; #define N 505 #define M 10001 str

原创 HDU 1962 Card Game Cheater

http://acm.hdu.edu.cn/showproblem.php?pid=1962#include<iostream> #include<map> using namespace std; #define N 60 #defin