12 2021 档案

摘要:class Solution { public: vector<vector<int>> threeSum(vector<int>& nums) { vector<vector<int>>v; vector<int>v2; sort(nums.begin(),nums.end()); int n = 阅读全文
posted @ 2021-12-30 14:50 智人心 阅读(18) 评论(0) 推荐(0) 编辑
摘要:class Solution { public: int maxArea(vector<int>& height) { int i = 0,j = height.size()-1,result = 0; while(i<j){ int h = min(height[i],height[j]); re 阅读全文
posted @ 2021-12-30 09:37 智人心 阅读(17) 评论(0) 推荐(0) 编辑
摘要:double findMedianSortedArrays(int* nums1, int nums1Size, int* nums2, int nums2Size){ int i = 0,p = 0,q = 0,n1 = nums1Size+nums2Size,n = (nums1Size+num 阅读全文
posted @ 2021-12-29 17:56 智人心 阅读(17) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> #include<cstring> using namespace std; #define maxn 1005 #define inf 0x3f3f3f3f int data[maxn][maxn],n,dis[maxn],vis[maxn]; int Dij 阅读全文
posted @ 2021-12-13 21:35 智人心 阅读(17) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> #include<cstring> using namespace std; #define maxn 100005 int par[2*maxn],height[2*maxn]; int Find(int x){ if(x==par[x])return x; 阅读全文
posted @ 2021-12-10 21:58 智人心 阅读(21) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> #include<cstring> using namespace std; #define maxn 30005 int par[maxn],n,m,k[505],data[505][30005]; bool visit[maxn]; int findPar( 阅读全文
posted @ 2021-12-07 21:27 智人心 阅读(26) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> #include<algorithm> using namespace std; struct node{ int v,b; }nd[25]; int cmp(node nd1,node nd2){ if(nd1.v>nd2.v)return 1; return 阅读全文
posted @ 2021-12-05 22:28 智人心 阅读(25) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> #include<algorithm> #include<cstring> using namespace std; int main(){ char data[55]; while(scanf("%s",data)==1&&strcmp(data,"#")){ 阅读全文
posted @ 2021-12-05 21:45 智人心 阅读(18) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> #include<cstring> using namespace std; int main(){ int data[150]; int t,n,cnt,i,j,p,pos; scanf("%d",&t); while(t--){ scanf("%d",&n) 阅读全文
posted @ 2021-12-05 21:35 智人心 阅读(19) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> #include<cmath> #include<cstring> using namespace std; int main(){ char a[80],d[]={'/','\\','.','|','_'}; int len; double sum; whil 阅读全文
posted @ 2021-12-05 20:52 智人心 阅读(24) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> #include<cstring> using namespace std; int main(){ char a[260],key[20],*p,old; int i; while(scanf("%s",a)==1){ while(scanf("%s",key 阅读全文
posted @ 2021-12-05 20:10 智人心 阅读(16) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> #include<algorithm> #include<cstring> using namespace std; struct node{ char result[305][55]; int len; }; node r[305]; char a[105][ 阅读全文
posted @ 2021-12-05 19:34 智人心 阅读(20) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> #include<cstring> using namespace std; int m,n,num; bool visit[100][100]; char data[100][100],ch; void dfs(int direction,int i,int 阅读全文
posted @ 2021-12-05 18:47 智人心 阅读(20) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> #include<cstring> #include<algorithm> using namespace std; int main(){ int i,n,len[105],minLen; char a[105][105]; while(scanf("%d", 阅读全文
posted @ 2021-12-05 18:08 智人心 阅读(18) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> using namespace std; int main(){ int a,b,c,d; scanf("%d%d%d%d",&a,&b,&c,&d); printf("5*(5-(1/5))\n"); return 0; } 阅读全文
posted @ 2021-12-05 13:54 智人心 阅读(14) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> #include<cstring> using namespace std; int data[105][205],a[3],len[105]; void Plus(int i){ int k,l; for(k=i-3;k<i;k++){ for(l=0;l<l 阅读全文
posted @ 2021-12-05 13:52 智人心 阅读(18) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> using namespace std; int main(){ int a,b,c,d,fenmu,fenzi; char opt; while(scanf("%d/%d%c%d/%d",&a,&b,&opt,&c,&d)==5){ fenmu = b*d; 阅读全文
posted @ 2021-12-05 13:11 智人心 阅读(25) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> #include<cstring> using namespace std; #define maxn 10005 int data[maxn],pre[maxn],root[maxn],visit[maxn]; int main(){ int cnt,i,p, 阅读全文
posted @ 2021-12-04 20:13 智人心 阅读(40) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> #include<algorithm> using namespace std; int main(){ int t,n,data[1005],m,result,tmp1,tmp2; scanf("%d",&t); while(t--){ scanf("%d", 阅读全文
posted @ 2021-12-04 18:07 智人心 阅读(16) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> #include<algorithm> #include<cstring> using namespace std; int main(){ char a[205]; scanf("%s",a); int len = strlen(a); sort(a,a+le 阅读全文
posted @ 2021-12-03 21:01 智人心 阅读(11) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> #include<algorithm> using namespace std; int cmp(long long p,long long q){ if(p>q)return true; return false; } int main(){ int n,i, 阅读全文
posted @ 2021-12-03 20:53 智人心 阅读(44) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> #include<cstring> using namespace std; char ch[15][15]; int data[15][15],hasExit,hasLoop; int r,c,colNum,exitStep,loopStep; int mai 阅读全文
posted @ 2021-12-03 20:11 智人心 阅读(27) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> #include<cmath> using namespace std; int main(){ double n,p,k; while(scanf("%lf%lf",&n,&p)==2){ k = pow(p,1.0/n); printf("%.0lf\n", 阅读全文
posted @ 2021-12-03 19:41 智人心 阅读(19) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> #include<cstring> using namespace std; int n,k,total,m; char ch[10][10]; bool book[10]; void dfs(int cur){ if(m==k){ total++; retur 阅读全文
posted @ 2021-12-01 22:22 智人心 阅读(16) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> #include<cstring> using namespace std; int main(){ int s,cnt,tmp,col; char data[10]; char ch[25][130]; while(scanf("%d%s",&s,data)= 阅读全文
posted @ 2021-12-01 13:15 智人心 阅读(24) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> #include<cstring> #include<algorithm> using namespace std; int cnt; struct node{ char data[15]; int len; }Node[10]; bool decode(){ 阅读全文
posted @ 2021-12-01 12:17 智人心 阅读(23) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> #include<algorithm> using namespace std; struct node{ int ID,a,b; }Node[50005]; bool cmp(node n1,node n2){ if(n1.a>n2.a)return true 阅读全文
posted @ 2021-12-01 11:44 智人心 阅读(24) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> #include<algorithm> using namespace std; int main(){ int n,s,result,data[20005]; scanf("%d%d",&n,&s); for(int i=0;i<n;i++){ scanf(" 阅读全文
posted @ 2021-12-01 11:35 智人心 阅读(10) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> #include<algorithm> using namespace std; int main(){ int t,n,sum,data[20005]; scanf("%d",&t); while(t--){ scanf("%d",&n); for(int i 阅读全文
posted @ 2021-12-01 11:23 智人心 阅读(19) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> #define PI 3.141592653589793 #include<cmath> using namespace std; int main(){ double x1,y1,x2,y2,x3,y3; double k1,b1,k2,b2,x,y,resu 阅读全文
posted @ 2021-12-01 11:14 智人心 阅读(18) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示