結果
問題 | No.1613 Rush and Remove |
ユーザー | 👑 Nachia |
提出日時 | 2021-07-21 21:32:59 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 18 ms / 2,000 ms |
コード長 | 721 bytes |
コンパイル時間 | 634 ms |
コンパイル使用メモリ | 73,096 KB |
最終ジャッジ日時 | 2025-01-23 03:32:19 |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 36 |
ソースコード
#include <iostream> #include <vector> #include <string> #include <algorithm> using namespace std; using ll = long long; using ull = unsigned long long; #define rep(i,n) for(int i=0; i<(n); i++) int H,W; int G[300][300]; int main(){ cin >> H >> W; rep(y,H) rep(x,W){ char c; cin >> c; if(c == 'o') G[x][y] = 1; else G[x][y] = 0; } int ans = 0; rep(x,W){ int a = 0; for(int y=H-1; y>=0; y--){ a *= 2; a += G[x][y]; a %= 3; } ans ^= a; } if(ans == 0) cout << "Second" << endl; else cout << "First" << endl; return 0; } struct ios_do_not_sync{ ios_do_not_sync(){ ios::sync_with_stdio(false); cin.tie(nullptr); } } ios_do_not_sync_instance;