摘要: 致谢 凌云_void:博客园美化「详细教程+代码配置」, FReQuenter:想要一个漂亮的博客?Simple Memory - 博客园 cnblogs 个性化博客配置, 樱雪喵:主页, Brilliant11001:主页, BNDong(SimpleMemory主题作者):SimpleMemor 阅读全文
posted @ 2025-05-23 22:56 Pdise 阅读(23) 评论(0) 推荐(0)
摘要: 对于一个长度为 \(3^n\) 的 01 字符串 \(B = B_1B_2\dots B_{3^n}\),定义一种操作获得长度为 \(3^{n-1}\) 的 01 字符串 \(C = C_1C_2\dots C_{3^{n-1}}\): 对于 \(i = 1,2,\dots,3^{n-1}\),令 阅读全文
posted @ 2025-02-28 22:29 Pdise 阅读(59) 评论(0) 推荐(0)
摘要: Luogu Link | Codeforces Link \(\texttt{Describe}\) 给一个长度为 \(n\) 的二进制序列,Alice 和 Bob 在相邻两个0/1中间分别加 \(\operatorname{or}\) 或 \(\operatorname{and}\) 操作,优先级 阅读全文
posted @ 2024-10-24 21:08 Pdise 阅读(22) 评论(0) 推荐(0)
摘要: Luogu Link | Codeforces Link \(\texttt{Describe}\) 给定两个整数 \(n,x\),求满足 \(ab+bc+ac \le n\) 且 \(a+b+c\le x\) 的正整数三元组 \((a,b,c)\) 的个数。 \(\texttt{Solution} 阅读全文
posted @ 2024-10-10 22:03 Pdise 阅读(25) 评论(0) 推荐(0)
摘要: link \(\texttt{Describe}\) 构造有 \(n\) 个数的序列,满足以下条件: \(\forall i \in [1,n]\) 并且 \(1 \le a_i \le 10^9\)。 对于任何的 \(1 \le i,j \le n(i \ne j)\),\(a_i \ne a_j 阅读全文
posted @ 2024-09-30 21:54 Pdise 阅读(28) 评论(0) 推荐(0)
摘要: Checker (Windows) //chk.cpp #include <bits/stdc++.h> #include <windows.h> using namespace std; typedef long long ll; void SetColorAndBackground(int Fo 阅读全文
posted @ 2024-08-24 12:01 Pdise 阅读(25) 评论(0) 推荐(0)
摘要: link 题意 给你 \(N\) 个单词,问最多能组成多少个包含所有小写英文字母的句子。 \(\texttt{Solution}\) \(N \le 25\) 显然搜索。 枚举当前选还是不选,搜到头判断是否成功即可。 \(\texttt{Code}\) #include <bits/stdc++.h 阅读全文
posted @ 2024-08-05 23:20 Pdise 阅读(25) 评论(0) 推荐(0)
摘要: link 题目大意: 有 \(N\) 个城市,相邻两城市之间连接着铁路。有两种购买方案 花费 \(A_i\) 元买个车票 花费 \(C_i\) 元买个 \(\mathrm{IC}\) 卡,然后就可以只花费 \(B_i\) 元买车票。(每次经过这段铁路都可以用,第二次不用再买) 要按照 \(P_1,P 阅读全文
posted @ 2024-07-23 08:38 Pdise 阅读(26) 评论(0) 推荐(0)
摘要: link 简而言之,离散化就是把一个数列转化为由小到大的排名来缩小范围。 离散化需要这个题不用数字本身。 举个例子: -2002 448799 1 49932 35793 离散化后就是: 1 5 2 4 3 \(-2002\) 最小,所以它对应 \(1\) \(448799\) 最大,所以它对应 \ 阅读全文
posted @ 2024-07-22 15:21 Pdise 阅读(70) 评论(0) 推荐(0)
摘要: link 容易想到朴素做法: for (int l = 1; i <= n; ++i) { for (int r = 1; j <= n; ++j) { int v = s[r] - s[l - 1]; ans = max(ans, v); } } 但是显然 \(\mathrm{\color{#05 阅读全文
posted @ 2024-07-22 10:16 Pdise 阅读(20) 评论(0) 推荐(0)