1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | #include <iostream> #include <string> #include <map> #include <initializer_list> #define map_entries_begin { #define map_entries_end } #define map_entry_begin { #define map_entry_end }, const std::map<int, std::map<int, std::string>> test = map_entries_begin //------// map_entry_begin 1, map_entries_begin map_entry_begin 1, "bla" map_entry_end map_entry_begin 2, "blie" map_entry_end map_entries_end map_entry_end //------// map_entry_begin 3, map_entries_begin map_entry_begin 1, "ha" map_entry_end map_entry_begin 2, "hie" map_entry_end map_entries_end map_entry_end map_entries_end; int main() { std::cout << test.find(3)->second.find(2)->second << "\n"; return 0; } |
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgojaW5jbHVkZSA8bWFwPgojaW5jbHVkZSA8aW5pdGlhbGl6ZXJfbGlzdD4KCiNkZWZpbmUgbWFwX2VudHJpZXNfYmVnaW4gewojZGVmaW5lIG1hcF9lbnRyaWVzX2VuZCB9CiNkZWZpbmUgbWFwX2VudHJ5X2JlZ2luIHsKI2RlZmluZSBtYXBfZW50cnlfZW5kIH0sCgpjb25zdCBzdGQ6Om1hcDxpbnQsIHN0ZDo6bWFwPGludCwgc3RkOjpzdHJpbmc+PiB0ZXN0ID0KICAgIG1hcF9lbnRyaWVzX2JlZ2luCiAgICAgICAgLy8tLS0tLS0vLwogICAgICAgIG1hcF9lbnRyeV9iZWdpbgogICAgICAgICAgICAxLCBtYXBfZW50cmllc19iZWdpbgogICAgICAgICAgICAgICAgIG1hcF9lbnRyeV9iZWdpbiAxLCAiYmxhIiBtYXBfZW50cnlfZW5kCiAgICAgICAgICAgICAgICAgbWFwX2VudHJ5X2JlZ2luIDIsICJibGllIiBtYXBfZW50cnlfZW5kCiAgICAgICAgICAgICAgIG1hcF9lbnRyaWVzX2VuZAogICAgICAgIG1hcF9lbnRyeV9lbmQKCiAgICAgICAgLy8tLS0tLS0vLwogICAgICAgIG1hcF9lbnRyeV9iZWdpbgogICAgICAgICAgICAzLCBtYXBfZW50cmllc19iZWdpbgogICAgICAgICAgICAgICAgIG1hcF9lbnRyeV9iZWdpbiAxLCAiaGEiIG1hcF9lbnRyeV9lbmQKICAgICAgICAgICAgICAgICBtYXBfZW50cnlfYmVnaW4gMiwgImhpZSIgbWFwX2VudHJ5X2VuZAogICAgICAgICAgICAgICBtYXBfZW50cmllc19lbmQKICAgICAgICBtYXBfZW50cnlfZW5kCgogICAgbWFwX2VudHJpZXNfZW5kOwoKaW50IG1haW4oKQp7CiAgICBzdGQ6OmNvdXQgPDwgdGVzdC5maW5kKDMpLT5zZWNvbmQuZmluZCgyKS0+c2Vjb25kIDw8ICJcbiI7CiAgICByZXR1cm4gMDsKfQ==
-
upload with new input
-
result: Success time: 0s memory: 3068 kB returned value: 0
hie


