Detalii evaluare #9295028

Rezumat problemă

O echipă de cercetători a construit un robot pentru realizarea de operaţiuni industriale în medii greu accesibile. Robotul este acţionat de un motor electric alimentat de un acumulator cu proprietatea de a se autoîncărca folosind energia mediului ambiant.

Pentru testele preliminare s-a construit o suprafaţă de testare de formă pătrată, compusă din N*N pătrate de dimensiune unitate, pentru fiecare pătrat cunoscându-se cantitatea de energie, posibil egală cu zero, pe care o poate acumula robotul dacă ajunge în poziţia respectivă. Robotul se va deplasa conform unui şir de comenzi codificat prin caracterele N, E, S, V (N-deplasare cu o poziţie către nord, E-deplasare cu o poziţie către est, S-deplasare cu o poziţie către sud, V-deplasare cu o poziţie către vest). Şirul de comenzi este corect, adică robotul nu va trece de mai multe ori prin aceeaşi poziţie şi nu va depăşi marginile suprafeţei de testare.

Iniţial, acumulatorul robotului este descărcat complet, dar acesta se găseşte cu siguranţă într-o poziţie de unde poate acumula energie. Deplasarea robotului dintr-o poziţie în alta consumă o unitate de energie. Cantitatea de energie ce poate fi stocată în acumulator este nelimitată.

Robotul se opreşte când a efectuat toate comenzile din şirul dat sau când ajungând într-o poziţie energia acumulatorului devine zero, iar în respectiva poziţie nu poate acumula energie.

Cunoscând dimensiunea suprafeţei de testare, cantitatea de energie din fiecare poziţie, poziţia iniţială şi succesiunea de comenzi determinaţi poziţia unde se opreşte robotul.

Detalii

Problema Robot1 Operații I/O robot1.in/robot1.out
Limita timp 0.2 secunde Limita memorie Total: 2 MB / Stivă 2 MB
Id soluție #9295028 Utilizator Pele Carmen Ioana (ioanapele)
Fișier robot1.cpp Dimensiune 1.96 KB
Data încărcării 23 Aprilie 2018, 16:53 Scor / rezultat Eroare de compilare

Evaluare


Mesaj compilare

robot1.cpp:17:1: error: stray '\302' in program
     return (di[a]<di[b]  || di[a]==di[b] && dj[a]<dj[b] );

 ^
robot1.cpp:17:1: error: stray '\240' in program
robot1.cpp:17:1: error: stray '\302' in program
robot1.cpp:17:1: error: stray '\240' in program
robot1.cpp:17:1: error: stray '\302' in program
robot1.cpp:17:1: error: stray '\240' in program
robot1.cpp:25:1: error: stray '\302' in program
     int i,j,n,m,i1,i2,j1,j2,aux=0,bat=0,k=0,y;

 ^
robot1.cpp:25:1: error: stray '\240' in program
robot1.cpp:25:1: error: stray '\302' in program
robot1.cpp:25:1: error: stray '\240' in program
robot1.cpp:27:1: error: stray '\302' in program
     char x;

 ^
robot1.cpp:27:1: error: stray '\240' in program
robot1.cpp:27:1: error: stray '\302' in program
robot1.cpp:27:1: error: stray '\240' in program
robot1.cpp:29:1: error: stray '\302' in program
     fin>>n>>m>>i1>>j1;

 ^
robot1.cpp:29:1: error: stray '\240' in program
robot1.cpp:29:1: error: stray '\302' in program
robot1.cpp:29:1: error: stray '\240' in program
robot1.cpp:31:1: error: stray '\302' in program
     di[0]=i1;

 ^
robot1.cpp:31:1: error: stray '\240' in program
robot1.cpp:31:1: error: stray '\302' in program
robot1.cpp:31:1: error: stray '\240' in program
robot1.cpp:33:1: error: stray '\302' in program
     dj[0]=j1;

 ^
robot1.cpp:33:1: error: stray '\240' in program
robot1.cpp:33:1: error: stray '\302' in program
robot1.cpp:33:1: error: stray '\240' in program
robot1.cpp:35:1: error: stray '\302' in program
     for(i=1; i<=m; i++)

 ^
