上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 22 下一页

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 阅读(25) 评论(0) 推荐(0)

2025年2月12日

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

2025年1月25日

摘要: 再难熬的日子,也要笑对人生。 阅读全文
posted @ 2025-01-25 23:50 V_Melville 阅读(75) 评论(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 阅读(82) 评论(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 阅读(24) 评论(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 阅读(22) 评论(0) 推荐(0)

2025年1月12日

摘要: 不要勉强,享受现在的自己能够做的事。 阅读全文
posted @ 2025-01-12 00:48 V_Melville 阅读(77) 评论(0) 推荐(1)

2024年12月22日

摘要: A. Equally 模拟 代码实现 a, b, c = sorted(map(int, input().split())) ans = a == b == c or a+b == c print('Yes' if ans else 'No') B. Santa Claus 1 模拟 代码实现 #i 阅读全文
posted @ 2024-12-22 00:17 V_Melville 阅读(48) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 22 下一页