Codeforces 1136F Cooperative Game (神仙题)
这种题就是难者不会,会者不难。
博客讲的很详细了
代码:
#include <bits/stdc++.h>
using namespace std;
string s;
int read() {
int n;
scanf("%d", &n);
for (int i = 1; i <= n; i++)
cin >> s;
return n;
}
int main() {
while(1) {
printf("next 0\n");
fflush(stdout);
read();
printf("next 0 1\n");
fflush(stdout);
if(read() == 2) break;
}
while(1) {
printf("next 0 1 2 3 4 5 6 7 8 9\n");
fflush(stdout);
if(read() == 1) {
printf("done\n");
fflush(stdout);
break;
}
}
}

浙公网安备 33010602011771号