結果
問題 |
No.239 にゃんぱすー
|
ユーザー |
![]() |
提出日時 | 2018-06-03 21:15:25 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 641 bytes |
コンパイル時間 | 234 ms |
コンパイル使用メモリ | 32,128 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-30 09:27:47 |
合計ジャッジ時間 | 2,064 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 32 WA * 1 |
ソースコード
#include <stdio.h> #include <string.h> int main(){ int N, i, j, cnt = 0, nyanpass = 0, rentyon; char str[100][100][31]; scanf("%d\n", &N); for(i = 0; i < N; i++){ for(j = 0; j < N; j++){ scanf("%s ", str[i][j]); } } for(i = 0; i < N; i++){ for(j = 0; j < N; j++){ if(strcmp(str[j][i], "nyanpass") == 0) nyanpass++; if(nyanpass == N - 1){ cnt++; rentyon = i + 1; } } nyanpass = 0; } if(cnt == 1){ printf("%d\n", rentyon); }else{ printf("-1\n"); } return 0; }