摘要: 这道题提醒了我一个问题,怎么在while(cin>>a[i])下中断 1 #include 2 #include 3 #include 4 using namespace std; 5 6 int main() 7 { 8 double a[10000]; 9 ... 阅读全文
posted @ 2015-11-13 23:39 qlky 阅读(171) 评论(0) 推荐(0) 编辑
摘要: http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=49水题 1 #include 2 #include 3 #include 4 using namespace std; 5 6 bool judge(double x,doubl... 阅读全文
posted @ 2015-11-13 23:24 qlky 阅读(323) 评论(0) 推荐(0) 编辑
摘要: http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1818一开始想着用循环做,看了别人的解法才发现根本没必要,比较根号n就行了 1 #include 2 #include 3 #include 4 using namespace s... 阅读全文
posted @ 2015-11-13 22:52 qlky 阅读(147) 评论(0) 推荐(0) 编辑
摘要: http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=37找规律,水题 1 #include 2 #include 3 #include 4 using namespace std; 5 6 int main() 7 { 8 ... 阅读全文
posted @ 2015-11-13 22:24 qlky 阅读(241) 评论(0) 推荐(0) 编辑
摘要: n条直线。折线或闭合曲线最多能把平面分成多少份其实这个问题的思路很简单,只要研究每一条新的直线与之前的直线会有多少个交点,分割完后会有几条线段,几条射线,就可以算出来多新增加了几个区域(1) n条直线最多分平面问题有n-1条直线时,平面最多被分成了f(n-1)个区域。则第n条直线要是切成的区域数最多... 阅读全文
posted @ 2015-11-13 20:18 qlky 阅读(341) 评论(0) 推荐(0) 编辑