首页
Python
Java
前端
数据库
Linux
Chatgpt专题
开发者工具箱
200328专题
200328题(914.卡牌分组(最大公约数+哈希))
class Solution {public:bool hasGroupsSizeX(vector<int>& deck) {map<int, int> hash_map;//number-countfor (auto x : deck)hash_map[x]++;int max = hash_map.begin()->second;//max为要找的最大公约数for (auto i =
阅读更多...