index
:
tcr
master
Team Contest Reference
summary
refs
log
tree
commit
diff
log msg
author
committer
range
path:
root
/
math
/
shortModInv.cpp
blob: 747eb7a6849ea3000042532e889a2a65c434188a (
plain
)
1
2
3
ll
inv
(
ll a
,
ll b
){
// a^{-1} mod b
return
1
<
a
?
b
-
inv
(
b
%
a
,
a
) *
b
/
a
:
1
;
}