- 博客(24)
- 收藏
- 关注
原创 HDU 1789 Doing Homework again 贪心
Doing Homework again Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
2016-04-29 16:26:42 336
原创 UVALA 3263 Audiophobia
点击打开题目链接#include #include #include #include using namespace std;const double eps = 1e-10;struct Point //定义点{ double x, y; Point(double x = 0, double y = 0) : x(x), y(y
2016-04-29 14:13:53 409
原创 UVA 11178 Audiophobia 几何基础
向量旋转,直线交点#include #include #include using namespace std;struct Point //定义点{ double x, y; Point(double x = 0, double y = 0) : x(x), y(y) {} //构造函数,方便代码编写};typedef Point Vec
2016-04-29 08:23:55 331
原创 UVA 11136 Hoax or what set
点击打开题目链接set:自动去重排序multiset:不去重,排序#include #include #include using namespace std;int main(){ //freopen("in.txt", "r", stdin); multiset muSet; multiset::iterator muSetIt; //迭代
2016-04-28 20:35:04 547
原创 UVA 11988 Broken Keyboard 链表
UVAOJ时不时掉链子点击打开题目链接用链表模拟一下就ok了#include #include #include #include #include using namespace std;int main(){ list srcList, ansList; list::iterator listIt; string str; wh
2016-04-28 19:35:30 380
原创 POJ 2376 Cleaning Shifts 区间覆盖
Cleaning ShiftsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 16264 Accepted: 4148DescriptionFarmer John is assigning some of his N (1 <= N <= 25,000)
2016-04-26 16:50:07 398
原创 UVaLA 4670 Dominating Patterns AC自动机
点击打开题目链接AC自动机,需要对 Trie 和 KMP 有一定的了解。#include #include #include #include #include using namespace std;const int TEXT_SIZE = 1000000 + 10;const int SIGMA_SIZE = 26;const int P_NUM = 1
2016-04-26 13:06:32 344
原创 UVaLA 3026 Period MP算法
点击打开题目链接MP算法求失配函数对于f [] 数组的定义如下: 1) f[j] = 0 j = 0,1 2) f[j] = max(k): 0 #include #include #include using namespace std;const int MAXN = 1000000 + 10;char P[
2016-04-25 17:56:43 350
原创 NBUT [1464] Biggest Number dfs
[1464] Biggest Number时间限制: 1000 ms 内存限制: 65535 K问题描述You have a maze with obstacles and non-zero digits in it:You can start from any square, walk in the maze, and finally
2016-04-25 16:39:59 550
原创 NBUT 1463 内部收益率 二分
[1463] 内部收益率时间限制: 1000 ms 内存限制: 65535 K问题描述在金融中,我们有时会用内部收益率IRR来评价项目的投资财务效益,它等于使得投资净现值NPV等于0的贴现率。换句话说,给定项目的期数T、初始现金流CF0和项目各期的现金流CF1, CF2, ...,CFT,IRR是下面方程的解:为了简单起见,本题假定:除了项目启动时有一笔投入(即初始现金
2016-04-25 11:07:53 511
原创 NYOJ 15 括号匹配(二) 区间dp
括号匹配(二)时间限制:1000 ms | 内存限制:65535 KB难度:6描述给你一个字符串,里面只包含"(",")","[","]"四种符号,请问你需要至少添加多少个括号才能使这些括号匹配起来。如:[]是匹配的([])[]是匹配的((]是不匹配的([)]是不匹配的输入第一行输入一个正整数N,表示测试数据组数(N每组测试数
2016-04-25 10:41:38 603
原创 NBUT 1462 台球碰撞 几何基础 思维
[1462] 台球碰撞时间限制: 1000 ms 内存限制: 65535 K问题描述在平面直角坐标系下,台球桌是一个左下角在(0,0),右上角在(L,W)的矩形。有一个球心在(x,y),半径为R的圆形母球放在台球桌上(整个球都在台球桌内)。受撞击后,球沿极角为a的射线(即:x正半轴逆时针旋转到此射线的角度为a)飞出,每次碰到球桌时均发生完全弹性碰撞(球的速率不变,反射角等于入射角)。
2016-04-25 09:06:27 718
原创 HDU 1212 Big Number 大数取模
Big Number Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
2016-04-24 12:57:10 392
原创 POJ 2352 Stars 线段树
StarsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 40218 Accepted: 17470DescriptionAstronomers often examine star maps where stars are represented by
2016-04-23 09:16:04 453
原创 POJ 2352 Stars 树状数组
StarsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 40175 Accepted: 17446DescriptionAstronomers often examine star maps where stars are represented by
2016-04-22 15:21:50 456
原创 POJ 2299 Ultra-QuickSort 线段树
Ultra-QuickSortTime Limit: 7000MS Memory Limit: 65536KTotal Submissions: 52842 Accepted: 19378DescriptionIn this problem, you have to analyze a particular sorting
2016-04-21 17:23:05 544
原创 POJ 2299 Ultra-QuickSort 树状数组
Ultra-QuickSortTime Limit: 7000MS Memory Limit: 65536KTotal Submissions: 52835 Accepted: 19374DescriptionIn this problem, you have to analyze a particular sorting
2016-04-21 13:53:20 561
原创 POJ 3368 Frequent values RMQ
Frequent valuesTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 15996 Accepted: 5822DescriptionYou are given a sequence of n integers a1 , a2 , ... , an
2016-04-20 21:04:31 417
原创 POJ 3264 Balanced Lineup RMQ
Balanced LineupTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 43406 Accepted: 20391Case Time Limit: 2000MSDescriptionFor the daily milking, Farme
2016-04-19 11:01:03 518
原创 HDU 1166 敌兵布阵 树状数组
敌兵布阵 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
2016-04-18 19:18:01 315
原创 UVALA 4329 - Ping pong 树状数组+组合原理
点击打开题目链接 UVALA 4329题意与分析:代码:#include #include #include using namespace std;const int MAXN = 20000 + 10;const int MAXM = 100000 +10;int num[MAXN];int c[MAXN], d[MAXN], x[MAX
2016-04-18 14:30:01 693
原创 HDU 1978 How many ways 记忆化dfs+dp
How many ways Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
2016-04-09 19:48:31 419
原创 POJ 1276 Cash Machine 多重背包
Cash MachineTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 31470 Accepted: 11307DescriptionA Bank plans to install a machine for cash withdrawal. The m
2016-04-08 21:08:31 420
原创 POJ 3259 Wormholes
WormholesTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 40421 Accepted: 14805DescriptionWhile exploring his many farms, Farmer John has discovered a nu
2016-04-06 21:42:31 376
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人