• 2024-11-01abc318_g Typical Path Problem 题解 圆方树
    题目链接:https://atcoder.jp/contests/abc318/tasks/abc318_g题目大意:给出一个有\(n\)个顶点和\(m\)条边的无向连通图\(G\),没有重边和自环。顶点的编号为\(1\simn\),边的编号为\(1\simm\),第\(i\)条边连接顶点\(u_i\)和\(v_i\)。给出图上三个不同的顶点\(A,B,C
  • 2024-02-17AT_abc318_f [ABC318F] Octopus
    首先考虑如何判断当头部位于\(k_0\)时是否可以抓住所有\(n\)个宝物。显然可以排序后贪心将触手与宝藏配对。然后考虑怎样的\(k_0\)作为分界点,即头部位于\(k_0\)满足条件而头部位于\(k_0+1\)不满足条件和头部位于\(k_0\)不满足条件而头部位于\(k_0+1\)满足条件的所
  • 2023-09-24状压DP合集
    目录2023百度之星初赛三-1石碑文[ABC318-]2023百度之星初赛三-1石碑文[ABC318-]
  • 2023-09-05【题解】ABC318
    AtCoder-ABC318AFullMoon暴力枚举判断。提交记录:Submission-AtCoderAtCoder-ABC318BOverlappingSheets暴力枚举判断。提交记录:Submission-AtCoderAtCoder-ABC318CBlueSpring使用通票一定是用在最大的\(kd\)天,排序后枚举\(k\)即可。提交记录:Submission-AtC
  • 2023-09-03ABC318_E
    #include<bits/stdc++.h>usingnamespacestd;#defineintlonglong#defineendl'\n'intn,a[300010],c[300010],t[300010],s;signedmain(){ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);cin>>n;for(intx,i=1;i<=n;i++){
  • 2023-09-03abc318
    A-FullMoonhttps://atcoder.jp/contests/abc318/tasks/abc318_aProblemStatementTakahashilikesfullmoons.Lettodaybeday1.ThefirstdayonoraftertodayonwhichhecanseeafullmoonisdayM.Afterthat,hecanseeafullmooneveryPdays,
  • 2023-09-03AT_abc318_e 题解
    AT_abc318_eSandwiches题解Links洛谷AtCoderDescription给定一个长度为\(n\)的序列\(a\),找到满足以下条件的三元组\((a,b,c)\)的数量。\(i<j<k\);\(a_{i}=a_{k}\);\(a_{i}\neqa_{j}\)。数据范围:\(1\leqn\leq3\times10^{5}\),\(1\leqa_{i}\leqn
  • 2023-09-02ABC318
    T1:FullMoon模拟代码实现n,m,p=map(int,input().split())ans=0i=mwhilei<=n:ans+=1i+=pprint(ans)或者答案是\(\lfloor\frac{n+(p-m)}{p}\rfloor\)T2:Overlappingsheets模拟代码实现#include<bits/stdc++.h>#definerep(i,n)f