Detalii evaluare #44191157

Rezumat problemă

Fie A o mulțime de N puncte Ai în plan de coordonate întregi cunoscute (Ai.x, Ai.y). Pentru o întrebare definită printr-un punct Q=(Q.x, Q.y) se cere aria înfășurătorii convexe a punctelor: {Q} ∪ {Ai | Ai.x < Q.x și Ai ∈ A }.

Înfășurătoarea convexă a unei mulțimi de puncte este poligonul convex de arie minimă care conține toate punctele în interior sau pe laturile acestuia.

Determinați răspunsurile pentru M întrebări de tipul enunţat mai sus, relativ la mulțimea inițială A.

Urmasii lui Moisil, 2015

Detalii

Problema Geometrie Operații I/O geometrie.in/geometrie.out
Limita timp 0.7 secunde Limita memorie Total: 64 MB / Stivă 8 MB
Id soluție #44191157 Utilizator Amba Singh (BatuKhan)
Fișier geometrie.cpp Dimensiune 3.03 KB
Data încărcării 08 Iulie 2023, 18:28 Scor / rezultat Eroare de compilare

Evaluare


Mesaj compilare

geometrie.cpp:1:131: warning: missing terminating ' character [enabled by default]
 My email and password account were changed without my approval. I can still sign in my account through the google email, but I can't change the email and pass on the account. 

                                                                                                                                   ^
geometrie.cpp:1:1: error: missing terminating ' character
 My email and password account were changed without my approval. I can still sign in my account through the google email, but I can't change the email and pass on the account. 

 ^
geometrie.cpp:2:54: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix]
 I spoke with someone in live chat earlier and said he'd send me an email to nicu.negoita255@gmail.com (Which is also the original epic games account email), but its been an hour and still didn't get the email.

                                                      ^
geometrie.cpp:2:54: warning: character constant too long for its type [enabled by default]
geometrie.cpp:1:1: error: 'My' does not name a type
 My email and password account were changed without my approval. I can still sign in my account through the google email, but I can't change the email and pass on the account. 

 ^
In file included from /usr/include/endian.h:60:0,
                 from /usr/include/i386-linux-gnu/bits/waitstatus.h:64,
                 from /usr/include/stdlib.h:42,
                 from geometrie.cpp:9:
/usr/include/i386-linux-gnu/bits/byteswap.h:108:17: error: '__uint64_t' does not name a type
 static __inline __uint64_t
                 ^
In file included from geometrie.cpp:9:0:
/usr/include/stdlib.h:139:8: error: 'size_t' does not name a type
 extern size_t __ctype_get_mb_cur_max (void) __THROW __wur;
        ^
In file included from /usr/include/stdlib.h:314:0,
                 from geometrie.cpp:9:
/usr/include/i386-linux-gnu/sys/types.h:33:9: error: '__u_char' does not name a type
 typedef __u_char u_char;
         ^
/usr/include/i386-linux-gnu/sys/types.h:34:9: error: '__u_short' does not name a type
 typedef __u_short u_short;
         ^
/usr/include/i386-linux-gnu/sys/types.h:35:9: error: '__u_int' does not name a type
 typedef __u_int u_int;
         ^
/usr/include/i386-linux-gnu/sys/types.h:36:9: error: '__u_long' does not name a type
 typedef __u_long u_long;
         ^
/usr/include/i386-linux-gnu/sys/types.h:37:9: error: '__quad_t' does not name a type
 typedef __quad_t quad_t;
         ^
/usr/include/i386-linux-gnu/sys/types.h:38:9: error: '__u_quad_t' does not name a type
 typedef __u_quad_t u_quad_t;
         ^
/usr/include/i386-linux-gnu/sys/types.h:39:9: error: '__fsid_t' does not name a type
 typedef __fsid_t fsid_t;
         ^
/usr/include/i386-linux-gnu/sys/types.h:44:9: error: '__loff_t' does not name a type
 typedef __loff_t loff_t;
         ^
/usr/include/i386-linux-gnu/sys/types.h:48:9: error: '__ino_t' does not name a type
 typedef __ino_t ino_t;
         ^
