hdu4178 乱搞
2024-09-02 15:48:24
#include<stdio.h>
#include<string.h>
#define maxn 100
char name[maxn];
char s[];
int main()
{
int i,j,t,n,ff=,flag;
int y1,y2,y3,y4;//无错 有错 全错 缺席
scanf("%d",&t);
while(t--)
{
scanf("%d",&n);
y1=y2=y3=y4=;
for(i=;i<n;i++)
{
flag=;
scanf("%s",name);
int temp=;
if(getchar()=='\n')
flag=;
int tt=;
while()
{
if(flag)break;
scanf("%s",s);
temp++;
if(strcmp(s,"")==)break;
if(s[]=='y')
{
tt=;
if(temp==)
{
y1++;
}
else
{
y2++;
}
break;
}
if(temp==)break;
}
if(temp==)
y4++;
if(!tt&&temp!=)
y3++;
}
printf("Roll-call: %d\n",++ff);
printf("Present: %d out of %d\n",y1,n);
printf("Needs to study at home: %d out of %d\n",y2,n);
printf("Needs remedial work after school: %d out of %d\n",y3,n);
printf("Absent: %d out of %d\n",y4,n);
}
}
最新文章
- 【AR实验室】OpenGL ES绘制相机(OpenGL ES 1.0版本)
- Android QQ群:343816731 欢迎大家加入探讨
- sql server 2008 操作数据表
- vb.net-三种将datagridview数据导出为excel文件的函数
- android几种定时器机制及区别
- java 5 ReadWriteLock
- MySQL :: MySQL 5.0 Reference Manual :: 14.4 The MEMORY (HEAP) Storage Engine
- js/jQuery实现类似百度搜索功能
- DNS查询相关
- Python的协程
- 让 Python 的1、数据库查询返回字典记录--- 2、利用zip函数将两个列表(list)组成字典(dict)
- Got error on conf /etc/mha/app1.cnf: Parameter name master_ip_failover_scrip is invalid!
- Java的基础知识三
- 【转】如何使用分区助手完美迁移系统到SSD固态硬盘?
- PHP 开发者的 Docker 之旅
- 最长上升子序列 nlogn
- BZOJ5473: 仙人掌
- Struts2 分割字符串标签s:generator
- [转]Extending the User Interface in Outlook 2010
- 解析文本文件 ";r"; 与 ";rb"; 模式的区别(Python)
热门文章
- Linux Shell脚本经典案例
- c/c++ explicit用法
- 获得浏览器User-agent的方法
- SpringCloud微服务实战二:Spring Cloud Ribbon 负载均衡 + Spring Cloud Feign 声明式调用
- Lab2 内存管理(实现细节)
- Javaweb项目中出现java.sql.SQLException: The server time zone value &#39;�й���ʱ��&#39; is unrecognized or represents more than one time zone.异常
- Leetcode16.3Sum Closest最接近的三数之和
- JavaScript Libraries In A TypeScript Application, Revisited
- Hdu 1045 二分匹配
- laravel-admin 安装(总结)