Rating changes for last rounds are temporarily rolled back. They will be returned soon. ×

Xiaohuba's blog

By Xiaohuba, history, 4 weeks ago, In English

UPD: It is a compiler bug, and is resolved since gcc 12.3. Further information is on https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116459.

[Apologize for my poor English.]

The code at https://godbolt.org/z/PP1TTdhxf outputs 1. However, if you simulate the code, the answer is obviously 20.

Further exploration showed that the compiler compiled function qpw, but did not call it. Uncomment line 22 solves the issue, surprisingly. Further more, the bug seems to only occur on gcc12.1 and gcc12.2, with -O2 enabled.

I believe the code does not contain any undefined / unspecified behavior.

Full text and comments »

  • Vote: I like it
  • +15
  • Vote: I do not like it

By Xiaohuba, 7 months ago, In English

Today is December 30th in Chinese Lunar Calendar (a.k.a Chinese New Year Eve).

We will enter the Year of Dragon in a few hours. Quite different from western culture, dragon (which sounds like "loong 龙" in Chinese), is an animal that symbolizes power, wisdom and strength.

The CF community has been passing through a hard time. We've experienced an explosive Goodbye 2023 Round, and there are more contentious topics. But anyway, we hope we will come into a entirely new, wonderful Chinese New Year! Hope that Codeforces will be a platform purely for competitive programming, where contests of good quality are held frequently, and people around the world are able to discuss academic problems freely.

Let's wait for the moment that the Year of Dragon comes!

UPD: The Year of Dragon has arrived. Happy Chinese New Year!

Full text and comments »

  • Vote: I like it
  • +138
  • Vote: I do not like it

By Xiaohuba, history, 16 months ago, In English

These days I'm trying to compile the following c++ code:

#include<vector>

const int MAXN=1e5+5;
std::vector<int> factor[MAXN];

signed main() {return 0;}

This code works while I'm using g++ 11.3.0. However, if I use g++ 13.1.0 or 12.1.0, I'll receive a compile error:

/var/folders/v7/yk8tz4j54cl2lhp1f80nyz700000gn/T//cc2HpyzP.s:371:29: error: unexpected token in '.section' directive
        .section .data.rel.ro.local

Reinstalling the compiler doesn't works. What should I do?

Note I use Apple M1 with MacOS 13.2.1 (22D68).

Full text and comments »

  • Vote: I like it
  • +7
  • Vote: I do not like it