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

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

Hello Codeforces, and happy Nowruz.

It's an honor to announce you that Codeforces Round #406 is going to take place on March 23rd.

I'm the writer of this round and it is gonna be my 6th CF contest (there are still plenty coming...). There are 5 problems and you'll have 120 minutes to solve them.

I'd like to thank keyvankhademi and waterfalls for testing this round, netman and KAN for helping me prepare this round and MikeMirzayanov for awesome platforms of Codeforces and Polygon.

The main characters of this round are going to be Rick and Morty!!!

Scoring will be posted soon.

Problems are sorted by their expected difficulty, but I strictly recommend you to read all the problems.

GL & HF!

P.S: Top IOI 2017 participant in each division (only with handle present in the future IOI handle list) will be rewarded with special Persian souvenirs in Tehran.

UPD: Scoring distribution is: 500, 1000, 1750, 2000, 2500 for Div.2 and 750, 1000, 1500, 2000, 2500 for Div.1

UPD: Editorial is out!

UPD: System test is over, congratulations to the winners.

Div.1 winners are:

  1. EvenImage
  2. Um_nik
  3. LHiC
  4. -XraY-
  5. ershov.stanislav

Div.2 winners are:

  1. xumingkuan
  2. HXLLL
  3. Rpd-Strike
  4. U6121071173
  5. Khismet

See you next time ;)

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

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

amd is back! <3

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

Amd's contests are so good. I've never been disappointed with any of his contests. Looking forward to this Thursday.

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

are you sure then IOI participants has in EACH division?

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

"I strictly recommend you to read all the problems" does that related to the difficulty of the upcoming problems???

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

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

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

Happy Nowruz! I wish everyone that the round was truly festive!

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

I missed PrinceOfPersia's rounds so much!

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

(only with handle present in the future IOI handle list). Where's that list?

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

Problems are sorted by their expected difficulty, but I strictly recommend you to read all the problems.

GL & HF!

// What's the output of this code ? :)

cout<<(GL=="Good Luck" && HF == "Have Fun" ? "Yes":"No");
»
9 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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

"Do ya hear that M-M-Morty? *URP* We're gonna go to a universe where everyone is a character in a programming competition, Morty--"
"I-I, uh, I don't know Rick, that sounds like--"
"A programming competion, Morty! Codeforces, Morty!"

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

Hope morty doesn't go back to the old shop... :/

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

Good Luck and Have Fun !!

I hope this comment becomes the reference for all authors who are lazy to write it , and they write GL or HF . so they can copy paste it from here .

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

First of all I apologise to write it here as I am very much new to this.I want to hack a problem which is already accepted.But I can see that the solution is wrong,what to do,Please Help.

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

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

AMD setting the round + Main characters as Rick and Morty. This is going to be good.

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

A contest about me? thx :D

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

wowwww im very much excited about the contest ... for giving this contest i will eatless :) hoping for +ve rating change and i love all the contest prepared by PrinceOfPersia ... and i love him too :) his style of blog writing is awesome and he is also awesome... i love codeforces ,,,,, i love MikeMirzayanov and i love alll :) happy coding best of luck for the contest :D

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

What made you change your mind?

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

I just love codeforces contests

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

Best theme ever! This is one of the main reasons for why I love competitive programming...

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

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

..

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

Why the hell your characters are soooooooooooooo intresting?! 1-Barney Stinson 2-Mike 3-Rick and Morty all of them are wonderful

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

can someone tell me the full-form of amd please?

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

Do i only see that i have last 2nd contest's amount of points instead of amout that should i have now? I mean i have 1021 when i had after last round 1087 and i see everybody have the same issue

Also my submissions from last contest got back themselves

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

Glad to see my teacher is holding another round, good luck PrinceOfPersia (reply to this comment).

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

Happy Nowruz everyone) Hope that most will increase their rank

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

Everybody, who liked this commend will increase his rating))

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

Good thing CodeForces doesn't have verdict "Not Acceptable", else this round will be full of Error 406: Not Acceptable.

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

It's my birthday contest !! thanks PrinceOfPersia :D

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

Guys, better prepare robust version of Heavy-Light Decomposition. Afair on 3 out of 5 PrinceOfPersia's contests E required it xD.

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

who likes inception?

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

fact : PrinceOfPersia is a gay prince and he's trans.

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

Hi, Prince)

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

mrims of persia always very nice mromlems, looking forward to the round 406, good luck

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

Me when the competition starts (better watch out!)

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

Scoring distribution?

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

Ужасный перевод в Div2B, пришлось переключиться на английский, чтобы понять эту кашу :/

Лето из вселенной #1 знает, что в каждой параллельной вселенной (включая это лето) ровно один из Рика и Морти из этой вселенной предатель и ровно один верен, но никто не знает кто именно. Лето знает, что мы обречены, если существует группа, в которой каждый участник предатель (они спланируют и уничтожат мир).

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

I didn't know the theme was Eminem too

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

Лучше бы вообще оставили без перевода, чем это. Тогда люди времени бы не тратили и сразу на английском читали условие.

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

