摘要: 题目传送门 1 /* 2 用zstu3539题目来验证算法的正确性 3 */ 4 #include 5 #include 6 #include 7 #include 8 #include 9 using namespace std;10 11 const int maxn = 10... 阅读全文
posted @ 2015-04-04 15:02 Running_Time 阅读(226) 评论(0) 推荐(0)
摘要: 题目传送门 1 /* 2 插入排序——扑克牌排序 3 用zstu3539题目来验证算法的正确性 4 */ 5 #include 6 #include 7 #include 8 #include 9 #include 10 using namespace std;11 12 c... 阅读全文
posted @ 2015-04-04 14:22 Running_Time 阅读(220) 评论(0) 推荐(0)
摘要: 题目传送门 1 /* 2 BubbleSort_2(),_3()为优化版 3 用zstu3539题目来验证算法的正确性 4 */ 5 #include 6 #include 7 #include 8 #include 9 #include 10 using namespace... 阅读全文
posted @ 2015-04-04 13:54 Running_Time 阅读(203) 评论(0) 推荐(0)
摘要: 题目传送门 1 /* 2 暴力 超时 O(n^2) 3 */ 4 #include <stdio.h> 5 6 const int MAX_N = 500000; 7 int a[MAX_N+10]; 8 long long cnt = 0; 9 10 int main(void) //POJ 22 阅读全文
posted @ 2015-04-04 13:05 Running_Time 阅读(500) 评论(0) 推荐(0)