ICode9

精准搜索请尝试: 精确搜索
  • 0121 计算机传输-线程2022-01-31 16:30:21

    线程 两种实现方式 Thread 类 Runnable 接口 为什么需要多线程? 例如:主函数中有个死循环,后面的代码就没用了。 在通信中,经常用到死循环。 比如一个客户端一直待机,来等待一个消息传入。 比如服务端一直阻塞,也不知道客户端什么时候接入。 比如一个界面一直在屏幕上。 比如对于

  • 0121-本来晚上四单赚2万零50了。19787牛逼啊19858赚6002022-01-21 22:58:00

    标题 List item 我是真

  • 0121嵌入式C学习日志2022-01-21 21:29:59

    关键字 static 静态类 //只有函数在多次调用时定义 局部变量加static会将存储位置从栈区存到全局变量区 全局变量声明static只有当前文件能使用 const关键字 const int* a; int const *a;    指针常量 是一个指向const int型的指针,a所指向的内存单元不可改写,所以(*a)++是不允

  • Aizu - 01212022-01-14 10:30:57

    题目: Seven Puzzle - Aizu 0121 - Virtual Judge 分析: 使用BFS预处理,将所有状态预处理出来,然后逐个查找。 (我一开始直接搜的,超时) 使用知识:BFS,队列,哈希表。 代码: #include <iostream> #include <algorithm> #include <unordered_map> #include <queue> using namespace std; u

  • 0121-买卖股票最佳时机2021-11-24 23:32:31

    给定一个数组 prices ,它的第 i 个元素 prices[i] 表示一支给定股票第 i 天的价格。 你只能选择 某一天 买入这只股票,并选择在 未来的某一个不同的日子 卖出该股票。设计一个算法来计算你所能获取的最大利润。 返回你可以从这笔交易中获取的最大利润。如果你不能获取任何利润,返回

  • 0121 threading库 多线程练习2021-01-21 12:31:46

    import threading import time #线程实现 def run(n): print("task",n) time.sleep(1) print("3s") time.sleep(1) print("2s") time.sleep(1) print("1s") time.sleep(1) print("0s")

  • 0121. Best Time to Buy and Sell Stock (E)2020-09-18 17:00:21

    Best Time to Buy and Sell Stock (E) 题目 Say you have an array for which the \(i^{th}\) element is the price of a given stock on day i. If you were only permitted to complete at most one transaction (i.e., buy one and sell one share of the stock), design

  • LeetCode | 0121. Best Time to Buy and Sell Stock买卖股票的最佳时机【Python】2020-02-19 23:04:24

    LeetCode 0121. Best Time to Buy and Sell Stock买卖股票的最佳时机【Easy】【Python】【贪心】 Problem LeetCode Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transactio

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有