結果
| 問題 | No.239 にゃんぱすー |
| コンテスト | |
| ユーザー |
latte0119
|
| 提出日時 | 2015-10-25 20:21:40 |
| 言語 | C++11 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
AC
不安定
|
| 実行時間 | 4 ms / 2,000 ms |
| + 689µs | |
| コード長 | 449 bytes |
| 記録 | |
| コンパイル時間 | 1,252 ms |
| コンパイル使用メモリ | 182,804 KB |
| 実行使用メモリ | 9,920 KB |
| 最終ジャッジ日時 | 2026-11-05 22:43:15 |
| 合計ジャッジ時間 | 3,162 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge7_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 35 |
ソースコード
#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