|
|
Прошу уточнить. В задании (и тестах) идёт речь о: 1) конечных географических 2D картах. 2) географических картах на сфере. 3) любых абстрактных картах в многомерном \ многосвязном пространстве. 4) другое. Please clarify. The task (and tests) are about: 1) Finite 2D geographical maps. 2) geographical maps on the sphere. 3) favorite abstract maps in a multi-dimensional \ multi-connected space. 4) other. What is in test 3????? I dont know, but if you are using BFS in your solution, you should remember, that graph can contain more than 1 connected component. Try this test: 6 2 3 0 0 0 5 6 0 0 0 one of answers: 011100 тест неверный, по условию можно в любую страну перейти, а у вас например из 1 в 4 не перейти Does anyone know about test number 5? If you do, please download the values for this test. try 6 6 0 3 0 5 0 5 6 0 0 0 and 7 2 0 5 0 6 4 0 5 7 0 0 0 0 Well, I've passed that tests, but still getting WA 13 Any advices? When build the graph, make it undirected rather than directed one. don't use scanf("%d") Edited by author 19.07.2014 21:19 Why? It works fine for me. Give the second test, please... Should be something like: 4 2 0 0 4 0 0 answer 0101 or 0110 incorrected test. In problem: "Из каждой страны можно попасть в любую другую, перейдя некоторое количество границ. " Edited by author 08.05.2011 19:17 try this test 5 2 3 4 5 0 0 0 0 0 the answer should be: 01111 My program write correct answer but WA in check=( Same here. Passes rawr's test but not test #2 Try this out: 1-6-5 | | 2-3-4 6 6 0 3 0 6 4 0 5 0 6 0 0 Edited by author 21.04.2017 13:41 Also try this test: 1-2-3-4 | | 9 5 | | 8-7---6 9 2 9 0 3 0 4 0 5 0 6 0 7 0 8 0 9 0 0 Edited by author 16.05.2018 02:35 Edited by author 16.05.2018 02:36 Does anyone know about test number 8?. If you do, please upload some, thank you very much. I believe the test is simple. I had WA #8 and the only problem I had I forgot to initialize first vertix to RED color. Test: 1 0 result:0 could you give test 16 or something like that.. If you are anything like me, go get yourself a cup of coffee and then look for a really stupid bug in your dfs. My program would have failed on the following test: 4 4 0 3 4 0 4 0 0 Hi, Does anyone have test 12 and it's output so that I can debug my program? Dear all, all tests I found in this discussion worked, but when I run my code I do have WA on test 7 (or 13 for another version of my code). Can someone please give a kind of inputs with some test? I checked everything I could think of and it worked. Thank you! Input: 4 4 0 3 0 4 0 0 Output: 0101 Thank you for the answer. The following tests are working, but when I submit I do have WA2. I. 3 2 0 3 0 0 result: 010 II. 4 4 0 3 0 4 0 0 result: 0101 III. 5 2 5 0 3 0 4 0 5 0 0 result:-1 IV. 5 2 3 4 5 0 0 0 0 0 result: 01111 V. 6 2 4 6 0 3 5 0 4 6 0 5 0 0 0 result: 010101 VI. 0 result :-1 I am using bfs, of course with a queue implementation. Hmm, but I used dfs and have no problems :) Maybe I will try also dfs. I still do not understand why bfs would not work (well a little modified). It seems that I have now WA#2. Does somebody knows test #2 (except those written above.)? Thank you. I have got accepted with a version of bfs modified. I also found the problem in my implementation. Once I succeeded for test below and all others from above, I got AC. Thank you for your help. 6 2 3 0 4 0 5 0 6 0 6 0 0 result: 011001
Does someone knows what is the 7th test? Than you very much! 1). Use depth-first search 2). Use local variable for color in dfs procedure dfs is enough, but it's better to store graph using compliance matrix, so keeping it in this way, your dfs will visit all nodes (1) and only when current node is already colored (2). If some of node, that we can go fro current is already colored and it has the same color, so -1 should be returned. So I will answer myself, This test helped me: 5 2 5 0 3 0 4 0 5 0 0 Maybe it isn't exactly the same test as #6 but i hope that it will help you too.. Good Luck! in the 6th test coloring is impossible What is test 15? Fank's Apply the GOOD JOB for College ACMers to Make Large Money and Become a Millionaire Hello, We need large no. of dedicated and hard working ACMers. The payment is good so we need ACMers to be efficient. All you have to do to get the job is to sign up at our websites. The link of our websites are given below. http://www.PaisaLive.com/register.asp?3556638-4847933 After the registration, a confirmation email will be sent to your specified email address. Please click on the link inside the confirmation email to activate your account and recieve ACM work instantly. For any other queries you can mail the administrator. Miss Juliet Admin paisalive.com 5 2 5 0 3 0 4 0 5 0 0 The above graph (countries forming loop) can help. Someone advices this test 4 4 0 3 0 4 0 0 when I try it output is 0101 is it right? Why 101 is bad output, but 010 is good output? >>The color of the first country is red Do you want know MyIdea My mail: nodirbek_sadullayev@mail.ru At my first atempt I should get Crash 14,but I got WA 14,when I change the size of array I got Ac... int a[10], b[10]; ... cout<<a[15]; ... Such code leads to WA, not Crash, because a[15] is only the address of b[5]. |
|
|