摘要: 模拟下冒泡,每次交换都+1即可。#include int main() { int n, l, s[55]; scanf("%d", &n); while (n--) { scanf("%d", &l); for (int i=0; i<l; i++)... 阅读全文
posted @ 2013-01-05 18:27 zcube 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 原本以为精度问题,原来是最后需要一个换行。直接暴力是0.216,如果加个弱弱的排序优化一下是0.120。#include #include #include #include #define sqr(x) ((x)*(x))typedef struct _Point { double x, ... 阅读全文
posted @ 2013-01-05 17:35 zcube 阅读(138) 评论(0) 推荐(0) 编辑