上一页 1 2 3 4 5 6 7 8 9 10 ··· 21 下一页

2025年3月1日

摘要: A. Strictly Increasing? 模拟 代码实现 #include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; int main() { int n; cin 阅读全文
posted @ 2025-03-01 23:53 V_Melville 阅读(33) 评论(0) 推荐(0)

2025年2月23日

摘要: A. 22222 模拟 代码实现 s = input() print('2'*s.count('2')) B. cat 模拟 代码实现 n = int(input()) print(''.join(sorted((input() for _ in range(n)), key=len))) C. D 阅读全文
posted @ 2025-02-23 00:53 V_Melville 阅读(34) 评论(0) 推荐(0)

2025年2月16日

摘要: A. Poisonous Oyster 简单分讨 代码实现 #include <bits/stdc++.h> using namespace std; int main() { string s1, s2; cin >> s1 >> s2; int ans = 1; if (s1 == "fine" 阅读全文
posted @ 2025-02-16 23:13 V_Melville 阅读(19) 评论(0) 推荐(0)

2025年2月12日

摘要: T1: 树的直径(二) 考虑由关键点构成的虚树,答案一定是 \(\lceil\frac{虚树直径}{2}\rceil\)。 由于关键点中深度最深的点一定是直径的某个端点,所以只需找到这个点,然后遍历其他点,通过lca求出两点间的距离,取最大值即可。 也可以跑两遍dfs求虚树直径,具体做法如下: 从任 阅读全文
posted @ 2025-02-12 21:47 V_Melville 阅读(32) 评论(0) 推荐(0)

2025年2月9日

摘要: A. Shuffled Equation 排序 代码实现 a, b, c = sorted(map(int, input().split())) if a*b == c: print('Yes') else: print('No') B. Who is Missing? 模拟 代码实现 #inclu 阅读全文
posted @ 2025-02-09 01:09 V_Melville 阅读(51) 评论(0) 推荐(0)

2025年2月2日

摘要: A. Lucky Direction 模拟 代码实现 d = {'N' : 'S', 'S' : 'N', 'W' : 'E', 'E' : 'W'} print(''.join(d[c] for c in input())) B. Seek Grid 暴搜 代码实现 #include <bits/ 阅读全文
posted @ 2025-02-02 01:10 V_Melville 阅读(62) 评论(0) 推荐(0)

2025年1月25日

摘要: 再难熬的日子,也要笑对人生。 阅读全文
posted @ 2025-01-25 23:50 V_Melville 阅读(62) 评论(0) 推荐(0)

2025年1月19日

摘要: A. 9x9 模拟 代码实现 #include <bits/stdc++.h> using namespace std; int main() { int a, b; scanf("%dx%d", &a, &b); int ans = a*b; cout << ans << '\n'; return 阅读全文
posted @ 2025-01-19 00:43 V_Melville 阅读(70) 评论(0) 推荐(0)

2025年1月17日

摘要: A. Happy New Year 2025 模拟 代码实现 a, b = map(int, input().split()) print((a+b)**2) B. 9x9 Sum 模拟 代码实现 #include <bits/stdc++.h> #define rep1(i, n) for (in 阅读全文
posted @ 2025-01-17 11:13 V_Melville 阅读(16) 评论(0) 推荐(0)

2025年1月14日

摘要: A. Full House 2 只需判定 \(\{A, B, C, D\}\) 中是否只有 \(2\) 种数 代码实现 print('Yes' if len(set(map(int, input().split()))) == 2 else 'No') B. Calculator 模拟 代码实现 # 阅读全文
posted @ 2025-01-14 21:02 V_Melville 阅读(15) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 10 ··· 21 下一页