Taru exam is on the head. So she started learning physics. There she learned about Pascal's law. Now she wanted to try an experiment to get a better understanding of the same.
For, the experiment Taru has N buckets (numbered from 1,2,3...N) which all are initially empty.
She has M number of queries. Each query represents an integer that is of 4 types.
#include <iostream>
#include <vector>
#include <iomanip>
#include <fstream>
using namespace std;
int main()
{
int n;
cout<<"N:";
cin>>n;
vector<int>bucket;
int m;
for(int i=0;i<n;i++)
{
cin>>m;
switch(m)
{
case 1:
{
cout<<"Do it\n";
}
case 2:
{
int nm;
cin>>nm;
bucket.push_back(nm);
}
case 3:
{
cout<<"============Buckets===============\n";
for(auto it:bucket)
cout<<it<<" ";
cout<<endl;
}
}
}
return 0;
}
Comments