- import java.util.Scanner;
- public class Main{
- public static void main(String[] args) {
- Scanner input = new Scanner(System.in);
- int n;
- n = input.nextInt();
- int[][] b= new int[n][2];
- int[][] a = new int[n][n];
- for(int i=0;i){
- for(int j=0;j){
- a[i][j] = input.nextInt();
- }
- }
- for(int i=0;i){
- for(int j=0;j){
- if(a[j][i]==0)
- b[i][0]++;
- else
- b[i][1]++;
- }
- }
- boolean begin = true;
- for(int i=0;i){
- if(b[i][0]]){
- if(begin){
- System.out.print(i+1);
- begin = false;
- }
- else
- System.out.print(" "+(i+1));
- }
- }
- }
- }
来源: http://www.bubuko.com/infodetail-1967371.html