10 2020 档案

摘要:题目:http://codeforces.com/contest/1435/problem/D 要是当时看看这个D题就好了,血亏 简单的用栈模拟即可 #include<bits/stdc++.h> using namespace std; typedef long long ll; #define 阅读全文
posted @ 2020-10-26 20:03 Railgun000 阅读(168) 评论(0) 推荐(0)
摘要:题目:http://codeforces.com/contest/1418/problem/A 设需要a次1操作,则等式为 1+a*(x-1)=tot=k+k*y, a次1操作得到足够的s,再进行k次2操作,所以答案是a+k 化简为: 这里需要用到向上取整公式 #include<bits/stdc+ 阅读全文
posted @ 2020-10-14 19:22 Railgun000 阅读(109) 评论(0) 推荐(0)
摘要:题目:http://codeforces.com/contest/1419/problem/D2 本来写的是easy version的代码,交hard version竟然能过 #include<bits/stdc++.h> using namespace std; typedef long long 阅读全文
posted @ 2020-10-14 18:17 Railgun000 阅读(133) 评论(0) 推荐(0)
摘要:注意搜到终点就不要搜了,不然会TLE #include<bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i,a,b) for(ll i=a;i<=b;i++) #define per(i,a,b) for(l 阅读全文
posted @ 2020-10-14 16:06 Railgun000 阅读(96) 评论(0) 推荐(0)
摘要:题目:https://ac.nowcoder.com/acm/contest/7818/B 经典TSP问题,推荐看这篇文章:https://www.cnblogs.com/smashfun/p/11432110.html 模版: for (int i = 1; i <= n; i++) dp[1<< 阅读全文
posted @ 2020-10-03 21:21 Railgun000 阅读(146) 评论(0) 推荐(0)
摘要:题目:https://ac.nowcoder.com/acm/contest/7830/B n和m都很少,可以1e4次建图+dij暴力算期望 1 #include<bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 type 阅读全文
posted @ 2020-10-03 20:59 Railgun000 阅读(154) 评论(0) 推荐(0)