#840
Croco
Se dă o matrice cu n
linii și m
coloane și elemente 0
sau 1
, care reprezintă harta unui lac, în care 1
înseamnă uscat, iar 0
înseamnă apă.
Să se plaseze pe fiecare zonă cu uscat un crocodil sau un elefant astfel încât să nu fie două animale din aceeași specie în zone învecinate.
Problema | Croco | Operații I/O |
![]() croco.in /croco.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #21254654 | Utilizator | |
Fișier | croco.cpp | Dimensiune | 892 B |
Data încărcării | 24 Februarie 2020, 22:22 | Scor / rezultat | Eroare de compilare |
croco.cpp:8:1: error: stray '\302' in program a[i][j] = c; ^ croco.cpp:8:1: error: stray '\240' in program croco.cpp:8:1: error: stray '\302' in program croco.cpp:8:1: error: stray '\240' in program croco.cpp:8:1: error: stray '\302' in program croco.cpp:8:1: error: stray '\240' in program croco.cpp:9:1: error: stray '\302' in program if(a[i-1][j] == 1) ^ croco.cpp:9:1: error: stray '\240' in program croco.cpp:9:1: error: stray '\302' in program croco.cpp:9:1: error: stray '\240' in program croco.cpp:9:1: error: stray '\302' in program croco.cpp:9:1: error: stray '\240' in program croco.cpp:10:1: error: stray '\302' in program fill(i-1, j, c); ^ croco.cpp:10:1: error: stray '\240' in program croco.cpp:10:1: error: stray '\302' in program croco.cpp:10:1: error: stray '\240' in program croco.cpp:10:1: error: stray '\302' in program croco.cpp:10:1: error: stray '\240' in program croco.cpp:10:1: error: stray '\302' in program croco.cpp:10:1: error: stray '\240' in program croco.cpp:10:1: error: stray '\302' in program croco.cpp:10:1: error: stray '\240' in program croco.cpp:11:1: error: stray '\302' in program if(a[i][j+1] == 1) ^ croco.cpp:11:1: error: stray '\240' in program croco.cpp:11:1: error: stray '\302' in program croco.cpp:11:1: error: stray '\240' in program croco.cpp:11:1: error: stray '\302' in program croco.cpp:11:1: error: stray '\240' in program croco.cpp:12:1: error: stray '\302' in program fill(i, j+1, c); ^ croco.cpp:12:1: error: stray '\240' in program croco.cpp:12:1: error: stray '\302' in program croco.cpp:12:1: error: stray '\240' in program croco.cpp:12:1: error: stray '\302' in program croco.cpp:12:1: error: stray '\240' in program croco.cpp:13:1: error: stray '\302' in program if(a[i+1][j] == 1) ^ croco.cpp:13:1: error: stray '\240' in program croco.cpp:13:1: error: stray '\302' in program croco.cpp:13:1: error: stray '\240' in program croco.cpp:13:1: error: stray '\302' in program croco.cpp:13:1: error: stray '\240' in program croco.cpp:14:1: error: stray '\302' in program fill(i+1, j, c); ^ croco.cpp:14:1: error: stray '\240' in program croco.cpp:14:1: error: stray '\302' in program croco.cpp:14:1: error: stray '\240' in program croco.cpp:14:1: error: stray '\302' in program croco.cpp:14:1: error: stray '\240' in program croco.cpp:14:1: error: stray '\302' in program croco.cpp:14:1: error: stray '\240' in program croco.cpp:14:1: error: stray '\302' in program croco.cpp:14:1: error: stray '\240' in program croco.cpp:15:1: error: stray '\302' in program if(a[i][j-1] == 1) ^ croco.cpp:15:1: error: stray '\240' in program croco.cpp:15:1: error: stray '\302' in program croco.cpp:15:1: error: stray '\240' in program croco.cpp:15:1: error: stray '\302' in program croco.cpp:15:1: error: stray '\240' in program croco.cpp:16:1: error: stray '\302' in program fill(i, j-1, c); ^ croco.cpp:16:1: error: stray '\240' in program croco.cpp:16:1: error: stray '\302' in program croco.cpp:16:1: error: stray '\240' in program croco.cpp:16:1: error: stray '\302' in program croco.cpp:16:1: error: stray '\240' in program croco.cpp:16:1: error: stray '\302' in program croco.cpp:16:1: error: stray '\240' in program croco.cpp:16:1: error: stray '\302' in program croco.cpp:16:1: error: stray '\240' in program croco.cpp:23:1: error: stray '\302' in program int n, m, c = 0; ^ croco.cpp:23:1: error: stray '\240' in program croco.cpp:23:1: error: stray '\302' in program croco.cpp:23:1: error: stray '\240' in program croco.cpp:23:1: error: stray '\302' in program croco.cpp:23:1: error: stray '\240' in program croco.cpp:24:1: error: stray '\302' in program cin >> n >> m; ^ croco.cpp:24:1: error: stray '\240' in program croco.cpp:24:1: error: stray '\302' in program croco.cpp:24:1: error: stray '\240' in program croco.cpp:24:1: error: stray '\302' in program croco.cpp:24:1: error: stray '\240' in program croco.cpp:25:1: error: stray '\302' in program for(int i = 1; i <= n; i++) ^ croco.cpp:25:1: error: stray '\240' in program croco.cpp:25:1: error: stray '\302' in program croco.cpp:25:1: error: stray '\240' in program croco.cpp:25:1: error: stray '\302' in program croco.cpp:25:1: error: stray '\240' in program croco.cpp:26:1: error: stray '\302' in program for(int j = 1; j <=m; j++) ^ croco.cpp:26:1: error: stray '\240' in program croco.cpp:26:1: error: stray '\302' in program croco.cpp:26:1: error: stray '\240' in program croco.cpp:26:1: error: stray '\302' in program croco.cpp:26:1: error: stray '\240' in program croco.cpp:26:1: error: stray '\302' in program croco.cpp:26:1: error: stray '\240' in program croco.cpp:26:1: error: stray '\302' in program croco.cpp:26:1: error: stray '\240' in program croco.cpp:26:1: error: stray '\302' in program croco.cpp:26:1: error: stray '\240' in program croco.cpp:26:1: error: stray '\302' in program croco.cpp:26:1: error: stray '\240' in program croco.cpp:27:1: error: stray '\302' in program cin >> a[i][j]; ^ croco.cpp:27:1: error: stray '\240' in program croco.cpp:27:1: error: stray '\302' in program croco.cpp:27:1: error: stray '\240' in program croco.cpp:27:1: error: stray '\302' in program croco.cpp:27:1: error: stray '\240' in program croco.cpp:27:1: error: stray '\302' in program croco.cpp:27:1: error: stray '\240' in program croco.cpp:27:1: error: stray '\302' in program croco.cpp:27:1: error: stray '\240' in program croco.cpp:27:1: error: stray '\302' in program croco.cpp:27:1: error: stray '\240' in program croco.cpp:27:1: error: stray '\302' in program croco.cpp:27:1: error: stray '\240' in program croco.cpp:27:1: error: stray '\302' in program croco.cpp:27:1: error: stray '\240' in program croco.cpp:27:1: error: stray '\302' in program croco.cpp:27:1: error: stray '\240' in program croco.cpp:27:1: error: stray '\302' in program croco.cpp:27:1: error: stray '\240' in program croco.cpp:27:1: error: stray '\302' in program croco.cpp:27:1: error: stray '\240' in program croco.cpp:28:1: error: stray '\302' in program for(int i = 1; i <= n; i++) ^ croco.cpp:28:1: error: stray '\240' in program croco.cpp:28:1: error: stray '\302' in program croco.cpp:28:1: error: stray '\240' in program croco.cpp:28:1: error: stray '\302' in program croco.cpp:28:1: error: stray '\240' in program croco.cpp:29:1: error: stray '\302' in program for(int j = 1; j <= m; j++) ^ croco.cpp:29:1: error: stray '\240' in program croco.cpp:29:1: error: stray '\302' in program croco.cpp:29:1: error: stray '\240' in program croco.cpp:29:1: error: stray '\302' in program croco.cpp:29:1: error: stray '\240' in program croco.cpp:29:1: error: stray '\302' in program croco.cpp:29:1: error: stray '\240' in program croco.cpp:29:1: error: stray '\302' in program croco.cpp:29:1: error: stray '\240' in program croco.cpp:29:1: error: stray '\302' in program croco.cpp:29:1: error: stray '\240' in program croco.cpp:29:1: error: stray '\302' in program croco.cpp:29:1: error: stray '\240' in program croco.cpp:30:1: error: stray '\302' in program if(a[i][j] == 1) ^ croco.cpp:30:1: error: stray '\240' in program croco.cpp:30:1: error: stray '\302' in program croco.cpp:30:1: error: stray '\240' in program croco.cpp:30:1: error: stray '\302' in program croco.cpp:30:1: error: stray '\240' in program croco.cpp:30:1: error: stray '\302' in program croco.cpp:30:1: error: stray '\240' in program croco.cpp:30:1: error: stray '\302' in program croco.cpp:30:1: error: stray '\240' in program croco.cpp:30:1: error: stray '\302' in program croco.cpp:30:1: error: stray '\240' in program croco.cpp:30:1: error: stray '\302' in program croco.cpp:30:1: error: stray '\240' in program croco.cpp:30:1: error: stray '\302' in program croco.cpp:30:1: error: stray '\240' in program croco.cpp:30:1: error: stray '\302' in program croco.cpp:30:1: error: stray '\240' in program croco.cpp:30:1: error: stray '\302' in program croco.cpp:30:1: error: stray '\240' in program croco.cpp:30:1: error: stray '\302' in program croco.cpp:30:1: error: stray '\240' in program croco.cpp:31:1: error: stray '\302' in program { ^ croco.cpp:31:1: error: stray '\240' in program croco.cpp:31:1: error: stray '\302' in program croco.cpp:31:1: error: stray '\240' in program croco.cpp:31:1: error: stray '\302' in program croco.cpp:31:1: error: stray '\240' in program croco.cpp:31:1: error: stray '\302' in program croco.cpp:31:1: error: stray '\240' in program croco.cpp:31:1: error: stray '\302' in program croco.cpp:31:1: error: stray '\240' in program croco.cpp:31:1: error: stray '\302' in program croco.cpp:31:1: error: stray '\240' in program croco.cpp:31:1: error: stray '\302' in program croco.cpp:31:1: error: stray '\240' in program croco.cpp:31:1: error: stray '\302' in program croco.cpp:31:1: error: stray '\240' in program croco.cpp:31:1: error: stray '\302' in program croco.cpp:31:1: error: stray '\240' in program croco.cpp:31:1: error: stray '\302' in program croco.cpp:31:1: error: stray '\240' in program croco.cpp:31:1: error: stray '\302' in program croco.cpp:31:1: error: stray '\240' in program croco.cpp:32:1: error: stray '\302' in program c++; ^ croco.cpp:32:1: error: stray '\240' in program croco.cpp:32:1: error: stray '\302' in program croco.cpp:32:1: error: stray '\240' in program croco.cpp:32:1: error: stray '\302' in program croco.cpp:32:1: error: stray '\240' in program croco.cpp:32:1: error: stray '\302' in program croco.cpp:32:1: error: stray '\240' in program croco.cpp:32:1: error: stray '\302' in program croco.cpp:32:1: error: stray '\240' in program croco.cpp:32:1: error: stray '\302' in program croco.cpp:32:1: error: stray '\240' in program croco.cpp:32:1: error: stray '\302' in program croco.cpp:32:1: error: stray '\240' in program croco.cpp:32:1: error: stray '\302' in program croco.cpp:32:1: error: stray '\240' in program croco.cpp:32:1: error: stray '\302' in program croco.cpp:32:1: error: stray '\240' in program croco.cpp:32:1: error: stray '\302' in program croco.cpp:32:1: error: stray '\240' in program croco.cpp:32:1: error: stray '\302' in program croco.cpp:32:1: error: stray '\240' in program croco.cpp:32:1: error: stray '\302' in program croco.cpp:32:1: error: stray '\240' in program croco.cpp:32:1: error: stray '\302' in program croco.cpp:32:1: error: stray '\240' in program croco.cpp:32:1: error: stray '\302' in program croco.cpp:32:1: error: stray '\240' in program croco.cpp:32:1: error: stray '\302' in program croco.cpp:32:1: error: stray '\240' in program croco.cpp:33:1: error: stray '\302' in program fill(i, j, c + 1); ^ croco.cpp:33:1: error: stray '\240' in program croco.cpp:33:1: error: stray '\302' in program croco.cpp:33:1: error: stray '\240' in program croco.cpp:33:1: error: stray '\302' in program croco.cpp:33:1: error: stray '\240' in program croco.cpp:33:1: error: stray '\302' in program croco.cpp:33:1: error: stray '\240' in program croco.cpp:33:1: error: stray '\302' in program croco.cpp:33:1: error: stray '\240' in program croco.cpp:33:1: error: stray '\302' in program croco.cpp:33:1: error: stray '\240' in program croco.cpp:33:1: error: stray '\302' in program croco.cpp:33:1: error: stray '\240' in program croco.cpp:33:1: error: stray '\302' in program croco.cpp:33:1: error: stray '\240' in program croco.cpp:33:1: error: stray '\302' in program croco.cpp:33:1: error: stray '\240' in program croco.cpp:33:1: error: stray '\302' in program croco.cpp:33:1: error: stray '\240' in program croco.cpp:33:1: error: stray '\302' in program croco.cpp:33:1: error: stray '\240' in program croco.cpp:33:1: error: stray '\302' in program croco.cpp:33:1: error: stray '\240' in program croco.cpp:33:1: error: stray '\302' in program croco.cpp:33:1: error: stray '\240' in program croco.cpp:33:1: error: stray '\302' in program croco.cpp:33:1: error: stray '\240' in program croco.cpp:33:1: error: stray '\302' in program croco.cpp:33:1: error: stray '\240' in program croco.cpp:34:1: error: stray '\302' in program } ^ croco.cpp:34:1: error: stray '\240' in program croco.cpp:34:1: error: stray '\302' in program croco.cpp:34:1: error: stray '\240' in program croco.cpp:34:1: error: stray '\302' in program croco.cpp:34:1: error: stray '\240' in program croco.cpp:34:1: error: stray '\302' in program croco.cpp:34:1: error: stray '\240' in program croco.cpp:34:1: error: stray '\302' in program croco.cpp:34:1: error: stray '\240' in program croco.cpp:34:1: error: stray '\302' in program croco.cpp:34:1: error: stray '\240' in program croco.cpp:34:1: error: stray '\302' in program croco.cpp:34:1: error: stray '\240' in program croco.cpp:34:1: error: stray '\302' in program croco.cpp:34:1: error: stray '\240' in program croco.cpp:34:1: error: stray '\302' in program croco.cpp:34:1: error: stray '\240' in program croco.cpp:34:1: error: stray '\302' in program croco.cpp:34:1: error: stray '\240' in program croco.cpp:34:1: error: stray '\302' in program croco.cpp:34:1: error: stray '\240' in program croco.cpp:35:1: error: stray '\302' in program cout << c; ^ croco.cpp:35:1: error: stray '\240' in program croco.cpp:35:1: error: stray '\302' in program croco.cpp:35:1: error: stray '\240' in program croco.cpp:35:1: error: stray '\302' in program croco.cpp:35:1: error: stray '\240' in program croco.cpp:36:1: error: stray '\302' in program return 0; ^ croco.cpp:36:1: error: stray '\240' in program croco.cpp:36:1: error: stray '\302' in program croco.cpp:36:1: error: stray '\240' in program croco.cpp:36:1: error: stray '\302' in program croco.cpp:36:1: error: stray '\240' in program
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Croco 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ă.