![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
基础题
ischanx
GDUT本科毕业,前端
展开
-
[Codeforces 948A] Protect Sheep (DFS)
题目传送门:点击传送Time limit per test:1 secondMemory limit per test:256 megabytesDescriptionBob is a farmer. He has a large pasture with many sheep. Recently, he has lost some of them due to wolf at...原创 2019-02-20 14:56:25 · 255 阅读 · 0 评论 -
[HDU - 4548] 美素数
Description小明对数的研究比较热爱,一谈到数,脑子里就涌现出好多数的问题,今天,小明想考考你对素数的认识。问题是这样的:一个十进制数,如果是素数,而且它的各位数字和也是素数,则称之为“美素数”,如29,本身是素数,而且2+9 =11也是素数,所以它是美素数。给定一个区间,你能计算出这个区间内有多少个美素数吗?Input第一行输入一个正整数T,表示总共有T组数据(T &l...原创 2019-03-16 23:46:57 · 129 阅读 · 0 评论 -
[USACO18OPEN] Lemonade Line
DescriptionIt's a hot summer day out on the farm, and Farmer John is serving lemonade to hisNcows! AllNcows (conveniently numbered1…N) like lemonade, but some of them like it more than others. ...原创 2019-03-16 23:13:44 · 247 阅读 · 0 评论 -
[USACO18OPEN] Out of Sorts S
DescriptionKeeping an eye on long term career possibilities beyond the farm, Bessie the cow has started learning algorithms from various on-line coding websites.Her favorite algorithm thus far is ...原创 2019-03-16 22:54:03 · 122 阅读 · 0 评论 -
Teleportation
DescriptionOne of the farming chores Farmer John dislikes the most is hauling around lots of cow manure. In order to streamline this process, he comes up with a brilliant invention: the manure telep...原创 2019-03-16 22:45:46 · 150 阅读 · 0 评论 -
[USACO18FEB] Rest Stops(贪心)
DescriptionFarmer John and his personal trainer Bessie are hiking up Mount Vancowver. For their purposes (and yours), the mountain can be represented as a long straight trail of lengthLmeters (1≤L...原创 2019-03-16 22:34:33 · 340 阅读 · 0 评论 -
[USACO18DEC] Mixing Milk (模拟)
解析题意:有三只桶,读入桶的容量和初始牛奶量。然后他将桶1的牛奶倒入桶2,然后将桶2中的牛奶倒入桶3,然后将桶3中的牛奶倒入桶1,然后再将桶1的牛奶倒入桶2,如此周期性地操作,共计进行100次。最后输出三个桶的牛奶量。每次保证直到前一个桶被倒空或是后一个桶被倒满。思路:模拟倒牛奶过程就好了原创 2019-03-14 13:04:27 · 772 阅读 · 0 评论 -
[USACO18DEC] The Bucket List
洛谷传送:点击传送(中文题面)题意:有N头奶牛,每头奶牛产奶开始时间si,结束时间ti,需要桶bi,求最少需要多少只桶能满足所有奶牛需求。看数据可知道时间最多为1000,所以可以直接按每一刻时间来分析。思路:枚举每一个时间需要的桶,寻找最大值即为答案。#include<iostream>#include<cstdio>#include<cst...原创 2019-03-14 12:21:47 · 480 阅读 · 0 评论 -
[Codeforces 115B] Lawnmower
题目传送门:点击传送Time limit per test:2 secondsMemory limit per test:256 megabytesDescriptionYou have a garden consisting entirely of grass and weeds. Your garden is described by ann × mgrid, with...原创 2019-03-02 12:01:53 · 250 阅读 · 1 评论 -
[Codeforces 1015E1] Stars Drawing (Easy Edition)
题目传送门:点击传送Time limit per test:3 secondsMemory limit per test:256 megabytesDescriptionAstaris a figure of the following type: an asterisk character '*' in the center of the figure and four ...原创 2019-03-01 22:16:52 · 392 阅读 · 0 评论 -
[POJ - 2100] Graveyard Design(尺取法)
尺取法:不满足条件右端点右移(+),否则左端点右移(-)也可记成 满减少加原创 2019-02-01 15:00:10 · 231 阅读 · 0 评论 -
[POJ - 3061] Subsequence(尺取法)
[POJ - 3061] Subsequence此题要寻找最小长度的连续子序列和最大值(尺取法)原创 2019-02-01 14:24:21 · 189 阅读 · 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 · 296 阅读 · 0 评论 -
[Gym - 101375H]MaratonIME gets candies(交互+二分)
一个猜数字游戏。非常有趣的交互题目,你猜电脑给的是什么数字,然后电脑回答你他的数(answer)和你的数(guess)的关系。原创 2019-02-01 16:14:43 · 339 阅读 · 0 评论 -
[POJ - 2386] Lake Counting (简单的DFS)
一个鱼塘定义:一个W和它八连通方向(上下左右+四个45度方向)连成的一块W算一个鱼塘。如样例,有三块W,所以是三个鱼塘。比较明显的一个图的搜索,这题我用DFS的做法。原创 2019-02-20 12:47:20 · 257 阅读 · 0 评论 -
[POJ - 1979] Red and Black(DFS)
题意:从'@'开始走能到达多少个'.',注意'#'是障碍,被它围起来的'.'是走不了的。原创 2019-02-20 14:23:59 · 170 阅读 · 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 · 180 阅读 · 0 评论