Clearing an array of defined element(s) - page 27

 
Konstantin Nikitin:

P.S. That's not good, though. It's up to the developers. Maybe there should be a checkbox for public "Allow all to read/write"

And anyone will come in and clean up all the code? Or am I pulling the strings?

 
Andrey Khatimlianskii:

Or am I making this up as I go along?

No. That's what they invented pool requesters for.

 
So who officially won the competition?
 
nicholi shen:

Friendship won. That is the most important thing.

 
nicholi shen:
It's not so much the competition. It's more about the implementation itself. And someone learned something new for themselves.
 

From a practical summary: no "optimizer" can replace a programmer, that's one;-)

and the situation with post-increment is not clear at all, when arr[i++] is slower than arr[i];i++ is two

but well done all of you !

ps/ how to say it so that *.translate does not give out nonsense :-)

 

The problem with an array of deleted values proved to be more interesting. There is still a lot of room for creativity here.
I have come up with the following option.

2018.11.19 18:41:35.006 ArrayDeleteValue20 (.BrentCrud,D1)      === Тест с сохранением порядка массива ===
2018.11.19 18:41:35.006 ArrayDeleteValue20 (.BrentCrud,D1)      
2018.11.19 18:41:36.521 ArrayDeleteValue20 (.BrentCrud,D1)      вариант Pastushak   : Контрольная сумма = 75172.230771;элементов - 999851; время выполнения - 150472 микросекунд
2018.11.19 18:41:36.525 ArrayDeleteValue20 (.BrentCrud,D1)      вариант fan9        : Контрольная сумма = 75172.230771;элементов - 999851; время выполнения -   1466 микросекунд
2018.11.19 18:41:36.536 ArrayDeleteValue20 (.BrentCrud,D1)      вариант Peter       : Контрольная сумма = 75172.230771;элементов - 999851; время выполнения -   8179 микросекунд
2018.11.19 18:41:36.544 ArrayDeleteValue20 (.BrentCrud,D1)      вариант Vladimir    : Контрольная сумма = 75172.230771;элементов - 999851; время выполнения -   4930 микросекунд
2018.11.19 18:41:36.549 ArrayDeleteValue20 (.BrentCrud,D1)      вариант Nikitin     : Контрольная сумма = 75172.230771;элементов - 999851; время выполнения -   2372 микросекунд
2018.11.19 18:41:36.553 ArrayDeleteValue20 (.BrentCrud,D1)      вариант Semko       : Контрольная сумма = 75172.230771;элементов - 999851; время выполнения -    910 микросекунд
2018.11.19 18:41:36.558 ArrayDeleteValue20 (.BrentCrud,D1)      вариант Fedoseev    : Контрольная сумма = 75172.230771;элементов - 999851; время выполнения -   2207 микросекунд
2018.11.19 18:41:36.564 ArrayDeleteValue20 (.BrentCrud,D1)      вариант Korotky     : Контрольная сумма = 75172.230771;элементов - 999851; время выполнения -   2693 микросекунд
2018.11.19 18:41:36.566 ArrayDeleteValue20 (.BrentCrud,D1)      
2018.11.19 18:41:36.566 ArrayDeleteValue20 (.BrentCrud,D1)      === Порядок в массиве не сохраняется ===
2018.11.19 18:41:36.569 ArrayDeleteValue20 (.BrentCrud,D1)      вариант Kuznetsov3  : Контрольная сумма = 75174.651051; элементов - 999851; время выполнения -    807 микросекунд
2018.11.19 18:41:36.573 ArrayDeleteValue20 (.BrentCrud,D1)      вариант fan9        : Контрольная сумма = 75174.651051; элементов - 999851; время выполнения -   1994 микросекунд
2018.11.19 18:41:36.573 ArrayDeleteValue20 (.BrentCrud,D1)      
2018.11.19 18:41:36.573 ArrayDeleteValue20 (.BrentCrud,D1)      === Тест с 3-мя параметрами. Возвращает копию массива ===
2018.11.19 18:41:36.580 ArrayDeleteValue20 (.BrentCrud,D1)      вариант Kuznetsov   : Контрольная сумма = 75172.230771; элементов - 999851; время выполнения -   5092 микросекунд
2018.11.19 18:41:36.580 ArrayDeleteValue20 (.BrentCrud,D1)      
2018.11.19 18:41:36.580 ArrayDeleteValue20 (.BrentCrud,D1)      === Тест с фильтрующим вектором. ===
2018.11.19 18:41:36.662 ArrayDeleteValue20 (.BrentCrud,D1)      вариант nicholi shen: Контрольная сумма = 74055.990952; элементов - 902441; время выполнения -  80140 микросекунд
2018.11.19 18:41:37.037 ArrayDeleteValue20 (.BrentCrud,D1)      вариант Nikitin     : Контрольная сумма = 74055.990952; элементов - 902441; время выполнения - 372807 микросекунд
2018.11.19 18:41:37.103 ArrayDeleteValue20 (.BrentCrud,D1)      вариант fan9        : Контрольная сумма = 74055.990952; элементов - 902441; время выполнения -  63750 микросекунд
2018.11.19 18:41:37.131 ArrayDeleteValue20 (.BrentCrud,D1)      вариант Semko       : Контрольная сумма = 74055.990952; элементов - 902441; время выполнения -  25854 микросекунд
Files:
 
Nikolai Semko:

The problem with an array of deleted values proved to be more interesting. There is still much room for creativity.
The following variant came to mind.



Did it not occur to you to check the correctness of the result of each rally participant?

 
Алексей Тарабанов:

Did it not occur to you to check the correctness of the result of each rally participant?

What exactly is the problem?
 
nicholi shen:

I don't know how to answer you in Chinese.

Reason: