POJ 1547 Clay Bully
来源:互联网 发布:mysql怎么存储图片 编辑:程序博客网 时间:2024/05/20 09:27
水题。
#include <stdio.h>#include <string.h>#include <math.h>#include <iostream>#include <algorithm>#define mem(a) memset(a, 0, sizeof(a))#define inf 100000005using namespace std;int clay[10][3];char ch1[10][10];int main(){ int n, i, mins, maxs, mul, imi, ima; for(;;) { mem(clay); mem(ch1); mins = inf; maxs = 0; scanf("%d",&n); if(n == -1) break; for(i = 0;i < n;i++) { scanf("%d%d%d%s", &clay[i][0], &clay[i][1], &clay[i][2], ch1[i]); mul = clay[i][0] * clay[i][1] * clay[i][2]; if(mins > mul) mins = mul, imi = i; if(maxs < mul) maxs = mul, ima = i; } printf("%s took clay from %s.\n", ch1[ima], ch1[imi]); } return 0;}
0 0
- POJ 1547 Clay Bully
- POJ 1547:Clay Bully
- POJ 1547 Clay Bully G++
- Clay Bully-1547
- POJ 1547 Clay Bully 结构体数组使用题意理解
- ZOJ 1755 && POJ 1547 Clay Bully(简单排序+map容器)
- pku_1547 Clay Bully
- ZOJ 1755 Clay Bully
- zoj 1755 Clay Bully
- ZOJ 1755 Clay Bully
- zoj 1755 Clay Bully
- 北大ACM poj1547 Clay Bully
- zoj 1755 Clay Bully(水~)
- ZOJ Problem Set - 1755 Clay Bully
- 网霸 cyber-bully
- 狱霸 jailhouse bully
- 1755_Clay Bully
- FW: Yudan ,a big bully and monster ?
- 蓝桥杯 串的简单处理
- 使用logstash+elasticsearch+kibana快速搭建日志平台
- 初入FreeSWITCH
- Microsoft Visio Premium 2010 VOL(大客户)简体中文高级版32位/64位下载+激活破解方法
- JavaScript中的匿名函数及函数的闭包
- POJ 1547 Clay Bully
- LeetCode 005 Longest Palindromic Substring
- SQLServer 中查看类型与其他DB类型的对应
- hdu2874 非连通的LCA
- PE 24 Lexicographic permutations
- JVM学习之:GC的算法简述
- cocos2dx 3.4 lua加密 setXXTEAKeyAndSign
- 谈谈Android重打包--初语
- MapReduce:详解Shuffle过程