自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(367)
  • 收藏
  • 关注

原创 爬虫爬取csdn某一分类下的所有文章标题

python+selenium+redis. 整个程序是通过selenium不断点击“刷新“获得新的题目然后存到redis中。 没有selenium可以通过改变ip和游览器取得同样的效果。# -*- coding: utf-8 -*-"""Spyder EditorThis is a temporary script file.author: ParkJiYeonupdate...

2018-05-28 23:30:14 890

原创 HDU 5239 Doom(线段树)

Doom Time Limit: 12000/6000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others) Total Submission(s): 1547 Accepted Submission(s): 426 Problem Description THE END IS COMINGGGGGG! Mik

2017-09-21 22:41:58 374

原创 HDU 6208 The Dominator of Strings(字符串)

The Dominator of StringsTime Limit: 3000/3000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others) Total Submission(s): 887 Accepted Submission(s): 273Problem Description Here you have a

2017-09-17 22:36:57 397

原创 HDU 6216 A Cubic number and A Cubic Number

A Cubic number and A Cubic NumberTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others) Total Submission(s): 224 Accepted Submission(s): 129Problem Description A cubic

2017-09-17 22:32:26 286

原创 2017 ACM-ICPC 亚洲区(西安赛区)网络赛 B. Coin(矩阵快速幂)

传送门 题意:一个硬币正面朝上的概率为q/p,问测试k次后,正面朝上次数为偶数的概率是多少。 题解:设 xi/yi为i次测试后正面朝上为偶次的概率,则x(i+1)/y(i+1)=(1-xi/yi)* q/p+xi/yi*(1-q/p)。x1/y1=1-q/p;但这复杂度是o(k)的,超时。 再拆一下 x(i+1)=q*yi+p*xi-2*q*xi,y(i+1)=p^(i+1).yi是o(1)的

2017-09-16 23:28:47 319

原创 Hrbust 2064 萌萌哒十五酱的宠物~(树链剖分+线段树)

萌萌哒十五酱的宠物~ Time Limit: 2000 MS Memory Limit: 32768 K Total Submit: 48(16 users) Total Accepted: 22(14 users) Rating: Special Judge: No Description 十五酱养了一只很可爱的宠物。。。。。。 一只虫子。。。。TAT 这只虫子特别喜欢爬树。。。。。它在这棵树上

2017-09-15 22:43:07 485

原创 Hrbust oj 2163 棋盘取数(二分图+最大流)

棋盘取数 Time Limit: 1000 MS Memory Limit: 32768 K Total Submit: 66(22 users) Total Accepted: 18(11 users) Rating: Special Judge: No Description 给你一个n*n的格子的棋盘,每个格子里面有一个非负数。现在从中取出若干个数,使得任意的两个数所在的格子没有公共边,就是

2017-09-15 22:23:48 466

原创 HDU 6205 card card card(尺取法)

card card card Time Limit: 8000/4000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 535 Accepted Submission(s): 229Problem DescriptionAs a fan of Doudizhu, WYJ

2017-09-10 23:49:32 613

原创 HDU 6201 transaction transaction transaction

transaction transaction transaction Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 132768/132768 K (Java/Others) Total Submission(s): 349 Accepted Submission(s): 165Problem DescriptionKel

2017-09-10 23:16:20 385

原创 HDU 6198 number number number(斐波那契)

number number number Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 180 Accepted Submission(s): 120Problem DescriptionWe define a sequence

2017-09-10 23:08:43 254

原创 HDU 6197 array array array

array array array Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 192 Accepted Submission(s): 120Problem DescriptionOne day, Kaitou Kiddo h

2017-09-10 23:02:01 303

原创 HDU 6195 cable cable cable

cable cable cable Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 125 Accepted Submission(s): 109Problem DescriptionConnecting the display

2017-09-10 22:54:39 326

原创 Codeforces Round #430 (Div. 2)(A+B+C)

A. Kirill And The Gametime limit per test:2 secondsmemory limit per test:256 megabytesinput:standard inputoutput:standard outputKirill plays a new computer game. He came to the potion store where he ca

2017-09-06 22:31:11 346

原创 “玲珑杯”ACM比赛 Round #20 E -- 造物主的戒律(主席树)