/usr/include/i386-linux-gnu/sys/types.h:55:9: error: '__ino64_t' does not name a type
 typedef __ino64_t ino64_t;
         ^
/usr/include/i386-linux-gnu/sys/types.h:60:9: error: '__dev_t' does not name a type
 typedef __dev_t dev_t;
         ^
/usr/include/i386-linux-gnu/sys/types.h:65:9: error: '__gid_t' does not name a type
 typedef __gid_t gid_t;
         ^
/usr/include/i386-linux-gnu/sys/types.h:70:9: error: '__mode_t' does not name a type
 typedef __mode_t mode_t;
         ^
/usr/include/i386-linux-gnu/sys/types.h:75:9: error: '__nlink_t' does not name a type
 typedef __nlink_t nlink_t;
         ^
/usr/include/i386-linux-gnu/sys/types.h:80:9: error: '__uid_t' does not name a type
 typedef __uid_t uid_t;
         ^
/usr/include/i386-linux-gnu/sys/types.h:98:9: error: '__pid_t' does not name a type
 typedef __pid_t pid_t;
         ^
/usr/include/i386-linux-gnu/sys/types.h:104:9: error: '__id_t' does not name a type
 typedef __id_t id_t;
         ^
/usr/include/i386-linux-gnu/sys/types.h:115:9: error: '__daddr_t' does not name a type
 typedef __daddr_t daddr_t;
         ^
/usr/include/i386-linux-gnu/sys/types.h:116:9: error: '__caddr_t' does not name a type
 typedef __caddr_t caddr_t;
         ^
/usr/include/i386-linux-gnu/sys/types.h:122:9: error: '__key_t' does not name a type
 typedef __key_t key_t;
         ^
In file included from /usr/include/i386-linux-gnu/sys/types.h:132:0,
                 from /usr/include/stdlib.h:314,
                 from geometrie.cpp:9:
/usr/include/time.h:59:9: error: '__clock_t' does not name a type
 typedef __clock_t clock_t;
         ^
/usr/include/time.h:75:9: error: '__time_t' does not name a type
 typedef __time_t time_t;
         ^
/usr/include/time.h:91:9: error: '__clockid_t' does not name a type
 typedef __clockid_t clockid_t;
         ^
/usr/include/time.h:103:9: error: '__timer_t' does not name a type
 typedef __timer_t timer_t;
         ^
In file included from /usr/include/stdlib.h:314:0,
                 from geometrie.cpp:9:
/usr/include/i386-linux-gnu/sys/types.h:136:9: error: '__useconds_t' does not name a type
 typedef __useconds_t useconds_t;
         ^
/usr/include/i386-linux-gnu/sys/types.h:140:9: error: '__suseconds_t' does not name a type
 typedef __suseconds_t suseconds_t;
         ^
In file included from /usr/include/i386-linux-gnu/sys/select.h:43:0,
                 from /usr/include/i386-linux-gnu/sys/types.h:219,
                 from /usr/include/stdlib.h:314,
                 from geometrie.cpp:9:
/usr/include/time.h:122:5: error: '__time_t' does not name a type
     __time_t tv_sec;  /* Seconds.  */
     ^
/usr/include/time.h:123:5: error: '__syscall_slong_t' does not name a type
     __syscall_slong_t tv_nsec; /* Nanoseconds.  */
     ^
In file included from /usr/include/i386-linux-gnu/sys/select.h:45:0,
                 from /usr/include/i386-linux-gnu/sys/types.h:219,
                 from /usr/include/stdlib.h:314,
                 from geometrie.cpp:9:
/usr/include/i386-linux-gnu/bits/time.h:32:5: error: '__time_t' does not name a type
     __time_t tv_sec;  /* Seconds.  */
     ^
/usr/include/i386-linux-gnu/bits/time.h:33:5: error: '__suseconds_t' does not name a type
     __suseconds_t tv_usec; /* Microseconds.  */
     ^
In file included from /usr/include/stdlib.h:314:0,
                 from geometrie.cpp:9:
/usr/include/i386-linux-gnu/sys/types.h:228:9: error: '__blksize_t' does not name a type
 typedef __blksize_t blksize_t;
         ^
