結果
| 問題 |
No.239 にゃんぱすー
|
| ユーザー |
|
| 提出日時 | 2015-07-10 22:26:27 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 5 ms / 2,000 ms |
| コード長 | 563 bytes |
| コンパイル時間 | 492 ms |
| コンパイル使用メモリ | 63,000 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-08 01:57:33 |
| 合計ジャッジ時間 | 2,107 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 33 |
ソースコード
#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <utility>
#include <string>
using namespace std;
int main() {
int n;
string str;
cin >> n;
vector<bool> isRen(n, true);
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
cin >> str;
if (str == "-") {
continue;
} else if (str != "nyanpass") {
isRen[j] = false;
}
}
}
int cnt = 0;
int idx = -1;
for (int i = 0; i < n; i++) {
if (isRen[i]) {
idx = i + 1;
cnt++;
}
}
cout << (cnt == 1 ? idx : -1) << endl;
return 0;
}