ICode9

精准搜索请尝试: 精确搜索
  • 875. 爱吃香蕉的珂珂2022-06-07 13:03:10

    /** @author: 施龙青 @description 875. 爱吃香蕉的珂珂 @date: 2022/6/7 1:24 */ public class Main001 { //测试 public static void main(String[] args) { Main001 main001 = new Main001(); int[] a = new int[]{30, 11, 23, 4, 20}; System.out.println(main001.minEa

  • 【leetcode】875. Koko Eating Bananas2022-01-21 01:01:44

    Koko loves to eat bananas. There are n piles of bananas, the ith pile has piles[i] bananas. The guards have gone and will come back in h hours. Koko can decide her bananas-per-hour eating speed of k. Each hour, she chooses some pile of bananas and ea

  • 堆-模板2021-09-05 23:00:29

    之前一直不想写的手写堆。 是大根堆模板,小根堆直接换一下转移的符号就行。 pile[maxn]是存储堆的数组,len是堆中元素的数量。 写法非常简单。 Code void put(int k) { pile[++len]=k; int pla=len; while(pla>1) { int fa=pla/2; if(pile[fa]>=pile[pla]) return; swap(p

  • [ Uva 101 详解 ] the block problem 木块问题2021-09-04 13:33:09

    题目 输入 n 编号 0 ~ n-1 的木块,分别摆放在顺序排列编号为 0 ~ n-1 的位置。,要求模拟以下 4 种操作(下面的 a 和 b 都是木块编号) move a onto b:把 a 和 b 上方的木块全部归位,然后把 a 摞在 b 上面 move a over b:把 a 上方的木块全部归位,然后把 a 放在 b 所在木块堆的顶部 pile a

  • Worms2021-01-04 16:34:12

    474B Worms time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output It is lunch time for Mole. His friend, Marmot, prepared him a nice game for lunch. Marmot brought Mole n ordered piles of worms s

  • LeetCode 875. Koko Eating Bananas2019-11-18 09:00:07

    原题链接在这里:https://leetcode.com/problems/koko-eating-bananas/ 题目: Koko loves to eat bananas.  There are N piles of bananas, the i-th pile has piles[i] bananas.  The guards have gone and will come back in H hours. Koko can decide her bananas-per-

  • Codeforces 388C Fox and Card Game (贪心博弈)2019-10-20 22:00:49

    Codeforces Round #228 (Div. 1) 题目链接:C. Fox and Card Game Fox Ciel is playing a card game with her friend Fox Jiro. There are n piles of cards on the table. And there is a positive integer on each card. The players take turns and Ciel takes the first turn

  • poj-2234 Matches Game Nim2019-10-10 22:53:00

    Matches Game Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 13264   Accepted: 7712 Description Here is a simple game. In this game, there are several piles of matches and two players. The two player play in turn. In each turn, one

  • 木块问题/The Blocks Problem(Uva 101)2019-08-14 19:02:34

    原题摘录 输入n,得到编号为0~n-1的木块,分别摆放在顺序排列编号为0~n-1的位置。现对这些木块进行操作,操作分为四种。 1、move a onto b:把木块a、b上的木块放回各自的原位,再把a放到b上; 2、move a over b:把a上的木块放回各自的原位,再把a发到含b的堆上; 3、pile a onto b:把b上的木块

  • Codeforces Round #575 (Div. 3) A - Three Piles of Candies2019-07-30 17:54:04

    Codeforces Round #575 (Div. 3)   A - Three Piles of Candies Alice and Bob have received three big piles of candies as a gift. Now they want to divide these candies as fair as possible. To do this, Alice takes one pile of candies, then Bob takes one of the

  • codeforces 1191 D-----轻松题解 --- Tokitsukaze, CSL and Stone Game #573 (Div. 2)2019-07-13 16:07:15

    D. Tokitsukaze, CSL and Stone Game 题目链接:http://codeforces.com/contest/1191/problem/D 1 D. Tokitsukaze, CSL and Stone Game 2 3 time limit per test1 second 4 5 memory limit per test256 megabytes 6 7 inputstandard input 8 9 outputstandard output10 11

  • cf---A. Amusing Joke2019-06-10 11:52:09

    So, the New Year holidays are over. Santa Claus and his colleagues can take a rest and have guests at last. When two “New Year and Christmas Men” meet, thear assistants cut out of cardboard the letters from the guest’s name and the host’s name in h

  • A. A pile of stones2019-05-14 12:54:18

    题目链接 Vasya has a pile, that consists of some number of stones. n times he either took one stone from the pile or added one stone to the pile. The pile was non-empty before each operation of taking one stone from the pile. You are given n operations w

  • CF 599 div2 A - A pile of stones2019-05-13 15:40:21

    题意: 给出n个+ - 操作符  求出结束的最小值(当然 过程中不能减到小于0)    求出遍历完成后的总的变化值  和遍历过程中的最小值  这个值就是最小的初始值(显然 题目可以转化为求最小初始值) #include<bits/stdc++.h>using namespace std;//input by bxd#define rep(i,a,b) for(i

  • 2018 - 2019 CTU Open Contest H. Split Game 【SG函数】2019-04-18 20:02:30

    H. Split Game time limit per test 1.0 s memory limit per test 256 MB input standard input output standard output For a long time, rich clientele of Binary Casino has been requesting a new way to gamble their money. To fulfill their wishes, the

  • POJ 1740 A New Stone Game(博弈)2019-02-22 21:52:28

    A New Stone Game Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 6586   Accepted: 3611 Description Alice and Bob decide to play a new stone game.At the beginning of the game they pick n(1<=n<=10) piles of stones in a line. Al

  • HDU 1176 逆向dp very easy~2019-02-01 16:38:10

    HDU1176 免费馅饼 这好像是我写的第一道kuangbin专题里的题,当时能力不够,只简单理解了一下”塔数“的概念 今天看了别人的题解,才系统地理解了一下 以后有一个小要求,代码一定要标准,代码风格要好一点,最近看别人的题解,发现有的人代码写得不是很好理解,可能他们有自己的思路吧 不知道是不

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

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

ICode9版权所有