Pagini recente » Cod sursa (job #2909345) | Cod sursa (job #3234654)
#include <fstream>
#include <queue>
#include <iostream>
using namespace std;
ifstream f("inumaki.in");
ofstream g("inumaki.out");
int n,x;
vector <int> a;
vector <int> b;
vector <int> c;
void citire()
{
f>>n;
while(n--)
f>>x, a.push_back(x);
f>>n;
while(n--)
f>>x, b.push_back(x);
}
int main()
{
citire();
for(int i=0; i<a.size(); i++)
for(int j=0 ;j<b.size(); j++)
{
if(a[i] >= b[j])
cout<<a[i]<<" ", i++
else
cout<<b[j]
}
return 0;
}