04 2019 档案
摘要:B Maximal Continuous Rest Each day in Berland consists of n hours. Polycarp likes time management. That's why he has a fixed schedule for each day — i
阅读全文
摘要:A Serval and Bus It is raining heavily. But this is the first day for Serval, who just became 3 years old, to go to the kindergarten. Unfortunately, h
阅读全文
摘要:C 不要62 杭州人称那些傻乎乎粘嗒嗒的人为62(音:laoer)。 杭州交通管理局经常会扩充一些的士车牌照,新近出来一个好消息,以后上牌照,不再含有不吉利的数字了,这样一来,就可以消除个别的士司机和乘客的心理障碍,更安全地服务大众。 不吉利的数字为所有含有4或62的号码。例如: 62315 734
阅读全文
摘要:A Game 23 Polycarp plays "Game 23". Initially he has a number n and his goal is to transform it to m. In one move, he can multiply n by 2 or multiply
阅读全文
摘要:Max Sum Given a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub sequence. For example, given (6, 1,5,4, 7), the max s
阅读全文
摘要:A Diverse Strings A string is called diverse if it contains consecutive (adjacent) letters of the Latin alphabet and each letter occurs exactly once.
阅读全文
摘要:深度搜索 走地图的题目是深度搜索里比较容易理解的题目,更深层次的是全排列和七皇后等经典题目,更加难以理解,代码比较抽象。 题目:红与黑 蒜厂有一间长方形的房子,地上铺了红色、黑色两种颜色的正方形瓷砖。你站在其中一块黑色的瓷砖上,只能向相邻的黑色瓷砖移动。 请写一个程序,计算你总共能够到达多少块黑色的
阅读全文
摘要:位运算 Problem Description 7 1 数组元素循环右移问题 一个数组A中存有N( 0)个整数,在不允许使用另外数组的前提下,将每个整数循环向右移M(≥0)个位置,即将A中的数据由(A0 A1⋯AN−1)变换为(AN−M ⋯AN−1 A0 A1 ⋯A
阅读全文

浙公网安备 33010602011771号