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
#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
#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++仍然使用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 每个链表节点使用一个 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