|
|
Common BoardTry: 101 203 1000 Or: 1 3 1000 I think this test should break some AC solutions: 443 -39 457 33 386 -773 561 127 Correct answer is -1, but I think some AC solutions can print 0 read the tags before you decide, and think a few times before you start Test 47 is some number from 1e14 to 1e18 with correct answer "No". wa5 - check how you calculate time when change direction at the station Test: 12 1 2 45 64 31 23 128 61 2 2 7 8 7 3 5 ans: 805 Test: 4 7 6 3 3 12 3 4 ans : 60 Good luck! Here's my wrong solution, can sb view the code and help me? #include <iostream> #include <vector> #include <algorithm> using namespace std; vector<int> pos; vector<vector<int>> in; vector<vector<int>> out; vector<int> ans; void lets_go(int i) { for (int j = 0; j < in[i].size(); j++) { if (pos[in[i][j]] == 0) { lets_go(in[i][j]); } } pos[i] = 1; ans.push_back(i); for (int j = 0; j < out[i].size(); j++) { if (pos[out[i][j]] == 0) { lets_go(out[i][j]); } } } int main() { int n; cin >> n; in.resize(n); out.resize(n); pos.resize(n, 0); for (int i = 0; i < n; i++) { int a; cin >> a; while (a != 0) { if (a != 0) { in[a - 1].push_back(i); out[i].push_back(a - 1); cin >> a; } } } for (int i = 0; i < n; i++) { if (pos[i] == 0) { lets_go(i); } } for (int i = 0; i < n; i++) { cout << ans[i] + 1 << " "; } } Try this test: 1 1 2 0 1 -1 0 1 Answer: 1 1 2 0 error in path recovery at a fixed level for 2 = 2 3 = 12 4 = 104 can u give some tests? Edited by author 21.10.2012 12:05 011 ans: 11 maybe forgot some reverse you forgot about something It is something wrong. Can somebody help me? I have completed this problem. Test #7 is single '('. Thank you VERYYYYYY MUUUCH! I solved this problem because of yoy =) :-) :=) thanks a lot. After this test I got accepted My program passed this test '('. And also my program passed all the testes I've found here... but result is still WA7. I don't know why. Can someone help me? I've got an AC! Probably, my mystake was in wrong work with carrage return symbols.. Thankkkkkkkkkkkkkkkkkk a llotttttttt Exactly! Thank you very much. For all other users experiencing test#7 WA: Test your program exactly with this data: (<EOF> Got AC now thanks for test :) Probably, test 7 is 'a(' Add some letter before '(' 5 7 3 4 1 2 2 1 2 4 3 1 3 5 5 5 5 4 Answer: 0 I have two different solutions which handle this test very differently: 20 5 24 0.0 - 1.0 0.1 - 1.0 0.2 - 1.1 0.3 - 1.2 0.4 - 1.3 0.5 - 1.4 0.6 - 1.5 0.7 - 1.6 0.8 - 1.7 0.9 - 1.8 0.10 - 1.9 0.11 - 1.10 0.12 - 1.11 0.13 - 1.12 0.14 - 1.13 0.15 - 1.14 0.16 - 1.15 0.17 - 1.16 0.18 - 1.17 0.18 - 2.0 0.18 - 3.0 0.18 - 4.0 0.18 - 5.0 0.19 - 1.18 0 19 One of them might be even close to TLE, but both my solutions accepted here with time 0.015 s, which makes me think there is no such test in the list of tests. I think this test should be added... Your test has been added. 1 author lost AC after rejudge. Thanks and feel free to send more tests to support email. |
|
|