Submission #158851


Source Code Expand

Copy
#include <stdio.h>

int a[4][4];

int check(int r, int c) {
    if (r > 0 && a[r][c] == a[r-1][c]) return 1;
    if (r < 3 && a[r][c] == a[r+1][c]) return 1;
    if (c > 0 && a[r][c] == a[r][c-1]) return 1;
    if (c < 3 && a[r][c] == a[r][c+1]) return 1;
    return 0;
}

int main() {
    int i,j,c = 0;    
    for (i = 0; i < 4; i++) 
        scanf("%d %d %d %d\n", &a[i][0], &a[0][1], &a[0][2], &a[0][3]);
    
    for (i = 0; i < 4; i++) {
        for (j = 0; j < 4; j++) {
            if (check(i,j)) {
                c = 1;
                break;
            }
        }
        if (c == 1) break;
    }

    if (c == 0) printf("GAMEOVER\n");
    else printf("CONTINUE\n");

    return 0;
}

Submission Info

Submission Time
Task A - DEAD END
User shibafu528
Language C (GCC 4.6.4)
Score 0
Code Size 731 Byte
Status WA
Exec Time 38 ms
Memory 1016 KB

Compile Error

./Main.c: In function ‘main’:
./Main.c:16:14: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]

Judge Result

Set Name All
Score / Max Score 0 / 100
Status
AC × 14
WA × 18
Set Name Test Cases
All hand_1.txt, hand_2.txt, random_1.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, random_14.txt, random_15.txt, random_16.txt, random_17.txt, random_18.txt, random_19.txt, random_2.txt, random_20.txt, random_21.txt, random_22.txt, random_23.txt, random_24.txt, random_25.txt, random_26.txt, random_27.txt, random_28.txt, random_29.txt, random_3.txt, random_30.txt, random_4.txt, random_5.txt, random_6.txt, random_7.txt, random_8.txt, random_9.txt
Case Name Status Exec Time Memory
hand_1.txt AC 25 ms 916 KB
hand_2.txt AC 26 ms 920 KB
random_1.txt AC 24 ms 904 KB
random_10.txt AC 24 ms 904 KB
random_11.txt AC 24 ms 904 KB
random_12.txt WA 25 ms 916 KB
random_13.txt AC 24 ms 904 KB
random_14.txt AC 24 ms 904 KB
random_15.txt AC 25 ms 948 KB
random_16.txt WA 25 ms 936 KB
random_17.txt WA 24 ms 904 KB
random_18.txt WA 25 ms 944 KB
random_19.txt WA 24 ms 908 KB
random_2.txt WA 24 ms 892 KB
random_20.txt WA 24 ms 908 KB
random_21.txt WA 25 ms 904 KB
random_22.txt WA 25 ms 932 KB
random_23.txt WA 25 ms 948 KB
random_24.txt WA 24 ms 908 KB
random_25.txt WA 25 ms 932 KB
random_26.txt WA 24 ms 904 KB
random_27.txt WA 24 ms 916 KB
random_28.txt WA 24 ms 888 KB
random_29.txt WA 38 ms 944 KB
random_3.txt AC 24 ms 908 KB
random_30.txt WA 25 ms 884 KB
random_4.txt AC 25 ms 880 KB
random_5.txt AC 24 ms 904 KB
random_6.txt AC 23 ms 908 KB
random_7.txt AC 24 ms 876 KB
random_8.txt AC 24 ms 920 KB
random_9.txt WA 25 ms 968 KB
sample_1.txt AC 25 ms 952 KB
sample_2.txt WA 24 ms 904 KB
sample_3.txt WA 27 ms 1016 KB