+ 2
Can someone explain this code for me?
set<pair<pair<long long, long long>, long long> > st;
6 odpowiedzi
+ 2
Set is a template class, meaning it can take different params types without making a class for each. Read more about templates to understand :)
+ 2
"This class couples together a pair of values, which may be of different types (T1 and T2). The individual values can be accessed through its public members first and second"
From cplusplus
+ 1
BTW a set is a dynamic array(at lest it is in Java) that store objects without duplication.
+ 1
what about the pair class? deletes duplicated types?
+ 1
I don't really know, maybe a cpp guru can help, but my guess it's a hashmap, key-value like
+ 1
I was right? Haha