摘要: A - AtCoder Line 赛时整活想写异或版本的 swap 写错了还 WA 了一发。 不过现在会写了:x^=y^=x^=y 点击查看代码 #include<cstdio> #include<algorithm> using namespace std; int main() { int n, 阅读全文
posted @ 2024-11-19 17:08 Jerrycyx 阅读(9) 评论(0) 推荐(0) 编辑
摘要: A. Sum of Three 枚举即可,是否可行只与 \(a,b,c\) 模三的余数有关,所以随便小范围枚举一下 \(a,b\) 就行了(只枚举 \(1,2,3\) 可能会因为两数相同而误判),这样最不容易错。 点击查看代码 #include<cstdio> using namespace std 阅读全文
posted @ 2024-11-19 16:41 Jerrycyx 阅读(7) 评论(0) 推荐(0) 编辑