- 题解
- 2023-12-05 21:30:54 @
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
int x,y;
char m;
int xmax=x,xmin=1000,ymax=y,ymin=1000;
for(int i=1;i<=n;i++)
{
cin>>x>>m>>y;
if(x<xmin)
xmin=x;
if(x>xmax)
xmax=x;
if(y<ymin)
ymin=y;
if(y>ymax)
ymax=y;
}
cout<<xmin-1<<","<<ymin-1;
cout<<endl;
cout<<xmax+1<<","<<ymax+1;
return 0;
}
2 条评论
-
陆超琦 LV 4 @ 2023-12-06 17:17:28
《input1.txt》
-
2023-12-05 21:33:36@
可以的,应该是正确的
- 1