I participated in hash code for the first time and the problem i encountered was that none of the online IDEs were able to handle the large data sets and give an ouput which i could further use as an output file for hash code.
Offline. on your local machine. Install linux subsystem or get familiar with powershell and install gcc on windows and use ‘<’ to give input to the executable
@priyansh19077 that is very impressive. How did you take such a huge input dataset in your program? In python i use a list input method like:
‘’‘books refer as b
libraies define as L
and days define as d’’’
b, L, d = map(int, input().split()) #The next line refer to the scoring(given name of book)
nameofBooks = map(int, input().split())
bn, dn, ls = map(int, input().split())
booklistforL1 = map(int, input().split())
it1 = itertools.islice(t1, b)
bn1, dn1, ls1 = map(int, input())
booklistforL2 = map(int, input().split())
And then i copy the input from dataset and paste it in my program. But it didn’t work properly. My python IDE was stopped working some time later.
What I did was that I made class of library and took input in it only for each library. Also, I want to mention that first I tried to do everything in C++ but couldn’t complete it. I guess choosing python for this problem was important. I took the input in the same manner just like you did, except I did not use itertools for the input.
after #include filestream
freopen("filename.txt,“r”,stdin)
for ouput replace r with w
and stdin with stdout
just comment freopen line when submitting
use normal input method
and file should be same place as project
also google #ifndef ONLINE JUDGE
I got 25,578,177 points in hash code extended round by using greedy approach to solve the problem and optimizing afterwards. I did not participate in qualification round because it was late at night. By the way, it was my first time and It was just an amazing feeling to get those much points.