• 2024-05-20The three little pigs
    Onadarkandwindynight,I,thebigbadwolf,embarkedonmyhuntforthethreelittlepigs.Followingtheirdistinctscent,Itraversedthedenseforestinsearchoftheirwhereabouts.Eventually,Istumbleduponthefirstpig'sstrawhouseinan
  • 2023-07-08COMP 23T2 shell程序
    COMP(2041|9044)23T2—Assignment1:Pigs1/8Assignment1:Pigsversion:1.3lastupdated:2022-07-04930AimsThisassignmentaimstogiveyoupracticeinShellprogramminggenerallyaclearconcreteunderstandingofGit'scoresemanticsNote:themateria
  • 2023-06-05Sell Pigs 题解
    SellPigs双倍经验题目大意有\(n\)个顾客前来买猪,共有\(m\)个猪圈,每个顾客携带着某一些猪圈的钥匙,需要买一定数量的猪。在顾客买完后,我们可以将打开的猪圈中的猪随意移动,移动完毕后所有的猪圈将关闭,直到下一个顾客到来时才能打开其拥有钥匙对应的猪圈。求最多能卖出多少猪
  • 2023-05-21CF1774F Magician and Pigs【性质】
    有一个空序列,需要维护如下三个操作:1x:在序列中添加\(x\)。2x:把序列中每个元素的值减去\(x\)。3:重复从第一条到本条操作的前一条的所有操作,包括操作\(3\)。当一个数的值\(\leq0\)时,它将被移出序列。求最后有多少个数还在序列中。答案对\(998244353\)取模。\(n\leq
  • 2023-03-081774F1 - Magician and Pigs (Easy Version)
    1774F1-MagicianandPigs(EasyVersion)思路1)3操作其实就是,把原有的猪都减去一个总的sum,然后加上原来自己的值,之后sum会翻倍。也就是sum太大之后,就不变了,因为减去
  • 2023-02-22POJ 1149 PIGS
       https://vjudge.net/problem/POJ-1149 #include<iostream>#include<queue>#include<cstring>#defineIOSstd::ios::sync_with_stdio(0)usingnamespace