#3057
Rabin-Miller
Se dă un număr natural n
. Să se afișeze DA
dacă numărul este prim altfel se afișează NU
.
Problema | Rabin-Miller | Operații I/O |
rabin-miller.in /rabin-miller.out
|
---|---|---|---|
Limita timp | 1 secunde | Limita memorie |
Total: 128 MB
/
Stivă 128 MB
|
Id soluție | #55151297 | Utilizator | |
Fișier | rabin-miller.cpp | Dimensiune | 8.26 KB |
Data încărcării | 31 Decembrie 2024, 10:47 | Scor / rezultat | 100 puncte |
rabin-miller.cpp: In member function 'big_int big_int::operator+(const big_int&) const': rabin-miller.cpp:128:62: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < std::min(digits.size(), b.digits.size()); ++i) ^ rabin-miller.cpp:135:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (; i < digits.size(); ++i) ^ rabin-miller.cpp:142:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (; i < b.digits.size(); ++i) ^ rabin-miller.cpp: In member function 'big_int big_int::operator-(const big_int&) const': rabin-miller.cpp:179:62: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < std::min(digits.size(), b.digits.size()); ++i) ^ rabin-miller.cpp:193:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (; i < digits.size(); ++i) ^ rabin-miller.cpp: In member function 'big_int big_int::operator*(const big_int&) const': rabin-miller.cpp:228:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < digits.size(); ++i) ^ rabin-miller.cpp:232:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (j = 0; j < b.digits.size(); ++j) ^ rabin-miller.cpp: In member function 'big_int big_int::operator-(const big_int&) const': rabin-miller.cpp:212:3: warning: control reaches end of non-void function [-Wreturn-type] } ^ rabin-miller.cpp: In member function 'big_int big_int::operator+(const big_int&) const': rabin-miller.cpp:154:3: warning: control reaches end of non-void function [-Wreturn-type] } ^ rabin-miller.cpp: In function 'bool operator<(const big_int&, const big_int&)': rabin-miller.cpp:75:3: warning: control reaches end of non-void function [-Wreturn-type] } ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | Corect! | 10 | 10 | Exemplu | |
2 | 0.008 secunde | Corect! | 10 | 10 | ||
3 | 0.008 secunde | Corect! | 10 | 10 | ||
4 | 0 secunde | Corect! | 10 | 10 | ||
5 | 0 secunde | Corect! | 10 | 10 | ||
6 | 0.008 secunde | Corect! | 10 | 10 | ||
7 | 0.008 secunde | Corect! | 10 | 10 | ||
8 | 0.012 secunde | Corect! | 10 | 10 | ||
9 | 0.012 secunde | Corect! | 10 | 10 | ||
10 | 0.008 secunde | Corect! | 10 | 10 | ||
Punctaj total | 100 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Rabin-Miller 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ă.