• 2024-08-04优化蒙特卡洛算法笔记1
    fromkaiwu_agent.utils.common_funcimportcreate_cls,attachedSampleData=create_cls("SampleData",state=None,action=None,reward=None)ObsData=create_cls("ObsData",feature=None)ActData=create_cls("ActData",ac
  • 2024-03-22「CF505C」 Mr. Kitayuta, the Treasure Hunter
    题意在数轴上有\(n\)块宝石,当你走到一个点时,可以获得点上所有的宝石。若前一步走了\(c\)个单位长度,那么下一步可以走\(c-1,c,c+1\)个单位长度。你最开始在原点,可以向右走\(d\)个单位长度,求最多可获得多少宝石。分析设\(f_{i,j}\)表示在第\(i\)个点,上一步走\(j\)
  • 2024-01-18abc227F - Treasure Hunting
    abc227F依次钦定x为路径上的第k大的数,然后dp即可。#include<cstdio>#include<algorithm>#include<cstring>#include<map>#include<queue>#include<bitset>#include<cmath>#include<set>#include<unordered_map>#definefo(i,
  • 2023-09-16CF677D Vanya and Treasure
    这题纯大力搞过去的,没用到啥技巧,后面看了下别人的做法发现还是很有意思的我的做法就很粗暴,考虑令\(f_{i,j}\)表示走到\((i,j)\)的最短路,转移的话不难发现是个分层图DP但是有一个显然的问题是当相邻两层间的点数很多时,暴力做的话会退化成\(O(n^2\timesm^2)\),因此需要优化像这种
  • 2023-08-01英语背单词 专四词汇 2023年08月 ChatGPT
    2023-08-01Explainthemeaningofthefollowingwordsalongwithindexandphoneticsymbol:viewfinder,townsfolk,steering-wheel,hairspray,troubleshooter, opener,treasure-house,spiced,tumour,shortsighted,reassessment,histogram,deliindexwordp
  • 2023-05-044.[1201D - Treasure Hunting](https://codeforces.com/problemset/problem/1201/D)
    4.1201D-TreasureHunting题目意思:在一个n*m的地图上面,左下角的坐标是(1,1),最开始你位于左下角,一秒钟你可以进行往左或者往右的操作,你只能在一些特殊的列上面进行往上移动的操作,你不可以往下移动。现在告诉你k个宝藏的坐标信息以及哪些列是允许往上的,问最后至少要几秒可以遍历k
  • 2023-04-13Codeforces Round #286 (Div. 2) C题 Mr. Kitayuta, the Treasure Hunter (DFS+记忆化DP)
    题目地址:http://codeforces.com/contest/505/problem/C从d点开始,每个点都有三个方向,形成了一棵树,那么就从跟结点开始进行dfs查找,dp数组记录当前的点和长度,当这两个条件相同的时候,显然,后面的子树是完全相同的,于是用记忆化来优化。代码如下:#include<iostream>#include<string.h>#
  • 2023-04-08COMP20007 Task 2: C Problem
    Task2:CProblemAssignment1GeneralTask1:AlgorithmicDesignTask2:CProblemAssignmentSubmissionAcademicHonestyLatePolicyRequirements:CProgrammingProgrammingStyleMarkBreakdownAdditionalSupportAcknowledgementsTask2:CProblemOlivia'sgrandfa
  • 2023-02-07CF1787I Treasure Hunt 题解
    题目链接题意描述:定义一个序列的权值为一段前缀与一段子段,满足要么前缀与子段不交,要么完全包含的和的最大值,给定一个序列\(a\),求\(a\)的所有子区间的权值和\(n\le1
  • 2023-01-06来自菜鸡Java工程师的日积月累
    项目简介目前​​Treasure​​​是个微服务架构的纯后端项目,前端部分后期进行;同时​​Treasure​​是一个来自菜鸡Java工程师本着对技术的积累与个人的成长的开源项目。主
  • 2023-01-03NC25005 [USACO 2008 Ope S]Clear And Present Danger
    题目链接题目题目描述FarmerJohnisonaboatseekingfabledtreasureononeoftheN(1<=N<=100)islandsconvenientlylabeled1..NintheCowribbeanSea
  • 2022-11-11题解 [ABC227F] Treasure Hunting
    简单DP,当时赛时没做出来,怎么回事呢。在DP过程中并不好维护前\(k\)大都是什么,没有办法把它放到状态里,因此我们枚举第\(k\)大数的下标\(a_{x,y}\)。然后就好办了,设
  • 2022-11-09HDU 3468 Treasure Hunting
    DescriptionDoyouliketreasurehunting?Today,withoneofhisfriend,iSeaisonaventuretripagain.Asmostmoviesaid,theyfindsomanygoldhid
  • 2022-11-09HDU 5446 Unknown Treasure
    ProblemDescriptionOnthewaytothenextsecrettreasurehidingplace,themathematiciandiscoveredacaveunknowntothemap.Themathematicianenter
  • 2022-09-26CF C. Mr. Kitayuta, the Treasure Hunter
    题目链接https://codeforces.com/problemset/problem/505/C题目描述首先这样的题目可以想到搜索和普通线性dp但是搜索的话时间复杂度到了1e12了(应该没错)而正常dp[
  • 2022-08-191018 [USACO 2008 Ope S]Clear And Present Danger floyd 板子
     链接:https://ac.nowcoder.com/acm/contest/26077/1018来源:牛客网题目描述FarmerJohnisonaboatseekingfabledtreasureononeofthe
  • 2022-08-191019 [USACO 2007 Nov S]Cow Hurdles floyd 最小化路径中的最高点。
     链接:https://ac.nowcoder.com/acm/contest/26077/1018来源:牛客网题目描述FarmerJohnisonaboatseekingfabledtreasureononeofthe