robot1.cpp:35:1: error: stray '\240' in program
robot1.cpp:35:1: error: stray '\302' in program
robot1.cpp:35:1: error: stray '\240' in program
robot1.cpp:37:1: error: stray '\302' in program
     {

 ^
robot1.cpp:37:1: error: stray '\240' in program
robot1.cpp:37:1: error: stray '\302' in program
robot1.cpp:37:1: error: stray '\240' in program
robot1.cpp:39:1: error: stray '\302' in program
         fin>>x;

 ^
robot1.cpp:39:1: error: stray '\240' in program
robot1.cpp:39:1: error: stray '\302' in program
robot1.cpp:39:1: error: stray '\240' in program
robot1.cpp:39:1: error: stray '\302' in program
robot1.cpp:39:1: error: stray '\240' in program
robot1.cpp:39:1: error: stray '\302' in program
robot1.cpp:39:1: error: stray '\240' in program
robot1.cpp:41:1: error: stray '\302' in program
         p[i]=i;

 ^
robot1.cpp:41:1: error: stray '\240' in program
robot1.cpp:41:1: error: stray '\302' in program
robot1.cpp:41:1: error: stray '\240' in program
robot1.cpp:41:1: error: stray '\302' in program
robot1.cpp:41:1: error: stray '\240' in program
robot1.cpp:41:1: error: stray '\302' in program
robot1.cpp:41:1: error: stray '\240' in program
robot1.cpp:43:1: error: stray '\302' in program
         if(x=='S')

 ^
robot1.cpp:43:1: error: stray '\240' in program
robot1.cpp:43:1: error: stray '\302' in program
robot1.cpp:43:1: error: stray '\240' in program
robot1.cpp:43:1: error: stray '\302' in program
robot1.cpp:43:1: error: stray '\240' in program
robot1.cpp:43:1: error: stray '\302' in program
robot1.cpp:43:1: error: stray '\240' in program
robot1.cpp:45:1: error: stray '\302' in program
         {

 ^
robot1.cpp:45:1: error: stray '\240' in program
robot1.cpp:45:1: error: stray '\302' in program
robot1.cpp:45:1: error: stray '\240' in program
robot1.cpp:45:1: error: stray '\302' in program
robot1.cpp:45:1: error: stray '\240' in program
robot1.cpp:45:1: error: stray '\302' in program
robot1.cpp:45:1: error: stray '\240' in program
robot1.cpp:47:1: error: stray '\302' in program
             di[i]=di[i-1]+1;

 ^
robot1.cpp:47:1: error: stray '\240' in program
robot1.cpp:47:1: error: stray '\302' in program
robot1.cpp:47:1: error: stray '\240' in program
robot1.cpp:47:1: error: stray '\302' in program
robot1.cpp:47:1: error: stray '\240' in program
robot1.cpp:47:1: error: stray '\302' in program
robot1.cpp:47:1: error: stray '\240' in program
robot1.cpp:47:1: error: stray '\302' in program
robot1.cpp:47:1: error: stray '\240' in program
robot1.cpp:47:1: error: stray '\302' in program
robot1.cpp:47:1: error: stray '\240' in program
robot1.cpp:49:1: error: stray '\302' in program
             dj[i]=dj[i-1];

 ^
robot1.cpp:49:1: error: stray '\240' in program
robot1.cpp:49:1: error: stray '\302' in program
robot1.cpp:49:1: error: stray '\240' in program
robot1.cpp:49:1: error: stray '\302' in program
robot1.cpp:49:1: error: stray '\240' in program
robot1.cpp:49:1: error: stray '\302' in program
robot1.cpp:49:1: error: stray '\240' in program
robot1.cpp:49:1: error: stray '\302' in program
robot1.cpp:49:1: error: stray '\240' in program
robot1.cpp:49:1: error: stray '\302' in program
robot1.cpp:49:1: error: stray '\240' in program
robot1.cpp:51:1: error: stray '\302' in program
         }

 ^
robot1.cpp:51:1: error: stray '\240' in program
robot1.cpp:51:1: error: stray '\302' in program
robot1.cpp:51:1: error: stray '\240' in program
robot1.cpp:51:1: error: stray '\302' in program
robot1.cpp:51:1: error: stray '\240' in program
robot1.cpp:51:1: error: stray '\302' in program
robot1.cpp:51:1: error: stray '\240' in program
robot1.cpp:53:1: error: stray '\302' in program
         if(x=='N')

 ^
robot1.cpp:53:1: error: stray '\240' in program
robot1.cpp:53:1: error: stray '\302' in program
robot1.cpp:53:1: error: stray '\240' in program
robot1.cpp:53:1: error: stray '\302' in program
robot1.cpp:53:1: error: stray '\240' in program
robot1.cpp:53:1: error: stray '\302' in program
robot1.cpp:53:1: error: stray '\240' in program
robot1.cpp:55:1: error: stray '\302' in program
         {

 ^
robot1.cpp:55:1: error: stray '\240' in program
robot1.cpp:55:1: error: stray '\302' in program
robot1.cpp:55:1: error: stray '\240' in program
robot1.cpp:55:1: error: stray '\302' in program
robot1.cpp:55:1: error: stray '\240' in program
robot1.cpp:55:1: error: stray '\302' in program
robot1.cpp:55:1: error: stray '\240' in program
robot1.cpp:57:1: error: stray '\302' in program
             di[i]=di[i-1]-1;

 ^
robot1.cpp:57:1: error: stray '\240' in program
robot1.cpp:57:1: error: stray '\302' in program
robot1.cpp:57:1: error: stray '\240' in program
robot1.cpp:57:1: error: stray '\302' in program
robot1.cpp:57:1: error: stray '\240' in program
robot1.cpp:57:1: error: stray '\302' in program
robot1.cpp:57:1: error: stray '\240' in program
robot1.cpp:57:1: error: stray '\302' in program
robot1.cpp:57:1: error: stray '\240' in program
robot1.cpp:57:1: error: stray '\302' in program
robot1.cpp:57:1: error: stray '\240' in program
robot1.cpp:59:1: error: stray '\302' in program
             dj[i]=dj[i-1];

 ^
robot1.cpp:59:1: error: stray '\240' in program
robot1.cpp:59:1: error: stray '\302' in program
robot1.cpp:59:1: error: stray '\240' in program
robot1.cpp:59:1: error: stray '\302' in program
robot1.cpp:59:1: error: stray '\240' in program
robot1.cpp:59:1: error: stray '\302' in program
robot1.cpp:59:1: error: stray '\240' in program
robot1.cpp:59:1: error: stray '\302' in program
robot1.cpp:59:1: error: stray '\240' in program
robot1.cpp:59:1: error: stray '\302' in program
robot1.cpp:59:1: error: stray '\240' in program
robot1.cpp:61:1: error: stray '\302' in program
         }

 ^
robot1.cpp:61:1: error: stray '\240' in program
robot1.cpp:61:1: error: stray '\302' in program
robot1.cpp:61:1: error: stray '\240' in program
robot1.cpp:61:1: error: stray '\302' in program
robot1.cpp:61:1: error: stray '\240' in program
robot1.cpp:61:1: error: stray '\302' in program
robot1.cpp:61:1: error: stray '\240' in program
robot1.cpp:63:1: error: stray '\302' in program
         if(x=='V')

 ^
robot1.cpp:63:1: error: stray '\240' in program
robot1.cpp:63:1: error: stray '\302' in program
robot1.cpp:63:1: error: stray '\240' in program
robot1.cpp:63:1: error: stray '\302' in program
robot1.cpp:63:1: error: stray '\240' in program
robot1.cpp:63:1: error: stray '\302' in program
robot1.cpp:63:1: error: stray '\240' in program
robot1.cpp:65:1: error: stray '\302' in program
         {

 ^
robot1.cpp:65:1: error: stray '\240' in program
robot1.cpp:65:1: error: stray '\302' in program
robot1.cpp:65:1: error: stray '\240' in program
robot1.cpp:65:1: error: stray '\302' in program
robot1.cpp:65:1: error: stray '\240' in program
robot1.cpp:65:1: error: stray '\302' in program
robot1.cpp:65:1: error: stray '\240' in program
robot1.cpp:67:1: error: stray '\302' in program
             di[i]=di[i-1];

 ^
robot1.cpp:67:1: error: stray '\240' in program
robot1.cpp:67:1: error: stray '\302' in program
robot1.cpp:67:1: error: stray '\240' in program
robot1.cpp:67:1: error: stray '\302' in program
robot1.cpp:67:1: error: stray '\240' in program
robot1.cpp:67:1: error: stray '\302' in program
robot1.cpp:67:1: error: stray '\240' in program
robot1.cpp:67:1: error: stray '\302' in program
robot1.cpp:67:1: error: stray '\240' in program
robot1.cpp:67:1: error: stray '\302' in program
robot1.cpp:67:1: error: stray '\240' in program
robot1.cpp:69:1: error: stray '\302' in program
             dj[i]=dj[i-1]-1;

 ^
robot1.cpp:69:1: error: stray '\240' in program
robot1.cpp:69:1: error: stray '\302' in program
robot1.cpp:69:1: error: stray '\240' in program
robot1.cpp:69:1: error: stray '\302' in program
robot1.cpp:69:1: error: stray '\240' in program
robot1.cpp:69:1: error: stray '\302' in program
robot1.cpp:69:1: error: stray '\240' in program
robot1.cpp:69:1: error: stray '\302' in program
robot1.cpp:69:1: error: stray '\240' in program
robot1.cpp:69:1: error: stray '\302' in program
robot1.cpp:69:1: error: stray '\240' in program
robot1.cpp:71:1: error: stray '\302' in program
         }

 ^
robot1.cpp:71:1: error: stray '\240' in program
robot1.cpp:71:1: error: stray '\302' in program
robot1.cpp:71:1: error: stray '\240' in program
robot1.cpp:71:1: error: stray '\302' in program
robot1.cpp:71:1: error: stray '\240' in program
robot1.cpp:71:1: error: stray '\302' in program
robot1.cpp:71:1: error: stray '\240' in program
robot1.cpp:73:1: error: stray '\302' in program
         if(x=='E')

 ^
robot1.cpp:73:1: error: stray '\240' in program
robot1.cpp:73:1: error: stray '\302' in program
robot1.cpp:73:1: error: stray '\240' in program
robot1.cpp:73:1: error: stray '\302' in program
robot1.cpp:73:1: error: stray '\240' in program
robot1.cpp:73:1: error: stray '\302' in program
robot1.cpp:73:1: error: stray '\240' in program
robot1.cpp:75:1: error: stray '\302' in program
         {

 ^
robot1.cpp:75:1: error: stray '\240' in program
robot1.cpp:75:1: error: stray '\302' in program
robot1.cpp:75:1: error: stray '\240' in program
robot1.cpp:75:1: error: stray '\302' in program
robot1.cpp:75:1: error: stray '\240' in program
robot1.cpp:75:1: error: stray '\302' in program
robot1.cpp:75:1: error: stray '\240' in program
robot1.cpp:77:1: error: stray '\302' in program
             di[i]=di[i-1];

 ^
robot1.cpp:77:1: error: stray '\240' in program
robot1.cpp:77:1: error: stray '\302' in program
robot1.cpp:77:1: error: stray '\240' in program
robot1.cpp:77:1: error: stray '\302' in program
robot1.cpp:77:1: error: stray '\240' in program
robot1.cpp:77:1: error: stray '\302' in program
robot1.cpp:77:1: error: stray '\240' in program
robot1.cpp:77:1: error: stray '\302' in program
robot1.cpp:77:1: error: stray '\240' in program
robot1.cpp:77:1: error: stray '\302' in program
robot1.cpp:77:1: error: stray '\240' in program
robot1.cpp:79:1: error: stray '\302' in program
             dj[i]=dj[i-1]+1;

 ^
robot1.cpp:79:1: error: stray '\240' in program
robot1.cpp:79:1: error: stray '\302' in program
robot1.cpp:79:1: error: stray '\240' in program
robot1.cpp:79:1: error: stray '\302' in program
robot1.cpp:79:1: error: stray '\240' in program
robot1.cpp:79:1: error: stray '\302' in program
robot1.cpp:79:1: error: stray '\240' in program
robot1.cpp:79:1: error: stray '\302' in program
robot1.cpp:79:1: error: stray '\240' in program
robot1.cpp:79:1: error: stray '\302' in program
robot1.cpp:79:1: error: stray '\240' in program
robot1.cpp:81:1: error: stray '\302' in program
         }

 ^
robot1.cpp:81:1: error: stray '\240' in program
robot1.cpp:81:1: error: stray '\302' in program
robot1.cpp:81:1: error: stray '\240' in program
robot1.cpp:81:1: error: stray '\302' in program
robot1.cpp:81:1: error: stray '\240' in program
robot1.cpp:81:1: error: stray '\302' in program
robot1.cpp:81:1: error: stray '\240' in program
robot1.cpp:83:1: error: stray '\302' in program
     }

 ^
