自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 HDU第十场

1004 Permutation Counting 题目: https://vjudge.net/contest/390380#problem/D 思路: 代码: 学习:https://blog.csdn.net/qq_44644225/article/details/108139371 #include <bits/stdc++.h> using namespace std; typedef long long ll; const int mod = 1e9 + 7; const int

2020-08-21 17:48:03 158 1

原创 hdu第九场1001

题目: https://vjudge.net/contest/390044#problem/A 思路: 代码: #include<bits/stdc++.h> #define pb push_back #define mp make_pair #define fi first #define se second using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair&l

2020-08-21 16:57:46 231

原创 HDU第八场

1003 Clockwise or Counterclockwise 题目: https://vjudge.net/contest/389195#problem/C 思路: 相当于判断三个点的排列是顺时针还是逆时针,根据结论(x2-x1)(y3-y2)-(y2-y1)(x3-x2)>0,则为逆时针。 代码: using namespace std; typedef long long ll; int T; ll xa,xb,ya,yb,xc,yc; int main(){ scanf("%d",&a

2020-08-15 22:49:11 100

原创 HDU 第七场

1009 Increasing and Decreasing 题目: https://vjudge.net/contest/388843#problem/I 思路: 代码: 在这里插入代码片 1010 Jogging 题目: https://vjudge.net/contest/388843#problem/J 思路: 代码: 在这里插入代码片

2020-08-14 22:22:53 91

原创 HDU第六场

1002 Little rabbit’s equation 题目: https://vjudge.net/contest/387998#problem/B 思路: 题意是给一个等式,判断是否能在2-16进制内成立。成立输出进制数,不成立输出-1. 代码: 在这里插入代码片 1009 Divisibility 题目: https://vjudge.net/contest/387998#problem/I 思路: 代码: #include<bits/stdc++.h> using namesp

2020-08-10 20:41:56 94

原创 HDU第五场

** 1003 Boring Game ** - 题目: https://vjudge.net/contest/387654#problem/C - 思路: 逆向思考,当把n张纸展开还原时,相当于把序列P的上半部分截取后,倒置,放在剩下数据的左侧。折叠共k次,所以模拟k次即可。 - 代码: 在这里插入代码片 ** 1009 Paperfolding ** **-题目: ** - 思路: 一张纸对折n次,每次对折有L,U,R,D四种对折方式。最后一次对折完,从水平和竖直方向各切一刀,求最后的到的纸片数。

2020-08-08 23:52:37 81

原创 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 120

原创 Little W and Contest

Problem Description There 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 81

原创 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 131

原创 多校训练-The Oculus

题目:http://acm.hdu.edu.cn/showproblem.php?pid=6768 题意:一个正整数可以用斐波那契数列数列表示。bi取1表示存在当前第i个斐波那契数,取0则为不存在。现给定A,B,C斐波那契数列表示,问A*B与C修改哪一位b后相等。 思路:直接判断两个数相等?? 代码如下: ...

2020-07-27 20:35:10 72

原创 多校训练-Lead of Wisdom

题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=6772 题意:有n个装备,每个属于一种类别,并且有四种属性a,b,c,d,玩家最多只能佩戴一个种类的装备。最终伤害值=装备四个属性分别求和再与100相加最后相乘。求伤害的最大值。 思路:跳过没有的种类,DFS搜索。 代码;一直没过qwq #include<bits/stdc++.h> using namespace std; typedef long long ll; const int N=51;

2020-07-27 20:35:01 104

原创 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 193

空空如也

空空如也

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

TA关注的人

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