|
|
back to boardMine is WA,Who can help me!!!!!!!!!!!!! Posted by kkk 16 May 2002 18:41 My pro as follows #include<stdio.h> main() { int n,i,k,a,b,total,min; scanf("%d",&n); k=1; min=10000; total=0; for(i=0;i<n;i++) { scanf("%s"); scanf("%d",&a); if(!a) k++; else { scanf("%d",&b); total+=k*b; if(b<min) min=b; else total=12000; k=1; } } if(total>10000){ printf("NO"); } else printf("YES"); } |
|
|