comingsoon.cpp's blog

By comingsoon.cpp, 8 days ago, In English

I think nobody should be allowed to register on codeforces with email accounts that aren't from Gmail, Hotmail, or Yahoo mail. What's the point when you ban someone for cheating when they could just get a disposable email, create another alt account and continue cheating? As far as i know, you'd need a sh*t ton of phone numbers at your disposal to create multiple email accounts on Gmail because you can not use one phone number more than once for verification. I know this would not entirely solve the problem of cheating, but it'll go a very very long way in drastically reducing that disgusting act because it's currently an eye sore. An IP ban?

I know this might sound discriminatory but i also think stricter measures need to be taken for people that are from certain countries where the epidemic of cheating is more prevalent.

Full text and comments »

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

By comingsoon.cpp, 3 weeks ago, In English

yesterday i solved this problem 1978D - Elections , Problem D from last D2 round. According to the problem rating, it's a 1600 problem, that would mean it's 2X my current rating but i think it's not even a 1000 problem. What would you rate this problem? Are there any websites or tools one can use in getting reliable rating for codeforces problems?

Full text and comments »

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

By comingsoon.cpp, 3 weeks ago, In English

Solved my first D2C and my hardest problem yet in one try.. I need to go rest now, then I'll come back and try problem D. Guys rate my solution 266414157

Full text and comments »

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

By comingsoon.cpp, history, 4 weeks ago, In English

So I managed to upsolve problem B from the last D2 round. I could have done it one try but I did not look at the constraints on n so I gave one TLE'ed solution before the AC'ed one, so dumb. I'm gonna sleep so well tonight :) It's already midnight here so I think i'll be off to bed now, guys rate my solution 266115349..

Full text and comments »

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

By comingsoon.cpp, 7 weeks ago, In English

I was randomly recommended This video by youtube. I searched for a blog about the competition on Codeforces but could not find one so I decided to make one. I'd like to know what you guys think about the contest and the contest format in general. I kind of think that the problems where on the easy side. If I could rate them I'd probably rate them low-mid div 3.

Full text and comments »

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

By comingsoon.cpp, history, 4 months ago, In English

Hello Guys.. I was trying to solve This atcoder problem From the last beginner contest but i was not able to come up with a working solution during the contest...After some upsolving, i finally came up with a solution that seems to work but the only problem is that it get's TLE on all the tests except the first three for which it passes and I don't know/understand why. This was the first ever ABC problem D that i have attempted after reading the problem statement.

This is the code below and I just need a little help or maybe come hints as to how to make it work because i can't think of a way to optimize it further.

#include <set>
#include <numeric>
#include <algorithm>
#include <vector>
#include <iostream>
#pragma GCC optimize ("O3")
#pragma GCC target ("sse4")
using namespace std;

int check(vector<int> a){
	int q = a.size();
	set<int> s; for(int i = 0; i < q; i++){
		s.insert(a[i]);
	}
	return s.size();
}
void solve(){
	int n , t; cin >> n >> t;
	vector<int> mex; for(int i = 0; i < n; i++) mex.push_back(0);
	for(int i = 0; i < t; i++){
		int a, b; cin >> a >> b;
		mex[a-1] += b;
		cout << check(mex) << endl;
	}
}
int main (){
	ios::sync_with_stdio(false); 
	cin.tie(nullptr);
	//ll t; cin >> t;
	//for(;t--;){
		solve();
	//}
return 0;
}

Full text and comments »

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

By comingsoon.cpp, history, 5 months ago, In English

I was trying to solve an exercise while studying basic probabilities and while solving the exercise, I thought of this problem which I thought was fun, so I decided to share it with my fellow noobs :)

Please if you're anything above a newbie, (in Ercole Visconti's voice) This problem is not for you (no offence) :)

Problem Statement

You have n tiles numbered from 1 through to n. You are also given an integer K. The task it to count all pairs of integers (a,b) from the n tiles whose difference is K. that means (a — b) = K

Input The one and only line of the input contains two positive integer n and K. Output Print the number of such pairs (a, b) whose difference is K, thank you.

Sample input 100 11 Sample output 89

Full text and comments »

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

By comingsoon.cpp, history, 6 months ago, In English

Hello please i was wondering why my code for This problem B from the last atcoder beginner contest is getting WA for some few tests? This is the code below. I'd really appreciate any help :)

#include <iostream>
#include <vector>
#include <cmath>
#include <set>
#include <map>
using namespace std;

vector<int> tob(int n){
	vector<int> a;
	for(int i=0; i<n; i++){
		int ans = n%2;
		if(ans==0){
			a.push_back(ans);
		} else{
			break;
		}
		n/=2;
	}
	return a;
}
void solve(){
	//cout << "stuff works" << endl;
	int count = 0;
	int n; cin >> n;
	vector<int> a = tob(n);
	for(auto c : a ) count +=1;
	cout << count << endl;
}
int main (){
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	//ll T = 1;
	//ll T; cin >> T;
	//for(;T--;){
	solve();
	//}
return 0;
}

Full text and comments »

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