/usr/include/i386-linux-gnu/sys/types.h:235:9: error: '__blkcnt_t' does not name a type
 typedef __blkcnt_t blkcnt_t;  /* Type to count number of disk blocks.  */
         ^
/usr/include/i386-linux-gnu/sys/types.h:239:9: error: '__fsblkcnt_t' does not name a type
 typedef __fsblkcnt_t fsblkcnt_t; /* Type to count file system blocks.  */
         ^
/usr/include/i386-linux-gnu/sys/types.h:243:9: error: '__fsfilcnt_t' does not name a type
 typedef __fsfilcnt_t fsfilcnt_t; /* Type to count file system inodes.  */
         ^
/usr/include/i386-linux-gnu/sys/types.h:262:9: error: '__blkcnt64_t' does not name a type
 typedef __blkcnt64_t blkcnt64_t;     /* Type to count number of disk blocks. */
         ^
/usr/include/i386-linux-gnu/sys/types.h:263:9: error: '__fsblkcnt64_t' does not name a type
 typedef __fsblkcnt64_t fsblkcnt64_t; /* Type to count file system blocks.  */
         ^
/usr/include/i386-linux-gnu/sys/types.h:264:9: error: '__fsfilcnt64_t' does not name a type
 typedef __fsfilcnt64_t fsfilcnt64_t; /* Type to count file system inodes.  */
         ^
In file included from geometrie.cpp:9:0:
/usr/include/stdlib.h:331:4: error: 'size_t' has not been declared
    size_t __statelen) __THROW __nonnull ((2));
    ^
/usr/include/stdlib.h:361:4: error: 'size_t' has not been declared
    size_t __statelen,
    ^
/usr/include/stdlib.h:466:22: error: 'size_t' was not declared in this scope
 extern void *malloc (size_t __size) __THROW __attribute_malloc__ __wur;
                      ^
In file included from /usr/include/features.h:374:0,
                 from /usr/include/stdio.h:27,
                 from geometrie.cpp:8:
/usr/include/stdlib.h:466:37: error: expected ',' or ';' before 'throw'
 extern void *malloc (size_t __size) __THROW __attribute_malloc__ __wur;
                                     ^
In file included from geometrie.cpp:9:0:
/usr/include/stdlib.h:468:22: error: 'size_t' was not declared in this scope
 extern void *calloc (size_t __nmemb, size_t __size)
                      ^
/usr/include/stdlib.h:468:38: error: 'size_t' was not declared in this scope
 extern void *calloc (size_t __nmemb, size_t __size)
                                      ^
/usr/include/stdlib.h:468:51: error: expression list treated as compound expression in initializer [-fpermissive]
 extern void *calloc (size_t __nmemb, size_t __size)
                                                   ^
In file included from /usr/include/features.h:374:0,
                 from /usr/include/stdio.h:27,
                 from geometrie.cpp:8:
/usr/include/stdlib.h:469:6: error: expected ',' or ';' before 'throw'
      __THROW __attribute_malloc__ __wur;
      ^
In file included from geometrie.cpp:9:0:
/usr/include/stdlib.h:480:36: error: 'size_t' has not been declared
 extern void *realloc (void *__ptr, size_t __size)
                                    ^
In file included from /usr/include/stdlib.h:492:0,
                 from geometrie.cpp:9:
/usr/include/alloca.h:32:22: error: 'size_t' was not declared in this scope
 extern void *alloca (size_t __size) __THROW;
                      ^
In file included from /usr/include/features.h:374:0,
                 from /usr/include/stdio.h:27,
                 from geometrie.cpp:8:
/usr/include/alloca.h:32:37: error: expected ',' or ';' before 'throw'
 extern void *alloca (size_t __size) __THROW;
                                     ^
In file included from geometrie.cpp:9:0:
/usr/include/stdlib.h:498:22: error: 'size_t' was not declared in this scope
 extern void *valloc (size_t __size) __THROW __attribute_malloc__ __wur;
                      ^
In file included from /usr/include/features.h:374:0,
                 from /usr/include/stdio.h:27,
                 from geometrie.cpp:8:
