Skip to content

Commit ebfa6ba

Browse files
committed
Optimise
1 parent df48c6d commit ebfa6ba

2 files changed

Lines changed: 3 additions & 15 deletions

File tree

‎burnside.cpp‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#include <bits/stdc++.h>
22
using namespace std;
33

4+
// computes number of cube colorings with k colors
5+
46
int binpow(int a, int n){
57
int ans = 1;
68
while(n){
@@ -11,7 +13,7 @@ int binpow(int a, int n){
1113
return ans;
1214
}
1315

14-
const int k = 6, n = 6;
16+
const int k = 3, n = 6;
1517

1618
vector<int> multiply(vector<int> a, vector<int> b){
1719
vector<int> ans(n);

‎suffix_array.cpp‎

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
#include <bits/stdc++.h>
2-
using namespace std;
3-
41
vector<int> suffix_array(vector<int> s){
52
s.push_back(0);
63
int n = (int) s.size();
@@ -35,14 +32,3 @@ vector<int> suffix_array(vector<int> s){
3532
}
3633
return vector<int>(p.begin()+1, p.end());
3734
}
38-
39-
int main(){
40-
vector<int> s;
41-
42-
int t;
43-
while(cin >> t) s.push_back(t);
44-
45-
vector<int> sa = suffix_array(s);
46-
for(int x : sa)
47-
cout << x << " ";
48-
}

0 commit comments

Comments
 (0)