b498's blog

By b498, 12 years ago, In English

hello,

I want to print a piece of c++ code on a sweater, but Im out of good ideas.

I want something involves graph codes like dfs or bfs or SCC or etc...

something short and funny like this, but involves some algorithm codes.

lets explore some great ideas shall we :D

  • Vote: I like it
  • +4
  • Vote: I do not like it

| Write comment?
»
12 years ago, hide # |
 
Vote: I like it -9 Vote: I do not like it

Here is a codeforces quote :

Its not about the contribution, Its about sending a message

»
12 years ago, hide # |
← Rev. 2  
Vote: I like it +14 Vote: I do not like it
int what_is_recursion(int n)
{
    return what_is_recursion(n);
}

stupid , right ?

»
12 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Maybe you will find something cool here.

»
12 years ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

»
12 years ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

Some random ideas:

1. They hate us 'cause they ain't us!

for (auto i: haters)
    cout << i.name << " hate me, 'cause " << (i.is_male? "he": "she") << " ain't me!\n";

2. Go to hell!

string do_you_like_me;
cin >> do_you_like_me;
if (tolower(do_you_like_me[0]) != 'y')
    goto hell;
hell:

3. All your bases are belong to us!

;;;;;; // All your semi-colons are belong to C++

4. Hating a specific topic

#include <vector> // I hate data structures
#include <deque> // I F'ING HATE DS
#include <stack> // DIE! DDDDIIIIIEEEEE!!!

5. Dumb user!

int n;
cout << "Enter a number between 1 to 10 (inclusive): ";
cin >> n;
if (1 > n or n > 10)
    cout << "you're such a dumb user!\n";

6. Please return it

string message() {
    string it = "my lovely blue pen";
    // You have taken my pen, please
    return it;
}

7. Roses are red...

enum color {
    blue,
    red
};

enum taste {
    sweet,
    sour
};

color roses = red;
color violets = blue;

taste sugar = sweet;
taste you = sugar;

8. DP!

double penetration; // NO! NOOO!

9. Me? No I didn't write it!

if (not code_is_buggy)
    cout << "I've written this code, LOSERS!\n";
else
    cout << "Who wrote this piece of shit?\n";

10. I don't have any comment!

if (dp[i][j] != -1)
    return dp[i][j]; // No comments

10. if not

#define if(x) if(!(x))
// happy debugging, suckers!

11. Long John Silver

long john; // silver

12. Long Long ago...

long long ago;
»
12 years ago, hide # |
 
Vote: I like it +16 Vote: I do not like it

I've just found this on internet:

while(!asleep())
    ++sheep;
»
12 years ago, hide # |
← Rev. 4  
Vote: I like it 0 Vote: I do not like it
struct baby
{
    if(hunger>0)
        feed me();
    else
        play with me();
}
  • »
    »
    12 years ago, hide # ^ |
    ← Rev. 2  
    Vote: I like it -6 Vote: I do not like it

    how to write good code:

    start:;
        if(fast code)
        {
            code fast:;
            if(doesn't work)
                goto code fast;
            else
                // almost but it's become a mass of kludges and spagheti code.
                goto start; //over
        }
        else if(right code)
        {
            code well:;
            if(it isn't done)
                goto code well;
            else
                // the requirments have changed
                goto start; //over
        }
        good code:; //???