2901: 查找特定的值
摘要:```#include
using namespace std;
int n,x,N[100000];
int main(){
cin>>n;
for( int i=1;i>N[i];
……
题解 2901: 查找特定的值
摘要: #include
using namespace std;
int c,b,d,sum=1;
int a[200000];
int main(){
……
题解 2901: 查找特定的值
摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;const int N = 1e7;ll……
2901: 查找特定的值
摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;typedef long long ll;const ll N=1e7;ll a[N……
2901: 查找特定的值
摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;typedef long long ll;const ll N=1e7;ll a[N……
全部遍历后再输出-1
摘要:解题思路:注意cout出-1的位置,如果是在if下面,即意味着单次判断无x即直接-1,而实际上应该是全部遍历后再判断。注意事项:参考代码:#include<iostream>
using names……
2901: 查找特定的值
摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>typedef long long ll;const int N=1e7;ll a[N];using namespace s……
2901: 查找特定的值
摘要:```cpp
#include
#include
using namespace std;
int main()
{
int m,n,a[10000],i=0;
mems……
编写题解 2901: 查找特定的值
摘要:解题思路: 1、创建三个变量(int n输入个数,m目标 bool z用于判断是否有目标数=false) 2、创建一个数组a[10001] 3、输入输入个数变量n 4、循环输入a数组的第i项 5、输入……