結果
| 問題 |
No.239 にゃんぱすー
|
| ユーザー |
latte0119
|
| 提出日時 | 2015-10-25 20:21:40 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 6 ms / 2,000 ms |
| コード長 | 449 bytes |
| コンパイル時間 | 1,467 ms |
| コンパイル使用メモリ | 161,120 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-13 09:05:59 |
| 合計ジャッジ時間 | 2,675 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 33 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
#define pb push_back
#define all(v) (v).begin(),(v).end()
typedef vector<int>vi;
int main(){
int n;cin>>n;
vi cnt(n);
rep(i,n){
rep(j,n){
string s;cin>>s;
if(s=="nyanpass")cnt[j]++;
}
}
if(count(all(cnt),n-1)!=1)cout<<-1<<endl;
else cout<<find(all(cnt),n-1)-cnt.begin()+1<<endl;
return 0;
}
latte0119