delete pics to save space
This commit is contained in:
41
history_source/信息学奥赛一本通/1.6.1.3.cpp
Normal file
41
history_source/信息学奥赛一本通/1.6.1.3.cpp
Normal file
@ -0,0 +1,41 @@
|
||||
#include<cstdio>
|
||||
using namespace std;
|
||||
struct string
|
||||
{
|
||||
char s[10];
|
||||
int len=0;
|
||||
};
|
||||
struct persons
|
||||
{
|
||||
string name;
|
||||
double t;
|
||||
bool k;
|
||||
};
|
||||
int main()
|
||||
{
|
||||
int n;
|
||||
char w;
|
||||
scanf("%d",&n);
|
||||
persons person[n];
|
||||
for(int i=0;i<n;i++)
|
||||
{
|
||||
w=getchar();
|
||||
while(w=getchar(),w!=' ') person[i].name.s[person[i].name.len++]=w;
|
||||
scanf("%lf",&person[i].t);
|
||||
scanf("%d",&person[i].k);
|
||||
}
|
||||
int sum=0;
|
||||
for(int i=0;i<n;i++)
|
||||
{
|
||||
if(person[i].k&&person[i].t>=37.5)
|
||||
{
|
||||
sum++;
|
||||
for(int j=0;j<person[i].name.len;j++)
|
||||
printf("%c",person[i].name.s[j]);
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
printf("%d\n",sum);
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user