https://vjudge.net/contest/311225#overview 点分治+FFT 密码:996996 A - 聪聪可可 用q[0],q[1],q[2],分别表示距离%3的个数,那么就可以通过calc算出来了。 #include<bits/stdc++.h>#define il inline#define pb push_back#define fi first
https://vjudge.net/contest/310985#overview 概率dp 密码:996996 A - Another Crisis 从大bose往下,按提交申请书人数从小到大排序,优先选择前面的即可,满足它选的那个比例即可。 #include<bits/stdc++.h>#define il inline#define pb push_back#defin
https://vjudge.net/contest/310704 dp+点分治 密码:996996 A - Lighting System Design 这个题目毒的太累了,dp[i]代表选前i个灯最少的消费,先按电压从小到大排,方便后面的转移。 #include<bits/stdc++.h>#define il inline#define pb push_back#define
https://vjudge.net/contest/310440#overview 单调队列+贪心+dp 密码:996996 A - Feel Good 找到每个点以他为最小值向左向右的最大区间,用单调队列即可。 #include<cstdio>#include<iostream>#include<algorithm>#include<string>#include<cst
UVA - 12627 Erratic Expansion 奇怪的气球膨胀 Piotr found a magical box in heaven. Its magic power is that if you place any red balloon inside it then, after one hour, it will multiply to form 3 red
数据结构基础 例题E-H H-TreeG-Trees on the levelF- Dropping BallsE-Self-Assembly H-Tree Description You are to determine the value of the leaf node in a given binary tree that is the terminal node of