码迷,mamicode.com
首页 >  
搜索关键字:numbers    ( 7657个结果
《剑指offer》第四题:替换空格
// 面试题29:顺时针打印矩阵 // 题目:输入一个矩阵,按照从外向里以顺时针的顺序依次打印出每一个数字。 #include <cstdio> void PrintMatrixInCircle(int** numbers, int columns, int rows, int start); vo ...
分类:其他好文   时间:2020-03-29 12:52:45    阅读次数:62
[CF538B] Quasi Binary
[toc] Description A number is called quasibinary if its decimal representation contains only digits 0 or 1. For example, numbers 0, 1, 101, 110011 — a ...
分类:其他好文   时间:2020-03-28 20:25:08    阅读次数:93
SOS问题
SOS问题 模板 cpp //iterative version for(int mask = 0; mask https://codeforces.com/blog/entry/45223 https://blog.csdn.net/weixin_38686780/article/details/ ...
分类:其他好文   时间:2020-03-28 01:17:25    阅读次数:106
1008 Elevator
The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elev ...
分类:其他好文   时间:2020-03-27 12:53:59    阅读次数:79
LCP 1. 猜数字
地址:https://leetcode-cn.com/problems/guess-numbers/ <?php /** 小A 和 小B 在玩猜数字。小B 每次从 1, 2, 3 中随机选择一个,小A 每次也从 1, 2, 3 中选择一个猜。他们一共进行三次这个游戏,请返回 小A 猜对了几次? 输入 ...
分类:其他好文   时间:2020-03-27 12:29:34    阅读次数:122
[CF1286B] Numbers on Tree
给定一棵有根树,每个结点有权值 $a_i$,记 $c_i$ 为 $i$ 的子树中权值 $ using namespace std; define int long long const int N = 2005; vector g[N]; priority_queue hp; int ans[N], ...
分类:其他好文   时间:2020-03-23 09:19:09    阅读次数:64
377. Combination Sum IV
Given an integer array with all positive numbers and no duplicates, find the number of possible combinations that add up to a positive integer target. ...
分类:其他好文   时间:2020-03-22 19:30:38    阅读次数:66
剑指offer[29]——最小的K个数
题目描述 输入n个整数,找出其中最小的K个数。例如输入4,5,1,6,2,7,3,8这8个数字,则最小的4个数字是1,2,3,4,。 这道题目对js来讲应该是很简单了,js有自带的 函数,我们将输入的数组进行排序之后,输出前k个数就是题目要求 的结果。 ...
分类:其他好文   时间:2020-03-22 11:12:40    阅读次数:59
列表和键
1,在 JavaScript 中 怎么转换列表? 我们使用 map() 函数使 numbers 数组中的元素值翻倍,将 map() 返回的新数组分配给变量 doubled 2,React中,转换数组为元素列表的方式,和上述方法基本相同 import React, { Component } from ...
分类:其他好文   时间:2020-03-22 01:06:05    阅读次数:69
1023 Have Fun with Numbers (20分)
模拟整数乘法,比较简单的乘法模拟,因为一个因数是2,只有一位。注意处理可能产生的进位,测试点2和7测的就是这个。(理解题意很重要,pat可能有的题不难,但是得仔细琢磨坑点在哪里) 用digit1[]记录原数字中各位数字的出现次数,digit2[]存储结果中各位数字出现的次数,逐个比较,如果次数不相等 ...
分类:其他好文   时间:2020-03-21 19:41:48    阅读次数:97
7657条   上一页 1 ... 27 28 29 30 31 ... 766 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!