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

Автор NBAH, история, 10 лет назад, По-русски

Всем привет!

11 августа в 19:35 MSK состоится рейтинговый раунд Codeforces #367 для участников из второго дивизиона. Традиционно, участники из первого дивизиона приглашаются поучаствовать в соревновании вне конкурса.

Автором задач являюсь я. Это мой первый раунд на Codeforces! Советую ознакомиться с условиями всех задач. Надеюсь каждый найдет себе задачу по вкусу.

Хочется выразить благодарность координатору раунда GlebsHP за помощь в подготовке контеста, Yury_Bandarchuk и IvanVan за помощь в подготовке задач и прорешивание раунда, а также MikeMirzayanov за замечательные платформы Codeforces и Polygon.

UPD: Разбалловка 500-1000-1500-2000-2500

UPD: Разбор

UPD: Соревнование завершено. Поздравляем победителей!

Div.1 winners:

1.anta

2.W4yneb0t

3.sugim48

4.uwi

5.Kmcode

Div.2 winners:

1.jiangzixiao

2.Shining

3.BurningHuie

4.AwD

5.stjepanp

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

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +5 Проголосовать: не нравится

Автокомментарий: текст был обновлен пользователем NBAH (предыдущая версия, новая версия, сравнить).

»
10 лет назад, скрыть # |
 
Проголосовать: нравится -74 Проголосовать: не нравится

kiram to tarrahe in contest

»
10 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +18 Проголосовать: не нравится

Simple brief statement, thanks a lot and hope high rating change for everyone =D

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

And as usual... scoring will be announced later! (maybe just before the contest! or after the contest!) Whyyyyyyyyy?!

»
10 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится -60 Проголосовать: не нравится

Hope this contest will be better than last Div2 only contest. Hope there won't be such a long queue during the contest because of so many people. (Hate the feeling knowing the contest is unrated after a 2hr-hardwork at midnight)

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

short GL & HF , I hope statement will be short as this :)

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +15 Проголосовать: не нравится

short GL & HF, I hope statement will be short as this :))

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Hope for nice problems and strong pretests :)

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +57 Проголосовать: не нравится

Today, give a stranger one of your smiles. It might be the only sunshine he sees all day.

»
10 лет назад, скрыть # |
← Rev. 8  
Проголосовать: нравится 0 Проголосовать: не нравится

I hope this round will be more interesting than previous one)

»
10 лет назад, скрыть # |
 
Проголосовать: нравится -44 Проголосовать: не нравится

"Are we poisonous?" the young snake asked his mother. "Yes, dear," she replied — "Why do you ask?" "Cause I've just bitten my tongue! "

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

MSK means??

»
10 лет назад, скрыть # |
 
Проголосовать: нравится -43 Проголосовать: не нравится

Round of div2 member?

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +26 Проголосовать: не нравится

Fact : 367 is a prime number

»
10 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

a round without the IOIers ?

»
10 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +8 Проголосовать: не нравится

Надеюсь никакой геометрии в С и адекватные D, E. Ну и конечно же без смакования момента после отправки решения до получения результата.

»
10 лет назад, скрыть # |
 
Проголосовать: нравится -36 Проголосовать: не нравится

is it rated ??

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I hope this contest won't have so many commercials for games and movies. Just clear tasks.

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +25 Проголосовать: не нравится

»
10 лет назад, скрыть # |
 
Проголосовать: нравится -10 Проголосовать: не нравится

Too late for Asia......

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

Randomness of likes and dislikes will one day be used as a random number generator :v

Like if you disagree :v

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +4 Проголосовать: не нравится

Today is Codeforces NBA match ;) Wow!! That's great to play on computer too. Thank u very much NBAH. Best of performance for everyone in this match :)

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Is there anyone who could help me to solve this problem or give any other approach.Thanks in advance http://codeforces.me/blog/entry/46505

»
10 лет назад, скрыть # |
 
Проголосовать: нравится -11 Проголосовать: не нравится

