結果
| 問題 | No.239 にゃんぱすー |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-03-06 20:56:57 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 7 ms / 2,000 ms |
| コード長 | 527 bytes |
| 記録 | |
| コンパイル時間 | 449 ms |
| コンパイル使用メモリ | 80,888 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-05-01 13:42:52 |
| 合計ジャッジ時間 | 2,331 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 33 |
ソースコード
#include <iostream>
#include <vector>
using namespace std;
int main(){
int N,id=-1;
cin >> N;
vector<vector<string>> A(N,vector<string>(N));
for(int i=0;i<N;i++)for(int j=0;j<N;j++)cin >> A[i][j];
for(int j=0;j<N;j++){
int cnt=0;
for(int i=0;i<N;i++){
if(!A[i][j].compare("nyanpass"))cnt++;
}
if(cnt==N-1){
if(id==-1)id=j+1;
else id=N+1;
}
}
if(0<id && id<=N)cout << id << endl;
else cout << -1 << endl;
return 0;
}