• 2023-10-06[ABC322G] Two Kinds of Base
    第一次赛后马上AKABC,好激动,感觉是这场太水了,一看评分,G有2800?!感觉这个Trick挺有用的:某些变量真正能取到的值其实远远没有给的范围那么大,除了某些特殊情况,而这些特殊情况可以用特殊的方式统计答案。题意对于一个非负整数序列\(S=(S_1,S_2,\dots,S_k)\)和一个整数\(a\),定义
  • 2023-10-05[ABC322G] Two Kinds of Base
    [ABC322G]TwoKindsofBase感觉很难入手的样子。凭借感觉认为合法的\((a,b)\)很少,先把\(k=2\)另外算,然后注意到\(S_1>0\),则\(f(S,a)-f(S,b)\gea^2-b^2=2(a-b)b+(a-b)^2\)。又注意到\(a-b\)必是\(X\)的约数,由此\(a-b\leX\)。那么根据经典的调和级
  • 2023-09-30《AT_abc322_g Two Kinds of Base》解题报告
    好题,考场上想到做法了,没写出来,被薄纱了,记录一下。主要是做的比较顺一下就想到了。我们先转换一下\(f\)函数\(f(S,a,b)=\sum\limits_{i=1}^kS_i\times(a^{k-i}-b^{k-i})\)我们可以发现对于位数\(>2\)的,一定满足\(a\le\frac{(x+1)}2\),因为如果不是的话\(a^2-(a-1)^2=
  • 2023-06-07go语言使用GRPC流处理模式
    go语言使用GRPC流处理模式标签(空格分隔):go,grpcproto文件syntax="proto3";packagefour_kinds_method.v1;optiongo_package="go-example/grpc/four_kinds_method/proto;four_kinds_method_pb";//gRPC允许您定义四种服务方法//1.一元RPC,其中客户端向服务器发送单
  • 2023-05-30leetcode 575. Distribute Candies
    Givenanintegerarraywithevenlength,wheredifferentnumbersinthisarrayrepresentdifferentkindsofcandies.Eachnumbermeansonecandyofthecorrespondingkind.Youneedtodistributethesecandiesequallyinnumbertobrotherandsister.Retur
  • 2022-12-16ctags: Unknown option: --kinds-c
    在本地搭建Bootlinelixir查阅内核代码的时候,每当执行到 python3update.py 这一步骤的时候,终端上总会报“ctags:Unknownoption:--kinds-c”这个warning,执行完成以
  • 2022-12-14LeetCode-Java-575. Distribute Candies
    题目Givenanintegerarraywithevenlength,wheredifferentnumbersinthisarrayrepresentdifferentkindsofcandies.Eachnumbermeansonecandyofthecorr