結果

問題 No.3051 cracked
ユーザー 👑 hos.lyrichos.lyric
提出日時 2019-04-02 03:23:53
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 1,350 bytes
コンパイル時間 1,753 ms
コンパイル使用メモリ 62,356 KB
実行使用メモリ 45,188 KB
最終ジャッジ日時 2023-09-23 17:12:59
合計ジャッジ時間 4,966 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
testcase_01 -- -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <iostream>
#include <string>

char buf[100010];
std::string me, input;

int main() {
  auto quine = "#include <stdio.h>%c#include <iostream>%c#include <string>%c%cchar buf[100010];%cstd::string me, input;%c%cint main() {%c  auto quine = %c%s%c;%c  sprintf(buf, quine, 10, 10, 10, 10, 10, 10, 10, 10, 34, quine, 34, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10);%c  me = buf;%c  for (int i = 0; i < 24; ++i) {%c    fgets(buf, sizeof(buf), stdin);%c    input += buf;%c  }%c  for (int x = 0; x < (int)me.size() && x < (int)input.size(); ++x) {%c    if (me[x] != input[x]) {%c      std::cout << x << (char)10;%c      std::cout << (char)34 << me[x] << (char)34 << (char)10;%c      std::cout << (char)34 << input[x] << (char)34 << (char)10;%c    }%c  }%c  return 0;%c}%c";
  sprintf(buf, quine, 10, 10, 10, 10, 10, 10, 10, 10, 34, quine, 34, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10);
  me = buf;
  for (int i = 0; i < 24; ++i) {
    fgets(buf, sizeof(buf), stdin);
    input += buf;
  }
  for (; ; ) {}
  for (int x = 0; x < (int)me.size() && x < (int)input.size(); ++x) {
    if (me[x] != input[x]) {
      std::cout << x << (char)10;
      std::cout << (char)34 << me[x] << (char)34 << (char)10;
      std::cout << (char)34 << input[x] << (char)34 << (char)10;
    }
  }
  return 0;
}
0