結果
| 問題 |
No.239 にゃんぱすー
|
| ユーザー |
m1savr
|
| 提出日時 | 2015-07-20 20:55:37 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 7 ms / 2,000 ms |
| コード長 | 934 bytes |
| コンパイル時間 | 767 ms |
| コンパイル使用メモリ | 56,532 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-08 11:20:38 |
| 合計ジャッジ時間 | 1,377 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 33 |
ソースコード
#include <iostream>
using namespace std;
int main()
{
int n;
string a[100][100], b[100][100];
bool isRenchon;
int renchon = -1;
cin >> n;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
cin >> a[i][j];
}
}
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
b[j][i] = a[i][j];
}
}
for (int i = 0; i < n; i++) {
isRenchon = true;
for (int j = 0; j < n; j++) {
if (b[i][j].compare("nyanpass") == 0 || b[i][j].compare("-") == 0) {
isRenchon &= true;
} else {
isRenchon &= false;
}
}
if (isRenchon) {
if (renchon < 0) {
renchon = i + 1;
} else {
renchon = -1;
break;
}
}
}
cout << renchon << endl;
return 0;
}
m1savr