95472024-02-22 21:01:15Vkrisztian01Ádám és Éva együttcpp11Runtime error 0/5035ms65068 KiB
#include <iostream>
#include<vector>
#include<map>

using namespace std;

int const c=100000;
int n,adam,eva,a,b,szamlalo=0;
vector<vector<int> > nums;
vector<vector<int> > ki;

int main()
{
    cin>>n;
    nums.assign(100,vector<int>(100001,0));
    cin>>adam;
    while(adam--)
    {
        cin>>a>>b;
        //nums[a/c][a%(c+1)]++;
        //nums[b/c][b%(c+1)]--;
    }
    cin>>adam;
    while(adam--)
    {
        cin>>a>>b;
        //nums[a/c][a%(c+1)]++;
        //nums[b/c][b%(c+1)]--;
    }
  /*  for(int i=0;i*c<=n;i++)
    {
        for(int j=1;j<=c;j++)
        {
            szamlalo+=nums[i][j];
            if(szamlalo==2 && nums[i][j]>0)
            {
               ki.push_back({i*c+j});
               continue;
            }
            if((szamlalo==1 && nums[i][j]==-1) || (szamlalo==0 && nums[i][j]==-2))
            {
                ki.back().push_back(i*c+j);
                continue;
            }
        }
    }*/
    cout<<ki.size()<<"\n";
    for(auto x:ki) cout<<x[0]<<" "<<x[1]<<"\n";
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base0/50
1Runtime error0/035ms65068 KiB
2Runtime error0/028ms64832 KiB
3Runtime error0/228ms64592 KiB
4Runtime error0/226ms64348 KiB
5Runtime error0/234ms64108 KiB
6Runtime error0/228ms63872 KiB
7Runtime error0/232ms63640 KiB
8Runtime error0/228ms63404 KiB
9Runtime error0/229ms63396 KiB
10Runtime error0/228ms63164 KiB
11Runtime error0/232ms62924 KiB
12Runtime error0/228ms62912 KiB
13Runtime error0/232ms62684 KiB
14Runtime error0/232ms62572 KiB
15Runtime error0/232ms62564 KiB
16Runtime error0/232ms62376 KiB
17Runtime error0/332ms62388 KiB
18Runtime error0/329ms62348 KiB
19Runtime error0/432ms62136 KiB
20Runtime error0/432ms62080 KiB
21Runtime error0/432ms62080 KiB
22Runtime error0/432ms62088 KiB