結果
| 問題 |
No.239 にゃんぱすー
|
| コンテスト | |
| ユーザー |
m1savr
|
| 提出日時 | 2015-07-20 20:53:23 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 954 bytes |
| コンパイル時間 | 501 ms |
| コンパイル使用メモリ | 58,372 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-07-08 11:20:36 |
| 合計ジャッジ時間 | 1,363 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 2 |
| other | AC * 17 WA * 16 |
ソースコード
#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;
}
} else {
renchon = -1;
}
}
cout << renchon << endl;
return 0;
}
m1savr