Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Ecoo 2007
Index -> Contests
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
klopyrev




PostPosted: Fri Apr 06, 2007 2:13 pm   Post subject: Ecoo 2007

Now that the Boardwide contests are over, how did everyone do? How did you find the questions? Is it me or were these questions harder than the finals of the past couple years? Anyway, who's going on to the next stage? Also, if anybody has them, post the questions. Somebody has taken my copy:P

KL
Sponsor
Sponsor
Sponsor
sponsor
Clayton




PostPosted: Fri Apr 06, 2007 7:08 pm   Post subject: RE:Ecoo 2007

The questions were definitely waaay harder this year compared to last year. Apparently they found the questions were too easy last year, so they made harder ones this year.
Flikerator




PostPosted: Fri Apr 06, 2007 11:43 pm   Post subject: Re: Ecoo 2007

I completely froze. I only got one question done.

I thought the questions were easier this year actually. After the competition I did all four questions perfectly in 2 hours and 32 minutes. It was the pressure of competition that made me crack (I got the first question done quickly, but after that I froze). It really sucks that I won't be going to regionals, but If I crack under pressure there is no sense in me going anyways. I think I just need to drill under pressure.

Good luck to everyone competing at regionals!

EDIT - I say "I" because even though I competed with a team, the others just wanted pizza.
ericfourfour




PostPosted: Sat Apr 07, 2007 12:19 am   Post subject: RE:Ecoo 2007

Don't feel bad that you froze. I'm sure many people did. You are lucky you have enough computer science students interested in programming to make a team. Next year, at my school, there may not even be a grade 12 comp sci class because of the lack of interested students.
Drakain Zeil




PostPosted: Sat Apr 07, 2007 6:28 am   Post subject: RE:Ecoo 2007

I really miss the ECOO, now that I'm out of highschool. It was quite the ride!

You don't really need a team to compeat, just be really, really good. If you have a junk team, then it could really bring you down. I remember seeing a one-man team get 8th at the 06' western ontario regionals. That's impressive.

I found I spent a huge time not programming (summer) and I've lost my skills... only getting back to where I was a year ago. I fear for this coming summer! Beer = braincells?

What kind of questions did they ask?
Chinchilla




PostPosted: Sat Apr 07, 2007 1:22 pm   Post subject: Re: Ecoo 2007

Hey, the first and second one were dead easy, I got those completed quickly.
The third one I got confused on.
Fourth one easy.

My team was going to end up in regionals anyways, so we scraped the dev of the fourth problem and started playing videogames. Will I see anyone from here at

• Central Ontario - York University, Department of Computer Science
Thursday, May 3, 2007, 2006 from 11:00 am until 2:00 pm

?

