#3004
Se dau N puncte din plan prin coordonatele lor.
Se mai dau Q perechi de puncte, diferite de cele date inițial.
Să se verifice, pentru fiecare pereche de puncte (A , B) dintre cele Q, dacă există traseu care pornește din A și ajunge în B, prin deplasări cu pași de lungime 1 spre Nord, Vest, Sud, Est și evitând orice punct dintre cele N date inițial.
Info Oltenia 2019
| Problema | Links | Operații I/O |
links.in/links.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 128 MB
/
Stivă 128 MB
|
| Id soluție | #64304892 | Utilizator | |
| Fișier | links.cpp | Dimensiune | 3.99 KB |
| Data încărcării | 28 Aprilie 2026, 19:32 | Scor/rezultat | 100 puncte |
links.cpp: In function ‘int main()’: links.cpp:96:21: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 96 | while (p<prevcol.size() && c<currcol.size()) { | ~^~~~~~~~~~~~~~~ links.cpp:96:41: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 96 | while (p<prevcol.size() && c<currcol.size()) { | ~^~~~~~~~~~~~~~~ links.cpp:130:17: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 130 | while (p<prevcol.size() && c<currcol.size()) { | ~^~~~~~~~~~~~~~~ links.cpp:130:37: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 130 | while (p<prevcol.size() && c<currcol.size()) { | ~^~~~~~~~~~~~~~~ links.cpp:151:17: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 151 | while (p<prevcol.size() && c<currcol.size()) { | ~^~~~~~~~~~~~~~~ links.cpp:151:37: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 151 | while (p<prevcol.size() && c<currcol.size()) { | ~^~~~~~~~~~~~~~~ links.cpp:69:12: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 69 | freopen("links.in","r",stdin); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ links.cpp:70:12: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 70 | freopen("links.out","w",stdout); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.003 secunde | OK. | 10 | 10 | ||
| 2 | 0.002 secunde | OK. | 10 | 10 | ||
| 3 | 0.002 secunde | OK. | 10 | 10 | ||
| 4 | 0.013 secunde | OK. | 10 | 10 | ||
| 5 | 0.014 secunde | OK. | 10 | 10 | ||
| 6 | 0.021 secunde | OK. | 10 | 10 | ||
| 7 | 0.026 secunde | OK. | 10 | 10 | ||
| 8 | 0.026 secunde | OK. | 10 | 10 | ||
| 9 | 0.025 secunde | OK. | 10 | 10 | ||
| 10 | 0.029 secunde | OK. | 10 | 10 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Links 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ă.