procon

This documentation is automatically generated by online-judge-tools/verification-helper

View the Project on GitHub mugen1337/procon

:warning: GeometryInt/Area2.hpp

Code

// ぐるっと外積とると打ち消されとかを考えて面積の2倍が手に入る
Int Area2(vector<P> poly){
    int N=(int)poly.size();
    Int S=0;
    for(int i=0;i<N;i++) S+=poly[i].first*poly[(i+1)%N].second-poly[i].second*poly[(i+1)%N].first;
    return S;
}
#line 1 "GeometryInt/Area2.hpp"
// ぐるっと外積とると打ち消されとかを考えて面積の2倍が手に入る
Int Area2(vector<P> poly){
    int N=(int)poly.size();
    Int S=0;
    for(int i=0;i<N;i++) S+=poly[i].first*poly[(i+1)%N].second-poly[i].second*poly[(i+1)%N].first;
    return S;
}
Back to top page