码迷,mamicode.com
首页 >  
搜索关键字:math    ( 11719个结果
题解 P4587 【[FJOI2016]神秘数】
P4587 [FJOI2016]神秘数 题意简述: 一个可重复数字集合S的神秘数定义为最小的不能被S的子集的和表示的正整数。例如S={1,1,1,4,13} 现给定n个正整数a[1]..a[n],m个询问,每次询问给定一个区间l,r,求由a[l],a[l+1],…,a[r]所构成的可重复数字集合的神 ...
分类:其他好文   时间:2020-11-25 12:25:21    阅读次数:5
121 买卖股票的最佳时机
给定一个数组,它的第 i 个元素是一支给定股票第 i 天的价格。 如果你最多只允许完成一笔交易(即买入和卖出一支股票一次),设计一个算法来计算你所能获取的最大利润。 注意:你不能在买入股票前卖出股票。 示例 1: 输入: [7,1,5,3,6,4] 输出: 5 解释: 在第 2 天(股票价格 = 1 ...
分类:其他好文   时间:2020-11-25 12:12:50    阅读次数:4
[LeetCode题解]86. 分隔链表 | 三指针 + 虚拟头节点
解题思路 三指针,一个指向前半部分待插入位置,一个指向后半部分待插入位置,最后一个从前往后遍历 代码 /** * Definition for singly-linked list. * public class ListNode { * public int val; * public ListN ...
分类:其他好文   时间:2020-11-25 12:06:05    阅读次数:7
实验三
#include<math.h> #include<stdio.h> int main(){ float a,b,c,x1,x2; float delta,real,imag; printf("Enter a,b,c:"); while(scanf("%f%f%f",&a,&b,&c)!=EOF){ ...
分类:其他好文   时间:2020-11-24 12:17:23    阅读次数:9
一顿操作猛如虎,一看头发。。。
#include <math.h> #include <stdio.h> int main() { float a, b, c, x1, x2; float delta, real, imag; printf("Enter a, b, c: "); while(scanf("%f%f%f", &a, ...
分类:其他好文   时间:2020-11-24 12:14:01    阅读次数:6
实验3
实验任务4#include<stdio.h> #include<math.h> int main() { int n,a,b,i,s; printf("Enter a number:"); scanf("%d",&n); while(n){ i=0; s=0; while(n!=0){ a=n%10 ...
分类:其他好文   时间:2020-11-23 12:22:09    阅读次数:3
实验三
#include <math.h> #include <stdio.h> int main() { float a,b,c,x1,x2; float delta,real,imag; printf("Enter a,b,c"); while(scanf("%f%f%f",&a,&b,&c) !=EO ...
分类:其他好文   时间:2020-11-23 11:57:34    阅读次数:4
实验三
任务一 #include<stdio.h> #include<math.h> int main(){ float a, b, c, x1, x2; float delta, real, imag; printf("Enter a, b, c: "); while(scanf("%f%f%f", &a ...
分类:其他好文   时间:2020-11-21 12:42:08    阅读次数:28
实验333333333333333333
#include<math.h> #include<stdio.h> int main(){ float a, b, c, x1, x2; float delta, real, imag; printf("Enter a, b, c: "); while(scanf("%f%f%f", &a, &b ...
分类:其他好文   时间:2020-11-21 12:32:15    阅读次数:7
实验3
#include <math.h> #include <stdio.h> int main() { float a, b, c, x1, x2; float delta, real, imag; printf("Enter a, b, c: "); while(scanf("%f%f%f", &a, ...
分类:其他好文   时间:2020-11-21 12:31:36    阅读次数:8
11719条   上一页 1 ... 21 22 23 24 25 ... 1172 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!