|
|
Общий форум参考 百度知道 给定L,M,K,N,求序列A的数量。满足: 1. A的长度为L 2. A中元素均在 [1,M] 间的正整数 3. A的元素之和为K的倍数 求字典序第N小的序列A,排名从0开始标号 (即,称最小为“第0小”) L<=100,M<=50,K<=50 N范围题目没有给 Edited by author 26.12.2021 13:22 Edited by author 26.12.2021 13:22 Can you help me with test 28? Yea, sure. Just try 6 6 ****** ****** **..** **..** ****** ****** answer: 1 Anyone has any tests for WA #6? I am out of ideas already. The problem seems too simple... This test helps you: 10 1 2 3 4 5 6 7 8 9 0 4 3 answer: 39 6 The problem says the program only needs to print out any of the answers. but why i WA in the first test but can pass all my tests? If you are storing hashes in a segtree and using some custom prime divider the values of the parent nodes can be less than the child nodes because the remainder "makes a round", so to subtract u have to add that round, I think this is what is actually happening in test 2. Subj. Btw, what is the problem with the 23rd test? it's help me for wa23 4 0 4 0 4 0 1 0 1 1 0 1 1000000 0 1000000 0 Indeed! Thank you very much! Thank you very much! it's realy helpful!!! Very help!! Thank you again! Help please!! What is test 6???? Just try to replace x, y or z using equation y = x + z (vector form). Count of cells on path is |x| + |y| + |z| + 1. This is brilliant Just try to replace x, y or z using equation y = x + z (vector form). Count of cells on path is |x| + |y| + |z| + 1. Testset for this problem is very weak. Program, that works ~5 secs. on my tests got AC in less than 1 sec. on jury tests... why don't you share your strong tests with us then? Can you help me? I WA test #11 Can you help me? I WA test #11 Sorry. I can't. Oh! I can't help you too. Me neither. I can help you, but I won't WA on the 5th test! It passed all random tests on my computer. got no idea! Please help me! Edited by author 12.03.2008 17:48 It gives WA please give me test for it (test #11) +1 I have the same problem. Could somebody give a test, please? Tried all the tests of this forum, neither of those helped me. +1 why no one answers?( My WA11 x-x x-x Result: 0 My result before AC on WA11: <empty line> This test could help you. 5 8 1 5 2 200 1 2 1 100 99 2 3 0 0 0 3 2 0 0 0 2 4 0 0 0 4 2 0 0 0 3 4 0 0 0 4 3 0 0 0 4 5 1 100 99 You can draw this graph on paper, and the answer will be obvious. I have this output: 99 3 1 4 8 Good luck. I got RE9.I got WA10 after use your test.So interesting.QAQ Sorry my bad English. Edited by author 17.08.2021 06:35 In my case WA 10 was caused by one directional roads, not <->. "In a country, there is a number of cities connected by unidirectional roads" try changing the cycle: while(energy > 0.01) to while (energy > 0.00000000001) Maybe this will help you Попробуйте поменять цикл while (energy > 0.01) на while (energy > 0.00000000001) Возможно, это поможет Damn, how is this problem 440 difficulty, I solved it in 10 minutes The DP version actually harder than you think. The solution with magic formula is disappointing. Go solve other problems and come back later. The score of problems are calculated by number of accepted solutions, and some problems are very popular and people find out answers and send ready solutions. 0. I wanted to implement universal approach with Huffman coding + compressing binary code to 64 base code. Not just eng text property (I was upset, because for so interesting task so stupid solution works). 1. I'm Java developer, and I afraid that Java consume too much memory even for input. So I have to rewrite all to cpp. 2. Thinks that costs me a lot of time. Input in cpp. (If you can explain what is wrong. please do ) WRONG inputData = ""; std::string line = ""; while (std::getline(std::cin, line)) { inputData += line; //inputData.push_back('\r');//todo maybe we need \r\n inputData.push_back('\n'); } CORRECT inputData = ""; int c; while ((c = getchar()) != EOF) inputData.push_back((char)c); 3. Escaping characters to produce cpp code: std::string escape(char ch) { switch (ch) { case '\'': return "\\'"; case '\"': return "\\\""; case '\\': return "\\\\"; case '\b': return "\\b"; case '\f': return "\\f"; case '\n': return "\\n"; case '\r': return "\\r"; case '\t': return "\\t"; default: return {ch}; } } I finally got AC. So I wish you good luck with this problem and thank to author so interesting problem. |
|
|