int vector pair int int cin cin string temp int a1 a2 for int do cin t

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
int n, k;
vector<pair<int,int>> p;
cin >> n;
cin >> k;
string temp;
int a1,a2;
for(int i = 0; i <n;i++)
{
do
{
cin >> temp;
}
while(temp[temp.size()-1] != ':');
cin>>a1>>a2;
p.push_back(pair<int,int>(a1,a2));
}