SAKT's blog

By SAKT, 9 years ago, In English

Hellooo everyone at Codeforces! Hope you all have a good day and get high ratings at today contest!

Codeforces Bot was sick for a couple of weeks and I didn't have time to fix it until tonight!
It's fixed and back to work now! And there is a new feature added to it! (Thanks to SeyedParsa for idea!)
You can now add some problems to your Solving Queue to solve them later and you can get back to bot to see your queue anytime!

/addToQueue Type[A-G] ID
A-E is for A-E div2! F for D div1 and G for E div1.
Example: /addToQueue F 594D

/showMyQueue
It's clear :-)

/deleteFromQueue ID
Example: /deleteFromQueue 594D

old commands:
/upcoming for upcoming contests
/rating USER for rating of USER
/tags tag1;tag2;...tagN; for problem with all of tags

You can see list of commands and examples by sending /help to bot.
All commands are case in-sensitive.

http://telegram.me/Codeforces_Bot

Full text and comments »

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

By SAKT, 9 years ago, In English

Hi Codeforces.
I remember that there was some complains from some users that they didn't get emails from Codeforces and they missed some rounds (And in some cases it was an important round).
So, I have created a Telegram Bot for codeforces that reminds you for contests!
Open the Telegram app (If you don't have it, Install it! It's really nice messaging app) and send a message to this id: "Codeforces_Bot".

- You will be added to the list and you will get a reminder before every contest.
- You can check for the first upcoming contest by typing: /coming
- You can get some random problem with some tag(s) by typing: /tags Tag1;Tag2;Tag3;
- You can get someone's rating by typing: /rating Handle
- And type /help to see list of commands.

I'm waiting for your comments about the bot and any suggestions or ideas to improve this bot.
Click To Enter Chat With Bot

Full text and comments »

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

By SAKT, 10 years ago, In English

Hi Codeforces.
I had just 2 problems with the last contest (Codeforces Round 260 (Div. 2)).
First, Look at this submission (7380851) for this problem (456B - Fedya and Maths). On the 11th line, there is this if:


if(s == "1") cout << 1 << endl;

It says that if the input was "1", the answer is 1. But obviously, it's wrong! If input was "1", the answer should be 0!
But this code Accepted.
Why? Really this much weak tests?!
Can anybody help that I am wrong and the code is correct or ... ?

Second, Look this submission (7382564) for this problem (456A - Laptops).
In my opinion, This code is wrong because of this line:


for (int i=0; i<n; i++) if (b[i]>b[i+1] && a[i].F!=a[i].S) {cout<<"Happy Alex"; return 0;}

It says that it never cout "Happy Alex" unless there exists an i that b[i] > b[i+1]
And if we pay attention to the way he is filling his b array:

for (int i=0; i<n; i++)
	{
		int x,y;
		cin>>x>>y;
		a[i]=make_pair(x,y);
	-->	b[i]=y;
	}

we realize that this code should output "Poor Alex" for this test because for every i, we have b[i] < b[i+1] :
3
2 1
3 2
1 3
I tried to hack him with the same test but I got an "Unsuccessful hacking attempt"
Can anybody help that I am wrong and the code is correct or ... ?

Full text and comments »

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

By SAKT, 11 years ago, In English

Hi everyone.
In Codeforces Round 212 (Div. 2), I saw one of my room codes and he was using the -1 position of an array (A[-1]). And it did'nt get Runtime Error.
Why? Unfortunately, I had 2 Unsuccessful hacking attempts because of this.
Here is the submission: 5102143 and here is the link of problem: 362B - Петя и лестницы
In the line 22:
if (dirty[0] == 1 || dirty[m-1] == n)
...
and if you put m = 0 ... .
Could anyone answer why this code is Accepted?

Full text and comments »

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