CodeForces - 841B Godsend——思路题

网友投稿 241 2022-11-01


CodeForces - 841B Godsend——思路题

#include typedef long long LL;const int maxn = 1e6 +10;LL a[maxn];using namespace std;int main() { int n; scanf("%d", &n); LL sum = 0; bool ok = false; for (int i = 1; i <= n; i++) { scanf("%I64d", &a[i]); sum += a[i]; if (a[i] % 2) ok = true; } if (sum % 2) printf("First\n"); else { if (ok) { printf("First\n"); } else printf("Second\n"); } return 0;}


版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:POJ 1426 Find The Multiple——bfs + 模运算 + 打表
下一篇:java中封装JDBC工具类的实例分析
相关文章

 发表评论

暂时没有评论,来抢沙发吧~