#3003
Intersectie
Pe un cerc sunt așezate echidistant N
puncte, etichetate în sensul acelor de ceas cu 1
, 2
, 3
, …, N
.
Se dau M
intervale de forma [a, b]
și T
interogări de forma P Q
.
Pentru fiecare interogare [P, Q]
să se verifice dacă este adevărat sau fals că intersecția tuturor intervalelor care au puncte comune cu [P, Q]
include intervalul [P, Q]
.
Info Oltenia 2019
Problema | Intersectie | Operații I/O |
intersectie.in /intersectie.out
|
---|---|---|---|
Limita timp | 0.11 secunde | Limita memorie |
Total: 64 MB
/
Stivă 64 MB
|
Id soluție | #46598874 | Utilizator | |
Fișier | intersectie.cpp | Dimensiune | 1.27 KB |
Data încărcării | 18 Noiembrie 2023, 11:32 | Scor / rezultat | Eroare de compilare |
intersectie.cpp:8:7: error: 'll' does not name a type const ll N = 1e5 + 10; ^ intersectie.cpp:11:7: error: 'N' was not declared in this scope int a[N] , v[N] , c[N]; ^ intersectie.cpp:11:14: error: 'N' was not declared in this scope int a[N] , v[N] , c[N]; ^ intersectie.cpp:11:21: error: 'N' was not declared in this scope int a[N] , v[N] , c[N]; ^ intersectie.cpp: In function 'int interclasare(int*, int*)': intersectie.cpp:22:13: error: 'c' was not declared in this scope c[++cnt] = a[i]; ^ intersectie.cpp:32:5: error: 'c' was not declared in this scope c[0] = cnt; ^ intersectie.cpp:33:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^ intersectie.cpp: In function 'int main()': intersectie.cpp:49:22: error: 'a' was not declared in this scope swap(a , v) , first = 1; ^ intersectie.cpp:49:26: error: 'v' was not declared in this scope swap(a , v) , first = 1; ^ intersectie.cpp:52:30: error: 'a' was not declared in this scope interclasare(a , v); ^ intersectie.cpp:52:34: error: 'v' was not declared in this scope interclasare(a , v); ^ intersectie.cpp:53:26: error: 'c' was not declared in this scope swap(a , c); ^ intersectie.cpp:56:13: error: 'v' was not declared in this scope v[0] = 0; ^ intersectie.cpp:58:14: error: 'v' was not declared in this scope else v[++v[0]] = x; ^ intersectie.cpp:61:8: error: 'a' was not declared in this scope if(a[0] == 0) cout << "nu exista"; ^ intersectie.cpp:38:23: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result] FastIO , FILES; ^ intersectie.cpp:38:23: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Intersectie face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
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ă.