给你一个序列,每次查询区间中小于等于x的所有数字里面第k1小的值以及大于x的所有数字里面第k2小的值,如果不存在,输出-1 每次输出两个数,对于每个数如果不存在,则单独输出-1 INPUT 第一行两个数n,m 第二行n个数表示序列a 后面m行每行五个数l,r,x,k1,k2 OUTPUT 对于每个查询输出答案 SAMPLE INPUT 5 5 1 2 3 4 5 1 5 3 1

2017-08-26 21:42:57 400

原创 HDU 6156 Palindrome Function(数位DP)

Palindrome FunctionTime Limit: 8000/4000 MS (Java/Others) Memory Limit: 256000/256000 K (Java/Others) Total Submission(s): 826 Accepted Submission(s): 452Problem Description As we all know,a pa

2017-08-21 22:31:28 302

原创 HDU Friend-Graph(离散数学)

Friend-GraphTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 611 Accepted Submission(s): 313Problem Description It is well known that small

2017-08-19 23:38:12 302

原创 2017"百度之星"程序设计大赛 - 复赛(1001,1003,1005)

Arithmetic of Bomb Accepts: 1050 Submissions: 1762 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description 众所周知,度度熊非常喜欢数字。 它最近在学习小学算术,第一次发现这个世界上居然

2017-08-18 16:48:08 636

原创 Codeforces Round #428 (Div. 2)(A+B)

A. Arya and Bran time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Bran and his older sister Arya are from the same house. Bran like candies

2017-08-13 11:08:30 382

转载 Codeforces Round #426 (Div. 1) B. The Bakery(dp+线段树)

B. The Bakery time limit per test2.5 seconds memory limit per test256 megabytes inputstandard input outputstandard outputSome time ago Slastyona the Sweetmaid decided to open her own bakery! She bo

2017-08-07 16:01:33 314

原创 玲珑杯1151 - Delivering parcels(主席树)

题目地址 题意:有2*n个物品均分给两个人,物品有两个属性w和v,求俩人物品中max(w)*max(v)的和。 题解: 将物品按w降序排序,则物品1一定属于第一组,枚举2—n,将它们分到第二组,然后枚举最大的v在第一组和第二组的情况,维护一个前缀最大可以减少使用query的次数。 代码:#include<bits/stdc++.h>using namespace std;typedef

2017-08-04 12:06:21 300

原创 玲珑杯 1149 - Buildings(二分+RMQ)

题目地址 题意:给你一个长度为n的序列,问有多少子区间满足max-min<=k. 题解:当l固定时,随着r的增大,max会变大,min会变小,则max-min有单调性,我们二分得到r的最大值,则贡献为r-l+1(最值可以通过RMQ得到)。 代码:#include<iostream>#include<stdio.h>#include<stdlib.h>#include<string.h>

2017-08-03 12:25:06 247

原创 Codeforces Round #427 (Div. 2) C. Star sky(前缀和)

C. Star sky time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output The Cartesian coordinate system is set in the sky. There you can see n stars,

2017-08-03 00:42:29 450

原创 Codeforces Round #427 (Div. 2)(A+B)

A. Key races time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Two boys decided to compete in text typing on the site “Key races”. During the

2017-08-01 21:35:06 339

原创 Codeforces Round #426 (Div. 2) C:The Meaningless Game(思维)

C. The Meaningless Game time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard outputSlastyona and her loyal dog Pushok are playing a meaningless game tha

2017-07-31 21:18:06 419

原创 Codeforces Round #426 (Div. 2)(A+B)

A. The Useless Toy time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard outputWalking through the streets of Marshmallow City, Slastyona have spotted so

2017-07-31 21:00:31 272

转载 hdu 6035 Colorful Tree

题目地址 题意:定义每条边的价值为边上不同颜色的个数,求整棵树的价值。 题解:这里写链接内容 代码:#include<iostream>#include<stdio.h>#include<stdlib.h>#include<string.h>#include<vector>#include<queue>#include<set>#include<algorithm>#inclu

2017-07-29 12:02:02 228

转载 hdu6038 Function

题目地址 题意:给你一个a序列,代表0到n-1的排列;一个b序列代表0到m-1的排列。问你可以找出多少种函数关系,满足f(i)=b[f(a[i])]; 官方题解:QAQ 代码:#include<iostream>#include<stdio.h>#include<stdlib.h>#include<string.h>#include<vector>#include<queue>#

2017-07-29 10:35:05 291

转载 HDU 6034 Balala Power!(贪心)

