• 2024-11-14Atcoder Beginner Contest 379 (A-F)
    AtcoderBeginnerContest379(A-F)题目链接A-Cyclic#include<bits/stdc++.h>usingnamespacestd;usingi64=longlong;voidShowball(){chara,b,c;cin>>a>>b>>c;cout<<b<<c<<a<<""<
  • 2024-11-12AtCoder Beginner Contest 378 题解
    AtCoderBeginnerContest378题解比赛链接A-Pairing贪心#include<bits/stdc++.h>usingnamespacestd;usingi64=longlong;voidShowball(){vector<int>a(5);for(inti=0;i<4;i++){intx;cin>>x;a[x]++;
  • 2024-10-22P7072 [CSP-J2020] 直播获奖 对顶堆
    对顶堆动态维护第k大的值。#include<bits/stdc++.h>usingnamespacestd;usingi64=longlong;voidShowball(){intn,w;cin>>n>>w;priority_queue<int,vector<int>,greater<int>>minq;priority_queue<int>ma
  • 2024-10-16AtCoder Beginner Contest 374 (A-E)
    AtCoderBeginnerContest374(A-E)比赛链接A-Takahashisan2#include<bits/stdc++.h>usingnamespacestd;usingi64=longlong;voidShowball(){strings;cin>>s;intn=s.size();cout<<(s.substr(n-3)=="san"
  • 2024-10-11AtCoder Beginner Contest 373 (A-F)
    AtCoderBeginnerContest373(A-F)比赛链接A-September#include<bits/stdc++.h>usingnamespacestd;usingi64=longlong;voidShowball(){intans=0;for(inti=1;i<=12;i++){strings;cin>>s;ans+=((int)s.si
  • 2024-09-24Codeforces Round 974 (Div.3) 题解
    CodeforcesRound974(Div.3)题解A.RobinHelps模拟按照题意模拟即可。voidShowball(){intn,k;cin>>n>>k;intcur=0,ans=0;for(inti=0;i<n;i++){intx;cin>>x;if(x>=k)cur+=x;elseif(!x){if(cur>=1)cu
  • 2024-09-23Codeforces Round 973 (Div.2) A-E题解
    CodeforcesRound973(Div.2)A-E题解比赛传送门A.Zhan'sBlender数学显然答案为\(\lceil\frac{n}{min(x,y)}\rceil\)。#include<bits/stdc++.h>usingnamespacestd;#definefffirst#definesssecond#definepbpush_back#defineall(u)u.begin(),u.en
  • 2024-05-04牛客小白月赛92 题解
    牛客小白月赛92题解A.获得木头签到\((x\times4)/2\times4=x\times8\)#include<bits/stdc++.h>usingnamespacestd;#definefffirst#definesssecond#definepbpush_back#defineall(u)u.begin(),u.end()#defineendl'\n'#definedebug(x
  • 2024-02-082024牛客寒假算法基础集训营1 补题
    2024牛客寒假算法基础集训营1补题A.DFS搜索模拟题意:给你一个字符串\(S\),求出\(S\)中是否存在子序列“DFS“和"dfs"。思路:直接模拟即可参考代码:#include<bits/stdc++.h>usingnamespacestd;#definefffirst#definesssecond#defineebemplace_back#define
  • 2024-01-16Atcoder Beginner Contest 330 题解
    AtCoderBeginnerContest330题解A-CountingPasses签到voidShowball(){intn,l;cin>>n>>l;intcnt=0;for(inti=0;i<n;i++){intx;cin>>x;cnt+=(x>=l);}cout<<cnt<<endl;}B-Minimize