#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 | #45040139 | Utilizator | |
Fișier | permutarepow.cpp | Dimensiune | 8.34 KB |
Data încărcării | 30 Septembrie 2023, 20:20 | Scor / rezultat | Eroare de compilare |
permutarepow.cpp: In member function 'int BigInt::operator[](int) const': permutarepow.cpp:116:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(digits.size() <= index || index < 0) ^ permutarepow.cpp: In function 'BigInt& operator/=(BigInt&, const BigInt&)': permutarepow.cpp:283:21: warning: unused variable 'm' [-Wunused-variable] int n = Length(a), m = Length(b); ^ permutarepow.cpp: In function 'BigInt& operator%=(BigInt&, const BigInt&)': permutarepow.cpp:320:21: warning: unused variable 'm' [-Wunused-variable] int n = Length(a), m = Length(b); ^ permutarepow.cpp: In function 'BigInt gcd(BigInt, BigInt)': permutarepow.cpp:364:21: error: no matching function for call to 'BigInt::BigInt(BigInt)' return gcd(b, a%b); ^ permutarepow.cpp:364:21: note: candidates are: permutarepow.cpp:103:1: note: BigInt::BigInt(BigInt&) BigInt::BigInt(BigInt & a){ ^ permutarepow.cpp:103:1: note: no known conversion for argument 1 from 'BigInt' to 'BigInt&' permutarepow.cpp:94:1: note: BigInt::BigInt(const char*) BigInt::BigInt(const char *s){ ^ permutarepow.cpp:94:1: note: no known conversion for argument 1 from 'BigInt' to 'const char*' permutarepow.cpp:79:1: note: BigInt::BigInt(std::string&) BigInt::BigInt(string & s){ ^ permutarepow.cpp:79:1: note: no known conversion for argument 1 from 'BigInt' to 'std::string& {aka std::basic_string<char>&}' permutarepow.cpp:88:1: note: BigInt::BigInt(long long unsigned int) BigInt::BigInt(unsigned long long nr){ ^ permutarepow.cpp:88:1: note: no known conversion for argument 1 from 'BigInt' to 'long long unsigned int' permutarepow.cpp:361:8: error: initializing argument 2 of 'BigInt gcd(BigInt, BigInt)' BigInt gcd(BigInt a, BigInt b) ^ permutarepow.cpp: In function 'int main()': permutarepow.cpp:393:17: error: no matching function for call to 'BigInt::BigInt(BigInt)' BigInt ans = 1; ^ permutarepow.cpp:393:17: note: candidates are: permutarepow.cpp:103:1: note: BigInt::BigInt(BigInt&) BigInt::BigInt(BigInt & a){ ^ permutarepow.cpp:103:1: note: no known conversion for argument 1 from 'BigInt' to 'BigInt&' permutarepow.cpp:94:1: note: BigInt::BigInt(const char*) BigInt::BigInt(const char *s){ ^ permutarepow.cpp:94:1: note: no known conversion for argument 1 from 'BigInt' to 'const char*' permutarepow.cpp:79:1: note: BigInt::BigInt(std::string&) BigInt::BigInt(string & s){ ^ permutarepow.cpp:79:1: note: no known conversion for argument 1 from 'BigInt' to 'std::string& {aka std::basic_string<char>&}' permutarepow.cpp:88:1: note: BigInt::BigInt(long long unsigned int) BigInt::BigInt(unsigned long long nr){ ^ permutarepow.cpp:88:1: note: no known conversion for argument 1 from 'BigInt' to 'long long unsigned int' permutarepow.cpp:395:41: error: no matching function for call to 'BigInt::BigInt(BigInt)' ans = ans * fv[i] / gcd(ans, fv[i]); ^ permutarepow.cpp:395:41: note: candidates are: permutarepow.cpp:103:1: note: BigInt::BigInt(BigInt&) BigInt::BigInt(BigInt & a){ ^ permutarepow.cpp:103:1: note: no known conversion for argument 1 from 'BigInt' to 'BigInt&' permutarepow.cpp:94:1: note: BigInt::BigInt(const char*) BigInt::BigInt(const char *s){ ^ permutarepow.cpp:94:1: note: no known conversion for argument 1 from 'BigInt' to 'const char*' permutarepow.cpp:79:1: note: BigInt::BigInt(std::string&) BigInt::BigInt(string & s){ ^ permutarepow.cpp:79:1: note: no known conversion for argument 1 from 'BigInt' to 'std::string& {aka std::basic_string<char>&}' permutarepow.cpp:88:1: note: BigInt::BigInt(long long unsigned int) BigInt::BigInt(unsigned long long nr){ ^ permutarepow.cpp:88:1: note: no known conversion for argument 1 from 'BigInt' to 'long long unsigned int' permutarepow.cpp:361: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:365: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ă.