题不难
2025-05-23 21:37:04
发布于:天津
2阅读
0回复
0点赞
老规矩 上图
#include<iostream>
using namespace std;
struct it
{
string name;
bool man_woman;
string so_long_no;//long long是hold(其实就是承受)不住18位的数,这个‘位’可不是8/1 byte
}abc[1001];
int main ()
{
int n;
cin >>n;
for(int i=0;i<n;i++)
{
cin >>abc[i].name>>abc[i].man_woman>>abc[i].so_long_no;
if(abc[i].man_woman!=0)
{
cout <<abc[i].name<<" "<<abc[i].so_long_no<<endl;
}
}
return 0;
}
其实这题没有任何难点
就只有一点点坑(不知道为什么通过率怎么这么低)
避开雷点就好,(读题仔细些 不要像我把男女的0,1 都输出了)正常输入输出就行。
(知识点: 1 输入输出 2 结构体 3 结构体数组 4 c++基本知识)
这里空空如也
有帮助,赞一个