自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(20)
  • 收藏
  • 关注

原创 乐团派对

乐团派对 传送门题目描述音乐是带给大家快乐的存在,而你的目标就是组建若干支乐队,让世界听到你们的演奏!你目前有n位乐手,每位乐手只能进入一个乐队,但并不是每位乐手都能担大任,因此需要团队合作。第i位乐手的能力值为a[i],表示该位乐手所在乐队的人数必须大于等于a[i]。在保证每位乐手都被分进一个乐队的情况下,乐队数量最多可以是多少?输入描述:第一行一个正整数n,表示乐手人数,n≤105第二行nn个正整数a[i]a[i],表示每位乐手的能力值,a[i]≤109输出描述:输出最多.

2020-08-23 14:57:23 169

原创 兔子的名字

原题传送门题目描述兔子发现序列的名字都是数字,实在太无聊了,于是兔子开始研究兔子的名字。现在兔子手上有 n 个名字 Ti 和 m 个可爱词汇Sj,兔子对每一个名字 Ti 定义了一个可爱度,如果 Ti 中出现了一个可爱的单词 Sj,那么 Ti 就有 1 点可爱值,最后的总可爱值就是 Ti 的可爱度,这里的出现指 Sj 是 Ti 的子序列。例如 abc 是 aebdc 的子序列,abc 也是 abcd 的子序列。现在兔子想知道每一个名字的可爱度。输入描述:第 1 行两个整数 n 和 m,表示.

2020-08-18 21:47:05 221

原创 Milking Time(POJ-3616)

POJ - 3616 传送门DescriptionBessie is such a hard-working cow. In fact, she is so focused on maximizing her productivity that she decides to schedule her next N (1 ≤ N ≤ 1,000,000) hours (conveniently labeled 0…N-1) so that she produces as much milk as p.

2020-08-18 16:31:08 173

原创 Codeforces Global Round 10

A - Omkar and PasswordLord Omkar has permitted you to enter the Holy Church of Omkar! To test your worthiness, Omkar gives you a password which you must interpret!A password is an array a of n positive integers. You apply the following operation to the

2020-08-17 01:47:32 430

原创 传球游戏

原题传送门问题描述上体育课的时候,小蛮的老师经常带着同学们一起做游戏。这次,老师带着同学们一起做传球游戏。游戏规则是这样的:n个同学站成一个圆圈,其中的一个同学手里拿着一个球,当老师吹哨子时开始传球,每个同学可以把球传给自己左右的两个同学中的一个(左右任意),当老师再次吹哨子时,传球停止,此时,拿着球没传出去的那个同学就是败者,要给大家表演一个节目。聪明的小蛮提出一个有趣的问题:有多少种不同的传球方法可以使得从小蛮手里开始传的球,传了m次以后,又回到小蛮手里。两种传球的方法被视作不同的方法,当.

2020-08-16 22:17:39 1655

原创 Apple Catching(POJ-2385)

POJ - 2385 传送门DescriptionIt is a little known fact that cows love apples. Farmer John has two apple trees (which are conveniently numbered 1 and 2) in his field, each full of apples. Bessie cannot reach the apples when they are on the tree, so she mus.

2020-08-16 01:26:25 105

原创 Cow Bowling(POJ-3176)

POJ - 3176 传送门DescriptionThe cows don’t use actual bowling balls when they go bowling. They each take a number (in the range 0…99), though, and line up in a standard bowling-pin-like triangle like this:  7 3  8 8 &nbs.

2020-08-13 17:31:21 96

原创 石子合并

原题传送门题目描述设有N堆沙子排成一排,其编号为1,2,3 ,N1,2,3,…,N(N≤300)。每堆沙子有一定的数量,可以用一个整数来描述,现在要将这N堆沙子合并成为一堆,每次只能合并相邻的两堆,合并的代价为这两堆沙子的数量之和,合并后与这两堆沙子相邻的沙子将和新堆相邻,合并时由于选择的顺序不同,合并的总代价也不相同,如有4堆沙子分别为 1 3 5 2 我们可以先合并1、2堆,代价为4,得到4 5 2 又合并 1,2堆,代价为9,得到9 2 ,再合并得到11,总代价为4+9+11=24,如果第二.

2020-08-12 17:40:06 118

原创 CSL分苹果

