#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 | #53761268 | Utilizator | |
Fișier | submdiv.cpp | Dimensiune | 885 B |
Data încărcării | 11 Noiembrie 2024, 09:39 | Scor / rezultat | Eroare de compilare |
submdiv.cpp:6:23: error: 'int div [20]' redeclared as different kind of symbol int m,x,sol[7], div[20],nr; ^ 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 bkt(int)': submdiv.cpp:26:21: error: invalid types '<unresolved overloaded function type>[int]' for array subscript sol[k]=div[i]; ^ submdiv.cpp: In function 'int main()': submdiv.cpp:40:21: error: invalid types '<unresolved overloaded function type>[int]' for array subscript div[++nr]=d; ^ submdiv.cpp:41:32: error: invalid types '<unresolved overloaded function type>[int]' for array subscript if(d!=x/d) div[++nr]=x/d; ^ submdiv.cpp:46:21: error: invalid types '<unresolved overloaded function type>[int]' for array subscript if(div[i]>div[j]) swap(div[i],div[j]); ^ submdiv.cpp:46:28: error: invalid types '<unresolved overloaded function type>[int]' for array subscript if(div[i]>div[j]) swap(div[i],div[j]); ^ submdiv.cpp:46:41: error: invalid types '<unresolved overloaded function type>[int]' for array subscript if(div[i]>div[j]) swap(div[i],div[j]); ^ submdiv.cpp:46:48: error: invalid types '<unresolved overloaded function type>[int]' for array subscript if(div[i]>div[j]) swap(div[i],div[j]); ^
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ă.