# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
370621 | Jarif_Rahman | Bridges (APIO19_bridges) | C++17 | 3062 ms | 25376 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>
#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")
#define pb push_back
#define f first
#define sc second
using namespace std;
typedef long long int ll;
typedef string str;
const int N = 5e4, M = 1e5, Q = 1e5, SQ = 316, lim = 2e5;
vector<int> sorter[lim];
tuple<int, int, int> srt[lim];
void counting_sort(tuple<int, int, int> *a, tuple<int, int, int> *b){
int mx = 0;
for(int i = 0; a+i < b; i++){
sorter[get<0>(*(a+i))].pb(i);
mx = max(mx, get<0>(*(a+i)));
}
int inx = 0;
for(int i = 0; i <= mx; i++){
while(!sorter[i].empty()){
srt[inx++] = *(a+sorter[i].back());
sorter[i].pop_back();
}
}
for(int i = 0; i < inx; i++) *(a+i) = srt[i];
}
struct dsu{
int n;
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |