can anybody help me with the question of zcp 2012 wormhole asked 28 Nov '14, 20:21

Sort all Wormhole starting times and wormhole ending times. Sort all tests by their starting times then for all contests calculate total time. Use vectors and sort if you are using c++. Also, can you check out ZIO 2009's first question. Tell me if you get a good solution to the problem .. answered 28 Nov '14, 22:04

I'm getting Wrong Answer for 1 test case in Subtask 1 and 2 test cases in Subtask 2 in this WORMHOLES problem thus resulting in a total score of 0/100. I don't think time limit is a problem as I used binary search so it should max take 2N(log N) iterations (sorry I am unsure of the proper notation, I suppose it is O(2NlogN)) which will be fine I guess. Still, suggestions are welcome. My code's here:https://www.dropbox.com/s/qzwfagv2q9yye51/WORMHOLES.docx?dl=0 Could someone please help me understand my error, or better, provide a test case for which this code doesn't work? P.S. If the link's inconvenient, I am sorry, I tried using the answered 01 Dec '14, 16:24
1
Could someone please at least provide a border test case for which the above code doesn't work?
(03 Dec '14, 15:36)

My code is basically the same as what OrganicShilling has suggested above, and it works fine for all of the test cases I've thought up. On the server, it's giving an incorrect answer on three problems in Subtask 1 and one in Subtask 2, and timing out on 4 problems in Subtask 2. I know I can use binary search instead of a linear one to reduce the time complexity, but I have no idea on how to fix the wrong answers. It would be really helpful if someone could take a look at my code and tell me where I'm going wrong. Here's a link to my code. answered 03 Dec '14, 17:32

Even I am having trouble with the problem. Here's my code that works but exceeds time limit http://pastebin.com/UUzJRtFP Here's my buggy code where time limit is taken care of but it gives wrong answer: http://pastebin.com/ytrq7xsc . I am also desperate for help. answered 04 Dec '14, 02:17

i am getting a wrong answer for task 2,4,7,8,12,13,14. here is my code include<iostream>include<algorithm>include<vector>include<utility>using namespace std; int cal(vector<pair<int, int=""> >, vector<int>, vector<int>,int); int largest(vector<int>, int); int smallest(vector<int>, int); int main() { vector<pair<int, int=""> > contest;vector<int>v;vector<int>w; int a1, a2;
} int cal(vector<pair<int, int=""> > contest, vector<int> v, vector<int> w,int a) { int x, y, z;int total,store=100000; for (int i = 0; i <a; i++) { x = contest[i].first;
} int largest(vector<int>w_a, int number) { int a; for (int i = 0; i < (int)w_a.size(); i++) {
} int smallest(vector<int>v_a, int number) { int a; for (int i = 0; i < (int)v_a.size(); i++) { if(number < v_a[i] && i==0){ a=v_a[0]; } if (number <= v_a[i]) { i; a = v_a[i]; break; }
} answered 21 Apr '17, 01:11

i am getting wrong answer for task 2,4,7,8,11,12,13 here is my code
answered 21 Apr '17, 01:14

guys, please upvote me. i am new here. nad not able to ask question answered 21 Apr '17, 03:05

I have solved it in java. I am getting subtask 1 right but getting a runtime error in subtask 2 task 8 , 12 , 13 , 14 , 15 and time limit exceeded in task 9. So my final score is 30/100. Please help My code is answered 20 Oct '17, 01:02
