
map
文章平均质量分 67
ryo_218
要努力成为别人的依赖呀!
展开
-
PAT 1041 Be Unique (20)
1041 Be Unique (20)(20 分)Being unique is so important to people on Mars that even their lottery is designed in a unique way. The rule of winning is simple: one bets on a number chosen from [1, 10^4]...原创 2018-08-09 16:50:21 · 140 阅读 · 0 评论 -
UVA 100 The 3n + 1 problem
UVA 100 The 3n + 1 problemProblems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive). In this problem you will be analyzing a pro...原创 2019-03-06 16:48:30 · 254 阅读 · 0 评论 -
PAT 1002 A+B for Polynomials (25)
1002 A+B for Polynomials (25)(25 分)This time, you are supposed to find A+B where A and B are two polynomials.Input Specification:Each input file contains one test case. Each case occupies 2 line...原创 2018-08-29 22:17:45 · 158 阅读 · 0 评论 -
PAT 1034 Head of a Gang (30)
1034 Head of a Gang (30)(30 分)One way that the police finds the head of a gang is to check people's phone calls. If there is a phone call between A and B, we say that A and B is related. The weight ...原创 2018-09-04 13:24:32 · 171 阅读 · 0 评论 -
PAT 1084 Broken Keyboard (20)
1084 Broken Keyboard (20)(20 分)On a broken keyboard, some of the keys are worn out. So when you type some sentences, the characters corresponding to those keys will not appear on screen.Now given ...原创 2018-08-17 12:49:45 · 156 阅读 · 0 评论 -
PAT 1092 To Buy or Not to Buy (20)
1092 To Buy or Not to Buy (20)(20 分)Eva would like to make a string of beads with her favorite colors so she went to a small shop to buy some beads. There were many colorful strings of beads. Howeve...原创 2018-08-08 15:54:41 · 153 阅读 · 0 评论 -
PAT 1054 The Dominant Color (20)
1054 The Dominant Color (20)(20 分)Behind the scenes in the computer's memory, color is always talked about as a series of 24 bits of information for each pixel. In an image, the color with the large...原创 2018-08-07 22:24:03 · 188 阅读 · 0 评论 -
PAT 1050 String Subtraction (20)
1050 String Subtraction (20)(20 分)Given two strings S1 and S2, S = S1 - S2 is defined to be the remaining string after taking all the characters in S2 from S1. Your task is simply to calculate S1 - ...原创 2018-08-07 18:28:56 · 128 阅读 · 0 评论 -
PAT 1032 Sharing (25)
1032 Sharing (25)(25 分)To store English words, one method is to use linked lists and store a word letter by letter. To save some space, we may let the words share the same sublist if they share the ...原创 2018-08-07 13:24:11 · 279 阅读 · 0 评论 -
蓝桥杯 历届试题 青蛙跳杯子
题目:青蛙跳杯子问题描述X星球的流行宠物是青蛙,一般有两种颜色:白色和黑色。X星球的居民喜欢把它们放在一排茶杯里,这样可以观察它们跳来跳去。如下图,有一排杯子,左边的一个是空着的,右边的杯子,每个里边有一只青蛙。*WWWBBB其中,W字母表示白色青蛙,B表示黑色青蛙,*表示空杯子。X星的青蛙很有些癖好,它们只做3个动作之一:1. 跳到相邻的空杯子里。2. 隔着1只其它的...原创 2018-03-31 18:43:23 · 1088 阅读 · 0 评论 -
第八届蓝桥杯国赛C++B组 磁砖样式
标题:磁砖样式小明家的一面装饰墙原来是 3*10 的小方格。现在手头有一批刚好能盖住2个小方格的长方形瓷砖。瓷砖只有两种颜色:黄色和橙色。小明想知道,对于这么简陋的原料,可以贴出多少种不同的花样来。小明有个小小的强迫症:忍受不了任何2*2的小格子是同一种颜色。(瓷砖不能切割,不能重叠,也不能只铺一部分。另外,只考虑组合图案,请忽略瓷砖的拼缝)显然,对于 2*3 个小格子来说,口算...原创 2019-03-17 22:20:51 · 872 阅读 · 4 评论