ICode9

精准搜索请尝试: 精确搜索
  • [hdu6757]Hunting Monsters2022-06-05 09:31:48

    关于打怪物的顺序,有经典结论: 优先打$a<b$的怪物,这些怪物按$a$从小到大,其余怪物按$b$从大到小 (证明调整法即可,具体略) 将所有怪物以此法排序,则打怪物的顺序总是从前往后 对于$a<b$的怪物,当确定答案后,总是贪心打一个前缀 同时,显然答案单调不降,因此前缀长度也单调不降 对于$a\ge b$

  • CF 792 F Mages and Monsters 题解2021-11-15 18:02:40

    CF 792 F Mages and Monsters 题解 分享一个和官方题解不一样的做法。 首先对于给定的条件做一些转变: 原条件为:一种咒语在一秒内能打出\(x\)的伤害,消耗\(y\)的法力。 可以转变成:一种咒语,打出1的伤害,需要消耗\(\frac{y}{x}\)的法力,\(\frac{1}{x}\)的时间。 问\(t\)时间内,拥有法力

  • java面向对象之对象数组练习“奥特曼打小怪兽混战”2021-10-11 14:05:51

    import java.util.Arrays; import day10.homework.Aliens; /**  *   * @Description  *   * 随机奥特曼打小怪兽  *   * @author LiuLiRan Email:liuliran1998@Vip.qq.com  * @version 1.0  * @date 2021年10月11日上午8:58:17  *  */ public class Test01 {   

  • CF526F Pudding Monsters2020-10-21 08:01:12

    题目链接 题意分析 我们把所有的坐标按照行进行排序 然后列就成为了一个排列 把题意进行简单的转化之后就是 求排列中有多少个子串 且该子串排序之后是公差为1的等差数列 这道题其实真的很锻炼思维 首先 对于一个字串\([L,R]\) 其中的最大值以及最小值为\(Max,Min\) 那么显而易见

  • golang中的map2020-02-22 13:07:04

    二话不说,撸码吧 package main import ( "fmt" ) /** * @Description:golang中的map * @Author: guai * @Date:2020/2/22 11:28 **/ func main() { //1、map //map是key-value数据结构,又称为字段或者关联数组,类似其他语言中的集合 //1.1、map的声明 //var map变

  • CF792F Mages and Monsters2020-02-20 17:03:19

    Link 显然有用的马猴根据\(cps-dps\)构成了一个下凸包。 对于一个\(time,hp\)的怪,二分找到凸包上\(dps=\frac{hp}{time}\)所在直线,判断是否满足\(time*cps\le mp\)即可。 #include<set> #include<cmath> #include<cstdio> #include<cctype> using i64=long long; namespace IO {

  • Educational Codeforces Round 74 (Rated for Div. 2) B. Kill 'Em All2019-10-16 15:57:38

    链接: https://codeforces.com/contest/1238/problem/B 题意: Ivan plays an old action game called Heretic. He's stuck on one of the final levels of this game, so he needs some help with killing the monsters. The main part of the level is a large corridor (s

  • Fight Against Monsters (2018-2019 ACM-ICPC, China Multi-Provincial Collegiate Programming Contest)(T2019-08-31 18:56:29

    It is my great honour to introduce myself to you here. My name is Aloysius Benjy Cobweb Dartagnan Egbert Felix Gaspar Humbert Ignatius Jayden Kasper Leroy Maximilian. As a storyteller, today I decide to tell you and others a story about the hero Huriyyah,

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有