[user:jibancanyang]Come on,believe yourself,and tonight you must be the candidate master!

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Anyone here knows how to unregister I'm not sure if I will be able to write codeforces today PELASE HELP

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

We should wait 9 days for next contest :((

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

We should wait 9 days for next contest :((

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +18 Проголосовать: не нравится

The Olympic season is here and we have some Codeforces rounds scheduled too. We should have an Olympic themed contest.

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +6 Проголосовать: не нравится

Wish Good luck to all :)

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +26 Проголосовать: не нравится

Queue is back. :/

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +9 Проголосовать: не нравится

my source is still in queue for long time. does this happens to anyone else?

»
10 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +5 Проголосовать: не нравится

Codeforces queue :/ . Please do compensate for the time we have lost in this and are still losing.

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

queue 2 : the nightmare

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +4 Проголосовать: не нравится

make it unrated:/

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Автокомментарий: текст был обновлен пользователем NBAH (предыдущая версия, новая версия, сравнить).

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

i hope it's not going to be unrated today!

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +5 Проголосовать: не нравится

i hope it's not going to be unrated again!

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Auto comment: topic has been updated by NBAH (previous revision, new revision, compare).

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +9 Проголосовать: не нравится

20 pages of unjudged solutions

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +5 Проголосовать: не нравится

I guess it's another unrated contest, unfortunately.

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +18 Проголосовать: не нравится

I thought the queue problem was solved! I submitted B. Waited for 5 minutes, still in queue. Went to solve C, submitted C, found out B was WA. And now C has been on queue for 3 minutes. wtf! -_-
Thank god it's unrated for me. I'm out.

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +7 Проголосовать: не нравится

My solution to C is not even in the queue. I am not able to submit it! -_-

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +13 Проголосовать: не нравится

Please, don't make it unrated.

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +25 Проголосовать: не нравится

Wow, really great curve of number solved. And this is only halfway through the contest.

a

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +26 Проголосовать: не нравится

Что-то баян задачи...

»
10 лет назад, скрыть # |
 
Проголосовать: нравится -7 Проголосовать: не нравится

On a completely off topic, how many people on codeforces follow Silicon Valley (TV show) ?

  • »
    »
    10 лет назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    Well, I don't think you can get your answer if you ask this question here. After some yes/no, people will stop replying due to negative votes (spamming). You should rather create a poll externally and give the link here.

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

C was a dp problem right? I was starting to get it but I didn't have enough time to debug :(

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +19 Проголосовать: не нравится

I don't like man :P. When I get 20 minutes penalty and a WA just because I wrote a statement twice . :D

And by the way was it only me who took Manhattan distance in Problem A and passed 6 pretests? :D

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

Спасибо большое за интересные задачи!

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

Got response from judge after 20 min from submission.(long queue)

Also sad as i got to know it was wrong after 20 min. :(

Will this be a rated contest?

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

How to solve D? Thank you.

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

Wow, CF servers are fast, my first hack on this submission (19791945) takes over 5 × 109 iterations and it ran in sightly less than two seconds.

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +21 Проголосовать: не нравится

Had no idea Tries were this standard, so many people solved D.

»
10 лет назад, скрыть # |
← Rev. 3  
Проголосовать: нравится 0 Проголосовать: не нравится

I think my rating will drop to below 900 :/

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Anyone else think that the time limit for E was a bit too strict?

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

This round is totaly interesting :) Although I couldn't solved problem D (wish that i could learn Trie earlier) but today it is fine!

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

That moment when ur solution is in queue for more than 15 min. And On top of that you get a verdict as a wrong answer . Ruins everything :(

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

i always thought that the feature of rejecting the exact same submission was useless. after this contest i really appreciate it. it saved lots of precious 50-points as i had to submit 10 solutions to see one of them got into the queue.

okay really codeforces what the fuck is happening!

»
10 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится -27 Проголосовать: не нравится

i get WA after 30 min from submit ! :)
it should be unrated like Eran Contest

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Does anybody know why my submission 19801619 got compile error? Thank you!

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +6 Проголосовать: не нравится

the queue was so long in the start of this contest please consider this.

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +5 Проголосовать: не нравится

Who else has used graph to solve C?

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I spent an hour implementing D using multiset, so I guess this will be my motivation to learn trie finally :D

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I see many solutions who got WA#5 in problem D, like me. Good round!

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +4 Проголосовать: не нравится

I knew that the problem D could be solved by using Trie but I failed to implement it ;(

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Solved D 5 minutes after the contest ended! I'm too slow!

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +17 Проголосовать: не нравится

I think, this contest should be RATED.

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +13 Проголосовать: не нравится

I quite don't understand what everyone is so distraught by long queue of +/- 15 minutes. Every major competition. APIO 2016, CEOI 2016, JBOI 2015 all are really famous for their judging fuck ups. Why does CF need to make this unrated simply to prevent decrease of people's ratings, when such major competitions often end up deciding people's future and college etc.

  • »
    »
    10 лет назад, скрыть # ^ |
     
    Проголосовать: нравится +8 Проголосовать: не нравится

    The competitions you mentioned don't have time penalties.
    When there are fuck-ups in our local onsite contests, we usually blame the system saying to the organizers that in respectful contests like Codeforces rounds such things would be considered very wrong and wouldn't be allowed. Codeforces should stay an example for a good platform with good contests.

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

It was a really bad idea to make Eran's contest unrated. Cuz now a lot of people are upset with the system's speed and it would be kind of unfair to leave it as it is.

»
10 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +6 Проголосовать: не нравится

E was very similar to problem G from Petrozavodsk Winter 2012 (standings)

(the problem is great anyway)

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +7 Проголосовать: не нравится

I think this contest should be rated. Judge lags were not bad than past contests.

umm... I wonder how to hack Q1. How did you hacked Question No.1?

»
10 лет назад, скрыть # |
 
Проголосовать: нравится -60 Проголосовать: не нравится

Making this round rated proves how unserious this website is

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Submissions are being judged after 20 minutes. I came to know about my run time Error of question after 20 minutes. This round should be unrated. Many people would have been affected by this.

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

What is the approach for D?

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Any idea what Test 41 in A is? I assume it's one of the tests that was used to hack a bunch of solutions in A.

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

"In queue" for 15 minutes after submitting the question, has becomes a permanent feature of codeforces :(

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

Make it rated please i have solved A and B under 20 minutes. and i am happy to do that !

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +4 Проголосовать: не нравится

Nice contest! Brief statements. Unfortunately, finished D solution two minutes too late :/. Thoroughly enjoyable nonetheless.

»
10 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

In Problem C. I marked my dp[100005][2] with INF as 10e15 it gave a run time error. But when i use INF as 10e14 it works. Language used C++. Can anyone explain ? Thank you.

Edit1 : It's behaving in a weird manner. Sometimes i get correct answer but sometimes i get run time error in custom invocation. I will update once i get to know the reason behind it.

»
10 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

Only I get #WA41 on A?

»
10 лет назад, скрыть # |
← Rev. 4  
Проголосовать: нравится +3 Проголосовать: не нравится

A solution for D without using trie (though it hasn't passed the systests yet). Let's store all numbers in STL multiset. To perform the third operation, we can find y that gives maximal xor going from the leftmost bit to the rightmost. Given the 10^9 constraint for x, 30 to 0 is enough. Let's say we know some binary prefix of the answer, and that a number in multiset with such binary prefix exists. If x has 1 in this bit, we can just find the the minimal y with such prefix (using multiset.lower_bound()), and if it has 1 in this bit, then add it to the answer. If x has 0 in this bit, we can find lower_bound(answer | (1 << i)) and see if it does exist and isn't greater than answer + (1 << (i + 1) — 1), in order to guarantee the existence of such prefix in multiset, then add to the answer.

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

It will be unfair towards Eran who has created good problems, if this contest is rated

»
10 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

I got a weird WA61 on problem C. I am sure about the idea, and probably the WA is because of checking whether we can have an answer. Why is my check wrong?

I've changed the way for checking the possibility to have an answer and now have an AC. Does anybody know why did this happen?

»
10 лет назад, скрыть # |
← Rev. 4  
Проголосовать: нравится +48 Проголосовать: не нравится

O(nmq) solution for E. AC in 2464 ms =)

Can be improved to 2121 ms and 1669 ms with SSE.

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Can we expect editorial today itself??

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

will there be an editorial ?

»
10 лет назад, скрыть # |
← Rev. 3  
Проголосовать: нравится 0 Проголосовать: не нравится

Here was my approach to D.

It is easy to keep up with the set by using std::set and std::map to count the multiplicities.

The real deal is how to deal with the query ?.

First, change the given number to binary. We notice that we can take the high-value digits greedily.

Therefore, we do the following. We set X as the optimal number in the set. Iterate through the bits 29 0. If the binary form of the given number is 0, we want 1 there. If not, we want 0 there. If there are no numbers in the set that satisfies this, we would have to go with alternate path.

Here's an example.

Assume that 111011, 011000, 101000, 000010 is in the set, and the original number is 001101. We want the first bit to be 1. Indeed, there are two such numbers — they are in the interval [32, 64). How do we check that there are numbers in that interval? By using lower_bound!

So we chose [32, 64). Now for the second bit we want 1 as well. Such numbers are in the interval [48, 64). We see that there is one. We want 0 to be the third bit, and such numbers are in the interval [48, 56). However, there are no numbers in that interval! Therefore, we would have to go with the third bit 1.

Continue this, and we would have our optimal X. Now compare ORIGIN XOR X and ORIGIN and return it. Complexity is

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Kindly have a look at this test case generation program for Question 2 . I was unable to figure out why it was showing (invalid input verdict ) when I tried to hack this submission . (http://codeforces.me/contest/706/submission/[submission:19798157])

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

My code :

int main()
{
	int n=9;
	cout<<n<<endl;
	for(int i=1;i<=n-1;i++){
		cout<<i<<" ";
	}
	cout<<n;
	cout<<endl;
	int q=88888;
	cout<<q<<endl;
	for(int i=2;i<=q;i++)
	{
		cout<<2<<endl;
	}
	cout<<2;
	return 0;
}

Please comment below if any one know the reason. I don't want to do that mistake again. But I was unable to figure out my mistake. (http://codeforces.me/contest/706/hacks/246947/test)

»
10 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

Kindly have a look at this test case generation program for Question 2 . I was unable to figure out why it was showing (invalid input verdict ) when I tried to hack this submission . (http://codeforces.me/contest/706/submission/[submission:19798157])

My code :

#include<bits/stdc++.h> 
using namespace std;
int main()
{
	int n=99999;
	cout<<n<<endl;
	for(int i=1;i<=n-1;i++){
		cout<<i<<" ";
	}
	cout<<n;
	cout<<endl;
	int q=88888;
	cout<<q<<endl;
	for(int i=2;i<=q;i++)
	{
		cout<<2<<endl;
	}
	cout<<2;
	return 0;
}

Please comment below if any one know the reason. I don't want to do that mistake again. But I was unable to figure out my mistake. (http://codeforces.me/contest/706/hacks/246947/test)

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

in C anyone got WA in test case 18?

»
10 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +4 Проголосовать: не нравится

nice contest ,but slow system testing :P hoping to get high ratings

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +23 Проголосовать: не нравится

Thank you guys for making this awesome contest.The difficulty of problems is moderate for Div.2 contestants and have great and beautiful "solved" distribution.I kept thinking and implementing the whole contest.It's really exciting and fun.

Some personal experience: I got 2 RE on D for missizing the trie node pool and got 1 WA on C for a typo.When I start to handle E, I first thought to cope with it by splay tree(considering the difficulty of previous rounds) and failed to finish it.Right after the contest I figured out a better way(maintaining the position of original elements and do some interval add/distract, which can be completed in O(n) time because there is no online requests).

Long queue appear again in this contest.I guess this is caused by problem A.Maybe the special judge part in A make the judging machine laggy.

This contest is made by and for Div.2, this is awesome.Although the difficulty may seems lower than previous Div.2s(finish 3 and you and done, finish 4 for a high rank,finish all to go Div.1 directly), but it is really enjoyable for Div.2 contestants.

Hope you guys can make more great contests.

  • »
    »
    10 лет назад, скрыть # ^ |
     
    Проголосовать: нравится +5 Проголосовать: не нравится

    I don't hate this contest. I'm just expressing my bad opinion about the problemset, which I didn't enjoy, authors did their best anyway.

    I do not consider this contest as "good". Here's a yellow point of view:

    -A was okay, like normal A

    -B was such a standard task...

    -C yet another DP with same pattern. There was even a pretty similar problem on CF once.

    -D come on, "code a trie" problem. There are many such problems in the internet. Seriously, even "find maximum xor" typed in Google would probably result in finding the solution immediately.

    -E that was a fun one. Nah, just kidding :P If coding N treaps is a model solution, then wonderful problem 10/10. MrDindows did something awesome, check it out!

    I'm not saying this contest was bad. But IMHO this contest should have been an Educational Round.

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

This problem set is so much interesting. Really I enjoyed it to much.

»
10 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +3 Проголосовать: не нравится

Somewhat structured and verbose code for D: http://pastebin.com/Md2EtNXF (submission)

»
10 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

Can someone tell me why my solution to C (java) timed out?

I saw some other recursive solutions also passing, so did I make some mistake in the implementation?

Here's the code : 19801924

Thanks.

Edit : I got my mistake.

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Задача D. В варианте третьего запроса нужно найти максимум из ксоров данного числа и одного числа из множества. В тестах же возможен вариант, когда мы ни одно число из множества не берем. На мой взгляд это грубая ошибка условия.

  • »
    »
    10 лет назад, скрыть # ^ |
    ← Rev. 2  
    Проголосовать: нравится 0 Проголосовать: не нравится

    Это же эквивалентно тому, что мы берем число 0(по условию 0 всегда присутствует во множестве), а 0 xor x = x. Или я не так понял?

    • »
      »
      »
      10 лет назад, скрыть # ^ |
       
      Проголосовать: нравится 0 Проголосовать: не нравится

      Да, вы правы. Не заметил эту часть условия. Думал, множество пустое вначале. Прошу прощения за комментарий, содержащий неоправданную клевету.

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Someone can help me? In problem D, I'm use basicly pointers, in my computer it is ok, but in CodeForces gives Runtime Error.

Submission

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Why my all solution change to 'skipped' and I out of competition ?

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Why I get different answers between custom invocation and problem test?

In 19790402 I got WA on test 79, However, I thought I got the correct answer when I used Custom Invocation.

What the problem is???

I passed this problem by replace %ld with %d, but I do want to know Why I get different answers between custom invocation and problem test?

By the way, I'm glad to know how to cause this WA, since I thought there is no different between %ld and %d in GNU G++11 5.10 :)

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

Got 141 points, wow!

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Помогите пожалуйста. Почему на 11 тесте превышение по времени?( 706B - Интересный напиток

import java.util.*;

public class Main
{
	public static void main(String[] args)
	{	
		Scanner sc = new Scanner(System.in);
		String n1 = sc.nextLine();
		int n = Integer.parseInt(n1);
		String prices[] = new String[n];
	    prices = sc.nextLine().split(" ");
		String q1 = sc.nextLine();
		int q = Integer.parseInt(q1);
		String results[] = new String[q];
		for(int i=0;i<q;i++)
		{
			int sum = 0;
			String m1 = sc.nextLine();
			int m= Integer.parseInt(m1);
			for(String s:prices)
			{
				int k = Integer.parseInt(s);
				if(m>=k)
					sum++;
			}
			
			results[i] = String.valueOf(sum);
		}
		for(String res: results)
			System.out.println(res);
	}
}

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Thanks for such a nice contest :)

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

where is the problem set ?