- 博客(6)
- 收藏
- 关注
原创 PAT A1081 分数运算规则,最大公约公倍数
1081 Rational Sum (20)(20 分)Given N rational numbers in the form "numerator/denominator", you are supposed to calculate their sum.Input Specification:Each input file contains one test case. E...
2018-08-10 22:53:03 268
原创 PAT A1010
Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is "yes", if 6 is a decimal number and 110 is a binary number.Now for any pair of positive...
2018-08-09 21:41:27 309
原创 动态规划之最长公共子序列
#include <cstdio>#include <string.h>#include <string>char x[100];char y[100];int c[100][100];int b[100][100];int m,n;void LCSLength(char x[],char y[],int c[100][100],int b[10...
2018-04-09 11:51:58 140
原创 PAT B1015 德才论
原题链接:点击打开链接重点是比较函数cmp的写法,写得不好会写很多复杂的代码。还有就是要先排除下界,从而避免判断1、2、3、4类考生时判断条件太多而超时。也要注意输出最好用printf,cout可能会超时#include <iostream>#include <string>#include <algorithm>#include <stdio.h&...
2018-03-16 21:24:38 179
原创 PAT A1025
Programming Ability Test (PAT) is organized by the College of Computer Science and Technology of Zhejiang University. Each test is supposed to run simultaneously in several places, and the ranklists w
2017-11-06 22:32:43 328
原创 PAT乙级练习1002
输入格式:每个测试输入包含1个测试用例,即给出自然数n的值。这里保证n小于1000(说好的1000?)。输出格式:在一行内输出n的各位数字之和的每一位,拼音数字间有1 空格,但一行中最后一个拼音数字后没有空格。输入样例: 1234567890987654321123456789 输出样例: yi san wu#include <stdio.h>#include <string.h>#inc
2017-10-10 20:22:39 180
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人