上一页 1 ··· 13 14 15 16 17
摘要: 2017/3/13 类型: 简单题练习 A.POJ 1003 Hangover 题解: 先将板所能到达的距离打个表 s[] ,每次传入距离c后寻找第一个比 c 大的 s[i] , i 即为所求答案。 include "iostream" include "cstdio" include "algor 阅读全文
posted @ 2017-03-12 20:15 ojnQ 阅读(228) 评论(0) 推荐(0) 编辑
摘要: 原题链接: 35~39 "http://qscoj.cn/problems/" A.喵哈哈村的代码传说 第一章 冒泡排序 分析: 排个序输出 include "iostream" include "cstdio" include "algorithm" include "cmath" using n 阅读全文
posted @ 2017-03-12 17:39 ojnQ 阅读(257) 评论(0) 推荐(0) 编辑
摘要: POJ 1852 Ants 题意: 有n个蚂蚁以1cm/s的速度在一个长Lcm的杆子上爬行,当蚂蚁爬行到杆子的终点就会掉落,由于杆子太细,两只蚂蚁相遇时,他们不能交错通过,只能各自反向爬回去,对于每个蚂蚁我们知道它距离杆子最左端的距离Xi,但不知道他当前的朝向,计算所有蚂蚁落下杆子的最短时间和最长时 阅读全文
posted @ 2017-03-11 19:42 ojnQ 阅读(250) 评论(0) 推荐(0) 编辑
摘要: 2017/3/7 类型:二分查找 二分搜索 A POJ1064 题意: 给出n条线段,以米的单位给出,小数点后两位(精确到厘米),要你对这些线段裁剪,裁剪出m条等长的线段,并且让这些线段尽可能长另外线段的长度不能小于1厘米,如果筹不够m条,输出0.00。 思路: 二分搜索0~1e9之间的值,每次找到 阅读全文
posted @ 2017-03-08 23:13 ojnQ 阅读(204) 评论(0) 推荐(0) 编辑
摘要: 菜的抠脚 A 题解:判断能否构成一个三角形。 include "iostream" include "algorithm" include "cmath" using namespace std; int main(){ int T,a[3]; cin T; while(T ){ for(int i 阅读全文
posted @ 2017-03-03 17:00 ojnQ 阅读(176) 评论(0) 推荐(0) 编辑
上一页 1 ··· 13 14 15 16 17