#3911
PermPrimPF
Se dă o mulțime cu n
elemente, numere naturale. Afișați în ordine lexicografică toate permutările mulțimii date în care elementele prime sunt puncte fixe (nu își schimbă poziția).
Problema | PermPrimPF | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.3 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #41225374 | Utilizator | |
Fișier | permprimpf.cpp | Dimensiune | 949 B |
Data încărcării | 16 Ianuarie 2023, 17:52 | Scor / rezultat | Eroare de compilare |
permprimpf.cpp: In function 'void tipar()': permprimpf.cpp:23:12: error: 'primv' was not declared in this scope if(primv[i]==1) ^ permprimpf.cpp: In function 'void bkt(int)': permprimpf.cpp:32:20: error: 'm' was not declared in this scope for(int i=1;i<=m;i++) ^ permprimpf.cpp:36:18: error: 'cont' was not declared in this scope if(cont(k)) ^ permprimpf.cpp:38:24: error: too many arguments to function 'void tipar()' tipar(k); ^ permprimpf.cpp:20:6: note: declared here void tipar() ^ permprimpf.cpp:36:11: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] if(cont(k)) ^ permprimpf.cpp: In function 'int main()': permprimpf.cpp:50:19: error: 'm' was not declared in this scope np(++m)=v[i]; ^ permprimpf.cpp:50:20: error: 'np' cannot be used as a function np(++m)=v[i]; ^ permprimpf.cpp:52:18: error: 'm' was not declared in this scope sort(np+1,np+m+1); ^ permprimpf.cpp:52:21: error: 'sort' was not declared in this scope sort(np+1,np+m+1); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema PermPrimPF 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ă.