![](https://img-blog.csdnimg.cn/20190605231010924.jpeg?x-oss-process=image/resize,m_fixed,h_224,w_224)
刷题中的我
这个是6月份的海洋
杨戬没有你我怎么活
喜欢的人是杨戬!
展开
-
PAT 1032
水水~#include <iostream>#include <bits/stdc++.h>using namespace std;const int maxn = 1e5+10;struct Node{ int v; int w; Node(int i,int j):v(i),w(j){}};map<int,int&...原创 2019-06-06 14:50:35 · 269 阅读 · 0 评论 -
PAT1031
这道大水题,注意X是大写#include <iostream>#include <bits/stdc++.h>using namespace std;int q[] = {7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2};char m[] = {'1','0','X','9','8','7','6','5','4','3','2'};...原创 2019-06-06 14:18:40 · 256 阅读 · 0 评论 -
PAT1030
这道题像是个双层循环搜索,注意的是答案可能会远小于n个数,所以注意记录上一次的下标,不然会超时。并且一开始ans应该初始化为1,因为自己/自己 = 1;并且q是正整数(>=1).#include <iostream>#include <bits/stdc++.h>#define ll long longusing namespace std;vec...原创 2019-06-06 14:05:33 · 312 阅读 · 0 评论 -
PAT1029
还是水题#include <iostream>#include <bits/stdc++.h>using namespace std;set<char>set1;set<char>set2;int main(){ string s1,s2; cin>>s1>>s2; for(int ...原创 2019-06-05 14:59:45 · 268 阅读 · 0 评论 -
PAT1028
#include <iostream>#include <bits/stdc++.h>using namespace std;struct Node{ string name; int sum; Node(string a,int b):name(a),sum(b){}};vector<Node>nodes;//去...原创 2019-06-05 14:21:59 · 193 阅读 · 0 评论 -
PAT1027
大大大水题#include <iostream>#include <bits/stdc++.h>using namespace std;int main(){ int n; string s; cin>>n>>s; long long sum = 0; int ok = 0; int t...原创 2019-06-05 13:46:14 · 242 阅读 · 0 评论 -
PAT1026
#include <iostream>#include <bits/stdc++.h>using namespace std;int main(){ long long a,b; long long h,m,s; double sum; cin>>a>>b; sum = (b-a)*1.0/100;...原创 2019-06-04 18:43:14 · 149 阅读 · 0 评论 -
PAT1025
小心可能为环话说PAT OJ好像有bug,因为我一开始提交的A错了案例7,改一下的B错案例8,再提交A竟然AC了。。但是再提交A仍然错了案例7.#include <iostream>#include <bits/stdc++.h>using namespace std;struct Node{ string adr; int va; ...原创 2019-06-04 18:29:58 · 224 阅读 · 0 评论 -
PAT1024
小小的模拟#include <iostream>#include <bits/stdc++.h>using namespace std;vector<int>num1,num2;int main(){ string s; int op1 = 0,op2 = 0;//0+ 1- int f = 0; cin>...原创 2019-06-04 16:26:21 · 216 阅读 · 0 评论 -
PAT1023
大水题#include <iostream>#include <bits/stdc++.h>using namespace std;int main(){ int num[10]; for(int i = 0;i<10;i++) { cin>>num[i]; } for(int i =...原创 2019-06-04 15:27:01 · 181 阅读 · 0 评论 -
PAT1022
水题,注意答案为0的情况。#include <iostream>#include <bits/stdc++.h>using namespace std;vector<int>ans;int main(){ long long a,b,c,d; long long sum = 0; cin>>a>>...原创 2019-06-04 15:20:03 · 294 阅读 · 0 评论 -
PAT1021
水题#include <iostream>#include <bits/stdc++.h>using namespace std;int main(){ int num[10]; string s; memset(num,0,sizeof(num)); cin>>s; for(int i = 0;i<...原创 2019-06-04 15:07:13 · 322 阅读 · 0 评论 -
PAT1020
贪心#include <iostream>#include <bits/stdc++.h>#define maxn 1010using namespace std;struct Node{ double s; double w; Node(int s,double w):s(s),w(w){}};vector<Node&...原创 2019-06-04 15:03:19 · 167 阅读 · 0 评论 -
PAT1019 数字黑洞
#include <iostream>#include <bits/stdc++.h>using namespace std;int Num(int a[4]){ int sum = 0; for(int i = 0;i<4;i++){ sum = sum*10 + a[i]; } return sum;}...原创 2019-06-03 22:42:30 · 86 阅读 · 0 评论