#define _USE_MATH_DEFINES #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using boost::uuids::detail::md5; typedef long long ll; const int mod=998244353; const int dx[]={1,0,0,-1},dy[]={0,1,-1,0}; string calc(string s){ md5 hash; md5::digest_type digest; hash.process_bytes(s.data(),s.size()); hash.get_digest(digest); auto charDigest=reinterpret_cast(&digest); std::string result; boost::algorithm::hex(charDigest,charDigest+sizeof(md5::digest_type),std::back_inserter(result)); for(int i=0;i>s; cout<