原创 HDU 4493 Tutor(四捨五入 模擬)
Tutor Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others) Total Submission(s): 3712
原创 HDU 4497 GCD and LCM (素數篩選+算術基本定理)
算術基本定理可表述爲:任何一個大於1的自然數 N,如果N不爲質數,那麼N可以唯一分解成有限個質數的乘積N=P1a1P2a2P3a3......Pnan,這裏P1<P2<P3......<Pn均爲質數,其中指數ai是正整數。這樣的
原创 Codeforces Round #358 (Div. 2)
682A - Alyona and Numbers #include <bits/stdc++.h> #define met(a,b) memset(a,b,sizeof(a)) #define inf (1<<28) #define
原创 Codeforces Round #346 (Div. 2)
A. Round House #include <cstdio> #include <cstdlib> #include <cstring> #include <string> #include <cmath> #include <cti
原创 HDU 4857 逃生 (反向拓撲排序+優先隊列)
逃生 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3592 Ac
原创 Codeforces Round #357 (Div. 2)
681A - A Good Contest 水 #include <bits/stc++.h> #define met(a,b) memset(a,b,sizeof(a)) #define inf (1<<28) #define m
原创 HDU 4509 湫湫系列故事——減肥記II(暴力 || 線段樹單點替換)
湫湫系列故事——減肥記II Time Limit: 5000/2000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others) Total Submission(s):
原创 HDU 4506 小明系列故事——師兄幫幫忙 (快速冪)
小明系列故事——師兄幫幫忙 Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others) Total Submission(s):
原创 JAVA之反射
訪問成員變量 import java.lang.reflect.Constructor; public class test{ public int i; protected boolean b; private double
原创 KM算法 (HDU 2255 1533 1853 3488 3435 2426 2853)
http://philoscience.iteye.com/blog/1754498 講解 講的很詳細很好 HDU 2255 #include <iostream> #include <cstring> #define maxnum
原创 HDU 5058(set) 5059 (字符串操作)
5058 #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <ctime> #include <iostream> #in
原创 2013騰訊編程馬拉松初賽第〇場(3月20日)(HDU 4500 4501 4502 4503 4504)
小Q系列故事——屌絲的逆襲 Time Limit : 300/100ms (Java/Other) Memory Limit : 65535/32768K (Java/Other) Total Submission(s) : 1
原创 HDU 5057 Argestes and Sequence (離線樹狀數組 || 分塊)
題目鏈接 題意還是很簡單的,Q是查詢,S是重新設置數, 一開始用線段樹三維數組做的,內存估計有100000*4*10*10,結果超內存了,意料之內,純粹是想複習一下線段樹 後來才學到降維,降低空間犧牲時間, 代碼一: 離線樹狀數組(離線:
原创 HDU 3829 二分最大獨立集
Cat VS Dog Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 125536/65536 K (Java/Others) Total Submission(s): 3
原创 bestcoder #16 ( HDU 5088 5087 5086)
hdu 5086 題目雖然和線段是有關,其實是個找規律的題目 以N來找規律 N = 1:出現a1的次數 N = 2:出現a1的次數 出現a2 #include <cstdio> #include <cstdlib> #include <