Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // I can't tell you what it really is,
- // I can only tell you what it feels like.
- #include "bits/stdc++.h"
- using namespace std;
- #define int long long
- #define F first
- #define S second
- #define sz(x) ((int)x.size())
- #define rep(i,a,n) for (int i = a; i <= n; ++i)
- #define all(v) v.begin(), v.end()
- #define pb push_back
- #define P pair < int, int >
- #define E cout << '\n'
- int add(int, int);
- int mul(int, int);
- int po(int, int);
- const int mod = 1e9 + 7;
- const int N = 4e5 + 5;
- int a[N];
- inline void solve() {
- }
- signed main() {
- ios_base::sync_with_stdio(0);
- cin.tie(NULL);
- cout.tie(NULL);
- int t = 1;
- //cin >> t; while(t--)
- solve();
- return 0;
- }
- inline int add(int x, int y) {
- if (x >= mod) x %= mod;
- if (y >= mod) y %= mod;
- x += y;
- return (x >= mod ? x - mod : x);
- }
- inline int mul(int x, int y) {
- if (x >= mod) x %= mod;
- if (y >= mod) y %= mod;
- return (x*y) % mod;
- }
- int po(int x, int n) {
- int res = 1;
- for (;n > 0;) {
- if (n & 1) {
- res = mul(res, x);
- }
- x = mul(x, x);
- n /= 2;
- }
- return res;
- }
Add Comment
Please, Sign In to add comment