結果
| 問題 |
No.1613 Rush and Remove
|
| コンテスト | |
| ユーザー |
tnakao0123
|
| 提出日時 | 2021-07-23 13:26:45 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 922 bytes |
| コンパイル時間 | 772 ms |
| コンパイル使用メモリ | 94,784 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-18 09:29:39 |
| 合計ジャッジ時間 | 1,997 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 36 |
ソースコード
/* -*- coding: utf-8 -*-
*
* 1613.cc: No.1613 Rush and Remove - yukicoder
*/
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
using namespace std;
/* constant */
const int MAX_H = 300;
const int MAX_W = 300;
/* typedef */
/* global variables */
char fs[MAX_H][MAX_W + 4];
/* subroutines */
/* main */
int main() {
int h, w;
scanf("%d%d", &h, &w);
for (int y = 0; y < h; y++) scanf("%s", fs[y]);
int gdy = 0;
for (int x = 0; x < w; x++) {
int g = 0;
for (int y = 0, b = 1; y < h; y++, b = (b << 1) % 3)
if (fs[y][x] != '.') g = (g + b) % 3;
gdy ^= g;
}
if (gdy) puts("First");
else puts("Second");
return 0;
}
tnakao0123