2024-10-02 16:45:48 +00:00
|
|
|
|
# algorithm_2024
|
2024-10-01 02:31:05 +00:00
|
|
|
|
|
2024-10-02 16:45:48 +00:00
|
|
|
|
algorithm_2024
|
2024-10-11 08:57:29 +00:00
|
|
|
|
|
|
|
|
|
## 错题本
|
|
|
|
|
|
|
|
|
|
### Luogu某题
|
|
|
|
|
|
|
|
|
|
#### 数组越界导致变量异常更改
|
|
|
|
|
|
|
|
|
|
### [OJ4980:拯救行动](http://noi.openjudge.cn/ch0205/4980/)
|
|
|
|
|
|
2024-10-11 09:02:47 +00:00
|
|
|
|
#### 未考虑无答案(特殊情况)时输出
|
|
|
|
|
|
|
|
|
|
#### 优先对联是从大到小排序,重载运算符时需反向或者std::greater
|
|
|
|
|
```cpp
|
|
|
|
|
struct Status{
|
|
|
|
|
Point now;
|
|
|
|
|
ll step;
|
|
|
|
|
bool operator<(const Status &that)const noexcept{
|
|
|
|
|
return this->step > that.step;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
std::priority_queue<Status> q;
|
|
|
|
|
```
|