#4088
BSTQ
Se consideră un șir A
, inițial vid. Asupra lui A
se aplică n
operații de două tipuri:
1 x
– adaugă numărul x
în A
2 k
– dacă A
ar fi ordonat crescător, care ar fi a k
-a valoare?Să se răspundă la cele n
întrebări.
Folclorul informatic
Problema | BSTQ | Operații I/O |
bstq.in /bstq.out
|
---|---|---|---|
Limita timp | 0.5 secunde | Limita memorie |
Total: 128 MB
/
Stivă 64 MB
|
Id soluție | #47238997 | Utilizator | |
Fișier | bstq.cpp | Dimensiune | 1.76 KB |
Data încărcării | 07 Decembrie 2023, 01:42 | Scor / rezultat | Eroare de compilare |
bstq.cpp:5:27: error: stray '#' in program ofstream fout("bstq.out");#include <bits/stdc++.h> ^ bstq.cpp:5:28: error: 'include' does not name a type ofstream fout("bstq.out");#include <bits/stdc++.h> ^ bstq.cpp:8:13: error: redefinition of 'std::ifstream fin' ifstream fin("bstq.in"); ^ bstq.cpp:4:10: error: 'std::ifstream fin' previously declared here ifstream fin("bstq.in"); ^ bstq.cpp:9:14: error: redefinition of 'std::ofstream fout' ofstream fout("bstq.out"); ^ bstq.cpp:5:10: error: 'std::ofstream fout' previously declared here ofstream fout("bstq.out");#include <bits/stdc++.h> ^ bstq.cpp:56:8: error: redefinition of 'struct nod' struct nod ^ bstq.cpp:10:8: error: previous definition of 'struct nod' struct nod ^ bstq.cpp: In function 'void Creare(nod*&, int)': bstq.cpp:61:6: error: redefinition of 'void Creare(nod*&, int)' void Creare(nod *&r, int x) ^ bstq.cpp:15:6: error: 'void Creare(nod*&, int)' previously defined here void Creare(nod *&r, int x) ^ bstq.cpp: In function 'void AfisInordine(nod*, int, int&)': bstq.cpp:72:6: error: redefinition of 'void AfisInordine(nod*, int, int&)' void AfisInordine(nod *r, int poz,int &cnt) ^ bstq.cpp:26:6: error: 'void AfisInordine(nod*, int, int&)' previously defined here void AfisInordine(nod *r, int poz,int &cnt) ^ bstq.cpp: At global scope: bstq.cpp:86:6: error: redefinition of 'nod* rad' nod *rad; ^ bstq.cpp:40:6: error: 'nod* rad' previously declared here nod *rad; ^ bstq.cpp:87:5: error: redefinition of 'int n' int n,op,k; ^ bstq.cpp:41:5: error: 'int n' previously declared here int n,op,k; ^ bstq.cpp:87:7: error: redefinition of 'int op' int n,op,k; ^ bstq.cpp:41:7: error: 'int op' previously declared here int n,op,k; ^ bstq.cpp:87:10: error: redefinition of 'int k' int n,op,k; ^ bstq.cpp:41:10: error: 'int k' previously declared here int n,op,k; ^ bstq.cpp: In function 'int main()': bstq.cpp:88:5: error: redefinition of 'int main()' int main() ^ bstq.cpp:42:5: error: 'int main()' previously defined here int main() ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema BSTQ 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ă.