Mhn_Neek's blog

By Mhn_Neek, history, 30 hours ago, In English

I tried a greedy solution for this problem:
1. If there exist a pair of adjacent vertices like $$$(u,v)$$$ such that $$$deg(u)\geq3$$$ and $$$deg(v)\geq3$$$, then remove the edge between $$$u$$$ and $$$v$$$.
2. Then, if there exist a pair of adjacent vertices like $$$(u,v)$$$ such that $$$deg(u)\geq3$$$ and $$$deg(v)\geq2$$$, then remove the edge between $$$u$$$ and $$$v$$$.
3. Then, if there exist a pair of adjacent vertices like $$$(u,v)$$$ such that $$$deg(u)\geq3$$$ and $$$deg(v)\geq1$$$, then remove the edge between $$$u$$$ and $$$v$$$.
At last, I add edges between the leaves of different components .
Why isn't it correct??

submission

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By Mhn_Neek, history, 6 days ago, In English

Given a graph G s.t. any cycle in G has length 3.
1)Find the maximum number of edges. 2)Find the maximum number of cycles.

Full text and comments »

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

By Mhn_Neek, history, 11 days ago, In English

How to find the number of pairs of integers (x,y) such that gcd(x,y) = 1?
n<=1e6
x<y<=n
time limit = 2s

Full text and comments »

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

By Mhn_Neek, history, 3 weeks ago, In English

Can someone compare atcoder contests and problem levels with codeforces contest and problem levels?

Full text and comments »

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