自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Simon的博客,已转移至 https://www.cnblogs.com/--Simon/

此博客已转移至 https://www.cnblogs.com/--Simon/

  • 博客(80)
  • 收藏
  • 关注

原创 此博客已转移至 https://www.cnblogs.com/--Simon/

此博客已转移至 https://www.cnblogs.com/–Simon/

2019-10-13 21:11:00 214

原创 Codeforces Round #578 (Div. 2)-D. White Lines-差分前缀和

Codeforces Round #578 (Div. 2)-D. White Lines-差分前缀和【Problem Description】给你一个字符矩阵,其中B表示黑色,W表示白色。你可以任意选择一个格子(i,j),将(i,j)~(i+k-1,j+k-1)的矩形区域内的格子全部刷为白色。然后问最多可以有多少个行列满足一整行是白色或者一整列是白色。【Solution】思路是,对...

2019-08-15 19:02:02 367

原创 2014-ACM-ICPC-西安赛区区域赛-H. The Problem to Make You Happy-图上博弈论

#2014-ACM-ICPC-西安赛区区域赛-H. The Problem to Make You Happy-图上博弈论【Description】Alice and Bob are good friends, as in every other storyline. One day Alice and Bob areplaying an interesting game. The game...

2019-07-19 15:59:20 446

原创 2018-ACM-ICPC-宁夏赛区网络赛-H.Rock Paper Scissors Lizard Spock-FFT

2018-ACM-ICPC-宁夏赛区网络赛-H.Rock Paper Scissors Lizard Spock-FFT【Description】Didi is a curious baby. One day, she finds a curious game, which named Rock Paper Scissors Lizard Spock.The game is an upg...

2019-07-12 18:16:40 1826

原创 Educational Codeforces Round 66 (Rated for Div. 2)-F. The Number of Subpermutations-哈希方法求子排列个数

Educational Codeforces Round 66 (Rated for Div. 2)-F. The Number of Subpermutations-哈希方法求子排列个数【Description】You have an array a1,a2,…,an.Let's call some subarray al,al+1,…,ar of this array a subper...

2019-07-10 14:59:34 249

原创 Codeforces Global Round 3-F. Foo Fighters-思维

Codeforces Global Round 3-F. Foo Fighters-思维【Description】You are given n objects. Each object has two integer properties: vali — its price — and maski. It is guaranteed that the sum of all prices i...

2019-07-08 16:31:41 298

原创 BZOJ-4559 [JLoi2016]成绩比较-dp+组合数学+拉格朗日插值

#BZOJ-4559 [JLoi2016]成绩比较-dp+组合数学+拉格朗日插值【Description】G系共有n位同学,M门必修课。这N位同学的编号为0到N-1的整数,其中B神的编号为0号。这M门必修课编号为0到M-1的整数。一位同学在必修课上可以获得的分数是1到Ui中的一个整数。如果在每门课上A获得的成绩均小于等于B获得的成绩,则称A被B碾压。在B神的说法中,G系共有K位同学被他碾压...

2019-07-06 14:16:44 308

原创 2018-ACM-CCPC-湘潭邀请赛-I-Longest Increasing Subsequence-思维-最长上升子序列变形

2018-ACM-CCPC-湘潭邀请赛-I-Longest Increasing Subsequence-思维-最长上升子序列变形【Description】Bobo has a sequence a1,a2,…,an. Let f(x) be the length of longest *strictly* increasing subsequence after replacing all...

2019-05-09 09:28:39 405

原创 Codeforces Round #551 (Div. 2)-D. Serval and Rooted Tree-树上dp-逆思维

Codeforces Round #551 (Div. 2)-D. Serval and Rooted Tree-树上dp-逆思维【Description】Now Serval is a junior high school student in Japari Middle School, and he is still thrilled on math as before.As a t...

2019-04-14 22:42:36 267

原创 Codeforces Round #551 (Div. 2)-C. Serval and Parenthesis Sequence-括号匹配问题

#Codeforces Round #551 (Div. 2)-C. Serval and Parenthesis Sequence-括号匹配问题【Description】Serval soon said goodbye to Japari kindergarten, and began his life in Japari Primary School.In his favorite ...

2019-04-14 13:01:10 305

