T1:Takahashi san
模拟
代码实现
#include <bits/stdc++.h>
using namespace std;
int main() {
string s, t;
cin >> s >> t;
cout << s << ' ' << "san";
return 0;
}
T2:World Meeting
暴力枚举
代码实现
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
int main() {
int n;
cin >> n;
vector<int> w(n), x(n);
rep(i, n) cin >> w[i] >> x[i];
int ans = 0;
rep(t, 24) {
int now = 0;
rep(i, n) {
int y = (x[i]+t)%24;
if (9 <= y and y < 18) now += w[i];
}
ans = max(ans, now);
}
cout << ans << '\n';
return 0;
}