結果
問題 | No.239 にゃんぱすー |
ユーザー |
|
提出日時 | 2019-08-29 17:37:52 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 5 ms / 2,000 ms |
コード長 | 390 bytes |
コンパイル時間 | 1,091 ms |
コンパイル使用メモリ | 166,512 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-17 16:56:40 |
合計ジャッジ時間 | 2,026 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 33 |
ソースコード
#include<bits/stdc++.h> using namespace std; int main(){ int n,ans=-1; cin>>n; vector<vector<string>> s(n,vector<string>(n)); for(int i=0;i<n;++i)for(int j=0;j<n;++j)cin>>s[j][i]; vector<int> can; for(int i=0;i<n;++i){ if(count(s[i].begin(),s[i].end(),"nyanpass")==n-1)can.emplace_back(i+1); } if(can.size()==1)ans=can.front(); cout<<ans<<endl; }