#include<iostream> #include<cmath> #include<cstring> #include<string> #include<algorithm> #include<cstdio> using namespace std; const int N=1e6+50; const int INF=0x3f3f3f3f; typedef long long ll; int main() { int n,a,b; while(~scanf("%d%d%d",&n,&a,&b)) { int sum=n%(a+b); if(sum==0) printf("WIN\n"); else if(sum<=a) printf("LOST\n"); else printf("WIN\n"); } return 0; }
#include<iostream> #include<cmath> #include<cstring> #include<string> #include<algorithm> #include<cstdio> using namespace std; const int N=2e5+50; const int INF=0x3f3f3f3f; typedef long long ll; int a[N]; int main() { int n,m; while(~scanf("%d%d",&n,&m)) { if(n<m) { swap(n,m); } int k=n-m; n=(int)(k*(1+sqrt(5.0))/2); if(n==m) printf("0\n");//输 else printf("1\n");//赢 } return 0; }
#include<iostream> #include<cmath> #include<cstring> #include<string> #include<algorithm> #include<cstdio> using namespace std; const int N=2e5+50; const int INF=0x3f3f3f3f; typedef long long ll; int a[N]; int main() { int n; while(scanf("%d",&n)) { if(n==0) break; int sg=0; for(int i=0;i<n;i++) { scanf("%d",a+i); sg^=a[i]; } if(sg==0) printf("No\n"); else { printf("Yes\n"); } } return 0; }
原文:https://www.cnblogs.com/alpacadh/p/9114216.html