摘要: VP 五十八分钟苏童流体。好耶 A #define GLIBCXX_DEBUG #include <iostream> #include <cstring> #include <cstdio> #define int long long const int N = 500100; std::stri 阅读全文
posted @ 2024-07-28 10:59 yhbqwq 阅读(92) 评论(1) 推荐(0) 编辑
摘要: 这场 Div. 3 难度高于平时。 A #include <bits/stdc++.h> #define int long long using namespace std; const int N = 500100; int a[N]; signed main() { int T; scanf(" 阅读全文
posted @ 2024-07-27 09:22 yhbqwq 阅读(749) 评论(2) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2024-07-24 17:14 yhbqwq 阅读(7) 评论(0) 推荐(0) 编辑
摘要: 上大分,赢! A 考虑将每一条对角线上可以存放的砝码数量都记录一下,从大到小排序,然后直接暴力贪心选择。 此时可以发现数量一定形如 \(n,n-1,n-1,n-2,n-2,n-3,n-3,\ldots,1,1\) 这样的形式。直接暴力减即可。 时间复杂度为 \(O(n)\)。 #include <b 阅读全文
posted @ 2024-07-24 08:47 yhbqwq 阅读(229) 评论(0) 推荐(1) 编辑
摘要: 难度:A < B < C < E ≈ F << D 做题顺序:A -> B -> C -> F -> E -> D 其实 VP 的时候 perf 还是有 \(2000+\) 的(虽然说 D 炸了),perf 应该是 \(2028\) 左右 A signed main() { int n; cin > 阅读全文
posted @ 2024-07-21 15:54 yhbqwq 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 打的稀烂,但是还是上分了( A 考虑对值域做一个后缀和。若某一个后缀和的值是奇数那么先手就可以获胜。否则就不可以获胜。 (我才不会告诉你我这题吃了一次罚时的) #pragma GCC optimize(3) #include <bits/stdc++.h> #define int long long 阅读全文
posted @ 2024-07-21 09:48 yhbqwq 阅读(11) 评论(0) 推荐(0) 编辑
摘要: 简单场.png A 若 \(n\times m=1\) 则显然无解。否则因为 \(a\) 矩阵是一个 \(n\times m\) 的排列,所以说只需要让其循环右移一位即可。 时间复杂度 \(O(nm)\)。 #include <bits/stdc++.h> #define int long long 阅读全文
posted @ 2024-07-20 11:07 yhbqwq 阅读(46) 评论(0) 推荐(0) 编辑
摘要: A 分三类情况讨论即可。 void solveqwq() { int r = io.read(), g = io.read(), b = io.read(); string qwq = io.readstring(); if (qwq == "Blue") printf("%lld\n", min( 阅读全文
posted @ 2024-07-13 22:42 yhbqwq 阅读(37) 评论(0) 推荐(0) 编辑
摘要: 开题顺序:A - C - F - D - B - E。 A 直接模拟即可。 bool begmem; #include <bits/stdc++.h> #define int long long using namespace std; class FastIO { public: int read 阅读全文
posted @ 2024-07-06 22:37 yhbqwq 阅读(233) 评论(1) 推荐(1) 编辑
摘要: A 直接统计 Takahashi 出现次数即可。 #include <bits/stdc++.h> #define int long long using namespace std; const int N = 2000100; int a[N]; signed main() { int n; c 阅读全文
posted @ 2024-06-22 22:34 yhbqwq 阅读(28) 评论(0) 推荐(0) 编辑
摘要: A 直接模拟即可。 #pragma GCC optimize(3) #include<bits/stdc++.h> #define int long long using namespace std; const int N=1000100,mod=998244353; int a[N]; sign 阅读全文
posted @ 2024-06-15 22:15 yhbqwq 阅读(50) 评论(0) 推荐(0) 编辑
摘要: 下大分场/ll A 若 \(a\) 的值全部相同则无解,否则: 存在一个数出现了至少两次。那么让其中的恰好一次染上红色,其他的数全部染上蓝色。 不存在一个数出现了至少两次。那么随机选取一个数染上红色,其他的数全部染上蓝色。 时间复杂度为 \(O(n)\)。 #include <bits/stdc++ 阅读全文
posted @ 2024-06-10 07:37 yhbqwq 阅读(258) 评论(0) 推荐(1) 编辑
摘要: A 按照顺序直接模拟即可。 #pragma GCC optimize(3) #include <bits/stdc++.h> #define int long long #define pb push_back #define em emplace_back #define F(i,x,y) for 阅读全文
posted @ 2024-06-08 22:30 yhbqwq 阅读(15) 评论(0) 推荐(0) 编辑
摘要: A 容易发现对于任意一个长度为 \(n\),下标从 \(1\) 开始的序列 \(a\),若 \(1\le l\le r<n\),则必然有 \(\max\limits_{i=l}^r a_i\le \max\limits_{i=l}^{r+1} a_i\)。若 \(1<l\le r\le n\),则必 阅读全文
posted @ 2024-06-07 09:50 yhbqwq 阅读(109) 评论(0) 推荐(0) 编辑
摘要: A 容易发现若 \(S\) 串中 \(s_i\) 为特殊字符,则令 \(s_i=s_{i+1}\),此时 \(s_i\neq s_{i-1}\)。则找到一个 \(j\) 满足 \(s_i=s_{i+1}=s_{i+2}=\ldots=s_j\neq s_{j+1}\),则 \(s_j\) 也一定为特 阅读全文
posted @ 2024-04-17 21:00 yhbqwq 阅读(8) 评论(0) 推荐(0) 编辑