![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
PAT
我的意志不动摇
这个作者很懒,什么都没留下…
展开
-
L1-043. 阅览室
用一个数组既存数据又做标记的时候,一定要记得题目中得到的数组值有没有可能0。#include <iostream>#include<cstdio>#include<cstring>using namespace std;int a[100001];int main(){ freopen("C:\\Users\\Administrator\\Desktop\...原创 2018-03-20 17:20:19 · 295 阅读 · 0 评论 -
L2-019. 悄悄关注
https://www.patest.cn/contests/gplt/L2-019#include<cstring> #include<cstdio> #include<algorithm> int cmp1(const void *a,const void *b) { char *s1=(char*)a; char *s2=(char*)b; retu...原创 2018-03-21 11:48:28 · 320 阅读 · 0 评论 -
L2-017. 人以群分
题目地址#include<algorithm> #include<cstdio> int n; int i; int a[100000]; //把人群分为两大类,即外向型和内向型 //规模尽可能接近,而他们的总活跃度差距尽可能拉开 //因为活跃的人的值总是大于不活跃的人的值 //所以不需要再去判断如何使他们的活跃度尽可能拉开,直接添加到活跃的人那边…… int main(...原创 2018-03-21 15:31:37 · 198 阅读 · 0 评论 -
L2-008. 最长对称子串
题目地址#include<iostream> #include<algorithm> #include<cstring> using namespace std; char str[3000]; char s[1010]; int main() { gets(s); str[0] = '$'; str[1] = '#'; int i,j; j=2; ...原创 2018-03-27 21:05:51 · 240 阅读 · 0 评论 -
L2-004. 这是二叉搜索树吗?
题目链接#include<bits/stdc++.h> using namespace std; int n; int flag=0; vector<int> qx; vector<int> hx; void judge(int start , int end)//start是根的位置(先序) { int i,j; i=start+1; j=end; ...原创 2018-03-28 11:32:13 · 115 阅读 · 0 评论