原创 codeforces 455B. A Lot of Games

B. A Lot of Games time limit per test 1 second memory limit per test 256 megabytes input standard input

原创 hdu 1402 FFT

就是求兩個長度爲50000的數相乘。 第一次用了FFT來搞這種題目。 接下來還要訓練幾道這樣的題目。 代碼: #include <iostream> #include <algorithm> #include <cstdio> #incl

原创 hdu 4911 Inversion 樹狀數組求逆序數對

Inversion Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others) Total Submission(s):

原创 hdu 4609 3-idiots (FFT)

轉自http://www.cnblogs.com/kuangbin/archive/2013/07/24/3210565.html 學會了FFT。 這題就很容易了。 其實題目是給了n條線段。問隨機取三個,可以組成三角形的概率。

原创 hdu 4923 Room and Moor

Room and Moor Time Limit: 12000/6000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others) Total Submission

原创 hdu 4812 樹分治

這種題目很不擅長,接下來要多加訓練 #include <iostream> #include <algorithm> #include <cstdio> #include <string> #include <cstring> #inc

原创 hdu 5060 求球與圓柱相交體積

War Time Limit: 8000/5000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 124    A

原创 leetcode Sudoku Solver

Write a program to solve a Sudoku puzzle by filling the empty cells. Empty cells are indicated by the character '

原创 codeforces 474F 區間gcd + 離散化

F. Ant colony time limit per test 1 second memory limit per test 256 megabytes input standard input output stan

原创 hdu 4791 RMQ

我是來存RMQ板的 #include <iostream> #include <algorithm> #include <cstdio> #include <string> #include <cstring> #i

原创 acdream contest 1131 Burning Bridges

#include<bits/stdc++.h> //#pragma comment(linker, "/STACK:102400000,102400000") typedef long long ll; //typedef pair<in

原创 codeforces 271E 離散化+線段樹,dp優化

E. Pillars time limit per test 1 second memory limit per test 256 megabytes input standard input output stand

原创 leetcode Wildcard Matching

Wildcard Matching  Total Accepted: 14208 Total Submissions: 100593My Submissions Implement wildcard pattern mat

原创 hihocoder 1041

時間限制:1000ms 單點時限:1000ms 內存限制:256MB 描述 小Hi和小Ho準備國慶期間去A國旅遊。A國的城際交通比較有特色:它共有n座城市(編號1-n);城市之間恰好有n-1條公路相連,形成一個樹形公路網。

原创 DLX模板

DLX 精確覆蓋 hust 1017 題意:給你一個01矩陣,找出選擇哪些行能使每列有且僅有一個1 #include <cmath> #include <cstdio> #include <cstdlib> #include <cstr