結果

問題 No.2714 Amaou
ユーザー 2475057t
提出日時 2024-08-05 12:07:53
言語 C
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 852 bytes
コンパイル時間 441 ms
コンパイル使用メモリ 30,336 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-08-05 12:07:55
合計ジャッジ時間 1,230 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 1
other AC * 2 WA * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

//No.2714 Amaou
#include <stdio.h>
#include <string.h>

int main(void){
    int N;
    scanf("%d", &N);
    char A[N][4][5];
    for(int i = 0; i < N; i++){
        scanf("%4s %4s %4s %4s", A[i][0], A[i][1], A[i][2], A[i][3]);
    }

    int cnt = 0;
    for(int i = 0; i < N; i++){
        int akai = 0, marui = 0, okii = 0, umai = 0;
        for(int j = 0; j < 4; j++){
            if(strcmp(A[i][j], "akai") == 0){
                akai = 1;
            }
            if(strcmp(A[i][j], "marui") == 0){
                marui = 1;
            }
            if(strcmp(A[i][j], "okii") == 0){
                okii = 1;
            }
            if(strcmp(A[i][j], "umai") == 0){
                umai = 1;
            }
        }
        if((akai + marui + okii + umai) == 4){
            cnt++;
        }
    }

    printf("%d\n", cnt);

    return 0;
}
0