PLEASE NOTE-
ANY QUESTION RELATED TO ON-GOING CONTEST WILL BE STRICTLY DELETED.
PLEASE NOTE-
ANY QUESTION RELATED TO ON-GOING CONTEST WILL BE STRICTLY DELETED.
Please note- Inactive questions etc. will be removed after 24 hours of inactivity. Users are requested to tell if their query is answered or if there is still need to convert comment to Q .It will help us in managing this thread.
Why canât I submit my code for May Long Challenge? Up-solving the problems that you were not able to solve in a contest is a must. But the submission link is removed.
Also, I want to ask about the editorials of the long contests. The May Long questions are still not provided with editorials.
The last one : Is there a way by which I can view the test cases after the contest ends?
The problems are moved to practice section. To easily get to the practice version of problem-
1)Click on weblink 2)remove the part â/MAY17â 3) HIT enter.
Regarding editorials, forum users cannot comment anything. Try mailing codechef about it, or try to ask the question as doubt here, we will surely help!
No, there is no way of viewing the test cases.
That helped. So, there wonât be any editorials?
DependsâŚonly @admin can provide any information on it, and its advised to mail them for this. However, i case you need an editorial urgently, one of the discuss members would love to write one. Just ask once
Can anyone tell me why this code is not functioning properly?Can we accept and display a string like this?
main()
{
string a;char ch;
for(int i=0;i<5;i++)
{
cin>>ch;
a[i]=ch;
}
cout<<a;
}
Please give the link to question also. I will then convert it to a question.
if a is a string, dont use a[i] = ch. Use a= a+ch; This will have the desired effect.
Is using insertion sort in SNAKEEAT problem causing TLE?
Sir,thank you for replying,but why should we not use it like that?
Insertion sort is O(N^2) in worst case and can cause TLE depending on input.
Well. I feel it can cause run time error due to âout of indexâ thing. We used this method in C, but there C was an array of char (length pre defined).
Here, we dont know length if string but we are making changes at i th index. Remember that string also gives out of index error just like array (eg - if arr[n+5] gives runtime error, then so will s[n+5]. Faced these issues during contests.
Treating it similar to array, i think you will get an error. But s=s+ch is different. It says âwhatever be s, add ch to its endâ , so theres no scope of going out of index here.
ok thanks.
You have 3 karma now, you can ask your own individual question. (Meaning you dont need to depend on this thread anymore)
Hi everyone,
can anyone tell me why am I getting WA with this
[1] the problem [CHEFSQ][2] ?
I've tried different test cases and they all seem to give me the correct answer...
Thanks !
[1]: https://pastebin.com/ULLi2wzA
[2]: https://www.codechef.com/problems/CHEFSQ
Answer to sysm: The sub sequence doesnât have to be continuous, but the order of elements should be maintained.
Input
1
5
1 2 3 4 5
3
1 3 5
Your Output:
No
Correct Output:
Yes
my C
[1]
[1]: https://www.codechef.com/viewsolution/9684982
Haaaaaa. Thanks for your answer !
thank you very much sir,i will change it.