随笔分类 -  算法:排序

摘要:Fence RepairTime Limit:2000MSMemory Limit:65536KTotal Submissions:23913Accepted:7595DescriptionFarmer John wants to repair a small length of the fence... 阅读全文
posted @ 2014-04-26 16:45 Freecode# 阅读(416) 评论(0) 推荐(0) 编辑
摘要:sortTime Limit : 6000/1000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 3Accepted Submission(s) : 2Font:Times New Roman|Verdana|GeorgiaFont Size:←→Problem Description给你n个整数,请按从大到小的顺序输出其中前m大的数。Input每组测试数据有两行,第一行有两个数n,m(0 2 #include 3 using namespace std; 4 int a[100000. 阅读全文
posted @ 2014-02-20 16:09 Freecode# 阅读(2015) 评论(0) 推荐(0) 编辑
摘要:数列有序!Time Limit : 2000/1000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 2Accepted Submission(s) : 1Font:Times New Roman|Verdana|GeorgiaFont Size:←→Problem Description有n(n 2 using namespace std; 3 int main() 4 { 5 int n,m; 6 int a[111]; 7 while(cin>>n>>m){ 阅读全文
posted @ 2014-02-17 17:21 Freecode# 阅读(546) 评论(0) 推荐(0) 编辑
摘要:搬寝室Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 14107Accepted Submission(s): 4751Problem Description搬寝室是很累的,xhd深有体会.时间追述2006年7月9号,那天xhd迫于无奈要从27号楼搬到3号楼,因为10号要封楼了.看着寝室里的n件物品,xhd开始发呆,因为n是一个小于2000的整数,实在是太多了,于是xhd决定随便搬2*k件过去就行了.但还是会很累,因为2*k也不小是一个不大于n 阅读全文
posted @ 2014-01-22 20:37 Freecode# 阅读(1503) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示