删除最少的数位和前缀0,使得剩下的数能被3整除 等价于各数位数字之和能被3整除。 当前数位和可能是 0, 1, 2(mod 3) 0: 直接处理 1: 删除一个a[i]%3 == 1 或者 两个a[i]%3 == 2 2: 同1 对于删完的数列,去掉前置0(只剩前置0就当作0) 若删啥都不满足,则判 ...
分类:
其他好文 时间:
2017-03-29 20:15:04
阅读次数:
269
C. Divide by Three A positive integer number n is written on a blackboard. It consists of not more than 105 digits. You have to transform it into a be ...
分类:
其他好文 时间:
2017-03-29 11:36:10
阅读次数:
170
1095: [ZJOI2007]Hide 捉迷藏 Description 捉迷藏 Jiajia和Wind是一对恩爱的夫妻,并且他们有很多孩子。某天,Jiajia、Wind和孩子们决定在家里玩捉迷藏游戏。他们的家很大且构造很奇特,由N个屋子和N-1条双向走廊组成,这N-1条走廊的分布使得任意两个屋子都 ...
分类:
其他好文 时间:
2017-03-27 13:35:43
阅读次数:
258
今天自己参考已有的项目代码学习了下UI Router的用法,写了个小demo,验证了下自己的想法,现把使用情况记录一下。 1.入口文件index.html,引入项目所需的js文件,标注ng-app,创建ui-view元素,为后面的嵌套做容器准备。 2.配置路由index.js文件。根据入口的ng-a ...
分类:
Web程序 时间:
2017-03-23 16:18:45
阅读次数:
243
外联css login.css: html文件: 新样式:two fields ...
分类:
Web程序 时间:
2017-03-23 02:27:08
阅读次数:
199
google 进入分屏后在横屏模式按home键界面错乱(二)你确定你了解分屏的整个流程?
Android 关机对话框概率没有阴影故障分析
android recent key长按事件弹起触发最近列...
分类:
其他好文 时间:
2017-03-22 10:39:31
阅读次数:
797
Divide two integers without using multiplication, division and mod operator. If it is overflow, return MAX_INT. 题目要求不能使用除号、乘号和取余操作符。 我们使用移位操作符。<< 左移代表 ...
分类:
其他好文 时间:
2017-03-21 22:02:35
阅读次数:
174
A peak element is an element that is greater than its neighbors. Given an input array where num[i] ≠ num[i+1], find a peak element and return its inde ...
分类:
其他好文 时间:
2017-03-20 22:28:15
阅读次数:
189
import java.util.*; //正数的随机取值 class number1 { private int i; private int j; public void seti() { i = 1 + (int)(Math.random() * 100); } public int geti... ...
分类:
其他好文 时间:
2017-03-17 19:18:17
阅读次数:
219
题目链接: https://leetcode.com/problems/divide-two-integers/?tab=Description Problem :不使用乘法,除法,求模计算两个数的除法~ 除法运算:被除数中包含有多少个除数的计算 由于是int类型的除法,因此结果可能超过int的最大 ...
分类:
其他好文 时间:
2017-03-10 17:53:51
阅读次数:
238