传送门 本来出题人出出来想考数据结构的. 但是我们拥有map+vector/set这样优秀的STL,因此直接用map离散化,vector存下标在里面二分找答案就行了. 代码: #include<bits/stdc++.h> #define N 100005 using namespace std; inline int read(){ int ans=0; char ch=getchar(); while(!isdigit(ch))ch=getchar(); while(isdigit(ch)…
Easy Problem from Rujia Liu? Though Rujia Liu usually sets hard problems for contests (for example, regional contests like Xi'an 2006, Beijing 2007 and Wuhan 2009, or UVa OJ contests like Rujia Liu's Presents 1 and 2), he occasionally sets easy probl…
关于std::vector中erase的用法http://www.cplusplus.com/reference/vector/vector/erase/ #include <vector> struct WordCoordinate { int x; int y; int z; }; struct Mypoint { int x; int y; }; int main() { std::vector<WordCoordinate> m_worldCoorPoint; std::v…