题目描述: Two players, Stan and Ollie, play, starting with two natural numbers. Stan, the first player, subtracts any positive multiple of the lesser of t ...
分类:
其他好文 时间:
2019-10-22 20:12:40
阅读次数:
106
链接:https://atcoder.jp/contests/abc143/tasks/abc143_f 题解:开两个数组,其中一个arr用来保存每个元素出现的次数,同时再开一个数组crr用来保存出现次数等于其下标的个数,然后对crr求前缀和,crr就变成了出现次数维护小于其小标的总个数。 根据题意 ...
分类:
其他好文 时间:
2019-10-22 14:51:33
阅读次数:
76
"题目链接" 题解 一个数能被一些数整除,那么一定被这些数的$lcm$整除 那么我们容易想到根据$lcm$设状态 我们可以发现有用的$lcm$只有$48$个 那么按照一般的数位$dp$ 设出状态:$f_{i,j,k,0/1}$表示前$i$位,$lcm=j$,模$lcm$的余数是$k$,是否达到上界 ...
分类:
其他好文 时间:
2019-10-21 22:08:05
阅读次数:
88
0x01:输出流 java常用的输出语句有下面三种: System.out.println();//换行打印,输出之后会自动换行 System.out.println();//换行打印,输出之后会自动换行 System.out.print();//不换行打印 System.out.printf(); ...
分类:
编程语言 时间:
2019-10-21 16:33:52
阅读次数:
113
composer config -l -g composer 更新慢 composer下载不下来问题解决 使用 Composer 镜像加速有两种选项: 选项一:全局配置,这样所有项目都能惠及(推荐); 选项二:单独项目配置; 选项一、全局配置(推荐) 选项二、单独使用 如果仅限当前工程使用镜像,去掉 ...
分类:
其他好文 时间:
2019-10-21 16:08:23
阅读次数:
131
dotNET匠人
C#刷遍Leetcode面试题系列连载(4) No.633 - 平方数之和 ...
传送门 这个显然考虑容斥,那么答案就是总方案数减去至少有一个 $1$ 的方案数加上至少有两个 $1$ 的方案数减去至少有三个 $1$ 的方案数... 即 $ans=\sum_{x=0}^{max(a)}(-1)^{cnt[x]}(2^{f[x]}-1)$ ,其中 $cnt[x]$ 表示 $x$ 二进 ...
分类:
其他好文 时间:
2019-10-20 15:56:44
阅读次数:
85
Given a range [m, n] where 0 <= m <= n <= 2147483647, return the bitwise AND of all numbers in this range, inclusive. Example 1: Example 2: ...
分类:
其他好文 时间:
2019-10-20 11:12:34
阅读次数:
59
Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number. The function ...
分类:
其他好文 时间:
2019-10-20 10:38:02
阅读次数:
80
Given a set of candidate numbers (candidates) (without duplicates) and a target number (target), find all unique combinations in candidates where the ...
分类:
其他好文 时间:
2019-10-19 20:30:00
阅读次数:
89