排序
文章平均质量分 68
Daemoonn
编程呵呵哒~~
展开
-
poj2996 Help Me with the Game 结构体多级排序 桶排序
Help Me with the GameTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 4098 Accepted: 2586DescriptionYour task is to read a picture of a chessboard posi原创 2016-03-22 21:23:08 · 500 阅读 · 0 评论 -
hdu1160 FatMouse's Speed 最长上升子序列 LIS
FatMouse's SpeedTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 13391 Accepted Submission(s): 5893Special JudgeProblem Descriptio原创 2016-04-05 21:41:50 · 449 阅读 · 0 评论 -
团体程序设计天梯赛-练习集 L2-3. 月饼 贪心
L2-3. 月饼时间限制100 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者陈越月饼是中国人在中秋佳节时吃的一种传统食品,不同地区有许多不同风味的月饼。现给定所有种类月饼的库存量、总售价、以及市场的最大需求量,请你计原创 2016-05-10 14:36:41 · 1630 阅读 · 0 评论 -
UVa 10305 Ordering Tasks 拓扑排序
#include #include #include #include using namespace std;const int maxn = 100;int n, m, vis[maxn + 10], pr[maxn + 10], cnt;vector G[maxn + 5];bool dfs(int u) { vis[u] = -1; for (vector::it原创 2016-05-17 14:39:15 · 390 阅读 · 0 评论 -
PAT (Advanced Level) Practise 1109. Group Photo (25) 结构体排序
1109. Group Photo (25)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueFormation is very important when taking a grou原创 2016-04-23 16:05:20 · 831 阅读 · 0 评论 -
UVa11997 K Smallest Sums 归并 + 优先队列
朴素算法O(n ^ n)啊,这都能做,想了想,最后只要输出其中和的前k小的就行了,有很多计算是冗余的啊,想了想,每行排个序,然后只算前两列,还有2 ^ k个,取k个绰绰有余了,O(2 ^ n),还能骗点分……扇自己一巴掌,卧槽你以为做PAT呢,还能骗分,然而还是忍不住交了一发……WA代码:#include #include #include #include #in原创 2016-10-03 18:57:37 · 459 阅读 · 0 评论