結果

問題 No.3051 cracked
ユーザー 👑 hos.lyrichos.lyric
提出日時 2019-04-02 15:55:30
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 472 ms / 1,024 ms
コード長 1,283 bytes
コンパイル時間 579 ms
コンパイル使用メモリ 65,080 KB
実行使用メモリ 24,276 KB
平均クエリ数 3.00
最終ジャッジ日時 2023-09-30 05:57:55
合計ジャッジ時間 13,279 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 451 ms
23,364 KB
testcase_01 AC 445 ms
23,400 KB
testcase_02 AC 456 ms
23,808 KB
testcase_03 AC 450 ms
24,012 KB
testcase_04 AC 455 ms
23,364 KB
testcase_05 AC 456 ms
23,364 KB
testcase_06 AC 458 ms
24,216 KB
testcase_07 AC 460 ms
24,276 KB
testcase_08 AC 472 ms
23,544 KB
testcase_09 AC 449 ms
23,412 KB
testcase_10 AC 446 ms
24,252 KB
testcase_11 AC 447 ms
23,868 KB
testcase_12 AC 448 ms
23,400 KB
testcase_13 AC 452 ms
23,640 KB
testcase_14 AC 453 ms
23,868 KB
testcase_15 AC 453 ms
23,400 KB
testcase_16 AC 452 ms
23,820 KB
testcase_17 AC 447 ms
23,352 KB
testcase_18 AC 452 ms
24,012 KB
testcase_19 AC 449 ms
23,544 KB
testcase_20 AC 448 ms
23,868 KB
testcase_21 AC 444 ms
23,400 KB
testcase_22 AC 446 ms
24,156 KB
testcase_23 AC 443 ms
23,616 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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

int main() {
  const char *quine = "#include <stdio.h>%c#include <iostream>%c#include <string>%c%cchar buf[100010];%cstd::string me, input;%c%cint main() {%c  const char *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);%c  me = buf;%c  for (int i = 0; i < 1283; ++i) {%c    input += getchar();%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);
  me = buf;
  for (int i = 0; i < 1283; ++i) {
    input += getchar();
  }
  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