Detalii evaluare #42611186

Rezumat problemă

Un grup de geneticieni desfășoară un studiu amplu de analizare a genomului uman, propunându-și să determine serii optime de conexiuni intercromozomiale ale ADN-ului uman.

Detalii

Problema chromosome Operații I/O chromosome.in/chromosome.out
Limita timp 1.5 secunde Limita memorie Total: 32 MB / Stivă 16 MB
Id soluție #42611186 Utilizator Mazilu Stefan (20Stefan03)
Fișier chromosome.cpp Dimensiune 5.47 KB
Data încărcării 12 Martie 2023, 15:48 Scor / rezultat Eroare de compilare

Evaluare


Mesaj compilare

chromosome.cpp:99:50: error: 'Vpp' does not name a type
     OutParser &operator<<(OutParser &flux, const Vpp &p)

                                                  ^
chromosome.cpp:99:55: error: ISO C++ forbids declaration of 'p' with no type [-fpermissive]
     OutParser &operator<<(OutParser &flux, const Vpp &p)

                                                       ^
chromosome.cpp: In function 'std::OutParser& std::operator<<(std::OutParser&, const int&)':
chromosome.cpp:101:19: error: request for member 'first' in 'p', which is of non-class type 'const int'
         flux << p.first << " " << (int)p.second.first.size() << "\n";

                   ^
chromosome.cpp:101:42: error: request for member 'second' in 'p', which is of non-class type 'const int'
         flux << p.first << " " << (int)p.second.first.size() << "\n";

                                          ^
chromosome.cpp:102:33: error: request for member 'second' in 'p', which is of non-class type 'const int'
         for (const auto &it : p.second.first)

                                 ^
chromosome.cpp: At global scope:
chromosome.cpp:108:20: error: 'Vpp' was not declared in this scope
     struct greater<Vpp> : binary_function<Vpp, Vpp, bool>

                    ^
chromosome.cpp:108:23: error: template argument 1 is invalid
     struct greater<Vpp> : binary_function<Vpp, Vpp, bool>

                       ^
chromosome.cpp:108:43: error: 'Vpp' was not declared in this scope
     struct greater<Vpp> : binary_function<Vpp, Vpp, bool>

                                           ^
chromosome.cpp:108:48: error: 'Vpp' was not declared in this scope
     struct greater<Vpp> : binary_function<Vpp, Vpp, bool>

                                                ^
chromosome.cpp:108:57: error: template argument 1 is invalid
     struct greater<Vpp> : binary_function<Vpp, Vpp, bool>

                                                         ^
chromosome.cpp:108:57: error: template argument 2 is invalid
chromosome.cpp:125:1: error: 'vector' does not name a type
 vector <pair <int, int> > L[1001];

 ^
chromosome.cpp: In function 'void Read()':
chromosome.cpp:144:9: error: 'L' was not declared in this scope
         L[x].push_back({c, y});

         ^
chromosome.cpp: In function 'void BFS()':
chromosome.cpp:150:5: error: 'queue' was not declared in this scope
     queue <int> q;

     ^
chromosome.cpp:150:12: error: expected primary-expression before 'int'
     queue <int> q;

            ^
chromosome.cpp:150:12: error: expected ';' before 'int'
chromosome.cpp:153:5: error: 'q' was not declared in this scope
     q.push(u);

     ^
chromosome.cpp:158:25: error: 'L' was not declared in this scope
         for(auto vecin: L[cNode])

                         ^
chromosome.cpp:168:10: error: ambiguous overload for 'operator<<' (operand types are 'std::OutParser' and 'int')
     cout << dist[v] << '\n';

          ^
chromosome.cpp:168:10: note: candidates are:
chromosome.cpp:51:20: note: std::OutParser& std::OutParser::operator<<(int64_t)
         OutParser &operator<<(int64_t target)

                    ^
chromosome.cpp:62:20: note: std::OutParser& std::OutParser::operator<<(int)
         OutParser &operator<<(int target)

                    ^
chromosome.cpp:73:20: note: std::OutParser& std::OutParser::operator<<(const char*) <near match>
         OutParser &operator<<(const char *target)

                    ^
chromosome.cpp:73:20: note:   no known conversion for argument 1 from 'int' to 'const char*'
chromosome.cpp:99:16: note: std::OutParser& std::operator<<(std::OutParser&, const int&)
     OutParser &operator<<(OutParser &flux, const Vpp &p)

                ^
