• 2024-05-30CF Round946(div3) 题解
    目录946(div3)ABCDEG946(div3)A每个屏幕3X5,可放2个2X2,其余可填7个1X1先算2X2需要多少个屏幕,再算当前屏幕是否可放下所有1X1,根据1X1的量加屏幕.voidfunc(){ inta,b; cin>>a>>b; intans=(b+1)/2; intstp=a-(ans*15-4*b); if(stp>0) ans+=(s
  • 2024-05-29CF ROUND946 (DIV. 3)D:构造
    Ingenuity-2题面翻译你有两个机器人,分别是Rover(R)和Helicopter(H)。它们初始都在同一平面直角坐标系\(xOy\)的\((0,0)\)处。定义北为\(y\)轴正方向,东为\(x\)轴正方向。现有一串由以下四个字符指令组成的指令串\(s\):N向北移动一步,即\((x,y)\to(x,y+1)
  • 2024-05-23CF Round946 (Div. 3)C:map的map<pair<int,int>int>映射 + 性质
    BeautifulTriplePairs题目描述Polycarpwasgivenanarray$a$of$n$integers.Hereallylikestriplesofnumbers,soforeach$j$($1\lej\len-2$)hewrotedownatripleofelements$[a_j,a_{j+1},a_{j+2}]$.Polycarpconsidersapa
  • 2024-05-22CF Round946 (Div. 3)B:如何写映射
    SymmetricEncoding题目描述Polycarphasastring$s$,whichconsistsoflowercaseLatinletters.Heencodesthisstringusingthefollowingalgorithm:first,heconstructsanewauxiliarystring$r$,whichconsistsofalldistinctlettersofthestrin