From William Lyon Mackenzie C.I., Olympiads School
About
After a year and a half of programming, I’ve decided to retire. I have decided competitive programming is not my thing anymore. The constant grinding and general competitiveness is not something I signed myself up for. Although I still have to go to olympiads (paid for it), and ccc (registered for it), I won't do programming contests like I used to do, and won’t be doing more problems then I have to. This account will only be used for Olympiads School homework from now on.
There are many reasons for this, but there’s too many to put it on here. This account wont do any more rated contests and none of my CF accounts will be inactive.
Thanks to Ninjaclasher and insignificant for introducing and helping me get decent at programming, and good luck to them at CCO 2019!
Update: even though I did end up barely making CCO, I'm not going to unretire.
Good user-script:
// Hide document
document.documentElement.style.display = 'none';
// OP people
var op = ['wleung_bvg', 'bruce', 'y0105w49', 'zhouzixiang2004', 'xiaowuc1', 'd', 'imaxblue', 'kobortor', 'Ninjaclasher', 'koosaga'];
// Default username
const DEFAULT_USERNAME = op[Math.floor(Math.random() * 10)];
// Change appearance
function skin(username, profile){
if(location.pathname == '/user') location.pathname = 'user/' + username;
$('a[href="/user"] b').html(username);
$('a[href="/user"] img').attr('src', profile);
// Unhide document
document.documentElement.style.display = '';
}
// Get the user profile and change appearance
function getSkin(username){
$.get('https://dmoj.ca/user/' + username, function(data){
skin(username, $('.user-gravatar img', data).attr('src'));
});
}
$(document).ready(function(){
// Default skin
getSkin(DEFAULT_USERNAME);
// Keyboard shortcuts
var maxCode = document.getElementsByClassName('btn-clipboard').length + 48;
$(document).keydown(function(e){
// Tilde gets problem code
if(e.which == 192 && window.location.pathname.split('/')[1] == 'problem') prompt("Problem code:", window.location.pathname.split('/')[2])
// 1 through 9 copies text fields to clipboard
else if(e.which >= 49 && e.which <= maxCode) document.getElementsByClassName('btn-clipboard')[e.which - 49].click();
// F2 changes appearance
else if(e.which == 113){
var username = prompt('Who do you want to mimic?', 'Enter username here');
if(!username || username == 'Enter username here' || username == '') return;
getSkin(username);
}
});
// Hide what contest problem is from
var s = $('.problem-title h2').text(), l;
if(s.indexOf('Back From Summer') == 0 || s.indexOf('Back to School') == 0 || s.indexOf('MNYC') == 0 || s.indexOf('MWC') == 0)
l = s.split(':');
else
l = s.split('-');
$('.problem-title h2').text(l[l.length - 1]);
// Hide problem types and comments
$('#problem-types').hide();
$('#comments').hide();
// Remove editorial and horizontal rule associated
var ele = $('div > a');
var edit = false;
for(var i = 0; i < ele.length; i++){
if(ele[i].innerHTML == 'Read editorial'){
$(ele[i]).hide();
edit = true;
}
}
if(edit) $($('.info-float hr')[1]).hide();
// Suppress accessing editorial
var url = window.location.href.split('/');
if(url[url.length - 1] == 'editorial') window.location.href = url.slice(0, -1).join('/');
// Hide point values
$('.pi-value')[0].innerHTML = '???';
// Hide author
$('.authors-value').html('???');
});