#191
MaxMat
Să se determine, pentru fiecare linie a unei matrice, elementul maxim și indicele coloanei pe care se află.
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 | #33976320 | Utilizator | |
Fișier | maxmat.cpp | Dimensiune | 2.22 KB |
Data încărcării | 17 Ianuarie 2022, 13:23 | Scor / rezultat | Eroare de compilare |
maxmat.cpp:18:48: error: stray '@' in program TextReader load = new StreamReader(@"..\..\maxmatrice.in"); ^ 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:11:26: error: 'string' has not been declared static void Main(string[] args) ^ maxmat.cpp:11:35: error: expected ',' or '...' before 'args' static void Main(string[] args) ^ maxmat.cpp:55:17: error: expected ':' before 'static' private static int[,] ReadMatrix(TextReader load) ^ maxmat.cpp:55:27: error: expected unqualified-id before '[' token private static int[,] ReadMatrix(TextReader load) ^ maxmat.cpp:78:1: error: expected '}' at end of input } ^ maxmat.cpp: In static member function 'static void _191::Program::p2()': maxmat.cpp:18:13: error: 'TextReader' was not declared in this scope TextReader load = new StreamReader(@"..\..\maxmatrice.in"); ^ maxmat.cpp:18:24: error: expected ';' before 'load' TextReader load = new StreamReader(@"..\..\maxmatrice.in"); ^ maxmat.cpp:19:12: error: expected unqualified-id before '[' token int[,] matrice; ^ maxmat.cpp:20:9: error: 'matrice' was not declared in this scope matrice = ReadMatrix(load); ^ maxmat.cpp:20:30: error: 'load' was not declared in this scope matrice = ReadMatrix(load); ^ maxmat.cpp:20:34: error: 'ReadMatrix' was not declared in this scope matrice = ReadMatrix(load); ^ maxmat.cpp:25:21: error: 'Console' was not declared in this scope Console.Write(matrice[i, j] + " "); ^ maxmat.cpp:25:46: warning: left operand of comma operator has no effect [-Wunused-value] Console.Write(matrice[i, j] + " "); ^ maxmat.cpp:27:16: error: 'Console' was not declared in this scope Console.WriteLine(); ^ maxmat.cpp:29:17: error: 'Console' was not declared in this scope Console.WriteLine(); ^ maxmat.cpp:32:39: warning: left operand of comma operator has no effect [-Wunused-value] int max = matrice[i, 0]; ^ maxmat.cpp:37:33: warning: left operand of comma operator has no effect [-Wunused-value] if (matrice[i, j] > max) ^ maxmat.cpp:40:36: warning: left operand of comma operator has no effect [-Wunused-value] max = matrice[i, j]; ^ maxmat.cpp:42:53: error: invalid operands of types 'const char*' and 'const char [2]' to binary 'operator+' Console.Write(max + " " + pozmax + " "); ^ maxmat.cpp:48:44: error: invalid operands of types 'const char*' and 'const char [2]' to binary 'operator+' Console.Write(max + " " + pozmax + " "); ^ maxmat.cpp: At global scope: maxmat.cpp:53:4: error: expected unqualified-id at end of input } ^ maxmat.cpp:53:4: error: expected '}' at end of input
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema MaxMat 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ă.