Dragon Balls Problem Description Five hundred years later, the number of dragon balls will increase unexpectedly, so it\\\\\\\'s too difficult for Mon
转载 2016-11-23 22:05:00
56阅读
2评论
Dragon of Loowater Time Limit: 1000MS Memory Limit: Unknown 64bit IO Format: %lld & %llu [Submit] [Go Back] [Status] Description Problem C: The Dragon
转载 2017-04-17 14:42:00
66阅读
2评论
Code/* ^....0 ^ .1 ^1^ .. 01 1.^ 1.0 ...
原创 2021-08-10 10:45:53
218阅读
Code/* ^....0 ^ .1 ^1^ .. 01 1.^ 1.0 ^ 1 ^
原创 2022-03-24 13:40:48
100阅读
Code/* ...
转载 2019-07-19 12:58:00
75阅读
2评论
Problem Description Five hundred
转载 2023-04-25 09:15:35
52阅读
package dragon /** * @Author: zhangQi * @Date: 2020-09-20 18:12 */ class Runoob constructor(name:String){ var url: String = "https://deadzq.github.io"
原创 2021-07-08 09:20:13
142阅读
例题1  勇者斗恶龙(The Dragon of Loowater, UVa 11292)你的王国里有一条n个头的恶龙,你希望雇一些骑士把它杀死(即砍掉所有头)。村里有m个骑士可以雇佣,一个能力值为x的骑士可以砍掉恶龙一个直径不超过x的头,且需要支付x个金币。如何雇佣骑士才能砍掉恶龙的所有头,且需要支付的金币最少?注意,一个骑士只能砍一个头(且不能被雇佣
原创 2022-08-05 16:41:21
48阅读
下载地址:点击下载
原创 2021-07-20 16:00:22
84阅读
      2008年8月16日的夜晚。      确实男篮的比赛让我激动不已。以下是SINA的在网页显著位置的信息:             要知道这个位置基本是为金牌准备的。男篮确实如他们所说的,见一个拼一
原创 2008-08-16 22:12:00
1104阅读
1评论
Dragon Balls Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4165    Accepted Submission(s): 1603Problem Description Five hundred years later,
转载 2017-08-07 08:26:00
88阅读
2评论
题解:做到一种并查集的新题型,在状态压缩的时候传递祖先的信息,每个根结点都是最多移动一次的,所以记录移动次数把自己的加上父亲结点的就是移动总数了。#include #include const int MAXN=10010; int n,q,count[MAXN],f[MAXN],move[MAXN]; int sf(int x){ if(f[x]==x) return x; int t=f[x]; f[x]=sf(f[x]); move[x]+=move[t]; return f[x]; } void Union(int x,in...
转载 2014-02-15 15:16:00
41阅读
2评论
算法竞赛 入门经典 训练指南 例题1 这题题意不用过多描述,反正也是水题一道,两个排序即可。 1 #include<cstdio> 2 #include<algorithm> 3 #include<cmath> 4 #include<iostream> 5 #include<cstring> 6 #
转载 2017-06-11 14:42:00
47阅读
2评论
UVALive_4977     一个贪心的思路就是我们每次喝水的时间应该尽量靠前,同时时间不能早于之间降水的时间,于是可以用线段树找到区间内第一个满足要求的点即可。 #include<stdio.h> #include<string.h> #include<algorithm> #define MAXD 1000010 #define INF 0x3f3f3
转载 2012-08-26 15:08:00
66阅读
2评论
http://acm.hdu.edu.cn/showproblem.php?pid=3635 1 #include 2 #include 3 #include 4 #define maxn 20000 5 using namespace std; 6 7 int f[maxn]; 8 int...
转载 2014-05-07 18:50:00
54阅读
2评论
Dragon Balls Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 5340 Accepted Submission(s): 2014 P
转载 2016-05-14 11:07:00
42阅读
2评论
题目大意:氪金勇者斗恶龙,有n头恶龙,m个勇者,一个勇者只能斗一头龙,每头恶龙和每个勇者都有能力值,只有勇者的能力值不低于恶龙的能力值时才打得过。问,能否打完全部恶龙,能的话至少需要多少金币,出战的勇者能力值与需要的金币数一致。解题思路:贪心,排序恶龙勇者能力值。从勇者小的往上推,当大于等于恶龙时,金币数增加,恶龙增加,勇者增加,屠龙数增加。最后判断屠龙数是否等于恶龙数。ac代码:#include
原创 2021-12-01 16:09:38
199阅读
​​题目传送门​​//种类并查集,设置一个time数组表示次数//AC代码如下://Created Author: just_sort//Created Time : 1015/1/15 15:51//File Name : Dragon Balls#include<cstdio>#include<cstring>#include<iostream>u
原创 2022-04-20 10:05:30
54阅读
Problem Descriptionf dragon balls will increase unexpectedly, so it's too difficult for Monkey King(WuKong) to gather all of the dragon balls together.
原创 2022-11-09 18:32:20
56阅读
The shores of Rellau Creek in central Loowater had always been a prime
原创 2023-02-24 10:58:35
66阅读
  • 1
  • 2
  • 3
  • 4
  • 5