結果
| 問題 |
No.239 にゃんぱすー
|
| ユーザー |
not_522
|
| 提出日時 | 2015-07-15 02:17:32 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 6 ms / 2,000 ms |
| コード長 | 504 bytes |
| コンパイル時間 | 1,214 ms |
| コンパイル使用メモリ | 165,908 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-08 07:35:20 |
| 合計ジャッジ時間 | 2,243 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 33 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
const string nyanpass = "nyanpass";
int n;
cin >> n;
vector<vector<string>> a(n, vector<string>(n));
for (int i = 0; i < n; ++i) {
for (int j = 0; j < n; ++j) {
cin >> a[j][i];
if (a[j][i] == "-") a[j][i] = nyanpass;
}
}
vector<int> res;
for (int i = 0; i < n; ++i) {
if (count(a[i].begin(), a[i].end(), nyanpass) == n) res.emplace_back(i);
}
cout << (res.size() == 1u ? res[0] + 1 : -1) << endl;
}
not_522