beyondpluto's blog

By beyondpluto, 5 days ago, In English

Rating-Based Heatmap: Visualize Real Progress!

Download from Chrome Web Store

Are you tired of the default Codeforces heatmap that merely tracks the number of problems solved without reflecting the actual effort behind each? Wouldn't it be great to see how much hard work you invested each day? Introducing the Codeforces Rating-Based Heatmap Extension — a clearer way to reflect your real progress!


Why Settle for Less?

The default Codeforces heatmap colors days based solely on the quantity of problems solved. It doesn't differentiate between solving easy Div3 problems or tackling complex Div1 challenges. This approach doesn't truly represent the difficulty you faced.

Additionally, some users may focus on solving easy problems just to maintain a streak. While streaks can be motivating, they don't always reflect real progress in problem-solving. True progress isn't just about maintaining streaks or solving easy problems. It's about stepping out of your comfort zone, facing challenges, and pushing your limits. Every tough problem you tackle brings you closer to becoming a stronger problem solver. With the Rating-Based Heatmap, this changes.

Note: The Rating-Based Heatmap will be added directly to your Codeforces profile page at codeforces.com/profile/YourUsername. Just visit your profile to see your progress visualized with a heatmap!


What Makes the Rating-Based Heatmap Special?

  • Rating-Based Visualization: Each day is highlighted based on the difficulty of hardest problems solved, not just the count. Higher-rated problems result in richer, deeper colors.

  • Effort Recognition: Clearly see the amount of effort you put into your practice sessions.

  • Hover for Details: Want to know what you solved on a particular day? Simply hover over any cell to view the exact problems and their ratings. This makes it incredibly easy to spot the days when you tackled the hardest problems.

  • Stalk Your Friends' Progress Curious about how your friends are training? Check their Rating-Based Heatmap to understand the dedication behind their progress.


Color Mapping

The heatmap colors are based on the highest-rated problem solved on a given day. Here’s the rating-to-color mapping:

Problem Rating Range Color
3000+ Dark Red
2600-2999 Bright Red
2400-2599 Light Red
2300-2399 Orange
2100-2299 Light Orange
1900-2099 Purple
1600-1899 Light Blue
1400-1599 Aqua Green
1200-1399 Green
0-1199 Gray

Features at a Glance

  • Accurate Rating Heatmap: The heatmap color on a given day represents the maximum rating of a problem solved that day.

  • Quick Insights: Hovering over any day in the heatmap shows a tooltip with all problems solved on that day.

  • The tooltip includes:
    • Problem Name
    • Problem Rating
    • Direct Link to the Problem
  • Enhanced Motivation: Visualize your streaks and get a true sense of accomplishment.


Screenshots

Default Codeforces Heatmap

Rating-Based Heatmap

Rating-Based Heatmap with Hover Details


How to Get Started

  1. Install the Codeforces Rating-Based Heatmap Extension from the Chrome Web Store.

  2. Explore the code on GitHub.

  3. Visit your Codeforces profile.

  4. Watch your true efforts shine through the Rating-Based Heatmap!


Be Among the First to Try It

The Codeforces Rating-Based Heatmap Extension is now live, ready for you to experience a clearer view of your progress. Start using it today and see how your hard work translates into visible results.

True effort deserves true recognition. Experience it with the Codeforces Rating-Based Heatmap Extension!


Full text and comments »

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

By beyondpluto, history, 2 years ago, In English

std::map sorts based on key. But what if we want the comparison to be based on value instead!
May be many people encountered this problem many times, and solved it using set< pair > and map< int >
So do I!

I have implemented a simple structure using above logic, so that one can fastly(in terms of typing) use it as template for such problem.

//Same complexity as map, with some constant factor
//sort based on value, and access based on key
template<typename T,typename U>
struct vmp { //value based map
	set<pair<U, T>> vk; // {val,key}
	map<T, U> kv; //{key,val}
	vmp(){}

	void update(T key, U newval) {
		U oldval = kv[key];
		auto pos = vk.find({oldval, key});
		if (pos != vk.end()) {
			vk.erase(pos);
		}
		vk.insert({newval, key});
		kv[key] = newval;
	}
	U val(T key) {
		return kv[key];
	}
	pair<T, U> first() {
		pair<U, T> p = *vk.begin();
		return {p.second, p.first};
	}
	void pop() {
		if (!vk.empty()) {
			vk.erase(vk.begin());
		}
	}
};
/* Extras:
* if need lower bound value, do it on vk
* if need index based acess, use ordered_pii for vk
*/



int32_t main() {

	vmp<int,int> m;
	m.update(3, 4); m.update(5, 2); m.update(6, -3);	
	// m.first() = {6,-3} //{key,val} with lowest val (if multiple same val, then based on key)
	m.pop();	
	// m.vk = {{2,5},{4,3}}

	return 0;
}

PS: I m curious to know If there any better approach than using set and map

Full text and comments »

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

By beyondpluto, history, 3 years ago, In English

B. Binary-tree-array:

Tutorial
code
alternative
code

C. Edge-vs-node-mapping:

Tutorial
code
alternative
code

D. MAX-MIN:

Tutorial
code
alternative
code

Full text and comments »

  • Vote: I like it
  • -9
  • Vote: I do not like it