#1747
Lacusta
Se consideră o matrice dreptunghiulară cu m
linii şi n
coloane, cu valori naturale. Traversăm matricea pornind de la colţul stânga-sus la colţul dreapta-jos. O traversare constă din mai multe deplasări. La fiecare deplasare se execută un salt pe orizontală şi un pas pe verticală. Scrieţi un program care să determine suma minimă care se poate obţine pentru o astfel de traversare.
OJI 2005, clasa a X-a
Problema | Lacusta | Operații I/O |
lacusta.in /lacusta.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 4 MB
/
Stivă 4 MB
|
Id soluție | #20934091 | Utilizator | |
Fișier | lacusta.pas | Dimensiune | 329 B |
Data încărcării | 14 Februarie 2020, 19:56 | Scor / rezultat | Eroare de compilare |
Free Pascal Compiler version 2.6.2-8 [2014/01/22] for i386 Copyright (c) 1993-2012 by Florian Klaempfl and others Target OS: Linux for i386 Compiling lacusta.pas lacusta.pas(7,6) Error: Identifier not found "i" lacusta.pas(7,5) Error: Ordinal expression expected lacusta.pas(7,5) Error: Illegal counter variable lacusta.pas(8,6) Error: Identifier not found "j" lacusta.pas(8,5) Error: Ordinal expression expected lacusta.pas(8,5) Error: Illegal counter variable lacusta.pas(9,9) Error: Identifier not found "i" lacusta.pas(9,10) Error: Illegal qualifier lacusta.pas(9,11) Error: Identifier not found "j" lacusta.pas(13,2) Error: Identifier not found "s" lacusta.pas(14,6) Error: Identifier not found "j" lacusta.pas(14,5) Error: Ordinal expression expected lacusta.pas(14,5) Error: Illegal counter variable lacusta.pas(16,6) Error: Identifier not found "s" lacusta.pas(16,12) Error: Identifier not found "j" lacusta.pas(16,19) Error: Identifier not found "j" lacusta.pas(18,1) Fatal: Syntax error, "THEN" expected but "END" found Fatal: Compilation aborted Error: /usr/bin/ppc386 returned an error exitcode (normal if you did not specify a source file to be compiled)
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Lacusta 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ă.