robot1.cpp:83:1: error: stray '\240' in program
robot1.cpp:83:1: error: stray '\302' in program
robot1.cpp:83:1: error: stray '\240' in program
robot1.cpp:85:1: error: stray '\302' in program
  

 ^
robot1.cpp:85:1: error: stray '\240' in program
robot1.cpp:87:1: error: stray '\302' in program
     sort(p, p+m+1, corect);

 ^
robot1.cpp:87:1: error: stray '\240' in program
robot1.cpp:87:1: error: stray '\302' in program
robot1.cpp:87:1: error: stray '\240' in program
robot1.cpp:89:1: error: stray '\302' in program
  

 ^
robot1.cpp:89:1: error: stray '\240' in program
robot1.cpp:91:1: error: stray '\302' in program
    /* for(k=0; k<=m ; k++)

 ^
robot1.cpp:91:1: error: stray '\240' in program
robot1.cpp:91:1: error: stray '\302' in program
robot1.cpp:91:1: error: stray '\240' in program
robot1.cpp:117:1: error: stray '\302' in program
  

 ^
robot1.cpp:117:1: error: stray '\240' in program
robot1.cpp:119:1: error: stray '\302' in program
     k=0;

 ^
robot1.cpp:119:1: error: stray '\240' in program
robot1.cpp:119:1: error: stray '\302' in program
robot1.cpp:119:1: error: stray '\240' in program
robot1.cpp:121:1: error: stray '\302' in program
     for(i=1; i<=n; i++)

 ^
robot1.cpp:121:1: error: stray '\240' in program
robot1.cpp:121:1: error: stray '\302' in program
robot1.cpp:121:1: error: stray '\240' in program
robot1.cpp:123:1: error: stray '\302' in program
     {

 ^
robot1.cpp:123:1: error: stray '\240' in program
robot1.cpp:123:1: error: stray '\302' in program
robot1.cpp:123:1: error: stray '\240' in program
robot1.cpp:125:1: error: stray '\302' in program
         for(j=1; j<=n; j++)

 ^
robot1.cpp:125:1: error: stray '\240' in program
robot1.cpp:125:1: error: stray '\302' in program
robot1.cpp:125:1: error: stray '\240' in program
robot1.cpp:125:1: error: stray '\302' in program
robot1.cpp:125:1: error: stray '\240' in program
robot1.cpp:125:1: error: stray '\302' in program
robot1.cpp:125:1: error: stray '\240' in program
robot1.cpp:127:1: error: stray '\302' in program
         {

 ^
robot1.cpp:127:1: error: stray '\240' in program
robot1.cpp:127:1: error: stray '\302' in program
robot1.cpp:127:1: error: stray '\240' in program
robot1.cpp:127:1: error: stray '\302' in program
robot1.cpp:127:1: error: stray '\240' in program
robot1.cpp:127:1: error: stray '\302' in program
robot1.cpp:127:1: error: stray '\240' in program
robot1.cpp:129:1: error: stray '\302' in program
             fin>>y;

 ^
robot1.cpp:129:1: error: stray '\240' in program
robot1.cpp:129:1: error: stray '\302' in program
robot1.cpp:129:1: error: stray '\240' in program
robot1.cpp:129:1: error: stray '\302' in program
robot1.cpp:129:1: error: stray '\240' in program
robot1.cpp:129:1: error: stray '\302' in program
robot1.cpp:129:1: error: stray '\240' in program
robot1.cpp:129:1: error: stray '\302' in program
robot1.cpp:129:1: error: stray '\240' in program
robot1.cpp:129:1: error: stray '\302' in program
robot1.cpp:129:1: error: stray '\240' in program
robot1.cpp:131:1: error: stray '\302' in program
             while(di[p[k]]==i && dj[p[k]]==j)

 ^
robot1.cpp:131:1: error: stray '\240' in program
robot1.cpp:131:1: error: stray '\302' in program
robot1.cpp:131:1: error: stray '\240' in program
robot1.cpp:131:1: error: stray '\302' in program
robot1.cpp:131:1: error: stray '\240' in program
robot1.cpp:131:1: error: stray '\302' in program
robot1.cpp:131:1: error: stray '\240' in program
robot1.cpp:131:1: error: stray '\302' in program
robot1.cpp:131:1: error: stray '\240' in program
robot1.cpp:131:1: error: stray '\302' in program
robot1.cpp:131:1: error: stray '\240' in program
robot1.cpp:133:1: error: stray '\302' in program
        {

 ^
robot1.cpp:133:1: error: stray '\240' in program
robot1.cpp:133:1: error: stray '\302' in program
robot1.cpp:133:1: error: stray '\240' in program
robot1.cpp:133:1: error: stray '\302' in program
robot1.cpp:133:1: error: stray '\240' in program
robot1.cpp:133:1: error: stray '\302' in program
robot1.cpp:133:1: error: stray '\240' in program
robot1.cpp:135:1: error: stray '\302' in program
                 e[k]+=y;

 ^
robot1.cpp:135:1: error: stray '\240' in program
robot1.cpp:135:1: error: stray '\302' in program
robot1.cpp:135:1: error: stray '\240' in program
robot1.cpp:135:1: error: stray '\302' in program
robot1.cpp:135:1: error: stray '\240' in program
robot1.cpp:135:1: error: stray '\302' in program
robot1.cpp:135:1: error: stray '\240' in program
robot1.cpp:135:1: error: stray '\302' in program
robot1.cpp:135:1: error: stray '\240' in program
robot1.cpp:135:1: error: stray '\302' in program
robot1.cpp:135:1: error: stray '\240' in program
robot1.cpp:135:1: error: stray '\302' in program
robot1.cpp:135:1: error: stray '\240' in program
robot1.cpp:135:1: error: stray '\302' in program
robot1.cpp:135:1: error: stray '\240' in program
robot1.cpp:137:1: error: stray '\302' in program
                 k++;

 ^
robot1.cpp:137:1: error: stray '\240' in program
robot1.cpp:137:1: error: stray '\302' in program
robot1.cpp:137:1: error: stray '\240' in program
robot1.cpp:137:1: error: stray '\302' in program
robot1.cpp:137:1: error: stray '\240' in program
robot1.cpp:137:1: error: stray '\302' in program
robot1.cpp:137:1: error: stray '\240' in program
robot1.cpp:137:1: error: stray '\302' in program
robot1.cpp:137:1: error: stray '\240' in program
robot1.cpp:137:1: error: stray '\302' in program
robot1.cpp:137:1: error: stray '\240' in program
robot1.cpp:137:1: error: stray '\302' in program
robot1.cpp:137:1: error: stray '\240' in program
robot1.cpp:137:1: error: stray '\302' in program
robot1.cpp:137:1: error: stray '\240' in program
robot1.cpp:139:1: error: stray '\302' in program
             }

 ^
robot1.cpp:139:1: error: stray '\240' in program
robot1.cpp:139:1: error: stray '\302' in program
robot1.cpp:139:1: error: stray '\240' in program
robot1.cpp:139:1: error: stray '\302' in program
robot1.cpp:139:1: error: stray '\240' in program
robot1.cpp:139:1: error: stray '\302' in program
robot1.cpp:139:1: error: stray '\240' in program
robot1.cpp:139:1: error: stray '\302' in program
robot1.cpp:139:1: error: stray '\240' in program
robot1.cpp:139:1: error: stray '\302' in program
robot1.cpp:139:1: error: stray '\240' in program
robot1.cpp:141:1: error: stray '\302' in program
         }

 ^
robot1.cpp:141:1: error: stray '\240' in program
robot1.cpp:141:1: error: stray '\302' in program
robot1.cpp:141:1: error: stray '\240' in program
robot1.cpp:141:1: error: stray '\302' in program
robot1.cpp:141:1: error: stray '\240' in program
robot1.cpp:141:1: error: stray '\302' in program
robot1.cpp:141:1: error: stray '\240' in program
robot1.cpp:143:1: error: stray '\302' in program
     }

 ^
robot1.cpp:143:1: error: stray '\240' in program
robot1.cpp:143:1: error: stray '\302' in program
robot1.cpp:143:1: error: stray '\240' in program
robot1.cpp:145:1: error: stray '\302' in program
     bat=e[0];

 ^
robot1.cpp:145:1: error: stray '\240' in program
robot1.cpp:145:1: error: stray '\302' in program
robot1.cpp:145:1: error: stray '\240' in program
robot1.cpp:147:1: error: stray '\302' in program
     for(k=1; k<=m &&bat>0; k++)

 ^
robot1.cpp:147:1: error: stray '\240' in program
robot1.cpp:147:1: error: stray '\302' in program
robot1.cpp:147:1: error: stray '\240' in program
robot1.cpp:149:1: error: stray '\302' in program
     {

 ^
robot1.cpp:149:1: error: stray '\240' in program
robot1.cpp:149:1: error: stray '\302' in program
robot1.cpp:149:1: error: stray '\240' in program
robot1.cpp:151:1: error: stray '\302' in program
         bat+=e[k]-1;

 ^
robot1.cpp:151:1: error: stray '\240' in program
robot1.cpp:151:1: error: stray '\302' in program
robot1.cpp:151:1: error: stray '\240' in program
robot1.cpp:151:1: error: stray '\302' in program
robot1.cpp:151:1: error: stray '\240' in program
robot1.cpp:151:1: error: stray '\302' in program
robot1.cpp:151:1: error: stray '\240' in program
robot1.cpp:153:1: error: stray '\302' in program
         // cout<<di[k]<<" "<<dj[k]<<" "<<bat<<"\n";

 ^
robot1.cpp:153:1: error: stray '\240' in program
robot1.cpp:153:1: error: stray '\302' in program
robot1.cpp:153:1: error: stray '\240' in program
robot1.cpp:153:1: error: stray '\302' in program
robot1.cpp:153:1: error: stray '\240' in program
robot1.cpp:153:1: error: stray '\302' in program
robot1.cpp:153:1: error: stray '\240' in program
robot1.cpp:155:1: error: stray '\302' in program
     }

 ^
robot1.cpp:155:1: error: stray '\240' in program
robot1.cpp:155:1: error: stray '\302' in program
robot1.cpp:155:1: error: stray '\240' in program
robot1.cpp:157:1: error: stray '\302' in program
  

 ^
robot1.cpp:157:1: error: stray '\240' in program
robot1.cpp:159:1: error: stray '\302' in program
     fout<<di[k-1]<<" "<<dj[k-1];

 ^
robot1.cpp:159:1: error: stray '\240' in program
robot1.cpp:159:1: error: stray '\302' in program
robot1.cpp:159:1: error: stray '\240' in program
robot1.cpp:161:1: error: stray '\302' in program
  

 ^
robot1.cpp:161:1: error: stray '\240' in program
robot1.cpp:163:1: error: stray '\302' in program
  

 ^
robot1.cpp:163:1: error: stray '\240' in program
robot1.cpp:165:1: error: stray '\302' in program
     fin.close();

 ^
robot1.cpp:165:1: error: stray '\240' in program
robot1.cpp:165:1: error: stray '\302' in program
robot1.cpp:165:1: error: stray '\240' in program
robot1.cpp:167:1: error: stray '\302' in program
     fout.close();

 ^
robot1.cpp:167:1: error: stray '\240' in program
robot1.cpp:167:1: error: stray '\302' in program
robot1.cpp:167:1: error: stray '\240' in program
robot1.cpp:169:1: error: stray '\302' in program
     return 0;

 ^
robot1.cpp:169:1: error: stray '\240' in program
robot1.cpp:169:1: error: stray '\302' in program
robot1.cpp:169:1: error: stray '\240' in program
robot1.cpp: In function 'bool corect(int, int)':
robot1.cpp:17:45: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
     return (di[a]<di[b]  || di[a]==di[b] && dj[a]<dj[b] );

                                             ^
robot1.cpp: In function 'int main()':
robot1.cpp:25:22: warning: unused variable 'i2' [-Wunused-variable]
     int i,j,n,m,i1,i2,j1,j2,aux=0,bat=0,k=0,y;

                      ^
robot1.cpp:25:28: warning: unused variable 'j2' [-Wunused-variable]
     int i,j,n,m,i1,i2,j1,j2,aux=0,bat=0,k=0,y;

                            ^
robot1.cpp:25:31: warning: unused variable 'aux' [-Wunused-variable]
     int i,j,n,m,i1,i2,j1,j2,aux=0,bat=0,k=0,y;

                               ^

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