RE_Prince's blog

By RE_Prince, history, 2 months ago, In English

Just curious, I like binary search best :)

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

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

I don't know any

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

    Same, but am learning a few basic algorithm as need to in GCSE computing.

»
2 months ago, # |
  Vote: I like it +8 Vote: I do not like it

Sqrt decomposition

»
2 months ago, # |
  Vote: I like it +6 Vote: I do not like it

Data Structures(especially segment tree)

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

My favourite algorithm is SPFA (or FFT)

»
2 months ago, # |
  Vote: I like it +21 Vote: I do not like it

As a saying goes, "Stop learning useless algorithms, go and learn using binary search."

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

Even after a lot of practice I can say Binary search is something that still is quite difficult for me. My entire intuition for bs is if I can't solve it using greedy, dp or precomputation then it surely is bs.

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

Segment Tree

»
2 months ago, # |
Rev. 2   Vote: I like it +4 Vote: I do not like it

Simulation "algorithm". Especially in the CNOI competition system, a big simulation problem is really fun.

It doesn't require brain to think, but it does require too much time to debug. Today I just spend the first 3 hours in a 4-hour contest and get the 100 AC for this problem. (And used the rest hour to get the other 300pts) I feel like I was almost getting WA because the sample datas (just like pretests in CF, we can't get feedback of submissions in CNOI) were much too weak.

Honestly, simulating algorithms is a time-consuming and thankless approach. Once you make a small mistake in hundreds of lines of code but fail to find it, or even didn't plan to find any because you have passed the sample, then you are all done.

But why, you can't say that you can't solve it because you haven't learned enough, the hardest part in my 400-line code is calculate LCA in O(logn). Exciting and annoying, but I just like it best.

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

    I also like implementation and simulation :) I really enjoy the debugging process

»
2 months ago, # |
Rev. 2   Vote: I like it +13 Vote: I do not like it

DINIC Network Flow of course!!!!

»
2 months ago, # |
  Vote: I like it +8 Vote: I do not like it

DP or Tarjan :)

»
2 months ago, # |
  Vote: I like it +2 Vote: I do not like it

MO algorithm

»
2 months ago, # |
  Vote: I like it +1 Vote: I do not like it

DP and sqrt decomposition

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

SortedList

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

Network flow. Problems needs skill, and the proof of correctness of Ford-Fulkerson method and complexity of Highest Label Preflow Push are ingenious. Also like string-related automatons.

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

Binary search

»
2 months ago, # |
  Vote: I like it +1 Vote: I do not like it

binary search.

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

BST, especially Balanced Tree.

In CNOI system, the most common Balanced Tree is FHQ Treap ( a special implementation of Treap which is easy to understand and debug ) , and Splay is seen often, too. But I enjoy the moment that my Weight Balanced Leafy Tree gets better speed than other's Treap or Splay.

There's many kinds of Balanced Tree and each of them has their own peculiarity. Some is easy to write, and others are the basis of other algorithms, such as Splay for Link-Cut Tree, and it's fun to learn all of them.

But could data structures be called "algorithm"? Actually I ofter tell them apart. I choose a ds just because I saw someone do that in the comments section.

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

KMP SEARCH

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

kruskal MST

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

Only algo I know is Sieve

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

i only love data structure!

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

kadane's algorithm for sure!!

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

Hashing Algorithm <3

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

Binary Search

»
2 months ago, # |
  Vote: I like it +1 Vote: I do not like it

Algorithm that I make while solving 1000 rated problems:

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

vjudje algorithms

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

does dfs count?

»
2 months ago, # |
  Vote: I like it +4 Vote: I do not like it

I think FFT is a beautiful algorithm, but unfortunately I've never been good enough to actually use it to solve anything :)

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

Kruskal Reconstruction Tree and Treap

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

ternary search

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

Probably greedy algorithm or binary search

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

DSU dinic mcmf

»
2 months ago, # |
  Vote: I like it +5 Vote: I do not like it

bogosort

spoiler
»
2 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Fandalma's algorithm

»
2 months ago, # |
  Vote: I like it +1 Vote: I do not like it

For Loop

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

Not really an algorithm, but Sprague-Grundy is pretty beautiful :)

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

Lee(aka bfs on grid)

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

Ad Hoc

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

Z — algo

»
2 months ago, # |
  Vote: I like it +5 Vote: I do not like it

Iterative Segment tree — It is short to implement and you can cheese a lot of stuff with it since it is pretty light

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

Thx for everyone's comments! I've never even heard of some of them

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

If statement

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

I'm a boruvka enjoyer. It clears prim and kruskal

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

hashing !

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

Honestly, Programming is the best algorithm that everyone uses. You can't tell me that you don't know this algorithm. And to solve every problem, you need this insanely hard algorithm.

Edit: this is my second favourite algo:

i++;

(surely this is the hardest algo ever)

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

Sieve of Eratosthenes

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

Surprised no one has mentioned Fenwick/binary indexed tree yet :)

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

dp or data structures.

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

binary search an dp <3 !

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

link-cut tree! the implementation is so elegant!

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

Haha It must be Dijkstra.Few years ago I spent a whole afternoon learning it(also how to store a graph with linked list) with my friends.I enjoy and miss that time.

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

of course, florrfloor sum.

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

Dunno why guys, but I love using CBT on problems.

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

SATT AAAT and ETT

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

simulated annealing and binary search

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

binary search and sieve I like both of them

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

parallel binary search, FFT, sqrt decomposition, centroid decomposition and math-related dp probably

»
7 weeks ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Data structures [Segment Tree — sparse table] & Graphs and Trees & Binary Search and Prefix arrays

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

KMP

»
7 weeks ago, # |
  Vote: I like it +19 Vote: I do not like it

PST on HLD with FFT implemented by NTT with CRT to maintain CHT calculating MCF for MCC with SCC on MST using BIT to store LCT and D&C on KMP on FPS to optimize SAM for BCC evaluating PIE why is there CHT twice based on ODT with GHT maintaining KDT to calculate MVC, MBM, and MIS on LIS-SOS induced graph with ETT and CZT on each node with SEC on each hyperplane to do ILP on a SBT with CPP instances using PHP optimized by PBS using HMT, with LCP on WMI as universe done with MPM to maintain AAT with OST on RSA numbers for WBG-EGT counting on TCC of resulting TCP for RBT with IST on each node to do EST for DLX with PET pruning

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

dsu and z function cuz thats all i know