#1187540

Solution for 1147: ICPC Score Totalizer Software by capythm

Source Code Status Test Cases
    Policy: public     Reviewed: 151    
00.00 sec    1160 KB    22 lines     380 bytes    2015-01-14 22:56
#include <iostream>
#include <algorithm>
using namespace std;
int main( void )
{
  while( 1 ){
    int n, a;
    cin >> n;
    if( n == 0 ) break;
    int minv = 1001;
    int maxv = -1;
    int s = 0;
    for( int i=0; i<n; i++ ){
      cin >> a;
      s += a;
      minv = min( minv, a );
      maxv = max( maxv, a );
    }
    cout << (s - minv - maxv) / (n - 2) << endl;
  }
}

Compile Error Logs:
You are not authorized to see the message.

Status
Judge: 1/1 C++ CPU: 00.00 sec Memory: 1160 KB Length: 380 B 2015-01-14 22:56 2015-01-14 22:56
Results for testcases
Case # Verdict CPU Time Memory In Out Case Name
Case #1: : Accepted 00.00 sec 1160 KB
< prev | / | next >  
 
Judge Input #  ( | ) Judge Output #  ( | )


Comments
 
 Under Construction.
 
Categories
 
 
Free Tags