Detalii evaluare #54296866

Rezumat problemă

Se dă o tablă dreptunghiulară formată din n linii și m coloane, definind n*m zone, unele dintre ele fiind libere, altele conținând obstacole. În zona aflată la poziția is, js se află un șoarece care se poate deplasa pe tablă trecând din zona curentă în zona învecinată cu aceasta pe linie sau pe coloană. Scopul sau este să ajungă la o bucată de brânză aflată în zona de la poziția ib, jb, fără a părăsi tabla, fără a trece prin zone care conțin obstacole și fără a trece de două ori prin aceeași zonă.

Determinați câte modalități prin care șoarecele poate ajunge de la poziția inițială la cea a bucății de brânză există.

Detalii

Problema Soarece Operații I/O soarece.in/soarece.out
Limita timp 1 secunde Limita memorie Total: 64 MB / Stivă 8 MB
Id soluție #54296866 Utilizator Zimbroianu Daria Maria (drisaqv)
Fișier soarece.cpp Dimensiune 1.55 KB
Data încărcării 25 Noiembrie 2024, 10:06 Scor / rezultat Eroare de compilare

Evaluare


Mesaj compilare

soarece.cpp:10:1: error: stray '\302' in program
     fin>>n>>m;

 ^
soarece.cpp:10:1: error: stray '\240' in program
soarece.cpp:10:1: error: stray '\302' in program
soarece.cpp:10:1: error: stray '\240' in program
soarece.cpp:11:1: error: stray '\302' in program
     for(int i=1; i<=n; i++)

 ^
soarece.cpp:11:1: error: stray '\240' in program
soarece.cpp:11:1: error: stray '\302' in program
soarece.cpp:11:1: error: stray '\240' in program
soarece.cpp:12:1: error: stray '\302' in program
         for(int j=1; j<=m; j++)

 ^
soarece.cpp:12:1: error: stray '\240' in program
soarece.cpp:12:1: error: stray '\302' in program
soarece.cpp:12:1: error: stray '\240' in program
soarece.cpp:12:1: error: stray '\302' in program
soarece.cpp:12:1: error: stray '\240' in program
soarece.cpp:12:1: error: stray '\302' in program
soarece.cpp:12:1: error: stray '\240' in program
soarece.cpp:13:1: error: stray '\302' in program
             fin>>a[i][j];

 ^
soarece.cpp:13:1: error: stray '\240' in program
soarece.cpp:13:1: error: stray '\302' in program
soarece.cpp:13:1: error: stray '\240' in program
soarece.cpp:13:1: error: stray '\302' in program
soarece.cpp:13:1: error: stray '\240' in program
soarece.cpp:13:1: error: stray '\302' in program
soarece.cpp:13:1: error: stray '\240' in program
soarece.cpp:13:1: error: stray '\302' in program
soarece.cpp:13:1: error: stray '\240' in program
soarece.cpp:13:1: error: stray '\302' in program
soarece.cpp:13:1: error: stray '\240' in program
soarece.cpp:14:1: error: stray '\302' in program
     fin>>is>>js>>ib>>jb;

 ^
soarece.cpp:14:1: error: stray '\240' in program
soarece.cpp:14:1: error: stray '\302' in program
soarece.cpp:14:1: error: stray '\240' in program
soarece.cpp:15:1: error: stray '\302' in program
     a[is][js]=1;//pozitia initiala a soarecelui

 ^
soarece.cpp:15:1: error: stray '\240' in program
soarece.cpp:15:1: error: stray '\302' in program
soarece.cpp:15:1: error: stray '\240' in program
soarece.cpp:17:1: error: stray '\302' in program
     for(int i=1; i<=n; i++)

 ^
soarece.cpp:17:1: error: stray '\240' in program
soarece.cpp:17:1: error: stray '\302' in program
soarece.cpp:17:1: error: stray '\240' in program
soarece.cpp:18:1: error: stray '\302' in program
         a[i][0]=a[i][m+1]=-1; //bordura coloane

 ^
