正文
增加 79 行删除 123 行
137 行未改动全部展开1381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172184 行未改动2232242252262272282292302316 行未改动2382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872 行未改动290291292293294295296297298299300301302303304305306307308309137 行未改动全部展开## Formula$$\text{Strength} =\frac{5 \times \max\left(1,\ \left\lceil \frac{\text{ph}}{\text{mob}_{\text{dmg}}} \right\rceil\right) \times \text{acc} \times \max(0,\ \text{dmg} - \text{armor})}{\text{ap} \times \max\left(1,\ \left\lceil \frac{\text{ph}}{\text{mob}_{\text{dmg}}} \right\rceil\right) + 5 \times \text{cd}}$$## Current Code```cpp#include <bits/stdc++.h>using namespace std;#define int long longconst int mdfact[15]={0,1,3,9,27,81,243,729,2187,6561};const int marmor[15]={0,1,2,7,22,65,194,583,583,583};int mob_dmg[500];struct petal{int dmg,ph;}petals[500];signed main(){freopen("data.txt","r",stdin);freopen("strength.txt","w",stdout);int max_petal,max_mob,max_rarity;cin>>max_petal>>max_mob>>max_rarity;for(int i=1;i<=max_mob;i++)cin>>mob_dmg[i];for(int i=1;i<=max_petal;i++){string name,tp;cin>>name>>tp;cout<<name<<": ";if(tp=="N/A"){cout<<"N/A"<<endl;continue;}double cd,ap,acc;cin>>petals[i].dmg>>petals[i].ph>>cd>>ap>>acc;if(name=="Ant_egg"){for(int j=1;j<=max_rarity;j++){int dmg=petals[i].dmg*mdfact[j],ph=petals[i].ph*mdfact[j];double sum=0;for(int n=1;n<=max_mob;n++){for(int m=1;m<=max_rarity;m++){int mobdmg=mob_dmg[n]*mdfact[m],armor=marmor[m];int hits=max(1ll,(int)ceil((double)ph/(double)mobdmg)),dam=max(0ll,dmg-armor);sum+=(double)(5.0*hits*acc*dam)/(double)(ap*hits+5.0*cd);}}cout<<fixed<<setprecision(2)<<4ll*sum/(double)(max_mob*max_rarity)<<' ';}}else{for(int j=1;j<=max_rarity;j++){int dmg=petals[i].dmg*mdfact[j],ph=petals[i].ph*mdfact[j];double sum=0;for(int n=1;n<=max_mob;n++){for(int m=1;m<=max_rarity;m++){int mobdmg=mob_dmg[n]*mdfact[m],armor=marmor[m];int hits=max(1ll,(int)ceil((double)ph/(double)mobdmg)),dam=max(0ll,dmg-armor);sum+=(double)(5.0*hits*acc*dam)/(double)(ap*hits+5.0*cd);}}cout<<fixed<<setprecision(2)<<sum/(double)(max_mob*max_rarity)<<' ';}}cout<<endl;}return 0;}```## Potential Update Code```cpp#include <bits/stdc++.h>using namespace std;#define int long long4 行未改动int dmg,ph;}petals[500];signed main(){freopen("data.txt","r",stdin);freopen("test.txt","w",stdout);int max_petal,max_mob,max_rarity;cin>>max_petal>>max_mob>>max_rarity;for(int i=1;i<=max_mob;i++)cin>>mob_dmg[i];6 行未改动continue;}double cd,ap,acc;cin>>petals[i].dmg>>petals[i].ph>>cd>>ap>>acc;if(name=="Ant_egg"){for(int j=1;j<=max_rarity;j++){int dmg=petals[i].dmg*mdfact[j],ph=petals[i].ph*mdfact[j];double sum=0;for(int n=1;n<=max_mob;n++){for(int m=1;m<=max_rarity;m++){int mobdmg=mob_dmg[n]*mdfact[m],armor=marmor[m];int hits=max(1ll,(int)ceil((double)ph/(double)mobdmg));double total_damage=0;for(int k=1;k<=hits;k++){int cur_hp=max(0ll,ph-(k-1)*mobdmg);double cur_dmg=(ph==0)?(double)dmg:(double)cur_hp/(double)ph*(double)dmg;double dam=max(0.0,cur_dmg-(double)armor);total_damage+=dam;}sum+=(double)(5.0*acc*total_damage)/(double)(ap+hits+5.0*cd);}}cout<<fixed<<setprecision(2)<<4ll*sum/(double)(max_mob*max_rarity)<<' ';}}else{for(int j=1;j<=max_rarity;j++){int dmg=petals[i].dmg*mdfact[j],ph=petals[i].ph*mdfact[j];double sum=0;for(int n=1;n<=max_mob;n++){for(int m=1;m<=max_rarity;m++){int mobdmg=mob_dmg[n]*mdfact[m],armor=marmor[m];int hits=max(1ll,(int)ceil((double)ph/(double)mobdmg));double total_damage=0;for(int k=1;k<=hits;k++){int cur_hp=max(0ll,ph-(k-1)*mobdmg);double cur_dmg=(ph==0)?(double)dmg:(double)cur_hp/(double)ph*(double)dmg;double dam=max(0.0,cur_dmg-(double)armor);total_damage+=dam;}sum+=(double)(5.0*acc*total_damage)/(double)(ap*hits+5.0*cd);}}cout<<fixed<<setprecision(2)<<sum/(double)(max_mob*max_rarity)<<' ';}}cout<<endl;}return 0;}2 行未改动## Strength|Petal|Common|Unusual|Rare|Epic|Legendary||:-:|:-:|:-:|:-:|:-:|:-:||Basic|1.38|N/A(8.29)|N/A(48.70)|N/A(243.68)|N/A(1052.61)||Rose|0.42|2.51|13.58|66.49|277.83||Leaf|N/A(0.71)|4.18|23.77|118.66|500.00||Light|2.10|10.20|50.54|226.76|939.14||Corn|2.37|19.83|120.71|593.54|2502.23||Stinger|3.57|13.89|45.81|172.44|756.45||Pollen|N/A(1.27)|5.82|23.91|89.36|285.73||Rice|0.96|5.00|21.54|103.04|466.05||Glass|3.25|14.00|55.38|190.38|595.38||Clover|1.67|9.81|55.61|268.14|1124.28||Rock|3.77|22.08|123.82|603.63|2632.19||Heavy|N/A(1.95)|N/A(16.88)|118.13|661.38|3076.25||Soil|1.05|6.03|32.59|150.30|607.86||Shovel|0(N/A)|<|<|<|<||Ant egg|5.26|33.48|164.06|698.93|2615.02||Peas|5.83|24.67|96.33|321.33|996.33|137 行未改动全部展开1381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781794 行未改动1841851861871881891901911926 行未改动1992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432 行未改动246247248249250251252253254255256257258259260261262263264265137 行未改动全部展开## Formula$$\text{Strength}=\sqrt[4]{\left( 3 s_{\text{同}}^2 + 2 s_{\text{同}} s_{\text{越}} + s_{\text{越}}^2 \right)}$$$$s_{\text{同}} = \frac{1}{N} \sum_{i=1}^{N}\frac{\left( h_i \cdot \text{copies} \cdot \text{acc} \cdot \max(0,\ \text{petal\_dmg} - \text{armor}_i) \right)^2}{\left( \frac{h_i \cdot \text{act}}{5} + \text{cd} \right) \cdot h_i \cdot \text{act}}$$其中$$h_i = \max\left(1,\ \left\lceil \frac{\text{ph}}{\text{dmg}_i} \right\rceil \right)$$$$s_{\text{越}} = \frac{1}{M} \sum_{j=1}^{M}\frac{\left( h_j \cdot \text{copies} \cdot \text{acc} \cdot \max(0,\ \text{petal\_dmg} - \text{armor}_j) \right)^2}{\left( \frac{h_j \cdot \text{act}}{5} + \text{cd} \right) \cdot h_j \cdot \text{act}}$$其中$$h_j = \max\left(1,\ \left\lceil \frac{\text{ph}}{\text{dmg}_j} \right\rceil \right)$$## Code```cpp#include <bits/stdc++.h>using namespace std;#define int long long4 行未改动int dmg,ph;}petals[500];signed main(){freopen("data.txt","r",stdin);freopen("strength.txt","w",stdout);int max_petal,max_mob,max_rarity;cin>>max_petal>>max_mob>>max_rarity;for(int i=1;i<=max_mob;i++)cin>>mob_dmg[i];6 行未改动continue;}double cd,ap,acc;cin>>petals[i].dmg>>petals[i].ph>>cd>>ap>>acc;int copies=1;if(name=="Ant_egg"||name=="Peas")copies=4;for(int j=1;j<=max_rarity;j++){double sum_same=0,sum_cross=0;for(int n=1;n<=max_mob;n++){int dmg_same=petals[i].dmg*mdfact[j];int ph_same=petals[i].ph*mdfact[j];int mobdmg_same=mob_dmg[n]*mdfact[j];int armor_same=marmor[j];int real_dmg_same=max(0ll,dmg_same-armor_same);int hits_same=max(1ll,(int)ceil((double)ph_same/(double)mobdmg_same));double D_same=(double)copies*acc*real_dmg_same;double total_damage_same=(double)hits_same*D_same;double total_time_same=(double)hits_same*ap/5.0+cd;double dmg_per_turn_same=total_damage_same/total_time_same;double dmg_per_ap_same=total_damage_same/((double)hits_same*ap);sum_same+=dmg_per_turn_same*dmg_per_ap_same;int cross_rarity=min(j+1,max_rarity);int dmg_cross=petals[i].dmg*mdfact[j];int ph_cross=petals[i].ph*mdfact[j];int mobdmg_cross=mob_dmg[n]*mdfact[cross_rarity];int armor_cross=marmor[cross_rarity];int real_dmg_cross=max(0ll,dmg_cross-armor_cross);int hits_cross=max(1ll,(int)ceil((double)ph_cross/(double)mobdmg_cross));double D_cross=(double)copies*acc*real_dmg_cross;double total_damage_cross=(double)hits_cross*D_cross;double total_time_cross=(double)hits_cross*ap/5.0+cd;double dmg_per_turn_cross=total_damage_cross/total_time_cross;double dmg_per_ap_cross=total_damage_cross/((double)hits_cross*ap);sum_cross+=dmg_per_turn_cross*dmg_per_ap_cross;}double s_same=sum_same/max_mob;double s_cross=sum_cross/max_mob;double strength=3.0*s_same*s_same+2.0*s_same*s_cross+s_cross*s_cross;cout<<fixed<<setprecision(2)<<pow(strength,0.25)<<' ';}cout<<endl;}return 0;}2 行未改动## Strength|Petal|Common|Unusual|Rare|Epic|Legendary||:-:|:-:|:-:|:-:|:-:|:-:||Basic|5.64|N/A(17.21)|N/A(50.99)|N/A(152.69)|N/A(484.15)||Rose|1.60|5.03|14.67|43.75|146.46||Leaf|N/A(2.92)|9.01|26.53|79.34|257.63||Light|6.42|19.45|57.89|173.48|539.95||Corn|11.53|36.92|107.80|321.02|1113.56||Stinger|9.39|28.24|84.52|253.51|768.87||Pollen|N/A(7.06)|21.66|63.95|191.33|615.17||Rice|3.82|12.30|35.56|105.76|362.85||Glass|7.63|23.19|68.85|206.25|647.92||Clover|6.20|18.92|56.05|167.84|532.20||Rock|14.98|45.31|135.30|405.54|1318.19||Heavy|N/A(13.65)|N/A(42.43)|125.31|374.43|1275.76||Soil|3.49|10.63|31.50|94.32|299.07||Shovel|N/A|<|<|<|<||Ant egg|15.39|48.42|142.09|423.95|1446.20||Peas|19.54|59.20|176.16|527.90|1643.03|