File tree Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ // https://youtu.be/L8grWxBlIZ4?t=9858
2
+ // https://youtu.be/ERZuLAxZffQ?t=4765
3
+ const int mod = 1000000007 ;
4
+ struct mint {
5
+ ll x;
6
+ mint (ll x=0 ):x(x%mod){}
7
+ mint& operator +=(const mint a) {
8
+ if ((x += a.x ) >= mod) x -= mod;
9
+ return *this ;
10
+ }
11
+ mint& operator -=(const mint a) {
12
+ if ((x += mod-a.x ) >= mod) x -= mod;
13
+ return *this ;
14
+ }
15
+ mint& operator *=(const mint a) {
16
+ (x *= a.x ) %= mod;
17
+ return *this ;
18
+ }
19
+ mint operator +(const mint a) const {
20
+ mint res (*this );
21
+ return res+=a;
22
+ }
23
+ mint operator -(const mint a) const {
24
+ mint res (*this );
25
+ return res-=a;
26
+ }
27
+ mint operator *(const mint a) const {
28
+ mint res (*this );
29
+ return res*=a;
30
+ }
31
+ };
Original file line number Diff line number Diff line change
1
+ #include < bits/stdc++.h>
2
+ using namespace std ;
3
+
4
+ int main () {
5
+ return 0 ;
6
+ }
You can’t perform that action at this time.
0 commit comments