NewCoder
Iron__chēn
大鹏一日乘风起,扶摇直上九万里。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
NowCoder——三角形相加
第一次用C++写程序还是记录一下吧: #include <iostream> using namespace std; class CTriangle { private: int x; int y; public: CTriangle(int xx,int yy) { x=xx; y=yy; } CTriangle operator+(const CTriangle&c) { ..原创 2020-05-14 22:46:28 · 158 阅读 · 0 评论 -
NowCoder——对称平方数
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <iostream> using namespace std; int symmetry(char c[]) { int len=strlen(c); int i=0; int j=len-1; while(i<j) //出错 { if(c[i.原创 2020-05-10 00:55:09 · 126 阅读 · 0 评论 -
NewCoder——玛雅人的密码【C语言】
【C语言】题解思路分析: 这道题是利用队列的数据结构,采用树的层次遍历思想来完成的。 1、首先,我们先构造一个队列 typedef struct Queen { char **str; //构建字符串数组 int length; //字符串的长度 int front,rear; //构建队首指针和队尾指针 int len[20000...原创 2020-05-03 14:01:54 · 417 阅读 · 0 评论 -
NowCoder——查找二叉树中任意两个节点的最近公共祖先
#include<stdio.h> #include<stdlib.h> typedef int ElemType; typedef struct BiTNode { ElemType data; struct BiTNode *lchild; struct BiTNode *rchild; }BiTNode,*BiTree; void Crea...原创 2020-04-25 21:10:48 · 248 阅读 · 0 评论 -
NowCoder——分组统计
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<iostream> using namespace std; /**********************************/ //1 //7 //3 2 3 8 8 2 3 //1 2 3 2 1 3 1 ...原创 2020-04-19 15:08:48 · 170 阅读 · 0 评论 -
NowCoder——计算天数
#include<stdio.h> #include<stdlib.h> #include<iostream> using namespace std; //输入年月日,计算该填是本年的第几天 //例如1990年9月20日是1990年的第263天,2000年5月1日是2000年第122天。 void Day(int year,int month,int D...原创 2020-04-16 17:40:19 · 212 阅读 · 0 评论 -
NowCoder——编排字符串
第6题 //编排字符串 //https://www.nowcoder.com/practice/42c0673f04b34f66ae236a1cb7995532 #include<stdio.h> #include<stdlib.h> #define MaxSize 5 typedef struct { char data[1000]; }ElemType; ...原创 2020-04-14 12:48:50 · 242 阅读 · 0 评论 -
NowCoder——全排列
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<algorithm> #include<iostream> using namespace std; int m=0; char B[720][7]; void resort(char B[][7])...原创 2020-04-14 12:35:48 · 142 阅读 · 0 评论 -
NowCoder——日期累加
#include<stdio.h> #include<stdlib.h> #include<math.h> typedef struct { int year,month,day; } Data; void Datatime(Data &d,int longtime) { int T; while(longtime>0)...原创 2020-04-08 23:04:52 · 140 阅读 · 0 评论 -
NowCoder——围圈报数
#include<stdio.h> #include<stdlib.h> #include<math.h> #define OK 1 #define FALSE 0 typedef struct LNode { int data; struct LNode *next; }LNode,*LinkList; //链表的初始化 int I...原创 2020-04-08 13:10:51 · 133 阅读 · 0 评论 -
NowCoder——单词识别(C语言非结构体解法)
#include <stdio.h> #include <stdlib.h> #include <string.h> //输入一个英文句子,把句子中的单词(不区分大小写)按出现次数按从多到少把单词和次数在屏幕上输出来 //要求能识别英文句号和逗号,即是说单词由空格、句号和逗号隔开。 //对已经统计好的单词数组按照字典顺序排序 void insertionS...原创 2020-04-06 13:25:05 · 369 阅读 · 0 评论 -
NowCoder——学生查询
学生查询 #include<string.h> #include<stdio.h> #include<malloc.h> #include <iostream> using namespace std; void FindStable() { int n; //学生人数 scanf("%d",&n); char ...原创 2020-04-03 10:49:07 · 196 阅读 · 0 评论
分享