版本比较
题解 P4375 【[USACO18OPEN]Out of Sorts G】
正文
增加 2 行删除 2 行
37 行未改动3839404142424344454625 行未改动7273747576767778798022 行未改动37 行未改动为什么结论是这个?
因为对于每个?
1. 向后扫会保证把前 ? 个位置上一个值> ? 的数扔到后边去 1. 向后扫会保证把前 ? 个位置上一个值> ? 的数扔到后边去2. 向前扫会保证被换到前? 个位置上的新数的值是≤ ? 的
如果不懂可以看下面。
25 行未改动
````cpp#include <cstdio>#include <algorithm> #include <algorithm>
using namespace std;const int N=100005;
22 行未改动