結果
| 問題 | No.8051 cracked |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-10-22 13:40:01 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,352 bytes |
| コンパイル時間 | 5,523 ms |
| コンパイル使用メモリ | 227,360 KB |
| 実行使用メモリ | 25,764 KB |
| 平均クエリ数 | 3.00 |
| 最終ジャッジ日時 | 2024-09-22 15:34:31 |
| 合計ジャッジ時間 | 18,914 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 24 |
ソースコード
#include <bits/stdc++.h>
#include <boost/algorithm/string/replace.hpp>
using namespace std;
using namespace boost::algorithm;
string source="#include <bits/stdc++.h>\n#include <boost/algorithm/string/replace.hpp>\nusing namespace std;\nusing namespace boost::algorithm;\nstring source=\"@\";\nstring build(string str){\n string ret = str;\n replace_all(str, \"\\\\\", \"\\\\\\\\\");\n replace_all(str, \"\\n\", \"\\\\n\");\n replace_all(str, \"\\\"\", \"\\\\\\\"\");\n replace_all(ret, \"\\x40\", str);\n return ret;\n}\nint main(){\n string str = build(source);\n for(int i=0; i<str.length(); i++){\n char c = getchar();\n if(c != str[i]){\n cout << i << endl << (char)34 << str[i] << (char)34 << endl << (char)34 << c << (char)34 << endl;\n break;\n }\n }\n return 0;\n}";
string build(string str){
string ret = str;
replace_all(str, "\\", "\\\\");
replace_all(str, "\n", "\\n");
replace_all(str, "\"", "\\\"");
replace_all(ret, "\x40", str);
return ret;
}
int main(){
string str = build(source);
for(int i=0; i<str.length(); i++){
char c = getchar();
if(c != str[i]){
cout << i << endl << (char)34 << str[i] << (char)34 << endl << (char)34 << c << (char)34 << endl;
break;
}
}
return 0;
}