#4534
SubmultimiInterval
Se dă un interval [a,b]
, a
și b
numere naturale. Determinaţi, în ordine lexicografică, submulțimile mulțimii de numere naturale {a, a+1, a+2, ... b}
.
Problema | SubmultimiInterval | Operații I/O |
![]() submultimiinterval.in /submultimiinterval.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #50326558 | Utilizator | |
Fișier | submultimiinterval.cpp | Dimensiune | 957 B |
Data încărcării | 04 Aprilie 2024, 17:46 | Scor / rezultat | Eroare de compilare |
submultimiinterval.cpp: In function 'int init(int)': submultimiinterval.cpp:6:17: error: 'st' was not declared in this scope int init(int k){st[k] = a - 1;} ^ submultimiinterval.cpp:6:25: error: 'a' was not declared in this scope int init(int k){st[k] = a - 1;} ^ submultimiinterval.cpp:6:31: warning: no return statement in function returning non-void [-Wreturn-type] int init(int k){st[k] = a - 1;} ^ submultimiinterval.cpp: In function 'int succesor(int)': submultimiinterval.cpp:8:8: error: 'st' was not declared in this scope if(st[k] < b){ ^ submultimiinterval.cpp:8:16: error: 'b' was not declared in this scope if(st[k] < b){ ^ submultimiinterval.cpp: In function 'int valid(int)': submultimiinterval.cpp:18:18: error: 'st' was not declared in this scope if(k >= 2 && st[k - 1] >= st[k]){ ^ submultimiinterval.cpp: In function 'void tipar(int)': submultimiinterval.cpp:28:17: error: 'st' was not declared in this scope fout << st[i] << " "; ^ submultimiinterval.cpp: In function 'int main()': submultimiinterval.cpp:35:12: error: 'a' was not declared in this scope fin >> a >> b; ^ submultimiinterval.cpp:35:17: error: 'b' was not declared in this scope fin >> a >> b; ^ submultimiinterval.cpp:36:5: error: 'k' was not declared in this scope k = 1; ^ submultimiinterval.cpp:52:13: error: 'st' was not declared in this scope st[k] = 0; ^ submultimiinterval.cpp: In function 'int succesor(int)': submultimiinterval.cpp:15:1: warning: control reaches end of non-void function [-Wreturn-type] } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema SubmultimiInterval 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ă.