#278
Se dau două şiruri cu elemente numere naturale. Determinaţi câte dintre elementele primului şir sunt mai mari decât toate elementele celui de-al doilea şir.
Problema | MaxMin1 | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #57568452 | Utilizator | |
Fișier | maxmin1.cpp | Dimensiune | 4.11 KB |
Data încărcării | 05 Aprilie 2025, 10:45 | Scor / rezultat | Eroare de compilare |
maxmin1.cpp:1:33: warning: character constant too long for its type [enabled by default] import React, { useState } from 'react'; ^ maxmin1.cpp:2:28: warning: character constant too long for its type [enabled by default] import { Calculator } from 'lucide-react'; ^ maxmin1.cpp:12:56: error: empty character constant const [firstArray, setFirstArray] = useState<string>(''); ^ maxmin1.cpp:13:58: error: empty character constant const [secondArray, setSecondArray] = useState<string>(''); ^ maxmin1.cpp:15:46: error: empty character constant const [error, setError] = useState<string>(''); ^ maxmin1.cpp:20:7: error: stray '\' in program const arr1 = firstArray.trim().split(/\s+/).map(Number); ^ maxmin1.cpp:21:7: error: stray '\' in program const arr2 = secondArray.trim().split(/\s+/).map(Number); ^ maxmin1.cpp:25:18: warning: character constant too long for its type [enabled by default] setError('Please enter valid numbers only'); ^ maxmin1.cpp:30:18: warning: character constant too long for its type [enabled by default] setError('Both arrays must not be empty'); ^ maxmin1.cpp:35:18: warning: character constant too long for its type [enabled by default] setError('Arrays must not be longer than 100 elements'); ^ maxmin1.cpp:40:18: warning: character constant too long for its type [enabled by default] setError('Numbers must be less than 10000'); ^ maxmin1.cpp:44:16: error: empty character constant setError(''); ^ maxmin1.cpp:47:16: warning: character constant too long for its type [enabled by default] setError('Invalid input format'); ^ maxmin1.cpp:1:1: error: 'import' does not name a type import React, { useState } from 'react'; ^ maxmin1.cpp:1:28: error: 'from' does not name a type import React, { useState } from 'react'; ^ maxmin1.cpp:2:1: error: 'import' does not name a type import { Calculator } from 'lucide-react'; ^ maxmin1.cpp:2:23: error: 'from' does not name a type import { Calculator } from 'lucide-react'; ^ maxmin1.cpp:4:1: error: 'function' does not name a type function countLargerElements(arr1: number[], arr2: number[]): number { ^ maxmin1.cpp:11:1: error: 'function' does not name a type function App() { ^ maxmin1.cpp:121:1: warning: keyword 'export' not implemented, and will be ignored [enabled by default] export default App; ^ maxmin1.cpp:121:16: error: expected 'template' before 'App' export default App; ^ maxmin1.cpp:121:16: error: 'App' does not name a type
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema MaxMin1 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ă.