题目链接: "CF2B The least round way" 显然需要 $dp$ 解决。 第一个思路:用 $dp_{i}{j}$代表第 $i$ 行第 $j$ 列最小的后缀 $0$ 数,不幸的是,他被 hack 了。 考虑 $10$的形成,贡献只来自于 $2$ 和 $5$ 这个因数。 我们容易想到 ...
分类:
其他好文 时间:
2020-04-15 16:33:01
阅读次数:
90
from sklearn import datasets from sklearn import preprocessing from sklearn.model_selection import train_test_split from sklearn.neighbors import KNei ...
分类:
其他好文 时间:
2020-04-14 21:04:39
阅读次数:
74
1 #include<stdio.h> 2 #define MAXN 100000 3 struct poly{ 4 int exp,var; 5 }; 6 struct poly a[MAXN]; 7 void read(); 8 void deal(); 9 void print(); 10 i ...
分类:
其他好文 时间:
2020-04-14 01:07:49
阅读次数:
69
题意: 有$n$个员工,$s$元钱,现在要给每个员工发工资。每个员工的工资的范围$(l_i,r_i)$,求所有员工的工资中位数的最大值。 思路: 二分答案,$check$的时候判断工资可以大于等于$mid$的员工个数,用最小代价购买之后判断总价钱会不会超出范围。 代码: 1 //#include<b ...
分类:
其他好文 时间:
2020-04-13 19:44:33
阅读次数:
61
一.题解 ? 这道题又是一道换根dp板子题,代码结构与 "Accumulation Degree" 这道题基本一致,唯一不同的就是转移了【不过转移的时候,因为方程的原因不需要特殊考虑叶节点】 ? 我们先套路的设$dp[i]$ 表示以 $i$ 为根的子树中 , 所有点的深度和 ,现在,我们来想想转移。 ...
分类:
其他好文 时间:
2020-04-13 12:33:24
阅读次数:
53
题意:https://codeforces.com/problemset/problem/281/C 就存个模板 1 #define IOS ios_base::sync_with_stdio(0); cin.tie(0); 2 #include <cstdio>//sprintf islower ...
分类:
其他好文 时间:
2020-04-12 22:43:43
阅读次数:
72
1 #include "ioCC2530.h" 2 3 #define D3 P1_0 4 #define D4 P1_1 5 #define D5 P1_3 6 #define D6 P1_4 7 8 unsigned char count = 0; //长定时累计变量 9 10 /* 端口初始化 ...
分类:
其他好文 时间:
2020-04-12 20:47:23
阅读次数:
95
```//#include#include#include#include#include#include#include#define int long longusing namespace std;#define rep_1(i,m,n) for(int i=m;i='0'&&ch='0'&&... ...
分类:
其他好文 时间:
2020-04-12 18:37:46
阅读次数:
87
#include<bits/stdc++.h> #define INF 0x3f3f3f3f #define DOF 0x7f7f7f7f #define endl '\n' #define mem(a,b) memset(a,b,sizeof(a)) #define debug(x) cout<< ...
分类:
其他好文 时间:
2020-04-12 18:21:13
阅读次数:
52