Leetcode 957. Prison Cells After N Days 两种方法实现(找循环节 and 矩阵快速幂)
实现1(循环节)
class Solution {
public:
static const int NUM = 8;
void to_vector(const bitset<NUM>& x, vector<int>& out){
for (int i = 0; i < NUM; i++){
ou...
原创
2019-04-24 00:29:14 ·
592 阅读 ·
0 评论