题目 :http://poj.org/problem?id=3617 给定一个字符序列S,按一定规则输出最小字典序的结果,规则是:如果S的头部字符小于尾部字符,那么将S的头部字符加到输出字符串,然后删除这个字符,得到新的头部字符,反之同样。 输入样例 : 6 A C D B C B 输出样例 : A ...
分类:
其他好文 时间:
2020-01-22 22:22:56
阅读次数:
85
# **Catch That Cow(抓住那只奶牛)**【题意】:农场主要去追一直逃跑的牛,每次移动有三种选择,位置加一,位置减一,位置乘二,要找到最快的方法让农夫追到牛(也就是移动的次数最少,这个过程是线性的)具体的题目请见:[原题链接:](http://poj.org/problem?id=32 ...
分类:
其他好文 时间:
2020-01-22 20:13:41
阅读次数:
110
Keeping track of all the cows can be a tricky task so Farmer John has installed a system to automate it. He has installed on each cow an electronic ID ...
分类:
其他好文 时间:
2020-01-22 20:05:48
阅读次数:
73
A Round Peg in a Ground Hole POJ - 1584 题目链接:https://vjudge.net/problem/POJ-1584#author=0 题意:要求钉子要钉入孔内,判断能否在指定点钉入 思路:先判断这些点围成的多边形是不是凸多边形,如果是那么判断圆是否在凸边 ...
分类:
其他好文 时间:
2020-01-22 20:04:04
阅读次数:
70
题意: "题目链接" 给定 $n$ 个点,求距离最远的两个点之间的距离,输出最远距离的平方 $n include using namespace std; const int N=50005; int n,top,per[N],res; struct point{int x,y;int dist() ...
分类:
其他好文 时间:
2020-01-22 13:15:14
阅读次数:
58
F - Aggressive cows Farmer John has built a new long barn, with N (2 <= N <= 100,000) stalls. The stalls are located along a straight line at position ...
分类:
其他好文 时间:
2020-01-22 13:14:00
阅读次数:
66
http://poj.org/problem?id=3764 题意:求上任意两点的边权异或最大值。 解法:dfs遍历树的同时将异或值加入01字典树中,同时查询最大异或值。 这样为什么就能保证你所求的结果对应的路径是连续的呢?考虑三种情况: 1.深搜的两条路径一个包含在另一个中,这样一异或,公共的部分 ...
分类:
其他好文 时间:
2020-01-22 01:20:18
阅读次数:
107
E - Arctic Network The Department of National Defence (DND) wishes to connect several northern outposts by a wireless network. Two different communica ...
分类:
Web程序 时间:
2020-01-21 23:45:57
阅读次数:
125
Severe acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-March 2003. To minimize ...
分类:
其他好文 时间:
2020-01-21 23:30:26
阅读次数:
99
调得我快死了啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊!!!! 先自己写了几发,老是 T,然后去看题解,大体思路居然都差不多,估计是自己写挂了orz。 几乎所有题解都有个 数组,真 nm 看不懂到底是什么意思啊啊啊!!! 然后照着题解打了一遍后好像明白了……emmm…… 为 1 时代表当前位置与 (0,0) 颜 ...
分类:
其他好文 时间:
2020-01-21 23:11:46
阅读次数:
60