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

Автор xinchengo, история, 3 года назад, По-английски

Codeforces has recently adopted Cloudflare for security reasons. As a consequence, it brought some trouble to some remote judging providers. For example, the most popular ones, Vjudge and Luogu, can no longer scrape problem statements. Many Chinese competitve programmers are used to submitting Codeforces problem remotely, either to look for translation or to track their progress.

Although bot accounts do cause problems (topping the 'Most solved' page), they never become dominant. Instead, remote judging services are just like CLI clients, they only increases the popularity of Codeforces. Users of remote judging services make up a large part of Codeforces contestants. Codeforces has always been generous and provides an extensive set of APIs, which is uncommon among online judges. So I don't think Codeforces is cracking down on remote juding services on propose.

Is it possible for Codeforces to release an API for problem statements or specially treat bot accounts? Please be friendly to remote judging services.

Update: Luogu seemed to have fixed the issue.

Полный текст и комментарии »

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

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

Hello everyone! I am here to ask you if there is any efficient way to solve this sub 2 dimensional array problem.

  • You are given a 2 dimensional array of integers $$$A_{n,n}$$$. there are $$$k$$$ different integers in this array. try to find out the smallest sub 2 dimensional array containing all kinds of integer.

Unlike the linear variant (where we can use a greedy method with two pointers to complete this task in $$$O(n)$$$ time, the problem is not that simple. So far, I have only found two optimizations based on the brute-force method. One is to use binary search method to find out the least size containing all kinds of integer. The other is while recording the times an integer appears in the subarray, updateing differences between each move rather than counting up again and again. After those optimizations, the time complexity of this method is $$$O(n^3\cdot \log^2 n)$$$, where we use $$$O(\log n)$$$ to binary search the size, $$$O(\ln n)$$$ to enumerate all possible width and height for each size, and $$$O(n^3)$$$ for each possible shape of a specific rectangle.

Since the linear variant can be solved in linear time, and with intuition that I thought the 2 dimesional version can be solved in square time. Is there a way to solve this problem in $$$O(n^2)$$$ time? If there is not, what is the lower bound of the time complexity to solve this problem?

Полный текст и комментарии »

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