| 记录编号 | 
        86319 | 
        评测结果 | 
        AAAAAAAAAAAAAAAAAAAA | 
    
    
        | 题目名称 | 
        235.[POI 1999] 步兵问题 | 
        最终得分 | 
        100 | 
            
    
    
        | 用户昵称 | 
         cstdio | 
        是否通过 | 
        通过 | 
    
    
        | 代码语言 | 
        C++ | 
        运行时间 | 
        0.016 s  | 
    
    
        | 提交时间 | 
        2014-01-24 17:29:58 | 
        内存使用 | 
        0.39 MiB  | 
        
    
    
    
    		显示代码纯文本
		
		#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<cmath>
#include<iomanip>
using namespace std;
const int SIZEN=101;
bool win[2*SIZEN][2*SIZEN]={0};
bool meet[2*SIZEN][2*SIZEN]={0};
int N;
string str;
int main(){
	freopen("mus.in","r",stdin);
	freopen("mus.out","w",stdout);
	scanf("%d",&N);
	for(int i=1;i<=N;i++){
		cin>>str;
		for(int j=1;j<=N;j++){
			win[i][j]=str[j-1]-'0';
			win[i+N][j]=win[i][j+N]=win[i+N][j+N]=win[i][j];
		}
	}
	for(int i=1;i<2*N;i++) meet[i][i+1]=true;
	for(int st=2;st<=N;st++){
		for(int i=1;i+st<=2*N;i++){
			int j=i+st;
			for(int k=i+1;k<j;k++){
				if(meet[i][k]&&meet[k][j]&&(win[i][k]||win[j][k])){
					//必须能把中间那个人干掉
					meet[i][j]=true;
					break;
				}
			}
		}
	}
	int m=0;
	for(int i=1;i<=N;i++) if(meet[i][i+N]) m++;
	cout<<m<<endl;
	for(int i=1;i<=N;i++) if(meet[i][i+N]) cout<<i<<endl;
	return 0;
}