51Nod-1995-三子棋
阿新 • • 發佈:2019-01-06
描述
題解
仔細讀題,執行程式碼出奇跡~~~這種題不該出現在
程式碼
#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;
}