南邮OJ
文章平均质量分 76
味全好喝
学生一枚,专程过来学习,渴望成为大神!!
展开
-
南邮OJ 1015 最大公约数和最小公倍数
题目描述:求两个正整数的最大公约数和最小公倍数题目链接:点击打开链接#include using namespace std;int main(){ //cout << "请输入两个正整数:" << endl; int m,n; cin >> m >> n; int a,b,c,d; if (m>=n) { a = n; c = m; } else {原创 2015-10-25 20:11:41 · 662 阅读 · 0 评论 -
南邮OJ 1012进制转换
题目描述: 进制转换问题题目链接: http://acm.njupt.edu.cn/acmhome/problemdetail.do?&method=showdetail&id=1012#include using namespace std;int main(){ int n; int b[1000]; cin >> n; int a[1000][2] = {};原创 2015-10-14 20:48:32 · 561 阅读 · 0 评论 -
南邮OJ 1013 判断三角形
题目描述:给定三条边的长度,判断能否组成三角形,如果可以,判断三角形的形状。题目链接:点击打开链接#include #include using namespace std;int main(){ double a[3]={}; cin >> a[0] >> a[1] >> a[2]; while ((a[0] !=0 )||(a[1]!=0)||(a[2]!=0)) {原创 2015-10-15 09:42:50 · 685 阅读 · 0 评论 -
南邮OJ 1014 数据的插入与删除
题目描述:在一组数据(数目不超过10000)中,插入新数,删除所有与给定数相等的数据。题目链接:点击打开链接#include using namespace std;int main(){ int a[10000]; //static int a[10001]; int b; int i =0; int x,y; cin >> b; //先读取数据 while ((b原创 2015-10-15 16:04:21 · 438 阅读 · 0 评论 -
南邮OJ 1005 多项式加法(二)
今晚再来理一理,我自己也是一知半解的,先写下来有错误在改正。一、首先,这个多项式是一个链表,多项式的每一项是链表一个节点,那么可以想到两种情况: 1)多项式只有一项或者是多项式的最后一项,那么这个节点就只需要有系数和指数两个元素,且不需要指向下 一个节点。 2)多项式的其中一项,那么这个节点就需要有系数、指数以及指向下一个节点的指针。class Node原创 2016-05-10 22:17:25 · 1000 阅读 · 0 评论 -
南邮OJ 1005 多项式加法
题目描述:线性表是一种最简单、最基本,也是最常用的数据结构,其用途十分广泛,例如,用带表头结点的单链表求解一元整系数多项式加法和乘法运算。现给两个一元整系数多项式,请求解两者之和。题目链接:http://acm.njupt.edu.cn/acmhome/problemdetail.do?&method=showdetail&id=1005#include using namespace原创 2016-05-08 15:50:20 · 805 阅读 · 0 评论