jinziyang5735 @ 2024-08-24 16:49:31
#include<bits/stdc++.h>
using namespace std;
int main()
{
std::ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int n,m,k[1000000];
cin>>n>>m;
for(int i=1;i<=m;i++){
cin>>k[i];
if(k[i]%2!=1){
cout<<k[i]<<endl;
}
}
return 0;
}
by untitled_cpp @ 2024-08-24 16:51:27
为什么你都using了还要std::? @jinziyang5735
by ECEG @ 2024-08-24 16:51:44
定义在外面
by untitled_cpp @ 2024-08-24 16:51:59
而且数组写主函数里面。。。不敢恭维
by shanxiwen @ 2024-08-24 16:52:05
k数组开全局,否则会导致不输入等玄学问题(你这代码是这道题的吗喵
by yuyc @ 2024-08-24 17:15:11
也可以尝试开大栈空间