__asm__'s blog

By __asm__, history, 2 years ago, In English

Crying took part in the last contest.

we can see at 01:53:17 Crying submitted problem C and get wa on test 3 : 175019412

and just after 1 minute, he submitted another code and get AC : 175019782

and the code is

__asm__(R"(
	.file	"C.cpp"
	.section	.text$_Z4Readv,"x"
	.linkonce discard
	.globl	_Z4Readv
	.def	_Z4Readv;	.scl	2;	.type	32;	.endef
	.seh_proc	_Z4Readv
_Z4Readv:
.
.
.
.

r1:
	.space 4
	.ident	"GCC: (tdm64-1) 4.9.2"
	.def	getchar;	.scl	2;	.type	32;	.endef
	.def	puts;	.scl	2;	.type	32;	.endef
 
)");

and after only 2 minutes, he submit D and get AC 175020241 and the code is also asm

how can he do all this in 3 minutes?

in code C we find .def getchar; .scl 2; .type 32; .endef .def puts; .scl 2; .type 32; .endef

but the previous submission use only cin/cout and should not contain this!

and the other contest we can find similar things happening : 174133908

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

| Write comment?
»
2 years ago, # |
Rev. 2   Vote: I like it -8 Vote: I do not like it

The only rule that can (ever possibly) be violated through the use of assembly, should be the one rule about obfuscation. But still, as long as Codeforces supports it in the language list, I do not think it will be a violation of the rule.

Also, how he did it: He simply compiled his C++ code into assembly with GCC (G++). About the getchar part, it either could be that he quickly swapped out the I/O part, or it could be just the internal implementation of cin. I think it's likely the latter, though.

EDIT: NVM, I REALIZED CF DOESN'T HAVE ASM IN THE OFFICIALLY SUPPORTED LANGUAGES.

  • »
    »
    2 years ago, # ^ |
      Vote: I like it +26 Vote: I do not like it

    i try the previous one, they are completely different, and i don't think he can change I/O and fix code in 1 minute

    • »
      »
      »
      2 years ago, # ^ |
      Rev. 2   Vote: I like it -27 Vote: I do not like it

      I don't think it would be totally impossible for him to do that.

      • »
        »
        »
        »
        2 years ago, # ^ |
          Vote: I like it +24 Vote: I do not like it

        and how can he solve D in 2 minutes? it's impossible...

      • »
        »
        »
        »
        2 years ago, # ^ |
          Vote: I like it +18 Vote: I do not like it

        The assembly version contains functions Init, Solve and Read; the C++ version only has solve. The C++ version contains vector<int> R,C while the assembly version has separate variables r1,c1,r2,c2,r3,c3.

        • »
          »
          »
          »
          »
          2 years ago, # ^ |
          Rev. 2   Vote: I like it -31 Vote: I do not like it

          to LuchkinVyacheslav and __asm__: These wouldn't be a good reason to think that someone is cheating. He could have used 3 pairs of variables first, changed it for two vectors, and then back to variables. Same goes for I/O and the rest of the code. Also as a proof on how solving multiple problems in such a small time gap is possible — I present to you: tourist.

          • »
            »
            »
            »
            »
            »
            2 years ago, # ^ |
              Vote: I like it 0 Vote: I do not like it

            D1==D2 so it's ok to solve D1 D2 at the same time;

            and code for A is just

              ios::sync_with_stdio(false);
              cin.tie(0);
              int tt;
              cin >> tt;
              while (tt--) {
                int n, k;
                cin >> n >> k;
                vector<int> a(n);
                vector<int> mx(k);
                for (int i = 0; i < n; i++) {
                  cin >> a[i];
                  mx[i % k] = max(mx[i % k], a[i]);
                }
                cout << accumulate(mx.begin(), mx.end(), 0LL) << '\n';
              }
            

            It's enough to solve it in 1minute for tourist.

            • »
              »
              »
              »
              »
              »
              »
              2 years ago, # ^ |
                Vote: I like it -22 Vote: I do not like it

              I think you still did not get my point; How tourist did it and how Crying may have done it are essentially the same. They both just prepared the code locally and submitted multiple problems at once. An actual chad mindset, but you can't call that "cheating".

              • »
                »
                »
                »
                »
                »
                »
                »
                2 years ago, # ^ |
                  Vote: I like it 0 Vote: I do not like it

                but he rebuild his whole code in 1 minute and the code is not short

                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  2 years ago, # ^ |
                    Vote: I like it -20 Vote: I do not like it

                  I didn't think I need to explain anymore, but see, anything could have happened in the process of editing his code. As an example, he may have reformed his code once entirely, realized it would be easier the previous way, rolled it back with a f*** ton of Ctrl+Zs, and then got back to implementing.

              • »
                »
                »
                »
                »
                »
                »
                »
                2 years ago, # ^ |
                  Vote: I like it +16 Vote: I do not like it

                Is Cring your wife ?

                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  2 years ago, # ^ |
                  Rev. 2   Vote: I like it -21 Vote: I do not like it

                  Well, not really. But I do get pissed off about some false claims about someone cheating by an alt made only a few hours ago or less.

          • »
            »
            »
            »
            »
            »
            2 years ago, # ^ |
              Vote: I like it 0 Vote: I do not like it

            i'll try to find code included Init, Solve, Read.

