题目:
思路:
只需要找出两国的城池坐标的最值,通过比较最值判断是否有交际就可
(小白所写,不喜勿喷)
#include#include #include using namespace std; int main() { int n,m,x,y; cin>>n>>m>>x>>y; vector arrx; vector arry; int temp; for (int i =0;i >temp; arrx.push_back(temp); } arrx.push_back(x); for (int i =0;i >temp; arry.push_back(temp); } arry.push_back(y); sort(arrx.rbegin(),arrx.rend()); sort(arry.begin(),arry.end()); if (arrx[0] < arry[0]) cout< 附测试点:
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)