通过这个题熟悉了下iota的用法,vector自定义排序(根据另一个数组来排当前的数组) 优先队列对pair数据的处理方式,很好的一道题 1 class Solution { 2 public: 3 using PII = pair<int,int>;//type def 4 5 vector<in ...
分类:
编程语言 时间:
2021-04-20 15:19:37
阅读次数:
0
int main(int argc,char * argv[]) { int arry[] = { 1,2,3 }; //大小下标计算 (int)arry+sizeof(int)*n arry[2] = 30; printf("%x", &arry[2]); printf("%x", (int)ar ...
分类:
编程语言 时间:
2021-04-20 15:10:21
阅读次数:
0
1 typedef int semaphore; 2 semaphore count_mutex = 1; 3 semaphore data_mutex = 1; 4 int count = 0; 5 6 void reader(){ 7 while(TRUE){ 8 down(&count_mut ...
分类:
其他好文 时间:
2021-04-20 15:08:36
阅读次数:
0
PS:本文主要包括二叉树的前序,中序,后序,层序,垂序遍历,使用cpp语言。 前序遍历 struct TreeNode { int val; TreeNode* left; TreeNode* right; TreeNode(int x) : val(x), left(NULL), right(NU ...
分类:
其他好文 时间:
2021-04-20 15:06:15
阅读次数:
0
简单实例: >存储过程,参数的传入! delimiter $ create procedure p1() begin declare i int default 10; select concat ('i的取值是:',i) as QuZhi; end $ delimiter $ create pro ...
分类:
数据库 时间:
2021-04-20 15:04:52
阅读次数:
0
实用的: Ctrl + D 复制光标所在行 或 复制选择内容,并把复制内容插入光标位置下面 (必备) Ctrl + Shift + Enter 自动结束代码,行末自动添加分号 (必备) 全部内容,来自网络 Ctrl快捷键 介绍Ctrl + F 在当前文件进行文本查找 (必备)Ctrl + R 在当前 ...
分类:
编程语言 时间:
2021-04-20 15:03:45
阅读次数:
0
有n个任务,且tasks[i] = [enqueueTimei, processingTimei] 意味着第 i?????????? 项任务将会于 enqueueTimei 时进入任务队列,需要 processingTimei 的时长完成执行。现有一个单线程 CPU ,同一时间只能执行 最多一项 任 ...
分类:
编程语言 时间:
2021-04-20 14:58:36
阅读次数:
0
#include <iostream> //预处理器编译指令#include int main(void) //函数头 { //函数体开始{ using namespace std; //编译指令 int apple; //声明整数变量 apple = 25; //赋值变量 cout << "我有" ...
分类:
编程语言 时间:
2021-04-20 14:29:02
阅读次数:
0
代码: #include <stdio.h> #include <stdlib.h> /* run this program using the console pauser or add your own getch, system("pause") or input loop */ int ma ...
分类:
其他好文 时间:
2021-04-20 14:10:46
阅读次数:
0
参考文章 1 #include<bits/stdc++.h> 2 using namespace std; 3 4 int X[] = {0, -1, 1, 0, 0}; 5 int Y[] = {0, 0, 0, -1, 1}; 6 7 bool vis[10][10]; 8 int res = ...
分类:
其他好文 时间:
2021-04-20 14:10:10
阅读次数:
0