soarece.cpp:18:1: error: stray '\240' in program
soarece.cpp:18:1: error: stray '\302' in program
soarece.cpp:18:1: error: stray '\240' in program
soarece.cpp:18:1: error: stray '\302' in program
soarece.cpp:18:1: error: stray '\240' in program
soarece.cpp:18:1: error: stray '\302' in program
soarece.cpp:18:1: error: stray '\240' in program
soarece.cpp:19:1: error: stray '\302' in program
     for (int j=1; j<=m; j++)

 ^
soarece.cpp:19:1: error: stray '\240' in program
soarece.cpp:19:1: error: stray '\302' in program
soarece.cpp:19:1: error: stray '\240' in program
soarece.cpp:20:1: error: stray '\302' in program
         a[0][j]=a[n+1][j]=-1; //bordura linii

 ^
soarece.cpp:20:1: error: stray '\240' in program
soarece.cpp:20:1: error: stray '\302' in program
soarece.cpp:20:1: error: stray '\240' in program
soarece.cpp:20:1: error: stray '\302' in program
soarece.cpp:20:1: error: stray '\240' in program
soarece.cpp:20:1: error: stray '\302' in program
soarece.cpp:20:1: error: stray '\240' in program
soarece.cpp:26:1: error: stray '\302' in program
     cout<<endl;

 ^
soarece.cpp:26:1: error: stray '\240' in program
soarece.cpp:26:1: error: stray '\302' in program
soarece.cpp:26:1: error: stray '\240' in program
soarece.cpp:27:1: error: stray '\302' in program
     for(int i = 1; i<=n; i++)

 ^
