結果

問題 No.3051 cracked
ユーザー 👑 hos.lyrichos.lyric
提出日時 2019-04-02 02:55:15
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,334 bytes
コンパイル時間 566 ms
コンパイル使用メモリ 65,816 KB
実行使用メモリ 24,492 KB
平均クエリ数 42.00
最終ジャッジ日時 2023-09-23 17:11:48
合計ジャッジ時間 10,798 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 460 ms
24,000 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 460 ms
23,376 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 465 ms
24,348 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 454 ms
23,400 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 464 ms
23,616 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 467 ms
24,324 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 461 ms
23,628 KB
権限があれば一括ダウンロードができます

ソースコード

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, 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 < 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 (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