本题出处:2018-2019 ACM-ICPC东南欧洲区域编程竞赛(SEERC 2018) Sample input 8 4 4 7 2 3 3 4 5 5 1 2 2 1 4 8 4 9 4 6 1 4 9 Sample output 2 2 3 2 Note
The picture illustrates for the above example the area on which the third fisherman can catch fi…
传送门 本题是让计算方案数,考虑如何设计dp的状态,注意到我们需要计数的排列的性质与前若干个元素的最大值有关。不妨先将 a a a数组从小到大排个序,然后用 d p [ i ] [ j ] dp[i][j] dp[i][j]表示长度为 i i i的排列满足最大元素为 a j a_j …
题目链接:115.157.200.87/front/problem?problemId1056(HNU内网访问) Problem Description The ocean can be represented as the first quarter of the Cartesian plane. There are n fish in the ocean. Each fish has its own coordinate…