#201
SubmDiv
Să se determine toate submulţimile cu m
elemente ale mulţimii divizorilor unui număr natural dat.
Problema | SubmDiv | Operații I/O |
submdiv.in /submdiv.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #5429443 | Utilizator | |
Fișier | submdiv.cpp | Dimensiune | 922 B |
Data încărcării | 11 Iulie 2017, 19:19 | Scor / rezultat | Eroare de compilare |
submdiv.cpp:9:13: error: 'int div [1000]' redeclared as different kind of symbol int div[1000], viz[1000], sol[6], x, m, n; ^ In file included from /usr/include/c++/4.8/cstdlib:72:0, from /usr/include/c++/4.8/ext/string_conversions.h:41, from /usr/include/c++/4.8/bits/basic_string.h:2815, from /usr/include/c++/4.8/string:52, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from submdiv.cpp:1: /usr/include/stdlib.h:789:14: error: previous declaration of 'div_t div(int, int)' extern div_t div (int __numer, int __denom) ^ submdiv.cpp: In function 'void bk(int)': submdiv.cpp:26:26: error: invalid types '<unresolved overloaded function type>[int]' for array subscript if(!viz[div[i]] && div[i] > sol[k - 1]) ^ submdiv.cpp:26:37: error: invalid types '<unresolved overloaded function type>[int]' for array subscript if(!viz[div[i]] && div[i] > sol[k - 1]) ^ submdiv.cpp:28:31: error: invalid types '<unresolved overloaded function type>[int]' for array subscript sol[k] = div[i]; ^ submdiv.cpp:29:26: error: invalid types '<unresolved overloaded function type>[int]' for array subscript viz[div[i]] = 1; ^ submdiv.cpp:33:26: error: invalid types '<unresolved overloaded function type>[int]' for array subscript viz[div[i]] = 0; ^ submdiv.cpp: In function 'int main()': submdiv.cpp:43:10: error: invalid types '<unresolved overloaded function type>[int]' for array subscript div[0] = 1; ^ submdiv.cpp:48:18: error: invalid types '<unresolved overloaded function type>[int]' for array subscript div[p] = i; ^ submdiv.cpp:52:10: error: invalid types '<unresolved overloaded function type>[int]' for array subscript div[p] = x; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema SubmDiv 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ă.