摘要: Suppose a bank has N windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. The rules 阅读全文
posted @ 2019-02-28 08:08 囧YY 阅读(372) 评论(0) 推荐(0) 编辑
摘要: It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all the highways from/toward that c 阅读全文
posted @ 2019-02-28 07:52 囧YY 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 写一道小题目时发现了一个隐蔽错误,之前也没有在意过。就是string.size()返回的是size_type类型,而size_type等同于unsigned int 那道小题目如下: 当时写的代码如下: 这里什么结果都输不出来,然后调试时发现到第15行的判断语句时name.size()比maxsiz 阅读全文
posted @ 2019-02-03 10:08 囧YY 阅读(2405) 评论(0) 推荐(0) 编辑
摘要: 1008 Elevator (20 分) The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at 阅读全文
posted @ 2019-01-24 15:13 囧YY 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 1004 Counting Leaves (30 分) A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child. I 阅读全文
posted @ 2019-01-24 14:39 囧YY 阅读(99) 评论(0) 推荐(0) 编辑
摘要: Given a sequence of K integers { N​1​​, N​2​​, ..., N​K​​ }. A continuous subsequence is defined to be { N​i​​, N​i+1​​, ..., N​j​​ } where 1. The Max 阅读全文
posted @ 2019-01-22 22:27 囧YY 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 1006 Sign In and Sign Out (25 分) At the beginning of every day, the first person who signs in the computer room will unlock the door, and the last one 阅读全文
posted @ 2019-01-19 10:54 囧YY 阅读(74) 评论(0) 推荐(0) 编辑
摘要: 1005 Spell It Right (20 分) Given a non-negative integer N, your task is to compute the sum of all the digits of N, and output every digit of the sum i 阅读全文
posted @ 2019-01-19 10:24 囧YY 阅读(93) 评论(0) 推荐(0) 编辑
摘要: 1003 Emergency (25 分) As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered citie 阅读全文
posted @ 2019-01-18 21:44 囧YY 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 1002 A+B for Polynomials (25 分) This time, you are supposed to find A+B where A and B are two polynomials. Input Specification: Each input file contai 阅读全文
posted @ 2019-01-18 18:59 囧YY 阅读(112) 评论(0) 推荐(0) 编辑