摘要: Dungeon Master You are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be fi 阅读全文
posted @ 2018-12-06 20:11 suvvm 阅读(304) 评论(0) 推荐(1) 编辑
摘要: Nightmare Ⅱ Last night, little erriyue had a horrible nightmare. He dreamed that he and his girl friend were trapped in a big maze separately. More te 阅读全文
posted @ 2018-12-05 20:00 suvvm 阅读(336) 评论(0) 推荐(0) 编辑
摘要: Maximum Sum of Digits You are given a positive integer n. Let S(x)S(x) be sum of digits in base 10 representation of xx , for example, S(123)=1+2+3=6S 阅读全文
posted @ 2018-12-02 19:43 suvvm 阅读(384) 评论(0) 推荐(0) 编辑
摘要: 敌兵布阵 C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工兵营地的人数都 阅读全文
posted @ 2018-12-01 18:42 suvvm 阅读(333) 评论(0) 推荐(0) 编辑
摘要: 我们看到过很多直线分割平面的题目,今天的这个题目稍微有些变化,我们要求的是n条折线分割平面的最大数目。比如,一条折线可以将平面分成两部分,两条折线最多可以将平面分成7部分,具体如下所示。 Input输入数据的第一行是一个整数C,表示测试实例的个数,然后是C 行数据,每行包含一个整数n(0<n<=10 阅读全文
posted @ 2018-11-28 21:13 suvvm 阅读(234) 评论(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 阅读(259) 评论(0) 推荐(0) 编辑
摘要: Choose the best route One day , Kiki wants to visit one of her friends. As she is liable to carsickness , she wants to arrive at her friend’s home as 阅读全文
posted @ 2018-11-24 16:51 suvvm 阅读(262) 评论(0) 推荐(0) 编辑