摘要:
Water Pump 【题目链接】 " Water Pump " 【题目类型】 单调栈 &题解: 这题可以枚举缺口,共n 1个,之后把前缀面积和后缀面积用O(n)打一下表,最后总面积减去前缀的i个和后缀的n 1 i个面积就是现在第i+1给缺口漏水的面积 &代码: c++ include includ 阅读全文
摘要:
The Meeting Place Cannot Be Changed 我发现我最近越来越zz了,md 连调程序都不会了,首先要有想法,之后输出如果和期望的不一样就从输入开始一步一步地调啊,tmd现在输出不一样就知道在那等着,有毛用啊. 【题目链接】 " The Meeting Place Cann 阅读全文
摘要:
【题目类型】 二分答案 &题解: 只要你想到二分答案就不是难题了,但我当时确实是想不到. 【时间复杂度】$O(nlogn)$ &代码: c++ include include include include include include using namespace std; define IN 阅读全文
摘要:
计算几何模板(蓝书) &代码: c++ //蓝书P255 //1.点的定义 struct Point { double x,y; Point (double x=0,double y=0):x(x),y(y) {} }; //点和向量是一样的内容 所以会出来2个名字 typedef Point Ve 阅读全文
摘要:
Seek the Name,Seek the Fame 过了个年,缓了这么多天终于开始刷题了,好颓废~( . )~ 我发现在家真的很难去学习,因为你还要陪父母,干活,做家务等等 但是还是不能浪费时间啊,要利用所有的时间去学习啊 【题目链接】 " Seek the Name,Seek the Fame 阅读全文
摘要:
A Simple Problem with Integers 【题目链接】 " A Simple Problem with Integers " 【题目类型】线段树 成段增减+区间求和 &题解: 线段树 成段增减+区间求和 模板题 这种题真的应该理解并且可以流畅的独立码出来了 【时间复杂度】$O(n 阅读全文