Just Like This(Language:BrainFuck)
+++++[>++[>+>+ ++>++++>++++>++++>++++++
>++++++>+++++++ ++>+++++++++<<<<<<<<<-]>>
>+>+>+> >>>+[<]< -]>> >++>-->>+>>++>+
>--<<<< <<<..... .> ....<......
...>... <<.>.... >.>>>>>.<.
<<<<.. ..<.... >..>>>>>.<
.<<<<. >>>.<<. >>>>>.<.<
<<<<< <.>...> >>>.>>>.
<<<.< <<<..>> .>>>>>.<
<.<<< <<...>> >>>.<<<
<..<. ...>... <<.>..>.
>>.<.<<...>>...<<...>>...< <....>>..
.<<<.>.>>..>.<<.......<.... .....>...
<<.>... .....>...
<...... .>>>.<<..
<<.>... .....>...<......>.>>.<.<<<
.>...... ..>>...<<....>>.....>.<..>.
XD
https://www.a1k0n.net/2011/07/20/donut-math.html
could any one help me with some LIS(dp) pair vector problem , the statement we got array a of {wieghts, IQ} of elephants, we want max subset of the seq (**print seq** too) that validate w(a[i]) < w[a[i+1]) and IQ(a[i]) > IQ(a[i+1]). could any one solve it in O(n log(n))n any idea ?
Hint ($$$O(n \log^2n)$$$ though)
UPD: why downvotes?
because the question is irrelevant to the blog?
I meant downvotes to my answer. Btw yes, it's a good point, maybe I should have answered somewhere else.
I was always amused by interesting cycles, for example :
for(int i=0;i<n;i-=-1)
Sorry, I didn't see a little about what code we are talking about :)
You can also implement loops with the
downto
operator-->
Hey wait a minute. That's not an operator, that's just
--
and>
Haha yeah. For kids:
for(int i = n; (i--) > 0;)
Recently I looked at python co-routines, which give a really strange way to approach problems. See https://gist.github.com/ramalho/da5590bc38c973408839 for conways game of life. Somehow, we have a function step_cell which is accessing state used in a sibling function live_a_generation, but neither method is calling another and there are no global variables. Instead, it kind of looks like two methods are running in parallel (although they aren't).
If that gist is too long for you, I also implemented 2 pointers in this same weird style and it's only about 20 lines https://codeforces.net/contest/1133/submission/131576712
2 + 3 — 1 .
Reverse Indexing is interesting in cpp! I discovered this a few months ago. I love this concept.
For C-style arrays, array indexing is equivalent to pointer arithmetic, i.e.
a[i] == *(a+i)
, so the mystery is solved there.Now i really regret my decision! I shouldn't have opened it.
Really man , what is this !! truly strange
Nice zig-zag pattern in this code made using only swap XD. CODE. Most weird code for me.
Auto comment: topic has been updated by JurCai (previous revision, new revision, compare).
have you written the blog to ask a real question or to show an unrelated anime picture?
https://www.youtube.com/watch?v=p8u_k2LIZyo
This one
this
(If you don't know about Chinese, just click the links.