随笔分类 - 技巧
摘要:Polycarp has a lot of work to do. Recently he has learned a new time management rule: "if a task takes five minutes or less, do it immediately". Polyc
阅读全文
摘要:int Scan() { // 输入外挂 int res = 0, flag = 0; char ch; if ((ch = getchar()) == '-') { flag = 1; } else if(ch >= '0' && ch = '0' && ch = 10) { ...
阅读全文
摘要:Farmer John is an astounding accounting wizard and has realized he might run out of money to run the farm. He has already calculated and recorded the
阅读全文
摘要:A bracket sequence is a string containing only characters "(" and ")". A bracket sequence is a string containing only characters "(" and ")". A regula
阅读全文
摘要:You are given an array d1,d2,…,dnd1,d2,…,dn consisting of nn integer numbers. Your task is to split this array into three parts (some of which may be
阅读全文
摘要:本文章从以上两位大佬的博客参考而来!再次感谢! 母函数,又称生成函数,是ACM竞赛中经常使用的一种解题算法,常用来解决组合方面的题目。 在数学中,某个序列的母函数(Generating function,又称生成函数)是一种形式幂级数,其每一项的系数可以提供 关于这个序列的信息。使用母函数解决问题的
阅读全文
摘要:You are given an array a consisting of n integers a1, ..., an. In one operation, you can choose 2 elements ai and aj in which ai is divisible by aj an
阅读全文
摘要:Inhabitants of the Wonderland have decided to hold a regional programming contest. The Judging Committee has volunteered and has promised to organize
阅读全文
摘要:Description 486 作为有史以来最悲惨的男主,我们知道他需要经历一些无限次的死亡和轮回才能进行下一个关卡。 现在给你 n 个连续的时间点,每个时间点 i 上都会有一个心理伤害值 hurt[i],然后告诉你 m 个死亡时间点 deth[i],以及当前死亡时间点会死亡的次数 num[i],和
阅读全文
摘要:一个正整数,如果它能被7整除,或者它的十进制表示法中某个位数上的数字为7,则称其为与7相关的数。求所有小于等于N的与7无关的正整数的平方和。 例如:N = 8,<= 8与7无关的数包括:1 2 3 4 5 6 8,平方和为:155。 Input第1行:一个数T,表示后面用作输入测试的数的数量。(1
阅读全文
摘要:A sequence of N positive integers (10 < N < 100 000), each of them less than or equal 10000, and a positive integer S (S < 100 000 000) are given. Wri
阅读全文
摘要:Your friend Mishka and you attend a calculus lecture. Lecture lasts n minutes. Lecturer tells ai theorems during the i-th minute. Your friend Mishka a
阅读全文

浙公网安备 33010602011771号