HDU4451Dressing
来源:互联网 发布:java和js的区别与联系 编辑:程序博客网 时间:2024/06/12 00:10
http://acm.hdu.edu.cn/showproblem.php?pid=4451
12jinhua
#include <cstdio>#include <cstring>#include <cmath>#include <map>#include <set>#include <vector>#include <iostream>#include <cstdlib>#include <algorithm>#include <string>#include <queue>#include <list>#include <stack>using namespace std;#define NN 16384#define INF 0x7ffffff#define N 1005#define eps 1e-6#define pi 3.14159265358979626//const double pi=acos(-1);const double g=9.8;int n,m,k,p1,pant[N][3];int main(){ //freopen("a.c","r",stdin); char st1[10],st2[10]; while (1) { scanf("%d%d%d",&n,&m,&k); if (n==0 && m==0 && k==0) break; memset(pant,0,sizeof(pant)); scanf("%d",&p1); int a,b,p=0,q=0; for (int i=1;i<=p1;i++) { scanf("%s %d %s %d",st1,&a,st2,&b); if (st1[0]=='c') { p++; pant[b][1]++; } else if (st2[0]=='s') { q++; pant[a][2]++; } } int ans=n*m*k,tp=0; for (int i=1;i<=m;i++) tp+=pant[i][1]*pant[i][2]; ans=ans-p*k-q*n+tp; printf("%d\n",ans); } return 0;}
- HDU4451Dressing
- HDU4451Dressing(计数)
- spring 3.0 mvc
- java学习路线及一些网络资源
- Struts2 escape属性
- HDU 1429 胜利大逃亡(续) BFS+状态压缩
- Hibernate_001_初印象_原理图
- HDU4451Dressing
- log4j的简单配置单
- java冒泡_选择_插入三大排序
- 合理的嵌入式开发学习路线
- vmware tool 在centos 下的命令行安装
- 关于Linux下root用户密码遗忘的解决办法
- jellybean的suspend策略变动
- 假如我是陈一舟--我的大社交生态系统战略
- Problem D: Automatic Editing