欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Optimization

程序员文章站 2024-03-19 09:46:28
...
#pragma GCC diagnostic error "-std=c++11"
#pragma GCC optimize("-fdelete-null-pointer-checks,inline-functions-called-once,-funsafe-loop-optimizations,-fexpensive-optimizations,-foptimize-sibling-calls,-ftree-switch-conversion,-finline-small-functions,inline-small-functions,-frerun-cse-after-loop,-fhoist-adjacent-loads,-findirect-inlining,-freorder-functions,no-stack-protector,-fpartial-inlining,-fsched-interblock,-fcse-follow-jumps,-fcse-skip-blocks,-falign-functions,-fstrict-overflow,-fstrict-aliasing,-fschedule-insns2,-ftree-tail-merge,inline-functions,-fschedule-insns,-freorder-blocks,-fwhole-program,-funroll-loops,-fthread-jumps,-fcrossjumping,-fcaller-saves,-fdevirtualize,-falign-labels,-falign-loops,-falign-jumps,unroll-loops,-fsched-spec,-ffast-math,Ofast,inline,-fgcse,-fgcse-lm,-fipa-sra,-ftree-pre,-ftree-vrp,-fpeephole2",3)
#pragma GCC target("avx","sse2")
#include<cstdio>
using namespace std;
namespace FASTIO{
    const int MAXN=10000000;
    char gc(){
        static char In[MAXN],*at=In,*en=In;
        if(at==en)en=(at=In)+fread(In,1,MAXN,stdin);
        return at==en?EOF:*at++;
    }
    template<class tp>
    void read(tp& x){
        x=0;
        char c=gc();
        bool sgn=0;
        while((c<'0'||c>'9')&&c!='-'&&c!=EOF)c=gc();
        if(c==EOF)return;
        if(c=='-')sgn=1,c=gc();
        while(c>='0'&&c<='9')x=(x<<3)+(x<<1)+c-'0',c=gc();
        if(sgn)x=-x;
    }
    void read(char* str){
        char c=gc();
        while((c==' '||c=='\n'||c=='\r'||c=='\t')&&c!=EOF)c=gc();
        if(c!=EOF)while(c!=' '&&c!='\n'&&c!='\r'&&c!='\t')*str++=c,c=gc();
        *str=0;
    }
    char _In[MAXN],*_at=_In;
    void pc(char c){
        if(_at==_In+MAXN)fwrite(_at=_In,1,MAXN,stdout);
        *_at++=c;
    }
    template<typename tp>
    void write(tp x){
        if(x<0)pc('-'),write(-x);
        else{
            if(x>=10)write(x/10);
            pc(x%10+'0');
        }
    }
    void flush(){fwrite(_In,1,_at-_In,stdout),_at=_In;}
}using FASTIO::gc;using FASTIO::pc;using FASTIO::read;using FASTIO::write;using FASTIO::flush;

int main(){
    freopen("1.txt","r",stdin);
    freopen("2.txt","w",stdout);
    int a,b;
    read(a),read(b);
        write(a+b);
        flush();
    return 0;
}