Jokes | Posted by Liang | 10 months ago

1+1=

window

12

Competitive Programming | Posted by Liang | 2 years ago

Practice problems

Practice with strings

Practice with stacks/list

Practice with strings AND list

4

Competitive Programming | Posted by BBBBBB | 2 years ago

s

1

Competitive Programming | Posted by Liang | 2 years ago

Computer Science

BEST SITES FOR COMPUTER SCIENCE

Big O Notation

  • Talks about how fast a programming solution is.
  • eg O(1) takes 1 iteration (constant time no matter n)
  • O(n) takes n iterations
  • O(n^2) will be slower than the above
  • O(n!) will be faster than the above when n is small, but way slower when n is large.

Stacks

  • Like arrays, but you can only add/remove items from the end.
  • A good analogy is to think of a stack as a stack of books; you can remove only the top book, and you can only add a new book on the top. 
  • Two basic operations: push & pop
  • Problems

Queue

  • One can think of a queue like a cafeteria line: the person at the front is served first, and people are added to the line at the back. Thus, the first person to enter the queue is the first to be served, and the most recent person to enter the queue is served after everyone else
  • Two basic operations
    • enqueue - insert element at the tail of the queue
    • dequeue - remove element at the start of the queue

Set

  • Like Arrays, but are an unordered group of items. Each item does not contain a pointer to the next/previous node.
  • Useful if you need to check if an item has been "seen" before.

Recursion

  • Problems
    • Create a program that outputs the factorial of a number using RECURSION. (no loops)

Greedy Algorithms

Graph Theory

0

Competitive Programming | Posted by Liang | 2 years ago

Graph Theory

Here are some Graph Theory Introduction Videos and Problems

Text-based introduction to graph theory (click this first and as you get to the topics, click on the below videos)

Introduction to Königsberg Bridge Problem (using nodes)

The Four Colour Theorem

Explanation of Graph Theory Terms

0

Competitive Programming | Posted by Liang | 2 years ago

Feb 5 debrief

Here's what we learned from cccgrader.com today

  1. They have a variety of previous contests that you can submit your solution to (just like dmoj.ca)
  2. On the actual day of the test, you are ALLOWED to use an IDE, debugger, tools, and documentation. Just not google. I recommend that you BRING YOUR OWN LAPTOP.
  3. Just like dmoj, you can submit multiple time, and CCCGRADER will tell you if its correct, run time error, wrong answer, or time-limit exceeded.

Homework & next meeting date (homework is in bold)

We did the CCC Senior 2011 contest today at lunch. COMPLETE THE PARTY INVITATION QUESTION AND POETRY QUESTION ASSIGNED LAST WEEK BY THURSDAY.

Try to do senior 1, 2, 4 for 2011 (they are easiest). If you have time, try 3 & 5. Complete senior 1, 2 & attempt/complete 4 by friday.

  1. CCC '11 S1 - English or French?
    1. String, character, loop
    2. Solutions
      1. Liang's solution (c++)
      2. Andrew's solution (c++)
      3. Frank's solution
      4. Jonathan's solution (java)
      5. Jonah's solution (java)
      6. Eric's solution
      7. Kyle's solution (java)
      8. Erik's solution (python)
      9. Michael's solution (java)
      10. Kevin's solution (python)
  2. CCC '11 S2 - Multiple Choice
    1. Loops
    2. Solutions
      1. Liang's solution (c++)
      2. Andrew's solution (c++)
      3. Frank's solution
      4. Jonathan's solution (java)
      5. Jonah's solution (java)
      6. Eric's solution
      7. Kyle's solution (java)
      8. Erik's solution (python)
      9. Michael's solution (java)
      10. Kevin's solution (python)
  3. CCC '11 S3 - Alice Through the Looking Glass
    1. 2d arrays & recursion
    2. Solutions
      1. Liang's solution (c++)
      2. Andrew's solution (c++)
      3. Frank's solution
      4. Jonathan's solution (java)
      5. Jonah's solution (java)
      6. Eric's solution
      7. Kyle's solution (java)
      8. Erik's solution (python)
      9. Michael's solution (java)
      10. Kevin's solution (python)
  4. CCC '11 S4 - Blood Distribution
    1. Arrays & loops
    2. Solutions
      1. Liang's solution (c++)
      2. Andrew's solution (c++)
      3. Frank's solution
      4. Jonathan's solution (java)
      5. Jonah's solution (java)
      6. Eric's solution
      7. Kyle's solution (java)
      8. Erik's solution (python)
      9. Michael's solution (java)
      10. Kevin's solution (python)
  5. CCC '11 S5 - Switch
    1. Arrays & loops
    2. Solutions
      1. Liang's solution (c++)
      2. Andrew's solution (c++)
      3. Frank's solution
      4. Jonathan's solution (java)
      5. Jonah's solution
      6. Eric's solution
      7. Kyle's solution (java)
      8. Erik's solution (python)
      9. Michael's solution (java)
      10. Kevin's solution (python)

0

Competitive Programming | Posted by Liang | 2 years ago

Useful Links

Here is a list of important links from most important to least important. Please view them if you have time.

0

Competitive Programming | Posted by Liang | 2 years ago

Feb 3

Hello fellow programmers! Here is the Todo list for next Thursday:

  1. REGISTER an online account for CCC, so we can practice online! Register here https://cccgrader.com/register.php
    1. Our school code is 090702221
  2. You must decide if you are writing the SENIOR or JUNIOR contest by THIS TUESDAY
  3. OUR CONTEST IS ON FEB 20, that leaves 17 days to study for it. We are going to need more than one meeting a day.

Homework

You must attempt all questions by Thursday (changed to tuesday)

  1. CCC '14 S1 - Party Invitation
    1. More practice with arrays/vectors/list/set whatever you choose to use.  For this question try challenging yourself by only using the documentation and not google/stack overflow.
    2. Solutions
      1. Liang's solution (c++)
      2. Andrew's solution (c++)
      3. Frank's solution
      4. Jonathan's solution (java)
      5. Jonah's solution (java)
      6. Eric's solution (c++)
      7. Kyle's solution (java)
      8. Erik's solution (python)
      9. Michael's solution (java)
      10. Kevin's solution (python)
  2. CCC '03 S2 - Poetry
    1. Introduction to strings & string manipulation. You should learn how to loop through the characters in a string, as well as the substring function in your language. This is an easy question, should not take you long to complete.
    2. Solutions
      1. Liang's solution (c++)
      2. Andrew's solution (c++)
      3. Frank's solution
      4. Jonathan's solution (java)
      5. Jonah's solution (java)
      6. Eric's solution
      7. Kyle's solution (java)
      8. Erik's solution 
      9. Michael's solution
      10. Kevin's solution
  3. CCC '03 S4 - Substrings
    1. This is a senior problem that revolves around STRINGS. This is easily done by brute force, but you need to find an optimized solution. (hint: suffix tree) btw i dont really get it so rip
    2. Solutions
      1. Liang's solution (c++ brute force method, partial marks)
      2. Andrew's solution
      3. Frank's solution
      4. Jonathan's solution (java, suffix tree, FULL MARKS ;o)
      5. Jonah's solution
      6. Eric's solution
      7. Kyle's solution
      8. Erik's solution 
      9. Michael's solution
      10. Kevin's solution

PLEASE MESSAGE IN THE GROUP CHAT THE DAY OF THE CONTEST SO THAT I KNOW YOU READ THIS.

0

Competitive Programming | Posted by Liang | 2 years ago

Update for Jan 27, 2019!! New Homework (optional)

Hello fellow programmers,  hope your weekend's been good!

Great job for completing babbling brooks! All solutions from everyone will be posted in the previous post. You can visit that here.

Please vote in the group chat poll what time you would like to debrief the solutions to babbling brooks (either monday or at school)

Homework

Here is the optional EASY homework for our next meeting days.

  1. CCC '14 S1 - Party Invitation
    1. More practice with arrays/vectors/list/set whatever you choose to use.  For this question try challenging yourself by only using the documentation and not google/stack overflow.
    2. Solutions
      1. Liang's solution
      2. Andrew's solution
      3. Frank's solution
      4. Jonathan's solution
      5. Jonah's solution
      6. Eric's solution
      7. Kyle's solution
      8. Erik's solution 
      9. Michael's solution
  2. CCC '03 S2 - Poetry
    1. Introduction to strings & string manipulation. You should learn how to loop through the characters in a string, as well as the substring function in your language. This is an easy question, should not take you long to complete.
    2. Solutions
      1. Liang's solution
      2. Andrew's solution
      3. Frank's solution
      4. Jonathan's solution
      5. Jonah's solution
      6. Eric's solution
      7. Kyle's solution
      8. Erik's solution 
      9. Michael's solution

0

Competitive Programming | Posted by Liang | 2 years ago

Meeting 2: Jan 25 Homework & Debrief

Hello fellow programmers!

