結果

問題 No.239 にゃんぱすー
ユーザー Ryooooooga
提出日時 2015-07-19 21:54:30
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 334 bytes
コンパイル時間 359 ms
コンパイル使用メモリ 55,328 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-08 10:27:21
合計ジャッジ時間 1,435 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 2
other AC * 23 WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
using namespace std;

int main() {
	int n, r = -1;
	cin >> n;
	for(int i=0; i<n; i++) {
		for(int j=1; j<=n; j++) {
			string a;
			cin >> a;
			
			if(a != "nyanpass")
				continue;

			if(r == -1) {
				r = j;
			}
			else if(r != j) {
				r = -1;
				break;
			}
		}
	}

	cout << r << endl;
}
0