Skip to content

Latest commit

 

History

History
11 lines (7 loc) · 748 Bytes

Andryusha-and-Socks.md

File metadata and controls

11 lines (7 loc) · 748 Bytes

Andryusha and Socks

Link - http://codeforces.com/contest/782/problem/

Prerequisite - Set / Map

Explanation - Our task is here to check weather a sock of same type is already on the table or not, and note the no of socks on it and output maximum of all our readings of no of socks. Here it is given that index of sock is <=100000 thus you can also make an zero array and each time check if it zero or not (i.e checking weather a socks is on table or not.) But if index very large or something else as string ,char etc then it better to use set here.

Author’s Code - http://codeforces.com/contest/782/submission/27111227