結果

問題 No.239 にゃんぱすー
ユーザー Naoyk1212
提出日時 2016-08-16 15:00:34
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 5 ms / 2,000 ms
コード長 464 bytes
コンパイル時間 1,570 ms
コンパイル使用メモリ 158,936 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-07 18:16:21
合計ジャッジ時間 3,444 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 33
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;

int main(){
	int n;
	cin >> n;
	int talk[n];
	fill(talk, talk + n, 0);
	string str;
	for(int i = 0; i < n; i++){
		for(int i = 0; i < n; i++){
			cin >> str;
			if(str == "nyanpass")talk[i]++;
		}
	}
	int renchon = 0;
	for(int i = 0; i < n; i++){
		if(talk[i] == n - 1)renchon++;
	}
	if(renchon == 1){
		for(int i = 0; i < n; i++){
			if(talk[i] == n - 1)cout << i + 1 << endl;
		}
	}else{
		cout << "-1" << endl;
	}
}
0