摘要: 我们看到过很多直线分割平面的题目,今天的这个题目稍微有些变化,我们要求的是n条折线分割平面的最大数目。比如,一条折线可以将平面分成两部分,两条折线最多可以将平面分成7部分,具体如下所示。 Input输入数据的第一行是一个整数C,表示测试实例的个数,然后是C 行数据,每行包含一个整数n(0<n<=10 阅读全文
posted @ 2018-11-28 21:13 suvvm 阅读(236) 评论(0) 推荐(0) 编辑
摘要: Cure Given an integer nn, we only want to know the sum of 1/k21/k2 where kk from 11 to nn. Input There are multiple cases. For each test case, there i 阅读全文
posted @ 2018-11-28 20:32 suvvm 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 欧拉回路 欧拉回路是指不令笔离开纸面,可画过图中每条边仅一次,且可以回到起点的一条回路。现给定一个图,问是否存在欧拉回路? Input 测试输入包含若干测试用例。每个测试用例的第1行给出两个正整数,分别是节点数N ( 1 < N < 1000 )和边数M;随后的M行对应M条边,每行给出一对正整数,分 阅读全文
posted @ 2018-11-28 20:12 suvvm 阅读(195) 评论(0) 推荐(0) 编辑
摘要: Little Boxes Little boxes on the hillside. Little boxes made of ticky-tacky. Little boxes. Little boxes. Little boxes all the same. There are a green 阅读全文
posted @ 2018-11-28 19:46 suvvm 阅读(265) 评论(0) 推荐(0) 编辑
摘要: Give Me the Number Numbers in English are written down in the following way (only numbers less than 109are considered). Number abc,def,ghi is written 阅读全文
posted @ 2018-11-28 18:58 suvvm 阅读(262) 评论(0) 推荐(0) 编辑