"题目" 提供一个非容斥做法——$FWT$ 我们发现我们要求的东西就是一个背包,只不过是在$and$意义下的 自然有 $$dp_{i,j}=\sum_{k\&a_i=j}dp_{i 1,k}+dp_{i 1,j}$$ 我们发现这个柿子本质上就是一个和卷积 于是两边取$fwt$,我们就可以得到一个暴力 ...
分类:
其他好文 时间:
2019-04-11 10:29:01
阅读次数:
108
https://leetcode.com/problems/find-all-numbers-disappeared-in-an-array/ Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elemen ...
分类:
移动开发 时间:
2019-04-10 21:59:11
阅读次数:
147
``` class Solution { public: int sumNumbers(TreeNode* root) { return sumNumbersDFS(root, 0); } int sumNumbersDFS(TreeNode* root, int sum) { if (!root)... ...
分类:
其他好文 时间:
2019-04-09 17:02:24
阅读次数:
137
列表 & Keys 渲染多个组件 你可以通过使用{}在JSX内构建一个元素集合 下面,我们使用Javascript中的map()方法遍历numbers数组。对数组中的每个元素返回<li>标签,最后我们得到一个数组listItems 我们把整个listItems插入到ul元素中,然后渲染进DOM: R ...
分类:
其他好文 时间:
2019-04-09 09:15:57
阅读次数:
156
Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possib ...
分类:
其他好文 时间:
2019-04-08 13:11:59
阅读次数:
114
A - D-query Given a sequence of n numbers a1, a2, ..., an and a number of d-queries. A d-query is a pair (i, j) (1 ≤ i ≤ j ≤ n). For each d-query (i, ...
分类:
其他好文 时间:
2019-04-08 00:54:37
阅读次数:
129
实验五:任意输入10个int类型数据,排序输出,再找出素数 public class 实验五 {public static void main(String[] args){ Integer[] numbers = new Integer[5]; int i = 0; do{ System.out. ...
分类:
编程语言 时间:
2019-04-07 14:27:35
阅读次数:
188
1. 原始题目 You are given two non-empty linked lists representing two non-negative integers. The most significant digit comes first and each of their node ...
分类:
其他好文 时间:
2019-04-07 12:50:04
阅读次数:
99
Polycarp likes to play with numbers. He takes some integer number xx, writes it down on the board, and then performs with it n?1n?1 operations of the ...
分类:
编程语言 时间:
2019-04-07 12:41:23
阅读次数:
156
refer to https://blog.csdn.net/linfeng886/article/details/79772348 Description Given an array of integers, return indices of the two numbers such that ...
分类:
编程语言 时间:
2019-04-06 22:54:42
阅读次数:
204