Problem F Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 332Accepted Submission(s): 143 Problem DescriptionAs is known to all, the blooming time and duration varies between different kinds of flowers. Now there is a garden planted full of flower
原创 2021-07-29 16:23:51
49阅读
洛谷 P2878 [USACO07JAN]保护花朵Protecting the Flowers "洛谷传送门" JDOJ 1009: 护花 "JDOJ传送门" Description FJ出去砍木材去了,把N(2 include define ll long long using namespace
转载 2019-08-06 15:03:00
62阅读
2评论
题目:http://acm.hdu.edu.cn/showproblem.php?pid=4325题目
原创 2022-08-22 16:27:30
31阅读
// 线段树// 节点保存 区间长度 和 区间的 空闲位置// 好久没写线段树了 不过除了第一次提交是数组开小导致访问非法内存了外 1Y// 我写了好多函数 分别求最左区间 最右区间 区间和 区间覆盖// 不过速度还好 去看了下排名 居然第三 O(∩_∩)O哈! 不过估计不久后就会被刷下去吧#include #include #include #include #include #include #include using namespace std;#define maxm 100010#define maxn 50010#define LL __int64#define lson l,m
原创 2021-07-29 16:20:01
67阅读
http://acm.hdu.edu.cn/showproblem.php?pid=4614题意:有N个花瓶,标号为0-N-1,往每一个花瓶放一朵花,然后有M个操作,输入a,b,c,如果a==1表示从b开始放花,期间有花就跳过,直到结束,如果没有放入一朵花,则输出“Can not put any o...
转载 2014-08-12 19:16:00
41阅读
2评论
原题链接 考察:线段树 思路: 和校门外的树(增强版)那道题差不多,我们不用管哪些瓶子有花,哪些没有.只要add,范围内从小到大 = 1.只要删除,sum[l,r] = 0. #Code #include <iostream> #include <cstring> using namespace s
转载 2021-05-22 19:22:00
76阅读
2评论
C. Wet Shark and Flowers time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output There are n sha
转载 2016-02-01 10:25:00
122阅读
2评论
点击打开链接 难点在第一问求第一朵和最后一朵花的位置 共有两种方法 一 二分求解 #include <bits/stdc++.h> using namespace std; #define N 0x3f3f3f3f struct node { int l; int r; int val; int laz; int pre; }; no...
原创 2022-06-15 21:24:19
33阅读
Description..
原创 2022-12-07 14:16:33
60阅读
FlowersTime Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4576    Ac
原创 2023-02-20 10:27:00
46阅读
LeetCode Java Can Place Flowers
原创 2022-08-25 12:49:47
44阅读
题意 每个花按序号顺序放到窗口,不同窗口可有不同观赏值,所有花都要放上去,求最大观赏值和花的位置。 分析 dp,dp[i][j]表示前i朵花最后一朵在j位置的最大总观赏值。 代码
原创 2021-07-22 14:04:48
117阅读
难度 1700 题目 CodeForces: D. Flowers time limit per test 1.5 seconds memory limit per test 256 megabytes We saw the little game Marmot made for Mole's lu ...
转载 2021-07-21 10:37:00
98阅读
2评论
传送门 题目大意 给你n和m,表示一个n*n的数独已经填完了m行,让你填出剩下几行,要求答案的字典序最小。 分析 看到这道题我首先想到的是记录每行每列使用了哪些数字,然后贪心的来填,但是发现用这种策略会在有些情况下得不到解。于是我们考虑二分图匹配,将左边n个点表示每一行n个位置,右边n个点表示对应的
转载 2018-08-06 08:45:00
59阅读
2评论
【链接】 "我是链接,点我呀:)" 【题意】 让你吃东西 B食物一次必须要吃连续k个 但是对A食物没有要求 问你有多少种吃n个食物的方法(吃的序列) 【题解】 设f[i]表示长度为i的吃的序列且符合要求的方法 有两种转移方法 一种是吃一个A食物 一种是吃k个食物 f[i] = f[i 1]+f[i
转载 2019-02-12 09:04:00
80阅读
2评论
Protecting the FlowersTime Limit: 2000MS  Memory Limit: 65536K Total Submissions: 4237  Accepted: 1710 DescriptionFarmer John went to cut some wood and left N (2 ≤ N ≤ 100,000) cows eating the
题目描述Farmer John went to cut some wood and left N (2 ≤ N ≤ 100,000) cows eating the grass, as usual. When he returned, he found to his horror that the cluster of cows was in his garden eating his beaut
原创 2023-02-07 11:44:39
69阅读
题目链接有红绿蓝三种颜色的画,每种拿三朵可以组成一束花,或者各拿一朵组成花束,告诉你每种花的数目,求出可能组成最多的花束。如果你的代码过不了,考虑一下 8 8 9这种组合。  因为数据量很大,我的思想就是局部和总体采用不同的策略。#include #include using namespace std;int main(){ int r, g, b; wh
原创 2022-07-19 10:07:43
65阅读
Problem Description As you know, Gardon trid hard for his love-letter, and now he’s spending too much time on choosing flowers for Angel. When Gardon entered the flower shop, he was frightened and da
原创 2022-05-14 12:53:25
78阅读
Suppose you have a long flowerbed in which some of the plots are planted and
原创 2022-08-03 21:19:54
63阅读
  • 1
  • 2
  • 3
  • 4
  • 5