제출 #1075647

#제출 시각아이디문제언어결과실행 시간메모리
1075647antonPortal (BOI24_portal)C++17
1 / 100
50 ms3412 KiB
#include<bits/stdc++.h> using namespace std; #define int long long #define pii pair<int, int> #define P complex<int> int N; int cross(P a, P b){ return (a * conj(b)).imag(); } signed main(){ cin>>N; vector<P> portals(N); for(int i = 0; i<N; i++){ pii pos; cin>>pos.first>>pos.second; portals[i] = {pos.first, pos.second}; } P origin = portals[0]; for(P& portal: portals){ portal -= origin; } if(N<3 || cross(portals[1], portals[2])==0){ cout<<-1<<endl; } else{ cout<<cross(portals[1], portals[2])<<endl; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...