题目传送门题目描述CSL手上有n个苹果,第i个苹果的质量是wi,现在他想把这些苹果分给他的好朋友wavator和tokitsukaze。但是CSL为了不让他们打架,根据质量决定尽量地均分成两堆分给他们。现在CSL想知道到底给每个人分多少质量的苹果。注意:苹果不能劈开来,并且如果不能正好均分,tokitsukaze小姐姐会拿到重的那一堆。输入描述:第一行输入一个整数n(2 ≤ n ≤ 100),第二行n个整数,表示每个苹果的质量wi(1 ≤ wi ≤ 100)。输出描述:输出两个整.

2020-08-12 17:04:09 287

原创 Codeforces Round #663 (Div. 2)

Codeforces Round #663 (Div. 2) 传送门A - SuborraysDescriptionA permutation of length n is an array consisting of n distinct integers from 1 to n in arbitrary order. For example, [2,3,1,5,4] is a permutation, but [1,2,2] is not a permutation (2 appears .

2020-08-10 00:42:40 395

原创 Codeforces Round #662 (Div. 2)

Codeforces Round #662 (Div. 2) 传送门B - Applejack and StoragesDescriptionThis year in Equestria was a year of plenty, so Applejack has decided to build some new apple storages. According to the advice of the farm designers, she chose to build two stora.

2020-08-09 11:50:40 186

原创 Codeforces Round #661 (Div. 3)

A - Remove SmallestCode#include<iostream>#include<algorithm>#include<string>#include<vector>using namespace std;int a[100];int main(){ int t; cin>>t; while(t--) { int cnt = 0; int n; cin>>n; for(int

2020-08-06 01:50:43 466

原创 Heavy Transportation(POJ-1797)

POJ - 1797 传送门DescriptionBackgroundHugo Heavy is happy. After the breakdown of the Cargolifter project he can now expand business. But he needs a clever man who tells him whether there really is a way from the place his customer has build his giant s.

2020-08-05 22:27:25 213

原创 Frogger(POJ-2253)

POJ - 2253 传送门DescriptionFreddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitting on another stone. He plans to visit her, but since the water is dirty and full of tourists’ sunscreen, he wants to avoid .

2020-08-05 00:17:46 172

原创 Til the Cows Come Home(POJ-2387)

POJ - 2387 传送门DescriptionBessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the morning milking. Bessie needs her beauty sleep, so she wants to get back as quickly as possible.

2020-08-03 21:02:59 132

原创 畅通工程再续(hdu-1875)

HDU - 1875 传送门Problem Description相信大家都听说一个“百岛湖”的地方吧,百岛湖的居民生活在不同的小岛中,当他们想去其他的小岛时都要通过划小船来实现。现在政府决定大力发展百岛湖,发展首先要解决的问题当然是交通问题,政府决定实现百岛湖的全畅通!经过考察小组RPRush对百岛湖的情况充分了解后,决定在符合条件的小岛间建上桥,所谓符合条件,就是2个小岛之间的距离不能小于10米,也不能大于1000米。当然,为了节省资金,只要求实现任意2个小岛之间有路通即可。其中桥的价格为 1.

2020-08-03 00:15:51 248

原创 Constructing Roads(POJ-2421)

POJ - 2421 传送门DescriptionThere are N villages, which are numbered from 1 to N, and you should build some roads such that every two villages can connect to each other. We say two village A and B are connected, if and only if there is a road between A a.

2020-08-02 16:40:52 169

原创 Fake News

Fake News 传送门题目大意给定一个数字 n,问是否存在 x 满足 x 2 = ∑k=1n\sum_{k=1}^n∑k=1n​ K2输入描述There are multiple test cases. The first line of the input contains an integer T (1 ≤ T ≤ 1e6) indicating the number of test cases.For each test case, the first line contain.

2020-08-01 17:00:33 1878

原创 还是畅通工程(hdu-1233)

HDU - 1233 传送门Problem Description某省调查乡村交通状况,得到的统计表中列出了任意两村庄间的距离。省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可),并要求铺设的公路总长度为最小。请计算最小的公路总长度。Input测试输入包含若干测试用例。每个测试用例的第1行给出村庄数目N ( < 100 );随后的N(N-1)/2行对应村庄间的距离,每行给出一对正整数,分别是两个村庄的编号,以及此两.

2020-08-01 11:59:08 188

原创 Networking(POJ-1287)

POJ - 1287 传送门DescriptionYou are assigned to design network connections between certain points in a wide area. You are given a set of points in the area, and a set of possible routes for the cables that may connect pairs of points. For each possible r.

2020-08-01 00:54:42 164

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除