PAT
Haha@25
300字以内
展开
-
PTA 1002. A+B for Polynomials C++ 链表实现
提示:问题主要出在格式上面。1,当多项式相加系数全部抵消时,输出应该为 0,而不是为 0 0 0.0 之类的。即只需输出项数。2,输出的系数的小数部分可能超过一位,输出是应该保留一位小数。#include <iostream>#include <iomanip>using namespace std;struct Data//多项式的数据类型{ ...原创 2018-09-28 22:26:22 · 303 阅读 · 0 评论 -
PTA A1084. Broken Keyboard
#include<cstdio>#include<cstring>using namespace std;int main(){ char str1[100],str2[100]; bool hashTable[128] ={false};//用来标记字符是否被输出过 //gets(str1); //gets...原创 2019-06-02 14:16:52 · 195 阅读 · 0 评论 -
PAT A1075. PAT Judge
#include <iostream>#include <algorithm>#include <cstring>#define Max_K 6using namespace std;struct Student{ int id;//准考证号 int score_of_problem[Max_K];//每道题的分数 int ...原创 2019-05-11 14:40:05 · 188 阅读 · 0 评论 -
PAT A1025. PAT Ranking
有点忙,晚点整理吧#include <iostream>#include <algorithm>#include <cstring>using namespace std;struct Testee{ char id[15]; int grade; int location_number; int local_r...原创 2019-05-07 21:36:41 · 132 阅读 · 0 评论 -
PAT A1012. The Best Rank
#include <iostream>#include <algorithm>#include <cstring>using namespace std;struct Student{ int id; int C; int M; int E; int A; int best_rank; ...原创 2019-05-06 21:33:06 · 197 阅读 · 0 评论 -
PAT A1055. The world's Richest
#include <iostream>#include <cstring>#include <algorithm>using namespace std;struct Billionaire{ char name[10]; int age; int wealth;}billionaire[100010];bool cmp...原创 2019-05-08 13:45:28 · 165 阅读 · 0 评论 -
PAT A1028. List Sorting
这题简单#include <iostream>#include <cstring>#include <algorithm>using namespace std;struct Student{ int id; char name[10]; int grade;}student[100010];bool cmp1(St...原创 2019-05-08 13:02:45 · 134 阅读 · 0 评论 -
PAT 甲级 “德才论” 1062
题目:PAT 甲级 1062为什么我用 字符数组类型的 考号是输入会错啊以下是用int类型的代码 可AC#include <cstdio>#include <algorithm>#include<cstring>using namespace std;/*******************************************...原创 2019-05-05 14:50:28 · 138 阅读 · 0 评论 -
PTA 1005 Spell It Right
#include <iostream>#include <string>using namespace std;string digit2string[10]={"zero","one","two","three","four","five","six","seven","eight","nine"}; int summry(string num){ ...原创 2019-02-28 20:55:02 · 145 阅读 · 0 评论 -
PTA 1013 Battle Over Cities
#include <iostream>#include <stdio.h>#include <string.h>using namespace std;int graph[1010][1010]={0};int visited[1010] = {0};int check[1010] = {0};int N,M,K;void DFS(in...原创 2019-03-31 19:43:54 · 179 阅读 · 0 评论 -
PTA 1015 Reversible Primes
#include <iostream>#include<cmath>using namespace std;bool isPrime(int num){ int i; for(i = 2;i<=num;i++) { if(num%i==0) break; } if(i==n...原创 2019-03-31 19:41:40 · 205 阅读 · 0 评论 -
pat 1070
#include<cstdio>#include<algorithm>using namespace std;struct mooncake{ double store; double sell; double price;}cake[1010];bool cmp(mooncake a ,mooncake b){ ret...原创 2019-07-10 16:12:19 · 141 阅读 · 0 评论