- 2024-11-20AtCoder Beginner Contest 380
AtCoderBeginnerContest380总结A用桶统计\(1\),\(2\),\(3\)出现的次数,判断即可。#include<iostream>#include<cstdio>#include<cstring>#include<algorithm>#include<cmath>#include<vector>#include<queue>#include
- 2024-11-19AtCoder Beginner Contest 352 - VP记录
A-AtCoderLine赛时整活想写异或版本的swap写错了还WA了一发。不过现在会写了:x^=y^=x^=y点击查看代码#include<cstdio>#include<algorithm>usingnamespacestd;intmain(){ intn,x,y,z; scanf("%d%d%d%d",&n,&x,&y,&z); if(x>y)swap(x,y); p
- 2024-11-18Atcoder Beginner Contest 367
老规矩此处略过前三题,不过B值得关注一下。D题 Pedometer思路肥肠煎蛋,只需要搞一个前缀额然后看前面的前缀和是否有跟当前的前缀和同余的情况(%M)暴力求解这步是O(n^2)的,因此需要优化。这里就用到了一个技巧——哈希表消除分支。所谓的哈希表消除分支其实就是mp[pre_s]存一
- 2024-11-17[题解]AtCoder Beginner Contest 380(ABC380) A~F
A-123233照题意统计即可。点击查看代码#include<bits/stdc++.h>usingnamespacestd;strings;map<char,int>ma;signedmain(){ cin>>s; for(chari:s)ma[i]++; if(ma['1']==1&&ma['2']==2&&ma['3']==3)co
- 2024-11-17【未完结】 AtCoder Beginner Contest 380 题解
AtCoderBeginnerContest380Rated:\(770\)A-123233简单模拟B-HurdleParsing字符串模拟C-MoveSegment找到第\(k\)个块的下标,模拟。D-StrangeMirroringE-1DBucketToolF-ExchangeGameG-AnotherShuffleWindow
- 2024-11-17【AtCoder】Beginner Contest 378-E.Mod Sigma Problem
题目链接ProblemStatementYouaregivenasequenceA=(A1
- 2024-11-17【AtCoder】Beginner Contest 378-F.Add One Edge 2
[题目链接](F-AddOneEdge2(atcoder.jp))ProblemStatementYouaregivenatreewithNNNvertices.Thei
- 2024-11-17AtCoder Beginner Contest 380 A - E
link赛时是ABC,D一眼要找规律,跳了,E题思路想了接近半个小时,然后发现假了,最后没调出来,问一下dalao发现其实很简单维护。。。基础线段树没切掉,哎呦不过发现比赛打多了,理解速度和手速都有些提高,幸好前三题秒掉了,要不然rating又会是一坨A-123233B-HurdleParsingC-M
- 2024-11-17AtCoder Beginner Contest 380
省流版A.计数判断即可B.计数统计即可C.模拟即可D.注意到字符串是左右大小写镜像,从长度大往小依次考虑实际所处的位置,维护镜像次数集合E.并查集维护连通性,并尝试与左右俩格子合并即可F.博弈\(dp\),状态数只有\(5e5\),直接记忆化搜索即可G.枚举打乱起始位置,全排列分
- 2024-11-16AtCoder Beginner Contest 380
A-123233题意给个\(6\)位数,判断是否是\(1\)个\(1\),\(2\)个\(2\),\(3\)个\(3\)。思路模拟。代码点击查看代码#include<bits/stdc++.h>usingnamespacestd;#defineintlonglongtypedefpair<int,int>pii;constintmxn=1e6+5;voidsolve(){ s
- 2024-11-15AtCoder Beginner Contest 379
省流版A.模拟即可B.贪心,有\(k\)个就吃,模拟即可C.维护已经有棋子的格子,有多个棋子往右推,代价等差数列求和,模拟即可D.注意到植物高度=当前天-种植天,维护植物的种植天然后二分找对应高度的植物即可E.考虑最终答案每一个数位的值,然后处理进位即可F.单调栈处理建筑\(r\)
- 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-13AtCoder Beginner Contest 353 - VP 记录
Preface这次比赛蛮简单的,就是黄题有点多,少了区分度。而且SigmaProblemAnotherSigmaProblemYetAnotherSigmaProblem是什么奇妙的题目名称?SigmaProblemAnotherSigmaProblemYetAnotherSigmaProblem\(\texttt{\scriptsizeYet\footnotesizeA
- 2024-11-11AtCoder Beginner Contest 356 - VP记录
A-SubsegmentReverse点击查看代码#include<cstdio>#include<numeric>#include<algorithm>usingnamespacestd;constintN=105;intn,a[N],l,r;intmain(){ scanf("%d%d%d",&n,&l,&r); iota(a+1,a+n+1,1); reverse(a+l,
- 2024-11-10AtCoder Beginner Contest 379
这次又是倒在了t5,没救了。ABC379A-Cyclic难度:红#include<bits/stdc++.h>usingnamespacestd;intmain(){chara,b,c;cin>>a>>b>>c;cout<<b<<c<<a<<''<<c<<a<<b;return0;}B-
- 2024-11-09AtCoder Beginner Contest 379
A-Cyclic题意输入\(3\)个连续字符\(a,b,c\),输出另外两种顺序。思路模拟。代码点击查看代码#include<bits/stdc++.h>usingnamespacestd;#defineintlonglongtypedefpair<int,int>pii;constintmxn=1e6+5;voidsolve(){ chara,b,c; cin
- 2024-11-08AtCoder Beginner Contest 358 - VP记录
Preface这次的动规题真的多,起码有三道都是。赛时做完ABCD以后就去攻G去了,可惜犯了煞笔错误搞WA了。赛后补F的时候思路代码啥的都挺顺的(没看题解独立切的蓝题),就是犯了更煞笔的错误,成消愁
- 2024-11-07AtCoder Beginner Contest 378 ——F
https://atcoder.jp/contests/abc378/tasks/abc378_fhttps://atcoder.jp/contests/abc378/editorial/11307#include<bits/stdc++.h>#definexfirst#defineysecond#defineall(x)(x).begin(),(x).end()#definelowbit(x)(x)&-(x)usingnamespacestd;ty
- 2024-11-07paddleSOT beginner
paddleSOTbeginner入门学习一个例子说明什么是动转静示例:在动态图和静态图中的简单计算假设我们有一个简单的神经网络模型,每次输入一个张量x,然后做一些数学运算并输出结果。这个过程使用PaddlePaddle框架中的动转静技术可以分为两个部分来说明。1.动态图实现在动态图模
- 2024-11-06AtCoder Beginner Contest 378
ContestLink还得加练。A&B&C&D不具备任何思维含量。SubmissionASubmissionBSubmissionCSubmissionDE注意到它计算答案的式子,每个子区间和都需要取模,否则就是沙币题了,可以对于每个位置\(O(1)\)地统计答案扫过去然后\(\bmodM\)。常规地,记\(S_i=\sum
- 2024-11-06AtCoder Beginner Contest 360 - VP记录
A-AHealthyBreakfast高桥日常出境。头一次知道getchar()的返回值是int。点击查看代码#include<cstdio>usingnamespacestd;intmain(){ chars[3]={getchar(),getchar(),getchar()}; if(s[0]=='R'&&s[1]=='M')puts("Yes"); els
- 2024-11-05AtCoder Beginner Contest 378 E
https://atcoder.jp/contests/abc378/tasks/abc378_ehttps://atcoder.jp/contests/abc378/editorial/11300#include<bits/stdc++.h>#definexfirst#defineysecond#defineall(x)(x).begin(),(x).end()#definelowbit(x)(x)&-(x)usingnamespacestd;ty
- 2024-11-04AtCoder Beginner Contest 378
AtCoderBeginnerContest378总结A直接模拟,存\(1\)到\(4\)出现个数。#include<iostream>#include<cstdio>#include<cstring>#include<algorithm>#include<cmath>#include<vector>#include<queue>#include<map&g