2014.7建兰NOIP模拟Day1 Running】的更多相关文章

突然间翻到着题,想想那时的我真是垃圾,这么简单的tarjan缩点+树上倍增都不会..还想了3h+.. 什么时候写了它吧...…
HGOI自测 初测:150=80+20+50 rank1~rank3(并列3个rank1,所以我是rank3 qwq) 今日分突然想简约 CF359A Table https://www.luogu.org/problemnew/show/CF359A 题目描述 Simon has a rectangular table consisting of nn rows and mm columns. Simon numbered the rows of the table from top to b…
100pts=40+60+0 rank 56 若串联那么显然是这样: 若并联那么显然是这样: 串联时C<1,并联时C>1,贪心策略<1时尽可能串联,>1时尽可能并联 考虑这样一个数学问题 令0<a<b,那么 a/b<1 ,设前面串联的电容为X,那么就有   迭代的话就是用b-a代替b,ans++,这里做一个优化,就是当a小b大的时候无法快速让a>b这里用取膜, 举个例子 2/11--2/9--2/7--2/5--2/3--2/1要经过5次才到a>b那我…
题目:http://ch.ezoj.tk/contest/CH%20Round%20%2359%20-%20OrzCC杯NOIP模拟赛day1/队爷的讲学计划 题解:刚开始理解题意理解了好半天,然后发现好像就是tarjan之后求个最长链? 然后题目规定了从1出发,那么就只将scc[1]放入初始队列. 然后只有10分... 后来我发现了这样的情况:因为只有scc[1]放入了队列,所以其它入度为0的并没有被放入队列,这使得一些点的inp无法减到0,以致无法更新答案 然后我就先从scc[1]dfs了一…
题目:http://ch.ezoj.tk/contest/CH%20Round%20%2359%20-%20OrzCC杯NOIP模拟赛day1/队爷的Au%20Plan 题解:看了题之后觉得肯定是DP+优化,因为昨天刚水了一道线段树优化DP的题,所以又想到线段树上去了... 具体做法: 我维护了一个单调递增的f,显然若i<j并且f[i]>f[j],那么f[j]就可以不用 然后我们要找寻>=a[i]的就是连续的一段了,就可以用线段树来查询f[j]-s[j]的最大值了 然后 n*logn 水…
题目:http://ch.ezoj.tk/contest/CH%20Round%20%2359%20-%20OrzCC杯NOIP模拟赛day1/队爷的新书 题解:看到这题就想到了 poetize 的封印之门,然后就用差分序列水过了...不过把线段排序也可以一遍扫出来? 代码: #include<cstdio> #include<cstdlib> #include<cmath> #include<cstring> #include<algorithm&g…
A.数三角形 题目:http://www.contesthunter.org/contest/CH%20Round%20%2348%20-%20Streaming%20%233%20(NOIP模拟赛Day1)/数三角形 题解:暴力枚举三元组,判断是否共线即可,用叉积 代码: type cp=record x,y:double; end; ..] of cp; i,j,k,n,ans:longint; function cross(a,b,c:cp):double; begin cross:=(b…
A.珠 题目:http://ch.ezoj.tk/contest/CH%20Round%20%2354%20-%20Streaming%20%235%20(NOIP模拟赛Day1)/珠 题解:sb题,把原串复制一边接到后面然后来回扫两遍即可. sb题还不能A,我是大sb,数组开小+只扫一遍=90 幸亏出题人数据良心T_T 代码: #include<cstdio> #include<cstdlib> #include<cmath> #include<cstring&…
NOIP模拟赛2016-10-22 题目名 东风谷早苗 西行寺幽幽子 琪露诺 上白泽慧音 源文件 robot.cpp/c/pas spring.cpp/c/pas iceroad.cpp/c/pas classroom.cpp/c/pas 输入文件 robot.in spring.in iceroad.in classroom.in 输出文件 robot.out spring.out iceroad.out classroom.out 时间限制 1000MS 1000MS 1000MS 1000…
contesthunter暑假NOIP模拟赛#1题解: 第一题:杯具大派送 水题.枚举A,B的公约数即可. #include <algorithm> #include <cmath> #include <iostream> using namespace std; #define MAXN 100010 struct node { int a,b,c; }ans[MAXN]; int main() { int R, G; scanf("%d%d",&…