Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
First destructure the string.
Note that sometimes the string can be 2 characters and some times 3 characters.
Then create an object with symbols as keys and names as values
Then get the property of the created object with [c || d] .
What this says is if 'c' is availale use that to get the required property ( in case the string has 3 characters )
if 'c' is 'undefined' ( when the string is only 2 characters) use 'd' to get the property.
The "order" of elements in an unordered_set is implementation dependant right?
I ran the same code in gcc and visual c++ compilers and visual c++ gave me the answers in reverse order.
Because problem needs answer to be rounded to the next integer. This trick works like calling ::ceil.
If the extra have a decimal point value greater than or equal to 0.001 this addition will push the extra to next integer and explicit conversion to long long will get rid of remaining decimal points.
This comment is hidden because it contains spoiler information about the solution