pat甲级
Alternative_19
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
pat1002 甲级 A+B for Polynomials (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 lines, and each line contains the informa...原创 2018-10-12 14:35:43 · 236 阅读 · 0 评论 -
pat甲级 1004 Counting Leaves(输出每层叶子结点)(dfs)
#include<iostream>#include<vector>#include<algorithm>using namespace std;vector<int> v[100];int maxdepth = -1,book[105];void dfs(int index, int depth) { if (v[index].si...原创 2018-10-14 01:23:34 · 231 阅读 · 0 评论 -
pat甲级1005 Spell It Right
题解:输出各位之和,用英文表达。#include<iostream>#include<vector>#include<algorithm>#include<string>using namespace std;int main() { string n; cin >> n; int sum=0; for (int ...原创 2018-10-14 08:00:45 · 345 阅读 · 0 评论 -
pat甲级1006 Sign In and Sign Out
#include<iostream>#include<string>#include<stdio.h>using namespace std;int main() { int n; string lock, unlock,id; int min_in=24*60*60, max_out=-1; cin >> n; while (n...原创 2018-10-14 08:27:49 · 283 阅读 · 0 评论 -
pat甲级1008 Elevator (简单数学)
#include<iostream>using namespace std;int main() { int n,k,now=0,sum=0; cin >> n; while (n--) { cin >> k; if (k > now) sum +=(k-now)* 6; if (k < now) sum += (now-k)...原创 2018-10-14 12:45:43 · 246 阅读 · 0 评论 -
pat甲级 1009 Product of Polynomials(模拟)
要记得把数组开到最大。1005,2005.#include<iostream>#include <stdlib.h>using namespace std;int main() { int k, n; double aN, ans[2005] = { 0.0 }, arr[1005] = {0.0}; cin >> k; for (int ...原创 2018-10-14 19:42:39 · 180 阅读 · 0 评论 -
pat甲级 1010 Radix (二分查找)
做题+看代码2h...debug半小时#include <iostream>#include <cctype>#include <algorithm>#include <cmath>#include<string>using namespace std;long long convert(string n, long l...原创 2018-10-15 20:14:19 · 329 阅读 · 0 评论
分享