#937
Hercule
Hercule trebuie sa strabată un labirint cu capcane reprezentat de o matrice cu n
linii și m
coloane. Pentru fiecare celula a labirintului, se cunoaște timpul exprimat în minute după care celula respectivă devine capcană. După ce o celula devine capcana, Hercule piere dacă intră în acea celulă.
Sa se afișeze numarul total de drumuri pe care le poate urma Hercule prin labirint, astfel încât Hercule să nu piară.
Problema | Hercule | Operații I/O |
hercule.in /hercule.out
|
---|---|---|---|
Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #33276090 | Utilizator | |
Fișier | hercule.cpp | Dimensiune | 1.10 KB |
Data încărcării | 13 Decembrie 2021, 10:55 | Scor / rezultat | Eroare de compilare |
hercule.cpp:11:1: error: stray '\302' in program return i >= 1 && i <= n && j >= 1 && j <= m; ^ hercule.cpp:11:1: error: stray '\240' in program hercule.cpp:11:1: error: stray '\302' in program hercule.cpp:11:1: error: stray '\240' in program hercule.cpp:11:1: error: stray '\302' in program hercule.cpp:11:1: error: stray '\240' in program hercule.cpp:11:1: error: stray '\302' in program hercule.cpp:11:1: error: stray '\240' in program hercule.cpp:11:1: error: stray '\302' in program hercule.cpp:11:1: error: stray '\240' in program hercule.cpp:15:1: error: stray '\302' in program for(int d = 0 ; d < 4 ; d++) ^ hercule.cpp:15:1: error: stray '\240' in program hercule.cpp:15:1: error: stray '\302' in program hercule.cpp:15:1: error: stray '\240' in program hercule.cpp:15:1: error: stray '\302' in program hercule.cpp:15:1: error: stray '\240' in program hercule.cpp:16:1: error: stray '\302' in program { ^ hercule.cpp:16:1: error: stray '\240' in program hercule.cpp:16:1: error: stray '\302' in program hercule.cpp:16:1: error: stray '\240' in program hercule.cpp:16:1: error: stray '\302' in program hercule.cpp:16:1: error: stray '\240' in program hercule.cpp:16:1: error: stray '\302' in program hercule.cpp:16:1: error: stray '\240' in program hercule.cpp:16:1: error: stray '\302' in program hercule.cpp:16:1: error: stray '\240' in program hercule.cpp:16:1: error: stray '\302' in program hercule.cpp:16:1: error: stray '\240' in program hercule.cpp:17:1: error: stray '\302' in program int inou = i + di[d]; ^ hercule.cpp:17:1: error: stray '\240' in program hercule.cpp:17:1: error: stray '\302' in program hercule.cpp:17:1: error: stray '\240' in program hercule.cpp:17:1: error: stray '\302' in program hercule.cpp:17:1: error: stray '\240' in program hercule.cpp:17:1: error: stray '\302' in program hercule.cpp:17:1: error: stray '\240' in program hercule.cpp:17:1: error: stray '\302' in program hercule.cpp:17:1: error: stray '\240' in program hercule.cpp:17:1: error: stray '\302' in program hercule.cpp:17:1: error: stray '\240' in program hercule.cpp:17:1: error: stray '\302' in program hercule.cpp:17:1: error: stray '\240' in program hercule.cpp:17:1: error: stray '\302' in program hercule.cpp:17:1: error: stray '\240' in program hercule.cpp:17:1: error: stray '\302' in program hercule.cpp:17:1: error: stray '\240' in program hercule.cpp:17:1: error: stray '\302' in program hercule.cpp:17:1: error: stray '\240' in program hercule.cpp:18:1: error: stray '\302' in program int jnou = j + dj[d]; ^ hercule.cpp:18:1: error: stray '\240' in program hercule.cpp:18:1: error: stray '\302' in program hercule.cpp:18:1: error: stray '\240' in program hercule.cpp:18:1: error: stray '\302' in program hercule.cpp:18:1: error: stray '\240' in program hercule.cpp:18:1: error: stray '\302' in program hercule.cpp:18:1: error: stray '\240' in program hercule.cpp:18:1: error: stray '\302' in program hercule.cpp:18:1: error: stray '\240' in program hercule.cpp:18:1: error: stray '\302' in program hercule.cpp:18:1: error: stray '\240' in program hercule.cpp:18:1: error: stray '\302' in program hercule.cpp:18:1: error: stray '\240' in program hercule.cpp:18:1: error: stray '\302' in program hercule.cpp:18:1: error: stray '\240' in program hercule.cpp:18:1: error: stray '\302' in program hercule.cpp:18:1: error: stray '\240' in program hercule.cpp:18:1: error: stray '\302' in program hercule.cpp:18:1: error: stray '\240' in program hercule.cpp:19:1: error: stray '\302' in program if(inside(inou , jnou) && b[inou][jnou] == 0 && a[inou][jnou] >= pas) ^ hercule.cpp:19:1: error: stray '\240' in program hercule.cpp:19:1: error: stray '\302' in program hercule.cpp:19:1: error: stray '\240' in program hercule.cpp:19:1: error: stray '\302' in program hercule.cpp:19:1: error: stray '\240' in program hercule.cpp:19:1: error: stray '\302' in program hercule.cpp:19:1: error: stray '\240' in program hercule.cpp:19:1: error: stray '\302' in program hercule.cpp:19:1: error: stray '\240' in program hercule.cpp:19:1: error: stray '\302' in program hercule.cpp:19:1: error: stray '\240' in program hercule.cpp:19:1: error: stray '\302' in program hercule.cpp:19:1: error: stray '\240' in program hercule.cpp:19:1: error: stray '\302' in program hercule.cpp:19:1: error: stray '\240' in program hercule.cpp:19:1: error: stray '\302' in program hercule.cpp:19:1: error: stray '\240' in program hercule.cpp:19:1: error: stray '\302' in program hercule.cpp:19:1: error: stray '\240' in program hercule.cpp:20:1: error: stray '\302' in program { ^ hercule.cpp:20:1: error: stray '\240' in program hercule.cpp:20:1: error: stray '\302' in program hercule.cpp:20:1: error: stray '\240' in program hercule.cpp:20:1: error: stray '\302' in program hercule.cpp:20:1: error: stray '\240' in program hercule.cpp:20:1: error: stray '\302' in program hercule.cpp:20:1: error: stray '\240' in program hercule.cpp:20:1: error: stray '\302' in program hercule.cpp:20:1: error: stray '\240' in program hercule.cpp:20:1: error: stray '\302' in program hercule.cpp:20:1: error: stray '\240' in program hercule.cpp:20:1: error: stray '\302' in program hercule.cpp:20:1: error: stray '\240' in program hercule.cpp:21:1: error: stray '\302' in program b[inou][jnou] = pas; ^ hercule.cpp:21:1: error: stray '\240' in program hercule.cpp:21:1: error: stray '\302' in program hercule.cpp:21:1: error: stray '\240' in program hercule.cpp:21:1: error: stray '\302' in program hercule.cpp:21:1: error: stray '\240' in program hercule.cpp:21:1: error: stray '\302' in program hercule.cpp:21:1: error: stray '\240' in program hercule.cpp:21:1: error: stray '\302' in program hercule.cpp:21:1: error: stray '\240' in program hercule.cpp:21:1: error: stray '\302' in program hercule.cpp:21:1: error: stray '\240' in program hercule.cpp:21:1: error: stray '\302' in program hercule.cpp:21:1: error: stray '\240' in program hercule.cpp:21:1: error: stray '\302' in program hercule.cpp:21:1: error: stray '\240' in program hercule.cpp:21:1: error: stray '\302' in program hercule.cpp:21:1: error: stray '\240' in program hercule.cpp:21:1: error: stray '\302' in program hercule.cpp:21:1: error: stray '\240' in program hercule.cpp:22:1: error: stray '\302' in program if(inou == n && jnou == m) cnt++; ^ hercule.cpp:22:1: error: stray '\240' in program hercule.cpp:22:1: error: stray '\302' in program hercule.cpp:22:1: error: stray '\240' in program hercule.cpp:22:1: error: stray '\302' in program hercule.cpp:22:1: error: stray '\240' in program hercule.cpp:22:1: error: stray '\302' in program hercule.cpp:22:1: error: stray '\240' in program hercule.cpp:22:1: error: stray '\302' in program hercule.cpp:22:1: error: stray '\240' in program hercule.cpp:22:1: error: stray '\302' in program hercule.cpp:22:1: error: stray '\240' in program hercule.cpp:22:1: error: stray '\302' in program hercule.cpp:22:1: error: stray '\240' in program hercule.cpp:22:1: error: stray '\302' in program hercule.cpp:22:1: error: stray '\240' in program hercule.cpp:22:1: error: stray '\302' in program hercule.cpp:22:1: error: stray '\240' in program hercule.cpp:23:1: error: stray '\302' in program else back(inou , jnou , pas + 1); ^ hercule.cpp:23:1: error: stray '\240' in program hercule.cpp:23:1: error: stray '\302' in program hercule.cpp:23:1: error: stray '\240' in program hercule.cpp:23:1: error: stray '\302' in program hercule.cpp:23:1: error: stray '\240' in program hercule.cpp:23:1: error: stray '\302' in program hercule.cpp:23:1: error: stray '\240' in program hercule.cpp:23:1: error: stray '\302' in program hercule.cpp:23:1: error: stray '\240' in program hercule.cpp:23:1: error: stray '\302' in program hercule.cpp:23:1: error: stray '\240' in program hercule.cpp:23:1: error: stray '\302' in program hercule.cpp:23:1: error: stray '\240' in program hercule.cpp:23:1: error: stray '\302' in program hercule.cpp:23:1: error: stray '\240' in program hercule.cpp:23:1: error: stray '\302' in program hercule.cpp:23:1: error: stray '\240' in program hercule.cpp:23:1: error: stray '\302' in program hercule.cpp:23:1: error: stray '\240' in program hercule.cpp:23:1: error: stray '\302' in program hercule.cpp:23:1: error: stray '\240' in program hercule.cpp:23:1: error: stray '\302' in program hercule.cpp:23:1: error: stray '\240' in program hercule.cpp:23:1: error: stray '\302' in program hercule.cpp:23:1: error: stray '\240' in program hercule.cpp:24:1: error: stray '\302' in program b[inou][jnou] = 0; ^ hercule.cpp:24:1: error: stray '\240' in program hercule.cpp:24:1: error: stray '\302' in program hercule.cpp:24:1: error: stray '\240' in program hercule.cpp:24:1: error: stray '\302' in program hercule.cpp:24:1: error: stray '\240' in program hercule.cpp:24:1: error: stray '\302' in program hercule.cpp:24:1: error: stray '\240' in program hercule.cpp:24:1: error: stray '\302' in program hercule.cpp:24:1: error: stray '\240' in program hercule.cpp:24:1: error: stray '\302' in program hercule.cpp:24:1: error: stray '\240' in program hercule.cpp:24:1: error: stray '\302' in program hercule.cpp:24:1: error: stray '\240' in program hercule.cpp:24:1: error: stray '\302' in program hercule.cpp:24:1: error: stray '\240' in program hercule.cpp:24:1: error: stray '\302' in program hercule.cpp:24:1: error: stray '\240' in program hercule.cpp:24:1: error: stray '\302' in program hercule.cpp:24:1: error: stray '\240' in program hercule.cpp:24:1: error: stray '\302' in program hercule.cpp:24:1: error: stray '\240' in program hercule.cpp:24:1: error: stray '\302' in program hercule.cpp:24:1: error: stray '\240' in program hercule.cpp:24:1: error: stray '\302' in program hercule.cpp:24:1: error: stray '\240' in program hercule.cpp:24:1: error: stray '\302' in program hercule.cpp:24:1: error: stray '\240' in program hercule.cpp:24:1: error: stray '\302' in program hercule.cpp:24:1: error: stray '\240' in program hercule.cpp:24:1: error: stray '\302' in program hercule.cpp:24:1: error: stray '\240' in program hercule.cpp:24:1: error: stray '\302' in program hercule.cpp:24:1: error: stray '\240' in program hercule.cpp:24:1: error: stray '\302' in program hercule.cpp:24:1: error: stray '\240' in program hercule.cpp:24:1: error: stray '\302' in program hercule.cpp:24:1: error: stray '\240' in program hercule.cpp:25:1: error: stray '\302' in program } ^ hercule.cpp:25:1: error: stray '\240' in program hercule.cpp:25:1: error: stray '\302' in program hercule.cpp:25:1: error: stray '\240' in program hercule.cpp:25:1: error: stray '\302' in program hercule.cpp:25:1: error: stray '\240' in program hercule.cpp:25:1: error: stray '\302' in program hercule.cpp:25:1: error: stray '\240' in program hercule.cpp:25:1: error: stray '\302' in program hercule.cpp:25:1: error: stray '\240' in program hercule.cpp:25:1: error: stray '\302' in program hercule.cpp:25:1: error: stray '\240' in program hercule.cpp:25:1: error: stray '\302' in program hercule.cpp:25:1: error: stray '\240' in program hercule.cpp:25:1: error: stray '\302' in program hercule.cpp:25:1: error: stray '\240' in program hercule.cpp:25:1: error: stray '\302' in program hercule.cpp:25:1: error: stray '\240' in program hercule.cpp:25:1: error: stray '\302' in program hercule.cpp:25:1: error: stray '\240' in program hercule.cpp:26:1: error: stray '\302' in program } ^ hercule.cpp:26:1: error: stray '\240' in program hercule.cpp:26:1: error: stray '\302' in program hercule.cpp:26:1: error: stray '\240' in program hercule.cpp:26:1: error: stray '\302' in program hercule.cpp:26:1: error: stray '\240' in program hercule.cpp:26:1: error: stray '\302' in program hercule.cpp:26:1: error: stray '\240' in program hercule.cpp:26:1: error: stray '\302' in program hercule.cpp:26:1: error: stray '\240' in program hercule.cpp:26:1: error: stray '\302' in program hercule.cpp:26:1: error: stray '\240' in program hercule.cpp:27:1: error: stray '\302' in program } ^ hercule.cpp:27:1: error: stray '\240' in program hercule.cpp:32:1: error: stray '\302' in program for(int j = 1 ; j <= m ; ++j) ^ hercule.cpp:32:1: error: stray '\240' in program hercule.cpp:32:1: error: stray '\302' in program hercule.cpp:32:1: error: stray '\240' in program hercule.cpp:32:1: error: stray '\302' in program hercule.cpp:32:1: error: stray '\240' in program hercule.cpp:33:1: error: stray '\302' in program cin >> a[i][j]; ^ hercule.cpp:33:1: error: stray '\240' in program hercule.cpp:33:1: error: stray '\302' in program hercule.cpp:33:1: error: stray '\240' in program hercule.cpp:33:1: error: stray '\302' in program hercule.cpp:33:1: error: stray '\240' in program hercule.cpp:33:1: error: stray '\302' in program hercule.cpp:33:1: error: stray '\240' in program hercule.cpp:33:1: error: stray '\302' in program hercule.cpp:33:1: error: stray '\240' in program hercule.cpp:33:1: error: stray '\302' in program hercule.cpp:33:1: error: stray '\240' in program hercule.cpp:33:1: error: stray '\302' in program hercule.cpp:33:1: error: stray '\240' in program hercule.cpp:33:1: error: stray '\302' in program hercule.cpp:33:1: error: stray '\240' in program hercule.cpp:34:1: error: stray '\302' in program b[1][1] = 1; ^ hercule.cpp:34:1: error: stray '\240' in program hercule.cpp:34:1: error: stray '\302' in program hercule.cpp:34:1: error: stray '\240' in program hercule.cpp:34:1: error: stray '\302' in program hercule.cpp:34:1: error: stray '\240' in program hercule.cpp:35:1: error: stray '\302' in program back(1 , 1 , 2); ^ hercule.cpp:35:1: error: stray '\240' in program hercule.cpp:35:1: error: stray '\302' in program hercule.cpp:35:1: error: stray '\240' in program hercule.cpp:35:1: error: stray '\302' in program hercule.cpp:35:1: error: stray '\240' in program hercule.cpp:36:1: error: stray '\302' in program cout << cnt; ^ hercule.cpp:36:1: error: stray '\240' in program hercule.cpp:36:1: error: stray '\302' in program hercule.cpp:36:1: error: stray '\240' in program hercule.cpp:36:1: error: stray '\302' in program hercule.cpp:36:1: error: stray '\240' in program hercule.cpp: In function 'int main()': hercule.cpp:30:1: error: reference to 'cin' is ambiguous cin >> n >> m; ^ hercule.cpp:4:10: note: candidates are: std::ifstream cin ifstream cin("hercule.in"); ^ In file included from hercule.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ hercule.cpp:33:18: error: reference to 'cin' is ambiguous cin >> a[i][j]; ^ hercule.cpp:4:10: note: candidates are: std::ifstream cin ifstream cin("hercule.in"); ^ In file included from hercule.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ hercule.cpp:36:8: error: reference to 'cout' is ambiguous cout << cnt; ^ hercule.cpp:5:10: note: candidates are: std::ofstream cout ofstream cout("hercule.out"); ^ In file included from hercule.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Hercule 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ă.