Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:为什么用cin就TLE?In Reply To:为什么用cin就TLE? Posted by:Jimbear at 2012-01-31 21:17:30 int main() { int length,numOfColor,option; int i,j,begin,end,color; char flag[2]; //cin>>length>>numOfColor>>option; scanf("%d %d %d", &length, &numOfColor, &option); init(1,1,length); for(i = 0 ; i < option ; i++) { //cin>>flag; scanf("%s",flag); if(flag[0] == 'C') { //cin>>begin>>end>>color; scanf("%d %d %d", &begin, &end, &color); freshColor(1,begin,end,color); } else { //cin>>begin>>end; scanf("%d %d", &begin, &end); for(j = 0 ; j < 40 ; j++) c[j] = 0; cnt = 0; checkColor(1,begin,end); //cout<<cnt<<endl; printf("%d\n",cnt); } } return 0; } //-------------------------------------------------------------- 注释掉的如果用上就会TLE,不是应该一样吗?求教。。。 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator