摘要: Bahosain was trying to solve this simple problem, but he got a Runtime Error on one of the test cases, can you help him by solving it? Given an array  阅读全文
posted @ 2016-07-26 22:22 苍鼠 阅读(530) 评论(0) 推荐(0) 编辑
摘要: After leaving Yemen, Bahosain now works as a salesman in Jordan. He spends most of his time travelling between different cities. He decided to buy a n 阅读全文
posted @ 2016-07-26 20:04 苍鼠 阅读(262) 评论(0) 推荐(0) 编辑
摘要: Bahosain is walking in a street of N blocks. Each block is either empty or has one lamp. If there is a lamp in a block, it will light it’s block  阅读全文
posted @ 2016-07-26 19:52 苍鼠 阅读(350) 评论(0) 推荐(0) 编辑
摘要: Description In graph theory, a pseudoforest is an undirected graph in which every connected component has at most one cycle. The maximal pseudoforests 阅读全文
posted @ 2016-07-26 00:28 苍鼠 阅读(282) 评论(0) 推荐(0) 编辑
摘要: Description 当今世界有很多不同的宗教,很难通晓他们。你有兴趣找出在你的大学里有多少种不同的宗教信仰。 你知道在你的大学里有n个学生(0 < n <= 50000) 。你无法询问每个学生的宗教信仰。此外,许多学生不想说出他们的信仰。避免这些问题的一个方法是问m(0 <= m <= n(n 阅读全文
posted @ 2016-07-26 00:12 苍鼠 阅读(327) 评论(0) 推荐(0) 编辑
摘要: Description 严重急性呼吸系统综合症( SARS), 一种原因不明的非典型性肺炎,从2003年3月中旬开始被认为是全球威胁。为了减少传播给别人的机会, 最好的策略是隔离可能的患者。 在Not-Spreading-Your-Sickness大学( NSYSU), 有许多学生团体。同一组的学生 阅读全文
posted @ 2016-07-26 00:02 苍鼠 阅读(218) 评论(0) 推荐(0) 编辑