摘要:
#include <iostream>#include <stdio.h>using namespace std;const int N=100010;int n,m;int a[N],s[N];int main(){ scanf("%d%d",&n,&m); for(int i=1;i<=n;i+ 阅读全文
posted @ 2021-05-08 10:49
小白QIU
阅读(68)
评论(0)
推荐(0)
摘要:
C++中cin,cout效率比较低,是因为先把要输出的东西存入缓冲区与C语言中的stdio同步,也就是说这两种方法可以混用,而不必担心文件指针混乱,正因为这个兼容性,导致cin有许多的额外开销,在输出,导致效率降低,而这段语句(std::ios::sync_with_stdio(false))的作用 阅读全文
posted @ 2021-05-08 10:46
小白QIU
阅读(217)
评论(0)
推荐(0)