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

可以直接转化,不用经过括号式

Posted by tzkq at 2009-02-20 00:03:46 on Problem 1068
In Reply To:其实反解析更有意思,就是第二种化成第一种 Posted by:tzkq at 2009-02-19 21:22:27
#include <stdio.h>
#include <string.h>
int i,j,t,q,n,s[31];
int main(){
	for(scanf("%d",&q);q--;printf("\n")){
		for(i=0,scanf("%d",&n);i++<n;printf("%d ",i-j))
			for(scanf("%d",s+i),t=s[i],j=i-1;t<=s[j];j--)t--;
	}
	return 0;
}

研究了一晚上,终于让我给发现了

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