加载中...

摘要: int getmin(int l,int r){ int res=l; for (int i = l; i <= r; i ++ ){ if(w[res]>w[i]){ res=i; } } return res; } void dfs(int l,int r,int d){ if(l>r){//树 阅读全文
posted @ 2022-07-13 22:07 liang302 阅读(28) 评论(0) 推荐(0)
摘要: 判断是否完全子图 每个点都与其他点有边 n^2 ##峰会https://www.acwing.com/problem/content/4281/ 这道题数据范围非常小,暴力即可。 枚举这一区域的任意两位首脑是否都是朋友。 如果不是,直接输出 Area X needs help.。 否则,枚举其他首脑 阅读全文
posted @ 2022-07-13 21:36 liang302 阅读(254) 评论(0) 推荐(0)