#include <string>
#include <iostream>
#include <map>
#include <utility>
#include <array>
using namespace std;
int main()
{
map< array<double, 3>, string> mapa;
array<double, 3> a = {1,2,3};
array<double, 3> b = {1,0,0};
mapa[a] = "a";
mapa[b] = "b";
cout << mapa[a] << endl; //This print ok.
for(auto ii=mapa.begin(); ii!=mapa.end(); ++ii)
{
cout << '{' << ii->first[0] << ','
<< ii->first[1] << ','
<< ii->first[2] << "} : " << ii->second << '\n';
}
}
I2luY2x1ZGUgPHN0cmluZz4KI2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8bWFwPgojaW5jbHVkZSA8dXRpbGl0eT4KI2luY2x1ZGUgPGFycmF5PgogCnVzaW5nIG5hbWVzcGFjZSBzdGQ7CiAKaW50IG1haW4oKQp7CiAgICAgICAgbWFwPCBhcnJheTxkb3VibGUsIDM+LCBzdHJpbmc+IG1hcGE7CgogICAgICAgIGFycmF5PGRvdWJsZSwgMz4gYSA9IHsxLDIsM307CiAgICAgICAgYXJyYXk8ZG91YmxlLCAzPiBiID0gezEsMCwwfTsKCiAgICAgICAgbWFwYVthXSA9ICJhIjsKICAgICAgICBtYXBhW2JdID0gImIiOwogCiAgIGNvdXQgPDwgbWFwYVthXSA8PCBlbmRsOyAvL1RoaXMgcHJpbnQgb2suCgogICBmb3IoYXV0byBpaT1tYXBhLmJlZ2luKCk7IGlpIT1tYXBhLmVuZCgpOyArK2lpKQogICB7CiAgICAgICBjb3V0IDw8ICd7JyA8PCBpaS0+Zmlyc3RbMF0gPDwgJywnCiAgICAgICAgICAgICAgICAgICA8PCBpaS0+Zmlyc3RbMV0gPDwgJywnCiAgICAgICAgICAgICAgICAgICA8PCBpaS0+Zmlyc3RbMl0gPDwgIn0gOiAiIDw8IGlpLT5zZWNvbmQgPDwgJ1xuJzsKICAgfQp9