結果
| 問題 |
No.239 にゃんぱすー
|
| ユーザー |
keisuke6
|
| 提出日時 | 2022-08-26 22:36:04 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 6 ms / 2,000 ms |
| コード長 | 454 bytes |
| コンパイル時間 | 2,053 ms |
| コンパイル使用メモリ | 199,952 KB |
| 最終ジャッジ日時 | 2025-01-31 05:14:38 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 33 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
int N;
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[i][j];
vector<int> A={};
for(int j=0;j<N;j++){
bool ok = true;
for(int i=0;i<N;i++)if(S[i][j] != "-" && S[i][j] != "nyanpass") ok = false;
if(ok) A.push_back(j+1);
}
if(A.size() == 1) cout<<A[0]<<endl;
else cout<<-1<<endl;
}
keisuke6