From Thornhill S.S., Olympiads School, WCIPEG Migration
About
The official way to pronounce the data structure deque is as "deck"
From The Art of Computer Programming
by Donald Knuth, volume 1, section 2.2.1 "Stacks, Queues, and Deques":
A deque ("double-ended queue") is a linear list for which all insertions and deletions (and usually all accesses) are made at the ends of the list. A deque is therefore more general than a stack or a queue; it has some properties in common with a deck of cards, and it is pronounced the same way.
Contrary to what some other people believe.
Data collection is great!
😃 Frienz/Cool ppl (Unordered)
maxcruickshanks qwertytown4life HARRIBO martin Rimuru Ryan kdrkdr 4fecta Eric_Yang sankeeth_ganeswaran Henry_Z Eric422 ArtyKing12 lHarryl372 Maillew AlanL Scrubpai Tmaswang03 Potatoritos pblpbl tankibuds itslinotlie Dan13llljws TRS noYou Robloxian thomas_li hewmatt10 lookcook piddddgy Plasmatic krish338 explosion sjay05 feliser Evang
bruce is op
If you think you are cool, (which you are) DM me on discord and I'll add you :P
Random xkcd (Refresh to get a new one!)
😎 Cool Problems
- https://dmoj.ca/problem/bts18p6
- https://dmoj.ca/problem/ccc09s5
- https://dmoj.ca/problem/quine
- https://dmoj.ca/problem/dmopc16c1p5
- https://dmoj.ca/problem/coci07c4p5
🗑️ Problems
- https://dmoj.ca/problem/mwc15c3p3
- https://dmoj.ca/problem/tle15p2
- https://dmoj.ca/problem/dmopc16c4p3
- https://dmoj.ca/problem/bts19p2
- https://dmoj.ca/problem/ccc19s3
DMOJ Submission 3,000,001: https://dmoj.ca/submission/3000001
📋 Todo List
🚧 Timeline
- First 15pp
September 2019
- 100 questions solved
October 2019
- Second 15pp
October 2019
- 250 points
November 2019
- Got Second Place on Globex Junior 2019 <o/
- First 20pp
February 2020
- 300 points
February 2020
- Group 4 CCC (Senior 37 points)
February 2020
- 200 questions solved
February 2020
- Switched to C++
March 2020
- 350 points
June 2020
- Top 200 in Problems Solved
June 2020
- Top 300 in Points
June 2020
- 300 questions solved
June 2020
- Top 150 in Problems Solved
July 2020
- Longest Compile Warning: (https://dmoj.ca/submission/2203535)
July 2020
- Problems Solved is Equal to Points (https://imgur.com/a/23SqIlC)
July 2020
Most Time Consuming Submission?Clocking in at991.971s
(https://dmoj.ca/submission/2213041)July 2020
Edit: Admins changed time limit to 0.1s :(
- #12/120 On Summer Contest #7 (https://dmoj.ca/contest/summer7/ranking/)
July 2020
- 420 problems solved
August 2020
lmao - 400 points
September 2020
- POGGGGG 25P problem https://dmoj.ca/problem/ccoprep1p3 ty thomas and max
September 2020
- Passed 420 points
September 2020
- 456 Problems solved
September 2020
(https://imgur.com/a/6TB8wCA) - Reached Candidate Master
October 2020
- 450 points
October 2020
- 500 problems solved
November 2020
🚅 Fast Submissions
⚠️ Please note, some of these rankings may nolonger be accurate, as other people may have gotten a faster solution, or the solutions may have been rejudged. These rankings are recorded based on their original ranking at the time of the submission.
- #1 https://dmoj.ca/problem/dwite11c4p4/rank/ (As of 6/7/2020)
- #1 https://dmoj.ca/problem/bts18p3/rank/ (As of 7/3/2020)
- #1 https://dmoj.ca/problem/bts18p6/rank/ (As of 7/6/2020)
- #4 (Fastest C/C++) https://dmoj.ca/problem/boolean/rank/ (As of 7/10/2020)
- #1 https://dmoj.ca/problem/sort1/rank/ (As of 7/10/2020)
- #1 https://dmoj.ca/problem/dmopc14c2p3/rank/ (As of 7/11/2020)
- #1 https://dmoj.ca/problem/tss17b/rank/ (As of 7/13/2020)
- #1 https://dmoj.ca/problem/dmpg18g1/rank/ (As of 7/20/2020)
- #1 https://dmoj.ca/problem/olyabc125p4/rank/ (As of 7/20/2020)
- #1 https://dmoj.ca/problem/coi06p1/rank/ (As of 7/23/2020)
- #1 https://dmoj.ca/problem/vmss7wc15c2p3/rank/ (As of 7/23/2020)
- #1 https://dmoj.ca/problem/fhc15c2p1/rank/ (As of 7/27/2020)
- #3 https://dmoj.ca/problem/acc3p1/rank/ (As of 7/28/2020)
- #1 https://dmoj.ca/problem/cactus/rank/ (As of 8/3/2020)
- #1 https://dmoj.ca/problem/miraclesort/rank/ (As of 8/5/2020) C++ can be faster than NASM64!
- #1 https://dmoj.ca/problem/pwindsor18p1/rank/ (As of 8/5/2020)
- #1 https://dmoj.ca/problem/btoi07p3/rank/ (As of 8/5/2020)
- #1 https://dmoj.ca/problem/ioi01p1/rank/ (As of 9/3/2020)
- #1 https://dmoj.ca/problem/dmopc18c4p4/rank/ (As of 9/4/2020)
- #1 https://dmoj.ca/problem/dmopc16c1p5/rank/ (As of 9/6/2020)
- #1 https://dmoj.ca/problem/coci07c4p5/rank/ (As of 9/11/2020)
- #1 https://dmoj.ca/problem/vmss7wc15c5p3/rank/ (As of 9/14/2020)
- #1 https://dmoj.ca/problem/dmopc19c3p3/rank/ (As of 9/23/2020)
- #1 https://dmoj.ca/problem/oly18novp2/rank/ (As of 10/5/2020)
- #1 https://dmoj.ca/problem/ncco3d2p1/rank/ (As of 10/7/2020)
- #1 https://dmoj.ca/problem/tle17c5p2/rank/ (As of 11/29/2020)
A Challenge For You!
Challenge Leaderboard
- me
My Most Used Languages
ORZ™ Template 2.3 (C++ Fast I/O) Licensed Under MIT
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <unistd.h>
#pragma GCC target ("avx2")
#pragma message("Compiling at: " __TIMESTAMP__ ". Executing File: " __FILE__ ". If this date is not the same as the submission date, it could be an indication that the submission was rejudged.")
#ifdef NDEBUG
#pragma GCC optimize("O3,unroll-loops")
#endif
#pragma GCC target("avx,avx2,fma")
using namespace std;
using namespace __gnu_pbds;
#define pb push_back
#define ll long long
#define lp pair<ll,ll>
#define ld long double
#ifdef __MINGW32__
#pragma clang diagnostic push
#pragma ide diagnostic ignored "hicpp-signed-bitwise"
#pragma ide diagnostic ignored "cert-err58-cpp"
#pragma ide diagnostic ignored "cppcoreguidelines-narrowing-conversions"
#pragma ide diagnostic ignored "cppcoreguidelines-pro-type-member-init"
#pragma ide diagnostic ignored "cppcoreguidelines-narrowing-conversions"
#endif
static struct IO {
#define _i inline void
#define __t template<typename T>
#define __c unsigned char
#define __1(x,y,z) inline IO &operator x (y &s){z; return*this;}
#define __2 val=0;int c=gc();while(c<=' ')c=gc();bool n=(c=='-');if(n)c=gc();do{val=val*10+c-'0';}while((c=gc())>='0'&&c<='9');
#define p_str(x) for (char i: x)pc(i);
#define likely(x) __builtin_expect(x,true)
#define unlikely(x) __builtin_expect(x,false)
const unsigned int bfz=1<<15;const static bool line_buf; __c *_rb=new __c[bfz]; __c *_wb=new __c[bfz];unsigned int rl=0,ri=0,wi=0;bool eof=false;
#ifdef _getchar_nolock
#define ugc _getchar_nolock
#else
#define ugc getchar_unlocked
#endif
inline __c gc(){if(line_buf){return ugc();}else{if(unlikely(ri>=rl)){if(unlikely(eof))return EOF;fill_buffer();}
return _rb[ri++];}} _i pc(char x){if(unlikely(wi>=bfz))flush_buffer();_wb[wi++]=x;} _i fill_buffer(){auto x=fread(_rb,sizeof(char),bfz,stdin);
if(unlikely(x!=0&&x<bfz)){eof=true;}rl=x;ri= 0;} _i flush_buffer(){fwrite(_wb,sizeof(char),wi,stdout);fflush(stdout);wi=0;}~IO(){flush_buffer();}
__t _i _ni(T &val){__2 if(n)val=-val;} __t _i _nd(T &val){__2 T div=1;if(c=='.'){while((c=gc())>='0'&&c<='9')val+=(c-'0')/(div*=10);}if(n)val=-val;}
_i _nt(string &s,char token=' '){ostringstream oss;int c=gc();while(c==token||c<' ')c=gc();do{oss<<static_cast<char>(c);}while((c=gc())!=token&&c>=' ');
s=oss.str();} _i _nln(string &s){_nt(s,'\n');}static inline int fast_log10(const unsigned ll& val){return val<=9?0:val<=99?1:val<=999?2:val<=
9999?3:val<=99999?4:val<=999999?5:val<=9999999?6:val<=99999999?7:val<=999999999?8:val<=9999999999?9:val<=99999999999?10:val<=999999999999?11:val<=
9999999999999?12:val<=99999999999999?13:val<=999999999999999?14:val<=9999999999999999?15:val<=99999999999999999?16:val<=999999999999999999?17:val<=
9999999999999999999ull?18:val<=ULLONG_MAX?19:-1;}char buf[20]; __t _i write_int(T data){if(data==0)pc('0');else{int len;if(data<0){pc('-');data
=-data;}len=fast_log10(data)+1;for(int i=len-1;i>=0;i--){buf[i]=data%10+'0';data/=10;}for(int i=0;i<len;i++){pc(buf[i]);}}} __1(>,char,s=gc())
__1(>=,char,s=' ';while(s<=' ')s=gc()) __1(>,string,_nt(s)) __1(>,ld,_nd(s)) __1(>,ll,_ni(s)) __1(>,int,_ni(s)) __1(>=,string,_nln(s))
__1(<,const int,write_int(s)) __1(<,const ll,write_int(s)) __1(<,const ld,p_str(to_string(s));) __1(<,const string,p_str(s);)
__1(<,const char,pc(s);)IO(){if(line_buf){std::istream::sync_with_stdio(false);cin.tie(nullptr);}
else{setvbuf(stdin,nullptr,_IONBF,0);}setvbuf(stdout, nullptr, _IONBF, 0);}}io;
// ORZ Template 2.3 | DO NOT RANDOMLY EDIT THIS TEMPLATE OR CHANGE FORMATTING! clion will crash!
// IO Operations: > read < write >= read line (string) >= next token (char)
_i setbit(ll &mask, int idx, bool bit){if(bit){mask = mask | (1 << idx);}else{mask = mask & ~(1 << idx);}}
inline bool getbit(ll mask, int idx) {return (mask >> idx) & 1;}
#ifdef __MINGW32__ // Assuming your local programming environment is MINGW
#pragma clang diagnostic pop
// Switches between line buffered io, and EOF buffered io. Non-lined buffered io requires EOF (Ctrl+D) on termination.
const bool IO::line_buf = true;
#else
const bool IO::line_buf = false;
#endif
#define el < '\n'
inline ll gcd(ll a, ll b) { return b == 0 ? a : gcd(b, a % b);}
inline ll lcm(ll a, ll b) { return a * b / gcd(a, b);}
#define tts(x) #x
int main()
{
// https://dmoj.ca/problem/aplusb
int n;
io > n;
while(n--){
int a,b;
io > a > b;
io < (a+b) < '\n';
}
return 0;
}
Java Fast Stream Input/Output (Works on Standard Input/Output)
import java.io.*;
import java.nio.*;
import java.nio.channels.*;
// --- Fast Stream Utilities by [Encodeous / Adam Chen] (BETA VERSION 3) ---
class FSU implements Flushable,Closeable{public ReadableByteChannel inputStream;public WritableByteChannel outputStream;public final int bufferSize;public ByteBuffer readBuffer;public ByteBuffer writeBuffer;private int bytesAvailable=0;private boolean closed=false;public FSU(){this(4096);}
public FSU(int buffer){this(System.in,System.out,buffer);}
public FSU(InputStream istream,OutputStream ostream,int buffer){inputStream=Channels.newChannel(istream);outputStream=Channels.newChannel(ostream);bufferSize=buffer;readBuffer=ByteBuffer.allocateDirect(buffer);writeBuffer=ByteBuffer.allocateDirect(buffer);}
public void printAll(Object...validObjects)throws IOException{for(int i=0;i<validObjects.length;i++){print(validObjects[i]);}}
public void printAllLines(Object...validObjects)throws IOException{for(int i=0;i<validObjects.length;i++){print(validObjects[i]);println();}}
public void flushBuffer()throws IOException{writeBuffer.flip();outputStream.write(writeBuffer);writeBuffer.clear();}
public void fillBuffer()throws IOException{readBuffer.clear();bytesAvailable=inputStream.read(readBuffer);readBuffer.position(0);}
public byte nextByte()throws IOException{if(closed)throw new IOException("FastStreamUtilities Is Already Closed");if(readBuffer.position()>=bytesAvailable)fillBuffer();if(bytesAvailable==0)return-1;return readBuffer.get();}
public String nextToken()throws IOException{StringBuilder sb=new StringBuilder();byte c=nextByte();while(c<=' ')c=nextByte();do{sb.append((char)c);}while((c=nextByte())>' ');return sb.toString();}
public long nextLong()throws IOException{long ret=0;byte c=nextByte();while(c<=' ')
c=nextByte();boolean neg=(c=='-');if(neg)
c=nextByte();do{ret=ret*10+c-'0';}while((c=nextByte())>='0'&&c<='9');if(neg)
return-ret;return ret;}
public double nextDouble()throws IOException{double ret=0,div=1;byte c=nextByte();while(c<=' ')
c=nextByte();boolean neg=(c=='-');if(neg)
c=nextByte();do{ret=ret*10+c-'0';}while((c=nextByte())>='0'&&c<='9');if(c=='.'){while((c=nextByte())>='0'&&c<='9'){ret+=(c-'0')/(div*=10);}}
if(neg)
return-ret;return ret;}
public int nextInt()throws IOException{int ret=0;byte c=nextByte();while(c<=' ')
c=nextByte();boolean neg=(c=='-');if(neg)
c=nextByte();do{ret=ret*10+c-'0';}while((c=nextByte())>='0'&&c<='9');if(neg)
return-ret;return ret;}
public char nextChar()throws IOException{return(char)nextByte();}
public String nextLine()throws IOException{StringBuilder sb=new StringBuilder();byte c;while((c=nextByte())!=-1){if(c==10)
break;sb.append((char)c);}
return sb.toString();}
public void writeByte(byte b)throws IOException{if(writeBuffer.position()>=bufferSize){flushBuffer();}
writeBuffer.put(b);}
public void writeBytes(byte[]arr)throws IOException{if(writeBuffer.remaining()<arr.length){for(int i=0;i<arr.length;i++){writeByte(arr[i]);}}else{writeBuffer.put(arr);}}
public void print(Object s)throws IOException{writeBytes(s.toString().getBytes());}
public void println(Object s)throws IOException{writeBytes(s.toString().getBytes());writeByte((byte)10);}
public void println()throws IOException{writeByte((byte)10);}@Override
public void flush()throws IOException{flushBuffer();}@Override
public void close()throws IOException{flush();inputStream.close();outputStream.close();closed=true;}
}
bZM7kweEJm16ouYd5ftvq+5hbdlYHIcbvfa5V+F20ME=
njtqseyfme