UVA – 11875 – Brick Game

#include <iostream>
using namespace std;

int main() {
	int T, N;
	cin >> T;
	for(int t=1; t<=T; t++){
		cin >> N;
		int mid = N/2 +1;
		for(int a, n=0; n<N; cin >> a, n++)
			if(n==mid) cout << "Case " << t << ": " << a <<endl;
	}
	return 0;
}
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

%d bloggers like this: