原创 - 敵兵佈陣 HDU - 1166

C國的死對頭A國這段時間正在進行軍事演習,所以C國間諜頭子Derek和他手下Tidy又開始忙乎了。A國在海岸線沿直線佈置了N個工兵營地,Derek和Tidy的任務就是要監視這些工兵營地的活動情況。由於採取了某種先進的監測手段,所以每個工兵

原创 Smeech

Problem Description Professor Octastichs has invented a new programming language, Smeech. An expression in Smeech may b

原创 Car HDU - 5935

Ruins is driving a car to participating in a programming contest. As on a very tight schedule, he will drive the car wi

原创 Four Operations HDU - 5938

Little Ruins is a studious boy, recently he learned the four operations! Now he want to use four operations to generate

原创 Difference HDU - 5936

Little Ruins is playing a number game, first he chooses two positive integers yy and KK and calculates f(y,K)f(y,K),

原创 ArcSoft's Office Rearrangement HDU - 5933

ArcSoft, Inc. is a leading global professional computer photography and computer vision technology company. There are N

原创 ACM Contest and Blackout UVA - 10600

ACM CONTEST AND BLACKOUT In order to prepare the “The First National ACM School Contest”(in 20??) the major of the city

原创 Bomb HDU - 5934 強聯通圖,連通分量tarjan算法(模板)

There are NN bombs needing exploding. Each bomb has three attributes: exploding radius riri, position (xi,yi)(xi,yi) an

原创 約數個數

鏈接:https://www.nowcoder.com/acm/contest/82/A 來源:牛客網題目描述 t次詢問,每次給你一個數n,求在[1,n]內約數個數最多的數的約數個數 輸入描述:

原创 數學符號的值

double e=2.718281828459045; double pai= 3.141 5926 5358 9793 2384 6264 3383

原创 最佳路線,最短路徑

#include <iostream> #include<algorithm> #include<cstring> using namespace std; int T,N,M,K,A,S,u,v,w,h[1001],k[1001],p[

原创 二分圖—匈牙利算法(模板)

#include<cstdio> #include<cstring> #include<iostream> #include<queue> #include<vector> #include<cmath> #inc

原创 同餘模(模板)

     定理:    (a+b)mod n =  ((a mod n)+ (b mod n))mod n; (a-b) mod n = ((a mod n )- (b mod n)+n)mod n; ab mod n = (a mod

原创 歐幾里得求最大公約數(模板)

int gcd(int a,int b){ if(b==0) return a; else return gcd(b,a%b); }

原创 跳臺階

鏈接:https://www.nowcoder.com/acm/contest/90/A 來源:牛客網題目描述 小明在坐景馳科技研發的無人車到達了目的地。 景馳科技(JingChi.ai)是一家由人