摘要: 题目链接 https://atcoder.jp/contests/abc453/tasks/abc453_c code #include<iostream> #include<cassert> using namespace std; #define int long long int N,L[20 阅读全文
posted @ 2026-04-11 22:43 Time_q 阅读(23) 评论(0) 推荐(0)
摘要: 题目 https://ac.nowcoder.com/acm/contest/130843/F code #include<bits/stdc++.h> using namespace std; //"O campeão tem nome, e se chama Charles Oliveira!" 阅读全文
posted @ 2026-04-10 23:17 Time_q 阅读(13) 评论(0) 推荐(0)
摘要: 关于这个小项目 原来的目的就是给自己写一个便于管理任务的小工具,原本的打算是在黑框框的终端里运行的,后面发现自己好像安好了Qt的环境,并且之前玩过一段时间的Qtcrearter,于是有想法给这个项目加一个ui界面 开始的ui界面是这样的 由于找不到最开始的完整的界面了所以放了一个类似的一个功能的界面 阅读全文
posted @ 2026-04-08 00:03 Time_q 阅读(16) 评论(0) 推荐(0)
摘要: code #include<bits/stdc++.h> using namespace std; //"O campeão tem nome, e se chama Charles Oliveira!" #define int long long #define endl '\n' #define 阅读全文
posted @ 2026-04-06 10:29 Time_q 阅读(23) 评论(0) 推荐(0)
摘要: code (https://codeforces.com/contest/2210/problem/C1) #include<bits/stdc++.h> using namespace std; //"O campeão tem nome, e se chama Charles Oliveira! 阅读全文
posted @ 2026-04-05 21:31 Time_q 阅读(22) 评论(0) 推荐(0)
摘要: 简单博弈 有一堆的石头:每次最多就取k个石头,两个人都有冠军之心,问谁最后可以胜利 当石头的数量是k+1的倍数的时候,后手的肯定胜利,因为不管先手取m{1,k},后手就取{k+1-m}保证最后还是k+1的整数倍数 反之,就是先手必胜 本题代码 (https://codeforces.com/prob 阅读全文
posted @ 2026-04-02 22:29 Time_q 阅读(16) 评论(0) 推荐(0)
摘要: 经典状态压缩DP 简单介绍这种DP 利用位运算,将一个集合的状态压缩成一个整数来表示,并以此作为 DP 的状态维度。 例子1: 在普通的 DP 中,我们的状态可能是 dp[i][j] 表示坐标。但在某些问题中,状态涉及到“一组元素的集合”。 例如:有N个城市,我们需要记录哪些城市已经去过,哪些还没去 阅读全文
posted @ 2026-04-01 16:57 Time_q 阅读(17) 评论(0) 推荐(0)
摘要: https://atcoder.jp/contests/dp 题目大意 https://atcoder.jp/contests/dp/tasks/dp_n 给你一组数据,这个数据相邻两个合并,合并的代价是这两个的数值和 求最小代价 这个是超级经典的区间dp,所以写下来 code void solve 阅读全文
posted @ 2026-04-01 12:25 Time_q 阅读(21) 评论(0) 推荐(0)
摘要: 完整代码 #include<bits/stdc++.h> using namespace std; //"O campeão tem nome, e se chama Charles Oliveira!" #define int long long #define endl '\n' #define 阅读全文
posted @ 2026-04-01 00:06 Time_q 阅读(15) 评论(0) 推荐(0)
摘要: 原题 [https://ac.nowcoder.com/acm/contest/130843/D] 大意分析: 给你一组数据代表的是代价,把一段区间染成红色的代价是这段的区间和一个区间是可以重复染色的,这个超级重要 首先考虑的就是dp,可以说这道题一眼dp了,这里的dp[i]是前i个染成红色的最小代 阅读全文
posted @ 2026-03-31 23:21 Time_q 阅读(28) 评论(0) 推荐(0)