题目大意: 求字典序第 \(N\) 大的只含 \(k\) 个 1 的 01 串。 正文: 考虑到用组合数,由于首位一定是 1,那么我们需要选择位置的 1 就只有 \(k-1\) 个,枚举 01 串长度 \(len\),长度为 \(len\) 的 01 串个数是 \(C_{len}^{k-1}\),每 ...
分类:
其他好文 时间:
2020-08-13 22:09:50
阅读次数:
50
1、环境要求 IDEA MySQL 5.7 Tomcat 9 Maven 3.6 需要熟练掌握MySQL数据库,Spring,JavaWeb及Mybatis知识,基本的前端知识; 2、数据库环境 create database ssmbuild; use ssmbuild; drop table i ...
分类:
其他好文 时间:
2020-08-13 12:42:10
阅读次数:
67
https://ac.nowcoder.com/acm/problem/24953 题目描述:给出一棵树,选最小的点把所以边覆盖。 思路: ? dp[i][0]:选点i,并且以点i为根的子树都被覆盖了。 ? dp[i][1]:不选点i,i被其儿子覆盖 ? dp[i][2]:不选点i,i没有被子节点覆 ...
分类:
Web程序 时间:
2020-08-10 23:16:45
阅读次数:
91
用归递的方式打出一串字符ADD(intx){if(x>9){ADD(x/10);}printf("%d",x%10);}intmain(){intnum1=0;printf("请输入:>");scanf("%d",&num1);ADD(num1);return0;}用函数的方式写出有多少个字符ADD(char*a){if(*a!=‘\0‘){return1+ADD(a+1);}
分类:
其他好文 时间:
2020-08-10 10:56:43
阅读次数:
68
题意: 分析: 代码: #include <bits/stdc++.h> using namespace std; typedef long long ll; const int mod=1e9+7; const int N=1e6+6; int mu[N]; int prime[N],cnt; b ...
分类:
其他好文 时间:
2020-08-07 12:39:20
阅读次数:
82
点击查看代码块 /* 找字典序最小的欧拉路,也可以做欧拉回路 */ #include <bits/stdc++.h> #define ed end() #define bg begin() #define mp make_pair #define pb push_back #define v(T) ...
分类:
其他好文 时间:
2020-08-07 12:35:13
阅读次数:
76
POJ3468 题目链接 POJ3468 题目概述 给出一个包含有$N$个元素的数组$a$,然后是$m$次操作,操作有以下两种类型: Q x y($x \leq y)\(计算\)\sum_^y a[i]$ C x y d$(x \leq y)\(将区间\)[x,y]$内部的每一个$a[i]$加上$d ...
分类:
其他好文 时间:
2020-08-05 19:43:49
阅读次数:
75