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
ylbtech-Code-Validator:验证电话号码(可以是固定电话号码或手机号码) 1.返回顶部 1、 using System; using System.Text.RegularExpressions; namespace Sp.Common { public class Validat ...
分类:
移动开发 时间:
2020-04-12 16:50:44
阅读次数:
74
charAt charAt()函数返回指定位置字符。 var str = "abcdefg"; console.log(str.chartAt(1))//b console.log(str.chartAt(10))// *空字符串* charCodeAt charCodeAt()函数返回指定位置字符 ...
分类:
其他好文 时间:
2020-04-12 16:35:33
阅读次数:
67