#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 | #45042462 | Utilizator | |
Fișier | permutarepow.cpp | Dimensiune | 8.94 KB |
Data încărcării | 30 Septembrie 2023, 22:30 | Scor / rezultat | 70 puncte |
permutarepow.cpp: In static member function 'static std::string K::short_(std::string, long long unsigned int)': permutarepow.cpp:221:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] while (temp < divisor){temp=temp*10+(s1[++idx]-'0');if(idx >= s1.T)break;}while (s1.T > idx){ans += (temp / divisor)+'0';temp=(temp % divisor)*10+s1[++idx]-'0';}if (ans.T==0)R "0";R ans;} ^ permutarepow.cpp:4:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] #define T size() ^ permutarepow.cpp:221:66: note: in expansion of macro 'T' while (temp < divisor){temp=temp*10+(s1[++idx]-'0');if(idx >= s1.T)break;}while (s1.T > idx){ans += (temp / divisor)+'0';temp=(temp % divisor)*10+s1[++idx]-'0';}if (ans.T==0)R "0";R ans;} ^ permutarepow.cpp:221:89: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] while (temp < divisor){temp=temp*10+(s1[++idx]-'0');if(idx >= s1.T)break;}while (s1.T > idx){ans += (temp / divisor)+'0';temp=(temp % divisor)*10+s1[++idx]-'0';}if (ans.T==0)R "0";R ans;} ^ permutarepow.cpp: In static member function 'static std::string K::shortDivide(std::string, int)': permutarepow.cpp:222:152: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] S K::shortDivide(S s1, int divisor) {S ans;int idx=0;int temp=s1[idx]-'0';while (temp < divisor) {temp = temp*10 + (s1[++idx] - '0');if(idx >= s1.size())break;}while(s1.size()>idx){ans+=(temp/divisor)+'0';temp=(temp%divisor)*10+s1[++idx]-'0';} ^ permutarepow.cpp:222:177: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] S K::shortDivide(S s1, int divisor) {S ans;int idx=0;int temp=s1[idx]-'0';while (temp < divisor) {temp = temp*10 + (s1[++idx] - '0');if(idx >= s1.size())break;}while(s1.size()>idx){ans+=(temp/divisor)+'0';temp=(temp%divisor)*10+s1[++idx]-'0';} ^ permutarepow.cpp: In function 'int main()': permutarepow.cpp:258:39: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result] freopen("permutarepow.in", "r", stdin);freopen("permutarepow.out", "w", stdout); ^ permutarepow.cpp:258:80: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result] freopen("permutarepow.in", "r", stdin);freopen("permutarepow.out", "w", stdout); ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | OK. | 10 | 10 | Exemplu | |
2 | 0 secunde | OK. | 20 | 20 | ||
3 | 0 secunde | OK. | 20 | 20 | ||
4 | 0.004 secunde | OK. | 20 | 20 | ||
5 | Depășit | Limita de timp depășită | 30 | 0 | ||
Punctaj total | 70 |
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ă.