ACM (TJU) : 3205


package volume_XXIII;

import java.util.Arrays;
import java.util.Scanner;

public class Id_3205 {

/**
* @param args
*/
public static void main(String[] args) {

Scanner input = new Scanner (System.in);

int n = input.nextInt();
int a [] [] = new int [100] [100];

for (int i = 0; i < n; i++ ) { for ( int j = 0; j < n; j++ ) a [i] [j] = input.nextInt(); Arrays.sort(a [i], 0, n); } int res [] = new int [n]; for ( int i = 0; i < n; i++ ) res [i] = a [i] [ n / 2 ]; Arrays.sort(res); System.out.println (res [n/2]); } } [/sourcecode]

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s