随笔分类 -  HDU/POJ/BZOJ/计蒜客/ZOJ

摘要:HDU6886 -Tic-Tac-Toe-Nim (思维,博弈) 题面: 题意: 多组数据,每一组数据给你一个$3\times 3$ 的方格,每一个方法初始有一定量的石头,二人轮流选择一个非空石堆,然后移除至少一个石头,当一个玩家操作后产生了一行或一列全为空时,该玩家输掉。 特别的:两个玩家第一次选 阅读全文
posted @ 2020-08-27 23:07 茄子Min 阅读(206) 评论(0) 推荐(0)
摘要:HDU- 6880 Permutation Counting (思维+dp) 题面: 题意: 给定一个整数$\mathit n$,询问你有多少种$1...n$ 的全排列$\mathit a$使其满足数组$\mathit b$ 。 思路: 直接求排列不是很好求,我们做如下转化: 我们构造一个$[1,n 阅读全文
posted @ 2020-08-27 00:07 茄子Min 阅读(333) 评论(0) 推荐(0)
摘要:HDU- 6861 Gaming of Co-prime Disallowance (概率,莫比乌斯容斥) 题面描述: 思路: 我们考虑在一次游戏中$gcd=1$之前的$gcd$数值为$g,cnt_x$为$\mathit x$ 的倍数个数。 设 \[ f(x,k)=\frac{cnt_x-k}{n- 阅读全文
posted @ 2020-08-19 01:40 茄子Min 阅读(263) 评论(0) 推荐(0)
摘要:HDU-6858 Discovery of Cycles (LCT,双指针,ST表) Problem Description In response to the 8202 Olympics, Quber City, which was the host of the competition, is 阅读全文
posted @ 2020-08-18 20:29 茄子Min 阅读(198) 评论(0) 推荐(0)
摘要:HDU-6866 ,Linuber File System(树形DP) 题意: 给定一个1号节点为根的树,每一个节点有一个区间$[L_i,R_i]$,初始时每一个节点的权值都为0,每一次操作可以选择一个节点,将以该点为根的子树中所有节点的权值加上任意一个整数(可以为负值)。 现在问最少需要操作多少次 阅读全文
posted @ 2020-08-15 15:57 茄子Min 阅读(264) 评论(0) 推荐(1)
摘要:HDU - 6760 Math is Simple (差分,莫比乌斯函数) 题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=6760 Problem Description Here is a simple math. You are given an 阅读全文
posted @ 2020-08-12 22:13 茄子Min 阅读(350) 评论(1) 推荐(2)
摘要:2020杭电多校6,HDU- 6830- Asteroid in Love (几何,凸包) Problem Description During the summer vacation, the geoscience community launched a constellation observ 阅读全文
posted @ 2020-08-07 21:35 茄子Min 阅读(341) 评论(0) 推荐(0)
摘要:杭电多校03 HDU-6765 Count on a Tree II Striking Back(概率论,树链剖分) Problem Description You are given a tree with n nodes. The tree nodes are numbered from 1 t 阅读全文
posted @ 2020-08-05 22:07 茄子Min 阅读(346) 评论(0) 推荐(0)
摘要:HDU6771-It's All Squares (多边形性质) 思路: 首先我们需要知道有一个定理,对于一个简单多边形,判断一个点是否在其内部的方法有这样一个很妙的方法: 过该点对左侧做射线,如果射线与多边形的边相交奇数次,则表明该点在多边形内部,反而反之。 可以通过这个图形理解一下: 那么我们如 阅读全文
posted @ 2020-08-03 00:39 茄子Min 阅读(190) 评论(0) 推荐(0)
摘要:HDU-6767 New Equipments (最小费用最大流,费用流) Problem Description Little Q's factory recently purchased m pieces of new equipment, labeled by 1,2,…,m. There a 阅读全文
posted @ 2020-07-31 18:33 茄子Min 阅读(308) 评论(0) 推荐(0)
摘要:HDU-6793 - Tokitsukaze and Colorful Tree (dfs序列,树状数组,离线) 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6793 题面: 思路: 首先分析答案的计算公式: node v is not an anc 阅读全文
posted @ 2020-07-29 21:36 茄子Min 阅读(341) 评论(0) 推荐(0)
摘要:最短路 2 [HDU - 6714 ](dijkstra算法) 题目链接:https://vjudge.net/problem/HDU-6714 思路: 仔细分析可以得知: $w[i][j]$为$i->j$的最短路径中不包含端点的最大编号节点(如果有多个最短路径,选择最大编号节点较小的那个。) 那么 阅读全文
posted @ 2020-07-23 20:55 茄子Min 阅读(153) 评论(0) 推荐(0)
摘要:hdu-6749 Mosquito (二分,最大流,优化建图) 2020 年百度之星·程序设计大赛 - 初赛一0 Mosquito Problem Description 房间是个 n∗m 的网格,一共有 k 个窗户,都在上下左右四条边上。在第 0 时刻,每个窗户对应的格子上都会出现若干只蚊子。 蚊 阅读全文
posted @ 2020-07-22 01:28 茄子Min 阅读(233) 评论(0) 推荐(0)
摘要:[2020 年百度之星·程序设计大赛 - 初赛一] 1005 -Rotate (期望,树,推公式) 比赛链接: http://bestcoder.hdu.edu.cn/contests/contest_show.php?cid=889 题意: 思路: 因为$\mathit a$序列是单调不减的,所以 阅读全文
posted @ 2020-07-20 01:33 茄子Min 阅读(337) 评论(0) 推荐(0)
摘要:poj 1026 Cipher (置换群,循环节) POJ - 1026 题意: Bob and Alice started to use a brand-new encoding scheme. Surprisingly it is not a Public Key Cryptosystem, b 阅读全文
posted @ 2020-07-14 16:40 茄子Min 阅读(195) 评论(0) 推荐(0)
摘要:Best Reward [HDU 3613 ] (manacher算法) "HDU 3613 " After an uphill battle, General Li won a great victory. Now the head of state decide to reward him wi 阅读全文
posted @ 2020-03-21 17:54 茄子Min 阅读(193) 评论(0) 推荐(0)
摘要:HDU 6187 Destroy Walls (思维,最大生成树) Destroy Walls \ Time Limit: 8000/4000 MS (Java/Others) Memory Limit: 132768/132768 K (Java/Others) Total Submission( 阅读全文
posted @ 2019-11-20 22:03 茄子Min 阅读(322) 评论(0) 推荐(0)
摘要:ACM ICPC 2018 徐州赛区网络预赛 G. Trace (思维,贪心) Trace "问答" 问题反馈 只看题面 35.78% 1000ms 262144K There's a beach in the first quadrant. And from time to time, there 阅读全文
posted @ 2019-11-10 21:07 茄子Min 阅读(285) 评论(0) 推荐(0)
摘要:A. Hard to prepare After Incident, a feast is usually held in Hakurei Shrine. This time Reimu asked Kokoro to deliver a Nogaku show during the feast. 阅读全文
posted @ 2019-11-10 18:37 茄子Min 阅读(153) 评论(0) 推荐(0)
摘要:Geometry Problem "HDU 6242 " Alice is interesting in computation geometry problem recently. She found a interesting problem and solved it easily. Now 阅读全文
posted @ 2019-11-04 21:35 茄子Min 阅读(240) 评论(0) 推荐(0)