weinan030416

导航

2023年2月12日 #

分数取模

摘要: 100s+35t=gcd(100,35) 100和35最大公约数5 gcd(100,35)=5 #include<bits/stdc++.h> using namespace std; int extgcd(int c, int d, int&x, int&y) { int g = c; if(d) 阅读全文

posted @ 2023-02-12 10:32 楠030416 阅读(37) 评论(0) 推荐(0) 编辑

2023年2月9日 #

神经网络分类

摘要: https://www.lanqiao.cn/courses/1029 对汽车燃料效率建模 数据集 http://labfile.oss.aliyuncs.com/courses/1029/mpg.csv 代码 # coding: utf-8 import matplotlib.pyplot as 阅读全文

posted @ 2023-02-09 11:39 楠030416 阅读(23) 评论(0) 推荐(0) 编辑

线段树查询i到j最长增加子串和序列

摘要: 基础篇 最长增加子数组 - 楠030416 - 博客园 (cnblogs.com) 增加线段树 子串 #include<bits/stdc++.h> using namespace std; //最长连续增加子串 int a[100],dp[100],tree[100]; void build(in 阅读全文

posted @ 2023-02-09 09:34 楠030416 阅读(45) 评论(0) 推荐(0) 编辑

2023年2月8日 #

最长增加子数组

摘要: 子串 要求一定要挨着 121 2 3 4 3 2 1 4 5 6 7 8 结果 6 #include<bits/stdc++.h> using namespace std; //最长连续增加子串 int a[100],dp[100],maxn=0; int main() { int n; cin>> 阅读全文

posted @ 2023-02-08 23:27 楠030416 阅读(10) 评论(0) 推荐(0) 编辑

爬树的甲壳虫(扩展欧几里得算法)

摘要: #include<bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 1e5 + 10; const int MOD = 998244353; ll x[maxn], y[maxn]; //快速幂模板 阅读全文

posted @ 2023-02-08 23:18 楠030416 阅读(38) 评论(0) 推荐(0) 编辑

拿石子dp

摘要: 每次从一开始或者最后拿,拿多的赢 #include<iostream> using namespace std; int stone[10]; int dp[10][10];//从i到j两人数量差的最大值 int main() { int n; cin>>n; for(int i=0;i<n;i++ 阅读全文

posted @ 2023-02-08 22:19 楠030416 阅读(7) 评论(0) 推荐(0) 编辑

下棋判断必败必胜

摘要: 每次下一个或者两个棋,你先开始下,空位n个,填满最后一个位置输 分析得到必胜必败状态 1败,2胜,3胜,4败,5胜,6胜,7败... 只剩4个空位的状态只能转移到3个空位或两个空位,此时对手必胜,所以自己必败,以此类推 #include<iostream> using namespace std; 阅读全文

posted @ 2023-02-08 21:42 楠030416 阅读(45) 评论(0) 推荐(0) 编辑

pair去重

摘要: 给定平面上 20×2120×21 个整点 (�,�)∣0≤�<20,0≤�<21,�∈�,�∈�(x,y)∣0≤x<20,0≤y<21,x∈Z,y∈Z,即横 坐标是 00 到 1919 (包含 00 和 1919) 之间的整数、纵坐标是 00 到 2020 (包含 00 和 2020​) 之 间的整 阅读全文

posted @ 2023-02-08 21:11 楠030416 阅读(20) 评论(0) 推荐(0) 编辑

去空格

摘要: .model small .data string db 'hsu dhiw dwi dwio','$' .code mov si,offset string outlp: cmp byte ptr[si],'$' jz done cmp byte ptr[si],' ' jz next mov d 阅读全文

posted @ 2023-02-08 20:50 楠030416 阅读(12) 评论(0) 推荐(0) 编辑

2023年2月7日 #

汇编栈操作

摘要: .model small .data .code mov cx,66 push cx mov bx,70 push bx pop cx pop dx mov ah,2 int 21h .exit 0 end 输出B 先cx(66)进栈,然后bx(70)进栈,弹出bx(70),弹出cx(66) 66对 阅读全文

posted @ 2023-02-07 21:23 楠030416 阅读(18) 评论(0) 推荐(0) 编辑