open source this piezashit

Discussion in 'General' started by hekar, Jul 4, 2013.

  1. hekar

    hekar Member

    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    0
    I already tried to join the team a while ago. They gave me some computer science problem. I couldn't solve it.

    I argued I just wanted to fix the some of the menus (ie. team and class selection) and make things more keyboard friendly. Anyone who knows basic programming can do that.

    However, they insisted I solved this problem, which honestly I didn't know how.

    Programmers have different strengths and weaknesses. A programmer may be bad at math, but they may be able to write a framework that can allow automated testing of entity input and outputs (that would reduce defects and testing time).

    Even Valve is taking pull requests from random individuals on Github.
     
  2. ImSpartacus

    ImSpartacus nerf spec plz

    Messages:
    8,598
    Likes Received:
    7
    Trophy Points:
    0
    Did you have some time limit on this problem? Christ, if you have access to the internet, it's not hard to solve just about any academic problem.
     
  3. BigTeef

    BigTeef Bootleg Headshot master

    Messages:
    7,036
    Likes Received:
    36
    Trophy Points:
    0
    I have experience with power point!
    Can I dev too?
     
  4. Grantrithor

    Grantrithor Member

    Messages:
    9,820
    Likes Received:
    11
    Trophy Points:
    0
    Was it that bitmap question?
     
  5. BigTeef

    BigTeef Bootleg Headshot master

    Messages:
    7,036
    Likes Received:
    36
    Trophy Points:
    0
    Thats..
    That is a dick move..

    Trickster can you explain this?
     
  6. Candles

    Candles CAPTAIN CANDLES, DUN DUN DUN, DUN DUN DUN DUN.

    Messages:
    4,251
    Likes Received:
    10
    Trophy Points:
    0
    What test was it? It honestly can't be that hard.
     
  7. McGyver

    McGyver Experimental Pedagogue

    Messages:
    6,533
    Likes Received:
    31
    Trophy Points:
    0
    Not with the Empires source code. Any GUI related stuff is to be considered a NP-hard type problem.
     
  8. wealthysoup

    wealthysoup Lead Tester

    Messages:
    1,857
    Likes Received:
    0
    Trophy Points:
    0
    IIRC that was a test that mootant required to be solved. I'm not sure if its still being used as the test or not. If you can't do it then im sure providing evidence of programming skill (written programs etc) would most likely suffice.

    This was the bitmap problem (and I assume the one hekar mentioned): http://www.spoj.com/problems/BITMAP/
     
  9. Trickster

    Trickster Retired Developer

    Messages:
    16,576
    Likes Received:
    46
    Trophy Points:
    0
    He was given a test, he couldn't complete it. I'm not a coder, I can hardly comment on whether he was of the level. But it was decided by whoever was the main coder at the time (I can't remember) that if he couldn't do the BITMAP test, he probably wasn't up to the job. Keep in mind that we carried on using that test after MOOtant left us as it did turn out to be a fairly good indicator of whether someone could help out.
     
  10. Candles

    Candles CAPTAIN CANDLES, DUN DUN DUN, DUN DUN DUN DUN.

    Messages:
    4,251
    Likes Received:
    10
    Trophy Points:
    0
    That's just a simple breadth-first search. Hell, there's a function in Boost that'll do it for you. I learned how to do that back in CS162.
     
  11. ImSpartacus

    ImSpartacus nerf spec plz

    Messages:
    8,598
    Likes Received:
    7
    Trophy Points:
    0
    I can haz be codar?

    Code:
    #include <algorithm>
    #include <iostream>
    #include <iterator>
    #include <numeric>
    #include <sstream>
    #include <fstream>
    #include <cassert>
    #include <climits>
    #include <cstdlib>
    #include <cstring>
    #include <string>
    #include <cstdio>
    #include <vector>
    #include <cmath>
    #include <queue>
    #include <deque>
    #include <stack>
    #include <list>
    #include <map>
    #include <set>
    using namespace std;
    
    //Posibles moves
    int positionsX[4]= {0,-1,0,1};
    int positionsY[4]= {-1,0,1,0};
    int n,m;
    queue< pair <int,int> > s;
    
    bool validPosition(int a, int b){
        return ((a<n && a>=0) && (b<m && b>=0))?true:false;
    }
    
    int bfs(vector< vector<int> > *visited, vector< vector<int> > *graph) {
        while (s.empty() == false) {
            pair <int,int> top = s.front();
            s.pop();
            for(int i=0;i<4;i++){
                int newx=top.first+positionsX[i],newy=top.second+positionsY[i];
                if(validPosition(newx,newy)){
                    if(visited->at(top.first)[top.second]+1 < visited->at(newx)[newy]){
                        visited->at(newx)[newy] = visited->at(top.first)[top.second]+1;
                        pair <int,int> node (newx,newy);
                        s.push(node);
                    }
                }
            }
         }
    }
    int main(){
    	int cases;scanf("%d",&cases);
        while(cases--){
        	scanf("%d %d",&n,&m);
        	vector< vector<int> > graph;
        	vector<int> ceros(m,0);
        	vector< vector<int> > visited(n,ceros); 
            //Read the graph
            string line;
            for (int i = 0; i < n; ++i)
            {	
            	vector<int> temp;
            	cin>>line;
            	for (int j = 0; j < m; ++j)
            	{	
            		visited[i][j]= 1<<30;
            		int borw = line[j]-'0';
            		if(borw==1){
            			pair <int,int> start (i,j);
        				s.push(start);
        				visited[i][j]= 0;
        			}
            		temp.push_back(borw);
            	}
            	graph.push_back(temp);
            }
            
            bfs(&visited,&graph);
            for (int i = 0; i < n; ++i)
            {
            	for (int j = 0; j < m; ++j)
            	{
            		if(graph[i][j]==0){
            			int result =visited[i][j];
            			(j+1<m)?printf("%d ",result):printf("%d",result);
            		}else{
            			(j+1<m)?printf("0 "):printf("0");
            		}
            	}
            	printf("\n");
            }
        }
     return 0;   
    
    }
    So when do I start?

    Spend less teim whining, moar tiem coading.
     
  12. Candles

    Candles CAPTAIN CANDLES, DUN DUN DUN, DUN DUN DUN DUN.

    Messages:
    4,251
    Likes Received:
    10
    Trophy Points:
    0
    Jesus, got enough incl-

    ...WHY?!
     
  13. ImSpartacus

    ImSpartacus nerf spec plz

    Messages:
    8,598
    Likes Received:
    7
    Trophy Points:
    0
    When I learned to code, I never had to bother with any sort of resource management. I just included all the shit that I may or may not need.

    That's a true statement. I really do code like that but I didn't write that code. I just googled for the answer.
     
  14. Candles

    Candles CAPTAIN CANDLES, DUN DUN DUN, DUN DUN DUN DUN.

    Messages:
    4,251
    Likes Received:
    10
    Trophy Points:
    0
    You might as well have done it the fun way and started from here then.

    And the compiler isn't retarded enough to actually include things you don't use. It's not an issue of resource management as much as it's just stupid.
     
  15. Trickster

    Trickster Retired Developer

    Messages:
    16,576
    Likes Received:
    46
    Trophy Points:
    0
    FYI it's not about the problem being solved, it's about the problem being solved within the set time of however many milliseconds that link requests.

    I don't think a breadth-first search works due to that. I don't know coding or anything, I just know that someone said "breadth-first search takes too long".
     
  16. hekar

    hekar Member

    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    0
    Fine, but you guys should keep in mind, that you're basically singing your own death anthem.

    Communities that are not growing, are dying. It is as simple as that.

    Thanks. I'll go teach myself bfs now, so I don't feel dumb.
     
  17. Candles

    Candles CAPTAIN CANDLES, DUN DUN DUN, DUN DUN DUN DUN.

    Messages:
    4,251
    Likes Received:
    10
    Trophy Points:
    0
    Now I'm interested. I'll give it a crack when I get off work for the fun of it.
     
  18. Z100000M

    Z100000M Vithered Weteran

    Messages:
    9,120
    Likes Received:
    70
    Trophy Points:
    0
    Inbefore out next beloved dictator comrade will enforce touhou r34 on motd.
     
  19. BigTeef

    BigTeef Bootleg Headshot master

    Messages:
    7,036
    Likes Received:
    36
    Trophy Points:
    0
    We have been saying this for years, we are fully aware that we don't have the cooperation we desire and will never get anything done with it.

    If you can round up a group of people who know what they are doing and want something to do, direct them here.
     
  20. Candles

    Candles CAPTAIN CANDLES, DUN DUN DUN, DUN DUN DUN DUN.

    Messages:
    4,251
    Likes Received:
    10
    Trophy Points:
    0
    Dear god no, I would never play Empires again.
     

Share This Page