摘要: The 44th World Finals of the International Collegiate Programming Contest (ICPC 2020) will be held in Moscow, Russia. To celebrate this annual event f 阅读全文
posted @ 2019-05-03 19:16 kongbb 阅读(258) 评论(0) 推荐(0) 编辑
摘要: 有一个N阶方阵 第i行,j列的值Aij =i2 + 100000 × i + j2 - 100000 × j + i × j,需要找出这个方阵的第M小值. 有一个N阶方阵 第i行,j列的值Aij =i2 + 100000 × i + j2 - 100000 × j + i × j,需要找出这个方阵的 阅读全文
posted @ 2019-05-01 17:13 kongbb 阅读(207) 评论(0) 推荐(0) 编辑
摘要: Median Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 12453 Accepted: 4357 Description Given N numbers, X1, X2, ... , XN, let us calculate 阅读全文
posted @ 2019-04-30 14:41 kongbb 阅读(135) 评论(0) 推荐(0) 编辑
摘要: D. Beautiful Array time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You are given an arra 阅读全文
posted @ 2019-04-23 19:50 kongbb 阅读(116) 评论(0) 推荐(0) 编辑
摘要: C. Problem for Nazar time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output C. Problem for Nazar 阅读全文
posted @ 2019-04-23 17:17 kongbb 阅读(246) 评论(0) 推荐(0) 编辑
摘要: Tom owns a company and he is the boss. There are n staffs which are numbered from 1 to n in this company, and every staff has a ability. Now, Tom is g 阅读全文
posted @ 2019-04-21 20:07 kongbb 阅读(145) 评论(0) 推荐(0) 编辑
摘要: E. Two Teams time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output There are nn students stand 阅读全文
posted @ 2019-04-20 22:28 kongbb 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 就是统计1~n中出现的各个数字的次数,当然是在16进制下。 不过有个区间问题的小技巧,统计从 [x,y] 可以转换成 从 [1,y] 减去 [1,x-1]。 不过要分类讨论一下,因为有可能会出现溢出,从ffffffff +1 得到 00000000 就是溢出了。 因为 n < 1e9 所以只会溢出一 阅读全文
posted @ 2019-04-13 17:24 kongbb 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 高斯消元和二进制枚举都可以做这道题。 这里是高斯消元的代码 #include<cstdio> #include<cstring> #include<algorithm> using namespace std; int a[35][35]; // int x[35]; // 记录答案 void in 阅读全文
posted @ 2019-04-12 15:59 kongbb 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 从数组中选择几个数,要求他们的乘积可以开平方,问有多少种方案。 先将单个数拆分成质因子,对于这个数而言,那些指数为奇数的质因子会使这个数无法被开平方。 所以我们需要选择一个对应质因子指数为奇数的元素,将他们两个放在一个方案中,但是又有可能会引入其他的质因子。 这样就变成了求解行列式中自由变元的数量问 阅读全文
posted @ 2019-04-10 22:33 kongbb 阅读(139) 评论(0) 推荐(0) 编辑