Блог пользователя b498

Автор b498, 12 лет назад, По-английски

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

  • Проголосовать: нравится
  • +4
  • Проголосовать: не нравится

»
12 лет назад, скрыть # |
 
Проголосовать: нравится -9 Проголосовать: не нравится

Here is a codeforces quote :

Its not about the contribution, Its about sending a message

»
12 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +14 Проголосовать: не нравится
int what_is_recursion(int n)
{
    return what_is_recursion(n);
}

stupid , right ?

»
12 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Maybe you will find something cool here.

»
12 лет назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

»
12 лет назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

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 лет назад, скрыть # |
 
Проголосовать: нравится +16 Проголосовать: не нравится

I've just found this on internet:

while(!asleep())
    ++sheep;
»
12 лет назад, скрыть # |
← Rev. 4  
Проголосовать: нравится 0 Проголосовать: не нравится
struct baby
{
    if(hunger>0)
        feed me();
    else
        play with me();
}
  • »
    »
    12 лет назад, скрыть # ^ |
    ← Rev. 2  
    Проголосовать: нравится -6 Проголосовать: не нравится

    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:; //???