Giter Club home page Giter Club logo

Comments (12)

hos-lyric avatar hos-lyric commented on May 24, 2024 1

φ(m) がいろんな素因数で割れるとき速い,みたいな方法はあるので,複数ケースで時間計るのは要注意という話があります
https://ja.wikipedia.org/wiki/安全素数
https://en.wikipedia.org/wiki/Pohlig–Hellman_algorithm

from library-checker-problems.

hos-lyric avatar hos-lyric commented on May 24, 2024 1
0 2 4

で 1 と言いませんか

ちゃんと読んでないけど m が素数じゃないとき全然ダメな気がします

from library-checker-problems.

beet-aizu avatar beet-aizu commented on May 24, 2024 1

個人的には両方ほしいです 実装量がかなり変わる奴はICPCでは使い分けるので(最小有向全域木のO(VE) とO(E log V)とか

from library-checker-problems.

yosupo06 avatar yosupo06 commented on May 24, 2024 1

#78

from library-checker-problems.

yosupo06 avatar yosupo06 commented on May 24, 2024

2 <= m -> 1 <= m

from library-checker-problems.

yosupo06 avatar yosupo06 commented on May 24, 2024

sqrt(10^9) logで100ケースも動くか?

from library-checker-problems.

hos-lyric avatar hos-lyric commented on May 24, 2024

unordered_map なら log が消えるみたいな主張 (うーん)

from library-checker-problems.

yosupo06 avatar yosupo06 commented on May 24, 2024

問題概要

  • 問題ID: discrete_logarithm
  • 問題名: Discrete Logarithm

Tケース与えられる。

x, y, mが与えられる。x^k = y (mod m)なるkのうち、最小を答えよ(存在しない場合-1)

入力

T
x y m
x y m
:
x y m

出力

各行に求めたもの

制約

1 <= T <= 100?(速度見ながら調整)
1 <= m <= 10^9
0 <= x, y < m

from library-checker-problems.

yosupo06 avatar yosupo06 commented on May 24, 2024

バグ確認!

from library-checker-problems.

yosupo06 avatar yosupo06 commented on May 24, 2024

0^0が未定義 1です

from library-checker-problems.

yosupo06 avatar yosupo06 commented on May 24, 2024

巡回に入るまでが長いケース、x = 2でmod = 2^29など

from library-checker-problems.

yosupo06 avatar yosupo06 commented on May 24, 2024

もっと大きい制約で解けた どうすっかな

https://loj.ac/problem/6542
http://elliptic-shiho.hatenablog.com/entry/2016/12/02/051931

from library-checker-problems.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.