• 2024-03-31Hay Bales
    题目描述Thecowsareatitagain!FarmerJohnhascarefullyarrangedN(1<=N<=10,000)pilesofhaybales,eachofthesameheight.Whenheisn'tlooking,however,thecowsmovesomeofthehaybalesbetweenpiles,sotheirheightsarenolong
  • 2023-11-26P1090 [NOIP2004 提高组] 合并果子
    原题链接题解每次从所有果子堆中选重量最小的两堆并累加,观察到只需要找出最小因此考虑用堆代码#include<bits/stdc++.h>usingnamespacestd;intpile[10005]={0};intlen=0;voidin(intx){pile[++len]=x;intnow=len;while(pile[now]<pile[now/2]
  • 2023-11-22P8755 [蓝桥杯 2021 省 AB2] 负载均衡
    原题链接我曾经写题时有个疑惑,那就是会不会算力恢复之后大于最大算力?其实不会,把消耗的算力想象成占领,恢复算力想象成撤离,不管怎么恢复,领地都是那个领地。#include<bits/stdc++.h>usingnamespacestd;intpower[200005]={0};structunit{intwhen,who,recover;//
  • 2023-07-19LeetCode 875. Koko Eating Bananas 二分答案
    Kokolovestoeatbananas.Thereare\(n\)pilesofbananas,the\(i\)thpilehas\(piles[i]\)bananas.Theguardshavegoneandwillcomebackinhhours.Kokocandecideherbananas-per-houreatingspeedofk.Eachhour,shechoosessomepileofb
  • 2023-06-24CF1400E Clear the Multiset
    CF1400ECleartheMultiset一道经典简单的分治由贪心可知,对于一段区间[L,R],一共有两种处理方式1.一个一个减,次数为l-r+12.先区间减,直到最小的减没了,在考虑最小值隔开的两个区间。如果有多个最小值,其实也不影响,再往下分的时候一定会分开。区间答案就是$min(l-r+1,f(l,p-1)+f(
  • 2023-05-24狗堆效应 dog-pile
    防止狗堆效应——问题和解决方案2014年7月30日星期三上午8:56这是PrzemekSobstel的客座转贴,他认为dogpile效应问题没有得到足够的涵盖,尤其是在PHP世界中。原文: 防止dogpile效应。当缓存过期并且网站同时受到大量请求时,就会发生Dogpile效应。根据我在大流量网
  • 2023-02-052558. Take Gifts From the Richest Pile
    packageLeetCode_2558importjava.util.*/***2558.TakeGiftsFromtheRichestPile*https://leetcode.com/problems/take-gifts-from-the-richest-pile/*
  • 2023-01-07[LeetCode] 2202. Maximize the Topmost Element After K Moves
    Youaregivena 0-indexed integerarray nums representingthecontentsofa pile,where nums[0] isthetopmostelementofthepile.Inonemove,youcan
  • 2022-11-25基于springboot财务管理系统设计与实现的源码+文档
     摘要随着信息化时代的到来,管理系统都趋向于智能化、系统化,车辆充电桩管理系统也不例外,但目前国内仍都使用人工管理,市场规模越来越大,同时信息量也越来越庞大,人工管理显然
  • 2022-11-18Codeforces Round #673 (Div. 2) Problem A
    今天的题。本来打算把比赛坚持打完的,但是因为生病了,还是早点睡吧,把第一题摸了。题面如下:BTheroisapowerfulmagician.Hehasgotnpilesofcandies,thei-thpile
  • 2022-11-16个人训练赛反思第一篇
    Atcoder260_D反思先回顾一下怎么想的其实一开始拿到这个题就去$Onenote$画了个草图因为直接照着英文题面思考的话会很困难……不过这也促成了很好的思考。但是这个
  • 2022-10-31D - Yet Another Recursive Function -- ATCODER
    D-YetAnotherRecursiveFunctionhttps://atcoder.jp/contests/abc275/tasks/abc275_d 思路动态规划问题。第一印象使用函数递归调用实现,但刚开始担心会爆栈,因为
  • 2022-10-28pgsql指定部分字段去重
    --基于ig.start_pile,ig.end_pile字段去重witheteas(SELECT*from(SELECTROW_NUMBER()OVER(PARTITIONbyig.start_pile,ig.end_pileORDERBYig.start_pile
  • 2022-09-27875. 爱吃香蕉的珂珂
    875.爱吃香蕉的珂珂珂珂喜欢吃香蕉。这里有n堆香蕉,第i堆中有 piles[i] 根香蕉。警卫已经离开了,将在h小时后回来。珂珂可以决定她吃香蕉的速度k(单位:根/小时
  • 2022-08-27Timus Online Judge 1005. Stone Pile——01背包好题
    题目1005.StonePile@TimusOnlineJudge就是给你一组堆石头,分成两组,叫你求两组重量差的最小值思路这道题解法很巧妙,用01背包来解决dp[i][j]:表示前i个物品里面,花