#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 | #45042039 | Utilizator | |
Fișier | permutarepow.cpp | Dimensiune | 8.70 KB |
Data încărcării | 30 Septembrie 2023, 22:00 | Scor / rezultat | 70 puncte |
permutarepow.cpp: In static member function 'static std::string K::short_(std::string, long long unsigned int)': permutarepow.cpp:311: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;}S K::mod(S str1,S str2){S ans=subtract(str1,multiply(_(str1,str2),str2));R ans;} ^ permutarepow.cpp:4:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] #define T size() ^ permutarepow.cpp:311: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;}S K::mod(S str1,S str2){S ans=subtract(str1,multiply(_(str1,str2),str2));R ans;} ^ permutarepow.cpp:311: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;}S K::mod(S str1,S str2){S ans=subtract(str1,multiply(_(str1,str2),str2));R ans;} ^ permutarepow.cpp: In function 'int main()': permutarepow.cpp:328: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:328: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ă.