
笔记
编程?小白
这个作者很懒,什么都没留下…
展开
-
退火算法学习笔记
import mathimport numpy as npT = 1000Tmin = 1sectionl = -4sectionh = 16xold = np.random.uniform(sectionl,sectionh)k = 100yold = 0t = 0def aimFunction(x): y = x*math.sin(x) return ydef judge(de,tmp): if(de < 0): return原创 2022-05-28 15:17:17 · 157 阅读 · 0 评论 -
【无标题】数学实验 慕课答案 第一节
第1讲 MATLAB软件入门 单元测验(MATLAB软件入门)1、 问题:清空 MATLAB 工作空间内所有变量的命令是选项:A:clcB:clfC:clearD:cls答案: 【clear】2、 问题:当在命令行窗口执行命令时,如果不想立即在命令行窗口中输出结果,可以在命令后加上( )。选项:A:,B:;C:…D:直接回车答案: 【;】3、 问题:如果x=1: 2 : 10,则x(1)和x(5)分别是( ) 选项:A:1,10B:1,9C:2,10.原创 2022-04-24 19:13:08 · 946 阅读 · 1 评论 -
整数除法(位运算)
class Solution {public: int divide(int dividend, int divisor) { if(divisor == INT_MIN) return (dividend == INT_MIN)?1:0; bool flag = false; if(dividend == INT_MIN && divisor == -1) return INT_MAX; else if(divide原创 2022-04-24 17:44:49 · 302 阅读 · 0 评论 -
线段树经典题目
leetcode 每日一题 四月四号class NumArray {private: vector<int> segmentTree; int n; void build(int node,int l,int r,vector<int>& nums){ if(l == r) {segmentTree[node] = nums[l];return ;} int m = ( l + r) / 2; bu原创 2022-04-05 23:02:57 · 4090 阅读 · 0 评论 -
【无标题】summary of studying the storage cache
SUMMARY OF CACHEthe idea it useput the currently used data int the nearest cache,by doing this ,we can cut the time we visit the data.resonthe time to visit the main memory is hundrus times of the timeto visit the cache. the more ,the time to原创 2022-04-05 19:27:47 · 115 阅读 · 0 评论 -
青蛙跳做题心得
#include<iostream>using namespace std;int main(){ int n; cin>>n; int* tone = new int[n + 1]; for(int i = 0; i <= n; i++){ cin>>tone[i]; } int* path = new int[n + 1]; if(n == 1) { .原创 2022-03-27 14:11:34 · 6037 阅读 · 0 评论 -
2021-05-30
实现一个银行账号类功能与现实生活中的atm机相似以下为代码:#include#include"bank.h"#include#include#include#include#includeusing namespace std;int find(string zhanghao,vector v1);int main (){//read the bank account informationifstream fin1;ofstream fout1;ofstream fou原创 2021-05-30 16:20:17 · 102 阅读 · 0 评论 -
2021-05-22
在这里插入图片描述显然上述输出是乱码点击右下方的utf,并找到gbk编码最终输出如下:原创 2021-05-22 17:05:19 · 100 阅读 · 0 评论