Poj 2403 Hay Points(Map)】的更多相关文章

一.题目大意 实现一个工资计算系统.工资的计算规则是:首先,给定一些关键字和对应的价值,这个相对于字典.然后给出的是求职者的描述,如果这个描述中包含关键字则加上对应的价值,总得价值就是这个求职者的工资. 二.题解 实现很简单,把关键字和价值用一个Map先存起来,然后依次读取描述,关键字相同则加上价值量. 三.java代码 import java.util.HashMap; import java.util.Scanner; public class Main{ public static voi…
Hay Points Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 5735   Accepted: 3695 Description Each employee of a bureaucracy has a job description - a few paragraphs that describe the responsibilities of the job. The employee's job descri…
Hay Points TimeLimit: 1 Second   MemoryLimit: 32 Megabyte Totalsubmit: 1022   Accepted: 602 Description Each employee of a bureaucracy has a job description - a few paragraphs that describe the responsibilities of the job. The employee's job descript…
http://poj.org/problem?id=2403 题意:就是给你m个单词,以及n段对话.每一个单词都有所对应的价值.求对话中的价值总和 题解:很简单,就是用单词和价值对应起来,然后再寻找就可以了. 我用的是STL里的map,不用Map的话,结构体也行.只是用Map比较方便而已. #include <string.h> #include <string> #include <map> #include <iostream> #include <…
题目:http://poj.org/problem?id=2418 在poj 上交题总是有各种错误,再次感叹各个编译器. c++ AC代码,G++为超时,上代码: #include<cstdio> #include<string> #include<map> using namespace std; ]; int main() { map<string,int>mp; map<string,int>::iterator iter;//声明迭代器…
题目:http://poj.org/problem?id=2503 不知道为什么 poj  的 数据好像不是100000,跟周赛的不一样 2000MS的代码: #include <iostream> #include<cstdio> #include<cstring> #include<cstdlib> #include<stack> #include<queue> #include<iomanip> #include&l…
题目链接 http://poj.org/problem?id=2464 题意 在一个二维坐标系上 给出一些点 Stan 先画一条过一点的水平线 Odd 再画一条 过Stan那条水平线上的任一点的垂直线 这两条线将坐标系分成了四个区域 Stan的得分为右上角区域的点数+左下角区域的点数 Ollie的得分为左上角区域的点数+右下角区域的点数 线上的点 不归任何人所有 两人都采用最优策略使得自己的点数最大 最后输出 Stan的最大点数 以及在Stan 这个最大点数的情况下,Ollie能够获得的最大点数…
题目链接:POJ 3805 Problem Description Numbers of black and white points are placed on a plane. Let's imagine that a straight line of infinite length is drawn on the plane. When the line does not meet any of the points, the line divides these points into t…
2464 -- Brownie Points II Problem - 1156 hdu分类线段树的题.题意是,给出一堆点的位置,stan和ollie玩游戏,stan通过其中一个点画垂线,ollie通过在垂线上的点画一条平行线.他们的得分是stan在一三象限中有多少点,ollie在二四象限中共有多少点.在平行线和垂线的点不算任何人的. 开始的时候以为暴力二维线段树,结果发现点的数目也太庞大了.后来想了一想,只是统计这么几个区域,逐个插点就可以的嘛.用一个树状数组存下y坐标中相应位置的点的个数,向…
Description Consider equations having the following form: a1x13+ a2x23+ a3x33+ a4x43+ a5x53=0 The coefficients are given integers from the interval [-50,50]. It is consider a solution a system (x1, x2, x3, x4, x5) that verifies the equation, xi∈[-50,…