摘要:
问题:我们经常会遇见这些问题比如给你一个容量为5升的杯子和一个容量为3升的杯子,水不限使用,要求精确得到4升水并写出算法。回答:1) 直接以简答的方式给定方案这个比较简单,即便是不知道什么原理,也可以很快凑出来。假设两个杯子分别为x 5升杯, y 3升杯 : 装满 x ; x -> y ;清空Y ;... 阅读全文
摘要:
问题:There are n points in the plane. Your task is to pick k points (k>=2), and make the closest points in these k points as far as possible. 输入:For eac... 阅读全文
摘要:
问题:输入三角形三边长,判断是否是直角三角形写出算法。InputThe inputs start with a line containing a single integer n. Each of the n following lines contains one test case. Each... 阅读全文