ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1313. Some Words about Sport

Hello all.
I have some problem with this task?
Why crash:acces violation?
Here is the code
-------------------------------------------------
#include <iostream>
#include <map>
#include <algorithm>
#include <vector>
using namespace std;

int main ()
{
int n,i,j;
int a[100];
cin>>n;
for( i=0;i<n*n;i++)

cin>>a[i];

sort(a,a+n*n);

for( i=0;i<n*n;i++)
cout<<a[i]<<" ";

return 0;
}


I didn't use two dimensional arrays cause I'had tried to find the laziest way. Could u help ?
Local test on computer is pretty good, u can check by trying code by yourselves;
The problem is not to sort array. Check it again!!!