#2597
PermutarePow
Fie ∆
o permutare de gradul n
. Se cere să se calculeze perioada principală a funcției f(x)
= ∆
x
.
Problema | PermutarePow | Operații I/O |
permutarepow.in /permutarepow.out
|
---|---|---|---|
Limita timp | 0.13 secunde | Limita memorie |
Total: 11 MB
/
Stivă 1 MB
|
Id soluție | #45040734 | Utilizator | |
Fișier | permutarepow.cpp | Dimensiune | 8.96 KB |
Data încărcării | 30 Septembrie 2023, 20:49 | Scor / rezultat | Eroare de compilare |
permutarepow.cpp: In member function 'int BigInt::operator[](int) const': permutarepow.cpp:97:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(digits.size() <= index || index < 0) ^ permutarepow.cpp: At global scope: permutarepow.cpp:126:9: error: definition of explicitly-defaulted 'BigInt& BigInt::operator=(const BigInt&)' BigInt &BigInt::operator=(const BigInt &a){ ^ permutarepow.cpp:29:13: error: 'BigInt& BigInt::operator=(const BigInt&)' explicitly defaulted here BigInt& operator=(const BigInt& other) = default; ^ permutarepow.cpp: In function 'BigInt& operator/=(BigInt&, const BigInt&)': permutarepow.cpp:264:24: warning: unused variable 'm' [-Wunused-variable] int n = Length(a), m = Length(b); ^ permutarepow.cpp: In function 'BigInt& operator%=(BigInt&, const BigInt&)': permutarepow.cpp:301:24: warning: unused variable 'm' [-Wunused-variable] int n = Length(a), m = Length(b); ^ permutarepow.cpp: In function 'BigInt gcd(BigInt, BigInt)': permutarepow.cpp:345:17: error: no matching function for call to 'BigInt::BigInt(BigInt)' BigInt c = a%b; ^ permutarepow.cpp:345:17: note: candidates are: permutarepow.cpp:84:1: note: BigInt::BigInt(BigInt&) BigInt::BigInt(BigInt & a){ ^ permutarepow.cpp:84:1: note: no known conversion for argument 1 from 'BigInt' to 'BigInt&' permutarepow.cpp:17:5: note: BigInt::BigInt(const char*) BigInt(const char *); ^ permutarepow.cpp:17:5: note: no known conversion for argument 1 from 'BigInt' to 'const char*' permutarepow.cpp:69:1: note: BigInt::BigInt(std::string&) BigInt::BigInt(string & s){ ^ permutarepow.cpp:69:1: note: no known conversion for argument 1 from 'BigInt' to 'std::string& {aka std::basic_string<char>&}' permutarepow.cpp:78:1: note: BigInt::BigInt(long long unsigned int) BigInt::BigInt(unsigned long long nr){ ^ permutarepow.cpp:78:1: note: no known conversion for argument 1 from 'BigInt' to 'long long unsigned int' permutarepow.cpp:346:19: error: no matching function for call to 'BigInt::BigInt(BigInt)' return gcd(b, c); ^ permutarepow.cpp:346:19: note: candidates are: permutarepow.cpp:84:1: note: BigInt::BigInt(BigInt&) BigInt::BigInt(BigInt & a){ ^ permutarepow.cpp:84:1: note: no known conversion for argument 1 from 'BigInt' to 'BigInt&' permutarepow.cpp:17:5: note: BigInt::BigInt(const char*) BigInt(const char *); ^ permutarepow.cpp:17:5: note: no known conversion for argument 1 from 'BigInt' to 'const char*' permutarepow.cpp:69:1: note: BigInt::BigInt(std::string&) BigInt::BigInt(string & s){ ^ permutarepow.cpp:69:1: note: no known conversion for argument 1 from 'BigInt' to 'std::string& {aka std::basic_string<char>&}' permutarepow.cpp:78:1: note: BigInt::BigInt(long long unsigned int) BigInt::BigInt(unsigned long long nr){ ^ permutarepow.cpp:78:1: note: no known conversion for argument 1 from 'BigInt' to 'long long unsigned int' permutarepow.cpp: In function 'int main()': permutarepow.cpp:375:17: error: no matching function for call to 'BigInt::BigInt(BigInt)' BigInt ans = 1ULL; ^ permutarepow.cpp:375:17: note: candidates are: permutarepow.cpp:84:1: note: BigInt::BigInt(BigInt&) BigInt::BigInt(BigInt & a){ ^ permutarepow.cpp:84:1: note: no known conversion for argument 1 from 'BigInt' to 'BigInt&' permutarepow.cpp:17:5: note: BigInt::BigInt(const char*) BigInt(const char *); ^ permutarepow.cpp:17:5: note: no known conversion for argument 1 from 'BigInt' to 'const char*' permutarepow.cpp:69:1: note: BigInt::BigInt(std::string&) BigInt::BigInt(string & s){ ^ permutarepow.cpp:69:1: note: no known conversion for argument 1 from 'BigInt' to 'std::string& {aka std::basic_string<char>&}' permutarepow.cpp:78:1: note: BigInt::BigInt(long long unsigned int) BigInt::BigInt(unsigned long long nr){ ^ permutarepow.cpp:78:1: note: no known conversion for argument 1 from 'BigInt' to 'long long unsigned int' permutarepow.cpp:377:70: error: no matching function for call to 'BigInt::BigInt(BigInt)' ans = ans * fv[i] / gcd(ans, BigInt((unsigned long long) fv[i])); ^ permutarepow.cpp:377:70: note: candidates are: permutarepow.cpp:84:1: note: BigInt::BigInt(BigInt&) BigInt::BigInt(BigInt & a){ ^ permutarepow.cpp:84:1: note: no known conversion for argument 1 from 'BigInt' to 'BigInt&' permutarepow.cpp:17:5: note: BigInt::BigInt(const char*) BigInt(const char *); ^ permutarepow.cpp:17:5: note: no known conversion for argument 1 from 'BigInt' to 'const char*' permutarepow.cpp:69:1: note: BigInt::BigInt(std::string&) BigInt::BigInt(string & s){ ^ permutarepow.cpp:69:1: note: no known conversion for argument 1 from 'BigInt' to 'std::string& {aka std::basic_string<char>&}' permutarepow.cpp:78:1: note: BigInt::BigInt(long long unsigned int) BigInt::BigInt(unsigned long long nr){ ^ permutarepow.cpp:78:1: note: no known conversion for argument 1 from 'BigInt' to 'long long unsigned int' permutarepow.cpp:342:8: error: initializing argument 2 of 'BigInt gcd(BigInt, BigInt)' BigInt gcd(BigInt a, BigInt b) ^ permutarepow.cpp: In function 'BigInt gcd(BigInt, BigInt)': permutarepow.cpp:347:1: warning: control reaches end of non-void function [-Wreturn-type] } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema PermutarePow 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ă.