ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Common Board

1501
Posted by svr 5 Nov 2006 18:57
What are principles to have AC(0.001)? I got AC(0.078) by
using BFS in graf of triples(n1,n2,ves) where n1 and n2 number of cards taken from 1 and second piles and ves is difference between blacs and reds. Final condition is (N,N,0), starting - (0,0,0). This algorithm has O(N^2).
Is there radically faster way of O(N)?