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

Автор hyforces, история, 16 месяцев назад, По-английски

This is the editorial for the recent Teamscode Summer 2023 contest, and the problems are open for upsolving on this gym. Problems were prepared by oursaco, dutin, thehunterjames, Bossologist, Esomer, danx, codicon, willy108, and hyforces. The problems were tested by omeganot, codicon, cry, skye_, Litusiano_, and Apple_Method.

A. Who is cooking?

Solution
Code

B. Restaurant Sorting

Solution
Code

C. Largest Palindromic Subsequence

Hint 1
Solution
Code

D. Yet Another Math Query Problem

Hint 1
Hint 2
Hint 3
Hint 4
Solution
Code

E. Evil Problemsetters

Hint 1
Hint 2
Solution
Code

F. Maximum Trust

Solution
Code

G. Maximum Xor

Solution
Code

H. Permutator

Hint 1
Hint 2
Hint 3
Hint 4
Solution
Code

I. Counting Palindromic Sequences

Hint 1
Hint 2
Solution
Code

J. TeamsCode Meetings

Hint 1
Hint 2
Hint 3
Solution
Code

K. Med and Mex

Hint 1
Hint 2
Hint 3
Solution
Code

L. Easy Tree Problem

Solution
Code

M. Gift Wrapping

Hint 1
Hint 2
Hint 3
Solution
Code

N. Save the Timeline!

Hint 1
Hint 2
Hint 3
Solution
Code

O. Average Range Query Problem

Solution
Code (codicon)

P. Omer and Intervals

Hint 1
Hint 2
Hint 3
Hint 4
Hint 5
Hint 6
Hint 7
Hint 8
Hint 9
Hint 10
Solution
Code

Q. Beautiful Matrix Counting

Hint 1
Hint 2
Hint 3
Hint 4
Hint 1.5
Hint 1.6
Solution 1
Code
Hint 2.5
Solution 2

R. Oil Fields

Hint 1.1
Solution 1
Code 1
Hint 2.1
Hint 2.2
Solution 2
Code 2

S. Farming Negative Karma

Hint 1
Hint 2
Hint 3
Solution
Code

Happy Upsolving! As a hint towards a possible problem on the next contest:

Solution
Разбор задач Teamscode Summer 2023 Contest
  • Проголосовать: нравится
  • +84
  • Проголосовать: не нравится

»
16 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

»
16 месяцев назад, # |
  Проголосовать: нравится +19 Проголосовать: не нравится

posted in sub record time!

»
16 месяцев назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

orz

»
16 месяцев назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

orz

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

Hello I think the formula in the solution of K. Med and Mex is wrong. I tried it and it didn't get right. I think this is the right formula: let size = 2*(x-1). (n-size+1) * choose(n-x-1, x-2) * size! * (n-size)!. where choose() stands for combination... correct me if I am wrong. Here is my accepted code. 229580692