Submission #158922


Source Code Expand

Copy

#include <iostream>

int main()
{
    int n[16];
    bool flag = false;
    
    for (int i  = 0; i<16; i++) {
       
            std::cin >> n[i];
    
    }
    
    for (int i= 0; i < 16; i++) {
        for (int j=-0; j<4; j++) {
            switch (j) {
                case 0:
                    if (i<4) {
                        continue;
                    }
                    if (n[i]==n[i-4]) {
                        std::cout << "CONTINUE"<< std::endl;
                        return 0;
                    }
                    break;
                case 1:
                    if (i>11) {
                        continue;
                    }
                    if (n[i]==n[i+4]) {
                        std::cout << "CONTINUE"<< std::endl;
                        return 0;
                    }
                    break;
                case 2:
                    if (i%4==0) {
                        continue;
                    }
                    if (n[i]==n[i-1]) {
                        std::cout << "CONTINUE"<< std::endl;
                        return 0;
                    }
                    break;
                case 3:
                    if (i%4==3) {
                        continue;
                    }
                    if (n[i]==n[i+1]) {
                        std::cout << "CONTINUE"<< std::endl;
                        return 0;
                    }
                    break;
                    
            }
           
        }
    }
    std::cout << "GAMEOVER"<< std::endl;

    
    
    
    return 0;
}

Submission Info

Submission Time
Task A - DEAD END
User tacchannet
Language C++ (G++ 4.6.4)
Score 100
Code Size 1650 Byte
Status
Exec Time 35 ms
Memory 928 KB

Test Cases

Set Name Score / Max Score Test Cases
All 100 / 100 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 21 ms 676 KB
hand_2.txt 23 ms 924 KB
random_1.txt 20 ms 800 KB
random_10.txt 24 ms 792 KB
random_11.txt 21 ms 756 KB
random_12.txt 20 ms 676 KB
random_13.txt 21 ms 676 KB
random_14.txt 21 ms 796 KB
random_15.txt 21 ms 800 KB
random_16.txt 21 ms 804 KB
random_17.txt 21 ms 800 KB
random_18.txt 20 ms 800 KB
random_19.txt 20 ms 800 KB
random_2.txt 21 ms 796 KB
random_20.txt 21 ms 736 KB
random_21.txt 20 ms 924 KB
random_22.txt 24 ms 676 KB
random_23.txt 21 ms 804 KB
random_24.txt 21 ms 796 KB
random_25.txt 20 ms 804 KB
random_26.txt 21 ms 924 KB
random_27.txt 21 ms 928 KB
random_28.txt 21 ms 924 KB
random_29.txt 20 ms 744 KB
random_3.txt 21 ms 796 KB
random_30.txt 21 ms 676 KB
random_4.txt 21 ms 796 KB
random_5.txt 21 ms 804 KB
random_6.txt 21 ms 800 KB
random_7.txt 21 ms 672 KB
random_8.txt 20 ms 672 KB
random_9.txt 35 ms 792 KB
sample_1.txt 21 ms 736 KB
sample_2.txt 20 ms 796 KB
sample_3.txt 20 ms 800 KB