soarece.cpp:27:1: error: stray '\240' in program
soarece.cpp:27:1: error: stray '\302' in program
soarece.cpp:27:1: error: stray '\240' in program
soarece.cpp:28:1: error: stray '\302' in program
     {

 ^
soarece.cpp:28:1: error: stray '\240' in program
soarece.cpp:28:1: error: stray '\302' in program
soarece.cpp:28:1: error: stray '\240' in program
soarece.cpp:29:1: error: stray '\302' in program
         for(int j = 1; j<=m; j++)

 ^
soarece.cpp:29:1: error: stray '\240' in program
soarece.cpp:29:1: error: stray '\302' in program
soarece.cpp:29:1: error: stray '\240' in program
soarece.cpp:29:1: error: stray '\302' in program
soarece.cpp:29:1: error: stray '\240' in program
soarece.cpp:29:1: error: stray '\302' in program
soarece.cpp:29:1: error: stray '\240' in program
soarece.cpp:30:1: error: stray '\302' in program
         {

 ^
soarece.cpp:30:1: error: stray '\240' in program
soarece.cpp:30:1: error: stray '\302' in program
soarece.cpp:30:1: error: stray '\240' in program
soarece.cpp:30:1: error: stray '\302' in program
soarece.cpp:30:1: error: stray '\240' in program
soarece.cpp:30:1: error: stray '\302' in program
soarece.cpp:30:1: error: stray '\240' in program
soarece.cpp:31:1: error: stray '\302' in program
             if(a[i][j]!=1 || i==is && j==js)

 ^
soarece.cpp:31:1: error: stray '\240' in program
soarece.cpp:31:1: error: stray '\302' in program
soarece.cpp:31:1: error: stray '\240' in program
soarece.cpp:31:1: error: stray '\302' in program
soarece.cpp:31:1: error: stray '\240' in program
soarece.cpp:31:1: error: stray '\302' in program
soarece.cpp:31:1: error: stray '\240' in program
soarece.cpp:31:1: error: stray '\302' in program
soarece.cpp:31:1: error: stray '\240' in program
soarece.cpp:31:1: error: stray '\302' in program
soarece.cpp:31:1: error: stray '\240' in program
soarece.cpp:32:1: error: stray '\302' in program
                 cout<< a[i][j] << " ";

 ^
soarece.cpp:32:1: error: stray '\240' in program
soarece.cpp:32:1: error: stray '\302' in program
soarece.cpp:32:1: error: stray '\240' in program
soarece.cpp:32:1: error: stray '\302' in program
soarece.cpp:32:1: error: stray '\240' in program
soarece.cpp:32:1: error: stray '\302' in program
soarece.cpp:32:1: error: stray '\240' in program
soarece.cpp:32:1: error: stray '\302' in program
soarece.cpp:32:1: error: stray '\240' in program
soarece.cpp:32:1: error: stray '\302' in program
soarece.cpp:32:1: error: stray '\240' in program
soarece.cpp:32:1: error: stray '\302' in program
soarece.cpp:32:1: error: stray '\240' in program
soarece.cpp:32:1: error: stray '\302' in program
soarece.cpp:32:1: error: stray '\240' in program
soarece.cpp:33:1: error: stray '\302' in program
             else

 ^
soarece.cpp:33:1: error: stray '\240' in program
soarece.cpp:33:1: error: stray '\302' in program
soarece.cpp:33:1: error: stray '\240' in program
soarece.cpp:33:1: error: stray '\302' in program
soarece.cpp:33:1: error: stray '\240' in program
soarece.cpp:33:1: error: stray '\302' in program
soarece.cpp:33:1: error: stray '\240' in program
soarece.cpp:33:1: error: stray '\302' in program
soarece.cpp:33:1: error: stray '\240' in program
soarece.cpp:33:1: error: stray '\302' in program
soarece.cpp:33:1: error: stray '\240' in program
soarece.cpp:34:1: error: stray '\302' in program
                 cout<<0<< ' ';

 ^
soarece.cpp:34:1: error: stray '\240' in program
soarece.cpp:34:1: error: stray '\302' in program
soarece.cpp:34:1: error: stray '\240' in program
soarece.cpp:34:1: error: stray '\302' in program
soarece.cpp:34:1: error: stray '\240' in program
soarece.cpp:34:1: error: stray '\302' in program
soarece.cpp:34:1: error: stray '\240' in program
soarece.cpp:34:1: error: stray '\302' in program
soarece.cpp:34:1: error: stray '\240' in program
soarece.cpp:34:1: error: stray '\302' in program
soarece.cpp:34:1: error: stray '\240' in program
soarece.cpp:34:1: error: stray '\302' in program
soarece.cpp:34:1: error: stray '\240' in program
soarece.cpp:34:1: error: stray '\302' in program
soarece.cpp:34:1: error: stray '\240' in program
soarece.cpp:35:1: error: stray '\302' in program
         }

 ^
soarece.cpp:35:1: error: stray '\240' in program
soarece.cpp:35:1: error: stray '\302' in program
soarece.cpp:35:1: error: stray '\240' in program
soarece.cpp:35:1: error: stray '\302' in program
soarece.cpp:35:1: error: stray '\240' in program
soarece.cpp:35:1: error: stray '\302' in program
soarece.cpp:35:1: error: stray '\240' in program
soarece.cpp:36:1: error: stray '\302' in program
         cout<< "\n";

 ^
soarece.cpp:36:1: error: stray '\240' in program
soarece.cpp:36:1: error: stray '\302' in program
soarece.cpp:36:1: error: stray '\240' in program
soarece.cpp:36:1: error: stray '\302' in program
soarece.cpp:36:1: error: stray '\240' in program
soarece.cpp:36:1: error: stray '\302' in program
soarece.cpp:36:1: error: stray '\240' in program
soarece.cpp:37:1: error: stray '\302' in program
     }

 ^
soarece.cpp:37:1: error: stray '\240' in program
soarece.cpp:37:1: error: stray '\302' in program
soarece.cpp:37:1: error: stray '\240' in program
soarece.cpp:43:1: error: stray '\302' in program
     for(int d=1; d<=4; d++)//pt fiecare deplasare posibila

 ^
