专题训练
ischanx
GDUT本科毕业,前端
展开
-
[POJ - 1979] Red and Black(DFS)
题意:从'@'开始走能到达多少个'.',注意'#'是障碍,被它围起来的'.'是走不了的。原创 2019-02-20 14:23:59 · 209 阅读 · 0 评论 -
[HDU - 2710] Max Factor
Problem DescriptionTo improve the organization of his farm, Farmer John labels each of his N (1 <= N <= 5,000) cows with a distinct serial number in the range 1..20,000. Unfortunately, he is u...原创 2019-03-16 23:56:15 · 183 阅读 · 0 评论 -
[HDU - 4548] 美素数
Description小明对数的研究比较热爱,一谈到数,脑子里就涌现出好多数的问题,今天,小明想考考你对素数的认识。问题是这样的:一个十进制数,如果是素数,而且它的各位数字和也是素数,则称之为“美素数”,如29,本身是素数,而且2+9 =11也是素数,所以它是美素数。给定一个区间,你能计算出这个区间内有多少个美素数吗?Input第一行输入一个正整数T,表示总共有T组数据(T &l...原创 2019-03-16 23:46:57 · 140 阅读 · 0 评论 -
[HDU - 2256] Problem of Precision(矩阵快速幂)
InputThe first line of input gives the number of cases, T. T test cases follow, each on a separate line. Each test case contains one positive integer n. (1 <= n <= 10^9)OutputFor each i...原创 2019-03-16 23:39:20 · 102 阅读 · 0 评论 -
[POJ - 2100] Graveyard Design(尺取法)
尺取法:不满足条件右端点右移(+),否则左端点右移(-)也可记成 满减少加原创 2019-02-01 15:00:10 · 260 阅读 · 0 评论 -
[HYSBZ - 1734] Aggressive cows 愤怒的牛(二分)
1734: [Usaco2005 feb]Aggressive cows 愤怒的牛DescriptionFarmer John has built a new long barn, with N (2 &amp;amp;amp;amp;lt;= N &amp;amp;amp;amp;lt;= 100,000)stalls. The stalls are located along a straight line at positionsx1,…,xN...原创 2019-02-01 15:38:50 · 317 阅读 · 0 评论 -
[POJ - 3061] Subsequence(尺取法)
[POJ - 3061] Subsequence此题要寻找最小长度的连续子序列和最大值(尺取法)原创 2019-02-01 14:24:21 · 199 阅读 · 0 评论 -
[Gym - 101375H]MaratonIME gets candies(交互+二分)
一个猜数字游戏。非常有趣的交互题目,你猜电脑给的是什么数字,然后电脑回答你他的数(answer)和你的数(guess)的关系。原创 2019-02-01 16:14:43 · 353 阅读 · 0 评论 -
[POJ - 2386] Lake Counting (简单的DFS)
一个鱼塘定义:一个W和它八连通方向(上下左右+四个45度方向)连成的一块W算一个鱼塘。如样例,有三块W,所以是三个鱼塘。比较明显的一个图的搜索,这题我用DFS的做法。原创 2019-02-20 12:47:20 · 283 阅读 · 0 评论 -
[LightOJ - 1282] Leading and Trailing
DescriptionYou are given two integers:nandk, your task is to find the most significant three digits, and least significant three digits ofnk.InputInput starts with an integerT (≤ 1000), den...原创 2019-03-17 10:44:08 · 109 阅读 · 0 评论