代码改变世界

今日的我要超越昨日的我,明日的我要胜过今日的我;以创作出更好的代码为目标,不断地超越自己。...

排序:
默认
按更新时间
按访问量

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)...

2016-09-11 12:09:11

阅读数:939

评论数: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 r...

2016-09-05 16:56:29

阅读数:1158

评论数:0

伯努利数应用

组合数学、 伯努利数、 自然数幂和

2016-08-07 18:13:40

阅读数:1588

评论数: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+....

2016-08-06 11:08:22

阅读数:1114

评论数:0

高斯消元整数消元模板

高斯消元就是来接方程组的。(可以跟矩阵联系在一起)#include <iostream> #include <cstdio> #include <cstring> #include <cstdlib> #include <cmath> u...

2016-06-17 10:52:06

阅读数:1822

评论数:0

HDU 5667 Sequence (BestCoder Round #80 1003)——构造矩阵

构造矩阵 + 矩阵的快速幂 + 基础数论

2016-04-19 13:09:47

阅读数:1344

评论数:0

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

容斥原理 + 四次方求和 + 数论

2016-04-08 19:45:54

阅读数:3118

评论数:0

如何用线性筛法求欧拉函数

线性筛法求欧拉函数

2016-03-24 12:27:16

阅读数:2792

评论数:0

机器学习之感知器——and运算的实现

概要:感知器是人工神经网络中的一种典型结构,它可以被视为一种最简单形式的前馈式人工神经网络,是一种二元线性分类器,把矩阵上的输入(实数值向量)映射到输出值 f(x)f(x)上(一个二元的值)。 f(x)={1,0,if w∗x+b>0elsef(x)=\begin{cases}1, &a...

2017-12-26 20:52:57

阅读数:536

评论数:0

解决PHP调用Word组件DCOM权限问题

1. 首先必须要在电脑上安装 Office 2. windows+r : 输入 dcomcnfg.exe 打开组件服务,然后双击 组件服务 ==> 双击 计算机 ==> 双击 我的电脑 ==> 打开 DCOM配置 找到 Microsoft Word 97 - 2003 文档 然...

2017-12-21 20:42:35

阅读数:187

评论数:0

Python3 列表自定义排序

很多时候我们需要对一个list列表进行排序,然而我们想按照自己的排序方式进行排序,那么就需要自定义一个排序函数,然后按照这个排序函数进行排序。 由于Python3 取消了对 cmp 的支持,那么我们就不能用以前的cmp函数,然后按照cmp函数进行排序了,Python2中的自定义布尔函数cmp...

2017-12-14 20:17:55

阅读数:890

评论数:0

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

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

2017-12-13 21:28:59

阅读数:405

评论数:0

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

传送门 题目大意: 小蒜头又调皮了。这一次,姐姐的实验报告惨遭毒手。姐姐的实验报告上原本记录着从 1 到 n 的序列,任意两个数字间用空格间隔。但是“坑姐”的蒜头居然把数字间的空格都给删掉了,整个数字序列变成一个长度为 1 到 100 的且首部没有空格的数字串。现在姐姐已经怒了,蒜头找你写个程...

2017-11-24 20:47:00

阅读数:233

评论数: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×N...

2017-10-26 17:32:07

阅读数:711

评论数:0

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

题目大意:有一个整数 nn,其中W(n)W(n)表示 nn 的二进制循环的数的集合,比如说: n=11n=11 二进制表示为 10111011,循环一次得到: 0111==>70111 ==> 7 1110==>141110 ==> ...

2017-10-20 09:20:29

阅读数:417

评论数: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), ...

2017-10-16 10:51:10

阅读数:404

评论数: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 be...

2017-10-10 20:34:54

阅读数:617

评论数: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 digit...

2017-10-09 20:38:12

阅读数:737

评论数: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...

2017-10-07 09:46:57

阅读数:415

评论数: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 st...

2017-10-05 21:10:30

阅读数:763

评论数: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...

2017-09-17 20:49:59

阅读数:904

评论数: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 \...

2017-09-16 20:59:24

阅读数:424

评论数: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 i...

2017-09-06 16:38:50

阅读数:632

评论数: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 elem...

2017-09-05 17:46:28

阅读数:390

评论数: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 danci...

2017-09-03 18:23:18

阅读数:299

评论数:0

POJ 2151 Check the difficulty of problems(概率DP)

传送门 Organizing a programming contest is not an easy job. To avoid making the problems too difficult, the organizer usually expect the contest result...

2017-09-03 15:44:50

阅读数:490

评论数:0

ZOJ 3329 One Person Game——(概率DP+待定系数求解方程)

传送门 There is a very simple and interesting one-person game. You have 3 dice, namely Die1, Die2 and Die3. Die1 has K1 faces. Die2 has K2 faces...

2017-09-01 18:10:22

阅读数:503

评论数:0

ZOJ 3203 Light Bulb——(三分求极值)

传送门 Compared to wildleopard’s wealthiness, his brother mildleopard is rather poor. His house is narrow and he has only one light bulb in his ho...

2017-08-29 19:22:52

阅读数:302

评论数:0

POJ 3301 Texas Trip(最小正方形覆盖+三分)

传送门 After a day trip with his friend Dick, Harry noticed a strange pattern of tiny holes in the door of his SUV. The local American Tire store sells...

2017-08-28 19:59:02

阅读数:471

评论数:0

POJ 2429 GCD & LCM Inverse(大整数素因子分解+二进制枚举)

GCD & LCM InverseTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 16540Accepted: 3061DescriptionGiven two positive integers a and b, we c...

2017-08-27 20:19:09

阅读数:355

评论数:0

HDU 6134 Battlestation Operational(基本数论+莫比乌斯反演)——2017 Multi-University Training Contest - Team 8

传送门Battlestation OperationalTime Limit: 6000/3000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 570    Accepted S...

2017-08-27 14:10:38

阅读数:590

评论数:0

HDU 6172 Array Challenge(打表+矩阵快速幂)——2017 Multi-University Training Contest - Team 10

传送门 Array ChallengeTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 153428/153428 K (Java/Others)Total Submission(s): 203    Accepted Submiss...

2017-08-25 10:21:47

阅读数:167

评论数:0

HDU 6128 Inverse of sum(数论)——2017 Multi-University Training Contest - Team 7

传送门 Inverse of sumTime Limit: 6000/3000 MS (Java/Others)    Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 326    Accepted Submissi...

2017-08-16 20:59:06

阅读数:999

评论数:2

HDU 6127 Hard challenge(思维+计算几何)——2017 Multi-University Training Contest - Team 7

传送门Just do itTime Limit: 5000/2500 MS (Java/Others)    Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 851    Accepted Submission(s):...

2017-08-16 16:10:35

阅读数:210

评论数:0

BZOJ 3884: 上帝与集合的正确用法(欧拉函数)——有趣的题目

传送门3884: 上帝与集合的正确用法Time Limit: 5 Sec  Memory Limit: 128 MBSubmit: 2439  Solved: 1079[Submit][Status][Discuss]Description 根据一些书上的记载,上帝的一次失败的创世经历是这样的: ...

2017-08-14 13:53:37

阅读数:186

评论数:0

HDU 2298 Toxophily(三分+二分)

传送门 Toxophily Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2304    Accepted Submission(s)...

2017-08-11 20:17:08

阅读数:512

评论数:0

HDU 6093 Rikka with Number(java大数+思维)

传送门 Rikka with NumberTime Limit: 8000/4000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 79    Accepted Submissi...

2017-08-08 20:44:37

阅读数:871

评论数:0

HDU 6061 RXD and functions(NTT+卷积)

传送门 RXD and functionsTime Limit: 4000/2000 MS (Java/Others)    Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 532    Accepted Submi...

2017-08-04 12:07:23

阅读数:737

评论数:0

HDU 6069 Counting Divisors(素数筛法+枚举+技巧)——2017 Multi-University Training Contest - Team 4

传送门 Counting DivisorsTime Limit: 10000/5000 MS (Java/Others)    Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 741    Accepted Subm...

2017-08-03 20:34:11

阅读数:1302

评论数:2

HDU 6048 Puzzle(找规律)——2017 Multi-University Training Contest - Team 2

传送门 PuzzleTime Limit: 4000/2000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 405    Accepted Submission(s): 2...

2017-07-31 19:03:55

阅读数:460

评论数:0

HDU 6053 TrickGCD(分块+容斥)——2017 Multi-University Training Contest - Team 2

传送门 TrickGCDTime Limit: 5000/2500 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 2177    Accepted Submission(s)...

2017-07-30 11:28:14

阅读数:489

评论数:0

HDU 6050 Funny Function(构造矩阵+推公式)——2017 Multi-University Training Contest - Team 2

传送门 Funny FunctionTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 724    Accepted Submission...

2017-07-28 16:07:18

阅读数:711

评论数:0

HDU 6055 Regular polygon(计算几何+思维)——2017 Multi-University Training Contest - Team 2

传送门 Regular polygonTime Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1187    Accepted Submissi...

2017-07-28 11:26:10

阅读数:592

评论数:0

HDU 6038 Function(找规律)——2017 Multi-University Training Contest - Team 1

传送门 FunctionTime Limit: 4000/2000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1034    Accepted Submission(s)...

2017-07-26 17:51:09

阅读数:749

评论数:0

FOJ Problem 2283 Tic-Tac-Toe(暴力枚举)——第八届福建省大学生程序设计竞赛-重现赛

传送门 Kim likes to play Tic-Tac-Toe.Given a current state, and now Kim is going to take his next move. Please tell Kim if he can win the game in next ...

2017-07-24 19:41:01

阅读数:794

评论数:0

玲珑杯 1143 - 计算几何你瞎暴力(暴力+YY)——“玲珑杯”ACM比赛 Round #18

1143 - 计算几何你瞎暴力 Time Limit:5s Memory Limit:256MByte Submissions:1828Solved:365 DESCRIPTION 今天HHHH考完了期末考试,他在教学楼里闲逛,他看着教学楼里一间间的教室,于是开始思考: 如果...

2017-07-17 19:35:29

阅读数:271

评论数:0

玲珑杯 1144 - 数论你还会快速幂(打表找规律)

传送门解题思路:官方题解:B. 数论你还会快速幂看到nn比pp大了不到100个,我们可以思考一下假如我们只算到pp或者p−1p-1会是怎么样的即考虑函数∑p−1i=1ik mod p\sum_{i=1}^{p-1}i^k\ mod \ p我们先打个表能发现当kk是p−1p-1的倍数的时候这个值是p...

2017-07-17 19:34:34

阅读数:730

评论数:0

ZOJ 3829 Known Notation(模拟+YY)——The 2014 ACM-ICPC Asia Mudanjiang Regional Cont

传送门 Do you know reverse Polish notation (RPN)? It is a known notation in the area of mathematics and computer science. It is also known as postfix no...

2017-07-11 21:11:01

阅读数:505

评论数:0

HDU 5531 Rebuild(三分)——2015ACM/ICPC亚洲区长春站

传送门 RebuildTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 2483    Accepted Submission(s):...

2017-07-08 18:13:52

阅读数:704

评论数:0

51NOD 1806 wangyurzee的树(容斥原理 + 组合数学)

传送门 wangyurzee有n个各不相同的节点,编号从1到n。wangyurzee想在它们之间连n-1条边,从而使它们成为一棵树。 可是wangyurzee发现方案数太多了,于是他又给出了m个限制条件,其中第i个限制条件限制了编号为u[i]的节点的度数不能为d[i]。 一个节点的度数,就是...

2017-06-29 17:46:05

阅读数:547

评论数:7

提示
确定要删除当前文章?
取消 删除
关闭
关闭