摘要:
A - Candies for Nephews 模拟。 看 \(3\) 的余数。 点击查看代码 #include <bits/stdc++.h> using namespace std; using i64 = long long; void solve() { int n; std::cin >> 阅读全文
摘要:
A - Increase or Smash 模拟。 对于每个不是最大值的来说,都会经历一次先置为零然后再加的操作,重复项只计算一次;而最大值不用置为零,所以最开始会有一次。 点击查看代码 #include <bits/stdc++.h> using namespace std; using i64 阅读全文
摘要:
A. Best Player 模拟。 题意是分别站在 \(X,Y,Z\) 轴上看另外两维构成的点,谁看到的更多。 分别对三维维护一个 \(\text{pair}\) 去重比较即可。 点击查看代码 #include<bits/stdc++.h> using namespace std; #define 阅读全文
摘要:
A. Be Positive 模拟。 只需要把负数和零变为正即可。 点击查看代码 #include <bits/stdc++.h> using namespace std; using i64 = long long; void solve() { int n; cin >> n; int cnt[ 阅读全文