Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
if
words
is an""
, then*(tmp++) = *words; *tmp = 0;
this will set 2 zeros.If each individual test gave the minimum required amount of memory for
letters
, then this solution, on emptywords
, would have exited and written out of memory limits forletters
.gcc -m32 ? (solution not suitable for 32 bit architectures?)
Maybe the '1' should be extended to 'uint64_t' instead of 'long'?
Functions "findIndex" and "rotate" are non-standard and also not available in the viewable code. So how can everyone come to this solution?
I tried to avoid memory allocation. And also build the array of primes only once for all tests.
Having looked at other people's solutions, I realized that you could think about replacing
prime_numbers[i] <= n_div_2
by
prime_numbers[i] <= n_sqrt
and then change the logic of the calculation (I admit, this part of the solution I did not work out very well).
And also it is worth finding a threshold for the input number, above which my solution will contain fewer steps. Otherwise, use a simple solution.
It was interesting for me to decide correctly (as far as I understand it), although it seems to me that it is a little higher than 7kyu.
Hopefully someone can benefit from this.
Good luck to everyone reading this!
@hobovsky - Thank you. (you can explain, I appreciate it.)
I take everything personally, too close to my heart. I am often told about this. ("This cruel world") Sorry.
Or do you need a different genre of response? Continuation? Action?
Okay, I fantasize and write:
Ok, he's my enemy.
I understand that the way to
1kyu
inC
is difficult, especially if you achieve everything yourself. There will be many obstacles in my way. But -"No King Rules Forever"
.dinglemouse
-This user's profile is not available
Blocked me? Ok.
"Run, mouse, run!" - Horacek Petr
.I will turn your evil into my motivation to be better.
Have a nice day to everyone who read this! =)
Yes, I understand this.
(You offend me.)
Have a nice day for me! =)
I know this, but I have no way to fix it.
Yes, a mistake.
I have already fixed this in the next submit.
Obviously so -
unsigned char arr['{'];
If you need to explain something in detail for you, write to me in a personal.