随笔分类 -  算法笔记 / 数学

摘要:code: const int N=110; const double eps=1e-7; int n; double a[N][N]; inline bool zero(double x){ return fabs(x)<eps; } int gauss(){ for(int i=1;i<=n;i 阅读全文
posted @ 2025-09-13 14:43 xdhking 阅读(19) 评论(0) 推荐(0)
摘要:模板题:洛谷p1939 code: #include<bits/stdc++.h> using namespace std; typedef long long LL; const int N=5,mod=1e9+7; int n,siz=3; struct matrix{ LL m[N][N]; 阅读全文
posted @ 2025-09-13 14:28 xdhking 阅读(8) 评论(0) 推荐(0)
摘要:洛谷p2252 直接给结论 小!=(大-小)黄金分割比例,先手赢 小==(大-小)黄金分割比例,后手赢 黄金分割比列: \(\frac{\sqrt{5}+1}{2}\) code #include<iostream> #include<algorithm> #include<cmath> using 阅读全文
posted @ 2025-08-18 16:16 xdhking 阅读(12) 评论(0) 推荐(0)