- 博客(10)
- 收藏
- 关注
原创 获取C/C++字符串、字符数组长度
本文链接:https://blog.csdn.net/m0_37592397/article/details/79701992
2019-11-22 09:08:14
139
原创 c++中队列函数queue的常用
在C++中只要#include< queue>即可使用队列类,其中在面试或笔试中常用的成员函数如下(按照最常用到不常用的顺序)push()pop()size()empty()front()back()接下来逐一举例说明:push()队列中由于是先进先出,push即在队尾插入一个元素,如:queue<string> q;q.push("Hello Wor...
2019-11-18 19:24:31
448
原创 1002 A+B for Polynomials简单
这个可以直接用一个c[10001]的数组存系数,里面的标号是指数,值为系数,分别加上a,b的就可以了。`#include<iostream>#include<cstdio>using namespace std;struct node{ int exp; double coef;}a[10],b[10];double c[10001]={0.0};int ...
2019-11-18 11:52:00
79
原创 1087 All Roads Lead to Rome经典dijkstra算法(较难)
Indeed there are many different tourist routes from our city to Rome. You are supposed to find your clients the route with the least cost while gaining the most happiness.Input Specification:Each in...
2019-11-18 09:26:23
115
原创 1092 To Buy or Not to Buy
Eva would like to make a string of beads with her favorite colors so she went to a small shop to buy some beads. There were many colorful strings of beads. However the owner of the shop would only sel...
2019-11-18 07:59:54
64
原创 1090 Highest Price in Supply Chain
A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone involved in moving a product from supplier to customer.Starting from one root supplier, everyone on the...
2019-11-18 07:59:39
64
原创 1088 Rational Arithmetic
For two rational numbers, your task is to implement the basic arithmetics, that is, to calculate their sum, difference, product and quotient.Input Specification:Each input file contains one test cas...
2019-11-10 22:55:04
54
原创 1089. Insert or Merge插入排序和归并排序
1089 Insert or Merge (25 分)According to Wikipedia:Insertion sort iterates, consuming one input element each repetition, and growing a sorted output list. Each iteration, insertion sort removes one e...
2019-11-08 09:45:07
113
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人