# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
448659 | vanic | 질문 (CEOI14_question_grader) | C++14 | 256 ms | 99112 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <set>
#include <vector>
using namespace std;
set < int > s;
vector < set < int > > v;
void rek(int x, int br){
if(x==13){
return;
}
if(br==6){
v.push_back(s);
return;
}
s.insert(x);
rek(x+1, br+1);
s.erase(x);
rek(x+1, br);
}
void precompute(){
rek(1, 0);
}
int encode (int n, int x, int y) {
precompute();
set < int > s1, s2;
s1=v[x];
s2=v[y];
while(!s2.empty()){
s1.erase(*s2.begin());
s2.erase(s2.begin());
}
return *s1.begin();
}
#include <set>
#include <vector>
using namespace std;
set < int > s;
vector < set < int > > v;
void rek(int x, int br){
if(x==13){
return;
}
if(br==6){
v.push_back(s);
return;
}
s.insert(x);
rek(x+1, br+1);
s.erase(x);
rek(x+1, br);
}
void precompute(){
rek(1, 0);
}
int decode (int n, int q, int h) {
precompute();
set < int > s1=v[q];
if(s1.find(h)!=s1.end()){
return 1;
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |