用个vector就超时什么鬼
垃圾题
再次证明,水题不要用stl
class Solution { public: bool check(int n) { int vis[10]; memset(vis, 0, sizeof(vis)); while(n) { int tmp = n % 10; n /= 10; if(tmp == 0) return false; vis[tmp]++; } for(int i = 1; i < 10; i++) if(vis[i] && vis[i] != i) return false; return true; } int nextBeautifulNumber(int n) { for(int i = n + 1; ; i++) if(check(i)) return i; } };