全部评论 17

  • d

    2天前 来自 浙江

    1
    • userId_undefined
      T-T
      回复
      T-T

      d

      2天前 来自 浙江

      1
    • userId_undefined
      T-T
      回复
      T-T

      d

      2天前 来自 浙江

      0
  • 是很AI,我的码风和你一样,就是我的 {} 在for循环后面,例如for(int i = 1; i <= n; i++) {……}

    2天前 来自 浙江

    1
  • 我几乎不加空格。

    2天前 来自 浙江

    1
  • 78阅读·

    昨天 来自 浙江

    0
  • 我加不加全凭心情

    昨天 来自 安徽

    0
  • #include <iostream>
    using namespace std;
    int main()  {
        int n;
        cin >> n;
        int a[n];
        for (int i=0;i<n;i++) {
            cin >> a[n];
        }
        return 0;
    }
    
    
    

    2天前 来自 广东

    0
  • 会加空格,但是没你家的这么多

    2天前 来自 广东

    0
  • 没我的AI

    2天前 来自 广东

    0
  • d

    2天前 来自 浙江

    0
  • 我是只有&&和||加空格

    2天前 来自 浙江

    0
  • 你的码风其实是很标准的,不过有些细节,是啥我不知道

    3天前 来自 福建

    0
  • 不加空格

    3天前 来自 浙江

    0
  • 还行

    3天前 来自 北京

    0

  • 这无疑是神秘的

    3天前 来自 浙江

    0
  • d

    3天前 来自 浙江

    0
  • #include <iostream>
    using namespace std;
    
    int main(){
        int h=2200,g=4396;
        cout <<g+h << endl;
        cout <<g-h << endl;
        cout <<g*h << endl;
        cout <<g/h << endl;
        cout <<g%h ;
        return 0;
        
    }
    

    3天前 来自 浙江

    0
  • 确实基本不加空格,就拿我在洛谷做的唯一一道紫题说话吧(只不过没用后缀排序用的Hash):

    #include<bits/stdc++.h>
    using namespace std;
    #define ui unsigned
    #define mx 1000005
    #define bs 97
    #define io ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    ui fac[mx]={1},hs[mx];
    int n,s[mx];
    char c[mx];
    ui get(int l,int r){
        if(l!=0) return hs[r]-hs[l-1]*fac[r-l+1];
        return hs[r];
    }
    bool cmp(int a,int b){
        int l=0,r=min(n-a,n-b);
        while(l<r){
            int mid=(l+r+1)/2;
            if(get(a,a+mid-1)==get(b,b+mid-1))
                l=mid;
            else
                r=mid-1;
        }
        if(a+l==n || b+l==n) return a>b;
        return c[a+l]<c[b+l];
    }
    int main(){
        io;
        cin>>c;
        n=strlen(c);
        for(int i=1;i<=n;i++)
            fac[i]=fac[i-1]*bs;
        hs[0]=c[0]+1;
        for(int i=1;i<n;i++)
            hs[i]=hs[i-1]*bs+c[i]+1;
        for(int i=0;i<n;i++)
            s[i]=i;
        stable_sort(s,s+n,cmp);
        for(int i=0;i<n;i++)
            cout<<s[i]+1<<' ';
    }
    

    4天前 来自 浙江

    0
    • 2322^{32} 自然溢出哈希?这能过?

      2天前 来自 广东

      0
    • AC记录

      只能说数据没把这个卡掉

      昨天 来自 浙江

      0
    • 牛逼,神秘数据

      昨天 来自 广东

      0

热门讨论