結果
問題 | No.239 にゃんぱすー |
ユーザー |
![]() |
提出日時 | 2016-03-04 00:25:04 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 6 ms / 2,000 ms |
コード長 | 440 bytes |
コンパイル時間 | 608 ms |
コンパイル使用メモリ | 57,228 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-24 14:00:46 |
合計ジャッジ時間 | 1,543 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 33 |
ソースコード
#include<iostream>#include<string>using namespace std;#define NMAX 100int main(){int N;string A;bool poi[NMAX+1];cin>>N;for(int i=1;i<=N;i++){poi[i]=true;}for(int i=1;i<=N;i++){for(int j=1;j<=N;j++){cin>>A;if(A!="-"&&A!="nyanpass") poi[j]=false;}}int ans=-1;for(int i=1;i<=N;i++){if(poi[i]){if(ans!=-1){cout<<"-1"<<endl;return 0;}ans=i;}}cout<<ans<<endl;}