chromosome.cpp: In function 'void DFS(int, int)':
chromosome.cpp:187:19: error: 'L' was not declared in this scope
     for (auto i : L[node])

                   ^
chromosome.cpp: In function 'int main()':
chromosome.cpp:221:51: error: 'sort' was not declared in this scope
     sort(Scuiparici + 1, Scuiparici + nrS + 1, CMP);

                                                   ^
chromosome.cpp:221:51: note: suggested alternative:
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from chromosome.cpp:4:
/usr/include/c++/4.8/bits/stl_algo.h:5483:5: note:   'std::sort'
     sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
     ^
chromosome.cpp:224:14: error: ambiguous overload for 'operator<<' (operand types are 'std::OutParser' and 'int')
         cout << Scuiparici[i].cost << ' ' << Scuiparici[i].len << '\n';

              ^
chromosome.cpp:224:14: note: candidates are:
chromosome.cpp:51:20: note: std::OutParser& std::OutParser::operator<<(int64_t)
         OutParser &operator<<(int64_t target)

                    ^
chromosome.cpp:62:20: note: std::OutParser& std::OutParser::operator<<(int)
         OutParser &operator<<(int target)

                    ^
chromosome.cpp:73:20: note: std::OutParser& std::OutParser::operator<<(const char*) <near match>
         OutParser &operator<<(const char *target)

                    ^
chromosome.cpp:73:20: note:   no known conversion for argument 1 from 'int' to 'const char*'
chromosome.cpp:99:16: note: std::OutParser& std::operator<<(std::OutParser&, const int&)
     OutParser &operator<<(OutParser &flux, const Vpp &p)

                ^
chromosome.cpp:226:18: error: ambiguous overload for 'operator<<' (operand types are 'std::OutParser' and 'int')
             cout << Scuiparici[i].noduri[j] << ' ';

                  ^
chromosome.cpp:226:18: note: candidates are:
chromosome.cpp:51:20: note: std::OutParser& std::OutParser::operator<<(int64_t)
         OutParser &operator<<(int64_t target)

                    ^
chromosome.cpp:62:20: note: std::OutParser& std::OutParser::operator<<(int)
         OutParser &operator<<(int target)

                    ^
chromosome.cpp:73:20: note: std::OutParser& std::OutParser::operator<<(const char*) <near match>
         OutParser &operator<<(const char *target)

                    ^
chromosome.cpp:73:20: note:   no known conversion for argument 1 from 'int' to 'const char*'
chromosome.cpp:99:16: note: std::OutParser& std::operator<<(std::OutParser&, const int&)
     OutParser &operator<<(OutParser &flux, const Vpp &p)

                ^
chromosome.cpp:227:14: error: ambiguous overload for 'operator<<' (operand types are 'std::OutParser' and 'char')
         cout << '\n';

              ^
chromosome.cpp:227:14: note: candidates are:
chromosome.cpp:51:20: note: std::OutParser& std::OutParser::operator<<(int64_t)
         OutParser &operator<<(int64_t target)

                    ^
chromosome.cpp:62:20: note: std::OutParser& std::OutParser::operator<<(int)
         OutParser &operator<<(int target)

                    ^
chromosome.cpp:73:20: note: std::OutParser& std::OutParser::operator<<(const char*) <near match>
         OutParser &operator<<(const char *target)

                    ^
chromosome.cpp:73:20: note:   no known conversion for argument 1 from 'char' to 'const char*'
chromosome.cpp:99:16: note: std::OutParser& std::operator<<(std::OutParser&, const int&)
     OutParser &operator<<(OutParser &flux, const Vpp &p)

                ^

Cum funcționează evaluarea?

www.pbinfo.ro permite evaluarea a două tipuri de probleme:

  • probleme la care rezolvarea presupune scrierea unui program complet
  • probleme la care rezolvarea presupune scrierea unei secvențe de program - câteva instrucțiuni, o listă de declarații, una sau mai multe funcții, etc.

Problema chromosome face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:

  • Programul sursă este compilat folosind compilatorul corespunzător. Dacă în urma compilării se obțin erori sau avertismente, acestea sunt afișate în această pagină.
  • Dacă programul a fost compilat, executabilul obținut va fi rulat, furnizându-i-se unul sau mai multe seturi de date de intrare, în concordanță cu restricțiile specifice problemei. Pentru fiecare set de date se obține un anumit punctaj, în raport cu corectitudinea soluției tale.

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ă.