网站首页
编程语言
数据库
系统相关
其他分享
编程问答
GOOSE
2024-06-01
Goose Goose Duck(第八届河北省大学生程序设计竞赛)
#include<bits/stdc++.h>#defineendl'\n'usingll=longlong;typedefunsignedlonglongull;usingnamespacestd;voidGordenGhost();structsb{inta,b,c;};signedmain(){#ifdefGordenfreopen("in.txt","r
2024-05-28
题解/算法 {C. Goose Goose Duck}
题解/算法{C.GooseGooseDuck}@LINK:https://codeforces.com/gym/105184;令A[N]表示这N个人的区间;比如答案是[a,b,c,d]那么他一定满足:A[a].lef<=0<=A[a].rig,A[b].lef<=1<=A[b].rig,A[c].lef<=2<=A[c].rig,…贪心;对于最开头的人来说,令集合S: