求解一道acm题

核心提示下面的代码已经在VC上验证了#include<iostream>#include<cmath>using namespace std;int n,m;int main(){int n,m;while (scanf("%d%d",&n,&m)

下面的代码已经在VC上验证了

#include<iostream>

#include<cmath>

using namespace std;

int n,m;

int main()

{

int n,m;

while (scanf("%d%d",&n,&m)!=EOF)

{

int s=0;

int a,b;

while (n--)

{

scanf("%d%d",&a,&b);

s=s^(abs(a-b)-1);

}

if (s==0) printf("BAD LUCK!n");

else printf("I WIN!n");

}

return 0;

}

 
友情链接
鄂ICP备19019357号-22