aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTa180m2020-06-15 10:26:56 -0500
committerTa180m2020-06-15 10:26:56 -0500
commitf25ac89ddafe14868683361bc1861aaa1fc116ff (patch)
treeade302116bf70ba6a04315fd3afade0fc62117cf
parent6cc7940d64234fc361629a5e1578c23a5c46266d (diff)
update
-rw-r--r--Math/numtheory.cpp3
-rw-r--r--Template/basic.cpp6
2 files changed, 5 insertions, 4 deletions
diff --git a/Math/numtheory.cpp b/Math/numtheory.cpp
index 21444a2..3fd6111 100644
--- a/Math/numtheory.cpp
+++ b/Math/numtheory.cpp
@@ -6,8 +6,7 @@ int pw(int base, int exp) {
int res = 1;
while (exp) {
if (exp & 1) res = (ll)base * res % MOD;
- exp >>= 1;
- base = (ll)base * base % MOD;
+ exp >>= 1, base = (ll)base * base % MOD;
}
return res;
}
diff --git a/Template/basic.cpp b/Template/basic.cpp
index 3a0a673..ee303ba 100644
--- a/Template/basic.cpp
+++ b/Template/basic.cpp
@@ -2,10 +2,12 @@
#define f first
#define s second
using namespace std;
-typedef long long ll;
-typedef pair<int, int> ii;
+using ll = long long;
+using ii = pair<int, int>;
int main() {
// if (fopen("in", "r")) freopen("in", "r", stdin), freopen("out", "w", stdout);
+ ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
+
}