Изменения рейтингов за последние раунды временно удалены. Скоро они будут возвращены. ×

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

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

Hi,

I feel that we are lacking the ability to display those submissions that their languages had already been disallowed. For example, when I tried to solve this problem, I wanted to compare my solution's performance with others, and found out that I am the only one who has solved it in Java 8. But there are also plenty of others' solution in Java 6, 7 etc..., however, to find them is not a trivial task. So I think this kind of feature can come in handy.

What are your opinions, guys?

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

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

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

Hi,

I found that the number of people solving one specific problem is different when we view the problem in the Problem set tab, and when we view the problem in the Dashboard:

And this:

Is there any explanation for this?

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

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

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

I am currently trying to solve Problem E Croc Champ 2013 Qualification Round, and there is strange thing happen:

My solution time out at test 30, but when I opened other's solutions, their solutions only have 27 tests, some have 28 tests, but none have more than 28 tests. Any body know why?

Update 1: try to copy and resubmit some accepted codes (sorry guys) and all of those solutions also time out at test 30 :(

Update 2: Finally get it accepted, thank you Mike for your help :)

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

Теги bug
  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

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

My solution has time complexity O(n^3) and I have taken a look at the editorial, it also has the same time complexity, however, my solution cannot pass the time limit. Can someone give me some hint about this?

Submission link

Solution


PrintWriter out = new PrintWriter(System.out); Scanner in = new Scanner(); int n = in.nextInt(); int m = in.nextInt(); int b = in.nextInt(); MOD = in.nextInt(); int[] data = new int[n]; for (int i = 0; i < n; i++) { data[i] = in.nextInt(); } dp = new int[2][n][b + 1]; int cur = 1; for (int i = n - 1; i >= 0; i--) { if (i + 1 < n) { for (int j = 0; j <= b; j++) { dp[0][i][j] += dp[0][i + 1][j]; dp[0][i][j] %= MOD; } } if (data[i] <= b) { dp[0][i][data[i]]++; dp[0][i][data[i]] %= MOD; } } for (int i = 1; i < m; i++) { for (int j = n - 1; j >= 0; j--) { for (int k = b; k >= 0; k--) { dp[cur][j][k] = 0; if (j + 1 < n) { dp[cur][j][k] += dp[cur][j + 1][k]; dp[cur][j][k] %= MOD; } if (k + data[j] <= b) { dp[cur][j][k + data[j]] += dp[1 - cur][j][k]; dp[cur][j][k + data[j]] %= MOD; } } } cur = 1 - cur; } long result = 0; for (int i = 0; i <= b; i++) { result += dp[1 - cur][0][i]; result %= MOD; } out.println(result); out.close();

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

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

Автор alibaba, 10 лет назад, По-английски

Today, when I try to solve this problem E. Pashmak and Graph, with exactly same code (except variable name) I got TLE when using Java 8 but AC when using Java 7, any ideas why?

Submission:

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

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

Автор alibaba, 10 лет назад, По-английски

I am trying to solve 1000 pt problem and I have doubt about the sample case:

{2, 7, 3, 0, 6, 4, 5, 1} Returns: {1, 7, 3, 0, 6, 2, 5, 4 }

But when I manually solved it, I found a better permutation {1,7,3,0,2,4,5,6}. So is the problem correct? Any one can help?

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

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