# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
775182 | daoquanglinh2007 | Xor Sort (eJOI20_xorsort) | C++17 | 7 ms | 1196 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>
using namespace std;
#define pii pair <int, int>
#define fi first
#define se second
#define mp make_pair
#define getbit(x, i) ((x&(1<<i)) != 0)
const int NM = 1000;
int N, S, a[NM+5];
vector <pii> ans;
void op(int i, int j){
ans.push_back(mp(i, j));
a[i] ^= a[j];
}
void solve1(){
for (int i = N; i >= 1; i--){
int k = 1;
for (int j = 2; j <= i; j++)
if (a[j] > a[k]) k = j;
int cur = a[i];
bool ok = 0;
for (int j = i+1; j <= N; j++){
cur ^= a[j];
if (cur < a[i+1] && cur >= a[k]){
ok = 1;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |