This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
var g, k = this, aa = function(a) { | |
var b = typeof a; | |
if ("object" == b) | |
if (a) { | |
if (a instanceof Array) | |
return "array"; | |
if (a instanceof Object) | |
return b; | |
var c = Object.prototype.toString.call(a); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
The idea here is that to get the overall maximum beauty of the string you must assign | |
maximum beauty possible(26) to the most frequent alphabet and then 25 to the second most | |
frequent alphabet and so on. | |
And yes, in the code, sweetness and beauty means the same. | |
*/ | |
#include<iostream> | |
#include<cstdio> | |
#include<algorithm> |