原创 pta 1008 數組元素循環右移問題 (20分)
一個數組A中存有N(>0)個整數,在不允許使用另外數組的前提下,將每個整數循環向右移M(≥0)個位置,即將A中的數據由(A0A1⋯AN−1)變換爲(AN−M⋯AN−1A0A1⋯AN−M−1)
原创 2017江西icpc邀請賽 快速冪板子
#include<bits/stdc++.h> using namespace std; typedef long long ll; const int MD=1000000007; int p[5]= {0,1,5,11,36}; s
原创 多邊形面積(1654)
#include<cstdio> #include<cstring> #include<algorithm> #include<cmath> using namespace std; struct Point { int x,y
原创 poj1556(計算幾何+最短路)
#include<iostream> #include<cstdio> #include<math.h> #include<algorithm> #define inf 0x3f3f3f const int maxn = 1e3+10;
原创 poj 3304(計算幾何叉積)
http://poj.org/problem?id=3304 判斷所有線段段點是否能出現一個直線經過所有線段 #include<iostream> #include<math.h> #include<cstdio> const d
原创 poj1269
nt judgecross(){ if(min(p[0].x,p[1].x)>max(p[2].x,p[3].x)||min(p[0].y,p[1].y)>max(p[2].y,p[3].y)||max(p[0].x,p[1].x)<
原创 最近公共祖先·三 (LCA在線算法)
描述 上上回說到,小Hi和小Ho使用了Tarjan算法來優化了他們的“最近公共祖先”網站,但是很快這樣一個離線算法就出現了問題:如果只有一個人提出了詢問,那麼小Hi和小Ho很難決定到底是針對這個詢問就直接進行計算還是等待一定數量的詢問一起
原创 小葉的巡查(樹的最大邊)
鏈接:https://www.nowcoder.com/acm/contest/181/D 來源:牛客網 題目描述 8102年,牛客系列競賽空前繁榮。爲了更好地管理競賽,小葉決定巡查於各大城市之間,體察民情。所以,從一個城市馬不停蹄地
原创 HDU 題型
基礎題:1000、1001、1004、1005、1008、1012、1013、1014、1017、1019、1021、1028、1029、 1032、1037、1040、1048、1056、1058、1061、1070、1076、108
原创 Hdu 1075(stl map||字典樹)
What Are You Talking About Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 102400/204800 K (Java/Others) Tota
原创 HDU 1160 FatMouse's Speed(dp)
Total Submission(s): 20872 Accepted Submission(s): 9269Special Judge Problem Description FatMouse believes that
原创 HDU 5971(二分圖染色2016 大連)
owadays, at least one wrestling match is held every year in our country. There are a lot of people in the game is "good
原创 Hdu 1007 Quoit Design
Quoit Design Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s):
原创 Hdu 1026 Ignatius and the Princess I(bfs記錄路徑優先隊列)
Ignatius and the Princess I Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total S
原创 HDU 1016 Prime Ring Problem
A ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and th