結果
| 問題 |
No.1613 Rush and Remove
|
| コンテスト | |
| ユーザー |
risujiroh
|
| 提出日時 | 2021-07-21 23:00:17 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 4 ms / 2,000 ms |
| コード長 | 484 bytes |
| コンパイル時間 | 1,818 ms |
| コンパイル使用メモリ | 195,260 KB |
| 最終ジャッジ日時 | 2025-01-23 05:00:15 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 36 |
ソースコード
#include <bits/stdc++.h>
int main() {
using namespace std;
cin.tie(nullptr)->sync_with_stdio(false);
int h, w;
cin >> h >> w;
vector<int> g(w);
int base = 1;
for (int i = 0; i < h; ++i) {
for (int j = 0; j < w; ++j) {
char c;
cin >> c;
if (c == 'o') {
g[j] += base;
g[j] %= 3;
}
}
base *= 2;
base %= 3;
}
cout << (accumulate(begin(g), end(g), 0, bit_xor{}) ? "First\n" : "Second\n");
}
risujiroh