码迷,mamicode.com
首页 >  
搜索关键字:typedef    ( 8832个结果
QFNU-ACM 2020.11.6 Trating
A 输入,第i个人把礼物给了谁,输出,第i个人的礼物是谁给的 #include<bits/stdc++.h> using namespace std; typedef long long ll; #define ture true int main() { int n,flag=0,a[200],b ...
分类:其他好文   时间:2020-11-20 11:48:21    阅读次数:6
试题 算法提高 欧拉函数
思路: 代码: #include<iostream> #include<stdio.h> using namespace std; typedef long long ll; int main(){ ll n; cin>>n; ll res=n; for(ll i=2;i<=n/i;i++){ if ...
分类:编程语言   时间:2020-11-11 16:33:00    阅读次数:9
C语音,函数padd的功能是调整pa指向的链表中结点的位置,使得所有x值为偶数的结点出现在链表的前半部,所有x值为奇数的结点出现在链表的后半部。
#include <stdio.h> #include <stdlib.h> typedef struct node {int x; struct node *next; }NODE; NODE *padd(NODE *pa) { NODE *p1,*p2,*p; p1=p2=pa; while(p ...
分类:其他好文   时间:2020-11-10 11:42:48    阅读次数:24
POJ 1054 搜索
#include<iostream> #include<memory.h> #include<cmath> #include<algorithm> using namespace std; typedef struct { int x, y; }node; node d[6000]; int r, ...
分类:其他好文   时间:2020-11-08 17:11:46    阅读次数:15
C++在C的基础上改进了哪些细节
C++是在C语言的基础上改进的,C语言的很多语法在C++中依然广泛使用,例如:?C++仍然使用char、short、int、long、float、double等基本数据类型;??C++仍然使用if...else、while、for、switch、break等分支或循环结构;??C++仍然使用+、-、*、/、%、++、--、<<、>>等运算符;??C++仍然使用typedef
分类:编程语言   时间:2020-11-08 17:10:16    阅读次数:25
四则运算
#include #include <string.h> #define size 10 using namespace std; //含有一个二元算数式的三个值 typedef struct{ float x = 0,y = 0; //x,y为给定的随机数 float r = 0; //r为算数式 ...
分类:其他好文   时间:2020-11-08 17:05:55    阅读次数:19
二叉树相关
#include <iostream> #include <vector> #include <stack> #include <queue> template <class T> typedef struct node { node* left; node* right; T val; std:: ...
分类:其他好文   时间:2020-11-06 01:25:12    阅读次数:16
简单的消息队列实现
一、服务端程序 **1. .h file** #ifndef UPGRADE_H #define UPGRADE_H #define MSG_MAX_SIZE (24) enum { HTTP_TYPE_UPLOAD = 0x0, HTTP_TYPE_DOWNLOAD }; typedef stru ...
分类:其他好文   时间:2020-11-04 19:07:09    阅读次数:21
Redis 链表实现
链表和链表节点的实现 Redis 每个链表节点使用一个 adlist.h/listNode 结构来表示: typedef struct listNode { // 前置节点 struct listNode *prev; // 后置节点 struct listNode *next; // 节点的值 v ...
分类:其他好文   时间:2020-11-04 17:37:06    阅读次数:16
链表相关内容
#include <iostream> typedef struct node { int nVal; node* pNext; node(int val) : nVal(val), pNext(nullptr) {} }; // create node* create_link(int nNode ...
分类:其他好文   时间:2020-11-02 09:58:50    阅读次数:18
8832条   上一页 1 ... 14 15 16 17 18 ... 884 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!