自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(4)
  • 收藏
  • 关注

原创 【PAT】1018. Public Bike Management

先dijkstra搜索出所有最短路径,然后dfs出send最少的和take back最少的路径#include #include #include #include #include using namespace std; const int maxn = 550; const int INF = 1000000000; int n,cmax,s,road; int G[maxn][max

2016-02-16 22:57:26 174

原创 pat 1017queueing in bank (优先队列)

思路: 将用户到达时间及服务时间统一处理为秒,并按照到达时间排序,创建一个容量为k(窗口数)的优先队列,并将全部元素初始化为8*3600(8:00),优先队列内保存当前客户服务结束时间。依次处理按序到达的客户。#include #include #include #include #include using namespace std; struct customer { int tim

2016-01-30 17:26:29 158

原创 PAT 1055. The World's Richest

直接使用结构体,然后排序,注意cmp函数的编写。 #include #include #include #include using namespace std; struct man{ char name[10]; int age; int worth; }; man a[100001]; bool cmp(man a,man b) { if(a.worth != b.wort

2016-01-23 21:46:28 159

原创 PAT 1044. Shopping in Mars

1044. Shopping in Mars (25) 时间限制 100 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue Shopping in Mars is quite a different exp

2016-01-23 20:43:13 166

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除