# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
572191 | RandomLB | 질문 (CEOI14_question_grader) | C++17 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pi;
typedef pair<ll, ll> pll;
template<class T> using indexed_set = tree<T, null_type, less_equal<T>,
rb_tree_tag, tree_order_statistics_node_update>;
#define fbo find_by_order //(k-indexed val with 0-indexing)
#define ook order_of_key //(num of vals in set that are strictly less)
#define ms(x, a) memset(x, a, sizeof(x))
#define siz(x) (int)x.size()
#define len(x) (int)x.length()
#define pb push_back
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define F first
#define S second
#define deb(...) logger(#__VA_ARGS__, __VA_ARGS__)
template<typename ...Args>
void logger(string vals, Args&&... values){
cout << vals << " = ";
string delim = "";
(...,(cout << delim << values, delim = ", "));
cout << endl;
}
const int INF = 0x3f3f3f3f;
const ll LLINF = 0x3f3f3f3f3f3f3f3f;
const int MOD = 1e9+7;
//===========================================
int encode (int n, int a, int b){
for (int i = 0; i < 10; i++){
if ((a&(1<<i)) != (b&(1<<i))){
return ((a&(1<<i))? 11 : 1)+i;
}
}
}
int decode (int n, int q, int h){
bool on = (h > 10);
if (h > 10) h -= 11;
else h--;
return ((q&(1<<h)) > 0 == on? 1 : 0);
}
int main(){
cin.tie(0)->sync_with_stdio(0);
}
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pi;
typedef pair<ll, ll> pll;
template<class T> using indexed_set = tree<T, null_type, less_equal<T>,
rb_tree_tag, tree_order_statistics_node_update>;
#define fbo find_by_order //(k-indexed val with 0-indexing)
#define ook order_of_key //(num of vals in set that are strictly less)
#define ms(x, a) memset(x, a, sizeof(x))
#define siz(x) (int)x.size()
#define len(x) (int)x.length()
#define pb push_back
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define F first
#define S second
#define deb(...) logger(#__VA_ARGS__, __VA_ARGS__)
template<typename ...Args>
void logger(string vals, Args&&... values){
cout << vals << " = ";
string delim = "";
(...,(cout << delim << values, delim = ", "));
cout << endl;
}
const int INF = 0x3f3f3f3f;
const ll LLINF = 0x3f3f3f3f3f3f3f3f;
const int MOD = 1e9+7;
//===========================================
int encode (int n, int a, int b){
for (int i = 0; i < 10; i++){
if ((a&(1<<i)) != (b&(1<<i))){
return ((a&(1<<i))? 11 : 1)+i;
}
}
}
int decode (int n, int q, int h){
bool on = (h > 10);
if (h > 10) h -= 11;
else h--;
return ((q&(1<<h)) > 0 == on? 1 : 0);
}
int main(){
cin.tie(0)->sync_with_stdio(0);
}