#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 | #54876192 | Utilizator | |
Fișier | submdiv.cpp | Dimensiune | 579 B |
Data încărcării | 11 Decembrie 2024, 07:51 | Scor / rezultat | Eroare de compilare |
submdiv.cpp:4:13: error: variable 'std::ifstream cin' has initializer but incomplete type ifstream cin("submdiv.in"); ^ submdiv.cpp:5:14: error: variable 'std::ofstream cout' has initializer but incomplete type ofstream cout("submdiv.out"); ^ submdiv.cpp:7:11: error: expected primary-expression before ',' token int n, m [, sol[20], v[20], p, cnt; ^ submdiv.cpp:7:11: error: expected ']' before ',' token submdiv.cpp: In function 'void scrie()': submdiv.cpp:11:26: error: 'm' was not declared in this scope for(int i = 1 ; i <= m ; i++) ^ submdiv.cpp:12:9: error: reference to 'cout' is ambiguous cout << v[sol[i]] << " "; ^ submdiv.cpp:5:10: note: candidates are: <typeprefixerror>cout ofstream cout("submdiv.out"); ^ In file included from submdiv.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ submdiv.cpp:13:5: error: reference to 'cout' is ambiguous cout << '\n'; ^ submdiv.cpp:5:10: note: candidates are: <typeprefixerror>cout ofstream cout("submdiv.out"); ^ In file included from submdiv.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ submdiv.cpp: In function 'void backk(int)': submdiv.cpp:23:15: error: 'm' was not declared in this scope if(k==m) scrie(); ^ submdiv.cpp: In function 'int main()': submdiv.cpp:30:5: error: reference to 'cin' is ambiguous cin>>n>>m; ^ submdiv.cpp:4:10: note: candidates are: <typeprefixerror>cin ifstream cin("submdiv.in"); ^ In file included from submdiv.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ submdiv.cpp:30:13: error: 'm' was not declared in this scope cin>>n>>m; ^ submdiv.cpp:34:18: error: reference to 'cout' is ambiguous if(cnt == 0) cout<<"fara solutie"; ^ submdiv.cpp:5:10: note: candidates are: <typeprefixerror>cout ofstream cout("submdiv.out"); ^ In file included from submdiv.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^
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ă.