我觉得正确遍历map最后一个元素应该是
auto point=--mp.end(); if(point->fi!=n+1){ e[++cnt]={point->fi,n,point->se}; }
为什么反而会re,而我这样却ac了
auto point=mp.end(); if(point->fi!=n+1){ e[++cnt]={point->fi,n,point->se}; }
不应该end()前面那个才是最后一个元素吗
谢谢各位大佬解答