https://leetcode.com/problems/top-k-frequent-words/ Given a non-empty list of words, return the k most frequent elements. Your answer should be sorted by frequency from highest to lowest. If two words have the same frequency, then the word with the l
膜意义下最短路. 把最小的\(a\)抠出来,作为模数\(mod\),然后建点编号为\(0\)到\(mod-1\),对每个数\(a\)连边\((i,(a+i)\mod mod)\)点\(i\)的最短路就是凑出对\(mod\)取膜为\(i\)的最小数 然后随便统计一下 注意判掉0 // luogu-judger-enable-o2 #include<bits/stdc++.h> #define il inline #define vd void typedef long long ll; il i