上一页 1 ··· 5 6 7 8 9 10 11 12 13 14 下一页
摘要: 真就错题重错呗…… 状态压缩的目的是保存状态的详细信息,定义就是把集合转化为整数记录在dp状态中的一类算法。其中有一种典型的题型是“填充网格图形”,在判断合法性的时候用到各种巧妙的位运算,不过好像也没有什么变化,可以积累成套路: 比如Corn Fields就比较基础,发生冲突的区间只有上下左右,用< 阅读全文
posted @ 2022-09-09 18:02 Catherine_leah 阅读(36) 评论(0) 推荐(0)
摘要: 搞了一个小时了,啥进展都没有,不想搞了…… 0 1 2 3 4 5 6 7 8 9 ... 1 3 5 7 9 ... 1 4 7 0 3 6 9 2 5 8 ... 3 7 1 5 9 ... 3 8 ... 4 9 ... 5 0 ... 4 0 6 2 8 ... 9 7 5 3 1 ... 阅读全文
posted @ 2022-09-06 19:38 Catherine_leah 阅读(386) 评论(0) 推荐(2)
摘要: 居然敢嫌弃Cat的文化课不让Cat来参加半集训!?哼这是不可能的Cat哭给你看!…… A. ZZH的游戏 WA 15:emmm想到了二分,然后判断的时候我没有想到让它贪心地走到尽量小的节点,而是让它尽量跳father,我怕它尽量往小跳反而偏离了终点结束不了游戏,跳不了了就让另一棵树后退到最小的儿子( 阅读全文
posted @ 2022-09-05 20:14 Catherine_leah 阅读(60) 评论(0) 推荐(0)
摘要: 都说T1T2是大水题,我鹤完题解之后还感觉奇奇妙妙收获满满,这就是差距吗 A. 谜之阶乘 TLE:要用两个阶乘的差算出n,就是把n用几个连续的数相乘表示出来,这几个连续的数都应该是n的因数,于是可以先把因数找到,再枚举以每个因数作为这几个连续的数相乘的右边界,往前循环的时候判断是否相等和是否连续。 阅读全文
posted @ 2022-09-04 20:14 Catherine_leah 阅读(73) 评论(1) 推荐(1)
摘要: 背景图太花哨了,所以我把它去掉了。 A. 斐波那契 我本来以为算到56就够了,数0数错了就很***,fibo要算到70 一开始还以为编号越大深度越小,然后发现题面上给的图都不满足……(交上去是90分,数据够水的) 就开始找深度,每跳一层查一遍深度TLE70,后来发现往上跳深度直接减1就行了。 #in 阅读全文
posted @ 2022-09-03 19:46 Catherine_leah 阅读(30) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-08-25 10:42 Catherine_leah 阅读(35) 评论(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 阅读(86) 评论(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 阅读(108) 评论(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 阅读(47) 评论(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 阅读(323) 评论(0) 推荐(1)
上一页 1 ··· 5 6 7 8 9 10 11 12 13 14 下一页
/* */