随笔分类 - STL-set
摘要:题目 Farmer John's farm consists of a set of \(N\) fields \((1 \leq N \leq 10^5)\), conveniently numbered \(1 \ldots N\). Between these fields are \(M\)
阅读全文
摘要:题目链接 从1开始从小到大考虑,用set维护每个数左右的扩散范围,然后答案为这个数的区间就是左端点个数 \(\times\) 右端点个数。 Code // Problem: AT2060 [AGC005B] Minimum Sum // Contest: Luogu // URL: https://
阅读全文