Codeforces 1136F Cooperative Game (神仙題)
阿新 • • 發佈:2019-03-21
highlight 詳細 ces sca htm n) ace read 代碼
這種題就是難者不會,會者不難。
博客講的很詳細了
代碼:
#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; } } }
Codeforces 1136F Cooperative Game (神仙題)