- 博客(5)
- 收藏
- 关注
原创 二分答案模版
二分答案模版 其用于最大值取最小或最小值取最大等问题1,最大值取最小while(l<r){ int mid=(l+r)>>1; if(check(mid)) r=mid; else l=mid+1;}2,最小值取最大while(l<r){ int mid=(l+r+1)>>1; if(check(mid)) l=mid; else
2021-01-16 14:37:34 111
原创 C++实现简易五子棋
#include<iostream>#include<string>#include <windows.h> #include <stdlib.h> #include <conio.h> #include <time.h> using namespace std;string a[1000]; int n,m;void init(int n,int m) { for(int i=1;i<=n;i++) {
2020-12-22 13:57:41 643
原创 归并排序JAVA/C++
oder by merging首先其用到了递归相信很多人对于递归还是不太理解解释就用到了数学归纳法:#include <iostream>using namespace std;int jc(int num) {//后一个 if(num==1) {//判断等式是否为真 边界条件 return 1; } return num*jc(num-1);//前一个就相当于num!}int main() { int n; cin>&
2020-12-20 10:45:44 99 1
原创 arduino实现红外遥控计算器
#include<IRremote.h>#include <LCD.h>#include<LiquidCrystal.h>LCD lcd(31, 32, 33);const int Pin =2;IRrecv irrecv(Pin);decode_results results;int temp=0;int sum=0;double as;int n1;int b[10000];int check;int first,second;void s
2020-12-15 20:08:17 1154
原创 万年历51
51单片机DS1302和LCD#include<reg52.h> #include<intrins.h> unsigned char code digit[10]={"0123456789"}; sbit SCLK=P1^3; sbit DATA=P1^4; sbit RST=P1^5; sbit cs88=P2^2;sbit DU = P2^6;sbit WE = P2^7;sbit LED=P2^3;void delaynus(unsig
2020-12-13 22:30:46 105 1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人