POJ
文章平均质量分 71
大风车滴呀滴溜溜地转
为天地立心,为生民立命,为往圣继绝学,为万世开太平。
展开
-
POJ 3981.字符串替换
POJ 3981.字符串替换Ideas字符串替换的水题。需要注意的就是题目测试用例是多行数据,一开始没有注意导致WA,又看了一遍题目才发现。CodeC++#include <string>#include <iostream> using namespace std;int main() { string str; while (getline(cin, str)) { while (str.find("you") != string::npos)原创 2022-01-09 11:14:11 · 443 阅读 · 0 评论 -
POJ 2965.The Pilots Brothers‘ refrigerator
POJ 2965.The Pilots Brothers’ refrigeratorIdeas题意:给你4*4的矩阵。每个点有两种状态,+代表关,-代表开。每个点有一个操作就是该点所在行列所有状态翻转。问最少多少次可以打开全部开关,并且输出最少个数情况下翻转的点。先梳理一下题目给的测试样例的操作步骤:首先需要知道一点:一个开关翻转偶数次状态不变,翻转奇数次状态改变。(奇变偶不变)然后再深入一步:要使一个为+的符号变为-,必须其相应的行和列的操作数为奇数。如果+位置对应的行和列上每一个位置都进行原创 2021-12-30 13:22:39 · 279 阅读 · 0 评论 -
POJ 1502.MPI Maelstrom
DescriptionBIT has recently taken delivery of their new supercomputer, a 32 processor Apollo Odyssey distributed shared memory machine with a hierarchical communication subsystem. Valentine McKee’s research advisor, Jack Swigert, has asked her to benchmar原创 2021-02-02 22:02:14 · 361 阅读 · 0 评论 -
POJ 1511.Invitation Cards
DescriptionIn the age of television, not many people attend theater performances. Antique Comedians of Malidinesia are aware of this fact. They want to propagate theater and, most of all, Antique Comedies. They have printed invitation cards with all the n原创 2021-02-03 17:52:47 · 323 阅读 · 0 评论 -
POJ 1125.Stockbroker Grapevine
DescriptionStockbrokers are known to overreact to rumours. You have been contracted to develop a method of spreading disinformation amongst the stockbrokers to give your employer the tactical edge in the stock market. For maximum effect, you have to sprea原创 2021-02-02 11:56:39 · 376 阅读 · 1 评论 -
POJ 1062.昂贵的聘礼
Description年轻的探险家来到了一个印第安部落里。在那里他和酋长的女儿相爱了,于是便向酋长去求亲。酋长要他用10000个金币作为聘礼才答应把女儿嫁给他。探险家拿不出这么多金币,便请求酋长降低要求。酋长说:"嗯,如果你能够替我弄到大祭司的皮袄,我可以只要8000金币。如果你能够弄来他的水晶球,那么只要5000金币就行了。“探险家就跑到大祭司那里,向他要求皮袄或水晶球,大祭司要他用金币来换,或者替他弄来其他的东西,他可以降低价格。探险家于是又跑到其他地方,其他人也提出了类似的要求,或者直接用金币换,或原创 2021-01-31 17:15:41 · 397 阅读 · 0 评论