• Activity
  • Votes
  • Comments
  • New
  • All activity
    1. Hello everyone! Has anyone here had the experience of emigrating from your home country to a new one?

      Hi I am 23 year old and I want leave my country. I hold work visa for Canada. I am convinced that I should leave my country due to political changes happening in my country. What was it like for...

      Hi I am 23 year old and I want leave my country. I hold work visa for Canada. I am convinced that I should leave my country due to political changes happening in my country. What was it like for you? And especially how was it like when you emigrated to a country when you was adult?

      15 votes
    2. Workshop Wednesday: Post a poem/story/writing-thing and get feedback!

      So I was talking to @cadadr in this thread about starting a workshop on Tildes, and since today makes for an alliterative title, I thought I'd start one now. What's a workshop? Basically, a...

      So I was talking to @cadadr in this thread about starting a workshop on Tildes, and since today makes for an alliterative title, I thought I'd start one now.

      What's a workshop?

      Basically, a workshop is when you have a bunch of people with poems or stories they've written, and everyone gets together, reads everyone's work, and comments on it, sharing what they got out of it and what the author could do to improve the work for publication. I used to do a lot of them in college, and I've missed the dynamic since graduating. I thought others might also be interested, so here goes nothing.

      How this'll work (for now, anyway)

      Each week, I'll post a "Workshop Wednesday" post. If you have a poem or (short) story you'd like workshopped, post that as a top comment. Then, read others' top comments and reply with what works/doesn't work/questions you have/ideas you have for the piece that could make it better. If you post some writing, try to comment on at least two other people's pieces as well -- we're here to help each other improve.

      Going forward

      Since this is the first one, obviously we can change the format or do something else. Please start meta-discussions with the word [META] so that we know it's not a poem you're trying to workshop!

      I'm excited. Let's do this!

      20 votes
    3. Programming Challenge - Find path from city A to city B with least traffic controls inbetween.

      Previous challenges Hi, it's been very long time from last Programming Challenge, and I'd like to revive the tradition. The point of programming challenge is to create your own solution, and if...

      Previous challenges

      Hi, it's been very long time from last Programming Challenge, and I'd like to revive the tradition.

      The point of programming challenge is to create your own solution, and if you're bored, even program it in your favourite programming language. Today's challenge isn't mine. It was created by ČVUT FIKS (year 5, season 2, challenge #4).

      You need to transport plans for your quantum computer through Totalitatia. The problem is, that Totalitatia's government would love to have the plans. And they know you're going to transport the computer through the country. You'll receive number N, which denotes number of cities on the map. Then, you'll get M paths, each going from one city to another. Each path has k traffic controls. They're not that much effective, but the less of them you have to pass, the better. Find path from city A to city B, so the maximum number of traffic controls between any two cities is minimal. City A is always the first one (0) and city B is always the last one (N-1).

      Input format:

      N
      M
      A1 B1 K1
      A2 B2 K2
      ...
      

      On the first two lines, you'll get numbers N (number of cities) and M (number of paths). Than, on next M lines, you'll get definition of a path. The definition looks like 1 2 6, where 1 is id of first city and 2 is id of second city (delimited by a space). You can go from city 1 to city 2, or from city 2 to city 1. The third number (6) is number of traffic controls.

      Output format:

      Single number, which denotes maximum number of traffic controls encountered on one path.

      Hint: This means, that path that goes via roads with numbers of traffic controls 4 4 4 is better than path via roads with numbers of traffic controls 1 5 1. First example would have output 4, the second one would have output 5.

      Example:

      IN:

      4
      5
      0 1 3
      0 2 2
      1 2 1
      1 3 4
      2 3 5
      

      OUT:

      4
      

      Solution: The optimal path is either 0 2 1 3 or 0 1 3.

      Bonus

      • Describe time complexity of your algorithm.
      • If multiple optimal paths exist, find the shortest one.
      • Does your algorithm work without changing the core logic, if the source city and the target city is not known beforehand (it changes on each input)?
      • Do you use special collection to speed up minimum value search?

      Hints

      Special collection to speed up algorithm

      13 votes