2177 problems solved
Rank by points: #103
Total points:
602
39 contests written
Rank by rating: #410
Rating: 2115
Min. rating: 1102
Max rating: 2166
From Lord Byng Secondary School, UCC Coding Competition 2021, SAC Code Challenges, University of British Columbia
About
Quick Links: billsboard, Ehsian.
To-do list
- https://dmoj.ca/problem/asumproblem
- https://dmoj.ca/problem/bpc1s2
- https://dmoj.ca/problem/bpc1j5
- https://dmoj.ca/problem/mathp6
- https://dmoj.ca/problem/mathp9
- https://dmoj.ca/problem/mathp11
Fast C++ IO (v4)
#pragma GCC optimize("Ofast")
#include <string.h>
#include <unistd.h>
#define ISZ (1 << 16)
#define OSZ (1 << 16)
char _i[ISZ], _o[OSZ], _ob[20]; int _ip, _op, _iend;
inline void __attribute__((constructor)) _c() { _iend = read(0, _i, ISZ); }
inline void __attribute__((destructor)) _d() { write(1, _o, _op); }
inline void ld() { if (_ip + 64 > _iend) { _iend -= _ip; memcpy(_i, _i + _ip, _iend); _iend += read(0, _i + _iend, ISZ - _iend); _ip = 0; } }
inline void fl() { if (_op + 64 > OSZ) { write(1, _o, _op); _op = 0; } }
template <typename T> inline void su(T &x) { char c; for (x = _i[_ip++] & 15; (c = _i[_ip++]) >= '0'; ) x = x * 10 + (c & 15); }
template <typename T> inline void si(T &x) { char c; bool neg = 0; if (_i[_ip] == '-') neg = 1, _ip++; for (x = _i[_ip++] & 15; (c = _i[_ip++]) >= '0'; ) x = x * 10 + (c & 15); if (neg) x = -x; }
inline void sc(char &c) { c = _i[_ip++]; }
template <typename T> inline void pu(T x) { int idx = 0; do _ob[idx++] = x % 10 | '0'; while (x /= 10); while (idx--) _o[_op++] = _ob[idx]; }
template <typename T> inline void pi(T x) { if (x < 0) { _o[_op++] = '-'; x = -x; } int idx = 0; do _ob[idx++] = x % 10 | '0'; while (x /= 10); while (idx--) _o[_op++] = _ob[idx]; }
inline void pc(char c) { _o[_op++] = c; }
- Documentation
ld()
— Loads the STDIN buffer inISZ
chunks if overflow; best used after any read operation.fl()
— Flushes the STDOUT buffer inOSZ
chunks if overflow; best used after any print operation.su()
— Scans a single integer, assumed to be non-negative.si()
— Scans a single integer, negative or positive.sc()
— Scans a single character (does not skip whitespace).pu()
— Outputs a single integer, assumed to be non-negative.pi()
— Outputs a single integer, negative or positive.pc()
— Outputs a single character.
Stuff
- Esoteric to-do list:
- tle18p1 - neural network bash
- tle18p4
- tle18p5 - probably a 500-line template metaprogram
- tle18p6
- csprng - ctf crypto
- bf1troll - php?
- hci16pidigits
- matrixmultiplication (fastest sub)
- poi04s1p5
- inaho2 (in Python/PyPy)
- fastlcahard (in under 15MB) - unproven if possible
- compress - crack xorshift128?
- A Times B GMP cheese
Impossible problem: dmopc16c3p41st AC!!- Fastest sub w/ brute-force
- Another fastest sub on cccjqrp5
Rating history
, #