![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
笔记
Ayi_
请叫我许许
展开
-
HDU第四场,
**1002 Blow up the Enemy **题目:https://vjudge.net/contest/386568#problem/B思路:要求张三获胜的最大概率,那么张三需要选择最优的武器。那么张三获胜的概率=1-张三失败的概率。如果爸爸选择的武器不是消耗血量最快的枪,张三必胜;如果爸爸选择的枪是消耗血量最快的,张三有0.5的概率获胜。最优武器可以根据伤害时间time来选择,时间越短,武器越优。time=(100/Ai-1)xDi,time最小的武器即为最优武器,可能有多个最优武器。记原创 2020-08-03 21:57:31 · 124 阅读 · 0 评论 -
Little W and Contest
Problem DescriptionThere are n members in our ACM club. Little W wants to select three persons from our club to form a new team taking part in provincial ACM contests, as it is known by all of us that any ACM contest requires a normal team to have three m原创 2020-08-01 23:14:57 · 82 阅读 · 0 评论 -
Tokitsukaze and Multiple
题目:题意:可以将两个相数字合并为一个数字,这个操作不限次数。给定一个数字序列,和数p,求每段数字序列都是p的倍数的最长长度。思路:贪心算法 前缀和 map(https://blog.csdn.net/sevenjoin/article/details/81943864)先预处理前缀和,当有两个前缀和相等时,这段区间和就一定是p的倍数,当前缀和为p的倍数时,答案也加一(m=n%p=(n+k*p)%p)代码#include<bits/stdc++.h>using namespa原创 2020-08-01 23:14:42 · 140 阅读 · 0 评论 -
HDU多校训练-Distinct Sub-palindromes
Problem Description:S is a string of length n. S consists of lowercase English alphabets.Your task is to count the number of different S with the minimum number of distinct sub-palindromes. Sub-palindrome is a palindromic substring.Two sub-palindromes u原创 2020-07-22 17:57:11 · 194 阅读 · 0 评论