From St. Robert C.H.S.
About
I am Moana!
First 20pp problem: Wesley's Anger Contest 2 Problem 4 - The Ninth Triangle of the Underworld
Second 20pp problem: Fibonacci Sequence (Harder) - Solved with Python (if you solved it you may also solved this and this)
Fourth 20pp problem: CCO '09 P1 - Invasion of the Boxes - Real Ray-Tracing (unlike the fake one)
Fifth 20pp problem: Angie and Functions - One of my favorite problems
First 30pp problem: Matrix Determinant - Problems under Fun Math category tend to be overrated.
First 40pp problem: UTS Open '15 #6 - Tetrahedra - large chunk of code copied from my first 20pp solution
My proper best solutions:
Angie and Functions - 1.7x
CCO '07 P2 - Snowflakes - 1.9x
No one ≥15pp non-math AC submission yet - except this brute-force problem
Problems
This part is removed due to too much negative feedback.
Comments
Best comments:
https://dmoj.ca/problem/ccoqr16p3#comment-4093 (100+ upvotes)
https://dmoj.ca/problem/scroll#comment-1446 (80+ upvotes)
https://dmoj.ca/problem/ccc03s3#comment-219 (80+ upvotes)
https://dmoj.ca/problem/ccc18s2#comment-7054 (80+ upvotes)
Worst comments:
https://mcpt.ca/problem/asquareproblem#comment-47 (-(400+) downvotes!!!)
https://mcpt.ca/problem/hudab#comments (three -(60+) bad comments in one problem)
https://dmoj.ca/problem/ccc00j1#comment-9523 (-(60+) downvotes)
https://dmoj.ca/problem/sssp#comment-2623 (-(60+) downvotes, removed)
Bad comments with good replies:
https://dmoj.ca/problem/tsoc15c1p5#comment-1089 (from the same user)
https://dmoj.ca/problem/ccc20s5#comment-11776 (with my bad reply)
https://dmoj.ca/problem/bfs19p2#comments (complicit)
https://dmoj.ca/problem/ccc10j2#comment-1569
Code
Add this line to enable optimization for C/C++: (DO NOT use in CCC!) and be careful if the problem is graded with a float-point checker
#pragma GCC optimize "Ofast"
C++ time recording:
#include <chrono>
std::chrono::high_resolution_clock::time_point _tIMER;
#define start_timer do{_tIMER=std::chrono::high_resolution_clock::now();}while(0)
#define end_timer do{printf("%lfs\n",std::chrono::duration<double>(std::chrono::high_resolution_clock::now()-_tIMER).count());}while(0)
My DMOJ User Script - People can see I'm that person who solves problems just for points and ranking
Math
Tell WolframAlpha to: simplify asin(tanh(2x))-2atan(tanh(x))
Try it on paper after discovering Wolfram's disability.
Graph the following function with any graphing calculator before trying to simplify it.
~f(x)=\left(\mathrm{e}^{x}+\mathrm{e}^{-x}\right)^{2}-\left(\mathrm{e}^{x}-\mathrm{e}^{-x}\right)^{2}~
(also try to graph its numerical derivative)
Solve this problem using 3 different ways to prove you are OK with Grade 5 geometry.
(my grade 5 math teacher actually did that)
[un]Graphics
Desmos 2D that makes people sick
WebGL 2D that makes people sick
Figure out what the following code does: (hint)
float fitArc(float a) {
float S=sin(a), C=cos(a), x;
#if 1
float s2=S*S, c2=C*C, sc2=s2+c2, sc22=sc2*sc2;
a=1./(756.*(sc22+1.)+810.*s2-1890.*(sc2+1.)*C+2430.*c2);
float c=(2520.*sc22+2736.*s2+(-507.*sc2-6600.*C+7215.)*C-2628.)*a,
b=(3996.*(sc2+1.)-6750.*C)*S*a,d=(3439.*sc2+4276.*C-7715.)*S*a;
float p=(c-b*b/3.)/3.,q=-0.5*((b*b/13.5-c/3.)*b+d);
x = (a=q*q+p*p*p)>0.0 ? cbrt(q+sqrt(a))+cbrt(q-sqrt(a))-b/3.
:2.0*pow(q*q-a,1./6.)*cos(atan(sqrt(-a),q)/3.)-b/3.;
#else
x = ((0.008561080643*a-0.002518989170)*a+0.334292025655)*a;
x = ((((0.000223623140*a-0.000237833794)*a+0.007216725971)*a-0.000130686154)*a+0.333353941704)*a;
x = (((((0.000027936409*a+0.000060660755)*a+0.000117720501)*a+0.006861171676)*a+0.000027337977)*a+0.333330238084)*a;
#endif
return x;
}
Figure out what vec2
and spline3
are and make the following function as short as you can:
vec2 calcCOM(const spline3 *v, int n) {
double S=0; vec2 P(0.0);
for (int i=0; i<n; i++) {
vec2 a=v[i].A, b=v[i].B, c=v[i].C, d=v[i].D;
S += a.x*(a.y*.5+b.y*.4+c.y*.25)+a.y*(b.x*.6+c.x*.75+d.x)+(b.y*(b.x*3.+c.x*4.)+c.y*(b.x*2.+c.x*3.))/6.+(b.y+c.y)*d.x;
P += vec2(((420.*c.y+420.*b.y+420.*a.y)*d.x*d.x+((420.*c.x+280.*b.x+210.*a.x)*c.y+(560.*b.y+630.*a.y)*c.x+(420.*b.x+336.*a.x)*b.y+504.*a.y*b.x+420.*a.x*a.y)*d.x+(140.*c.x*c.x+(210.*b.x+168.*a.x)*c.x+84.*b.x*b.x+140.*a.x*b.x+60.*a.x*a.x)*c.y+(210.*b.y+252.*a.y)*c.x*c.x+((336.*b.x+280.*a.x)*b.y+420.*a.y*b.x+360.*a.x*a.y)*c.x+(140.*b.x*b.x+240.*a.x*b.x+105.*a.x*a.x)*b.y+180.*a.y*b.x*b.x+315.*a.x*a.y*b.x+140.*a.x*a.x*a.y)/840.,(((840.*c.y+840.*b.y+840.*a.y)*d.x+(420.*c.x+280.*b.x+210.*a.x)*c.y+(560.*b.y+630.*a.y)*c.x+(420.*b.x+336.*a.x)*b.y+504.*a.y*b.x+420.*a.x*a.y)*d.y+(420.*c.y*c.y+(840.*b.y+840.*a.y)*c.y+420.*b.y*b.y+840.*a.y*b.y+420.*a.y*a.y)*d.x+(280.*c.x+210.*b.x+168.*a.x)*c.y*c.y+((630.*b.y+672.*a.y)*c.x+(504.*b.x+420.*a.x)*b.y+560.*a.y*b.x+480.*a.x*a.y)*c.y+(336.*b.y*b.y+700.*a.y*b.y+360.*a.y*a.y)*c.x+(280.*b.x+240.*a.x)*b.y*b.y+(600.*a.y*b.x+525.*a.x*a.y)*b.y+315.*a.y*a.y*b.x+280.*a.x*a.y*a.y)/840.);
}
return P*(1./S);
}
Email me at [email protected] if you made it less than 256 chars without changing its inherence.
Other Stuffs
I have an alternative account that we share the same password.
Doomed not to get colored.
Admins please do not remove it.
And CopyPastePolice please do not leave comments.
Refuse to go to Olympiad school once more after missing the final bus and getting soaked on the 16km way home on that rainy night on the first day of trial.