Submission #19104

# Submission time Handle Problem Language Result Execution time Memory
19104 2016-02-18T11:19:44 Z Namnamseo Ancient symbol (kriii1_A) C++14
Compilation error
0 ms 0 KB
float sr(float y) {
    int i=0x5f3759df-((*(int*)&y)>>1);
    float x2=y*0.5F;
    y=*(float*)&i;
    y=y*(1.5F-(x2*y*y));
    return y*(1.5F-(x2*y*y));
}
char p[1<<16],*a=p;
#define v(b) *a++=(b)
int tt=0,vv=2,ww=5;
int rd() {
    tt=(tt*2+tt*tt*7+vv*13+vv*vv*17+ww*5+ww*ww*6)%84;
    vv=(tt*3+tt*tt*4+vv*2+vv*vv*11+ww*2+ww*ww*10)%1241;
    ww=(tt*4+tt*tt*3+vv*7+vv*vv*13+ww+ww*ww*12)%5883;
    return tt;
}
char *func="2a#05H6bu07G21h42U26n3bU37>e9H41!eb}35i34p3a(3a"
           "*"                                                     "e6K44ve5N56<ca%9e]c7Xa1hc4>64]c5wb6Mb3gbbkb9x67]04M39Gf7<44Wd"
           "cx"                                                   "94mde^4ai26#4c!23H3f<edj39k32jf7i44rdc a1<8e&9c%";
char *u="!@#$%^&*()1234567890QWERTYUIOPqwertyuiopASD"
        "FG"                                                 "HJKLasdfghjklZXCVBNMzxcvbnm,./<>?{}[]+=";
char *def="2ai05i1eS46s1fy47#22v4c&1"
          "9u"                                               "07o5f^10u65Q09R5b%c5%a3!c2I6dzbdZ";
pr(char *t,int *k) {
    unsigned int w=0,c;
    while (*t) {
        sscanf(t,"%x",&c);
        c=(c+w)%256;
        w=(c-w+256)%0x100;
        v(c);
        t+=3;
        (*k)++;
    }(*k)--;
}
char *pr1="2aK05I5eQ0aZ57o1bs05U25]4bI27Z48g1a)06j37i"
          "e9w39Xfev"                             "32V37Hf9g39m07Z2f[08p40qf0v47*09W2dG37s1aI48hebX55ge2h83R9fx90&9ag";//
char *pr2="2au05!1dp35v2d>06P52He5k80xcfy97wca[8fna7g8dSc7}9cLc9(7esb7Uad{cct98X9cOd6*5fH05j6d}c4(9eOaek"
          "83Sadkb1I81gb0h98q8a<b1$7e@acn";
half() {
    int i,j,k,l;
    for(i=60; i>=0; i--) {
        j=1./sr(3600-i*i);
        l=1./sr(900-i*i);
        for(k=0; k<60-j; k++)v(' ');
        v('/');
        v('*');
        for(k++; k<60+j; k++) {
            if(0<=i&&i<30) {
                if(i==10&&k==90)pr(def,&k);
                else if(i==8&&k==70)pr(pr1,&k);
                else if(i==6&&k==70)pr(pr2,&k);
                else if(i==2&&k==63)pr(func,&k);
                else v((90-l<=k&&k<=90+l)?u[rd()]:' ');
            } else v(' ');
        }
        v('*');
        v('/');
        v('\n');
    }
}
main() {
#ifdef found
    hehe();//
#else
    half();
#endif
    return puts(p);
}

Compilation message

A.cpp: In function ‘float sr(float)’:
A.cpp:3:32: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     int i=0x5f3759df-((*(int*)&y)>>1);
                                ^
A.cpp:5:17: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     y=*(float*)&i;
                 ^
A.cpp: At global scope:
A.cpp:20:67: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
            "cx"                                                   "94mde^4ai26#4c!23H3f<edj39k32jf7i44rdc a1<8e&9c%";
                                                                   ^
A.cpp:22:62: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
         "FG"                                                 "HJKLasdfghjklZXCVBNMzxcvbnm,./<>?{}[]+=";
                                                              ^
A.cpp:24:62: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
           "9u"                                               "07o5f^10u65Q09R5b%c5%a3!c2I6dzbdZ";
                                                              ^
A.cpp:25:18: error: ISO C++ forbids declaration of ‘pr’ with no type [-fpermissive]
 pr(char *t,int *k) {
                  ^
A.cpp: In function ‘int pr(char*, int*)’:
A.cpp:28:25: error: ‘sscanf’ was not declared in this scope
         sscanf(t,"%x",&c);
                         ^
A.cpp:35:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^
A.cpp: At global scope:
A.cpp:37:51: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
           "e9w39Xfev"                             "32V37Hf9g39m07Z2f[08p40qf0v47*09W2dG37s1aI48hebX55ge2h83R9fx90&9ag";//
                                                   ^
A.cpp:39:11: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
           "83Sadkb1I81gb0h98q8a<b1$7e@acn";
           ^
A.cpp:40:6: error: ISO C++ forbids declaration of ‘half’ with no type [-fpermissive]
 half() {
      ^
A.cpp: In function ‘int half()’:
A.cpp:61:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^
A.cpp: At global scope:
A.cpp:62:6: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type]
 main() {
      ^
A.cpp: In function ‘int main()’:
A.cpp:68:18: error: ‘puts’ was not declared in this scope
     return puts(p);
                  ^