上一页 1 2 3 4 5 6 ··· 19 下一页
摘要: /* struct TreeNode { int val; struct TreeNode *left; struct TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) { } };*/ class TreeToSe 阅读全文
posted @ 2020-07-27 20:16 于光远 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 文件锁 #include<iostream> #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <errno.h> #include <string.h> #inc 阅读全文
posted @ 2020-07-24 21:31 于光远 阅读(396) 评论(0) 推荐(0) 编辑
摘要: #include<iostream> #include<algorithm> using namespace std; int main() { string s="Qasdaaddj"; sort(s.begin(),s.end()); cout<<s<<endl; return 0; } 1维数 阅读全文
posted @ 2020-07-22 10:54 于光远 阅读(201) 评论(0) 推荐(0) 编辑
摘要: int main() { string line,b; getline(cin,line); stringstream ss(line); while(ss>>b) { cout<<b<<endl; } } string读取某一行,然后按空格分隔吹每一个string char str[] = "no 阅读全文
posted @ 2020-07-21 20:54 于光远 阅读(3322) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <queue> #include <cassert> #include <stdlib.h> using namespace std; // 二分搜索树 template <typename Key, typename Value> clas 阅读全文
posted @ 2020-07-16 12:09 于光远 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 静态广播主要是在manifest.xml里面 加入 <receiver android:name=".MyBroadcastReceiver>组件。并给出接收类。 <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http 阅读全文
posted @ 2020-07-11 16:26 于光远 阅读(2599) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/lucky52529/article/details/89155694 单调栈的伪代码 stack<int> st; //此处一般需要给数组最后添加结束标志符,具体下面例题会有详细讲解 for (遍历这个数组) { if (栈空 || 栈顶元素大于等于当前 阅读全文
posted @ 2020-07-09 19:54 于光远 阅读(330) 评论(1) 推荐(0) 编辑
摘要: 老师想知道从某某同学当中,分数最高的是多少,现在请你编程模拟老师的询问。当然,老师有时候需要更新某位同学的成绩. 输入描述: 输入包括多组测试数据。 每组输入第一行是两个正整数N和M(0 < N <= 30000,0 < M < 5000),分别代表学生的数目和操作的数目。 学生ID编号从1编到N。 阅读全文
posted @ 2020-07-08 19:08 于光远 阅读(706) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/ljy-1471914707/p/5444531.html package com.example.sql1; import android.content.Context; import android.database.sqlite.SQLiteD 阅读全文
posted @ 2020-07-07 21:04 于光远 阅读(298) 评论(1) 推荐(0) 编辑
摘要: https://www.jianshu.com/p/f70ee1765a61 如何判断当前线程是不是主线程 Looper.myLooper() == Looper.getMainLooper() Looper.getMainLooper().getThread() == Thread.current 阅读全文
posted @ 2020-07-03 20:19 于光远 阅读(319) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 19 下一页