hdu2078-复习时间

http://acm.hdu.edu.cn/showproblem.php?pid=2078

#include "stdio.h"
#include "string.h"
#include "stdlib.h"
#include "math.h"
#include "algorithm"
#include "iostream"

using namespace std;

const int maxn = 105 ; 
int main()
{
	int Case ;
	int i , j , n , m ,sum ;
	int num[ maxn ];
	 scanf( "%d" ,&Case ) ;
	{
		while( Case-- )
		{
			scanf( "%d%d" , &n , &m ) ;
			for( i = 0 ; i < n ; i++ )
				scanf( "%d" , &num[ i ] );
			sort( num , num + n ) ;
			sum = 100 ;
			int ans = sum - num[ 0 ];
			sum = ans * ans ;
			printf( "%d\n" , sum ) ;
		}
	}
	return 0;
}


你可能感兴趣的:(杭电,水题)