hhh

pipixia 2020-11-17 14:23:27 2022-03-26 10:30:24 13 返回题目

#include<bits/stdc++.h>
using namespace std;
int main()
{
	cout<<"Windows PowerShell"<<endl;
    cout<<"版权所有 (C) Microsoft Corporation。保留所有权利。"<<endl;
	cout<<"PS C:\windows\system32> ";
	char a[1000];
	while(gets(a))
	{
		int len=strlen(a);
		a[len]='\0';
		cout<<a;
		cout<<" : 无法将“";
		cout<<a;
		cout<<"”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后"<<endl;
		cout<<"再试一次。"<<endl;
        cout<<"所在位置 行:1 字符: ";
        cout<<len;
		cout<<endl;
		cout<<"+ ";
		puts(a);
		cout<<endl;
		cout<<"+ ~"<<endl;
    	cout<<"+ CategoryInfo          : ObjectNotFound: (retyrtu:String) [], CommandNotFoundException"<<endl;
    	cout<<"+ FullyQualifiedErrorId : CommandNotFoundException"<<endl;
    	cout<<"PS C:\windows\system32> ";
	}
    return 0;
}
{{ vote && vote.total.up }}

共 4 条回复

X-zonghongrui

正确答案 #include <bits/stdc++.h> using namespace std; const int maxn=10000+10; int x[maxn],y[maxn],g[maxn],k[maxn]; int a,b,p,n; int main(){ cin>>n; for(int i=1;i<=n;i++) cin>>x[i]>>y[i]>>g[i]>>k[i]; cin>>a>>b; p=-1; for(int i=n;i>=1;i--){ if(a>=x[i] && a<=x[i]+g[i] && b>=y[i] && b<=y[i]+k[i]){ p=i; break; } } cout<<p; return 0; }

X-zonghongrui

错了😶

X-wangyiquan

。。。。。。

061wuhanlin

......