Temporarily, Codeforces is operating in a limited mode due to technical reasons (historical data is unavailable). This will be fixed in the next few hours. ×

Breaker-iwnL-'s blog

By Breaker-iwnL-, history, 11 months ago, In English

After every contests (div2, div1), everyone rants about cheating (yesterday including me), these comments get burried deep under the announcement posts.

Some of these are so obvious, these people dont even bother to erase the comments chatgpt writes.

I have an idea, after every div2, div3 contest, we can make a blog specifically to note down the suspects.MikeMirzayanov can choose a group of trusted people who are ready to volunteer and ask them to review the submissions. All they have to do is take a look at these peoples contest's submissions. Maybe the group of users can be the contests makers.

In the beginning it might be all chaos since there will be a lot of cheaters detected since all the old cheaters havent been banned yet but i truly believe that after 5-10 rounds, the count will decrease.

Yesterdays cheaters :

Manasvi jgiitkgp Pew_Pew. 2mato_pota2 sumit876 baapji123_ This guy even asked chatgpt to make it undetectedable, look at chatgpts comments xD

Whats sad is that the rounds author omsincoconut even congratulated Manasvi for coming top 5 showing how broken the system is right now

Its sad that some of these people reached candidates master, hope this blog wont be ignored as i wrote this to make the platform better. I believe this can be an effective step 1 to banish the AI users.

Full text and comments »

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

By Breaker-iwnL-, history, 11 months ago, In English

Hey guys, I am back to competitive programming after a long time, I have to ask for help as things are totally different now. Back then I was in university and I could dedicate 3-4 hours a day and solve multiple problems. Now that I have a job, its difficult to give so many hours to CP. I know this might sound like another "how to increase rating" post but I have many restrictions in terms of time I can dedicate per day. I have the following questions, I would appreciate if someone can help.

1) Assuming I can only solve 1 practice problem per day (and give about 1 hour for that) how can I choose the problem ? Right now i am solving 1250+200 ~1500 rated problems (1 per day)

2) Things are really busy right now so I am only giving atcoder contests (as they happen on saturday) and I upsolve one question which I couldnt solve during contest time. Soon as things cool down in workplace, I am planning to give one CF contest per week.

3) I want to maximise patterns so I can cover patters required to reach current_rating + 200, where can i find resources as per my current level?

4) People with Job, how do you guys manage your time?

Any extra tips will be appreciated,

Extra Rant : I have a well paying job but ever since I entered the corporate world, my love for coding kept dying. 2 Weeks ago when i gave my first atcoder beginner contest after a long time (I did horrible- only solved 3 ques), I found that spark again and realised how much i used to love this. 3-4 years ago I had dreams of becoming candidate master and master and I am back to reclaim it. I am ready to put as much efforts as time grants, even extra on weekends.

Full text and comments »

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

By Breaker-iwnL-, history, 11 months ago, In English

For those who were struggling to understand D's solution (had an idea but couldnt convert it properly), i am writing this blog because it took me 2 hours to internalise it properly. I hope this helps someone and in case someone has a better intuition then please comment it.

Observation 1) Think of the nest numbers as labels, and think of where these nests are placed as indices. Initially index 1 has nest 1, index 2 has nest 2 and so on.....

Observation 2) When we are swapping birds of two nests A and B, we can look it at as : instead of swapping the birds, in nest A and B, we can swap the label of the nests itself.

We notice that once a bird has been placed on an index, we never really need to move the bird and only need to play with the labels.

Considering observation 2, since we are never going to move our birds, let us store the index at which we place the bird instead of label itself. For this we will need

1) birdToIndex[a] = x : denotes bird a is placed at INDEX x

2) indexToLabel[a] = x : denotes the nest label at index a is x (we need this because we later need to convert our index to label)

3) labelToIndex[a] = x : denotes that nest A is at index x, we need this because when we are told to place the bird at label a, we need to find the index associated with it.

So now it becomes straightforward :

If operation = 1 Then: bird[a] = labelToIndex[b] (stores index value of bird a)

If operation = 2 Then: we need to swap indices of nest a and b, as well as the labels of these indices need to be swapped

If operation = 3 Then : we need to out put indexToLabel[bird[a]]

Code :

#include<bits/stdc++.h>
 
using namespace std;
typedef long long ll;

int n, q;
std::vector<int> nestToIdx, lblToIdx, idxToLbl;
void solve(){
	cin >> n >> q;
	nestToIdx.resize(n+1);
	lblToIdx.resize(n+1);
	idxToLbl.resize(n+1);
	for(int i = 1; i <= n; i++){
		lblToIdx[i] = i;
		idxToLbl[i] = i;
		nestToIdx[i] = i;
	}
	for(int i = 0; i < q; i++){
		int type, a, b;
		cin >> type;
		if(type == 1){
			cin >> a >> b;
			nestToIdx[a] = b;
		}
		else if(type == 2){
			cin >> a >> b;
			int lb1 = a;
			int lb2 = b;
			int idx1 = lblToIdx[lb1];
			int idx2 = lblToIdx[lb2];
			idxToLbl[idx1] = b;
			idxToLbl[idx2] = a;
			swap(lblToIdx[lb1], lblToIdx[lb2]);
		}
		else{
			cin >> a;
			cout<< idxToLbl[nestToIdx[a]] << "\n";
		}
	}
}
 
int main(){
	int t = 1;
	//cin >> t;
	
	while(t--){
		solve();
	}
 
	return 0;
}

Full text and comments »

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