結果
問題 |
No.239 にゃんぱすー
|
ユーザー |
|
提出日時 | 2016-10-25 23:35:58 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 7 ms / 2,000 ms |
コード長 | 715 bytes |
コンパイル時間 | 1,238 ms |
コンパイル使用メモリ | 85,664 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-24 03:45:13 |
合計ジャッジ時間 | 1,935 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 33 |
ソースコード
#define _USE_MATH_DEFINES #include<stdio.h> #include<string> #include<iostream> #include<cctype> #include<cstdio> #include<vector> #include<stack> #include <algorithm> #include<math.h> #include<set> #include<map> #include<iomanip> //#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; vector<string>P(n); vector<vector<string>>x(n,vector<string>(n)); for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ cin>>x[i][j]; } } int t=0; int w=0; for(int i=0;i<n;i++){ bool f=1; for(int j=0;j<n;j++){ if(i==j)continue; //cout<<x[j][i]; if(x[j][i]!="nyanpass"){f=0;//cout<<j; } } if(f)t++,w=i+1; } if(t==1)cout<<w<<endl; else cout<<-1<<endl; return 0; }