# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
370850 | Sorting | Parrots (IOI11_parrots) | C++17 | 0 ms | 0 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 "encoder.h"
#include "encoderlib.h"
#include <bits/stdc++.h>
using namespace std;
const int H = 320 + 256 + 3;
const int SZ = 80;
struct Big_Number{
int a[SZ];
void init(){ fill(a, a + SZ, 0); }
Big_Number(){ init(); }
friend Big_Number operator+(const Big_Number &l, const Big_Number &r){
int add = 0;
Big_Number ret;
for(int i = SZ - 1; i >= 0; --i){
int sum = l.a[i] + r.a[i] + add;
ret.a[i] = sum % 256;
add = sum / 256;
}
return ret;
}
friend bool operator<(const Big_Number &l, const Big_Number &r){
for(int i = 0; i < SZ; ++i)
if(l.a[i] != r.a[i])
return l.a[i] < r.a[i];