• 2023-05-26HDU 1029 Ignatius and the Princess IV(基础dp)
    传送门题目大意就是给你n个数(保证n为一个奇数),存在一个数出现的次数大于(n+1)/2次,求这个数;这个数出现的次数比其他数出现的次数加起来还多,那么当这个数出现时+1,其他的数出现时-1,最后得到的数为正数。假定一个数为特殊数,若当前数与特殊数相同则cnt++,若不相同则cnt--,如果这时cnt<0,用当
  • 2023-05-05How Many Tables
    HowManyTablesTimeLimit:2000/1000MS(Java/Others)MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):16865AcceptedSubmission(s):8270ProblemDescriptionTodayisIgnatius'birthday.Heinvitesalotoffriends.Nowit'sd
  • 2023-02-13Ignatius and the Princess III(方案背包+搜索)
    就是问你,n这个数可以被多少种方案组成。比如:算是,方案+完全背包的模板题了。#include<iostream>#include<cstring>usingnamespacestd;intdp[150];intmain(
  • 2023-02-03HDU1098 Ignatius's puzzle (数学归纳法)
    Description:Ignatiusispooratmath,hefallsacrossapuzzleproblem,sohehasnochoicebuttoappealtoEddy.thisproblemdescribesthat:
  • 2023-01-15hdu:Ignatius and the Princess III(母函数)
    ProblemDescription“Well,itseemsthefirstproblemistooeasy.Iwillletyouknowhowfoolishyouarelater.”feng5166says.“Thesecondproblemis,g
  • 2023-01-12hdu:Ignatius and the Princess II(全排列,dfs)
    ProblemDescriptionNowourherofindsthedoortotheBEelzebubfeng5166.Heopensthedoorandfindsfeng5166isabouttokillourprettyPrincess.Butnow
  • 2022-12-06hdu1026 Ignatius and the Princess I --BFS & 记录路径 & 与DFS的比较
    原题链接:​​http://acm.hdu.edu.cn/showproblem.php?pid=1026​​一:题意一个n*m的矩阵代表一个迷宫,(0,0)是起点,(n-1)(m-1)是终点,每移动一步一秒。迷宫每点意义是:. 该点可以