1. 程式人生 > >51Nod-1995-三子棋

51Nod-1995-三子棋

ACM模版

描述

描述

題解

仔細讀題,執行程式碼出奇跡~~~這種題不該出現在 51Nod 題庫的,尤其不該出現在基礎題裡。

程式碼

#include <iostream>

using namespace std;

int main(int argc, const char * argv[])
{
    int T;
    cin >> T;

    int x, y;
    while (T--)
    {
        cin >> x >> y;
        switch (x)
        {
            case
1: switch (y) { case 1: printf("Win\n6\n"); break; case 2: printf("Win\n4\n"); break; case 3: printf
("Win\n4\n"); break; case 4: printf("Win\n6\n"); break; } break; case 2: switch (y) { case 1: printf
("Equal\n0\n"); break; case 2: printf("Win\n4\n"); break; case 3: printf("Win\n4\n"); break; case 4: printf("Equal\n0\n"); break; } break; case 3: switch (y) { case 1: printf("Win\n6\n"); break; case 2: printf("Win\n4\n"); break; case 3: printf("Win\n4\n"); break; case 4: printf("Win\n6\n"); break; } break; } } return 0; }