上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 97 下一页
摘要: 【概述】 组合数学是研究组合与排列问题,其中计数原理、容斥原理、求排列数、求组合数等经常被使用。 【理论相关】 基本计数原理:点击这里容斥原理:点击这里排列数:点击这里组合数:点击这里组合数取模:点击这里卡特兰数列(Catalan):点击这里斯特林数(Stir... 阅读全文
posted @ 2022-09-20 22:59 老程序员111 阅读(95) 评论(0) 推荐(0) 编辑
摘要: Problem Description It is 2012, and it's a leap year. So there is a "February 29" in this year, which is called leap day. Inter... 阅读全文
posted @ 2022-09-20 22:59 老程序员111 阅读(30) 评论(0) 推荐(0) 编辑
摘要: Problem Description Finally Aladdin reached home, with the great magical lamp. He was happier than ever. As he was a nice boy, ... 阅读全文
posted @ 2022-09-20 22:59 老程序员111 阅读(16) 评论(0) 推荐(0) 编辑
摘要: Problem Description If an integer is not divisible by 2 or 5, some multiple of that number in decimal notation is a sequence of... 阅读全文
posted @ 2022-09-20 22:59 老程序员111 阅读(14) 评论(0) 推荐(0) 编辑
摘要: 【题目描述】 小a正在玩一款即时战略游戏,现在他要用航空母舰对敌方阵地进行轰炸 地方阵地可以看做是n×m的矩形 航空母舰总共会派出q架飞机。 飞机有两种,第一种飞机会轰炸以(xi,yi)为中心,对角线长为li的正菱形(也就是两条对角线分别于x轴y轴平行的... 阅读全文
posted @ 2022-09-20 22:59 老程序员111 阅读(19) 评论(0) 推荐(0) 编辑
摘要: 【题目描述】 小a和小b来到了一条布满了黄金的街道上。它们想要带几块黄金回去,然而这里的城管担心他们拿走的太多,于是要求小a和小b通过做一个游戏来决定最后得到的黄金的数量。 游戏规则是这样的: 假设道路长度为n米(左端点为0,右端点为n),同时给出一个数... 阅读全文
posted @ 2022-09-20 22:59 老程序员111 阅读(37) 评论(0) 推荐(0) 编辑
摘要: STL 中,在 头文件里提供了两个利用二分查找的方法在一个排好序的数组中进行查找。 在一个从小到大的排好序的数组中: lower_bound(begin,end,num):从数组的 begin 位置到 end-1 位置二分查找第一个大于等于 num 的数字,... 阅读全文
posted @ 2022-09-20 22:59 老程序员111 阅读(71) 评论(0) 推荐(0) 编辑
摘要: Problem Description A new e-mail service "Berlandesk" is going to be opened in Berland in the near future. The site administrat... 阅读全文
posted @ 2022-09-20 22:59 老程序员111 阅读(17) 评论(0) 推荐(0) 编辑
摘要: Problem Description You are given a table consisting of n rows and m columns. Each cell of the table contains a number, 0 or 1.... 阅读全文
posted @ 2022-09-20 22:59 老程序员111 阅读(114) 评论(0) 推荐(0) 编辑
摘要: Problem Description Given N numbers, X1, X2, ... , XN, let us calculate the difference of every pair of numbers: ∣Xi - Xj∣ (1 ≤... 阅读全文
posted @ 2022-09-20 22:59 老程序员111 阅读(105) 评论(0) 推荐(0) 编辑
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 97 下一页