摘要: 如果你准备看我的学习笔记,默认你的c++已经入门了 在本文中,我们将制作一个小窗口。这个窗口中有一个带有“hello qt”字符的按钮。 这是源码,解析在后面。 #include <QApplication> #include<qpushbutton.h> int main(int argc, ch 阅读全文
posted @ 2022-12-09 16:23 bvwvd 阅读(189) 评论(1) 推荐(0)
摘要: 单调栈与单调队列优化原理 单调栈与单调队列的优化原理就是维护一个动态的数据结构,来避免每次都要从第i个元素重新开始。 比如,我们有一个数组A,我们要求$A_{i}$的后面有多少个数据比 $A_{i}$小。 如果不使用单调栈的话。我们每次求$A_{i}$后面有多少数据,都要从$A_{i}$开始。这意味 阅读全文
posted @ 2022-12-09 16:22 bvwvd 阅读(31) 评论(0) 推荐(0)
摘要: #A 要你求输了几个# #include<cstdio> int n,m; int ans; char in; int main(){ scanf("%d %d",&n,&m); for(int i=0;i<n;i++){ for(int j=0;j<m;j++){ scanf(" %c",&in) 阅读全文
posted @ 2022-12-09 16:21 bvwvd 阅读(48) 评论(0) 推荐(0)
摘要: #前言 我只是一个入门没多久的菜鸡啊,代码挺残缺的,所以谨慎观看 #A 题目的意思是,输入一个字符串,然后一个一个看,如果是v加一,如果是w加二。 #include<cstdio> #include<cstring> int ans; int main(){ char in[105]; scanf( 阅读全文
posted @ 2022-12-09 16:20 bvwvd 阅读(49) 评论(0) 推荐(0)