文章目录 A-拯救咕咕咕之史莱姆E-无敌阿姨 A-拯救咕咕咕之史莱姆 /* * problem:拯救咕咕咕之史莱姆 * method:模拟、找规律 * date:2020/07/10 */ #include<iostream> #define LL long long using namespace std; long long f[10],s[10]; int main(){ long long i,j; for(i=1;i<=4;i++){ f[i]=i; } for(i=5;i<10;i++){ f[i]=f[i-1]+i-3; } for(i=1;i<10;i++){ for(j=1;j<=i;j++) s[i]+=f[j]*3; //cout<<s[i]<<endl; } long long n; while(cin>>n){ if(!n) break; if(s[6]>=n) cout<<"AOLIGEI!"<<endl; else cout<<"DAAAAAMN!"<<endl; } return 0; } E-无敌阿姨 /* * problem:无敌阿姨 * method:模拟 * date:2020/07/10 */ #include<iostream> #define LL long long using namespace std; int n,m,k,t; int main() { cin>>t; while(t--) { int i,num=1,x,t; cin>>n>>m>>k; t=m; while(n--) { cin>>x; while(x>t) { x-=t; t=m; num++; } t-=x; if(n&&t<=k) { num++; t=m; } else { t-=k; } } cout<<num<<endl; } return 0; }