06 2019 档案
摘要:链接: https://ac.nowcoder.com/acm/contest/924/H 题意: 农夫JOHN准备把他的 N(1 using namespace std; typedef long long LL; const int MAXN = 3e5 + 10; const int MOD
阅读全文
摘要:链接: https://ac.nowcoder.com/acm/contest/924/G 题意: Farmer John has returned to the County Fair so he can attend the special events (concerts, rodeos, c
阅读全文
摘要:链接: https://ac.nowcoder.com/acm/contest/924/F 题意: Farmer John为了满足奶牛对美的享受而安装了人工湖。矩形的人工湖分成M行N列(1 using namespace std; typedef long long LL; const int MA
阅读全文
摘要:链接: https://ac.nowcoder.com/acm/contest/924/D 题意: 求在给定区间[start,end]内所有的亲和数对。 亲和数的定义:对于数对(A,B),如果A的除了自己外的所有约数的和等于B,并且B的所有除了自己外的所有约数的和等于A,那么就称(A,B)为一组亲和
阅读全文
摘要:链接: https://ac.nowcoder.com/acm/contest/924/C 题意: 农民 John 希望修复围绕农场的一小段围栏。他测量了一下,发现需要N (1 using namespace std; typedef long long LL; const int MAXN = 3
阅读全文
摘要:链接: https://ac.nowcoder.com/acm/contest/924/A 题意: Farmer John在网上买干草。他发现了一笔特殊的买卖。他每买一捆大小为A(1 using namespace std; const int maxn = 2e5 + 10; int a[maxn
阅读全文
摘要:链接: https://codeforces.com/contest/1182/problem/C 题意: You are given n words, each of which consists of lowercase alphabet letters. Each word contains
阅读全文
摘要:链接: https://codeforces.com/contest/1182/problem/B 题意: You have a given picture with size w×h. Determine if the given picture has a single "+" shape or
阅读全文
摘要:链接: https://codeforces.com/contest/1182/problem/A 题意: You have a given integer n. Find the number of ways to fill all 3×n tiles with the shape describ
阅读全文
摘要:链接: https://codeforces.com/contest/1176/problem/C 题意: You are given an array a consisting of n integers. Each ai is one of the six following numbers:
阅读全文
摘要:链接: https://codeforces.com/contest/1176/problem/B 题意: You are given an array a consisting of n integers a1,a2,…,an. In one operation you can choose tw
阅读全文
摘要:链接: https://codeforces.com/contest/1176/problem/A 题意: You are given an integer n. You can perform any of the following operations with this number an
阅读全文
摘要:链接: https://ac.nowcoder.com/acm/contest/918/A 题意: 为了准备即将到来的蹄球锦标赛,Farmer John正在训练他的N头奶牛(方便起见,编号为1…N,其中1≤N≤100)进行传球。这些奶牛在牛棚一侧沿直线排列,第i号奶牛位于距离牛棚xi的地方(1≤xi
阅读全文
摘要:链接: https://ac.nowcoder.com/acm/contest/918/J 题意: 在Farmer John最喜欢的节日里,他想要给他的朋友们赠送一些礼物。由于他并不擅长包装礼物,他想要获得他的奶牛们的帮助。你可能能够想到,奶牛们本身也不是很擅长包装礼物,而Farmer John即将
阅读全文
摘要:链接: https://ac.nowcoder.com/acm/contest/918/I 题意: 一场别开生面的牛吃草大会就要在Farmer John的农场举办了! 世界各地的奶牛将会到达当地的机场,前来参会并且吃草。具体地说,有N头奶牛到达了机场(1≤N≤10^5),其中奶牛i在时间ti(0≤t
阅读全文
摘要:链接: https://ac.nowcoder.com/acm/contest/918/G 题意: Bessie and her friends are playing hoofball in the annual Superbull championship, and Farmer John is
阅读全文
摘要:链接: https://ac.nowcoder.com/acm/contest/918/D 题意: Bessie the cow is helping Farmer John run the USA Cow Olympiad (USACO), an on line contest where par
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/918/B 题意: Farmer John最讨厌的农活是运输牛粪。为了精简这个过程,他制造了一个伟大的发明:便便传送门!与使用拖拉机拖着装满牛粪的大车从一个地点到另一个地点相比,他可以使用便便传送门将牛粪从一个地点瞬间传送
阅读全文
摘要:题意: Test 思路: Test 代码: c++ include using namespace std; int main() { cout
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/912/M 题意: Daenerys Stormborn, 风暴中出生的丹尼莉丝,the Unburnt, 烧不死的,Queen of Meereen, 弥林女王,Queen of the Andals and the R
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/912/L 题意: 作为大珩班尖子生,小r每天有很多作业要完成,例如工图、工图和工图。 很显然,做作业是要有顺序的。作业之间存在依赖关系,某一个作业没做完,就不能开始做另一个作业。例如,汇编作业依赖于C语言作业,因为小r可
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/912/J 题意: 小r为了打校赛,他打算去打字社打印一份包含世界上所有算法的模板。 到了打字社,小r一看价格:总打印页数X0X0页以下(不含X0X0)x0x0元每页,X0∼X1X0∼X1页(不含X1X1)x1x1元每页,
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/912/I 题意: Fate Grand Order是型月社发行的角色扮演类手机游戏,是著名的氪金抽卡"垃圾"手游。 小t是该手游的忠实厨力玩家,为了抽到喜欢的角色他特地氪金买了n颗圣晶石(3颗圣晶石可以抽卡1次)。 已知
阅读全文
摘要:题意: 数竞选手小r最喜欢做的题型是数列大题,并且每一道都能得到满分。 你可能不相信,但其实他发现了一个结论:只要是数列,无论是给了通项还是给了递推式,无论定义多复杂,都可以被搞成等差数列。这样,只要他精通了等差数列,他就能做出任何数列题目。 等差数列是数列的一种。在等差数列中,任何相邻两项的差相等
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/912/F 题意: 动态规划(Dynamic programming,简称dp)是一种通过把原问题分解为相对简单的子问题的方式求解复杂问题的方法。例如,假设小x一步能爬1层或2层台阶,求小x爬n层台阶共有几种方法,就可以用
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/912/B 题意: 链接:https://ac.nowcoder.com/acm/contest/912/B来源:牛客网 CUST的队员打完省赛后,小r带着大家去打保龄球。 保龄球是一项难度非常高的游戏,然而这根本难不住校
阅读全文
摘要:链接:https://codeforces.com/contest/1173/problem/C 题意: Nauuo is a girl who loves playing cards. One day she was playing cards but found that the cards w
阅读全文
摘要:链接:https://codeforces.com/contest/1173/problem/B 题意: Nauuo is a girl who loves playing chess. One day she invented a game by herself which needs nn ch
阅读全文
摘要:链接:https://codeforces.com/contest/1173/problem/A 题意: Nauuo is a girl who loves writing comments. One day, she posted a comment on Codeforces, wonderin
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/904/B 题意: DongDong每年过春节都要回到老家探亲,然而DongDong记性并不好,没法想起谁是谁的亲戚(定义:若A和B是亲戚,B和C是亲戚,那么A和C也是亲戚),她只好求助于会编程的你了。 思路: 并查集模板
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/904/A 题意: DongDong是一个喜欢密码学的女孩子,她养的萨摩耶叼着一张带着加密信息的纸条交给了她,如果她不能破解这张密码,萨摩耶是不会高兴的。 给定n,m,给出长度为n的01串,每次向后移动一位,移动m-1次,
阅读全文
摘要:链接:https://codeforces.com/contest/1175/problem/B 题意: You are given a function ff written in some basic language. The function accepts an integer value
阅读全文
摘要:链接:https://codeforces.com/contest/1175/problem/A 题意: You are given an integer nn and an integer kk. In one step you can do one of the following moves:
阅读全文
摘要:链接:https://codeforces.com/contest/1174/problem/C 题意: You're given an integer nn. For every integer ii from 22 to nn, assign a positive integer aiai su
阅读全文
摘要:链接:https://codeforces.com/contest/1174/problem/B 题意: You're given an array aa of length nn. You can perform the following operation on it as many time
阅读全文
摘要:链接:https://codeforces.com/contest/1174/problem/A 题意: You're given an array aa of length 2n2n. Is it possible to reorder it in such way so that the sum
阅读全文
摘要:链接:https://vjudge.net/problem/HDU-3966 题意: Our protagonist is the handsome human prince Aragorn comes from The Lord of the Rings. One day Aragorn find
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/908/I 题意: Baby bear and his good friends are very fond of mushrooms. On this day, they go to 402 mushroom field
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/908/G 题意: A palindrome is a symmetrical string, that is, a string read identically from left to right as well a
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/908/F 题意: AFei has many cards. Each card has a number written on it. Now he wants to takes some out of his card
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/908/C 题意: Luffy once saw a particularly delicious food, but he didn't have the money, so he asked Nami for mone
阅读全文