08 2019 档案
摘要:1 //输入 2 template<class T> 3 inline void read(T&x) 4 { 5 T ans=0,f=1; 6 char ch=getchar(); 7 while(ch>'9'||ch<'0') 8 { 9 if(ch=='-') 10 f=-1; 11 ch=getchar(); 12 } 13 while(ch<='9'&&ch>='0') 14 { 15 a
阅读全文
摘要:J: Just Repeat 题目描述 When Cuber QQ was chatting happily in a QQ group one day, he accidentally noticed that there was a counterfeit of him, who stole h
阅读全文
摘要:C: Prime-Factor Prime 题目描述 A positive integer is called a "prime-factor prime" when the number of its prime factors is prime. For example, 12 is a pri
阅读全文
摘要:permutation 2 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others) Problem Description You are given three positive inte
阅读全文
摘要:[题目大意] n个物品及其体积,用k个相同的箱子装,求能装下这n个物品的箱子的最小容积。 对于一个箱子,每次都先装能装下的最大的物品,不能满足则开始装下一个箱子。 [思路] ans = max ( vol [i] , ceil(sum ( vol [i]] ) / k )) ,while(ans++
阅读全文
摘要:扶桑号战列舰 题目描述 众所周知,一战过后,在世界列强建造超无畏级战列舰的竞争之中,旧日本海军根据“个舰优越主义”,建造了扶桑级战列舰,完工时为当时世界上武装最为强大的舰只。同时,扶桑号战列舰也是舰岛最为科幻的战列舰。当然,要建造这样的舰船,科技水平是必须的。同样众所周知的是,德意志科学技术天下第一
阅读全文
摘要:[题目大意] 给你n个128位二进制IP地址,输出压缩后的最短的IP地址,如果长度相同,输出字典序最小的那一个。 压缩规则:每16位二进制数为一个域,例如0000000110001111为一个域(压缩后相邻两个域之间用 “:” 分隔开),然后将四位二进制数转换成一位16进制数,如0000000110
阅读全文
摘要:G: Give Candies 题目描述 There are N children in kindergarten. Miss Li bought them N candies。To make the process more interesting, Miss Li comes up with t
阅读全文
摘要:B: Mathematical Curse 题目描述 A prince of the Science Continent was imprisoned in a castle because of his contempt for mathematics when he was young, and
阅读全文
摘要:十进制快速幂 例:求a^b%mod,(a<=10,b<=1e100000,mod=1e9+7) 说明 这时候 long long是存不下b的,但是可以用字符数组存; 举个简单例子,求 2^2345; 可以依次求2^2 -> (2^2)^10=2^20 -> (2^20)^3=2^23 -> (2^2
阅读全文
摘要:Just an Old Puzzle 题目描述 You are given a 4 × 4 grid, which consists of 15 number cells and an empty cell.All numbers are unique and ranged from 1 to 15
阅读全文

浙公网安备 33010602011771号