Trave1ler's blog

By Trave1ler, history, 10 months ago, In English

I once used bool, I once used int.
But memory cried and time took a hint.
Then from the depths of header files,
Came bitset, clad in leaner styles.

A thousand bits — all packed in tight,
Just one line, and it runs like light.
With .set(), .reset(), .flip() so quick,
You tilt the board and grab that trick.

Forget your map, your vector<bool>,
This knight holds power, heart, and soul.
No extra space, no looping pain —
It shifts and slices in constant gain.

You dream of masks, of states compressed,
Of subset sums that must be guessed —
In scoreboard’s glow, beneath the stress,
bitset brings your code finesse.

It sorts your dreams, your DP grids,
It dances through those primal ids.
It’s just one word, so short, so small —
Yet mighty in the problem hall.

Still rookies scoff and walk on by,
"Too weird," they shrug, and never try.
But those who’ve flipped that final bit,
Know where true coding legends sit.

So here’s to you, O silent king,
Who makes our code so sharply sing.
From 0 to 1, then back again —
bitset, you're worth a thousand when.

TL;DR:
Normal people use bool.
Legends use bitset.
Less memory. Faster ops. Cleaner code.
You haven’t truly coded
until you’ve .flip()ped your bits...
and passed that last test.

  • Vote: I like it
  • +151
  • Vote: I do not like it

»
10 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by Trave1ler (previous revision, new revision, compare).

»
10 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Your blogs are much better than WIERD_PROGRAMMER's blogs!

  • »
    »
    10 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    You are just a person who is not even able to do something on your own, and if someone is doing it, then you create alt accounts using their father's name. You don't even know that it showcases how your parents trained you, and your blogs suggest that your parents are very shameless, and that you disrespect others' parents. You and your parents all are bludy Shameless!

»
10 months ago, hide # |
Rev. 2  
Vote: I like it 0 Vote: I do not like it

»
10 months ago, hide # |
 
Vote: I like it -6 Vote: I do not like it

ooo eee eee aaaa eeee oooo eeee eeee eeee aaaaa eeeeeeeee

»
10 months ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

nice, can you make one on dp?

  • »
    »
    10 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    Still waiting! I know brilliant minds are quite busy, so it might take a while!

    • »
      »
      »
      10 months ago, hide # ^ |
       
      Vote: I like it 0 Vote: I do not like it

      I read your comment, the next poem on dp is in progress. It will take some tuning so you all will have to wait another day or two for that.

»
10 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Jay Mataji!

»
10 months ago, hide # |
 
Vote: I like it +27 Vote: I do not like it

true

»
10 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

smhsmhsmh unoriginality...

»
10 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

inspired/credits: Ode to the mets (song by "The Strokes")

  • »
    »
    10 months ago, hide # ^ |
    Rev. 2  
    Vote: I like it 0 Vote: I do not like it

    kela Khao kela Khao kela Khao Khao khao, Haseeb ban jao, aur kela Khao! kela Khao Khao Khao Khao Khao Khao!

»
10 months ago, hide # |
Rev. 2  
Vote: I like it 0 Vote: I do not like it

No

»
10 months ago, hide # |
Rev. 2  
Vote: I like it 0 Vote: I do not like it

I also know that this is alt account of »»»

VSS111 just commenting on his own comments

»
10 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Hi there, Trave1ler!

»
10 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Finally someone who truly understands me...

»
9 months ago, hide # |
 
Vote: I like it +26 Vote: I do not like it

我常常追忆过去。

生命瞬间定格在脑海。我将背后的时间裁剪、折叠、蜷曲,揉捻成天上朵朵白云。

云朵之间亦有分别:积云厚重,而卷云飘渺。生命里震撼的场景掠过我的思绪便一生无法忘怀,而更为普通平常的记忆在时间的冲刷下只留下些许残骸。追忆宛如入梦,太过清楚则无法愉悦自己的幻想,过分模糊却又坠入虚无。只有薄雾间的山水,面纱下的女子,那恰到好处的朦胧,才能满足我对美的苛求。

追忆总在不经意间将我裹进泛黄的纸页里。分别又重聚的朋友,推倒又重建的街道,种种线索协助着我从一个具体的时刻出发沿时间的河逆流而上。曾经的日子无法重来,我只不过是一个过客。但我仍然渴望在每一次追忆之旅中留下闲暇时间,在一个场景前驻足,在岁月的朦胧里瞭望过去的自己,感受尽可能多的甜蜜。美好的时光曾流过我的身体,我便心满意足。

过去已经凝固,我带着回忆向前,只是时常疏于保管,回忆也在改变着各自的形态。这给我的追忆旅程带来些许挑战。

我该在哪里停留?我问我自己。

  • »
    »
    9 months ago, hide # ^ |
     
    Vote: I like it +14 Vote: I do not like it

    你的诗真的很美,情感真挚感人。我读完它们后,心里感到很温暖。谢谢你的分享!

»
9 months ago, hide # |
Rev. 2  
Vote: I like it 0 Vote: I do not like it

We should make an album on Spotify titled "CP" and make a song for things like this : )

»
9 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

»
9 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

bro awesome lol