Cod sursa(job #234822)

Utilizator amadaeusLucian Boca amadaeus Data 22 decembrie 2008 00:43:31
Problema Sortare prin comparare Scor Ascuns
Compilator cpp Status done
Runda Marime 0.63 kb
#include <fstream>
#include <vector>
#include <algorithm>

using namespace std;

#define MOD 123457
#define pb push_back

vector< int > V;
int N, x;
long long S, i;

int main() {
/*
	ifstream fi( "algsort.in" );
	ofstream fo( "algsort.out" );

	fi >> N;
*/
	freopen( "algsort.in", "r", stdin );
	freopen( "algsort.out", "w", stdout );

	scanf( "%d", &N );
	
	V.pb( 0 );
	for( i = 1; i <= N; i++ ) {
//		fi >> x;
		scanf( "%d", &x );
		V.pb( x );
	}
/*
	sort( V.begin(), V.end() );

	for( S = 0, i = 1; i <= N; i++ )
		S = ( S + i*V[i] ) % MOD;
	fo << S << '\n';

	fi.close(); fo.close();
*/
	return 0;
}