操作技巧
Bond0909
这个作者很懒,什么都没留下…
展开
-
关闭stdio的同步提高cin、cout的速度
#include<bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); int x; cin>>x; cout<<x; return 0; }只需要在程序的开头调用ios::sync_with_stdio(false);即可...原创 2018-07-09 13:05:41 · 1333 阅读 · 0 评论 -
结构体基本应用
一·成员函数的定义可以利用成员函数对结构体进行初始化,同时存在两种写法写法一:struct point { int x,y; point(int x=0,int y=0):x(x),y(y){}; //int x=0,int y=0就相当于默认x=0,y=0 //:x(x),y(y)相当于对x,y进行赋值 };写法二:struct point { int x,y; point(...原创 2018-07-12 13:10:44 · 370 阅读 · 0 评论