摘要: Description Background Raymond Babbitt drives his brother Charlie mad. Recently Raymond counted 246 toothpicks spilled all over the floor in an instan 阅读全文
posted @ 2018-05-23 20:29 l..q 阅读(299) 评论(0) 推荐(0)
摘要: 题目描述 Tak has N cards. On the i-th (1≤i≤N) card is written an integer xi. He is selecting one or more cards from these N cards, so that the average of 阅读全文
posted @ 2018-05-22 17:20 l..q 阅读(382) 评论(1) 推荐(0)
摘要: Problem Description 读入一个只包含 +, -, *, / 的非负整数计算表达式,计算该表达式的值。 Input 测试输入包含若干测试用例,每个测试用例占一行,每行不超过200个字符,整数和运算符之间用一个空格分隔。没有非法表达式。当一行中只有0时输入结束,相应的结果不要输出。 O 阅读全文
posted @ 2018-05-20 21:51 l..q 阅读(272) 评论(0) 推荐(0)
摘要: A.Easy h-index 题目描述 The h-index of an author is the largest h where he has at least h papers with citations not less than h.Bobo has published many pa 阅读全文
posted @ 2018-05-18 23:27 l..q 阅读(1527) 评论(0) 推荐(0)
摘要: 题目描述 We have a large square grid with H rows and W columns. Iroha is now standing in the top-left cell. She will repeat going right or down to the adj 阅读全文
posted @ 2018-05-17 22:20 l..q 阅读(582) 评论(0) 推荐(0)
摘要: 题目描述 现在,有一行括号序列,请你检查这行括号是否配对。 输入 第一行输入一个数N(0<N<=100),表示有N组测试数据。后面的N行输入多组输入数据,每组输入数据都是一个字符串S(S的长度小于10000,且S不是空串),测试数据组数少于5组。数据保证S中只含有"[","]","(",")"四种字 阅读全文
posted @ 2018-05-15 17:06 l..q 阅读(273) 评论(0) 推荐(0)
摘要: Problem Description We define an element a_iai​ in a sequence "good", if and only if there exists a j(1\le j < i)j(1≤j<i) such that a_j < a_iaj​<ai​.G 阅读全文
posted @ 2018-05-14 23:15 l..q 阅读(745) 评论(0) 推荐(0)
摘要: 题目描述 众所周知,一个有着6个人的宿舍可以有7个微信群(^_^,别问我我也不知道为什么),然而事实上这个数字可以更大,因为每3个或者是更多的人都可以组建一个群,所以6个人最多可以组建42个不同的群。现在,已知一间宿舍有N个人,并且每至少K个人都可以组建一个微信群,那么他们最多可以组建多少个不同的微 阅读全文
posted @ 2018-05-14 21:28 l..q 阅读(778) 评论(0) 推荐(0)
摘要: 题目描述 那年一个雨季,AmyZhi在校门外弯身买参考书。这时SiriusRen走过来,一言不合甩给她一道(自认为)很难的题给你一个数字N,求一个最小的正整数M,这个数字M的各个位的数字加上它本身之和恰好为N。没有想到AmyZhi秒解了这道题 并把N扩大到了10^18 甩回给了SiriusRenSi 阅读全文
posted @ 2018-05-14 20:07 l..q 阅读(327) 评论(0) 推荐(0)
摘要: 题目描述 一个骑士在一个无限大的国际象棋棋盘里跳。一开始,这个国际象棋棋盘的每一个格子都是被标记为未被走过的,而骑士一开始可以以任意的一个格子作为起点,并且这个格子标记为走过。然后,他可以以如下图的规则跳N次,每一个他所到过的格子都会被标记为已经走过。 现在,我们需要知道在N次跳跃之后,有多少个格子 阅读全文
posted @ 2018-05-14 13:46 l..q 阅读(601) 评论(0) 推荐(0)