Can anyone tell me which one is better option and why?
1 Using vector and then sort the vector .
2. Using map/multimap.
Can anyone tell me which one is better option and why?
1 Using vector and then sort the vector .
2. Using map/multimap.
When you'll be fix this problem?
Update: Some questions in this quiz have images that aren't loading at the moment. Please do not proceed with this quiz — we will remove this once it's been fixed. Sorry about this!
Solution of Lead Game
#include<iostream>
#include<bits/stdc++.h>
using namespace std;
int main(){
int n,i,p1_total=0,p2_total=0,p1,p2,mx_lead=0,tmp,winner;
cin>>n;
for(i=0; i<n; i++)
{
cin>>p1>>p2;
p1_total += p1;
p2_total += p2;