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 Kuroro at 2012-12-13 13:28:22 on Problem 3295
boolean left, right;
newString= s.replace(ExpVars[len], '0');
left = solve(newString, len-1);
newString= s.replace(ExpVars[len], '1');
right = solve(newString, len-1);
if(left&&right)
	return true;
else 
	return false;

public static String[][] rules={
		{"N1","0"},{"N0","1"},
		{"K11","1"},{"K10","0"},{"K01","0"},{"K00","0"},
		{"A11","1"},{"A10","1"},{"A01","1"},{"A00","0"},
		{"C11","1"},{"C10","0"},{"C01","1"},{"C00","1"},
		{"E11","1"},{"E10","0"},{"E01","0"},{"E00","1"},
	};

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