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

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

i'm doing this question: The equation x1 + x2 + ... + xk = n, where x1, x2, x3, ..., xk are positive integer variables satisfying the constraint: xi > = ci > 0. Given n, k,c1 ,c2 ,,…,ck, count the number of ways satisfy modulo MOD. ie: x1+x2+x3=7, c1=1, c2=2, c3=3, MOD=100, number of ways is 3. It's a normal question, i now it's is f(n-(k-sum_of_all(c))-1,n-1)%MOD but modular inverse (O(nlogn) solution) only satify when MOD is a prime number. And another O(n^2) solutions can't pass the time limit. Please give me hints or somethings, thank you senpai <3.

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

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

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

I found this from main page: "We have been made aware that gmail has recently stopped accepting some emails from the USACO server -- e.g., for new accounts and password resets. If this issue is affecting you, please try adding usaco@usaco.org to your gmail contacts list. If you are still having issues, please notify the contest director, Brian Dean (bcdean@clemson.edu). If you have recently received an email from the USACO server such as a password reset email or an account creation email, consider starring it, so that gmail will hopefully treat USACO emails with better priority." So, how to create new USACO account?

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

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

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

give a string, count how many repeating substring in this string, in another words, count substring appear >=2 times, and characters of substring can overlap. n<=1e5 Example: aaaaa, answer is 4, substrings are: a,aa,aaa,aaaa. aabaab, answer is 5, substrings are: a,b,aa,ab,aab. I only can solve it with O(n^2) solution and of course, it gives TLE. How to solve it in < O(n^2) time complexity? You can submit in here: https://www.spoj.com/PTIT/submit/PTIT015J/

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

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

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

here is my solution: https://mirror.codeforces.com/contest/1624/submission/144304382 for this problem: https://mirror.codeforces.com/contest/1624/problem/E I think time complexity of this solution is O(n*m) is small enough, but why this still give TLE? Thanks you for read my shi* blog.

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

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