上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 21 下一页

2024年7月14日

摘要: A. Buy a Pen 模拟 代码实现 a = list(map(int, input().split())) c = input() a.pop(['Red', 'Green', 'Blue'].index(c)) print(min(a)) B. Right Triangle 一个角为直角等价 阅读全文
posted @ 2024-07-14 00:24 V_Melville 阅读(36) 评论(0) 推荐(1)

2024年7月6日

摘要: A. Insert 模拟 代码实现 n, k, x = map(int, input().split()) a = list(map(int, input().split())) a.insert(k, x) print(*a) B. Intersection of Cuboids 模拟 代码实现 阅读全文
posted @ 2024-07-06 23:34 V_Melville 阅读(101) 评论(0) 推荐(0)

2024年7月1日

摘要: A. A Healthy Breakfast 模拟 代码实现 s = input() if s.index('R') < s.index('M'): print('Yes') else: print('No') B. Vertical Reading 模拟 代码实现 #include <bits/s 阅读全文
posted @ 2024-07-01 00:17 V_Melville 阅读(93) 评论(0) 推荐(0)

2024年6月26日

摘要: A. Count Takahashi 模拟 代码实现 n = int(input()) ans = 0 for i in range(n): s = input() if s == 'Takahashi': ans += 1 print(ans) B. Couples 统计有多少个数对 \((i, 阅读全文
posted @ 2024-06-26 23:24 V_Melville 阅读(16) 评论(0) 推荐(0)

2024年6月19日

摘要: 1. 在两个数列之间 有两个整数数列 \(a_1,a_2,\cdots,a_n\) 和 \(b_1,b_2,\cdots,b_n\)。我们的任务是找出满足以下条件的数列 \(c_1,c_2,\cdots,c_n\): 对 \(i=1,2,\cdots,n\),\(a_i \le c_i \le b_ 阅读全文
posted @ 2024-06-19 17:15 V_Melville 阅读(21) 评论(0) 推荐(1)

2024年6月15日

摘要: A. Welcome to AtCoder Land 模拟 B. Ticket Counter 模拟 代码实现 #include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; 阅读全文
posted @ 2024-06-15 23:49 V_Melville 阅读(82) 评论(0) 推荐(1)

2024年6月14日

摘要: A. Sanitize Hands 模拟 代码实现 #include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; int main() { int n, m; cin >> 阅读全文
posted @ 2024-06-14 23:56 V_Melville 阅读(84) 评论(0) 推荐(0)

2024年6月8日

摘要: 对于所有长度为 \(n\) 且总和为 \(m\) 的任意正整数序列 \(a\),求 \(\sum\prod a_i \bmod~ 998244353\) 。 限制: \(1 \leqslant n, m \leqslant 2 \times 10^5\) 算法分析 做法一:积的和典型 一方面,满足 阅读全文
posted @ 2024-06-08 13:34 V_Melville 阅读(19) 评论(0) 推荐(0)

2024年6月7日

摘要: AGC020C. Median Sum 记原序列的总和为 \(S\) 容易发现如果把空集也考虑进去的话,在左边任取一个子集,其和为 \(x\),那么一定可以在右边找到一个子集满足它的和为 \(S - x\)。也就是说,位于权值为 \(\frac{S}{2}\) 的左右两边的子集是对称的。 于是,我们 阅读全文
posted @ 2024-06-07 21:43 V_Melville 阅读(34) 评论(0) 推荐(0)

2024年6月3日

摘要: A. Subsegment Reverse 模拟 代码实现 n, l, r = map(int, input().split()) l -= 1 a = list(range(1, n+1)) a[l:r] = a[l:r][::-1] print(*a) B. Nutrients 模拟 代码实现 阅读全文
posted @ 2024-06-03 21:59 V_Melville 阅读(110) 评论(5) 推荐(1)
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 21 下一页