Submission #448089

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
4480892021-07-28 20:27:05AntekbGeometrija (COCI21_geometrija)C++14
110 / 110
396 ms708 KiB
#include<bits/stdc++.h>
#define st first
#define nd second
using namespace std;
typedef long long ll;
typedef long double ld;
struct pii{
int x, y;
pii(int x, int y): x(x), y(y){}
pii operator -(pii a){return pii(x-a.x, y-a.y);}
bool operator <(pii a){return (x<a.x || (x==a.x && y<a.y));}
bool operator ==(pii a){return x==a.x && y==a.y;}
ld dl(){return sqrt(x*1ll*x+y*1ll*y);}
};
ll cross(pii a, pii b){
return a.x*1ll*b.y-a.y*1ll*b.x;
}
ll cross(pii a, pii b, pii c){
return cross(b-a, c-a);
}
int sgn(ll a){
if(a==0)return 0;
return a/abs(a);
}
ll dot(pii a, pii b){
return a.x*1ll*b.x+b.y*1ll*a.y;
}
ll dot(pii a, pii b, pii c){
return dot(b-a, c-a);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

geometrija.cpp: In function 'bool check(odc)':
geometrija.cpp:36:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<pii>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   36 |  for(int i=0; i<V.size(); i++){
      |               ~^~~~~~~~~
geometrija.cpp:47:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<pii>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   47 |  for(int i=0; i<V.size(); i++){
      |               ~^~~~~~~~~
geometrija.cpp:53:96: warning: comparison of integer expressions of different signedness: '__gnu_cxx::__normal_iterator<long double*, std::vector<long double> >::difference_type' {aka 'long int'} and 'std::vector<long double>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   53 |    if(lower_bound(A.begin(), A.end(), k)-A.begin()+lower_bound(B.begin(), B.end(), l)-B.begin()!=A.size()){
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
geometrija.cpp: In function 'std::pair<std::vector<pii>, std::vector<pii> > hull()':
geometrija.cpp:67:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<pii>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   67 |  for(int i=2; i<V.size(); i++){
      |               ~^~~~~~~~~
geometrija.cpp: In function 'int main()':
geometrija.cpp:88:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<pii>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   88 |  for(int i=2; i<h.st.size(); i++){
      |               ~^~~~~~~~~~~~
geometrija.cpp:94:17: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::array<pii, 3> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   94 |   for(int j=0; j<tra.size(); j++){
      |                ~^~~~~~~~~~~
geometrija.cpp:120:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<pii, pii> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  120 |  for(int i=0; i<todo.size(); i++){
      |               ~^~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...