1 2 3 4

04 2020 档案

摘要:#include<iostream> #include<Windows.h> #include<winsock.h> #include <assert.h> #include<string> using namespace std; #pragma comment(lib, "ws2_32.lib" 阅读全文
posted @ 2020-04-23 00:34 Lesning 阅读(218) 评论(0) 推荐(0)
摘要:https://ac.nowcoder.com/acm/problem/13611 其实把,把树分成k个连通块有几种分配方法= 从树上取下k-1条边有几种取法,排列组合就行了,,,,,, #include<iostream> #include<algorithm> using namespace s 阅读全文
posted @ 2020-04-12 18:12 Lesning 阅读(145) 评论(0) 推荐(0)
摘要:https://ac.nowcoder.com/acm/contest/5086/C 其实不难,让a堵在c到1的毕竟之路上就好了,需要注意,若是a和c同时到1号点就是no,同时到其他点就是yes。。。。坑了好久我的妈呀 代码公式含义:len a到c 1的必经路的长度,假设到x点 ans b到c加上c 阅读全文
posted @ 2020-04-07 21:56 Lesning 阅读(160) 评论(0) 推荐(0)
摘要:https://ac.nowcoder.com/acm/problem/13249 #include<iostream> #include<cstring> #include<cstdio> #include<algorithm> #include<vector> using namespace s 阅读全文
posted @ 2020-04-07 18:58 Lesning 阅读(157) 评论(0) 推荐(0)
摘要:https://ac.nowcoder.com/acm/contest/4912/A 过这个题有个前提,需要知道删除哪条边 必须是直径上的边 为什么? 如果不删直径上的边答案就不可能减少了,建议多画画试一下 抓住直径两端s和t开始树形DP, 具体看代码吧 #include<iostream> #in 阅读全文
posted @ 2020-04-04 23:20 Lesning 阅读(193) 评论(0) 推荐(0)
摘要:如下图 #include<iostream> #include<cstring> #include<algorithm> #include<cstdio> using namespace std; int dp[1010][1010]; char list[1010]; char ans[1010] 阅读全文
posted @ 2020-04-04 18:11 Lesning 阅读(116) 评论(0) 推荐(0)