关闭
当前搜索:

[置顶] HDU 4592 Boring Game(高斯消元好题)

传送门 Boring GameTime Limit: 8000/4000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 827    Accepted Submission(s): 80Problem Description Zero likes to play a boring...
阅读(820) 评论(0)

[置顶] POJ 1753 Flip Game(高斯消元入门超详细题解)——Northeastern Europe 2000

传送门 Flip Game Time Limit: 3000/1000MS (Java/Others)     Memory Limit: 65535/65535KB (Java/Others) Submit  Status Flip game is played on a rectangular 4×44×4 field with two-s...
阅读(993) 评论(0)

[置顶] 伯努利数应用

组合数学、 伯努利数、 自然数幂和...
阅读(1242) 评论(4)

[置顶] 自然数幂和

首先我来介绍一下什么是自然数幂和:1+2+3+...+i+...+n=?1+2+3+...+i+...+n=?12+22+32+...+i2+...+n21^2 +2^2+3^2+...+i^2+...+n^21k+2k+3k+...+ik+...+nk1^k +2^k+3^k+...+i^k+...+n^k类似上述式子的就是自然数幂和了,那么具体怎么求呢,这就是今天的重点了:1+2+3+...+i...
阅读(1001) 评论(0)

[置顶] 高斯消元整数消元模板

高斯消元就是来接方程组的。(可以跟矩阵联系在一起)#include #include #include #include #include using namespace std; const int MAXN = 1e2+5; int equ, var;///equ个方程 var个变量 int a[MA...
阅读(1745) 评论(0)

