矩形面积并集There are nn rectangles on the plane. The problem is to find the area of the union of these rectangles. Note th
原创 2023-05-29 11:17:20
90阅读
首先要抽象出模型,我们其实只需要管自己选啥英雄就行,因为这是有限制的,其他的直接使用组合数计算之后乘上就行 对于自己选的英雄,有5层,每层100个,最朴素的想法是枚举每人选什么,但是5层for循环超时了,但是4层for循环就很合理 因此我们只枚举前4层,之后看看第五层还能选啥就行。 #include
转载 2020-08-16 13:26:00
46阅读
2评论
4203: MJF wants to work时间限制: 1 Sec 内存限制: 128 MB提交: 60 解决: 11[提交][状态][讨论版]题目描述MJF feel th
原创 2023-05-29 12:06:52
55阅读
题目 source 题解 首先考虑暴力怎么做。直观感觉就是选择最小的后缀拼起来。但是当前的选择会受到后面字符串的影响。因此,考虑从后往前选择。假设当前选到第$i$个串(\(s[i]\)),第$i+1$到$n$后缀拼接的最小字符串为$t$。那么如果考虑到当前第$i$个串,最优选择就是字符串$s[i]+ ...
转载 2021-10-27 21:43:00
142阅读
2评论
大致题意:总共有n个硬币,初始的时候所有的都朝下。然后进行m次投币,每次投币要投p个
原创 2022-08-25 10:44:46
32阅读
计蒜客题目:https://nanti.jisuanke.com/t/19926Considerasquaremapwith N \times NN×N cells. We indicate the coordinatach cell has a color either white o...
原创 2023-05-29 11:14:03
49阅读
#include<cstdio> #include<cstring> #include<algorithm> #include<queue> #include<cmath> #include<map> #include<vector> #define ll long long using names Read More
原创 2021-08-26 09:13:14
164阅读
题目链接:https://vjudge.net/problem/ZOJ-4066 解题思路:"枚举最小值+线段
原创 2023-05-31 09:32:13
55阅读
【前言】这场比赛是昨天的训练,弱队最终做了4题,好像去年是铜牌滚粗。,太弱啦。现在写一下部分题解。【A Xiongnu's Land 】 ​​ http://7xjob4.com1.z0.glb.clouddn.com/3e76f5f069daf5f6fa79969c155e4e14​​【题意】WQ和HQB两个人立了攻,汉武帝要把一块沙漠(这片沙漠是有绿洲存在的)赏给这两个人,这片沙漠是正方形的
原创 2022-04-19 18:33:18
125阅读
昨天全队做了这个比赛,做一个小小的总结,写一写部分题
原创 2022-04-20 09:40:29
174阅读
A题是哪个象棋的题:B题hdu4122:好像是水过去
原创 2022-08-05 15:55:49
108阅读
http://acm.hdu.edu.cn/showproblem.php?pid=5112排序之后计算就好 开始用cin超时了#include#include#include#include#include#include#include#include#include#include#include#include#include#includ
原创 2023-03-03 12:49:34
132阅读
待续
转载 2017-09-25 08:45:00
85阅读
2评论
5220: A Possible Tree时间限制: 2 Sec  内存限制: 128 MB提交: 41  解决: 11[提交] [状态] [讨论
原创 2023-05-23 10:26:42
42阅读
#1579 : Reverse Suffix Array #1579 : Reverse Suffix Array 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 描述 There is a strong data structure called "Suffix Array"
转载 2017-09-24 10:35:00
74阅读
2评论
题目1 : Visiting Peking University 题目1 : Visiting Peking University 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 描述 Ming is going to travel for n days and the dat
转载 2017-09-24 10:14:00
77阅读
2评论
题目9 : Minimum时间限制:1000ms单点时限:1000ms内存限制:256MB描述You are given a list of integers a0, a1, …, a2^k-1.You need to support two types of queries:1. Output Minx,y∈[l,r] {a
原创 2021-09-04 22:45:43
131阅读
#1582 : Territorial Dispute 1000ms 1000ms 256MB 描述In 2333, the C++ Empire and the Java Republic become the most powerful country in the world. They compete with each other in the colonizin
原创 2023-05-23 10:30:49
52阅读
Covering Time Limit: 5000/2500 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 187 Accepted Submission(s): 107 Problem
转载 2017-09-01 11:38:00
40阅读
2评论
简单概率题,可以直接由剩余n个递推到剩余0个。现在考虑剩余x个概率为(1-p)的candy时,概率为C(2 * n - x, x) * pow(p, n + 1) *pow(1 - p, n - x);在写出x - 1的情况,就可以发现组合数可以直接递推,所以可以直接求。但是考虑到p可能很小,n可能很大,这样的话直接用pow函数会丢失精度,我们可以把double类型写成log10的形式,这样可以保存精度。#include#include#include#include#include#include#include#include#include#include#include#includ.
转载 2013-09-01 20:37:00
111阅读
2评论
  • 1
  • 2
  • 3
  • 4
  • 5