码迷,mamicode.com
首页 >  
搜索关键字:cin    ( 7874个结果
AcWing 828. 模拟栈
AcWing 828. 模拟栈 #include <bits/stdc++.h> using namespace std; const int N=1e6+10; int stk[N],tt; void init(){ tt=0; } void add(int x){ stk[++tt]=x; } ...
分类:Windows程序   时间:2020-07-29 15:11:00    阅读次数:89
AcWing 829. 模拟队列
AcWing 829. 模拟队列 #include <bits/stdc++.h> using namespace std; const int N=1e6+10; int q[N],hh,tt; void init(){ hh=0; tt=-1; } void add(int x){ q[++tt ...
分类:Windows程序   时间:2020-07-29 15:09:36    阅读次数:80
AcWing 830. 单调栈
AcWing 830. 单调栈 #include <bits/stdc++.h> using namespace std; const int N=1e6+10; int n; int stk[N],tt; int main(){ cin.tie(0); ios::sync_with_stdio(f ...
分类:Windows程序   时间:2020-07-29 15:07:47    阅读次数:84
HDU6799 Parentheses Matching(贪心/括号匹配)
Given a string P consisting of only parentheses and asterisk characters (i.e. "(", ")" and ""), you are asked to replace all the asterisk characters i ...
分类:其他好文   时间:2020-07-29 12:38:40    阅读次数:208
关于ios::sync_with_stdio(false)的一些问题
使用ios::sync_with_stdio(false)可以让cin读入的更快,它的原理是使本该同步的输入输出流分开,就是让c风格的输入输出流和c++的输入输出流分开。 举一个具体的例子,在正常c++中,当我们用cin输入整数,当我们在键盘上输入的时候,我们输入的东西进到了缓冲区,假设我们输入了 ...
分类:移动开发   时间:2020-07-28 22:41:21    阅读次数:126
7-18 二分法求多项式单根 (20分)
#include<iostream> #include<cstdio> using namespace std; float a, b, c, d; float l, r; float clac(float x){ return a * x * x * x + b * x * x + c * x + ...
分类:其他好文   时间:2020-07-28 22:15:33    阅读次数:72
【Python】迭代器和生成器的个人理解,再讲一讲协程
在认识yield的时候,网上很多文章都是说这个是个生成器,但是我并不知道这个是用来做什么的,所以概念很快就忘记了,后面读了几个文章以后感觉茅塞顿开。我就接介绍一下。 有一篇文章提到,可以把yield看成是生成器的return的一部分,首先一个return的作用是在程序中返回某个值,返回之后程序就不再 ...
分类:编程语言   时间:2020-07-28 14:38:10    阅读次数:78
A1149:Dangerous Goods Packaging (25)
WA代码如下: 1 #include<bits/stdc++.h> 2 using namespace std; 3 map<string, string> mmp; 4 map<string, int> has; 5 int main() 6 { 7 int n, m; cin >> n >> m ...
分类:其他好文   时间:2020-07-28 14:31:36    阅读次数:56
AcWing 799. 最长连续不重复子序列
AcWing 799. 最长连续不重复子序列 #include <bits/stdc++.h> using namespace std; const int N=1e6+10; int a[N],s[N]; int main(){ int n; cin>>n; for(int i=0;i<n;i++ ...
分类:Windows程序   时间:2020-07-28 14:21:52    阅读次数:93
AcWing 801. 二进制中1的个数
AcWing 801. 二进制中1的个数 #include <bits/stdc++.h> using namespace std; int lowbit(int x){ return x&-x; } int main(){ int n; cin>>n; while(n--){ int x,res= ...
分类:Windows程序   时间:2020-07-28 14:19:17    阅读次数:88
7874条   上一页 1 ... 22 23 24 25 26 ... 788 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!