/usr/include/stdlib.h:498:37: error: expected ',' or ';' before 'throw'
 extern void *valloc (size_t __size) __THROW __attribute_malloc__ __wur;
                                     ^
In file included from geometrie.cpp:9:0:
/usr/include/stdlib.h:503:45: error: 'size_t' has not been declared
 extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
                                             ^
/usr/include/stdlib.h:503:65: error: 'size_t' has not been declared
 extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
                                                                 ^
/usr/include/stdlib.h:509:29: error: 'size_t' was not declared in this scope
 extern void *aligned_alloc (size_t __alignment, size_t __size)
                             ^
/usr/include/stdlib.h:509:49: error: 'size_t' was not declared in this scope
 extern void *aligned_alloc (size_t __alignment, size_t __size)
                                                 ^
/usr/include/stdlib.h:509:62: error: expression list treated as compound expression in initializer [-fpermissive]
 extern void *aligned_alloc (size_t __alignment, size_t __size)
                                                              ^
In file included from /usr/include/features.h:374:0,
                 from /usr/include/stdio.h:27,
                 from geometrie.cpp:8:
/usr/include/stdlib.h:510:6: error: expected ',' or ';' before 'throw'
      __THROW __attribute_malloc__ __attribute_alloc_size__ ((2)) __wur;
      ^
In file included from geometrie.cpp:9:0:
/usr/include/stdlib.h:756:9: error: 'size_t' has not been declared
         size_t __nmemb, size_t __size, __compar_fn_t __compar)
         ^
/usr/include/stdlib.h:756:25: error: 'size_t' has not been declared
         size_t __nmemb, size_t __size, __compar_fn_t __compar)
                         ^
In file included from /usr/include/stdlib.h:760:0,
                 from geometrie.cpp:9:
/usr/include/i386-linux-gnu/bits/stdlib-bsearch.h:20:49: error: 'size_t' has not been declared
 bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size,
                                                 ^
/usr/include/i386-linux-gnu/bits/stdlib-bsearch.h:20:65: error: 'size_t' has not been declared
 bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size,
                                                                 ^
/usr/include/i386-linux-gnu/bits/stdlib-bsearch.h: In function 'void* bsearch(const void*, const void*, int, int, __compar_fn_t)':
/usr/include/i386-linux-gnu/bits/stdlib-bsearch.h:23:3: error: 'size_t' was not declared in this scope
   size_t __l, __u, __idx;
   ^
/usr/include/i386-linux-gnu/bits/stdlib-bsearch.h:23:10: error: expected ';' before '__l'
   size_t __l, __u, __idx;
          ^
/usr/include/i386-linux-gnu/bits/stdlib-bsearch.h:27:3: error: '__l' was not declared in this scope
   __l = 0;
   ^
/usr/include/i386-linux-gnu/bits/stdlib-bsearch.h:28:3: error: '__u' was not declared in this scope
   __u = __nmemb;
   ^
/usr/include/i386-linux-gnu/bits/stdlib-bsearch.h:31:7: error: '__idx' was not declared in this scope
       __idx = (__l + __u) / 2;
       ^
In file included from geometrie.cpp:9:0:
/usr/include/stdlib.h: At global scope:
/usr/include/stdlib.h:765:34: error: 'size_t' has not been declared
 extern void qsort (void *__base, size_t __nmemb, size_t __size,
                                  ^
/usr/include/stdlib.h:765:50: error: 'size_t' has not been declared
 extern void qsort (void *__base, size_t __nmemb, size_t __size,
                                                  ^
/usr/include/stdlib.h:768:36: error: 'size_t' has not been declared
 extern void qsort_r (void *__base, size_t __nmemb, size_t __size,
                                    ^
/usr/include/stdlib.h:768:52: error: 'size_t' has not been declared
 extern void qsort_r (void *__base, size_t __nmemb, size_t __size,
                                                    ^
/usr/include/stdlib.h:844:6: error: 'size_t' has not been declared
      size_t __len) __THROW __nonnull ((3, 4, 5));
      ^
/usr/include/stdlib.h:847:6: error: 'size_t' has not been declared
      size_t __len) __THROW __nonnull ((3, 4, 5));
      ^
/usr/include/stdlib.h:851:31: error: 'size_t' has not been declared
       char *__restrict __buf, size_t __len)
                               ^
/usr/include/stdlib.h:855:31: error: 'size_t' has not been declared
       char *__restrict __buf, size_t __len)
                               ^