If anyone can put up the third one.. spaceship dealy in 3D plane, I'd greatly appreciate it. My friend took all the contest problems.
Solutions to first two problems (I realize that the code is horrible.. I don't really think of the best design approach or what would be most aesthetic.. I just take an idea and run like hell with it.)

Can anyone else post their solutions too?

p1
code:

#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <cstdlib>

using namespace std;

int main() {
    int iterator;
    char buffer[255];
    ifstream fin("data11.txt");
    string password;
    string checkpass;
    fin.getline(buffer, 254);
    password = buffer;
    string encoded;
    string chunk1, chunk2;
    int choonk;
    int x;
    string tmp1;
    string chunk3;
    for(iterator = 0; iterator < 5; iterator++) {
        fin.getline(buffer, 254);
        encoded = buffer;
        tmp1 = encoded.substr(1, encoded.length()-2);
        encoded = tmp1;
        //cout << password << "\n";
        //cout << encoded << "\n";
        chunk1 = "";
        while((checkpass = encoded.substr(0, password.length())) != password) {
            //cout << encoded << "\n";
            //cin >> x;
            choonk = 1;
            chunk1 = "";
            chunk2 = "";
            chunk3 = "";
            for(x = 0; x < encoded.length(); x++) {
                if(choonk) {
                    chunk2 = chunk2 + encoded.substr(x, 1);
                    choonk = 0;
                }
                else {
                    chunk1 = chunk1 + encoded.substr(x, 1);
                    choonk = 1;
                }
            }
            for(x = chunk2.length() - 1; x >= 0; x--) {
                chunk3 = chunk3 + chunk2.substr(x, 1);
            }
            //cout << chunk1 << "\n";
            //cout << chunk2 << "\n";
            //cout << chunk3 << "\n";
            //cin >> x;
            encoded = chunk1 + chunk3;
            //cout << encoded << "\n";
            //cin >> x;
                   
        }
        cout << encoded.substr(password.length()) << "\n\n";
    }
}


p2
code:

#include <iostream>
#include <fstream>
#include <vector>
#include <string>


using namespace std;

string letters[] = {
    " ",
    "2",
    "3",
    "4",
    "5",
    "6",
    "7",
    "8",
    "9",
    "T",
    "J",
    "Q",
    "K",
    "A"
};

void shuffle(vector<int>& cards, int x) {
    vector<int> stackA;
    vector<int> stackB;
    vector<int> stackC;
    int z;
    int choonk = 1;
    int y;
    for(z = 0; z < 52; z++) {
        if(!((z + 1) % x)) {
            stackA.push_back(cards[z]);
        }
        else {
            stackB.push_back(cards[z]);
        }
    }
    for(z = 0; z < stackB.size(); z++) {
        if(choonk) {
            stackA.push_back(stackB[z]);
            choonk = 0;
        }
        else {
            stackC.push_back(stackB[z]);
            choonk = 1;
        }
    }
    cards.resize(0);
    cards.resize(52);
    int zz;
    for(z = (stackC.size() - 1), zz=0; z > -1; z--, zz++) {
        cards[zz] = stackC[z];
    }
    for(z = 0; z < (stackA.size()); z++) {
        cards[z + stackC.size()] = stackA[z];
    }
   
}

int main() {
    ifstream fin ("data21.txt");
    vector<int> exs;
    exs.resize(10);
    vector<int> cards;
    cards.resize(52);
    vector<int> WEST;
    vector<int> spades;
    vector<int> hearts;
    vector<int> diamonds;
    vector<int> clubs;
    int iterator;
    int y;
    for(iterator = 0; iterator < 5; iterator++) {
        int x;
        WEST.resize(0);
        spades.resize(0);
        hearts.resize(0);
        diamonds.resize(0);
        clubs.resize(0);
       
        for(y = 0; y < 52; y++)
            cards[y] = (y + 1);
        for (x = 0; x < 10; x++) {
            fin >> exs[x];
            shuffle(cards, exs[x]);
        }
        for(x = 3; x < 52; x += 4) {
            WEST.push_back(cards[x]);
        }
        sort(WEST.begin(), WEST.end());
        for(y = 0; y < WEST.size(); y++) {
                if(WEST[y] <= 13) {
                    clubs.push_back(WEST[y]);
                }
                else if(WEST[y] <= 26) {
                    diamonds.push_back(WEST[y] - 13);
                }
                else if(WEST[y] <= 39) {
                    hearts.push_back(WEST[y] - 26);
                }
                else if(WEST[y] <= 52) {
                    spades.push_back(WEST[y] - 39);
                }
        }   
        if(spades.size() != 0) {
            cout << "spades: ";
            for(y = spades.size() - 1; y > -1; y--) {
                cout << letters[spades[y]] << " ";
            }
        }
        if(hearts.size()!= 0) {
            cout << "hearts: ";
       
            for(y = hearts.size() - 1; y > -1; y--) {
                cout << letters[hearts[y]] << " ";
            }
        }
        if(diamonds.size()!= 0) {
            cout << "diamonds: ";
            for(y = diamonds.size() - 1; y > -1; y--) {
                cout << letters[diamonds[y]] << " ";
            }
        }
        if(clubs.size() != 0) {
            cout << "clubs: ";
            for(y = clubs.size() - 1; y > -1; y--) {
                cout << letters[clubs[y]] << " ";
            }
        }
        cout << "\n\n";
    }
}
klopyrev




PostPosted: Sat Apr 07, 2007 1:30 pm   Post subject: Re: Ecoo 2007

Chinchilla, I'll be going to the Central Ontario regionals too. What board are you in anyway? I finished all 4 problems, but I didn't like my solution for the 4th one. I'll post them when I get the time.

KL
Chinchilla




PostPosted: Sat Apr 07, 2007 1:38 pm   Post subject: Re: Ecoo 2007

The crappiest one in Ontario (when it comes to programming), DPCDSB. Dufferin peel catholic district school board. On second thought I may be in the Eastern regionals instead of Central.. I'm not sure. o.O

I live in Mississauga, right by Toronto.

It's just that I went to York last year for the regionals, that's why I assumed I'm in Central.

4th edit's the charm... Carleton is in Ottawa... so no we're not there.. I am in Central Smile
Sponsor
Sponsor
Sponsor
sponsor
Superskull85




PostPosted: Thu Apr 12, 2007 5:56 pm   Post subject: RE:Ecoo 2007

How would someone enter these contests? I have never heard of a computer science contest before. I am in the Simcoe County District School Board.
cool dude




PostPosted: Thu Apr 12, 2007 6:29 pm   Post subject: Re: RE:Ecoo 2007

Superskull85 @ Thu Apr 12, 2007 5:56 pm wrote:
How would someone enter these contests? I have never heard of a computer science contest before. I am in the Simcoe County District School Board.


lots of ways to hear about these contests.

1) your teacher
2) www.google.com
3) compsci.ca look at contest section
and more....

theres a computer contest held quite often by Dan and Tony i believe which is called Dwite. check that one out.
Clayton




PostPosted: Thu Apr 12, 2007 9:20 pm   Post subject: RE:Ecoo 2007

DWITE, Although the first round that CompSci.ca hosts will not be happening until September of this year.
klopyrev




PostPosted: Sat May 05, 2007 8:28 pm   Post subject: Re: Ecoo 2007

Now that the Regionals are over, how did everyone do? Who's going to the Finals??? I thought the problems were once again pretty easy. Anybody here from the East region? If you are, did anybody from your region get more than 60 points on the 3rd problem. For central, either the test data was off for the 3rd problem or everybody screwed up. In the end, 3/5 is the most test cases anyone got for it.

KL
Display posts from previous:   
   Index -> Contests
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 12 Posts ]
Jump to:   


Style:  
Search: