上一页 1 ··· 9 10 11 12 13 14 下一页
摘要: 样例输入: 1 cheese chese 2 cheese abcdefg 3 cheese abcdefgij -1 样例输出: Round1 You win. Round 2 You chickened out. Round 3 You lose. #include<stdio.h> #incl 阅读全文
posted @ 2020-12-16 19:03 loliconsk 阅读(62) 评论(0) 推荐(0)
摘要: 1.queue队列容器 //queue容器介绍 #include<iostream> using namespace std; #include<string> #include<queue> class person { public: person(string name, int age) { 阅读全文
posted @ 2020-12-15 20:55 loliconsk 阅读(43) 评论(0) 推荐(0)
摘要: #include<iostream> #include<queue> #include<malloc.h> using namespace std; typedef struct node { int data; struct node* left; struct node* right; }Nod 阅读全文
posted @ 2020-12-15 20:13 loliconsk 阅读(54) 评论(0) 推荐(0)
摘要: #include<stdio.h> #include<stdlib.h> typedef struct node { int data; struct node* left; struct node* right; }Node; typedef struct tree { Node* root; } 阅读全文
posted @ 2020-12-15 18:01 loliconsk 阅读(173) 评论(0) 推荐(0)
摘要: #include<stdio.h> #include<stdlib.h> #include<string.h> int max(int a,int b) { if(a>b) return a; else return b; } int main(void) { int n,c,i,j; scanf( 阅读全文
posted @ 2020-12-15 13:17 loliconsk 阅读(60) 评论(0) 推荐(0)
摘要: #include<iostream> using namespace std; #include<set> set<int> u[55]; double similar(int a, int b) { int same = 0; double intersection, Union; for (se 阅读全文
posted @ 2020-12-13 10:08 loliconsk 阅读(260) 评论(0) 推荐(0)
摘要: #include<stdio.h> typedef struct Node { int data; struct Node* left; struct Node* right; }node; void prv(node* n) { if (n != NULL) { printf("%d\n", n- 阅读全文
posted @ 2020-12-12 19:30 loliconsk 阅读(40) 评论(0) 推荐(0)
摘要: #include<stdio.h> void hannoi(int n, char A, char B, char C) { if (n == 1) printf("%c -> %c\n", A, C); else { hannoi(n - 1, A, C, B); printf("%c -> %c 阅读全文
posted @ 2020-12-12 18:54 loliconsk 阅读(31) 评论(0) 推荐(0)
摘要: 其实动态规划就是选择和不选择的问题,将每一个所选择的最好结果记录下来,最后逐步前推最大的数就可以得到 该题用动态规划来写 求各个不相邻的数的和,要求最大值 首先我们用递归去实现动态规划: 代码实现: #include<stdio.h> int DP(int arr[], int size); int 阅读全文
posted @ 2020-12-11 19:37 loliconsk 阅读(53) 评论(0) 推荐(0)
摘要: #include<time.h>//c语言 #include<ctime>//c++ srand((unsigned int )time(NULL)); 阅读全文
posted @ 2020-12-10 20:23 loliconsk 阅读(34) 评论(0) 推荐(0)
上一页 1 ··· 9 10 11 12 13 14 下一页