摘要: "题目来源" Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shopping mall wh 阅读全文
posted @ 2020-05-05 00:52 47的菠萝~ 阅读(95) 评论(0) 推荐(1) 编辑
摘要: "题目来源" Given two strings S 1 and S 2, S = S 1− S 2 is defined to be the remaining string after taking all the characters in S 2 from S 1. Your task is 阅读全文
posted @ 2020-05-05 00:05 47的菠萝~ 阅读(103) 评论(0) 推荐(1) 编辑
摘要: 题目来源 给定一个长度不超过 104 的、仅由英文字母构成的字符串。请将字符重新调整顺序,按 PATestPATest.... 这样的顺序输出,并忽略其它字符。当然,六种字符的个数不一定是一样多的,若某种字符已经输出完,则余下的字符仍按 PATest 的顺序打印,直到所有字符都被输出。 输入格式: 阅读全文
posted @ 2020-05-04 23:50 47的菠萝~ 阅读(138) 评论(0) 推荐(1) 编辑
摘要: "题目来源" 现给出两人的交锋记录,请统计双方的胜、平、负次数,并且给出双方分别出什么手势的胜算最大。 输入格式: 输入第 1 行给出正整数 N(≤10 5 ),即双方交锋的次数。随后 N 行,每行给出一次交锋的信息,即甲、乙双方同时给出的的手势。C 代表“锤子”、J 代表“剪刀”、B 代表“布”, 阅读全文
posted @ 2020-05-01 00:03 47的菠萝~ 阅读(122) 评论(0) 推荐(1) 编辑
摘要: 题目来源 宋代史学家司马光在《资治通鉴》中有一段著名的“德才论”:“是故才德全尽谓之圣人,才德兼亡谓之愚人,德胜才谓之君子,才胜德谓之小人。凡取人之术,苟不得圣人,君子而与之,与其得小人,不若得愚人。” 现给出一批考生的德才分数,请根据司马光的理论给出录取排名。 输入格式: 输入第一行给出 3 个正 阅读全文
posted @ 2020-04-30 21:00 47的菠萝~ 阅读(176) 评论(0) 推荐(1) 编辑
摘要: 题目来源 本题要求将给定的 N 个正整数按非递增的顺序,填入“螺旋矩阵”。所谓“螺旋矩阵”,是指从左上角第 1 个格子开始,按顺时针螺旋方向填充。要求矩阵的规模为 m 行 n 列,满足条件:m×n 等于 N;m≥n;且 m−n 取所有可能值中的最小值。 输入格式: 输入在第 1 行中给出一个正整数  阅读全文
posted @ 2020-04-28 14:08 47的菠萝~ 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 题号 PAT Basic PAT Advaced PAT Top 1001 害死人不偿命的(3n+1)猜想 1002 写出这个数 1003 我要通过! 1004 成绩排名 1005 继续(3n+1)猜想 1006 换个格式输出整数 1007 素数对猜想 1008 数组元素循环右移问题 1009 说反 阅读全文
posted @ 2020-04-28 13:34 47的菠萝~ 阅读(752) 评论(0) 推荐(2) 编辑
摘要: 题目来源 Given three integers A, B and C in [−], you are supposed to tell whether A+B>C. Input Specification: The first line of the input gives the positi 阅读全文
posted @ 2020-02-05 21:38 47的菠萝~ 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 题目来源 The task is really simple: given N exits on a highway which forms a simple cycle, you are supposed to tell the shortest distance between any pair 阅读全文
posted @ 2020-02-05 17:43 47的菠萝~ 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 题目来源 Shuffling is a procedure used to randomize a deck of playing cards. Because standard shuffling techniques are seen as weak, and in order to avoid 阅读全文
posted @ 2020-02-05 16:33 47的菠萝~ 阅读(244) 评论(0) 推荐(0) 编辑