- 博客(11)
- 资源 (8)
- 收藏
- 关注
原创 整数拼接(记忆化更新)
给定一个长度为 n 的数组 A1,A2,⋅⋅⋅,An。你可以从中选出两个数 Ai 和 Aj(i 不等于 j),然后将 Ai 和 Aj 一前一后拼成一个新的整数。例如 12 和 345 可以拼成 12345 或 34512。注意交换 Ai 和 Aj 的顺序总是被视为 2 种拼法,即便是 Ai=Aj 时。请你计算有多少种拼法满足拼出的整数是 K 的倍数。输入格式第一行包含 2 个整数 n 和 K。第二行包含 n 个整数 A1,A2,⋅⋅⋅,An。输出格式一个整数代表答案。数据范围1≤n≤1
2020-08-19 12:36:47 1975 3
原创 1046 Shortest Distance (思维题)
1046 Shortest Distance (20分)The task is really simple: given N exits on a highway which forms a simple cycle, you are supposed to tell the shortest distance between any pair of exits.Sample Input:5 1 2 4 14 931 32 54 1Sample Output:3107题意:找到环形
2020-08-15 10:44:58 140
原创 IOE和阿里云工作原理图示
内容不一定准确,纯属个人见解,敬请斧正。IOE阿里云百度百科-飞天其实就像是生活中大型计算机一样,需要有操作系统控制和管理cpu(x86),程序(MYSQL)和内存(云存储)来进行工作
2020-08-14 15:42:17 681
原创 1097 Deduplication on a Linked List (Map构建链表)
Given a singly linked list L with integer keys, you are supposed to remove the nodes with duplicated absolute values of the keys. That is, for each value K, only the first node of which the value or absolute value of its key equals K will be kept. At the m
2020-08-13 18:46:41 145
原创 1064 Complete Binary Search Tree (中序遍历构建完整搜索二叉树)
A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:The left subtree of a node contains only nodes with keys less than the node’s key.The right subtree of a node contains only nodes with keys greater than
2020-08-12 23:07:03 154
原创 1093 Count PAT‘s (思维题)
The string APPAPT contains two PAT’s as substrings. The first one is formed by the 2nd, the 4th, and the 6th characters, and the second one is formed by the 3rd, the 4th, and the 6th characters.Now given any string, you are supposed to tell the number of
2020-08-11 21:31:35 168
原创 Prim最小生成树
#include<iostream>#include<string.h>#include<algorithm>using namespace std;const long long Max=9223372036854775807;long long cost[1000][1000];long long mincost[1000000];bool used[1000000];int v;int prim(){ long long res=0; for(
2020-08-10 23:36:46 141
原创 1053 Path of Equal Weight (vector内元素排序)
1053 Path of Equal Weight (30分)Given a non-empty tree with root R, and with weight Wi assigned to each tree node Ti . The weight of a path from R to L is defined to be the sum of the weights of all the nodes along the path from R to any leaf node L.Now
2020-08-09 20:03:07 112
原创 1091 Acute Stroke (广搜队列代替深搜递归)
One important factor to identify acute stroke (急性脑卒中) is the volume of the stroke core. Given the results of image analysis in which the core regions are identified in each MRI slice, your job is to calculate the volume of the stroke core.Input Specificat
2020-08-06 19:11:19 188
原创 1099 Build A Binary Search Tree (搜索二叉树赋值并标记左右)
A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:The left subtree of a node contains only nodes with keys less than the node’s key.The right subtree of a node contains only nodes with keys greater than
2020-08-05 23:26:29 384
原创 1094 The Largest Generation (vector数组的妙用)
1094 The Largest Generation (25分)A family hierarchy is usually presented by a pedigree tree where all the nodes on the same level belong to the same generation. Your task is to find the generation with the largest population.Input Specification:Each inp
2020-08-03 18:02:05 161
宾馆预订系统-课设作业
2021-01-11
ASP.NET的验证码功能实现
2020-05-30
ROS自动导航的运行命令.txt
2020-04-04
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人