智商题, 感觉不太能推出来, 虽然看看证明过程是对的。
#include<bits/stdc++.h>
#define LL long long
#define fi first
#define se second
#define mk make_pair
#define PLL pair<LL, LL>
#define PLI pair<LL, int>
#define PII pair<int, int>
#define SZ(x) ((int)x.size())
#define ull unsigned long long using namespace std; const int N = 1e5 + ;
const int inf = 0x3f3f3f3f;
const LL INF = 0x3f3f3f3f3f3f3f3f;
const int mod = ;
const double eps = 1e-;
const double PI = acos(-); char s[]; int getIn() {
int n; scanf("%d", &n);
for(int i = ; i <= n; i++) scanf("%s", s);
return n;
} int main() {
while() {
printf("next 0\n"); fflush(stdout);
getIn();
printf("next 0 1\n"); fflush(stdout);
if(getIn() == ) break;
}
while() {
printf("next 0 1 2 3 4 5 6 7 8 9\n"); fflush(stdout);
if(getIn() == ) break;
}
printf("done\n");
fflush(stdout);
return ;
} /*
*/