- 博客(274)
- 收藏
- 关注
转载 hrbust mengxiang000000 题册
原博客---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------1000、【新手】A
2017-05-09 20:58:57 1180
转载 STL源码学习----lower_bound和upper_bound算法
STL中的每个算法都非常精妙,接下来的几天我想集中学习一下STL中的算法。 ForwardIter lower_bound(ForwardIter first, ForwardIter last,const _Tp& val)算法返回一个非递减序列[first, last)中的第一个大于等于值val的位置。 ForwardIter upper_bound(ForwardIter
2017-04-06 12:42:25 393
转载 大数乘法除法
void Big_Mul() { int lena=strlen(a),lenb=strlen(b); int lenans=lena+lenb-1; for(int i=0;i<=(lena-1)/2;i++) swap(a[i],a[lena-1-i]); //数组逆置 for(int i=0;i<=(lenb-1)/2;i++) swap(b[i],
2017-01-17 20:16:36 371
原创 hrbust 2340 一品五彩
一品五彩棒Time Limit: 2000 MSMemory Limit: 256000 KTotal Submit: 22(5 users)Total Accepted: 2(2 users)Rating: Special Judge: NoDescription公元2017年
2017-11-21 16:52:07 640 1
原创 hrbust 2343 巴啦啦能量
巴啦啦能量Time Limit: 2500 MSMemory Limit: 256000 KTotal Submit: 32(3 users)Total Accepted: 7(3 users)Rating: Special Judge: NoDescription话说上回涂山小
2017-11-21 16:50:01 742
原创 hrbust 2347 递归画图
递归画图Time Limit: 1000 MSMemory Limit: 256000 KTotal Submit: 11(5 users)Total Accepted: 5(5 users)Rating: Special Judge: NoDescription递归图形是一类非
2017-11-21 16:44:31 635
原创 hdu 1004 Max Sum 基础dp
题目链接最大子序列和。输出起始位置。#include#include#includeusing namespace std;#define N 100005#define inf 0x3f3f3f3fint a[N];int dp[N];int pre[N];int main(){ int T,iCase=0; sca
2017-10-29 19:35:17 309
原创 UVA 11400 Lighting System Design
#include#include#includeusing namespace std;#define N 100005#define inf 0x3f3f3f3fint dp[N];struct data{ int v,k,c,l;///电压 电源费用 灯泡费用 数量 friend bool operator <(data a,data b) {
2017-10-25 12:41:44 249
原创 UVA 12563 Jin Ge Jin Qu hao
题目分析:最多的唱歌次数数据水,只是卡空间范围但是没有卡时间范围。利用完全背包的思想每次截取一个。for(int i=1; i<=n; i++) { for(int j=t-1; j>=a[i]; j--) { dp[j]=max(dp[j],dp[j-a
2017-10-23 23:50:24 204
原创 UVA 1025A Spy in the Metro 动态规划 _ SPFA
传送门DescriptionSecret agent Maria was sent to Algorithms City to carry out an especially dangerous mission. After several thrilling events we find her in the first station of Algorithms City
2017-10-23 17:54:37 266
原创 DAG 动态规划 -- 硬币问题
#include#includeusing namespace std;#define N 1005int dp[N];int a[N];int main(){ memset(dp,0,sizeof(dp));///dp[i] 存储从0 到i所需要的最小(inf)/最大硬币数(0) int n,Aims;/// n : 硬币的种类数 Aims 目标值 scan
2017-10-22 10:47:47 327
原创 NYoj 16 矩形嵌套 (DAG上最长路 - 动态规划)
矩形嵌套时间限制:3000 ms | 内存限制:65535 KB难度:4描述有n个矩形,每个矩形可以用a,b来描述,表示长和宽。矩形X(a,b)可以嵌套在矩形Y(c,d)中当且仅当a<c,b<d或者b<c,a<d(相当于旋转X90度)。例如(1,5)可以嵌套在(6,2)内,但不能嵌套在(3,4)中。你的任务是选出尽可能多的矩形排成一行,使得除最后一个外,每一个矩
2017-10-22 10:30:00 238
原创 UVA 437 The Tower of Babylon
题目链接dp[u] 从u方块开始的最高的高度dfs 版本dp【】#include#include#includeusing namespace std;#define N 1005struct Rec{ int x,y,h;} a[3*N];int pre[N];int n;int Rel[3*N][3*N];int dp[N];boo
2017-10-21 15:31:20 227
原创 UVA 116 Unidirectional TSP
记录路径。。字典序最大。。#include#include#includeusing namespace std;#define N 1005#define inf 0x3f3f3f3fint Next[N][N];int maps[N][N];int dp[N][N];int main(){ int n,m; while(~scanf(
2017-10-21 13:05:52 185
原创 UVA 1347 Tour (双调欧几里得旅行商问题)
dfs 版dp#include#include#include#includeusing namespace std;#define N 1005double x[N];double y[N];double d[N][N];int n;double dis(int i,int j){ return hypot(x[i]-x[j],y[i]-y[j]);}///
2017-10-20 23:52:55 281
原创 hdu 2066 一个人的旅行 Dijkstra+优先队列优化
一个人的旅行Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 41287 Accepted Submission(s): 14035Problem Description虽然草儿是个路痴(就是在杭电待了一
2017-10-12 21:13:14 330
原创 hdu 1874 畅通工程续 (Dijkstra + 优先队列优化)
hhh,写板子专用题。。畅通工程续Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 58019 Accepted Submission(s): 21811Problem Description
2017-10-12 17:37:33 239
原创 优先队列 使用 (补一发)
优先队列的原理就是堆。默认的优先队列是最小二叉堆。#include#include#include#include#includeusing namespace std;struct data{ int x,y; data(int x,int y){ this->x=x; this->y=y; } friend
2017-10-12 00:32:32 255
原创 hdu 5952 Counting Cliques
Counting CliquesTime Limit: 8000/4000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2630 Accepted Submission(s): 966Problem DescriptionA clique i
2017-10-07 17:39:21 243
原创 hdu 3605 Escape (二分图匹配)
EscapeTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 11348 Accepted Submission(s): 2733Problem Description2012 If this is th
2017-10-03 12:02:25 245
原创 玩一玩 题解
1.#includeint main(){ int a,b,c; while(~scanf("%d%d%d",&a,&b,&c)) { printf("%d\n",a+b-c); }}2.#include#include#includeusing namespace std;int main(){ char st
2017-10-03 11:34:35 355
原创 hdu 5889 Barricade (最短路的最小割)
BarricadeTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1967 Accepted Submission(s): 570Problem DescriptionThe empire is und
2017-10-02 15:08:25 345
原创 hrbust 软微学院 2016 ACM选拔重现 标程
A.#includeint main(){ printf(" A CCCCCCCCCCCCC M M\n"); printf(" A A C M M M M\n"); printf(" A A
2017-09-30 01:22:09 389
原创 hrbust 软件与微电子学院 ACM 2017 级新人热身程序竞赛
A。#includeint main(){ int a,b; while(scanf("%d%d",&a,&b)==2) { printf("%d\n",a+b); }}B.你们过吧。。这个我出这玩的。。#include #include #include #include using namespace std;
2017-09-24 21:39:22 884
原创 hdu 1532 Drainage Ditches (最大流 : EK && Dinic &&Dinic 当前弧优化)
Drainage DitchesTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 19338 Accepted Submission(s): 9234Problem DescriptionEvery ti
2017-09-22 21:11:15 229
原创 hdu 3549 Flow Problem (EK 最大流)
Flow ProblemTime Limit: 5000/5000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 17417 Accepted Submission(s): 8204Problem DescriptionNetwork flow
2017-09-22 16:12:42 170
原创 hrbust 1944 皮卡丘
皮卡丘Time Limit: 1000 MSMemory Limit: 32768 KTotal Submit: 109(63 users)Total Accepted: 64(59 users)Rating: Special Judge: NoDescription一根长度为L
2017-09-19 21:21:58 437
原创 hrbust 1609 Windows安全警报
Windows安全警报Time Limit: 1000 MSMemory Limit: 65535 KTotal Submit: 196(95 users)Total Accepted: 116(92 users)Rating: Special Judge: NoDescription
2017-09-19 20:03:30 400
原创 hrbust 2140 罗马数字
罗马数字Time Limit: 1000 MSMemory Limit: 32768 KTotal Submit: 154(94 users)Total Accepted: 87(85 users)Rating: Special Judge: NoDescription给定一个正
2017-09-19 19:50:22 599
原创 hrbust 1283 又见皇后
又见皇后Time Limit: 3000 MSMemory Limit: 65536 KTotal Submit: 122(33 users)Total Accepted: 45(25 users)Rating: Special Judge: NoDescription国际象棋中
2017-09-15 18:09:51 299
原创 hrbust 1631 技能修炼 (裸拓扑)
技能修炼Time Limit: 1000 MSMemory Limit: 32768 KTotal Submit: 129(61 users)Total Accepted: 66(51 users)Rating: Special Judge: NoDescription寒假第三次
2017-09-15 15:18:16 241
原创 hdu 6201 transaction transaction transaction
transaction transaction transactionTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 132768/132768 K (Java/Others)Total Submission(s): 1244 Accepted Submission(s): 595Problem Desc
2017-09-12 23:31:28 391 1
原创 hdu 1874 畅通工程续(spfa)
畅通工程续Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 57541 Accepted Submission(s): 21612Problem Description某省自从实行了很多年的畅通工程计划后
2017-09-12 19:49:08 236
原创 hdu 2680 Choose the best route (最短路问题 dijkstra | spfa)
Choose the best routeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 15464 Accepted Submission(s): 5010Problem DescriptionOne
2017-09-11 23:41:40 254
原创 hdu 1513 Palindrome (滚动数组处理回文串)
PalindromeTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6433 Accepted Submission(s): 2127Problem DescriptionA palindrome is
2017-09-10 10:02:05 247
原创 hdu 2577 How to Type 经典 二维 dp
How to TypeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7246 Accepted Submission(s): 3286Problem DescriptionPirates have f
2017-09-10 09:29:45 224
原创 hdu FATE 费用dp
FATETime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 15502 Accepted Submission(s): 7315Problem Description最近xhd正在玩一款叫做FATE的游戏,
2017-09-10 08:26:34 278
原创 poj 3311 状压dp+float
Hie with the PieTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 8134 Accepted: 4426DescriptionThe Pizazz Pizzeria prides itself in delivering pizzas to
2017-09-09 19:47:49 226
原创 poj 1185 炮兵布阵 状压dp
炮兵阵地Time Limit: 2000MS Memory Limit: 65536KTotal Submissions: 29250 Accepted: 11331Description司令部的将军们打算在N*M的网格地图上部署他们的炮兵部队。一个N*M的地图由N行M列组成,地图的每一格可能是山地(用"H" 表示),也可
2017-09-08 18:28:06 228
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人