
Bzoj
我是一位爱编程的蒟蒻
我是一位爱编程的蒟蒻
展开
-
Bzoj 2396. 神奇的矩阵
rand函数:生成随机数srand(time(0)): 生成随机数种子Miller_rabin思想#include <stdio.h>#include <stdlib.h>#include <time.h>#include <stdbool.h>const int N = 1010;int a[N][N], b[N][N], c[N][N], d[N][N];int e[N][N], f[N][N];int g[N][N], h[N][N原创 2021-10-24 11:12:21 · 132 阅读 · 0 评论 -
Bzoj 2969 矩阵粉刷
思想:期望,概率#include <bits/stdc++.h>using namespace std;double P[1010][1010];const double eps = 1E-9;double quick_power(double a, int b){ if (b == 0) return 1; double ans = quick_power(a, b >> 1); ans = ans * ans; i.原创 2021-10-24 10:28:04 · 234 阅读 · 1 评论