• Bio

    #include <bits/stdc++.h>
    using namespace std;
    int main()
    {
       cout<<"hello world"<<endl;
       return 0;
    }
    

    五子棋

    #include<bits/stdc++.h>
    #include<windows.h>
    using namespace std;
    int a[22][22],x,y,c;
    string s[2]={"黑胜","白胜"};
    int e() {
      int n=1,p=x+1,q=y;
      while(a[p][q]==a[x][y]) p++,n++;
      p=x-1;
      while(a[p][q]==a[x][y]) p--,n++;
      return n;
    }
    int r() {
      int n=1,p=x,q=y+1;
      while(a[p][q]==a[x][y]) q++,n++;
      q=y-1;
      while(a[p][q]==a[x][y]) q--,n++;
      return n;
    }
    int t() {
      int n=1,p=x+1,q=y+1;
      while(a[p][q]==a[x][y]) p++,q++,n++;
      p=x-1,q=x-1;
      while(a[p][q]==a[x][y]) p--,q--,n++;
      return n;
    }
    int h() {
      int n=1,p=x+1,q=y-1;
      while(a[p][q]==a[x][y]) p++,q--,n++;
      p=x-1,q=y+1;
      while(a[p][q]==a[x][y]) p--,q++,n++;
      return n;
    }
    int dfs() {
      if(e()>4||r()>4||t()>4||h()>4) return 1;
      return 0;
    }
    void m() {
      system("cls");
      cout<<" ";
      for(int i=1;i<14;i++) {
        if(i<=9) cout<<"  "<<i;
        else cout<<' '<<i;
      }
      cout<<endl;
      for(int i=1;i<14;i++) {
        if(i<=9) cout<<' '<<i;
        else cout<<i;
        for(int j=1;j<=13;j++) {
          if(a[i][j]==0) cout<<" * ";
          if(a[i][j]==1) cout<<" ○";
          if(a[i][j]==2) cout<<" ●";
        }
        cout<<"\n\n";
      }
    }
    int main() {
      while(1) {
        m();
        cin>>x>>y;
        if(a[x][y]||x<1||x>13||y<1||y>13) {
          cout<<"非法输入";
          Sleep(250);
          continue;
        }
        if(c==0) a[x][y]=1;
        else a[x][y]=2;
        if(dfs()) {
          m();
          cout<<s[c]<<endl;
          return 0;
        }
        if(c==0) c=1;
        else c=0;
      }
      return 0;
    }
    

    暴力出奇迹,骗分过样例。数学先打表,DP看运气。暴搜挂着机,打表出省一。穷举TLE,递推UKE,模拟MLE,贪心还CE。想要骗到分,就要有方法。图论背模板,数论背公式。动规背方程,高精背代码。如果都没背,干脆输样例。模拟定想全,动规定找对。贪心定证明,二分MLE。

    模拟只会猜题意 贪心只能过样例 数学上来先打表 组合数学靠运气 DP一般看规律 计算几何瞎暴力 图论强行套模板 数论只会GCD 递归递推伤不起 搜索茫然TLE 分治做得像枚举 暴力枚举数第一 数据结构干瞪眼 算法建树眼迷离 怒刷水题找信心 考试一来全懵逼 天若有情天亦老 我为暴力续一秒 十年OI一场空 不开long long见祖宗 比赛时节家家雨 OI赛场处处WA 超时皆不会优化 只能等原地爆炸 怎么进队拿国奖?看懂A+B PL

    刷题是一种出路,枚举是一种思想。打表是一种勇气,搜索是一种信仰。剪枝是一种精神,骗分是一种日常。爆零是一种宿命,WA是一种绝望。TLE是一种痛苦,RE是一种放弃。UKE是一种无奈,AC是一种原谅。弃赛是一种颓废,AK是一种梦想。吊打是一种必然,进队是一种奢望。

    NOI是一种理想,IOI是一种降维。

  • Accepted Problems

  • Recent Activities

    This person is lazy and didn't join any contests or homework.

Problem Tags

2016
1
其他
1
数学
1
SDOI
1
组合计数
1
搜索
1
枚举
1