結果
| 問題 | 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 |
| + 92µs | |
| コード長 | 449 bytes |
| 記録 | |
| コンパイル時間 | 1,026 ms |
| コンパイル使用メモリ | 177,936 KB |
| 実行使用メモリ | 6,272 KB |
| 最終ジャッジ日時 | 2026-08-26 01:39:20 |
| 合計ジャッジ時間 | 2,875 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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