Detalii evaluare #64850769

Rezumat problemă

#2041

Pe o matrice de dimensiune m linii și n coloane se cunosc coordonatele castelului și a k cavaleri. Se cere să se determine:

1. numărul minim de mutări după care va ajunge la castel unul dintre cavaleri
2. numărul minim de mutări după care toţi cavalerii se vor afla la castel.

Detalii

Problema camelot Operații I/O camelot.in/camelot.out
Limita timp 1 secunde Limita memorie Total: 64 MB / Stivă 8 MB
Id soluție #64850769 Utilizator Tipa Fabian Alexandru (fabibosspericulos)
Fișier camelot.cpp Dimensiune 1.60 KB
Data încărcării 07 Iunie 2026, 00:55 Scor/rezultat Eroare de compilare

Evaluare

Mesaj compilare

camelot.cpp:1:26: error: extended character ‘ is not valid in an identifier
    1 | camelot.cpp: In function ‘int bfs(int, int, int, int)’:
      |                          ^
camelot.cpp:1:54: error: extended character ’ is not valid in an identifier
    1 | camelot.cpp: In function ‘int bfs(int, int, int, int)’:
      |                                                      ^
camelot.cpp:2:26: error: extended character ‘ is not valid in an identifier
    2 | camelot.cpp:6:34: error: ‘m’ was not declared in this scope; did you mean ‘tm’?
      |                          ^
camelot.cpp:2:26: error: extended character ’ is not valid in an identifier
camelot.cpp:2:75: error: extended character ‘ is not valid in an identifier
    2 | camelot.cpp:6:34: error: ‘m’ was not declared in this scope; did you mean ‘tm’?
      |                                                                           ^
camelot.cpp:2:75: error: extended character ’ is not valid in an identifier
camelot.cpp:6:26: error: extended character ‘ is not valid in an identifier
    6 | camelot.cpp:6:50: error: ‘n’ was not declared in this scope; did you mean ‘yn’?
      |                          ^
camelot.cpp:6:26: error: extended character ’ is not valid in an identifier
camelot.cpp:6:75: error: extended character ‘ is not valid in an identifier
    6 | camelot.cpp:6:50: error: ‘n’ was not declared in this scope; did you mean ‘yn’?
      |                                                                           ^
camelot.cpp:6:75: error: extended character ’ is not valid in an identifier
camelot.cpp:10:69: error: extended character ‘ is not valid in an identifier
   10 | camelot.cpp:11:14: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions]
      |                                                                     ^
camelot.cpp:10:78: error: extended character ’ is not valid in an identifier
   10 | camelot.cpp:11:14: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions]
      |                                                                              ^
camelot.cpp:10:85: error: extended character ‘ is not valid in an identifier
   10 | camelot.cpp:11:14: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions]
      |                                                                                     ^
camelot.cpp:10:96: error: extended character ’ is not valid in an identifier
   10 | camelot.cpp:11:14: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions]
      |                                                                                                ^
camelot.cpp:13:69: error: extended character ‘ is not valid in an identifier
   13 | camelot.cpp:13:20: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions]
      |                                                                     ^
camelot.cpp:13:78: error: extended character ’ is not valid in an identifier
   13 | camelot.cpp:13:20: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions]
      |                                                                              ^
camelot.cpp:13:85: error: extended character ‘ is not valid in an identifier
   13 | camelot.cpp:13:20: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions]
      |                                                                                     ^
camelot.cpp:13:96: error: extended character ’ is not valid in an identifier
   13 | camelot.cpp:13:20: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions]
      |                                                                                                ^
camelot.cpp:16:26: error: extended character ‘ is not valid in an identifier
   16 | camelot.cpp: In function ‘int main()’:
      |                          ^
camelot.cpp:16:37: error: extended character ’ is not valid in an identifier
   16 | camelot.cpp: In function ‘int main()’:
      |                                     ^
camelot.cpp:17:69: error: extended character ‘ is not valid in an identifier
   17 | camelot.cpp:28:16: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions]
      |                                                                     ^
camelot.cpp:17:78: error: extended character ’ is not valid in an identifier
   17 | camelot.cpp:28:16: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions]
      |                                                                              ^
camelot.cpp:17:85: error: extended character ‘ is not valid in an identifier
   17 | camelot.cpp:28:16: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions]
      |                                                                                     ^
camelot.cpp:17:96: error: extended character ’ is not valid in an identifier
   17 | camelot.cpp:28:16: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions]
      |                                                                                                ^
camelot.cpp:20:69: error: extended character ‘ is not valid in an identifier
   20 | camelot.cpp:36:20: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions]
      |                                                                     ^
camelot.cpp:20:78: error: extended character ’ is not valid in an identifier
   20 | camelot.cpp:36:20: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions]
      |                                                                              ^
camelot.cpp:20:85: error: extended character ‘ is not valid in an identifier
   20 | camelot.cpp:36:20: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions]
      |                                                                                     ^
camelot.cpp:20:96: error: extended character ’ is not valid in an identifier
   20 | camelot.cpp:36:20: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions]
      |                                                                                                ^
camelot.cpp:23:26: error: extended character ‘ is not valid in an identifier
   23 | camelot.cpp: In function ‘int bfs(int, int, int, int)’:
      |                          ^
camelot.cpp:23:54: error: extended character ’ is not valid in an identifier
   23 | camelot.cpp: In function ‘int bfs(int, int, int, int)’:
      |                                                      ^
camelot.cpp:1:1: error: ‘camelot’ does not name a type
    1 | camelot.cpp: In function ‘int bfs(int, int, int, int)’:
      | ^~~~~~~
camelot.cpp:2:62: error: ‘did’ does not name a type
    2 | camelot.cpp:6:34: error: ‘m’ was not declared in this scope; did you mean ‘tm’?
      |                                                              ^~~
camelot.cpp:4:7: error: expected unqualified-id before ‘|’ token
    4 |       |                                  ^
      |       ^
camelot.cpp:6:62: error: ‘did’ does not name a type
    6 | camelot.cpp:6:50: error: ‘n’ was not declared in this scope; did you mean ‘yn’?
      |                                                              ^~~
camelot.cpp:8:7: error: expected unqualified-id before ‘|’ token
    8 |       |                                                  ^
      |       ^
camelot.cpp:11:51: error: ‘q’ does not name a type
   11 |    11 |         auto [cx, cy, steps] = q.front(); q.pop();
      |                                                   ^
camelot.cpp:12:7: error: expected unqualified-id before ‘|’ token
   12 |       |              ^
      |       ^

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 camelot 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ă.

Du-te sus!