Detalii evaluare #59366002

Rezumat problemă

Să se determine, pentru fiecare linie a unei matrice, elementul maxim și indicele coloanei pe care se află.

Detalii

Problema MaxMat Operații I/O maxmat.in/maxmat.out
Limita timp 0.1 secunde Limita memorie Total: 64 MB / Stivă 8 MB
Id soluție #59366002 Utilizator Anton Alexandru (Alex4644)
Fișier maxmat.cpp Dimensiune 1.22 KB
Data încărcării 26 Septembrie 2025, 08:39 Scor/rezultat Eroare de compilare

Evaluare

Mesaj compilare

maxmat.cpp:1:7: error: expected nested-name-specifier before 'System'
 using System;

       ^
maxmat.cpp:1:7: error: 'System' has not been declared
maxmat.cpp:2:7: error: expected nested-name-specifier before 'System'
 using System.Collections.Generic;

       ^
maxmat.cpp:2:7: error: 'System' has not been declared
maxmat.cpp:2:13: error: expected ';' before '.' token
 using System.Collections.Generic;

             ^
maxmat.cpp:2:13: error: expected unqualified-id before '.' token
maxmat.cpp:3:7: error: expected nested-name-specifier before 'System'
 using System.Linq;

       ^
maxmat.cpp:3:7: error: 'System' has not been declared
maxmat.cpp:3:13: error: expected ';' before '.' token
 using System.Linq;

             ^
maxmat.cpp:3:13: error: expected unqualified-id before '.' token
maxmat.cpp:4:7: error: expected nested-name-specifier before 'System'
 using System.Text;

       ^
maxmat.cpp:4:7: error: 'System' has not been declared
maxmat.cpp:4:13: error: expected ';' before '.' token
 using System.Text;

             ^
maxmat.cpp:4:13: error: expected unqualified-id before '.' token
maxmat.cpp:5:7: error: expected nested-name-specifier before 'System'
 using System.Threading.Tasks;

       ^
maxmat.cpp:5:7: error: 'System' has not been declared
maxmat.cpp:5:13: error: expected ';' before '.' token
 using System.Threading.Tasks;

             ^
maxmat.cpp:5:13: error: expected unqualified-id before '.' token
maxmat.cpp:6:7: error: expected nested-name-specifier before 'System'
 using System.IO;

       ^
maxmat.cpp:6:7: error: 'System' has not been declared
maxmat.cpp:6:13: error: expected ';' before '.' token
 using System.IO;

             ^
maxmat.cpp:6:13: error: expected unqualified-id before '.' token
maxmat.cpp:12:26: error: 'string' has not been declared
         static void Main(string[] args)

                          ^
maxmat.cpp:12:35: error: expected ',' or '...' before 'args'
         static void Main(string[] args)

                                   ^
maxmat.cpp:39:5: error: expected ';' after class definition
     }

     ^
maxmat.cpp: In static member function 'static void _191::Program::Main(int*)':
maxmat.cpp:14:13: error: 'StreamReader' was not declared in this scope
             StreamReader fin = new StreamReader("maxmat.in");

             ^
maxmat.cpp:14:26: error: expected ';' before 'fin'
             StreamReader fin = new StreamReader("maxmat.in");

                          ^
maxmat.cpp:15:13: error: 'StreamWriter' was not declared in this scope
             StreamWriter fout = new StreamWriter("maxmat.out");

             ^
maxmat.cpp:15:26: error: expected ';' before 'fout'
             StreamWriter fout = new StreamWriter("maxmat.out");

                          ^
maxmat.cpp:16:13: error: 'string' was not declared in this scope
             string nm = fin.ReadLine();

             ^
maxmat.cpp:16:20: error: expected ';' before 'nm'
             string nm = fin.ReadLine();

                    ^
maxmat.cpp:17:17: error: expected unqualified-id before '[' token
             char[] sir = { ' ' };

                 ^
maxmat.cpp:18:20: error: expected primary-expression before ']' token
             string[] mat = nm.Split(sir, StringSplitOptions.RemoveEmptyEntries);

                    ^
maxmat.cpp:18:22: error: expected ';' before 'mat'
             string[] mat = nm.Split(sir, StringSplitOptions.RemoveEmptyEntries);

                      ^
maxmat.cpp:19:21: error: expected primary-expression before 'int'
             int n = int.Parse(mat[0]);

                     ^
maxmat.cpp:20:21: error: expected primary-expression before 'int'
             int m = int.Parse(mat[1]);

                     ^
maxmat.cpp:24:17: error: 'nm' was not declared in this scope
                 nm = fin.ReadLine();

                 ^
maxmat.cpp:24:22: error: 'fin' was not declared in this scope
                 nm = fin.ReadLine();

                      ^
maxmat.cpp:25:24: error: expected primary-expression before ']' token
                 string[] read = nm.Split(new string[] {" "}, StringSplitOptions.RemoveEmptyEntries);

                        ^
maxmat.cpp:25:26: error: expected ';' before 'read'
                 string[] read = nm.Split(new string[] {" "}, StringSplitOptions.RemoveEmptyEntries);

                          ^
maxmat.cpp:25:60: error: expected primary-expression before ',' token
                 string[] read = nm.Split(new string[] {" "}, StringSplitOptions.RemoveEmptyEntries);

                                                            ^
maxmat.cpp:25:62: error: 'StringSplitOptions' was not declared in this scope
                 string[] read = nm.Split(new string[] {" "}, StringSplitOptions.RemoveEmptyEntries);

                                                              ^
maxmat.cpp:25:99: error: expected ';' before ')' token
                 string[] read = nm.Split(new string[] {" "}, StringSplitOptions.RemoveEmptyEntries);

                                                                                                   ^
maxmat.cpp:28:29: error: expected primary-expression before 'int'
                     int x = int.Parse(read[j]);

                             ^
maxmat.cpp:35:17: error: 'fout' was not declared in this scope
                 fout.WriteLine(max.ToString() + " " + mi.ToString());

                 ^
maxmat.cpp:35:36: error: request for member 'ToString' in 'max', which is of non-class type 'int'
                 fout.WriteLine(max.ToString() + " " + mi.ToString());

                                    ^
maxmat.cpp:35:58: error: request for member 'ToString' in 'mi', which is of non-class type 'int'
                 fout.WriteLine(max.ToString() + " " + mi.ToString());

                                                          ^

Cum funcționează evaluarea?

www.pbinfo.ro permite evaluarea a două tipuri de probleme:

  • probleme la care rezolvarea presupune scrierea unui program complet
  • probleme la care rezolvarea presupune scrierea unei secvențe de program - câteva instrucțiuni, o listă de declarații, una sau mai multe funcții, etc.

Problema MaxMat face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:

  • Programul sursă este compilat folosind compilatorul corespunzător. Dacă în urma compilării se obțin erori sau avertismente, acestea sunt afișate în această pagină.
  • Dacă programul a fost compilat, executabilul obținut va fi rulat, furnizându-i-se unul sau mai multe seturi de date de intrare, în concordanță cu restricțiile specifice problemei. Pentru fiecare set de date se obține un anumit punctaj, în raport cu corectitudinea soluției tale.

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ă.

Du-te sus!