Here's what we debriefed from the meeting at lunch.

  1.  Programming language choice (c++ vs java vs python)
    1. Because each programming language is very similar, choose a programming language and stick to it until the exam. There is information below to help you decide.
    2. Pros/cons to c++
      1. Fastest language, will be able to solve any question under the time limit.
      2. Because its a low level programing language, it's syntax is strict and you will likely need to learn more.
      3. input/output is very easy
    3. Pros/cons to python
      1. Has great built in string manipulation through array indices
      2. Very fast to hack a solution because 
      3. It's syntax is not strict
      4. It usually takes longer to run a program in python than c++ or java
      5. getting the input is a bit complicated
    4. Pros/cons to java
      1. Slightly fast language, will probably be able to solve any question under the time limit.
      2. Because its a low level programing language, it's syntax is strict and you will likely need to learn more
      3. Input/output is very easy.
  2. Questions that we assigned last class
    1. CCC '14 J1 - Triangle Times
      1. Assigned to make sure you know basic conditional syntax + how to input/output in your language
      2. Solution in c++
      3. Solution in java
      4. Solution in python
    2. CCC '16 J3 - Hidden Palindrome
      1. Assigned to make sure you know how to manipulate strings + to show you that brute forcing is okay if the input specification is small. To do this question, you can brute force (check every letter and at every length to find max palindrome size)
      2. Solution in c++
      3. Solution in java
      4. Solution in python
    3. CCC '16 S5 - Circle of Life
      1. This monster of a fricking problem is to show you one thing: although the question seems doable, you will only get partial marks unless you are able to optimize your program. For example, Jonah's program works, although it gets partial marks (congrats btw this is a hard question). The optimized solution in java will be posted below (refactored into java from D by Jonathan) /
        1. Jonah's solution in java
        2. Jonathan's optimized solution in java

Homework

  1. CCC '00 J4 - Babbling Brooks
    1. Skills needed: looping through input & learning vectors/arrayList (if doing c++/java) or learning lists (python)
    2. DUE MONDAY
    3. Solutions
      1. Liang's solution (c++)
      2. Andrew's solution (c++)
      3. Frank's solution (python)
      4. Jonathan's solution (java)
      5. Jonah's solution (java)
      6. Eric's solution (c++)
      7. Kyle's solution (java)
      8. Erik's solution (python)
      9. Michael's solution (java)
    4. Let me, Andrew, or Jonathan know if you need help

Please reply in the facebook group chat your preferred programming language + the day the homework is due.

0

Competitive Programming | Posted by Liang | 2 years ago

Our Very First Post Jan 21

Meeting debrief:
  • By Friday, all of must complete 3 assigned questions (easy, medium, and hard). Use the language of your choice, but it must be either (c++, java, or python). Bonus marks if you solve using all 3 languages! There are other languages, but I strongly recommend the above three because they are the most used in competitive programming and there are a lot of material online that can help us.
  • On Friday, we are going to decide what language we will use as a team. Please research the pros or cons. And be ready to present why you chose your language. Read more about the pros/cons here to get started.
  • We need a regular meeting time. Please let me know what days you're available :3
Other Information

Waterloo site contest details/format - CEMC - CCC Details - Computing Contests - University of Waterloo

Sample programs please click on your language to see how to take input/output https://cccgrader.com/sample_soln.pdf

Questions:

1. Easy question J1: Triangle Times

Skills used: logical reasoning, basic if/else conditions

link to 1

2. Intermediate question J3: Hidden Palindrome

Skills used: loops, string manipulation, algorithm logic

link to 2

3. Hard but possible question S5: Circle of Life

Skills used: loops, critical thinking, good luck lmaooaooao

link to 3

LET LIANG KNOW IF YOU HAVE ANY QUESTIONS. THANKS

1

Calculus Marks | Posted by WangChangBang | 2 years ago

Open Interval

Comment your prediction of what your mark will be in an open interval equation

4

AP Calculus | Posted by Liang | 2 years ago

How fucked are you for AP Calclus chapter 4 test

title

3

Programming Languages | Posted by lancechen | 2 years ago

English is the best programming language

That's what this is written in right now

0

Jokes | Posted by lancechen | 2 years ago

This Website

That's the joke.

2

Jokes | Posted by Liang | 2 years ago

I’ve developed a fetish for figuring things out.

I just came to that realization. omegalul

3

Programming Languages | Posted by Liang | 2 years ago

Did you know?

Did you know that the average Node Js salary in Canada is $107,250 per year or $55 per hour? Entry level positions start at $66,900 per year while most experienced workers make up to $182,325 per year. (That's what this thing is made in rn)

0

Programming Languages | Posted by Liang | 2 years ago

What's your favourite programming language?

Hey guys what's your favourite programming language? Mine is Javascript and PHP

4

Porn | Posted by stuffbyliang@gmail.com | 2 years ago

Can I do many lines

line 1 line 2 line 3 line 4

0

2019 © Liang Liu