From bb0ef820d937ae92f48a55995cb7d11dac9b24b8 Mon Sep 17 00:00:00 2001 From: Zengtudor Date: Fri, 11 Oct 2024 17:02:47 +0800 Subject: [PATCH] update --- README.md | 15 ++++++++++++++- src/oj4980/oj4980.cpp | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f4b8271..67b286b 100755 --- a/README.md +++ b/README.md @@ -10,4 +10,17 @@ algorithm_2024 ### [OJ4980:拯救行动](http://noi.openjudge.cn/ch0205/4980/) -#### 未考虑无答案(特殊情况)时输出 \ No newline at end of file +#### 未考虑无答案(特殊情况)时输出 + +#### 优先对联是从大到小排序,重载运算符时需反向或者std::greater +```cpp +struct Status{ + Point now; + ll step; + bool operator<(const Status &that)const noexcept{ + return this->step > that.step; + } +}; + +std::priority_queue q; +``` \ No newline at end of file diff --git a/src/oj4980/oj4980.cpp b/src/oj4980/oj4980.cpp index 638facc..620f9e7 100644 --- a/src/oj4980/oj4980.cpp +++ b/src/oj4980/oj4980.cpp @@ -5,7 +5,7 @@ #include #include -typedef long long ll; +using ll = long long; auto &is = std::cin; auto &os = std::cout;