摘要:
不能直接两重循环数据是1e5会超时 这样 #include"bitsdc++.h" using namespace std; const int N=1e5+10; double a[N],s[N]; double ans; int main() { int n; cin>>n; for(int i 阅读全文
摘要:
#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 阅读全文
摘要:
#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 阅读全文