基础语法
flyzer
这个作者很懒,什么都没留下…
展开
-
sort(a,a+n,cmp) 结构体按某一成员变量排序
#include<iostream> #include<cstring> #include<cmath> #include<algorithm> #define ll long long #define inf 12345 using namespace std; struct node { int x1,x2,h; }a[20010]; ...原创 2018-05-10 20:47:42 · 4114 阅读 · 0 评论 -
结构体重载运算符
#include<iostream> #include<cstring> #include<cmath> #include<algorithm> #define ll long long #define inf 12345 using namespace std; struct node{ int x1,x2,h; bool ope...原创 2018-05-10 20:41:51 · 6326 阅读 · 1 评论 -
莫名其妙的错误
对数字的运算应该是自动保存为他本身的类型了,具体看代码。 #include<stdio.h> #include<iostream> using namespace std; int main() { int n=30000; if(n*(n-1)*(n-3)<0) cout<<"***"<<n<&l...原创 2018-10-30 23:41:15 · 195 阅读 · 0 评论 -
对拍
对拍,以 POJ 3347 为例。 题解链接 对拍方法如下: //主函数代码 文件名任意 #include<iostream> #include<windows.h> using namespace std; int main() { int t=200; while(t--) { cout<<t<<e...原创 2019-06-02 18:51:48 · 715 阅读 · 2 评论