AtCoder Beginner Contest 466
链接:https://atcoder.jp/contests/abc466
A - Compromise
涉及知识:无
思路:判断有无非负数即可
Code
点击查看代码
void solve()
{
cin >> n;
vi a(n + 1);
int ok = 0;
for (int i = 1; i <= n; i++)
{
cin >> a[i];
if (a[i] >= 0)
{
ok = 1;
}
}
if (ok)
{
cout << "No" << endl;
}
else
{
cout << "Yes" << endl;
}
}
B - Representative Balls
涉及知识:

浙公网安备 33010602011771号