結果
問題 |
No.239 にゃんぱすー
|
ユーザー |
![]() |
提出日時 | 2018-06-23 20:21:26 |
言語 | C (gcc 13.3.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 599 bytes |
コンパイル時間 | 262 ms |
コンパイル使用メモリ | 29,696 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-30 18:32:48 |
合計ジャッジ時間 | 5,361 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 4 |
other | RE * 33 |
ソースコード
#include <stdio.h> #include <string.h> int main (void) { unsigned N; scanf("%d", &N); char *A; int s[100] = {0}; // int *s = calloc(N, (unsigned)sizeof(int)); int renchon = 0; int n; int i, j; for (i = 0; i < N; i++) { for (j = 0; j < N; j++) { scanf("%s", A); if (strcmp(A, "nyanpass") == 0) s[j]++; } } for (j = 0; j < N; j++) { if (s[j] == N - 1) renchon++; n = j; } if (renchon != 1) printf("-1"); else printf("%d", n + 1); // free(s); return 0; }