题目链接http://codeforces.com/contest/1249/problem/C2。这是道进制转换题,我们的目的是找到最小的一个每个位都是1的三进制数来表示一个十进制数n。做法是,先将n转换为一个三进制数,然后对当前位加上低位的进位大于等于2的位置0并进位,这一步需要注意的是,当前位 ...
分类:
其他好文 时间:
2019-10-27 12:27:26
阅读次数:
79
传送门 "Luogu" 解题思路 ~~毒瘤~~数位DP,发现一个前缀我们只需要记录它对 $\operatorname{lcm}(1,2,3,\cdots,9)=2520$ 取模的值即可,所以我们在 DP 时记录一下当前的前缀模2520的值,以及前缀每一位数字的 $\operatorname{lcm} ...
分类:
其他好文 时间:
2019-10-27 10:59:30
阅读次数:
63
1067 Sort with Swap(0, i) (25 分) 1067 Sort with Swap(0, i) (25 分) 1067 Sort with Swap(0, i) (25 分) Given any permutation of the numbers {0, 1, 2,..., ...
分类:
其他好文 时间:
2019-10-26 22:39:02
阅读次数:
97
允许网页宽度自动调整 在head标签里加入viewport元标签,viewport是网页默认宽度和高度 //网页宽=屏幕宽,原始缩放比0.5 <meta name="viewport" content="width=device-width, initial-scale=0.5" /> 不要固定宽度 ...
分类:
移动开发 时间:
2019-10-26 21:16:29
阅读次数:
116
Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path. ...
分类:
其他好文 时间:
2019-10-26 14:57:10
阅读次数:
55
题目描述 从扑克牌中随机抽 5 张牌,判断是不是一个顺子,即这5张牌是不是连续的。 2~10 为数字本身,A 为1,J 为 11,Q 为 12,K 为 13,大小王可以看做任意数字。 为了方便,大小王均以 0 来表示,并且假设这副牌中大小王均有两张。 样例1 样例2 解法一 对数组排序; 计算出 0 ...
分类:
其他好文 时间:
2019-10-24 21:27:07
阅读次数:
66
本篇文庄主要讲述NAT地址转化的工作原理、转换方式、NAT的特性、配置方法等,希望对大家有所把帮助!!!
分类:
其他好文 时间:
2019-10-24 09:17:29
阅读次数:
113
Booth's multiplication algorithm is a multiplication algorithm that multiplies two signed binary numbers in two's complement notation. The algorithm w ...
分类:
其他好文 时间:
2019-10-23 22:03:59
阅读次数:
98
A. Yet Another Dividing into Teams 传送门 签到,有相邻的数字 ans=2,否则 ans=1 B. Books Exchange 传送门 找每个顶点处在的环的大小,dfs 行了 C. Good Numbers 传送门 我的方法是这样的,先将这个数转化为三进制来看。 ...
分类:
其他好文 时间:
2019-10-23 13:33:29
阅读次数:
110
这道题非常好。 hint:考虑固定操作次数 $o$,$k$ 最大可取到多少? ...
分类:
其他好文 时间:
2019-10-23 11:32:16
阅读次数:
212