#2171
pluricex1
Anul acesta se organizează prima ediție a Olimpiadei Pluridisciplinare pentru Centrele de Excelență, PluriCEX. Fiecare Centru de Excelență din țară va trimite la concurs o echipă formată din k
membri (toți participanți la Centrul de Excelență). Echipa va trebui să rezolve probleme interdisciplinare, disciplinele vizate fiind cele de la Centrul de Excelenţă (D
discipline, pe care le vom considera numerotate de la 1
la D
).
Directorul CEX Iași a făcut o listă cu primii n
cei mai buni elevi de la CEX, apoi a numerotat elevii de la 1
la n
, în ordinea apariției lor în listă. Pentru fiecare elev, directorul a notat disciplinele la care el participă la CEX. Scrieți un program care să determine toate echipele ce pot fi formate din k
dintre cei n
elevi de pe lista directorului, cu condiția ca pentru fiecare disciplină să existe în echipă cel puțin un membru care să studieze la CEX disciplina respectivă.
Problema | pluricex1 | Operații I/O |
pluricex1.in /pluricex1.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 2 MB
/
Stivă 1 MB
|
Id soluție | #15100244 | Utilizator | |
Fișier | pluricex1.cpp | Dimensiune | 2.30 KB |
Data încărcării | 01 Aprilie 2019, 11:01 | Scor / rezultat | Eroare de compilare |
pluricex1.cpp:1:27: error: stray '#' in program [10:53, 4/1/2019] Wancha: #include <bits/stdc++.h> ^ pluricex1.cpp:53:30: error: stray '#' in program [10:53, 4/1/2019] Vlad Calo: #include <bits/stdc++.h> ^ pluricex1.cpp:1:1: error: expected unqualified-id before '[' token [10:53, 4/1/2019] Wancha: #include <bits/stdc++.h> ^ pluricex1.cpp:4:1: error: 'ifstream' does not name a type ifstream fin("pluricex1.in"); ^ pluricex1.cpp:5:1: error: 'ofstream' does not name a type ofstream fout("pluricex1.out"); ^ pluricex1.cpp: In function 'void afisare()': pluricex1.cpp:13:9: error: 'fout' was not declared in this scope fout<<st[i]<<" "; ^ pluricex1.cpp:14:5: error: 'fout' was not declared in this scope fout<<'\n'; ^ pluricex1.cpp: In function 'int main()': pluricex1.cpp:33:5: error: 'fin' was not declared in this scope fin>>n>>k>>d; ^ pluricex1.cpp: At global scope: pluricex1.cpp:53:1: error: expected unqualified-id before '[' token [10:53, 4/1/2019] Vlad Calo: #include <bits/stdc++.h> ^ pluricex1.cpp:57:1: error: 'ifstream' does not name a type ifstream fin("reteta1.in"); ^ pluricex1.cpp:58:1: error: 'ofstream' does not name a type ofstream fout("reteta1.out"); ^ pluricex1.cpp:60:10: error: redefinition of 'int st [25]' int st[25], frecv[25], n, m, med[25][25]; ^ pluricex1.cpp:7:32: error: 'int st [25]' previously declared here int frecv[25], n, k, d, nr, a, st[25]; ^ pluricex1.cpp:60:21: error: redefinition of 'int frecv [25]' int st[25], frecv[25], n, m, med[25][25]; ^ pluricex1.cpp:7:5: error: 'int frecv [25]' previously declared here int frecv[25], n, k, d, nr, a, st[25]; ^ pluricex1.cpp:60:24: error: redefinition of 'int n' int st[25], frecv[25], n, m, med[25][25]; ^ pluricex1.cpp:7:16: error: 'int n' previously declared here int frecv[25], n, k, d, nr, a, st[25]; ^ pluricex1.cpp:61:8: error: conflicting declaration 'double k' double k, d, nr, a, sumamin = INT_MAX; ^ pluricex1.cpp:7:19: error: 'k' has a previous declaration as 'int k' int frecv[25], n, k, d, nr, a, st[25]; ^ pluricex1.cpp:61:11: error: conflicting declaration 'double d' double k, d, nr, a, sumamin = INT_MAX; ^ pluricex1.cpp:7:22: error: 'd' has a previous declaration as 'int d' int frecv[25], n, k, d, nr, a, st[25]; ^ pluricex1.cpp:61:14: error: conflicting declaration 'double nr' double k, d, nr, a, sumamin = INT_MAX; ^ pluricex1.cpp:7:25: error: 'nr' has a previous declaration as 'int nr' int frecv[25], n, k, d, nr, a, st[25]; ^ pluricex1.cpp:61:18: error: conflicting declaration 'double a' double k, d, nr, a, sumamin = INT_MAX; ^ pluricex1.cpp:7:29: error: 'a' has a previous declaration as 'int a' int frecv[25], n, k, d, nr, a, st[25]; ^ pluricex1.cpp:61:31: error: 'INT_MAX' was not declared in this scope double k, d, nr, a, sumamin = INT_MAX; ^ pluricex1.cpp:62:8: error: conflicting declaration 'double nrmax' double nrmax=0, power=2, comp[25], price[25], pr[25]; ^ pluricex1.cpp:8:5: error: 'nrmax' has a previous declaration as 'int nrmax' int nrmax=0, power=2; ^ pluricex1.cpp:62:17: error: conflicting declaration 'double power' double nrmax=0, power=2, comp[25], price[25], pr[25]; ^ pluricex1.cpp:8:14: error: 'power' has a previous declaration as 'int power' int nrmax=0, power=2; ^ pluricex1.cpp: In function 'void bkt(int, int)': pluricex1.cpp:73:6: error: redefinition of 'void bkt(int, int)' void bkt(int x, int sp) ^ pluricex1.cpp:17:6: error: 'void bkt(int, int)' previously defined here void bkt(int x, int sp) ^ pluricex1.cpp: In function 'int main()': pluricex1.cpp:88:5: error: redefinition of 'int main()' int main() ^ pluricex1.cpp:31:5: error: 'int main()' previously defined here int main() ^ pluricex1.cpp:90:5: error: 'fin' was not declared in this scope fin>>n>>m; ^ pluricex1.cpp:119:5: error: 'fout' was not declared in this scope fout<<std::fixed<<setprecision(1)<<sumamin; ^ pluricex1.cpp:119:11: error: 'fixed' is not a member of 'std' fout<<std::fixed<<setprecision(1)<<sumamin; ^ pluricex1.cpp:119:37: error: 'setprecision' was not declared in this scope fout<<std::fixed<<setprecision(1)<<sumamin; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema pluricex1 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ă.