随笔分类 -  基础算法-贪心

摘要:1 #include<bits/stdc++.h> 2 #define ll long long 3 using namespace std; 4 ll n,ans; 5 int main() 6 { 7 freopen("star.in","r",stdin); 8 freopen("star.o 阅读全文
posted @ 2021-10-06 18:31 上官书房 阅读(39) 评论(0) 推荐(0)
摘要:1 #include<bits/stdc++.h> 2 #define ll long long 3 using namespace std; 4 inline ll re_ad() { 5 char ch=getchar(); ll x=0,f=1; 6 while(ch<'0' || ch>'9 阅读全文
posted @ 2021-10-05 13:54 上官书房 阅读(41) 评论(0) 推荐(0)
摘要:1 #include<bits/stdc++.h> 2 using namespace std; 3 const int N=2e5+11,M=4e5+11; 4 int n,ans,siz[N]; 5 int to[M],nxt[M],id[M],edge,head[N]; 6 7 inline 阅读全文
posted @ 2021-10-02 14:39 上官书房 阅读(32) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2021-09-12 23:39 上官书房 阅读(31) 评论(0) 推荐(0)
摘要:题目链接:https://www.luogu.com.cn/problem/P4016 1 #include<bits/stdc++.h> 2 using namespace std; 3 const int N=211,M=4011,inf=1<<29; 4 int n,m,st,ed,a[N], 阅读全文
posted @ 2021-08-17 23:21 上官书房 阅读(34) 评论(0) 推荐(0)