原创 图论-最短路个人总结

图论-最短路个人总结差分约束如若一个系统由n个变量和m个不等式组成,并且这m个不等式对应的系数矩阵中每一行有且仅有一个1和-1,其它的都为0,这样的系统称为差分约束( difference constraints )系统对于形如:B−A<=c⋯(1)C−B<=a⋯(2)C−A<=b⋯(3)对于形如:\\B-A<=c\cdots (1...

2019-04-08 22:09:56 254

原创 Codeforces Global Round 2-D. Frets On Fire-二分

Codeforces Global Round 2-D. Frets On Fire-二分【Description】Miyako came to the flea kingdom with a ukulele. She became good friends with local flea residents and played beautiful music for them every...

2019-04-07 13:16:27 425 2

原创 Codeforces Round #544 (Div. 3)-F2. Spanning Tree with One Fixed Degree-求无向图中满足1号节点的度为d的生成树

Codeforces Round #544 (Div. 3)-F2. Spanning Tree with One Fixed Degree-求无向图中满足1号节点的度为d的生成树【Description】You are given an undirected unweighted connected graph consisting of n vertices and m edges. I...

2019-04-01 17:59:19 161

原创 Codeforces Round #544 (Div. 3)-E. K Balanced Teams-在一定条件下n个学生分成k组,所能分配的最大学生数-dp or 记忆化搜索

Codeforces Round #544 (Div. 3)-E. K Balanced Teams-在一定条件下n个学生分成k组,所能分配的最大学生数-dp or 记忆化搜索【Description】You are a coach at your local university. There are n students under your supervision, the progr...

2019-04-01 13:35:45 353

原创 Codeforces Round #538 (Div. 2)-D. Flood Fill-求将不同颜色块刷成一种的颜色所需要的最少次数-区间dp or 基础dp

Codeforces Round #538 (Div. 2)-D. Flood Fill-求将不同颜色块刷成一种的颜色所需要的最少次数-区间dp or 基础dp【Description】You are given a line of n colored squares in a row, numbered from 1 to n from left to right. The i-th sq...

2019-03-31 14:16:15 372

原创 Codeforces Round #538 (Div. 2)-C. Trailing Loves (or L'oeufs?)-b进制下n!的尾零的个数

Codeforces Round #538 (Div. 2)-C. Trailing Loves (or L’oeufs?)-b进制下n!的尾零的个数【Description】Aki is fond of numbers, especially those with trailing zeros. For example, the number 9200 has two trailing z...

2019-03-30 22:10:10 199

转载 积性函数前缀和-个人总结

积性函数前缀和-个人总结【写在前面】用了一个多星期将这部分大致弄懂了,东西太多,有很多技巧,自己重新写了一下,记录自己的理解。内容与原文基本一致,在其基础上加上了一些我感觉比较重要的但他没有详细说明的东西。以下都是我逐字打出来的。如果有什么错误,请指出。前置技能里面的东西需要充分理解和记忆,在后面推导过程中会多次用到前置技能里面的东西。转载出处:author: skywalkerto...

2019-03-21 22:09:16 638

转载 (转+原)线性基学习总结(详)

(转+原)线性基学习总结(详)概述基(basis是线性代数中的一个概念,它是描述、刻画向量空间的基本工具。而在现行的 OI 题目中,通常在利用基在异或空间中的一些特殊性质来解决题目,而这一类题目所涉及的知识点被称作「线性基」。预备知识向量空间(vector space)向量空间 - 维基百科定义 (F,V,+,⋅)(F,V,+,⋅)(F,V,+,⋅)(F,V,+,⋅)(F, V, +,...

2019-03-07 17:55:35 555

原创 Codeforces Round #532 (Div. 2)-F. Ivan and Burgers-线性基

Codeforces Round #532 (Div. 2)-F. Ivan and Burgers-线性基【Description】Ivan loves burgers and spending money. There are burger joints on the street where Ivanlives. Ivan has friends, and the -th f...

2019-03-07 17:49:23 352

原创 CROC 2016 - Final Round-A. Gambling Nim-线性基

CROC 2016 - Final Round-A. Gambling Nim-线性基【Description】As you know, the game of "Nim" is played with n piles of stones, where the i-th pile initially contains ai stones. Two players alternate the ...

2019-03-06 21:11:19 244

原创 (详解)Intel Code Challenge Final Round (Div. 1 + Div. 2)-G. Xor-matic Number of the Graph-线性基

(详解)Intel Code Challenge Final Round (Div. 1 + Div. 2, Combined)-G. Xor-matic Number of the Graph-线性基【Description】You are given an undirected graph, constisting of n vertices and m edges. Each edge ...

2019-03-06 19:31:58 218

原创 (详解)BZOJ-3811-玛里苟斯-线性基-任意组合的异或值为x,求x^k的期望

BZOJ-3811-玛里苟斯-线性基-任意组合的异或值为x,求x^k的期望【Description】魔法之龙玛里苟斯最近在为加基森拍卖师的削弱而感到伤心,于是他想了一道数学题。S 是一个可重集合,S={a1,a2,…,an}。等概率随机取 S 的一个子集 A={ai1,…,aim}。计算出 A 中所有元素的异或 x, 求 x^k 的期望。【Input】第一行两个正整数 n, k。以...

2019-03-03 21:35:26 382

原创 BZOJ-2728-与非-线性基-任意组合的与非值在[l,r]内的个数

BZOJ-2728-与非-线性基-任意组合的与非值在[l,r]内的个数【Description】给定n个非负整数A1,A2……An和约定位数k,利用NAND运算符与括号,每个数可以用任意次,请你求出范围[l,r]内可以被计算的数有多少个。【Input】输入文件第一行是用空格隔开的四个正整数N,K,L和R,接下来的一行是N个非负整数A1,A2……AN,其含义如上所述。100%的数据满足...

2019-03-01 22:31:59 253

原创 BZOJ-2844-albus就是要第一个出场-线性基-求一个数在所有异或组合中的排名

BZOJ-2844-albus就是要第一个出场-线性基-求一个数在所有异或组合中的排名【Description】已知一个长度为n的正整数序列A(下标从1开始), 令 S = { x | 1 <= x <= n }, S 的幂集2^S定义为S 所有子集构成的集合。定义映射 f : 2^S -> Zf(空集) = 0f(T) = XOR A[t] , 对于一切t属于T现在alb...

2019-03-01 14:08:58 328

原创 BZOJ-2115-Xor-异或线性基-求图上路径异或和最大值

BZOJ-2115-Xor-异或线性基-求图上路径异或和最大值【Description】考虑一个边权为非负整数的无向连通图,节点编号从1到n,试求出一条从1号节点到n号节点的路径,使得路径上经过的边的权值的异或和最大。路径可以重复经过某些点或边,当一条边在一条路径中出现多次时,其边权在计算异或和时也要被计算相应多的次数。【Input】第一行包含两个整数N和 M, 表示该无向图中点的数...

2019-03-01 12:07:50 607

原创 Codeforces Round #532 (Div. 2)-E. Andrew and Taxi-二分+拓扑排序

Codeforces Round #532 (Div. 2)-E. Andrew and Taxi-二分+拓扑排序【Description】Andrew prefers taxi to other means of transport, but recently most taxi drivers have been acting inappropriately. In order to e...

2019-02-27 20:05:39 301

原创 树状数组应用汇总-二维区间查询,区间修改差分公式推导

树状数组个人总结单点修改,区间查询int tree[maxn];inline int lowbit(int x){ return x&(-x);}inline void update(int x,int val){ //将x处的值增加val for(int i=x;i<maxn;i+=lowbit(i)){ tree[i]+=val; ...

2019-02-15 19:50:51 361

原创 Codeforces Round #527 (Div. 3)-E. Minimal Diameter Forest-树的直径与合并

codeforce-1092-E. Minimal Diameter Forest-树的直径与合并【Description】You are given a forest — an undirected graph with n vertices such that each its connected component is a tree.The diameter (aka "long...

2019-01-18 18:14:07 432

原创 Codeforces Round #527 (Div. 3)-F. Tree with Maximum Cost-树上换根

codeforce-1092-F. Tree with Maximum Cost-树上换根【Description】You are given a tree consisting exactly of n vertices. Tree is a connected undirectedgraph with n−1 edges. Each vertex v of this tree has a...

2019-01-17 14:39:36 222

原创 Codeforces Round #514 (Div. 2)-E. Split the Tree-树上倍增

Codeforce-1059-E. Split the Tree-树上倍增【Description】You are given a rooted tree on n vertices, its root is the vertex number 1. The i-th vertex contains a number wi. Split it into the minimum possibl...

2019-01-16 13:58:40 268

原创 大数据集群VM搭建步骤

大数据集群VM搭建步骤Shell 脚本vim sh1cd /usrlschmod +x sh1./sh1##基本环境配置配置网络和主机名**(master,slave1,slave2)**vi /etc/hostsNETWORKING=yesHOSTNAME=masterhostnamectl set-hostname mastercd /etc/sysconf...

2018-12-05 19:25:38 586

原创 Zookeeper 配置文件

Zookeeper 配置文件修改主机名到IP地址的映射vim /etc/hosts192.168.61.134 master master.root192.168.61.135 slave1 slave1.root192.168.61.136 slave2 slave2.rootconf/zoo.cfg配置dataDir=/usr/zookeeper/zookeeper-3.4.1...

2018-12-05 19:25:06 259

原创 Hive 命令及相关配置文件

Hive 命令及相关配置文件Shell命令Hive数据库的操作创建db数据库create database db;查看所有数据库show databases;查看数据库的路径及信息describe database db;删除名为db的数据库drop database db;使用数据库dbuse db;Hive数据表的操作创建一个名为cat的内部表creat...

2018-12-05 19:24:19 739

原创 Hbase 命令及配置文件

Hbase 命令及配置文件Shell 命令进入hbase 命令模式hbase shell版本,状态,用户versionstatuswhoami查看表list创建表create 'table_name','c1'查看表是否存在exists 'table_name'查看表结构desc 'table_name'修改表结构,将列族‘c1’的生存期限改为30天(2...

2018-12-05 19:23:49 531

原创 Hadoop相关配置文件-命令

Hadoop相关配置文件-命令Hadoop Shell 命令hadoop 格式化hadoop namenode -format启动hadoop$HADOOP_HOME/sbin/start-all.sh进入安全模式hdfs dfsadmin -safemode enter退出安全模式hdfs dfsadmin -safemode leave在hadoop上创建文件夹h...

2018-12-05 19:22:54 809

原创 Cenos7下安装python爬虫所需包

Cenos7下安装python爬虫所需包安装setuptoolswget https://bootstrap.pypa.io/ez_setup.py -O - | python unzip setuptools-33.1.1.zip cd setuptools-33.1.1python2.7 setup.py build安装pipwget https://bootstrap....

2018-12-05 19:21:30 274

原创 HDU-2588-GCD-数论-欧拉函数+思维

HDU-2588-GCD-数论-欧拉函数+思维【Description】The greatest common divisor GCD(a,b) of two positive integers a and b,sometimes written (a,b),is the largest divisor common to a and b,For example,(1,2)=1,(12,18...

2018-09-29 20:18:57 255

原创 POJ-3243-Clever Y-扩展Bsgs算法-已知a,c,p,和a^b=c(mod p),求b

POJ-3243-Clever Y-扩展Bsgs算法-已知a,c,p,和a^b=c(mod p),求b 【Description】Little Y finds there is a very interesting formula in mathematics:XYmod Z=KX^Y mod\:Z=KXYmodZ=KGiven X, Y, Z, we...

2018-09-28 18:48:05 254

原创 UVA-11754-Code Feat-数论-中国剩余定理+枚举

UVA-11754-Code Feat-数论-中国剩余定理+枚举【Description】Hooray! Agent Bauer has shot the terrorists, blown up the bad guy base, saved the hostages, exposedthe moles in the government, prevented an environment...

2018-09-23 20:30:45 277

原创 POJ-1061-青蛙的约会-数论-扩展欧几里得

POJ-1061-青蛙的约会-数论-扩展欧几里得【Description】两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为止。可是它们出发之前忘记了一件很重要的事情,既没有问清楚对方的特征,也没有约定见面的具体位置。不过青蛙们都是很乐观的,它们觉得只要一直朝着某个方向跳下去,总能碰到对方的。但是除非这...

2018-09-21 21:44:55 215

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

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