自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

tystrwor的博客

。。。

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

原创 Codeforces 1027E Inverse Coloring【DP】

题目链接E. Inverse ColoringYou are given a square board, consisting of nn rows and nn columns. Each tile in it should be colored either white or black.Let's call some coloring beautiful if each pair...

2018-08-29 21:11:32 385

原创 【树上启发式合并】 HDU6430

例题:给一棵n个节点的树,每个节点有一个颜色,q次查询颜色c在子树i上出现次数。首先我们可以快速想到一种时间复杂度为的暴力做法。为啦和启发式合并相关,我们考虑这样的暴力算法。void dfs(int x,int fa){ for(int i=0;i<g[x].size();i++) { int y=g[x][i]; if(y==...

2018-08-23 17:35:57 530

原创 HDU 6435 CSGO 【脑洞】

 Problem J. CSGOTime Limit: 4000/2000 MS (Java/Others)    Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 248    Accepted Submission(s): 122 Problem DescriptionYou are playin...

2018-08-22 21:27:00 305

原创 牛客多校10H Rikka with Ants 【类欧几里得算法】

链接:https://www.nowcoder.com/acm/contest/148/H来源:牛客网 There are two small ants on Rikka's desk. If we consider Rikka's desk as a two-dimensional Cartesian coordinate system, both of them have coordi...

2018-08-21 17:30:32 549 1

原创 18牛客多校8H

链接:https://www.nowcoder.com/acm/contest/146/H 来源:牛客网题目描述 Niuniu likes playing games. He has n piles of stones. The i-th pile has ai stones. He wants to play with his good friend, UinUin. Niuniu c...

2018-08-17 17:04:10 290

原创 HDU 6360 【Polya定理+DP】

HDU6360 KaleidoscopeTime Limit: 6000/3000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 35    Accepted Submission(s): 24Problem DescriptionJohn loves c...

2018-08-11 11:27:24 370 1

原创 牛客多校7C Bit Compression 【搜索优化】

链接:https://www.nowcoder.com/acm/contest/145/C来源:牛客网Bit Compression时间限制:C/C++ 2秒,其他语言4秒空间限制:C/C++ 262144K,其他语言524288KSpecial Judge, 64bit IO Format: %lld题目描述A binary string s of length N = 2...

2018-08-10 11:17:14 147

转载 HDU6372 sacul 【Lucas定理】

HDU6372 Code#include<bits/stdc++.h>using namespace std;typedef long long LL;const LL MOD=1e9+7;const int N=15e5+10;const int M=15e5+10;LL fac[N],inv[N];LL pod(LL x,LL n,LL MOD){...

2018-08-10 10:01:44 260

原创 【Burnside引理 Polya定理 小结】

burnsideburnsideburnside引理:设G={a1,a2,…ag}G={a1,a2,…ag}G=\{a_1,a_2,…a_g\}是目标集[1,n][1,n][1,n]上的置换群。每个置换都写成不相交循环的乘积。C(ak)C(ak)C(a_k)是在置换akaka_k的作用下不动点的个数,也就是长度为1的循环的个数。通过上述置换的变换操作后可以相等的元素属于同一个等价类。若G将[1,n...

2018-08-07 20:09:00 298

原创 HDU 6357 Hills And Valleys 【DP】

 Hills And ValleysTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 296    Accepted Submission(s): 98Special Judge Problem Description...

2018-08-07 11:42:21 434

原创 18牛客多校5D INV 【贪心】+【树状数组】

链接:https://www.nowcoder.com/acm/contest/143/D来源:牛客网 题目描述Kanade has an even number n and a permutation b of all of the even numbers in [1,n]Let a denote an array [1,3,5....n-1] , now you need t...

2018-08-03 11:11:46 208

原创 牛客多校5H subseq 【线段树】

链接:https://www.nowcoder.com/acm/contest/143/H来源:牛客网 题目描述Kanade has an array a[1..n] , she define that an array b[1..m] is good if and only if it satisfy the following conditions: 1<=b[i]&l...

2018-08-03 09:46:59 205

原创 HDU 6333&&18多校4B Harvest of Apples 【分块+数学】

  HDU6333         Problem B. Harvest of Apples Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others) Total Submission(s): 454...

2018-08-01 21:31:06 359

原创 HDU 6314&&18多校4J 数独 【深度优先搜索】

HDU6314题意:给一个16*16的只旋转4*4的矩阵的数独,求最少顺时针旋转多少次其中的4*4矩阵能把它还原?分析:搜索加可行性剪枝即可通过。由于数独限制较强,剪枝效果良好。 #include<bits/stdc++.h>#define LL long longusing namespace std;const int INF=100000;int ans...

2018-08-01 20:59:21 316 1

原创 HDU 6319&&18多校3A Ascending Rating 【单调队列】

HDU 6319         Problem A. Ascending Rating Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 524288/524288 K (Java/Others) Total Submission(s): 3898 ...

2018-08-01 10:04:13 149

空空如也

空空如也

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

TA关注的人

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