我只a了第二道题.... #include <bits/stdc++.h> using namespace std; int main(){     int n,ans=0,t,x,y=1,z=1;     scanf("%d",&n);     while (n--)     {         scanf("%d%d",&t,&x);         if(t==1){             if(z==1)z+=1;             else z+=2;         }else{             y++;         }     }     printf("%d\n",z*y); }