摘要:
You are given two integer arrays a and b of length n. You can reverse at most one subarray (continuous subsegment) of the array 𝑎a. Your task is to r 阅读全文
摘要:
Polycarp is an organizer of a Berland ICPC regional event. There are 𝑛n universities in Berland numbered from 1 to n. Polycarp knows all competitive 阅读全文
摘要:
There is a n×m grid. You are standing at cell (1,1) and your goal is to finish at cell (n,m). You can move to the neighboring cells to the right or do 阅读全文
摘要:
You have r red and b blue beans. You'd like to distribute them among several (maybe, one) packets in such a way that each packet: has at least one red 阅读全文