01 2022 档案
摘要:#include<bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int ans = 0; for(int i = 0; i < 26; i++){//暴力枚举 bitset<32> bits;//记录 A -
阅读全文
摘要:http://c.biancheng.net/view/7236.html
阅读全文
摘要:https://blog.csdn.net/sodacoco/article/details/84798621
阅读全文
摘要:#include <iostream> #include <cstring> #include <algorithm> #define x first #define y second using namespace std; typedef pair<int, int> PII; const in
阅读全文
摘要:数组字符串和string转成int的函数 string s="123"; char a[4]; //改成a[3]后会有灵异事件发生 a[0]='1',a[1]='2',a[2]='3'; cout<<atoi(a)<<endl; cout<<stoi(s); return 0;
阅读全文
摘要:当一个图每个点的度数都小于等于2时,那么这个图是环图(此图只有若干个不相交的环和非分支路构成) https://www.acwing.com/problem/content/1931/
阅读全文
摘要:对于两个互质的正整数a,b;则a,b所能不能构成的最大数为(a-1)*(b-1)-1; 1205. 买不到的数目 - AcWing题库
阅读全文
摘要:#include<bits/stdc++.h> using namespace std; const int N=100010; typedef long long ll; int sum[N],a[N],res[N]; int n,k; ll ans=0; int main(){ cin>>n>>
阅读全文
摘要:https://blog.csdn.net/Code_beeps/article/details/91488526
阅读全文
摘要:class Solution { public: int Fibonacci(int n) { double c1 = (1.0 + sqrt(5)) / 2, c2 = (1.0 - sqrt(5)) / 2; return (int)((pow(c1, n) - pow(c2, n)) / sq
阅读全文
摘要:https://www.cnblogs.com/wkfvawl/p/9429128.html https://blog.csdn.net/zhouxinxin0202/article/details/77862615/
阅读全文
摘要:94. 递归实现排列型枚举 - AcWing题库 int main() { int n; cin>>n; int a[10]; for(int i=0;i<n;i++)a[i]=i+1; do{ for(int i=0;i<n;i++)cout<<a[i]<<' '; cout<<endl; }wh
阅读全文