Meaning of the questions:
the position of the stones the n 1-n on, when two people take turns to be taken by a contiguous stretch, take up the k can not be taken as an input, ask who win
Resolution:
When k is 2 or more, the upper hand can always divided into two equal parts rock, no matter how case FLAC go, just get the same strategy can be selected at the symmetrical positions
Code:
#include <algorithm> #include <iostream> #include <cstring> #include <cstdlib> #include <vector> #include <cstdio> #include <queue> #include <cmath> #include <map> #include <set> using namespace std; typedef long long ll; int main () { ll n,k; scanf("%lld%lld",&n,&k); if(n==0){ printf("Austin\n"); }else if(k==1){ if(n%2==0){ printf("Austin\n"); }else{ printf("Adrien\n"); } }else { printf("Adrien\n"); } return 0; }