GCJ2019 Round1B 題解

A.Manhattan Crepe Cart 維護兩個軸的到達數,其實就是區間加,做一個差分前綴和就可以了,複雜度 O ( p + q ) O(p+q) O(p+q) #include<bits/stdc++.h> using namespace std; const int maxn = 100050; int x[maxn],y[maxn]; int dx[maxn],dy[maxn]; vo
相關文章
相關標籤/搜索