04 2022 档案
摘要:#include"bits/stdc++.h" using namespace std; const int N=100010; long long ans,n,p; long long a[N]; int main() { cin>>n>>p; for(int i=0;i<n;i++) cin>>
阅读全文
摘要:说实话这个题审题把我卡了半天,还是我太菜 直接上代码吧 偷个懒用万能库。 #include"bits/stdc++.h" using namespace std; int mp[1010][1010]; int n,m; int dx[8]={1,1,1,0,0,-1,-1,-1},dy[8]={-
阅读全文
摘要:#include"bits/stdc++.h" using namespace std; int mp[110][110]; bool vis[110][110]; int dx[4]={1,-1,0,0},dy[4]={0,0,1,-1}; struct point { int x,y; }; i
阅读全文
摘要:1044 火星数字 (20 分) 火星人是以 13 进制计数的: 地球人的 0 被火星人称为 tret。地球人数字 1 到 12 的火星文分别为:jan, feb, mar, apr, may, jun, jly, aug, sep, oct, nov, dec。火星人将进位以后的 12 个高位数字
阅读全文
摘要:题目 1039 到底买不买 小红想买些珠子做一串自己喜欢的珠串。卖珠子的摊主有很多串五颜六色的珠串,但是不肯把任何一串拆散了卖。 于是小红要你帮忙判断一下,某串珠子里是否包含了全部自己想要的珠子?如果是,那么告诉她有多少多余的珠子; 如果不是,那么告诉她缺了多少珠子。 为方便起见,我们用[0-9]、
阅读全文
摘要:#include"bits/stdc++.h" using namespace std; int main() { int a,b[105]={0}; long i,n,K; cin>>n; for(i=0;i<n;i++) { cin>>a; b[a]++; } cin>>K; int c[K];
阅读全文
摘要:#include"stdio.h" #include"string.h" int main() { int flag=1; char w[100010],ch[100010]; int a[200]={0}; gets(w); gets(ch); int t1=strlen(w),t2=strlen
阅读全文