Not sufficient time for python for LAPD

@mrkerim @vijju123 @admin
I went through 14/28 pages of LAPD submissions in Python 3, and there is not a single solution with score 100. It’s not useful having multiple language options if the solution in some languages will never be accepted. I request you to increase the time limit and re-judge the submissions.

5 Likes

True that, Even I am facing same problem. Admins please look into the matter.

1 Like

Yeah Time limit is too strict. I had to change language to JAVA after i was unable to get AC on C++14

1 Like

yeah agree. my c++14 submission AC with the max exec time 0.91s :v

2 Likes

1 second time limits (vs 2 seconds) annoy me quite a bit - it’s quite often the difference between “My asymptotically optimal solution passes!” vs “My asymptotically optimal solution now needs a ton of tedious/ ugly micro-optimisations”. Micro-optimising can be fun, but my favourite kind of problems are those where a clean & straightforward implementation of an asymptotically-optimal worst case algorithm suffices.

7 Likes

My CPP solution for GDSUB passed in 0.99s

@ssjgz Same with me. i had submitted 2 solution for it of which one got Ac’ed with time 0.32 and otherone TLE’ed. The only change was use of Modulus Operator and Fastscanning of inputs. So it’s better not to do heavy work inside loops which are going to execute many times.

1 Like

I am getting a issue too in c++ 14

I agree with this.
Even I reported it on comments section but they didn’t reply.
I think they don’t wanna increase TL now.
And btw contest will end tomorrow so no point in increasing TL now if it was not increased till today.
I commented 5 days ago.
I am sure many others would also have commented.
I totally agree that TL should be increased but sometimes it’s fun to do micro-optimizations as well.
After all It’s a new experience. We will at least learn something new :slight_smile:
There is surely a good reason for keeping TL tight.

3 Likes

Yes it’s fun, but it should work for all languages too. If it’s just a single TLE, we can guess that it’s a case of micro-optimization. But a whole sub-problem gives TLE, and no successful submission in Python 3 is not good. New coders with correct logic but coding in Python instead of CPP because it’s easier to learn, would think they’re not upto the mark. It’s like judging a fish by its ability to climb a tree.

2 Likes

The issue is not of language,this question has a very strict TL.If you want 100% score you’ll have to care for each and every small thing like if you can reduce no of times of modulo operator. Even if you are taking variable as long which can be taken as int like B ,then using that in loop also increase execution time.You’ll need to optimise each and everything.

Bro, if no one got 100 using Python 3, it’s definitely not possible to optimize more in this problem using Python.

Yaa may be! Coz I just removed all TLE that I was getting in last substask and got Full correct just changing long to int in my code.And I was also shocked that TLE was coming just due to this long and int thing.

This has happened with me many times even though my python solution is most optimal it TLE.I think setters and testers should set customized time limit for C++,Java and Python instead of fixed time multipliers.

Due to this I could not 200 in Lunchtime(COKE2 and DESTCELL) and got 60(rating decrease instead of increase)

@admin @vijju123
when after contest I coded in C++ it passed in less than one third of the time limit

3 Likes

You can try pypy…

1 Like

Why dont you switch to C++ instead of complaing about python.

Summary

https://www.codechef.com/ioi/basics

1 Like

I would not have had problems passing this problem in Python 3. There is a special square root trick to loop over both LOW values (less than B) of A and C independently. A and C can go up to B^2. Otherwise the runtime is O(n^3), even though it looks quadratic.

1 Like

They’ve reduced time for Pypy to 2X java equivalent. Which is still not good enough.

@s5960r Wait what? I felt C++ is almost always faster than Java.

My solution in Python 3 (https://www.codechef.com/viewsolution/26416049). Did your algorithm not pass in Python3 and did pass in some other language?

2 Likes