Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Why Presentation Error??? How to fix...

Posted by Vovka at 2006-09-12 02:56:42 on Problem 2720
Here is output part of my program:

/* something */
string sv[101][101];
int main()
{
	init();
	FOR(i,1,101) FOR(j,1,101) sv[i][j]=get(i,j,7); 
// precalculate answers with length 7
	bool flag=false;
	while(1){
		int n,b,x;
		scanf(" %d",&b);
		if (b==0) break;
		scanf(" %d %d",&x,&n);
		if(flag) printf("\n");
		flag=true;
		printf("%s",sv[b][x].c_str()+(7-n));
// trim long answers to n digits
	}
	return 0;
}

Please help! My algo is correct, but output... I tried with flag and without, but still PE ^(

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator