2020杭电多校#5
1001 Tetrahedron 题意 一个直角四面体的三条直角边在范围内随机,求直角顶点到对面的距离的平方倒数()的期望值。 思路 先通过向量计算得到, 于是其中 ,推出 注意逆元的预处理方法,。 代码 #include <bits/stdc++.h> #define ll long long using namespace std;…
2020杭电多校#4(补)
1002 Blow up the Enemy 题意 有n种武器,儿子选一种最厉害的,父亲随机选一种,如果选择一样,则胜率五五开,问获胜的概率 思路 可以直接暴力枚举父亲所选择的武器,如果儿子获胜则胜率增加,平局则增加。 代码 #include <bits/stdc++.h> #define ll long long using name…
2020杭电多校#3(补)
1004 Tokitsukaze and Multiple 题意 n个数,连续的数可以加在一起,让数组中出现p的倍数的次数最多,最多为多少 思路 先取模,然后做前缀和,用map记录已经出现过的前缀,当再一次出现时表示这一段区间可以加成p的倍数,此时ans++,map清空只剩出现过的这个前缀 代码 #include <bits/stdc++.h…
2020杭电多校#2-1010
题目 题目地址:Lead of Wisdom Problem Description In an online game, "Lead of Wisdom" is a place where the lucky player can randomly get powerful items.     There…
2020杭电多校#2-1006
题目 题目地址:The Oculus Problem Description Let's define the Fibonacci sequence . It's well known that every positive integer x has its unique Fibonacci representation such…
2020杭电多校#2-1001
题目 题目地址:Total Eclipse Problem Description There are n cities and m bidirectional roads in Byteland. These cities are labeled by , the brightness of the city is . Magician Suns…
2020杭电多校#1-1009
题目 题目地址:Leading Robots Problem Description Sandy likes to play with robots. He is going to organize a running competition between his robots. And he is going to give some pres…
2020杭电多校#1-1005
题目 题目地址:Fibonacci Sum The Fibonacci numbers are defined as below : , Given three integers N, C and K, calculate the following summation: Since the answer can be huge, output i…
2020杭电多校#1-1004
题目 题目地址:Distinct Sub-palindromes is a string of length n. consists of lowercase English alphabets. Your task is to count the number of different with the minimum number of dis…
CSS学习笔记
注: 本文总结自w3school CSS 介绍 CSS指层叠样式表(英文全称:Cascading Style Sheets)是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言。CSS不仅可以静态地修饰网页,还可以配合各种脚本语言动态地对网页各元素进行格式化。 CSS 能够对网页中元素位置…