随笔分类 - 蓝桥杯
摘要:在一连串不定长的数字中找出断号和重号的输出 数据保证只有唯一解 1 #include <iostream> 2 #include <algorithm> 3 using namespace std; 4 const int N=1e5+10; 5 int ID[N],cnt,Bucket[N],Ma
阅读全文
摘要:1 #include <bits/stdc++.h> 2 using namespace std; 3 const int N=1e4; 4 int A[N],W[N],num[10]={0,1,2,-1,-1,5,9,-1,8,6}; 5 int change(int x){ 6 int a=x%
阅读全文
摘要:这么水的题,唉,三种方法花式过,考的是思维吧?滑稽 1 #include <iostream> 2 using namespace std; 3 int dp[10][10]; 4 int f(int x,int y){ 5 if(x==1||y==1)return 1; 6 return f(x-
阅读全文
摘要:1 #include <bits/stdc++.h> 2 using namespace std; 3 bool vis[15]; 4 bool check(long long a,long long b){ 5 memset(vis,0,sizeof(vis)); 6 while(a) 7 if(
阅读全文
摘要:1 #include <bits/stdc++.h> 2 using namespace std; 3 bool Check(int y){return (y%4==0&&y%100)||(y%400==0);} 4 void calc(int Y,int M,int D,int x){ 5 int
阅读全文
摘要:1 /* 2 3 购物清单 4 5 小明刚刚找到工作,老板人很好,只是老板夫人很爱购物。 6 老板忙的时候经常让小明帮忙到商场代为购物。 7 小明很厌烦,但又不好推辞。 8 9 这不,XX大促销又来了!老板夫人开出了长长的购物单,都是有打折优惠的。 10 小明也有个怪癖,不到万不得已,从不刷卡,直接
阅读全文
摘要:1 #include <cstdio> 2 int a[10],copy[10],cnt,ans,flag; 3 bool check(){ 4 int sum=a[1]+a[2]+a[3]; 5 if(sum!=a[4]+a[5]+a[6])return false; 6 if(sum!=a[1]
阅读全文
摘要:1 #include <cstdio> 2 #include <string> 3 #include <cstring> 4 #include <iostream> 5 using namespace std; 6 typedef long long ll; 7 ll num,k=10,ans;in
阅读全文
摘要:忘了改矩阵的大小居然还有33分,我醉了 1 #include <cstdio> 2 const int N=35; 3 struct Matrix{int a[N][N];}; 4 int n,m; 5 Matrix A,O,I; 6 Matrix Mul(Matrix A,Matrix B){ 7
阅读全文
摘要:Fibonacci数列,快速幂 1 #include <cstdio> 2 struct Matrix{int a[5][5];}; 3 const int N=2,MOD=10007; 4 Matrix A,B,O,I; 5 Matrix Mul(Matrix A,Matrix B){ 6 Mat
阅读全文

浙公网安备 33010602011771号