Hacking page does not load.

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

EM fan eh ?

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

Did anybody notice the names of the problems...they are the names of eminem's songs too.

Nice taste PrinceOfPersia.

:)

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

Very long queues.

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

Is there a long hack queue? My hack has been in queue for almost 5 minutes now

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

This is exactly how I read the problem statements to understand the whole meanings.

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

If suppose somebody program is write but would terminate before considering all the inputs would it be a valid program or not?

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

It could be better if there were explanations for the examples in Div 2 problem C. It is possible to understand it ambiguously.

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

Systests of A will make many people sad (me too) :'(

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

Like almost everyone after the contest

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

Div 2 B and C are so ambiguous. There should be more explanation rather than what we had.

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

I do really like problem C xD good job PrinceOfPersia

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

PrinceOfPersia right now.

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

How to solve C? My idea is to do dynamic programming with 3 state [position][cycle_passed][turn], with O(k) transition. This gives the right answer, however since cycle_passed could exceed 70, my solution got TLE. Am I on the right track here?

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

What are the hack cases for problem 2 divB

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

Applause Great problems! Thank you, man!

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

on div2b, why no runtime error for negative values on this solution?

Unsuccessful Hack case

10000 2
8 1 -1 -1000 -2000 -3000 -4000 -5000 -6000
8 1 -1 -1000 -2000 -3000 -4000 -5000 -7000

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

    Could you show the whole code?

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

      sure: submission

      it received WA on systest, but I was wondering why the hack didn't pass

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

        If you add cout << ok << " " << v << endl; to the beginning of code: You get 0x554ae0 0x4f3040. That means that ok was placed after v (exactly v + 100008 = ok), so in fact ok[-1000] makes sense because it means v[100008 - 1000] (Don't have any idea why 100008 and not 100005, that's some compiler stuff).

        But generally you could get a Succesful hack by this test:

        10000 2
        3 1 -1 -10
        1 10
        

        He wouldn't clear ok[10] after first group, so he will say "NO" after checking 2nd group and finding that there are two elements with absolute value of 10. But right answer is of course "YES".

        Also this code doesn't check multiple occurrences of the same element. So

        1 1
        2 1 1
        

        will also have "NO" answer, but the right answer is "YES".

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

Whats the hack for div 2 A?

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

10000 1 2 -3 -3

So many fell to this single test in div 2 B :-P..

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

Was it possible to solve Div2.D on Python? I tried all my best, and solution is very simple, but Timeout on pretest 8...

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

I couldn't really understand the statements. I read problem A like 5 times.

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

I think problem E was just a persistent segment tree .Let A be the original array. Make a persistent segment tree B such that position j of the i'th version is 1 if there is no value equal to A[j] between A[i],A[i+1],....,A[j-1]. Once we have this we can do a greedy construction, because we can find the farthest possible endpoint for the next segment in time log(n).

Is this the intended solution?

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

B was easier than A

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

Условие задачи B какое-то наркоманское :) Что нужно делать я пытался понять из тестовых примеров

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

    Хоть я и серый но напишу. Да бывает и такое, что условие сложнее задачи, я вот тоже сам по примерам понял, но блин какой же это труд- донести до участника, что нужно делать, и вроде ругаться хочется за такое условие, но в то же время я благодарен, что дают мне возможность решать задачи, так бы переводил через гугл переводчик(брррр)...

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

Just 10 more seconds ... (and a faster Internet)

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

Pretty nice contest (although I failed).

B was really nice but I didn't like A.

On C can I coded a solution (which I thought was and I still think so) the idea was that you change the answer at most when you change the K. Also the answers are decreasing so we can do a divide and conquer with at most times computing/doing the O(N) solution for fixed K. Can someone provide a test case which fails that, because it TLEd?

Also how to solve D?

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

Is O(n * log23(n)) the intended complexity for C?

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

i think it was very hard round for DIV2 , am i right or not ?

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

I tried div1 C O(n * sqrt(n)) but it has TLE. Hahaha....

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