[置顶] HDU 5667 Sequence (BestCoder Round #80 1003)——构造矩阵

构造矩阵 + 矩阵的快速幂 + 基础数论...
阅读(1173) 评论(0)

[置顶] HDU 4059 The Boss on Mars(容斥原理 + 四次方求和)

容斥原理 + 四次方求和 + 数论...
阅读(2897) 评论(0)

[置顶] 如何用线性筛法求欧拉函数

线性筛法求欧拉函数...
阅读(1975) 评论(0)

Python3 列表自定义排序

很多时候我们需要对一个list列表进行排序,然而我们想按照自己的排序方式进行排序,那么就需要自定义一个排序函数,然后按照这个排序函数进行排序。 由于Python3 取消了对 cmp 的支持,那么我们就不能用以前的cmp函数,然后按照cmp函数进行排序了,Python2中的自定义布尔函数cmp=custom_cmp(x, y)由Python3中的key=custom_key(x)代替。 p...
阅读(42) 评论(0)

Python——网络爬虫(爬取网页图片)

最近在学习 Python, 然后就试着写了一个简单的Python小程序,爬取一个网页的图片,不得不说 Python 真的强大,以下是爬取 NEFU Online Judge 网站的代码。吐槽:其实爬取所想要东西的时候,正则表达式真的很重要,这个需要好好学习一下。 代码:''' 批量下载 NEFU Online Judge 的图片爬取NEFU Online Judge网站首页的图片,保存到指定路径文...
阅读(49) 评论(0)

计蒜客 置换的玩笑(深搜)

传送门 题目大意: 小蒜头又调皮了。这一次,姐姐的实验报告惨遭毒手。姐姐的实验报告上原本记录着从 1 到 n 的序列,任意两个数字间用空格间隔。但是“坑姐”的蒜头居然把数字间的空格都给删掉了,整个数字序列变成一个长度为 1 到 100 的且首部没有空格的数字串。现在姐姐已经怒了,蒜头找你写个程序快点把试验数据复原。输入输入文件有一行,为一个字符串——被蒜头搞乱的实验数据。字符串的长度在 1 到...
阅读(68) 评论(0)

HDU 5245 Joyful(概率求期望)——2015年上海邀请赛

传送门Sakura has a very magical tool to paint walls. One day, kAc asked Sakura to paint a wall that looks like an M×NM \times N matrix. The wall has M×NM \times N squares in all. In the whole problem we d...
阅读(504) 评论(0)

Gym 101503C Twisting the Number(思维+枚举)

题目大意:有一个整数 nn,其中W(n)W(n)表示 nn 的二进制循环的数的集合,比如说: n=11n=11 二进制表示为 10111011,循环一次得到: 0111==>70111 ==> 7 1110==>141110 ==> 14 1101==>131101 ==> 13 所以 w(11)=7,11,13,14w(...
阅读(286) 评论(0)

HDU 4946 Area of Mushroom(凸包)

传送门 Teacher Mai has a kingdom with the infinite area. He has n students guarding the kingdom. The i-th student stands at the position (xi,yi), and his walking speed is vi. If a point can be rea...
阅读(293) 评论(0)

HDU 5446 Unknown Treasure(中国剩余定理+卢卡斯定理)——2015 ACM/ICPC Asia Regional Changchun Online

传送门On the way to the next secret treasure hiding place, the mathematician discovered a cave unknown to the map. The mathematician entered the cave because it is there. Somewhere deep in the cave, she f...
阅读(446) 评论(0)

HDU 5936 Difference(思维+二分)——2016年中国大学生程序设计竞赛(杭州)

传送门Little Ruins is playing a number game, first he chooses two positive integers yy and KK and calculates f(y,K)f(y, K), heref(y,K)=∑z in every digits of yzK(f(233,2)=22+32+32=22)f(y, K) = \sum_{z\text...
阅读(567) 评论(0)

HDU 5954 Do not pour out(二分+积分)

传送门You have got a cylindrical cup. Its bottom diameter is 2 units and its height is 2 units as well.The height of liquid level in the cup is d (0 ≤ d ≤ 2). When you incline the cup to the maximal angle...
阅读(253) 评论(0)

FZU Problem 1919 K-way Merging sort(大数+记忆化搜索)

传送门As we all known, merge sort is an O(nlogn) comparison-based sorting algorithm. The merge sort achieves its good runtime by a divide-and-conquer strategy, namely, that of halving the list being sorte...
阅读(605) 评论(0)

2017 ACM-ICPC 亚洲区(西安赛区)网络赛 F.Trig Function(论文+组合数)

传送门 f(cos(x))=cos(n∗x)f(cos(x)) = cos(n*x) holds for all xx.Given two integers nn and mm, you need to calculate the coefficient of xmx^m in f(x)f(x), modulo 998244353998244353.Input FormatMultiple te...
阅读(639) 评论(0)

2017 ACM-ICPC 亚洲区(西安赛区)网络赛 B.Coin(基本概率+二项式展开)

传送门 Bob has a not even coin, every time he tosses the coin, the probability that the coin’s front face up is qp(qp≤12)\frac{q}{p}(\frac{q}{p} \le \frac{1}{2}).The question is, when Bob tosses the coi...
阅读(282) 评论(0)

HDU 4336 Card Collector(状态压缩+概率DP)

传送门In your childhood, do you crazy for collecting the beautiful cards in the snacks? They said that, for example, if you collect all the 108 people in the famous novel Water Margin, you will win an ama...
阅读(453) 评论(0)

ZOJ 3380 Patchouli's Spell Cards(概率DP)

传送门 Patchouli Knowledge, the unmoving great library, is a magician who has settled down in the Scarlet Devil Mansion (紅魔館). Her specialty is elemental magic employing the seven elements fire, water...
阅读(277) 评论(0)

Codeforces 148D. Bag of mice(概率DP)

传送门The dragon and the princess are arguing about what to do on the New Year’s Eve. The dragon suggests flying to the mountains to watch fairies dancing in the moonlight, while the princess thinks they...
阅读(191) 评论(0)
642条 共43页1 2 3 4 5 ... 下一页 尾页
    个人资料
    • 访问:486965次
    • 积分:11113
    • 等级:
    • 排名:第1608名
    • 原创:637篇
    • 转载:5篇
    • 译文:0篇
    • 评论:93条
    博客专栏