B. Max and Mex | Codeforces Round #706 | CODEFORCES | SORTING | MATH

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

thanks for the explanation and for the perfect english

elmoad
Автор

we are searching for miss element in array .in the question they have mentioned array is multi set. for example - [0, 0, 1, 2, 3, 3] in this case when we are searching for mex element a[1] !=1 .then as per your logic 1 is mex but mex is 4 .can you explain this.

sricharan
Автор

Sri Charan asked one of the questions I had... So, I'm asking you another one...

I researched on few lines of your code in main(), but didn't get satisfactory explanation for what you have done and why you've done that way... The lines of code are:

ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cout<<fixed;
cout<<setprecision(10);

Can you point me to the right resource to learn and understand the advantage of writing the code this way?

sivach
Автор

Bro, we can also calculate, mex value in O(n), by swapping values😀😎, good explanation bro 🔥🔥

sangepunaveen
Автор

Tell me how can i improve main sirf A kr paata hu B nhi hota h

aakashtiwari