結果
問題 | No.2460 #強調# |
ユーザー |
👑 ![]() |
提出日時 | 2021-05-28 18:18:32 |
言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) |
結果 |
CE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 829 bytes |
コンパイル時間 | 172 ms |
コンパイル使用メモリ | 24,832 KB |
最終ジャッジ日時 | 2025-01-21 18:57:44 |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.cpp:7:10: fatal error: testlib.h: No such file or directory 7 | #include "testlib.h" | ^~~~~~~~~~~ compilation terminated.
ソースコード
/////////////////////////////// // // Validator // #include "testlib.h" #include <iostream> #include <string> using namespace std; using ll = long long; using ull = unsigned long long; const string ChList = "abcdefghijklmnopqrstuvwxyz"; const char MarkChar = '#'; string S; int main() { registerValidation(); S = inf.readToken(); ensure(2 <= S.size() && S.size() <= 100); int markCount = 0; for(int i=0; i<S.size(); i++){ if(S[i] == MarkChar) markCount++; else{ ensuref(ChList.find(S[i]) != string::npos, "FAIL Condition failed: \" S[%d] is a invalid char.\""); } } ensure(markCount == 2); inf.readEoln(); inf.readEof(); int lMark = (int)S.find('#'); int rMark = (int)S.find('#',lMark+1); string ans = S.substr(lMark+1,rMark-lMark-1); printf("%s\n",ans.c_str()); return 0; }