結果

問題 No.239 にゃんぱすー
ユーザー koba-e964koba-e964
提出日時 2015-07-11 00:10:40
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 9 ms / 2,000 ms
コード長 298 bytes
コンパイル時間 1,347 ms
コンパイル使用メモリ 144,944 KB
実行使用メモリ 6,464 KB
最終ジャッジ日時 2023-09-22 10:31:03
合計ジャッジ時間 2,773 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 4 ms
6,360 KB
testcase_01 AC 4 ms
6,236 KB
testcase_02 AC 4 ms
6,352 KB
testcase_03 AC 3 ms
6,208 KB
testcase_04 AC 4 ms
6,208 KB
testcase_05 AC 4 ms
6,212 KB
testcase_06 AC 4 ms
6,288 KB
testcase_07 AC 4 ms
6,220 KB
testcase_08 AC 4 ms
6,164 KB
testcase_09 AC 4 ms
6,232 KB
testcase_10 AC 4 ms
6,192 KB
testcase_11 AC 4 ms
6,464 KB
testcase_12 AC 4 ms
6,240 KB
testcase_13 AC 4 ms
6,208 KB
testcase_14 AC 5 ms
6,184 KB
testcase_15 AC 5 ms
6,172 KB
testcase_16 AC 5 ms
6,276 KB
testcase_17 AC 6 ms
6,224 KB
testcase_18 AC 6 ms
6,232 KB
testcase_19 AC 6 ms
6,348 KB
testcase_20 AC 6 ms
6,260 KB
testcase_21 AC 7 ms
6,304 KB
testcase_22 AC 7 ms
6,308 KB
testcase_23 AC 7 ms
6,332 KB
testcase_24 AC 7 ms
6,352 KB
testcase_25 AC 8 ms
6,424 KB
testcase_26 AC 8 ms
6,444 KB
testcase_27 AC 4 ms
6,160 KB
testcase_28 AC 4 ms
6,172 KB
testcase_29 AC 5 ms
6,232 KB
testcase_30 AC 5 ms
6,248 KB
testcase_31 AC 5 ms
6,220 KB
testcase_32 AC 6 ms
6,268 KB
testcase_33 AC 6 ms
6,284 KB
testcase_34 AC 7 ms
6,308 KB
testcase_35 AC 7 ms
6,360 KB
testcase_36 AC 9 ms
6,360 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
string a[300][300];
int main(){
int n;cin>>n;
rep(i,n)rep(j,n) cin>>a[i][j];
int cnt=0,m=-1;
rep(j,n) {
bool ok=1;
rep(i,n) if(j!=i && a[i][j]!="nyanpass")ok=0;
if(ok)cnt++,m=j;
}
cout<<(cnt==1 ?m+1:-1) <<endl;
}
0