# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
572192 | RandomLB | Question (Grader is different from the original contest) (CEOI14_question_grader) | C++17 | 4376 ms | 24276 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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);
}
#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);
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |