#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 | #53758452 | Utilizator | |
Fișier | submdiv.cpp | Dimensiune | 1.15 KB |
Data încărcării | 11 Noiembrie 2024, 08:52 | Scor / rezultat | Eroare de compilare |
submdiv.cpp:8:13: error: 'int div [1000]' redeclared as different kind of symbol int div[1000]; ^ 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 Backtracking(int)': submdiv.cpp:30:23: warning: pointer to a function used in arithmetic [-Wpointer-arith] sol[k] = div[i]; // punem elem curent in solutie ^ submdiv.cpp:30:23: error: invalid conversion from 'div_t (*)(int, int)throw ()' to 'int' [-fpermissive] submdiv.cpp: In function 'int main()': submdiv.cpp:39:11: error: 'x' was not declared in this scope in >> x >> M; ^ submdiv.cpp:42:16: warning: pointer to a function used in arithmetic [-Wpointer-arith] div[++N] = d; ^ submdiv.cpp:42:18: error: assignment of read-only location '*(div + ((sizetype)(++ N)))' div[++N] = d; ^ submdiv.cpp:42:18: error: cannot convert 'int' to 'div_t(int, int)throw ()' in assignment
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ă.