![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
PATB
eclipse5616
这个作者很懒,什么都没留下…
展开
-
北邮OJ 130.二叉排序树
#include <bits/stdc++.h>using namespace std;typedef struct TNode{ int data; struct TNode *left, *right;}Tree;int insert_node(Tree *&t, int data){ int res = -1; if(t == ...原创 2020-05-24 21:31:36 · 182 阅读 · 0 评论 -
PATB1033 旧键盘打字
判断标准还是比较严的,不要想着糊弄过去,监测点5过了几次才过去,是大小写坏键问题,大写坏了小写也坏,vice versa#include<bits/stdc++.h>using namespace std;int main(){ string bad; string text; getline(cin,bad); getline(ci...原创 2020-03-19 21:36:23 · 117 阅读 · 0 评论 -
1032 挖掘机技术哪家强
测试点四没过多半是因为数组开小了,大数组尽量开在main()外面,我自己觉得用sort()是比一个一个检查要快的。#include<bits/stdc++.h>using namespace std;struct node{ int id; long long sum; friend bool operator < (node node1,node...原创 2020-03-19 21:07:55 · 74 阅读 · 0 评论 -
PAT1031查验身份证
如果不是数字就打印;把身份证里的X用100代替就行了#include<bits/stdc++.h>using namespace std;int main(){ int n; cin>>n; bool flag =true; int weight[20]={7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2}; ...原创 2020-03-18 23:22:20 · 133 阅读 · 0 评论 -
PATB1029
考察ASCII码#include<bits/stdc++.h>using namespace std;int main(){ string good; string bad; getline(cin,good); getline(cin,bad); bool goodkey[1000]={false}; for(int ...原创 2020-03-18 22:25:48 · 130 阅读 · 0 评论 -
PATB1028
注:1、检查点二是今天(2014/9/6)出生的,要判零2、检查点四是没有人符合要求,输出0#include<bits/stdc++.h>using namespace std;int main(){ int n; cin>>n; string young; string old; int max=0; i...原创 2020-03-18 22:09:11 · 75 阅读 · 0 评论