上一页 1 ··· 4 5 6 7 8 9 10 11 12 13 下一页
摘要: 都说T1T2是大水题,我鹤完题解之后还感觉奇奇妙妙收获满满,这就是差距吗 A. 谜之阶乘 TLE:要用两个阶乘的差算出n,就是把n用几个连续的数相乘表示出来,这几个连续的数都应该是n的因数,于是可以先把因数找到,再枚举以每个因数作为这几个连续的数相乘的右边界,往前循环的时候判断是否相等和是否连续。 阅读全文
posted @ 2022-09-04 20:14 Catherine_leah 阅读(62) 评论(1) 推荐(1) 编辑
摘要: 背景图太花哨了,所以我把它去掉了。 A. 斐波那契 我本来以为算到56就够了,数0数错了就很***,fibo要算到70 一开始还以为编号越大深度越小,然后发现题面上给的图都不满足……(交上去是90分,数据够水的) 就开始找深度,每跳一层查一遍深度TLE70,后来发现往上跳深度直接减1就行了。 #in 阅读全文
posted @ 2022-09-03 19:46 Catherine_leah 阅读(19) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2022-08-25 10:42 Catherine_leah 阅读(28) 评论(0) 推荐(0) 编辑
摘要: A. T1 出了个大阴间题 40分的dfs: #include <bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 25; const ll mod = 1e9 + 7; int n, b[maxn] 阅读全文
posted @ 2022-08-22 22:31 Catherine_leah 阅读(66) 评论(0) 推荐(1) 编辑
摘要: A. One 用vector把out的及时删掉,然后就可以直接加位置了,STL真好用,不过它T了…… #include <bits/stdc++.h> using namespace std; int T, n; vector<int> a; inline int read() { int x = 阅读全文
posted @ 2022-08-21 15:02 Catherine_leah 阅读(98) 评论(3) 推荐(2) 编辑
摘要: 问题 A: 【2022暑期集训8月20日】隔离 差点因为check传参传入了int而以为自己二分又写错了…… #include <bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 1e5 + 10; 阅读全文
posted @ 2022-08-20 16:33 Catherine_leah 阅读(34) 评论(0) 推荐(1) 编辑
摘要: A. 菜 暴力做法:2^n枚举哪些人是正向上菜的,然后记录答案。 #include <bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 20; const int N = 1e6 + 2; const 阅读全文
posted @ 2022-08-19 22:29 Catherine_leah 阅读(314) 评论(0) 推荐(1) 编辑
摘要: B. mine 看到题面一头雾水,看到文字版题解一头雾水,看到代码……感觉很显然确实没啥好写的…… #include <bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 1e6 + 10; const 阅读全文
posted @ 2022-08-19 10:58 Catherine_leah 阅读(102) 评论(0) 推荐(0) 编辑
摘要: A. 接力比赛 TLE:把能力值看成一个背包,为了恰好把背包装满,我还拿了另外两个数组判断能不能恰好装满,TLE 40,但其实这个判断是没用的,初始化负无穷不能装满的根本不可能作为一个比较优的解来更新答案,把它删了就是TLE 70…… 但还是会TLE,因为每次都从最大的循环太多余了,从前缀和开始就好 阅读全文
posted @ 2022-08-18 21:25 Catherine_leah 阅读(40) 评论(0) 推荐(1) 编辑
摘要: A. 赤 我本来想考虑一下当a=n或b=n的情况,就以另一个变量作为关键字排序,如果a=n就选喜欢吃豆干可能性大的前b个两种食物全给,后面的只给干脆面,结果还交了个0分…… 鉴于这道题的正解既涉及期望,又需要什么wqs二分还套两层,还是来日方长吧…… Cat只有被捕捉的份还不够去捕捉别的猫…… B. 阅读全文
posted @ 2022-08-17 19:45 Catherine_leah 阅读(12) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 13 下一页
/* */