原创 POJ 1584 A Round Peg in a Ground Hole(凸包判定,多邊形計算與判定)

Description The DIY Furniture company specializes in assemble-it-yourself furniture kits. Typically, the pieces of woo

原创 POJ 1408 Fishnet(計算幾何,多邊形相關算法)

Description A fisherman named Etadokah awoke in a very small island. He could see calm, beautiful and blue sea around

原创 關於C/C++ stdin緩衝區以及對字符輸入的一些經驗和心得

關於C/C++ stdin緩衝區以及對字符輸入的一些經驗和心得   在使用C/C++編寫控制檯應用或acm競賽的時候,I/O方式無非是標準輸入輸出,特別是acm競賽,就本人來說,由C語言入門,輸入方式還只會scanf,自從學了C+

原创 HDU 5745 La Vie en rose(DP,枚舉)

Problem Description Professor Zhang would like to solve the multiple pattern matching problem, but he only has only o

原创 POJ 3122 Pie(二分)

Description My birthday is coming up and traditionally I'm serving pie. Not just one pie, no, I have a number N of the

原创 數據結構與算法專題之線性表——隊列及其應用

  本章內容是數據結構與算法第三彈——隊列及其應用。與前一章棧的講解一樣,本章對於隊列的講解也會首先介紹棧的基本概念及結構和代碼實現,然後再引入幾個經典的隊列問題幫助大家理解隊列的應用。   隊列與棧一樣,也是一個簡單但相當重要的數據結構

原创 POJ 3020 Antenna Placement(二分圖最小路徑覆蓋)

Description The Global Aerial Research Centre has been allotted the task of building the fifth generation of mobile ph

原创 POJ 2187 Beauty Contest(凸包)

Description Bessie, Farmer John's prize cow, has just won first place in a bovine beauty contest, earning the title 'M

原创 POJ 3258 River Hopscotch(二分法)

Description Every year the cows hold an event featuring a peculiar version of hopscotch that involves carefully jumpin

原创 POJ 2115 C Looooops(擴展歐幾里得)

Description A Compiler Mystery: We are given a C-language style for loop of type for (variable = A; variable != B; var

原创 HDU 5733 tetrahedron(空間計算幾何)

Problem Description Given four points ABCD, if ABCD is a tetrahedron, calculate the inscribed sphere of ABCD.   Inp

原创 POJ 3436 ACM Computer Factory(最大流)

Description As you know, all the computers used for ACM contests must be identical, so the participants compete on equ

原创 矩陣快速冪模板

#define MOD 1000000007 struct Matrix { int row,col; long long m[10][10]; Matrix(){} Matrix(long long s,int x,int y)

原创 POJ 1905 Expanding Rods(二分法,簡單幾何知識)

Description When a thin rod of length L is heated n degrees, it expands to a new length L'=(1+n*C)*L, where C is the c