Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arithmetic operations between primitive and modint #139

Open
TonalidadeHidrica opened this issue Nov 13, 2024 · 3 comments
Open

Arithmetic operations between primitive and modint #139

TonalidadeHidrica opened this issue Nov 13, 2024 · 3 comments

Comments

@TonalidadeHidrica
Copy link
Collaborator

It would be convenient if we could u32 + Modint, and so on.

@TonalidadeHidrica
Copy link
Collaborator Author

Currently Modint + u32 is implemented, but not vice versa.

@koba-e964
Copy link
Collaborator

Personally I, as a Rust competitive programmer, doubt it's useful. I assume that in expressions like x + y, x and y have the same type. This change will break the assumption.

@koba-e964
Copy link
Collaborator

Well, I contradicted myself: https://github.com/koba-e964/contest/blob/324d28f4c6704e4f21630e85ea07ac8396fd8320/comm/MInt.rs#L30-L47

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants