제출 #564475

#제출 시각아이디문제언어결과실행 시간메모리
564475MrDeboo질문 (CEOI14_question_grader)C++17
0 / 100
3328 ms24228 KiB
#include <bits/stdc++.h> using namespace std; int encode (int n, int x, int y) { if(x>n)x=0; if(y>n)y=0; string s; string f=to_string(x); while(f.size()<3)f="0"+f; s+=f; f=to_string(y); while(f.size()<3)f="0"+f; s+=f; return stoi(s); }
#include <bits/stdc++.h> using namespace std; int decode (int n, int q, int h) { string s=to_string(h); int a=0; for(int i=0;i<3;i++){ a+=(s.back()-'0')*ceil(pow(10,i)); s.pop_back(); } int b=stoi(s); if(q==b)return 1; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...