帮忙看看为什么70分
  • 板块灌水区
  • 楼主ak_99
  • 当前回复0
  • 已保存回复0
  • 发布时间2023/11/9 13:14
  • 上次更新2023/11/9 16:27:55
查看原帖
帮忙看看为什么70分
641400
ak_99楼主2023/11/9 13:14
#include<bits/stdc++.h>
using namespace std;
int a[100005],b[100005];
long long n,m,k,h=1000000,l,o=1000000,p,t,r,f[600][600];
int main(){
	cin>>n;
	for(int i=1;i<=n;i++){
		cin>>k>>l;
		f[k+100][l+100]=1;
		if(p<k)p=k;
		if(o>k)o=k;
		if(m<l)m=l;
		if(h>l)h=l;
	}
	for(int i=m;i>=h;i--){
		for(int j=o;j<=p;j++){
			if(f[j+100][i+100]==1)cout<<"*";
			else if(i==0&&j==0)cout<<"+";
			else if(i==0)cout<<"-";
			else if(j==0) cout<<"|";
			else cout<<".";
		}
		cout<<endl;
	}
	return 0;
} //c++

网址链接http://129.204.76.243/problem.php?cid=1176&pid=1

2023/11/9 13:14
加载中...