随笔分类 - 暑期训练;
摘要:题目描述 Kanade selected n courses in the university. The academic credit of the i-th course is s[i] and the score of the i-th course is c[i]. At the univ
阅读全文
摘要:题目描述 小B有一个序列,包含N个1~K之间的整数。他一共有M个询问,每个询问给定一个区间[L..R],求Sigma(c(i)^2)的值,其中i的值从1到K,其中c(i)表示数字i在[L..R]中的重复次数。小B请你帮助他回答询问。 输入输出格式 输入格式: 第一行,三个整数N、M、K。 第二行,N
阅读全文
摘要:1001 Problem Description Given an integer n, Chiaki would like to find three positive integers x, y and z such that: n=x+y+z, x∣n, y∣n, z∣n and xyz is
阅读全文
摘要:Birthday Paradox Sometimes some mathematical results are hard to believe. One of the common problems is the birthday paradox. Suppose ...
阅读全文
摘要:Halloween treatsEvery year there is the same problem at Halloween: Each neighbour is only willing to give a certain total number of sw...
阅读全文
摘要:Patrick and Shopping今天 Patrick 等待着他的朋友 Spongebob来他家玩。为了迎接 Spongebob,Patrick 需要去他家附近的两家商店 买一些吃的。他家离第一家商店有d1米远,离第二家商店有d2米远。还有,两家商店之间的距离...
阅读全文
摘要:In this problem you are to calculate the sum of all integers from 1 to n, but you should take all powers of two with minus in the sum....
阅读全文

浙公网安备 33010602011771号