# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
359700 | kshitij_sodani | cmp (balkan11_cmp) | C++14 | 3712 ms | 82520 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.
//#pragma GCC optimize("Ofast,unroll-loops")
#include <bits/stdc++.h>
using namespace std;
typedef long long llo;
#define mp make_pair
#define pb push_back
#define endl '\n'
#include "cmp.h"
void remember(int n) {
//edit this
//vector<int> aa;
int co=0;
for(int i=0;i<12;i++){
if(n&(1<<i)){
co+=1;
}
}
if(co<=6){
for(int i=0;i<12;i++){
if(n&(1<<i)){
bit_set(i+2);
}
else{
}
}
}
else{
bit_set(1);
for(int i=0;i<12;i++){
if(n&(1<<i)){
}
else{
bit_set(i+2);
}
}
}
}
int compare(int b) {
//edit this
int num=0;
for(int i=2;i<=13;i++){
if(bit_get(i)){
num+=(1<<(i-2));
}
}
if(bit_get(1)){
num^=4095;
}
if(num>b){
return -1;
}
if(num==b){
return 0;
}
return 1;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |