#837
Fill
Se dă o matrice cu n
linii și m
coloane și elemente 0
sau 1
, care reprezintă harta unei planete, în care 1
înseamnă uscat, iar 0
înseamnă apă. Două elemente 1
care se învecinează pe linie sau pe coloană (nu și pe diagonală) fac parte din același continent.
Să se determine câte continente sunt pe hartă.
Problema | Fill | Operații I/O |
fill.in /fill.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #22035614 | Utilizator | |
Fișier | fill.cpp | Dimensiune | 829 B |
Data încărcării | 23 Martie 2020, 12:20 | Scor / rezultat | Eroare de compilare |
fill.cpp:8:1: error: stray '\302' in program a[i][j] = c; ^ fill.cpp:8:1: error: stray '\240' in program fill.cpp:8:1: error: stray '\302' in program fill.cpp:8:1: error: stray '\240' in program fill.cpp:8:1: error: stray '\302' in program fill.cpp:8:1: error: stray '\240' in program fill.cpp:9:1: error: stray '\302' in program if(a[i-1][j] == 1) ^ fill.cpp:9:1: error: stray '\240' in program fill.cpp:9:1: error: stray '\302' in program fill.cpp:9:1: error: stray '\240' in program fill.cpp:9:1: error: stray '\302' in program fill.cpp:9:1: error: stray '\240' in program fill.cpp:10:1: error: stray '\302' in program fill(i-1, j, c); ^ fill.cpp:10:1: error: stray '\240' in program fill.cpp:10:1: error: stray '\302' in program fill.cpp:10:1: error: stray '\240' in program fill.cpp:10:1: error: stray '\302' in program fill.cpp:10:1: error: stray '\240' in program fill.cpp:10:1: error: stray '\302' in program fill.cpp:10:1: error: stray '\240' in program fill.cpp:10:1: error: stray '\302' in program fill.cpp:10:1: error: stray '\240' in program fill.cpp:11:1: error: stray '\302' in program if(a[i][j+1] == 1) ^ fill.cpp:11:1: error: stray '\240' in program fill.cpp:11:1: error: stray '\302' in program fill.cpp:11:1: error: stray '\240' in program fill.cpp:11:1: error: stray '\302' in program fill.cpp:11:1: error: stray '\240' in program fill.cpp:12:1: error: stray '\302' in program fill(i, j+1, c); ^ fill.cpp:12:1: error: stray '\240' in program fill.cpp:12:1: error: stray '\302' in program fill.cpp:12:1: error: stray '\240' in program fill.cpp:12:1: error: stray '\302' in program fill.cpp:12:1: error: stray '\240' in program fill.cpp:13:1: error: stray '\302' in program if(a[i+1][j] == 1) ^ fill.cpp:13:1: error: stray '\240' in program fill.cpp:13:1: error: stray '\302' in program fill.cpp:13:1: error: stray '\240' in program fill.cpp:13:1: error: stray '\302' in program fill.cpp:13:1: error: stray '\240' in program fill.cpp:14:1: error: stray '\302' in program fill(i+1, j, c); ^ fill.cpp:14:1: error: stray '\240' in program fill.cpp:14:1: error: stray '\302' in program fill.cpp:14:1: error: stray '\240' in program fill.cpp:14:1: error: stray '\302' in program fill.cpp:14:1: error: stray '\240' in program fill.cpp:14:1: error: stray '\302' in program fill.cpp:14:1: error: stray '\240' in program fill.cpp:14:1: error: stray '\302' in program fill.cpp:14:1: error: stray '\240' in program fill.cpp:15:1: error: stray '\302' in program if(a[i][j-1] == 1) ^ fill.cpp:15:1: error: stray '\240' in program fill.cpp:15:1: error: stray '\302' in program fill.cpp:15:1: error: stray '\240' in program fill.cpp:15:1: error: stray '\302' in program fill.cpp:15:1: error: stray '\240' in program fill.cpp:16:1: error: stray '\302' in program fill(i, j-1, c); ^ fill.cpp:16:1: error: stray '\240' in program fill.cpp:16:1: error: stray '\302' in program fill.cpp:16:1: error: stray '\240' in program fill.cpp:16:1: error: stray '\302' in program fill.cpp:16:1: error: stray '\240' in program fill.cpp:16:1: error: stray '\302' in program fill.cpp:16:1: error: stray '\240' in program fill.cpp:16:1: error: stray '\302' in program fill.cpp:16:1: error: stray '\240' in program fill.cpp:21:1: error: stray '\302' in program int n, m, c = 0; ^ fill.cpp:21:1: error: stray '\240' in program fill.cpp:21:1: error: stray '\302' in program fill.cpp:21:1: error: stray '\240' in program fill.cpp:21:1: error: stray '\302' in program fill.cpp:21:1: error: stray '\240' in program fill.cpp:22:1: error: stray '\302' in program cin >> n >> m; ^ fill.cpp:22:1: error: stray '\240' in program fill.cpp:22:1: error: stray '\302' in program fill.cpp:22:1: error: stray '\240' in program fill.cpp:22:1: error: stray '\302' in program fill.cpp:22:1: error: stray '\240' in program fill.cpp:23:1: error: stray '\302' in program for(int i = 1; i <= n; i++) ^ fill.cpp:23:1: error: stray '\240' in program fill.cpp:23:1: error: stray '\302' in program fill.cpp:23:1: error: stray '\240' in program fill.cpp:23:1: error: stray '\302' in program fill.cpp:23:1: error: stray '\240' in program fill.cpp:24:1: error: stray '\302' in program for(int j = 1; j <=m; j++) ^ fill.cpp:24:1: error: stray '\240' in program fill.cpp:24:1: error: stray '\302' in program fill.cpp:24:1: error: stray '\240' in program fill.cpp:24:1: error: stray '\302' in program fill.cpp:24:1: error: stray '\240' in program fill.cpp:24:1: error: stray '\302' in program fill.cpp:24:1: error: stray '\240' in program fill.cpp:24:1: error: stray '\302' in program fill.cpp:24:1: error: stray '\240' in program fill.cpp:24:1: error: stray '\302' in program fill.cpp:24:1: error: stray '\240' in program fill.cpp:24:1: error: stray '\302' in program fill.cpp:24:1: error: stray '\240' in program fill.cpp:25:1: error: stray '\302' in program cin >> a[i][j]; ^ fill.cpp:25:1: error: stray '\240' in program fill.cpp:25:1: error: stray '\302' in program fill.cpp:25:1: error: stray '\240' in program fill.cpp:25:1: error: stray '\302' in program fill.cpp:25:1: error: stray '\240' in program fill.cpp:25:1: error: stray '\302' in program fill.cpp:25:1: error: stray '\240' in program fill.cpp:25:1: error: stray '\302' in program fill.cpp:25:1: error: stray '\240' in program fill.cpp:25:1: error: stray '\302' in program fill.cpp:25:1: error: stray '\240' in program fill.cpp:25:1: error: stray '\302' in program fill.cpp:25:1: error: stray '\240' in program fill.cpp:25:1: error: stray '\302' in program fill.cpp:25:1: error: stray '\240' in program fill.cpp:25:1: error: stray '\302' in program fill.cpp:25:1: error: stray '\240' in program fill.cpp:25:1: error: stray '\302' in program fill.cpp:25:1: error: stray '\240' in program fill.cpp:25:1: error: stray '\302' in program fill.cpp:25:1: error: stray '\240' in program fill.cpp:26:1: error: stray '\302' in program for(int i = 1; i <= n; i++) ^ fill.cpp:26:1: error: stray '\240' in program fill.cpp:26:1: error: stray '\302' in program fill.cpp:26:1: error: stray '\240' in program fill.cpp:26:1: error: stray '\302' in program fill.cpp:26:1: error: stray '\240' in program fill.cpp:27:1: error: stray '\302' in program for(int j = 1; j <= m; j++) ^ fill.cpp:27:1: error: stray '\240' in program fill.cpp:27:1: error: stray '\302' in program fill.cpp:27:1: error: stray '\240' in program fill.cpp:27:1: error: stray '\302' in program fill.cpp:27:1: error: stray '\240' in program fill.cpp:27:1: error: stray '\302' in program fill.cpp:27:1: error: stray '\240' in program fill.cpp:27:1: error: stray '\302' in program fill.cpp:27:1: error: stray '\240' in program fill.cpp:27:1: error: stray '\302' in program fill.cpp:27:1: error: stray '\240' in program fill.cpp:27:1: error: stray '\302' in program fill.cpp:27:1: error: stray '\240' in program fill.cpp:28:1: error: stray '\302' in program if(a[i][j] == 1) ^ fill.cpp:28:1: error: stray '\240' in program fill.cpp:28:1: error: stray '\302' in program fill.cpp:28:1: error: stray '\240' in program fill.cpp:28:1: error: stray '\302' in program fill.cpp:28:1: error: stray '\240' in program fill.cpp:28:1: error: stray '\302' in program fill.cpp:28:1: error: stray '\240' in program fill.cpp:28:1: error: stray '\302' in program fill.cpp:28:1: error: stray '\240' in program fill.cpp:28:1: error: stray '\302' in program fill.cpp:28:1: error: stray '\240' in program fill.cpp:28:1: error: stray '\302' in program fill.cpp:28:1: error: stray '\240' in program fill.cpp:28:1: error: stray '\302' in program fill.cpp:28:1: error: stray '\240' in program fill.cpp:28:1: error: stray '\302' in program fill.cpp:28:1: error: stray '\240' in program fill.cpp:28:1: error: stray '\302' in program fill.cpp:28:1: error: stray '\240' in program fill.cpp:28:1: error: stray '\302' in program fill.cpp:28:1: error: stray '\240' in program fill.cpp:29:1: error: stray '\302' in program { ^ fill.cpp:29:1: error: stray '\240' in program fill.cpp:29:1: error: stray '\302' in program fill.cpp:29:1: error: stray '\240' in program fill.cpp:29:1: error: stray '\302' in program fill.cpp:29:1: error: stray '\240' in program fill.cpp:29:1: error: stray '\302' in program fill.cpp:29:1: error: stray '\240' in program fill.cpp:29:1: error: stray '\302' in program fill.cpp:29:1: error: stray '\240' in program fill.cpp:29:1: error: stray '\302' in program fill.cpp:29:1: error: stray '\240' in program fill.cpp:29:1: error: stray '\302' in program fill.cpp:29:1: error: stray '\240' in program fill.cpp:29:1: error: stray '\302' in program fill.cpp:29:1: error: stray '\240' in program fill.cpp:29:1: error: stray '\302' in program fill.cpp:29:1: error: stray '\240' in program fill.cpp:29:1: error: stray '\302' in program fill.cpp:29:1: error: stray '\240' in program fill.cpp:29:1: error: stray '\302' in program fill.cpp:29:1: error: stray '\240' in program fill.cpp:30:1: error: stray '\302' in program c++; ^ fill.cpp:30:1: error: stray '\240' in program fill.cpp:30:1: error: stray '\302' in program fill.cpp:30:1: error: stray '\240' in program fill.cpp:30:1: error: stray '\302' in program fill.cpp:30:1: error: stray '\240' in program fill.cpp:30:1: error: stray '\302' in program fill.cpp:30:1: error: stray '\240' in program fill.cpp:30:1: error: stray '\302' in program fill.cpp:30:1: error: stray '\240' in program fill.cpp:30:1: error: stray '\302' in program fill.cpp:30:1: error: stray '\240' in program fill.cpp:30:1: error: stray '\302' in program fill.cpp:30:1: error: stray '\240' in program fill.cpp:30:1: error: stray '\302' in program fill.cpp:30:1: error: stray '\240' in program fill.cpp:30:1: error: stray '\302' in program fill.cpp:30:1: error: stray '\240' in program fill.cpp:30:1: error: stray '\302' in program fill.cpp:30:1: error: stray '\240' in program fill.cpp:30:1: error: stray '\302' in program fill.cpp:30:1: error: stray '\240' in program fill.cpp:30:1: error: stray '\302' in program fill.cpp:30:1: error: stray '\240' in program fill.cpp:30:1: error: stray '\302' in program fill.cpp:30:1: error: stray '\240' in program fill.cpp:30:1: error: stray '\302' in program fill.cpp:30:1: error: stray '\240' in program fill.cpp:30:1: error: stray '\302' in program fill.cpp:30:1: error: stray '\240' in program fill.cpp:31:1: error: stray '\302' in program fill(i, j, c + 1); ^ fill.cpp:31:1: error: stray '\240' in program fill.cpp:31:1: error: stray '\302' in program fill.cpp:31:1: error: stray '\240' in program fill.cpp:31:1: error: stray '\302' in program fill.cpp:31:1: error: stray '\240' in program fill.cpp:31:1: error: stray '\302' in program fill.cpp:31:1: error: stray '\240' in program fill.cpp:31:1: error: stray '\302' in program fill.cpp:31:1: error: stray '\240' in program fill.cpp:31:1: error: stray '\302' in program fill.cpp:31:1: error: stray '\240' in program fill.cpp:31:1: error: stray '\302' in program fill.cpp:31:1: error: stray '\240' in program fill.cpp:31:1: error: stray '\302' in program fill.cpp:31:1: error: stray '\240' in program fill.cpp:31:1: error: stray '\302' in program fill.cpp:31:1: error: stray '\240' in program fill.cpp:31:1: error: stray '\302' in program fill.cpp:31:1: error: stray '\240' in program fill.cpp:31:1: error: stray '\302' in program fill.cpp:31:1: error: stray '\240' in program fill.cpp:31:1: error: stray '\302' in program fill.cpp:31:1: error: stray '\240' in program fill.cpp:31:1: error: stray '\302' in program fill.cpp:31:1: error: stray '\240' in program fill.cpp:31:1: error: stray '\302' in program fill.cpp:31:1: error: stray '\240' in program fill.cpp:31:1: error: stray '\302' in program fill.cpp:31:1: error: stray '\240' in program fill.cpp:32:1: error: stray '\302' in program } ^ fill.cpp:32:1: error: stray '\240' in program fill.cpp:32:1: error: stray '\302' in program fill.cpp:32:1: error: stray '\240' in program fill.cpp:32:1: error: stray '\302' in program fill.cpp:32:1: error: stray '\240' in program fill.cpp:32:1: error: stray '\302' in program fill.cpp:32:1: error: stray '\240' in program fill.cpp:32:1: error: stray '\302' in program fill.cpp:32:1: error: stray '\240' in program fill.cpp:32:1: error: stray '\302' in program fill.cpp:32:1: error: stray '\240' in program fill.cpp:32:1: error: stray '\302' in program fill.cpp:32:1: error: stray '\240' in program fill.cpp:32:1: error: stray '\302' in program fill.cpp:32:1: error: stray '\240' in program fill.cpp:32:1: error: stray '\302' in program fill.cpp:32:1: error: stray '\240' in program fill.cpp:32:1: error: stray '\302' in program fill.cpp:32:1: error: stray '\240' in program fill.cpp:32:1: error: stray '\302' in program fill.cpp:32:1: error: stray '\240' in program fill.cpp:33:1: error: stray '\302' in program cout << c; ^ fill.cpp:33:1: error: stray '\240' in program fill.cpp:33:1: error: stray '\302' in program fill.cpp:33:1: error: stray '\240' in program fill.cpp:33:1: error: stray '\302' in program fill.cpp:33:1: error: stray '\240' in program fill.cpp:34:1: error: stray '\302' in program return 0; ^ fill.cpp:34:1: error: stray '\240' in program fill.cpp:34:1: error: stray '\302' in program fill.cpp:34:1: error: stray '\240' in program fill.cpp:34:1: error: stray '\302' in program fill.cpp:34:1: error: stray '\240' in program
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Fill 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ă.