116 条题解

  • 0
    @ 2007-01-08 21:17:20

    编译通过...

    ├ 测试数据 01:答案正确... 0ms

    交了13次,终于过了

    可怜我的通过率

    搏弈树.....

    数组F[Y,M,D]表示该日期是否有必胜策略,

    F[Y,M,D]=NOT(F[Y,M+1,D] AND F[Y,M,D+1])

  • 0
    @ 2006-12-19 13:58:10

    题目是到2006年11月6日的

    不是2001年!

  • 0
    @ 2006-11-30 20:55:48

    纯判就是了

    我把YES/NO打成Yes/No,查错查了一个小时.我想撞墙

  • 0
    @ 2006-11-14 14:45:23

    这是zju上写的:

    初始2001。11。3必胜,倒推:

    如果下一日或者下一月必败,那么今日必胜,否则必败(不存在的日期当必胜)

    or

    如果下一日和下一月必胜,那么今日必败,否则必胜(不存在的日期当必胜)

    这两种做法都可以AC

    ___|\__|\__|\__|\__|__

    ZSU

    这道题浪费了我一上午……下午仔细检查,才发现:

    1、推到1900,我写成了1990@\(^#\)^%

    2、检查日期有效的函数写错。

  • 0
    @ 2006-11-08 09:47:13

    第100个通过的....

    很长但很快的程序...

  • 0
    @ 2006-10-31 21:39:01

    挖..楼下的牛...简短的程序啊..

    我用了120行...

  • 0
    @ 2006-10-26 20:36:58

    事实证明lolanv大牛说的bug现在还是存在的。。。。。。。。。。

  • 0
    @ 2006-10-15 17:46:33

    “Black cat”这动画还是很棒的,但这题就有点太.......

    累了。

  • 0
    @ 2006-10-10 20:19:39

    搞了好久才发现,……

    在递推dec(date)的时候考虑了润月,但是在判断必胜的程序里面2月全都是按28天算的……(纳闷了一个晚上算法又没有错怎么unac呢,T_T)

  • 0
    @ 2006-09-28 20:55:41

    我发现。。。。我输出‘YES’他输出‘NO’

    我出‘NO他出’YES‘

  • 0
    @ 2006-09-03 15:25:36

    vijos..............

    我边读入边输出就WA了十多次

    改成读了存下来再一次性输出就AC了....

    浪费我2小时,***|\**|\**|*

  • 0
    @ 2006-04-19 21:46:19

    ms事先建立一个日期数组,表示该日期能否有必胜。然后读数据就行了

  • -1
    @ 2017-09-07 22:00:15

    #include<iostream>
    #include<cstdio>
    #include<cmath>
    #include<cstring>
    #include<cstdlib>
    #include<algorithm>
    using namespace std;
    int main()
    {
    int k,a,b,c;
    cin>>k;
    for(int i=1;i<=k;i++)
    {
    cin>>a>>b>>c;
    if((b==9&&c==30)||(b==11&&c==30)||(b+c)%2==0)
    cout<<"YES"<<endl;
    else
    cout<<"NO"<<endl;
    }
    return 0;
    }

  • -1
    @ 2016-02-28 18:42:44

    坑爹啊!!!标准日期是**2006年**11月4日,不是**2001年**11月4日!!!附上我这个初学博弈的渣渣的超长代码:

    #include <iostream>

    #include <stdio.h>

    #include <stdlib.h>

    #include <algorithm>

    #include <cmath>

    #include <cstring>

    using namespace std;

    int n , i , j , k , l , year , month , day , tempk , tempj , tempi;

    bool a[2020][13][32] , f1 , f2;

    int main()

    {

    scanf ("%d" , &n);

    for (l = 0; l < n; l ++)

    {

    scanf ("%d%d%d" , &year , &month , &day);

    if (year > 2006 || (year == 2006 && month > 11) || (year == 2006 && month == 11 && day >= 4))

    {

    printf ("NO");

    return 0;

    }

    a[2006][11][4] = false;

    i = 2006;

    j = 11;

    k = 4;

    while (true)

    {

    f1 = a[i][j][k];

    k --;

    if (k == 0)

    {

    if (j != 3)

    {

    k = 30;

    if (j == 2 || j == 4 || j == 6 || j == 8 || j == 9 || j == 11 || j == 1)

    k ++;

    }

    else

    {

    k = 28;

    if ((i % 100 != 0 && i % 4 == 0) || (i % 400 == 0))

    k ++;

    }

    j --;

    }

    if (j == 0)

    {

    i --;

    j = 12;

    }

    tempi = i;

    tempj = j + 1;

    tempk = k;

    if (tempj > 12)

    {

    tempi ++;

    tempj = 1;

    if (tempi > 2006 || (tempi == 2006 && tempj > 11) || (tempi == 2006 && tempj == 11 && tempk > 4))

    f2 = true;

    else f2 = a[tempi][tempj][tempk];

    }

    else if (tempj == 2)

    {

    if ((tempi % 100 != 0 && tempi % 4 == 0) || tempi % 400 == 0)

    {

    if (tempk > 29)

    f2 = true;

    else

    {

    if (tempi > 2006 || (tempi == 2006 && tempj > 11) || (tempi == 2006 && tempj == 11 && tempk >
    4))

    f2 = true;

    else f2 = a[tempi][tempj][tempk];

    }

    }

    else

    {

    if (tempk > 28)

    f2 = true;

    else

    {

    if (tempi > 2006 || (tempi == 2006 && tempj > 11) || (tempi == 2006 && tempj == 11 && tempk >
    4))

    f2 = true;

    else f2 = a[tempi][tempj][tempk];

    }

    }

    }

    else if (tempj == 4 || tempj == 6 || tempj == 9 || tempj == 11)

    {

    if (tempk > 30)

    f2 = true;

    else

    {

    if (tempi > 2006 || (tempi == 2006 && tempj > 11) || (tempi == 2006 && tempj == 11 && tempk > 4))

    f2 = true;

    else f2 = a[tempi][tempj][tempk];

    }

    }

    else

    {

    if (tempi > 2006 || (tempi == 2006 && tempj > 11) || (tempi == 2006 && tempj == 11 && tempk > 4))

    f2 = true;

    else f2 = a[tempi][tempj][tempk];

    }

    if (f1 && f2)

    a[i][j][k] = false;

    else if (!f1 || !f2)

    a[i][j][k] = true;

    if (i == year && j == month && k == day)

    break;

    }

    if (a[i][j][k])

    printf ("YES\n");

    else printf ("NO\n");

    }

    return 0;

    }

  • -1
    @ 2013-02-16 10:09:30

信息

ID
1004
难度
5
分类
博弈论 点击显示
标签
(无)
递交数
5117
已通过
1788
通过率
35%
被复制
28
上传者