题目地址 题意:给a-z不同的的值(0-25),将下面的字符串看成一个26进制数,求字符串和转化成十进制的最大值,注意如果一个字符串长度>1,则首字母不能赋值成0。 题解:贪心的想,肯定是高位出现次数多的字母赋大值,我们找一个没出现在首字母并且赋值小的,让它为0. 代码:#include<iostream>#include<stdio.h>#include<stdlib.h>#inclu

2017-07-28 15:17:01 268

原创 2017 Multi-University Training Contest - Team 1(A+K)

A:A题地址 题意:对于给定的n,找到最大的k使得10^k<=2^n. 题解:等式两边同时取log(10)变成k<=log(10)2^n. 代码:#include<iostream>#include<stdio.h>#include<stdlib.h>#include<string.h>#include<vector>#include<queue>#include<algorith

2017-07-25 20:30:23 225

原创 Codeforces Round #425 (Div. 2)(A+B)

A. Sasha and Sticks time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output It’s one more school day now. Sasha doesn’t like classes and is always

2017-07-25 12:47:37 363

转载 FZU Problem 2280 Magic(Hash)

Problem 2280 Magic Accept: 46 Submit: 150 Time Limit: 2000 mSec Memory Limit : 262144 KBProblem DescriptionKim is a magician, he can use n kinds of magic, number from 1 to n. We use string Si t

2017-07-24 16:43:26 627

原创 第八届福建省大学生程序设计竞赛-重现赛(F Problem 2277 Change)DFS序+树状数组

Problem 2277 Change Accept: 38 Submit: 241 Time Limit: 2000 mSec Memory Limit : 262144 KBProblem DescriptionThere is a rooted tree with n nodes, number from 1-n. Root’s number is 1.Each node ha

2017-07-23 16:39:43 598

原创 第八届福建省大学生程序设计竞赛-重现赛(A+D+K+L)

Problem A Frog:鸡兔同笼。。。。Problem D Game:两人分别有数字a,b。每轮两人有两种操作,1:逆序这个数。2:将个位删去。A先手,当两个数字相同时,A获胜。问A能否获胜。 题解:如果b的位数大于a,B获胜。如果B为0,A获胜。如果b是a的逆序,A获胜,其他情况,如果b是a或者逆序a的子串,A获胜。 代码:忘存了。。。。Problem K Wand:n个人排序,至少k个

2017-07-22 22:20:45 1237

原创 倍增lca

void dfs(int u,int f,int d){ deep[u]=d; for(int i=head[u];i!=-1;i=edge[i].next) { int v=edge[i].to; if(v==f)continue; anc[v][0]=u; dfs(v,u,d+1); }}voi

2017-07-21 15:39:56 259

转载 hdu 6031 Innumerable Ancestors(LCA+二分)

Innumerable AncestorsTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 901 Accepted Submission(s): 270Problem Description There is a tree

2017-07-21 15:36:18 290

原创 HDU 6024 Building Shops(DP)

Problem Description HDU’s n classrooms are on a line ,which can be considered as a number line. Each classroom has a coordinate. Now Little Q wants to build several candy shops in these n classrooms.T

2017-07-19 22:32:44 316

原创 矩阵快速幂

struct Matrix{ ll m[sz][sz];};Matrix Mul(Matrix a,Matrix b){ Matrix c; memset(c.m,0,sizeof(c.m)); for(int i=0; i<sz; i++) for(int j=0; j<sz; j++) for(int k=0; k<

2017-07-19 19:19:07 181

转载 sichuan2017 E. Longest Increasing Subsequence(LIS变形)

E. Longest Increasing Subsequence Bobo learned how to compute Longest Increasing Subsequence (LIS) in O(n log n) in ICPCCamp. For those who did not attend ICPCCamp as Bobo, recall LIS(a1, a2, … , an)

2017-07-19 13:15:15 354

转载 FZU Problem 2271 X(最短路)

Problem DescriptionX is a fully prosperous country, especially known for its complicated transportation networks. But recently, for the sake of better controlling by the government, the president Fat B

2017-07-19 10:33:13 746

原创 Sichuan 2017 FSimple Algebra(打表)

F. Simple Algebra Given function f(x, y) = ax2 + bxy + cy2 , check if f(x, y) ≥ 0 holds for all x, y ∈ R. Input The input contains zero or more test cases and is terminated by end-of-file. Each te

2017-07-18 22:27:07 442

空空如也

空空如也

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

TA关注的人

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