#4094
oneout
Definim un număr liber de pătrate ca fiind un număr natural care nu are ca divizor niciun pătrat perfect mai mare ca 1
. Prin convenție, 1
este considerat liber de pătrate.
1) Să se determine câte numere libere de pătrate conține șirul dat.
2) Să se determine cea mai lungă bisecvență din șir formată din numere libere de pătrate, obținută prin eliminarea unui număr care nu este liber de pătrate.
OJI 2022 clasa a IX-a
Problema | oneout | Operații I/O |
oneout.in /oneout.out
|
---|---|---|---|
Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #42308463 | Utilizator | |
Fișier | oneout.cpp | Dimensiune | 2.14 KB |
Data încărcării | 28 Februarie 2023, 11:49 | Scor / rezultat | Eroare de compilare |
oneout.cpp: In function 'int main()': oneout.cpp:32:26: error: expected unqualified-id before '[' token for (const auto& [p, e] : div) ^ oneout.cpp:32:26: error: expected ';' before '[' token oneout.cpp:32:27: error: 'p' was not declared in this scope for (const auto& [p, e] : div) ^ oneout.cpp:32:30: error: 'e' was not declared in this scope for (const auto& [p, e] : div) ^ oneout.cpp: In lambda function: oneout.cpp:32:33: error: expected '{' before ':' token for (const auto& [p, e] : div) ^ oneout.cpp: In function 'int main()': oneout.cpp:32:33: error: expected ';' before ':' token oneout.cpp:32:33: error: expected primary-expression before ':' token oneout.cpp:32:33: error: expected ')' before ':' token oneout.cpp:32:33: error: expected primary-expression before ':' token oneout.cpp:32:33: error: expected ';' before ':' token oneout.cpp:71:30: error: expected unqualified-id before '[' token for (const auto& [left, right] : sequences) ^ oneout.cpp:71:30: error: expected ';' before '[' token oneout.cpp:71:31: error: capture of non-variable 'std::ios_base& std::left(std::ios_base&)' for (const auto& [left, right] : sequences) ^ In file included from /usr/include/c++/4.8/ios:42:0, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/sstream:38, from /usr/include/c++/4.8/complex:45, from /usr/include/c++/4.8/ccomplex:38, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:52, from oneout.cpp:1: /usr/include/c++/4.8/bits/ios_base.h:922:3: note: 'std::ios_base& std::left(std::ios_base&)' declared here left(ios_base& __base) ^ oneout.cpp:71:37: error: capture of non-variable 'std::ios_base& std::right(std::ios_base&)' for (const auto& [left, right] : sequences) ^ In file included from /usr/include/c++/4.8/ios:42:0, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/sstream:38, from /usr/include/c++/4.8/complex:45, from /usr/include/c++/4.8/ccomplex:38, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:52, from oneout.cpp:1: /usr/include/c++/4.8/bits/ios_base.h:930:3: note: 'std::ios_base& std::right(std::ios_base&)' declared here right(ios_base& __base) ^ oneout.cpp: In lambda function: oneout.cpp:71:44: error: expected '{' before ':' token for (const auto& [left, right] : sequences) ^ oneout.cpp: In function 'int main()': oneout.cpp:71:44: error: expected ';' before ':' token oneout.cpp:71:44: error: expected primary-expression before ':' token oneout.cpp:71:44: error: expected ')' before ':' token oneout.cpp:71:44: error: expected primary-expression before ':' token oneout.cpp:71:44: error: expected ';' before ':' token
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema oneout 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ă.