标签:str 测试结果 java code als can stat inpu 判断
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<n;i++){ for(int j=0;j<n;j++){ a[i][j] = input.nextInt(); } } for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ if(a[j][i]==0) b[i][0]++; else b[i][1]++; } } boolean begin = true; for(int i=0;i<n;i++){ if(b[i][0]<b[i][1]){ if(begin){ System.out.print(i+1); begin = false; } else System.out.print(" "+(i+1)); } } } }
标签:str 测试结果 java code als can stat inpu 判断
原文地址:http://www.cnblogs.com/lolybj/p/6497854.html