博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
1036. Boys vs Girls (25)
阅读量:4071 次
发布时间:2019-05-25

本文共 648 字,大约阅读时间需要 2 分钟。

题目链接:https://www.patest.cn/contests/pat-a-practise/1036
#include 
#include
#include
#include
#include
#include
#include
using namespace std;struct Node{ char name[11],id[11],sex; int grade;};int main(){ int n; scanf("%d",&n); vector
male,female; for (int i=0; i
b.grade; }); bool flag = false; if(female.size()) printf("%s %s\n",female[0].name,female[0].id); else{ printf("Absent\n"); flag = true; } if(male.size()) printf("%s %s\n",male[0].name,male[0].id); else{ printf("Absent\n"); flag = true; } if(flag) printf("NA\n"); else printf("%d\n",female[0].grade-male[0].grade); return 0;}

转载地址:http://uqhji.baihongyu.com/

你可能感兴趣的文章
数据库索引介绍及使用
查看>>
MongoDB数据库插入、更新和删除操作详解
查看>>
MongoDB文档(Document)全局唯一ID的设计思路
查看>>
mongoDB简介
查看>>
Redis持久化存储(AOF与RDB两种模式)
查看>>
memcached工作原理与优化建议
查看>>
Redis与Memcached的区别
查看>>
redis sharding方案
查看>>
程序员最核心的竞争力是什么?
查看>>
Node.js机制及原理理解初步
查看>>
linux CPU个数查看
查看>>
分布式应用开发相关的面试题收集
查看>>
简单理解Socket及TCP/IP、Http、Socket的区别
查看>>
利用HTTP Cache来优化网站
查看>>
利用负载均衡优化和加速HTTP应用
查看>>
消息队列设计精要
查看>>
分布式缓存负载均衡负载均衡的缓存处理:虚拟节点对一致性hash的改进
查看>>
分布式存储系统设计(1)—— 系统架构
查看>>
MySQL数据库的高可用方案总结
查看>>
常用排序算法总结(一) 比较算法总结
查看>>