Ancient Berland Circus Nowadays all circuses in Berland have a round arena with diameter 13 meters, but in the past things were different. In Ancient ...
分类:
其他好文 时间:
2016-08-19 15:06:18
阅读次数:
204
Bear and Finding Criminals There are n cities in Bearland, numbered 1 through n. Cities are arranged in one long row. The distance between cities i an ...
分类:
其他好文 时间:
2016-08-19 11:24:07
阅读次数:
199
Vanya and Label While walking down the street Vanya saw a label "Hide&Seek". Because he is a programmer, he used & as a bitwise AND for these two word ...
分类:
其他好文 时间:
2016-08-19 11:21:32
阅读次数:
160
Vanya and Food Processor Vanya smashes potato in a vertical food processor. At each moment of time the height of the potato in the processor doesn't e ...
分类:
其他好文 时间:
2016-08-19 09:46:05
阅读次数:
133
10^4以内只由4和7构成的数字只有31种,那么做法就很简单了,求出每个数字与其最接近的幸运数的差值,然后建立线段树,线段树维护区间最小值和最小值个数,如果操作过程中最小值<0,那么就去对差值进行暴力修改,直到区间差值>=0,很明显线段树每个叶子节点不会被修改超过31次,询问操作的话差值=0的数字就 ...
分类:
其他好文 时间:
2016-08-06 12:55:12
阅读次数:
178
http://codeforces.com/contest/702 题意:n个村庄,m个机站,问机站最短半径覆盖完所有村庄 思路:直接二分答案 二分太弱,调了半天。。。。。 ...
分类:
Web程序 时间:
2016-08-02 13:29:37
阅读次数:
203
枚举每一条边 将树分为两部分 分别dfs求出树的直径 从一点开始最长路加次长路为树的直径 #include<iostream> #include<vector>#include<algorithm>using namespace std;vector<int> G[100000];int n,s;i ...
分类:
其他好文 时间:
2016-07-22 14:36:26
阅读次数:
139
题目大意:在二维坐标系的x正半轴,y正半轴和第一象限内,有三种操作: 1、add x,y (添加点<x,y>); 2、remove x,y(移除点<x,y>); 3、find x,y(查找在点<x,y>的绝对右上角的第一个点); 并且,只能移除已添加的点,一个点在移除之前不能重复添加。 题目分析:将 ...
分类:
其他好文 时间:
2016-06-14 14:17:53
阅读次数:
194
原题地址:http://codeforces.com/problemset/problem/677/D 题意 略 题解 直接的DP是n2m2的复杂度,据题解说通过bfs来转移可以实现n*m*sqrt(n*m)…… ...
分类:
其他好文 时间:
2016-06-13 06:30:12
阅读次数:
195
原题地址:http://codeforces.com/problemset/problem/557/C 题意: 一个桌子有n个桌腿,每个桌腿长l,砍断需要体力d,欲使桌子保持平衡,需要砍断部分桌腿,使得剩余的桌腿中长度最大的那些桌腿的数量大于剩余桌腿数量的一半 求使桌子保持平衡最少需要花费的体力 题 ...
分类:
其他好文 时间:
2016-06-09 13:34:15
阅读次数:
204