#44. mapAB4
mapAB4
Background
Description
Modify and return the given map as follows: if the keys "a" and "b" have values that have different lengths, then set "c" to have the longer value. If the values exist and have the same length, change them both to the empty string in the map.
Format
Input
Output
Samples
"a": "aaa" "b": "bb" "c": "cake"
{"a": "aaa", "b": "bb", "c": "aaa"}
"a": "aa" "b": "bbb" "c": "cake"
{"a": "aa", "b": "bbb", "c": "bbb"}
"a": "aa" "b": "bbb"
{"a": "aa", "b": "bbb", "c": "bbb"}
Limitation
1s, 1024KiB for each test case.