这是我的
#include<stdio.h>
int main()
{
int n;
int b[5000] = {0};
scanf("%d",&n);
double a;int t;
int s=0;
for(int i=0;i<n;i++){
scanf("%lf %d",&a,&t);
for(int j=1;j<=t;j++){
int q = 0;
s = a*j;
if(b[s]==0){
b[s]=1;
} else {
b[s]=0;
}
}
}
for(int y=0;;y++){
if(b[y]!=0){
printf("%d",y);
break;
}
}
}
不知道为什么,最后三个一直是TLE,和我类似的AC解法与我的区别好像只有我不是c++写法了。。。