Блог пользователя tautology

Автор tautology, история, 11 месяцев назад, По-английски

That's true! you've read it correctly.

You might not believe it, but when I started CP back in 2016(from the main account, this is my alt for shitposting), I struggled a lot and currently, I'm struggling again(on this account). However, I had managed to cross 1600 ratings after 1000+ problems and 75+ contests, 3 years later in 2019(on the main account). Then I got a full-time job and left CP completely for 1.5-2 years.
And now I'm here, feel like I'm again at the point from where I've started.

Has the competition got tougher or have I become really that rusty? I'm doing well btw, on AtCoder and LeetCode contests.

Anyone, who has been through a similar journey, kindly share your experience like how you get back in shape after a long break.



Thanks,
tautology



P.S: I'm again into CP even after having a full-time job solely because of pure interest in it. I don't get time to practice much but I make sure to participate in CF/CC/HE/LeetCode and Atcoder contests.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +4
  • Проголосовать: не нравится

Автор tautology, история, 13 месяцев назад, По-английски

Hi all,
I've started doing virtual contests. However, as we know and have experienced this firsthand myself too that not all contests have good problems, some contests have shitty problems. My dilemma is to whether continue VC from a recent missed contest or whether should I pick problems by most solve count and create mashups and do that. For eg. picking up 2 most solved R1200 problems, 2 1400 problems, and 2 R1600 problems and creating a mashup. Do problems with a greater solved count have guaranteed good quality?

Basically, I want to work on my speed for easier problems <= R1500 as well as on my skill/ability to solve R1600+ problems during a live contest and experience the Euphoria!

Please suggest which way to go.

Thanks,
tautology

Полный текст и комментарии »

  • Проголосовать: нравится
  • -3
  • Проголосовать: не нравится

Автор tautology, история, 14 месяцев назад, По-английски

To all the high-rated contestants: What do you think the low-rated user should learn from the struggle of LGMs in recent Atcoder WTF?

Also, congratulations to jiangly for winning the championship!

Полный текст и комментарии »

  • Проголосовать: нравится
  • -25
  • Проголосовать: не нравится

Автор tautology, история, 4 года назад, По-английски

Hello codeforces! Today is chemthan's birthday. Join me to wish him a very happy birthday.


Happy birthday, chemthan.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +9
  • Проголосовать: не нравится

Автор tautology, история, 4 года назад, По-английски

Hi,

I found this solution to tri-tiling problem, but I am not able to prove it.

#include<bits/stdc++.h>
#define int long long
using namespace std;


int ways(int tile)
{
	if (tile < 0) return 0;
	if (tile == 0) return 1;
	if (tile == 2) return 3;
	return ways(tile - 2) * 4 - ways(tile - 4);
}

signed main()
{ 
  int n;
  
  while(true){
  	 cin >> n;
  	 if(n == -1) break;
  	 if(n == 1){
  	 	 cout << 0 << '\n';
  	 	 continue;
  	 }

  	 cout << ways(n) << '\n';
  }
  return 0;
}

Полный текст и комментарии »

  • Проголосовать: нравится
  • -3
  • Проголосовать: не нравится

Автор tautology, история, 4 года назад, По-английски

I was using inbuilt C++ single file build, but then I found it was using C++98. Later then I tried using this build and many others builds which I found on the web. But the issue is something else. Now I'm getting the following win-error :
Screenshot-101

Can anyone please help me out.

Полный текст и комментарии »

  • Проголосовать: нравится
  • -2
  • Проголосовать: не нравится

Автор tautology, история, 5 лет назад, По-английски

Given a unweighted, undirected graph of N vertices and M edges, vertices are numbered from 1 to N. Also there are K special vertices. You have to answer Q queries. In each query, you're given a vertex V. You have to print shortest distance of nearest special vertex. If there is no special vertex reachable from V, print -1.
Note : Graph doesn't contain multiple edges or self loops and it may be disconnected.
Constraints :
1 <= N, K, Q <= 1e5
1 <= M <= 2e6
Sample Input:
5 3 3 // N M K
1 2 // edge 1
2 3 // edge 2
1 3 // edge 3
1 3 5 // special vertices
5 // Q
1 // V for 1st query
2 // " " " 2nd " "
3 // " " " 3rd " "
4 // " " " 4th " "
5 // " " " 5th " "

Sample Output:
0
1
0
-1
0

P.S. : This problem was asked in Codechef's CCDSAP advanced contest on 22th Sept.,2019. Now it's over.

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

Автор tautology, история, 7 лет назад, По-английски

Given array of n non-negative integers and a positive integer k. Is is possible to count all pairs with bitwise-OR equals to k?. Time complexity should be better than O(n^2). More formally , count no. of distinct pairs (ai,aj) such that ai|aj==k.[Note: pairs (ai,aj) and (aj,ai) are same.] If this is possible in T(n)<O(n^2),then how? Constraints: 1<=n<=1000000, 0<=ai<=10000.

Полный текст и комментарии »

  • Проголосовать: нравится
  • -29
  • Проголосовать: не нравится