結果

問題 No.239 にゃんぱすー
ユーザー r2en_
提出日時 2017-07-11 11:54:54
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 459 bytes
コンパイル時間 745 ms
コンパイル使用メモリ 72,272 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-07 14:44:02
合計ジャッジ時間 2,668 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3 WA * 1
other AC * 26 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
#define rep(i,n) for(int i = 0; i < (n); i++)

int main(){
    string s;
    int n; cin >> n;
    vector<int>a(100);
    rep(i,n){
        rep(j,n){
            cin >> s;
            if(s=="nyanpass"){ a[j+1]++; }
        }
    }
    int res = 0;
    rep(i,100){ if(a[i]==n-1){ res = i; } }
    if(res!=0){ cout << res << endl; }
    else{ cout << "-1" << endl; }
    return 0;
}
0