див 2 задача B ваще не понятная! смысл понять трудно ! хотя думаю она легкая была (

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

I hope 2*10^4 dfs in problem D will fail? In other case I don't understand why it's D. I decided to look at the submitted solutions and it made me sad.

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

harder than usual but problems are so nice!

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

We need Nicolas Cage from National Treasure to figure out the problems' statements :( . I read the statements many times to understand the problems :(

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

The Russian statements look much like a result of some automatic translation: the order of words is as in English, and sometimes the meaning is messed up, too. Still possible to understand, but English version looks more readable to me. Looked way better when Codeforces had staff dedicated to translating the statements, like Delinur.

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

The problems are too hard to understand.Could you make the problems become shorter,it is unfair to poor English men...like me

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

can't figure out why my solution 25749847 for B is failing. could anyone please have a look.

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

Are all round prepared by PrinceOfPersia have a hard Div 1 A? Or am I too weak?

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

Test Case 24?

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

Fastest System Test ever :'D

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

WHat is the proof Of DIV2 A ? I cant guess the impossible (-1) case . When it will be impossible ? And whats the proof ?

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

I tried Bezout's Identity for Div2A . But it failed....can anyone correct me.

Also, I can't think of when would it be -1.

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

That moment when you get div. 2 problem A wrong in system test

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

pretty balanced

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

It isn't a good idea to make Div1 A so difficult.
795 users registered for this Div1 round but only 343 made at least one submission.

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

This time lots of Hacks & System failures! :p

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

Please Can someone tell why i got WA in Prob B ?

http://mirror.codeforces.com/contest/787/submission/25753050

///

I got accepted.

same number can come...

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

So easy div2 B problem, but so difficult-to-understand problem statement.

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

Puzzle: Name of all problems are names of Eminem songs, except for Div.1 E. Eminem has no song named ALT, so what is the story behind ALT!?

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

Could you guys help me with why I got Div2B wrong?

http://mirror.codeforces.com/contest/787/submission/25748568

I think I misunderstood something.

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

b should be 1500 and c 1000

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

PrinceOfPersia EVEN A BLUE CODER OR CYAN CODER CAN MAKE CONTEST WITH UNIFORMITY IN PROBLEMS LEVELS THAN THIS CONTEST.FOR EXAMPLE,TAKE SOME PREVIOUS CONTESTS

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

Beautiful arts) I was enjoying this contest)

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

My code of div2B WA vs AC after contest
My Code failed on #59. Can someone explain me how this passed 58 test cases ! !!
My best experience in CF.... I will remember it :'(

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

Is it rated?

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

Задача С. Прохождение фором от 1 до n заходит, от n до 1 не заходит. http://mirror.codeforces.com/contest/787/submission/25754445 http://mirror.codeforces.com/contest/787/submission/25754351 Разницы в решениях никакой. Насколько я понимаю — это проблема в тестах.

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

please i want to know something: i made this submission during the contest: http://mirror.codeforces.com/contest/787/submission/25739022 and then i made another submission in the same problem because there was something i was not sure of, the other submission was hacked, and the first submission above was counted hacked also as you see in the submission link

after the contest i submitted the above submission again exactly and it is accepeted: http://mirror.codeforces.com/contest/787/submission/25754392

is this normal ?

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

A positive rating change means absolutely nothing when u know u have not done well at all in the contest. :(

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

Hello, I think I found a mistake in system tests in task B. Time limit is 2s and I've found the test in which solution has been executing for 2.8s but system test said that it is valid.

http://mirror.codeforces.com/contest/787/submission/25744252 the test is :

10000 1

10000 1 1 1 1 1 1 1 1... 1

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

I was able to lock my solution after being hacked. HOW?

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

Till I Collapse -> Пока я срываюсь

картинка

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

wasn't the character next to Rick in div1 D (Rap God) Pearl from Steven Universe?

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

I've got a mysterious submission issue;

Here's my code:

http://mirror.codeforces.com/contest/786/submission/29148189

It meets a RTE with a exit code which usually means array/vector visit out of range.

But my vs2017 report nothing and runs well, and I had never disable runtime warnings.

So I submited it in MS C++.

The first time it runs and I've got a minor mistake.

before correction

after I corrected it with only one line, it cannot even compile.

after correction

And the bs reason

Can't compile file:
program.cpp
program.cpp(58) : error C2143: syntax error : missing ',' before ':'
program.cpp(58) : error C2530: 'i' : references must be initialized
program.cpp(58) : error C3531: 'i': a symbol whose type contains 'auto' must have an initializer
program.cpp(59) : error C2143: syntax error : missing ';' before '{'
program.cpp(61) : error C2228: left of '.first' must have class/struct/union
        type is 'int'
program.cpp(61) : error C2228: left of '.second' must have class/struct/union
        type is 'int'
program.cpp(62) : error C2228: left of '.first' must have class/struct/union
        type is 'int'
program.cpp(62) : error C2228: left of '.second' must have class/struct/union
        type is 'int'
program.cpp(113) : error C2143: syntax error : missing ',' before ':'
program.cpp(113) : error C2530: 'i' : references must be initialized
program.cpp(113) : error C3531: 'i': a symbol whose type contains 'auto' must have an initializer
program.cpp(114) : error C2143: syntax error : missing ';' before '{'
program.cpp(115) : error C2228: left of '.first' must have class/struct/union
        type is 'int'
program.cpp(115) : error C2228: left of '.second' must have class/struct/union
        type is 'int'
program.cpp(194) : error C2143: syntax error : missing ',' before ':'
program.cpp(194) : error C3531: 'j': a symbol whose type contains 'auto' must have an initializer
program.cpp(195) : error C2143: syntax error : missing ';' before '{'
program.cpp(196) : error C2143: syntax error : missing ',' before ':'
program.cpp(196) : error C3531: 'k': a symbol whose type contains 'auto' must have an initializer
program.cpp(197) : error C2143: syntax error : missing ';' before '{'

I got really frustrated. Can someone help? What's going on?