std::unordered_map<int, int> countMap6; for (const auto& edge : result) { countMap6[edge.src]++; countMap6[edge.tgt]++; } int pCount = countMap6[p]; std::cout << "点p出现 " << pCount << " 次" << std::endl;

改写下列代码为判断点p在result中出现的次数stdunordered_mapint int countMap6;			for const auto& edge result							countMap6edgesrc++;				countMap6edgetgt++;						int begin = 0;			for const auto& pair1 countMap6

原文地址: http://www.cveoy.top/t/topic/hQWB 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录