結果

問題 No.239 にゃんぱすー
ユーザー Mizuno
提出日時 2024-10-26 11:58:10
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 466 bytes
コンパイル時間 1,612 ms
コンパイル使用メモリ 96,128 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-26 11:58:13
合計ジャッジ時間 2,896 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3 WA * 1
other AC * 26 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <set>

using namespace std;

int main() {
	
	int n; cin >> n;
	vector<vector<string>> a(n,vector<string>(n,""));
	vector<int> arr(n,0);
	for(int i = 0; i < n; i++){
	    for(int j = 0; j < n; j++){
	        cin >> a[i][j];
	        if(a[i][j] == "nyanpass") arr[j] += 1;
	    }
	}
	
	for(int i = 0; i < n; i++) {
	    if(arr[i] == (n-1)){
	        cout << i + 1;
	        return 0;
	    }
	}
	cout << -1;
	
	return 0;
}
0