随笔分类 - 算法
没事烧点脑,不理烦恼丝
摘要:没思路。网上找到的。 1. 将每一个int看成32位数,统计每一位出现的次数对3取余,所以需要开辟一个32大小的数组来统计每一位出现的次数 2. 对第一种思路进行简化,模拟3进制: three two one 0 0 1 表示出现了1个1 0 1 0 表示出现了2个1 0 1 1 表示出现了3个1.
阅读全文
摘要:题目描述: Given a set of distinct positive integers, find the largest subset such that every pair (Si, Sj) of elements in this subset satisfies: Si % Sj =
阅读全文
摘要:题目: Your task is to calculate a^b mod 1337 where a is a positive integer and b is an extremely large positive integer given in the form of an array. 求
阅读全文

浙公网安备 33010602011771号