首页 > 其他 > 详细

CF 1138 F. Cooperative Game

时间:2019-03-13 18:40:35      阅读:125      评论:0      收藏:0      [点我收藏+]

F. Cooperative Game

链接

分析:

  很有意思的一道题。

  

代码:

#include<cstdio>
#include<algorithm>
#include<cstring>
#include<iostream>
#include<cmath>
#include<cctype>
#include<set>
#include<queue>
#include<vector>
#include<map>
using namespace std;
typedef long long LL;

inline int read() {
    int x=0,f=1;char ch=getchar();for(;!isdigit(ch);ch=getchar())if(ch==-)f=-1;
    for(;isdigit(ch);ch=getchar())x=x*10+ch-0;return x*f;
}

char s[15];
int IN() {
    int x = read();
    for (int i = 1; i <= x; ++i) scanf("%s", s);
    return x;
}
int main() {
    while (1) {
        puts("next 0"); fflush(stdout); IN();
        puts("next 0 1"); fflush(stdout); 
        if (IN() == 2) break;
    }
    while (1) {
        puts("next 0 1 2 3 4 5 6 7 8 9"); fflush(stdout);
        if (IN()==1) break;
    }
    puts("done"); fflush(stdout);
    return 0;
}

 

CF 1138 F. Cooperative Game

原文:https://www.cnblogs.com/mjtcn/p/10524861.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!