#507
Cautare
Se dă un vector x
cu n
elemente numere naturale, și un vector y
cu m
elemente, de asemenea numere naturale. Verificați pentru fiecare element al vectorului y
dacă apare în x
.
Problema | Cautare | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #38043968 | Utilizator | |
Fișier | cautare.cpp | Dimensiune | 1.76 KB |
Data încărcării | 28 Septembrie 2022, 09:50 | Scor / rezultat | Eroare de compilare |
cautare.cpp:1:7: error: expected nested-name-specifier before 'System' using System; ^ cautare.cpp:1:7: error: 'System' has not been declared cautare.cpp:2:7: error: expected nested-name-specifier before 'System' using System.Collections; ^ cautare.cpp:2:7: error: 'System' has not been declared cautare.cpp:2:13: error: expected ';' before '.' token using System.Collections; ^ cautare.cpp:2:13: error: expected unqualified-id before '.' token cautare.cpp:3:7: error: expected nested-name-specifier before 'System' using System.Collections.Generic; ^ cautare.cpp:3:7: error: 'System' has not been declared cautare.cpp:3:13: error: expected ';' before '.' token using System.Collections.Generic; ^ cautare.cpp:3:13: error: expected unqualified-id before '.' token cautare.cpp:4:7: error: expected nested-name-specifier before 'System' using System.Linq; ^ cautare.cpp:4:7: error: 'System' has not been declared cautare.cpp:4:13: error: expected ';' before '.' token using System.Linq; ^ cautare.cpp:4:13: error: expected unqualified-id before '.' token cautare.cpp:5:7: error: expected nested-name-specifier before 'System' using System.Text; ^ cautare.cpp:5:7: error: 'System' has not been declared cautare.cpp:5:13: error: expected ';' before '.' token using System.Text; ^ cautare.cpp:5:13: error: expected unqualified-id before '.' token cautare.cpp:6:7: error: expected nested-name-specifier before 'System' using System.Threading.Tasks; ^ cautare.cpp:6:7: error: 'System' has not been declared cautare.cpp:6:13: error: expected ';' before '.' token using System.Threading.Tasks; ^ cautare.cpp:6:13: error: expected unqualified-id before '.' token cautare.cpp:12:26: error: 'string' has not been declared static void Main(string[] args) ^ cautare.cpp:12:35: error: expected ',' or '...' before 'args' static void Main(string[] args) ^ cautare.cpp:61:5: error: expected ';' after class definition } ^ cautare.cpp: In static member function 'static void p28_hash::Program::Main(int*)': cautare.cpp:21:13: error: 'ArrayList' was not declared in this scope ArrayList[] h; ^ cautare.cpp:21:23: error: expected primary-expression before ']' token ArrayList[] h; ^ cautare.cpp:21:25: error: expected ';' before 'h' ArrayList[] h; ^ cautare.cpp:22:13: error: 'h' was not declared in this scope h = new ArrayList[P]; ^ cautare.cpp:22:21: error: expected type-specifier before 'ArrayList' h = new ArrayList[P]; ^ cautare.cpp:22:21: error: expected ';' before 'ArrayList' cautare.cpp:24:28: error: expected type-specifier before 'ArrayList' h[i] = new ArrayList(); ^ cautare.cpp:24:28: error: expected ';' before 'ArrayList' cautare.cpp:31:13: error: 'string' was not declared in this scope string s; ^ cautare.cpp:31:20: error: expected ';' before 's' string s; ^ cautare.cpp:32:17: error: expected primary-expression before 'int' n = int.Parse(Console.ReadLine()); ^ cautare.cpp:32:17: error: expected ';' before 'int' cautare.cpp:33:13: error: 's' was not declared in this scope s = Console.ReadLine(); ^ cautare.cpp:33:17: error: 'Console' was not declared in this scope s = Console.ReadLine(); ^ cautare.cpp:34:20: error: expected primary-expression before ']' token string[] a = s.Split(new char[] { ' ' }, ^ cautare.cpp:34:22: error: expected ';' before 'a' string[] a = s.Split(new char[] { ' ' }, ^ cautare.cpp:34:52: error: expected primary-expression before ',' token string[] a = s.Split(new char[] { ' ' }, ^ cautare.cpp:35:17: error: 'StringSplitOptions' was not declared in this scope StringSplitOptions.RemoveEmptyEntries); ^ cautare.cpp:35:54: error: expected ';' before ')' token StringSplitOptions.RemoveEmptyEntries); ^ cautare.cpp:39:29: error: expected ')' before 'w' foreach (string w in a) ^ cautare.cpp:39:35: error: 'foreach' was not declared in this scope foreach (string w in a) ^ cautare.cpp:40:13: error: expected ';' before '{' token { ^ cautare.cpp:46:17: error: expected primary-expression before 'int' n = int.Parse(Console.ReadLine()); ^ cautare.cpp:46:17: error: expected ';' before 'int' cautare.cpp:49:13: error: 'a' was not declared in this scope a = s.Split(new char[] { ' ' }, ^ cautare.cpp:49:34: error: expected primary-expression before ']' token a = s.Split(new char[] { ' ' }, ^ cautare.cpp:51:29: error: expected ')' before 'w' foreach (string w in a) ^ cautare.cpp:52:13: error: expected ';' before '{' token { ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Cautare 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ă.