Q: Find the shortest possible distinguisher between a list of strings
I write two functions in cpp
#include <iostream>
#include <vector>
// using namespace std;
// only use one dictionary in the loop
// query time O(n)
bool check(std::vector<std::map<char, int>> res, int l, char* s){
if (s.size()==0) return true;
std::map<char, int> dict = res[l];
// dictionary that corresponds to the substring
char p1 = s[0];
int index =-1;
// std::map<char, int