码迷,mamicode.com
首页 >  
搜索关键字:include    ( 84546个结果
单链表完整实现
#include <stdio.h> #include <stdlib.h> /* 定义结构体 */ typedef struct Node { int data; //数据域 struct Node * pNext;//指针域 }NODE, * PNODE; //由于使用了typedef, 所以N ...
分类:其他好文   时间:2020-11-01 22:00:48    阅读次数:14
实验2
任务一: #include<stdio.h> int main() { int a = 5, b = 7, c = 100, d, e, f; d = a / b * c; e = a * c / b; f = c / b * a; printf("d=%d,e=%d,f=%d\n", d, e, ...
分类:其他好文   时间:2020-11-01 21:57:04    阅读次数:11
[kuangbin带你飞]专题七 线段树
1. HDU1166 敌兵布阵 题目链接 题意:单点更新+区间查询(求和)。 树状数组 (218ms) #include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <cmath> usi ...
分类:其他好文   时间:2020-11-01 21:18:27    阅读次数:19
P1160 队列安排
方法:双链表 #include<iostream> using namespace std; const int N = 100010; int e[N], l[N], r[N], idx; int value_node[N]; int n; void add(int x, int v){ valu ...
分类:其他好文   时间:2020-11-01 20:56:06    阅读次数:15
扫雷游戏
扫雷游戏
分类:其他好文   时间:2020-11-01 10:57:27    阅读次数:8
CSP2019 树上的树 口胡
拖了一年, 今天上午终于把这道题做出来了。 基本思路 题目要求字典序最小, 而字典序是有着天然的贪心性质的, 可以比较自然地想到要应用贪心算法, 进一步地, 要思考 “某个数字最终停留在某个点上” 会对全局的删边顺序产生哪些限制。 比如有这样一条路径: \(s--^a--o--^b--o--^c-- ...
分类:其他好文   时间:2020-11-01 10:37:55    阅读次数:19
实验2:wonderful
首先非常感谢老师及同学们对我的帮助,使我终于找到了截图工具 (果然还是我的问题,怎么能怪电脑呢?) 正片开始——实验2 1.任务1 #include<stdio.h> int main(){ int a=5,b=7,c=100,d,e,f; d=a/b*c; e=a*c/b; f=c/b*a; pr ...
分类:其他好文   时间:2020-11-01 10:26:52    阅读次数:15
AcWing91 最短Hamilton路径 (状压dp)
https://www.acwing.com/problem/content/93/ \(dp[S][i]\) 表示经过点的状态为 \(S\) , 当前在 \(i\) 点时的最短路 时间复杂度$O(n2*2n)$ #include<cstdio> #include<cstring> #include ...
分类:Windows程序   时间:2020-11-01 10:21:43    阅读次数:26
链表应用能力自测
#include <stdio.h> #include<string.h> #include<stdlib.h> //第一关代码 struct node {//此处填写代码,定义链表结点类型,包含一个存放整型数据的 成员,和一个指向下一个结点的成员 int data; struct node* ne ...
分类:其他好文   时间:2020-11-01 10:15:29    阅读次数:17
循环程序设计能力自测
#include <stdio.h> #include <math.h> int reverse(int data) { //请在此填写代码,实现将参数data的值反转,并返回的功能 /* begin */ int ans=0,cnt=0,a[1000],flag=0; if(data<0){ fl ...
分类:其他好文   时间:2020-11-01 10:14:19    阅读次数:13
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!