soarece.cpp:43:1: error: stray '\240' in program
soarece.cpp:43:1: error: stray '\302' in program
soarece.cpp:43:1: error: stray '\240' in program
soarece.cpp:44:1: error: stray '\302' in program
     {

 ^
soarece.cpp:44:1: error: stray '\240' in program
soarece.cpp:44:1: error: stray '\302' in program
soarece.cpp:44:1: error: stray '\240' in program
soarece.cpp:45:1: error: stray '\302' in program
         int inou,jnou;//pozitia unde sare

 ^
soarece.cpp:45:1: error: stray '\240' in program
soarece.cpp:45:1: error: stray '\302' in program
soarece.cpp:45:1: error: stray '\240' in program
soarece.cpp:45:1: error: stray '\302' in program
soarece.cpp:45:1: error: stray '\240' in program
soarece.cpp:45:1: error: stray '\302' in program
soarece.cpp:45:1: error: stray '\240' in program
soarece.cpp:46:1: error: stray '\302' in program
         inou=i+dy[d];

 ^
soarece.cpp:46:1: error: stray '\240' in program
soarece.cpp:46:1: error: stray '\302' in program
soarece.cpp:46:1: error: stray '\240' in program
soarece.cpp:46:1: error: stray '\302' in program
soarece.cpp:46:1: error: stray '\240' in program
soarece.cpp:46:1: error: stray '\302' in program
soarece.cpp:46:1: error: stray '\240' in program
soarece.cpp:47:1: error: stray '\302' in program
         jnou=j+dx[d];

 ^
soarece.cpp:47:1: error: stray '\240' in program
soarece.cpp:47:1: error: stray '\302' in program
soarece.cpp:47:1: error: stray '\240' in program
soarece.cpp:47:1: error: stray '\302' in program
soarece.cpp:47:1: error: stray '\240' in program
soarece.cpp:47:1: error: stray '\302' in program
soarece.cpp:47:1: error: stray '\240' in program
soarece.cpp:48:1: error: stray '\302' in program
         if (a[inou][jnou]==0)//daca e liber

 ^
soarece.cpp:48:1: error: stray '\240' in program
soarece.cpp:48:1: error: stray '\302' in program
soarece.cpp:48:1: error: stray '\240' in program
soarece.cpp:48:1: error: stray '\302' in program
soarece.cpp:48:1: error: stray '\240' in program
soarece.cpp:48:1: error: stray '\302' in program
soarece.cpp:48:1: error: stray '\240' in program
soarece.cpp:49:1: error: stray '\302' in program
         {

 ^
soarece.cpp:49:1: error: stray '\240' in program
soarece.cpp:49:1: error: stray '\302' in program
soarece.cpp:49:1: error: stray '\240' in program
soarece.cpp:49:1: error: stray '\302' in program
soarece.cpp:49:1: error: stray '\240' in program
soarece.cpp:49:1: error: stray '\302' in program
soarece.cpp:49:1: error: stray '\240' in program
soarece.cpp:50:1: error: stray '\302' in program
             a[inou][jnou]=pas;//face pasul

 ^
soarece.cpp:50:1: error: stray '\240' in program
soarece.cpp:50:1: error: stray '\302' in program
soarece.cpp:50:1: error: stray '\240' in program
soarece.cpp:50:1: error: stray '\302' in program
soarece.cpp:50:1: error: stray '\240' in program
soarece.cpp:50:1: error: stray '\302' in program
soarece.cpp:50:1: error: stray '\240' in program
soarece.cpp:50:1: error: stray '\302' in program
soarece.cpp:50:1: error: stray '\240' in program
soarece.cpp:50:1: error: stray '\302' in program
soarece.cpp:50:1: error: stray '\240' in program
soarece.cpp:51:1: error: stray '\302' in program
             if(inou==ib&&jnou==jb)//daca a ajuns la branza

 ^
soarece.cpp:51:1: error: stray '\240' in program
soarece.cpp:51:1: error: stray '\302' in program
soarece.cpp:51:1: error: stray '\240' in program
soarece.cpp:51:1: error: stray '\302' in program
soarece.cpp:51:1: error: stray '\240' in program
soarece.cpp:51:1: error: stray '\302' in program
soarece.cpp:51:1: error: stray '\240' in program
soarece.cpp:51:1: error: stray '\302' in program
soarece.cpp:51:1: error: stray '\240' in program
soarece.cpp:51:1: error: stray '\302' in program
soarece.cpp:51:1: error: stray '\240' in program
soarece.cpp:52:1: error: stray '\302' in program
                 afis();//afiseaza solutie

 ^
soarece.cpp:52:1: error: stray '\240' in program
soarece.cpp:52:1: error: stray '\302' in program
soarece.cpp:52:1: error: stray '\240' in program
soarece.cpp:52:1: error: stray '\302' in program
soarece.cpp:52:1: error: stray '\240' in program
soarece.cpp:52:1: error: stray '\302' in program
soarece.cpp:52:1: error: stray '\240' in program
soarece.cpp:52:1: error: stray '\302' in program
soarece.cpp:52:1: error: stray '\240' in program
soarece.cpp:52:1: error: stray '\302' in program
soarece.cpp:52:1: error: stray '\240' in program
soarece.cpp:52:1: error: stray '\302' in program
soarece.cpp:52:1: error: stray '\240' in program
soarece.cpp:52:1: error: stray '\302' in program
soarece.cpp:52:1: error: stray '\240' in program
soarece.cpp:53:1: error: stray '\302' in program
             else

 ^
soarece.cpp:53:1: error: stray '\240' in program
soarece.cpp:53:1: error: stray '\302' in program
soarece.cpp:53:1: error: stray '\240' in program
soarece.cpp:53:1: error: stray '\302' in program
soarece.cpp:53:1: error: stray '\240' in program
soarece.cpp:53:1: error: stray '\302' in program
soarece.cpp:53:1: error: stray '\240' in program
soarece.cpp:53:1: error: stray '\302' in program
soarece.cpp:53:1: error: stray '\240' in program
soarece.cpp:53:1: error: stray '\302' in program
soarece.cpp:53:1: error: stray '\240' in program
soarece.cpp:54:1: error: stray '\302' in program
                 bktr(inou, jnou,pas+1);//mai face pasi

 ^
soarece.cpp:54:1: error: stray '\240' in program
soarece.cpp:54:1: error: stray '\302' in program
soarece.cpp:54:1: error: stray '\240' in program
soarece.cpp:54:1: error: stray '\302' in program
soarece.cpp:54:1: error: stray '\240' in program
soarece.cpp:54:1: error: stray '\302' in program
soarece.cpp:54:1: error: stray '\240' in program
soarece.cpp:54:1: error: stray '\302' in program
soarece.cpp:54:1: error: stray '\240' in program
soarece.cpp:54:1: error: stray '\302' in program
soarece.cpp:54:1: error: stray '\240' in program
soarece.cpp:54:1: error: stray '\302' in program
soarece.cpp:54:1: error: stray '\240' in program
soarece.cpp:54:1: error: stray '\302' in program
soarece.cpp:54:1: error: stray '\240' in program
soarece.cpp:55:1: error: stray '\302' in program
             a[inou][jnou]=0;//sterge pasul facut

 ^
soarece.cpp:55:1: error: stray '\240' in program
soarece.cpp:55:1: error: stray '\302' in program
soarece.cpp:55:1: error: stray '\240' in program
soarece.cpp:55:1: error: stray '\302' in program
soarece.cpp:55:1: error: stray '\240' in program
soarece.cpp:55:1: error: stray '\302' in program
soarece.cpp:55:1: error: stray '\240' in program
soarece.cpp:55:1: error: stray '\302' in program
soarece.cpp:55:1: error: stray '\240' in program
soarece.cpp:55:1: error: stray '\302' in program
soarece.cpp:55:1: error: stray '\240' in program
soarece.cpp:56:1: error: stray '\302' in program
         }

 ^
soarece.cpp:56:1: error: stray '\240' in program
soarece.cpp:56:1: error: stray '\302' in program
soarece.cpp:56:1: error: stray '\240' in program
soarece.cpp:56:1: error: stray '\302' in program
soarece.cpp:56:1: error: stray '\240' in program
soarece.cpp:56:1: error: stray '\302' in program
soarece.cpp:56:1: error: stray '\240' in program
soarece.cpp:57:1: error: stray '\302' in program
     }

 ^
soarece.cpp:57:1: error: stray '\240' in program
soarece.cpp:57:1: error: stray '\302' in program
soarece.cpp:57:1: error: stray '\240' in program
soarece.cpp:61:1: error: stray '\302' in program
     citire();

 ^
soarece.cpp:61:1: error: stray '\240' in program
soarece.cpp:61:1: error: stray '\302' in program
soarece.cpp:61:1: error: stray '\240' in program
soarece.cpp:62:1: error: stray '\302' in program
     bktr(is,js,2);

 ^
soarece.cpp:62:1: error: stray '\240' in program
soarece.cpp:62:1: error: stray '\302' in program
soarece.cpp:62:1: error: stray '\240' in program
soarece.cpp: In function 'void afis()':
soarece.cpp:31:42: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
             if(a[i][j]!=1 || i==is && j==js)

                                          ^

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