/usr/include/stdlib.h:863:36: error: 'size_t' has not been declared
 extern int mblen (const char *__s, size_t __n) __THROW;
                                    ^
/usr/include/stdlib.h:867:34: error: 'size_t' has not been declared
      const char *__restrict __s, size_t __n) __THROW;
                                  ^
/usr/include/stdlib.h:874:8: error: 'size_t' does not name a type
 extern size_t mbstowcs (wchar_t *__restrict  __pwcs,
        ^
/usr/include/stdlib.h:877:8: error: 'size_t' does not name a type
 extern size_t wcstombs (char *__restrict __s,
        ^
/usr/include/stdlib.h:940:46: error: 'size_t' has not been declared
 extern int ptsname_r (int __fd, char *__buf, size_t __buflen)
                                              ^
In file included from /usr/include/stdlib.h:959:0,
                 from geometrie.cpp:9:
/usr/include/i386-linux-gnu/bits/stdlib.h:25:9: error: 'size_t' has not been declared
         size_t __resolvedlen) __THROW __wur;
         ^
In file included from /usr/include/features.h:374:0,
                 from /usr/include/stdio.h:27,
                 from geometrie.cpp:8:
/usr/include/i386-linux-gnu/bits/stdlib.h:29:14: error: 'size_t' has not been declared
 extern char *__REDIRECT_NTH (__realpath_chk_warn,
              ^
In file included from /usr/include/stdlib.h:959:0,
                 from geometrie.cpp:9:
/usr/include/i386-linux-gnu/bits/stdlib.h: In function 'char* realpath(const char*, char*)':
/usr/include/i386-linux-gnu/bits/stdlib.h:39:30: error: 'size_t' was not declared in this scope
   if (__bos (__resolved) != (size_t) -1)
                              ^
/usr/include/i386-linux-gnu/bits/stdlib.h: At global scope:
/usr/include/i386-linux-gnu/bits/stdlib.h:52:52: error: 'size_t' has not been declared
 extern int __ptsname_r_chk (int __fd, char *__buf, size_t __buflen,
                                                    ^
/usr/include/i386-linux-gnu/bits/stdlib.h:53:8: error: 'size_t' has not been declared
        size_t __nreal) __THROW __nonnull ((2));
        ^
In file included from /usr/include/features.h:374:0,
                 from /usr/include/stdio.h:27,
                 from geometrie.cpp:8:
/usr/include/i386-linux-gnu/bits/stdlib.h:54:12: error: 'size_t' has not been declared
 extern int __REDIRECT_NTH (__ptsname_r_alias, (int __fd, char *__buf,
            ^
/usr/include/i386-linux-gnu/bits/stdlib.h:57:12: error: 'size_t' has not been declared
 extern int __REDIRECT_NTH (__ptsname_r_chk_warn,
            ^
/usr/include/i386-linux-gnu/bits/stdlib.h:57:12: error: 'size_t' has not been declared
 extern int __REDIRECT_NTH (__ptsname_r_chk_warn,
            ^
/usr/include/i386-linux-gnu/bits/stdlib.h:64:1: error: 'size_t' has not been declared
 __NTH (ptsname_r (int __fd, char *__buf, size_t __buflen))
 ^
In file included from /usr/include/stdlib.h:959:0,
                 from geometrie.cpp:9:
/usr/include/i386-linux-gnu/bits/stdlib.h: In function 'int ptsname_r(int, char*, int)':
/usr/include/i386-linux-gnu/bits/stdlib.h:66:25: error: 'size_t' was not declared in this scope
   if (__bos (__buf) != (size_t) -1)
                         ^
/usr/include/i386-linux-gnu/bits/stdlib.h: At global scope:
/usr/include/i386-linux-gnu/bits/stdlib.h:77:54: error: 'size_t' has not been declared
 extern int __wctomb_chk (char *__s, wchar_t __wchar, size_t __buflen)
                                                      ^
/usr/include/i386-linux-gnu/bits/stdlib.h: In function 'int wctomb(char*, wchar_t)':
/usr/include/i386-linux-gnu/bits/stdlib.h:92:23: error: 'size_t' was not declared in this scope
   if (__bos (__s) != (size_t) -1 && __STDLIB_MB_LEN_MAX > __bos (__s))
                       ^
/usr/include/i386-linux-gnu/bits/stdlib.h: At global scope:
/usr/include/i386-linux-gnu/bits/stdlib.h:98:8: error: 'size_t' does not name a type
 extern size_t __mbstowcs_chk (wchar_t *__restrict __dst,
        ^
/usr/include/i386-linux-gnu/bits/stdlib.h:101:8: error: 'size_t' does not name a type
 extern size_t __REDIRECT_NTH (__mbstowcs_alias,
        ^
/usr/include/i386-linux-gnu/bits/stdlib.h:105:8: error: 'size_t' does not name a type
 extern size_t __REDIRECT_NTH (__mbstowcs_chk_warn,
        ^
/usr/include/i386-linux-gnu/bits/stdlib.h:112:20: error: 'size_t' does not name a type
 __fortify_function size_t
                    ^
/usr/include/i386-linux-gnu/bits/stdlib.h:130:8: error: 'size_t' does not name a type
 extern size_t __wcstombs_chk (char *__restrict __dst,
        ^
/usr/include/i386-linux-gnu/bits/stdlib.h:133:8: error: 'size_t' does not name a type
 extern size_t __REDIRECT_NTH (__wcstombs_alias,
        ^
/usr/include/i386-linux-gnu/bits/stdlib.h:137:8: error: 'size_t' does not name a type
 extern size_t __REDIRECT_NTH (__wcstombs_chk_warn,
        ^
/usr/include/i386-linux-gnu/bits/stdlib.h:143:20: error: 'size_t' does not name a type
 __fortify_function size_t
                    ^
geometrie.cpp:14:1: error: 'FILE' does not name a type
 FILE *fin = fopen("geometrie.in", "rt");

 ^
geometrie.cpp:15:1: error: 'FILE' does not name a type
 FILE *fout = fopen("geometrie.out", "wt");

 ^
geometrie.cpp: In function 'void solve()':
geometrie.cpp:86:21: error: 'fout' was not declared in this scope
             fprintf(fout, "%.1lf\n", (double) solveQuery(q[qi]) / 2);

                     ^
geometrie.cpp:86:68: error: 'fprintf' was not declared in this scope
             fprintf(fout, "%.1lf\n", (double) solveQuery(q[qi]) / 2);

                                                                    ^
geometrie.cpp: In function 'int main()':
geometrie.cpp:99:12: error: 'fin' was not declared in this scope
     fscanf(fin, "%d %d", &N, &M);

            ^
geometrie.cpp:99:32: error: 'fscanf' was not declared in this scope
     fscanf(fin, "%d %d", &N, &M);

                                ^
geometrie.cpp:108:15: error: 'fclose' was not declared in this scope
     fclose(fin);

               ^
geometrie.cpp:109:12: error: 'fout' was not declared in this scope
     fclose(fout);

            ^

Cum funcționează evaluarea?

www.pbinfo.ro permite evaluarea a două tipuri de probleme:

  • probleme la care rezolvarea presupune scrierea unui program complet
  • probleme la care rezolvarea presupune scrierea unei secvențe de program - câteva instrucțiuni, o listă de declarații, una sau mai multe funcții, etc.

Problema Geometrie face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:

  • Programul sursă este compilat folosind compilatorul corespunzător. Dacă în urma compilării se obțin erori sau avertismente, acestea sunt afișate în această pagină.
  • Dacă programul a fost compilat, executabilul obținut va fi rulat, furnizându-i-se unul sau mai multe seturi de date de intrare, în concordanță cu restricțiile specifice problemei. Pentru fiecare set de date se obține un anumit punctaj, în raport cu corectitudinea soluției tale.

Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.