#838
Iesire
Se dă planul unei clădiri pătrate formate din n*n
camere, sub forma unei matrice cu n
linii și n
coloane și elemente 0
sau 1
. Camerele marcate cu 0
sunt libere, cel marcate cu 1
sunt inaccesibile și fiecare cameră are o pereche de coordonate, de forma I J
, reprezentând linia și coloană pe care este situată camera. Dintr-o cameră liberă se poate trece în altă cameră liberă, cu condiția să se învecineze pe linie sau pe coloană.
Administratorul clădirii primește o listă cu coordonatele a m
camere pentru care s-au găsit potențiali chiriași. Nu pot fi închiriate decât camerele libere și accesibile din exteriorul clădirii – adică să existe o succesiune de camere învecinate care începe pe o latură a clădirii și se încheie la camera respectivă.
Pentru fiecare dintre camerele din listă, verificați dacă poate fi închiriată sau nu.
Problema | Iesire | Operații I/O |
iesire.in /iesire.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54151406 | Utilizator | |
Fișier | iesire.cpp | Dimensiune | 1.07 KB |
Data încărcării | 20 Noiembrie 2024, 20:37 | Scor / rezultat | Eroare de compilare |
iesire.cpp:11:1: error: stray '\302' in program if(a[i][j] == 0) ^ iesire.cpp:11:1: error: stray '\240' in program iesire.cpp:11:1: error: stray '\302' in program iesire.cpp:11:1: error: stray '\240' in program iesire.cpp:12:1: error: stray '\302' in program { ^ iesire.cpp:12:1: error: stray '\240' in program iesire.cpp:12:1: error: stray '\302' in program iesire.cpp:12:1: error: stray '\240' in program iesire.cpp:13:1: error: stray '\302' in program a[i][j] = 2; ^ iesire.cpp:13:1: error: stray '\240' in program iesire.cpp:13:1: error: stray '\302' in program iesire.cpp:13:1: error: stray '\240' in program iesire.cpp:13:1: error: stray '\302' in program iesire.cpp:13:1: error: stray '\240' in program iesire.cpp:13:1: error: stray '\302' in program iesire.cpp:13:1: error: stray '\240' in program iesire.cpp:14:1: error: stray '\302' in program Fill(i - 1, j); ^ iesire.cpp:14:1: error: stray '\240' in program iesire.cpp:14:1: error: stray '\302' in program iesire.cpp:14:1: error: stray '\240' in program iesire.cpp:14:1: error: stray '\302' in program iesire.cpp:14:1: error: stray '\240' in program iesire.cpp:14:1: error: stray '\302' in program iesire.cpp:14:1: error: stray '\240' in program iesire.cpp:15:1: error: stray '\302' in program Fill(i + 1, j); ^ iesire.cpp:15:1: error: stray '\240' in program iesire.cpp:15:1: error: stray '\302' in program iesire.cpp:15:1: error: stray '\240' in program iesire.cpp:15:1: error: stray '\302' in program iesire.cpp:15:1: error: stray '\240' in program iesire.cpp:15:1: error: stray '\302' in program iesire.cpp:15:1: error: stray '\240' in program iesire.cpp:16:1: error: stray '\302' in program Fill(i, j - 1); ^ iesire.cpp:16:1: error: stray '\240' in program iesire.cpp:16:1: error: stray '\302' in program iesire.cpp:16:1: error: stray '\240' in program iesire.cpp:16:1: error: stray '\302' in program iesire.cpp:16:1: error: stray '\240' in program iesire.cpp:16:1: error: stray '\302' in program iesire.cpp:16:1: error: stray '\240' in program iesire.cpp:17:1: error: stray '\302' in program Fill(i, j + 1); ^ iesire.cpp:17:1: error: stray '\240' in program iesire.cpp:17:1: error: stray '\302' in program iesire.cpp:17:1: error: stray '\240' in program iesire.cpp:17:1: error: stray '\302' in program iesire.cpp:17:1: error: stray '\240' in program iesire.cpp:17:1: error: stray '\302' in program iesire.cpp:17:1: error: stray '\240' in program iesire.cpp:18:1: error: stray '\302' in program } ^ iesire.cpp:18:1: error: stray '\240' in program iesire.cpp:18:1: error: stray '\302' in program iesire.cpp:18:1: error: stray '\240' in program iesire.cpp:23:1: error: stray '\302' in program int i, j, x, y; ^ iesire.cpp:23:1: error: stray '\240' in program iesire.cpp:23:1: error: stray '\302' in program iesire.cpp:23:1: error: stray '\240' in program iesire.cpp:24:1: error: stray '\302' in program fin >> n >> m; ^ iesire.cpp:24:1: error: stray '\240' in program iesire.cpp:24:1: error: stray '\302' in program iesire.cpp:24:1: error: stray '\240' in program iesire.cpp:25:1: error: stray '\302' in program for(i = 1; i <= n; i++) ^ iesire.cpp:25:1: error: stray '\240' in program iesire.cpp:25:1: error: stray '\302' in program iesire.cpp:25:1: error: stray '\240' in program iesire.cpp:26:1: error: stray '\302' in program for(j = 1; j <= n; j++) ^ iesire.cpp:26:1: error: stray '\240' in program iesire.cpp:26:1: error: stray '\302' in program iesire.cpp:26:1: error: stray '\240' in program iesire.cpp:26:1: error: stray '\302' in program iesire.cpp:26:1: error: stray '\240' in program iesire.cpp:26:1: error: stray '\302' in program iesire.cpp:26:1: error: stray '\240' in program iesire.cpp:27:1: error: stray '\302' in program fin >> a[i][j]; ^ iesire.cpp:27:1: error: stray '\240' in program iesire.cpp:27:1: error: stray '\302' in program iesire.cpp:27:1: error: stray '\240' in program iesire.cpp:27:1: error: stray '\302' in program iesire.cpp:27:1: error: stray '\240' in program iesire.cpp:27:1: error: stray '\302' in program iesire.cpp:27:1: error: stray '\240' in program iesire.cpp:27:1: error: stray '\302' in program iesire.cpp:27:1: error: stray '\240' in program iesire.cpp:27:1: error: stray '\302' in program iesire.cpp:27:1: error: stray '\240' in program iesire.cpp:28:1: error: stray '\302' in program /// bordare ^ iesire.cpp:28:1: error: stray '\240' in program iesire.cpp:28:1: error: stray '\302' in program iesire.cpp:28:1: error: stray '\240' in program iesire.cpp:29:1: error: stray '\302' in program for(i = 0; i <= n + 1; i++) ^ iesire.cpp:29:1: error: stray '\240' in program iesire.cpp:29:1: error: stray '\302' in program iesire.cpp:29:1: error: stray '\240' in program iesire.cpp:30:1: error: stray '\302' in program { ^ iesire.cpp:30:1: error: stray '\240' in program iesire.cpp:30:1: error: stray '\302' in program iesire.cpp:30:1: error: stray '\240' in program iesire.cpp:31:1: error: stray '\302' in program a[0][i] = 1; ^ iesire.cpp:31:1: error: stray '\240' in program iesire.cpp:31:1: error: stray '\302' in program iesire.cpp:31:1: error: stray '\240' in program iesire.cpp:31:1: error: stray '\302' in program iesire.cpp:31:1: error: stray '\240' in program iesire.cpp:31:1: error: stray '\302' in program iesire.cpp:31:1: error: stray '\240' in program iesire.cpp:32:1: error: stray '\302' in program a[n + 1][i] = 1; ^ iesire.cpp:32:1: error: stray '\240' in program iesire.cpp:32:1: error: stray '\302' in program iesire.cpp:32:1: error: stray '\240' in program iesire.cpp:32:1: error: stray '\302' in program iesire.cpp:32:1: error: stray '\240' in program iesire.cpp:32:1: error: stray '\302' in program iesire.cpp:32:1: error: stray '\240' in program iesire.cpp:33:1: error: stray '\302' in program a[i][0] = 1; ^ iesire.cpp:33:1: error: stray '\240' in program iesire.cpp:33:1: error: stray '\302' in program iesire.cpp:33:1: error: stray '\240' in program iesire.cpp:33:1: error: stray '\302' in program iesire.cpp:33:1: error: stray '\240' in program iesire.cpp:33:1: error: stray '\302' in program iesire.cpp:33:1: error: stray '\240' in program iesire.cpp:34:1: error: stray '\302' in program a[i][n + 1] = 1; ^ iesire.cpp:34:1: error: stray '\240' in program iesire.cpp:34:1: error: stray '\302' in program iesire.cpp:34:1: error: stray '\240' in program iesire.cpp:34:1: error: stray '\302' in program iesire.cpp:34:1: error: stray '\240' in program iesire.cpp:34:1: error: stray '\302' in program iesire.cpp:34:1: error: stray '\240' in program iesire.cpp:35:1: error: stray '\302' in program } ^ iesire.cpp:35:1: error: stray '\240' in program iesire.cpp:35:1: error: stray '\302' in program iesire.cpp:35:1: error: stray '\240' in program iesire.cpp:36:1: error: stray '\302' in program for(i = 1; i <= n; i++) ^ iesire.cpp:36:1: error: stray '\240' in program iesire.cpp:36:1: error: stray '\302' in program iesire.cpp:36:1: error: stray '\240' in program iesire.cpp:37:1: error: stray '\302' in program { ^ iesire.cpp:37:1: error: stray '\240' in program iesire.cpp:37:1: error: stray '\302' in program iesire.cpp:37:1: error: stray '\240' in program iesire.cpp:38:1: error: stray '\302' in program if(a[1][i] == 0) Fill(1, i); ^ iesire.cpp:38:1: error: stray '\240' in program iesire.cpp:38:1: error: stray '\302' in program iesire.cpp:38:1: error: stray '\240' in program iesire.cpp:38:1: error: stray '\302' in program iesire.cpp:38:1: error: stray '\240' in program iesire.cpp:38:1: error: stray '\302' in program iesire.cpp:38:1: error: stray '\240' in program iesire.cpp:39:1: error: stray '\302' in program if(a[n][i] == 0) Fill(n, i); ^ iesire.cpp:39:1: error: stray '\240' in program iesire.cpp:39:1: error: stray '\302' in program iesire.cpp:39:1: error: stray '\240' in program iesire.cpp:39:1: error: stray '\302' in program iesire.cpp:39:1: error: stray '\240' in program iesire.cpp:39:1: error: stray '\302' in program iesire.cpp:39:1: error: stray '\240' in program iesire.cpp:40:1: error: stray '\302' in program if(a[i][1] == 0) Fill(i, 1); ^ iesire.cpp:40:1: error: stray '\240' in program iesire.cpp:40:1: error: stray '\302' in program iesire.cpp:40:1: error: stray '\240' in program iesire.cpp:40:1: error: stray '\302' in program iesire.cpp:40:1: error: stray '\240' in program iesire.cpp:40:1: error: stray '\302' in program iesire.cpp:40:1: error: stray '\240' in program iesire.cpp:41:1: error: stray '\302' in program if(a[i][n] == 0) Fill(i, n); ^ iesire.cpp:41:1: error: stray '\240' in program iesire.cpp:41:1: error: stray '\302' in program iesire.cpp:41:1: error: stray '\240' in program iesire.cpp:41:1: error: stray '\302' in program iesire.cpp:41:1: error: stray '\240' in program iesire.cpp:41:1: error: stray '\302' in program iesire.cpp:41:1: error: stray '\240' in program iesire.cpp:42:1: error: stray '\302' in program } ^ iesire.cpp:42:1: error: stray '\240' in program iesire.cpp:42:1: error: stray '\302' in program iesire.cpp:42:1: error: stray '\240' in program iesire.cpp:43:1: error: stray '\302' in program for(i = 1; i <= m; i++) ^ iesire.cpp:43:1: error: stray '\240' in program iesire.cpp:43:1: error: stray '\302' in program iesire.cpp:43:1: error: stray '\240' in program iesire.cpp:44:1: error: stray '\302' in program { ^ iesire.cpp:44:1: error: stray '\240' in program iesire.cpp:44:1: error: stray '\302' in program iesire.cpp:44:1: error: stray '\240' in program iesire.cpp:45:1: error: stray '\302' in program fin >> x >> y; ^ iesire.cpp:45:1: error: stray '\240' in program iesire.cpp:45:1: error: stray '\302' in program iesire.cpp:45:1: error: stray '\240' in program iesire.cpp:45:1: error: stray '\302' in program iesire.cpp:45:1: error: stray '\240' in program iesire.cpp:45:1: error: stray '\302' in program iesire.cpp:45:1: error: stray '\240' in program iesire.cpp:46:1: error: stray '\302' in program if(a[x][y] == 2) fout << "da\n"; ^ iesire.cpp:46:1: error: stray '\240' in program iesire.cpp:46:1: error: stray '\302' in program iesire.cpp:46:1: error: stray '\240' in program iesire.cpp:46:1: error: stray '\302' in program iesire.cpp:46:1: error: stray '\240' in program iesire.cpp:46:1: error: stray '\302' in program iesire.cpp:46:1: error: stray '\240' in program iesire.cpp:47:1: error: stray '\302' in program else fout << "nu\n"; ^ iesire.cpp:47:1: error: stray '\240' in program iesire.cpp:47:1: error: stray '\302' in program iesire.cpp:47:1: error: stray '\240' in program iesire.cpp:47:1: error: stray '\302' in program iesire.cpp:47:1: error: stray '\240' in program iesire.cpp:47:1: error: stray '\302' in program iesire.cpp:47:1: error: stray '\240' in program iesire.cpp:48:1: error: stray '\302' in program } ^ iesire.cpp:48:1: error: stray '\240' in program iesire.cpp:48:1: error: stray '\302' in program iesire.cpp:48:1: error: stray '\240' in program iesire.cpp:49:1: error: stray '\302' in program return 0; ^ iesire.cpp:49:1: error: stray '\240' in program iesire.cpp:49:1: error: stray '\302' in program iesire.cpp:49:1: error: stray '\240' in program
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Iesire 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ă.