»
2 years ago, # |
  Vote: I like it +2 Vote: I do not like it

The internet is very fucking interesting right?

»
2 years ago, # |
  Vote: I like it +18 Vote: I do not like it

i love Mophie _ZMF_

»
2 years ago, # |
  Vote: I like it +44 Vote: I do not like it

Enough, leave it.I can't believe such things of no importance also lead to criticism of Genshin Impact. Firstly, Genshin has never irritated you; secondly, it has never done anything intolerable, so what is wrong with you that you keep discrediting Genshin mindlessly? Mihoyo is dedicated to cultural exportation and Chinese propagation, however maniacs like you know nothing but tapping keyboards online, calumniating our great company of conscience. The bright future of Chinese indigenous electronic games will definitely be devastated by people like you

  • »
    »
    2 years ago, # ^ |
      Vote: I like it +30 Vote: I do not like it

    I almost got a fart and I have to turn to Yuanshen for big things. First, Yuanshen didn’t invite you to provoke you, and secondly, he didn’t do anything that hurts the world. What happened to you has kept you brainless and smeared. Mihayou spends every day trying his best to promote the cultural output. Chinese culture, a troll like you will only slander conscience companies by typing on the keyboard online, the future of Chinese games will be ruined by people like you

  • »
    »
    2 years ago, # ^ |
      Vote: I like it +29 Vote: I do not like it

    It's hard for me to imagine why a player with a normal mental state would make the choice of "not playing Genshin Impact". Genshin Impact's astonishing combat mechanism and rather impressive plot design can be said to be the best among all the games in the current game circle, and none of them. Friends who do not play Genshin Impact not only lose the game experience, but also a basic game understanding and spiritual belief. Genshin Impact could obviously use the game world to bring everyone to a whole new level of life, but you gave up. For the rest of your life, you will fall into the icy abyss and experience hopeless regret and a sense of decline.

»
2 years ago, # |
Rev. 2   Vote: I like it +14 Vote: I do not like it

May all the suffering souls of the world be subordinated to ja ran, under the holy light of Diana.

ja men!

»
2 years ago, # |
  Vote: I like it +43 Vote: I do not like it

Clearly, it is obfuscation. Please, don't abuse the rules.

  • »
    »
    2 years ago, # ^ |
      Vote: I like it +33 Vote: I do not like it

    First time I've seen your recent response to cheating bloggers.

    wow.

  • »
    »
    2 years ago, # ^ |
    Rev. 2   Vote: I like it -37 Vote: I do not like it

    Just realized that assembly is not an officially supported language by codeforces. Given this, I support your decision for skipping the submission. Thanks for the quick response!