#include<cstdio>
#include<iostream>
#define NN 10000
using namespace std;
struct node{
int diren,youren;
}a[NN];
int n,x,s,ss,t;
int cnt,ans,d;
int main(){
scanf("%d",&n);
scanf("%d",&x);
scanf("%d%d%d",&s,&ss,&t);
for(int i=1;i<=n;i++){
scanf("%d%d",a[i].youren ,a[i].diren );
cnt+=a[i].youren*(x-1) ;
d+=a[i].diren ;
}
cout<<cnt<<" "<<d;
int yfsum=s/ss*x;
if(yfsum+cnt<d){
cout<<"0";
return 0;
}
else{
cout<<"1";
ans=yfsum*t+cnt*t;
cout<<ans;
}
return 0;
}
运行输入没输完就结束了,这代码我随便编的,练练手,求大佬解惑