Pagini recente » Cod sursa (job #376067) | Cod sursa (job #2473033) | Cod sursa (job #1229103) | Cod sursa (job #3293343) | Cod sursa (job #1114124)
#include <iostream>
#include <iostream>
#include <fstream>
#include <algorithm>
using namespace std;
ifstream f ("interclasari.in");
ofstream g ("interclasari.out");
int i,j,m,n,v[20000000],a,k,x;
int main()
{
f>>n;
a=0;
for (i=1;i<=n;i++)
{
f>>k;
for (j=1;j<=k;j++){
f>>x;
a++;
v[a]=x;}
}
g<<a<<'\n';
sort(v+1,v+a+1);
for (i=1;i<=a;i++)
g<<v[i]<<" ";
return 0;
}