UVA 1203 – Argus

#include <cstdio>
#include <queue>
#include <utility>
#include <cstring>
#include <iostream>
#include <functional>
using namespace std;

int main() {
    char s[20];
    int qnum, p, n;
    priority_queue<pair<int, pair >,
            vector<pair<int, pair > >,
            greater<pair<int, pair > > > pq;

    while (scanf("%s", s), strcmp("#", s)) {
        scanf("%d %d", &qnum, &p);
        pq.push(pair<int, pair >(p, pair(qnum, p)));

    scanf("%d", &n);
    while (n--) {
        pair<int, pair > pr = pq.top();

        printf("%d\n", pr.second.first);

        pr.first += pr.second.second;

    return 0;

FlowPlayer and Jquery Tools

While going through the web player plug-ins on the internet , i come across this awesome new generation flash player plug-in , flowplayer 3.2 . If you go through the website u will find many demos and tutorials to get it working on your own website in few minutes(for expert) or a day(for beginner) :) :) :) . The site gives u complete walk through of the embedding process and how u can makeover your player  for good looking sites.

The most important part comes here. When i was going through the site i have come across the Jquery tools link at the home page. If u like to makeover your site with extra stuffs like tabs , rollover, images plug-ins and etc. then this is the place where u should go because with minimal amount of coding and effort u can make awesome-blossom sites which u cannot do with thousands of lines of coding with JavaScript or PHP.

Please do visit http://www.flowplayer.org , these things are awesome for website development or i should say must. Some sample code and demos can be found out on website , but i will too post so till then wait………


Javascript Libraries

When i started doing my first website project which i have to submit to college as my assignment in java , I have come across many programming languages, techniques to build amazing sites, pre-build libraries , css, themes, and javascript libraries(Imp).

There are many Javascript Libraries I have come across to build small parts of my websites and they offer less coding and more output. Some of them are with their links:

  1. http://www.jquery.com and http://www.jqueryui.com : My Favourite one.
  2. http://www.sencha.com : EXT JS Library , extremely good for dynamic websites.
  3. http://www.dojotoolkit.org : Most famous library on the internet.
  4. Scriptaculous
  5. Yahoo Javascript Library.
  6. Adobe Spry Framework.
  7. ETC. and many more……….


Multi Threading in Java

While studying Java in my III Sem , i find out that there are many concepts that are lagging in best books about multi threading in java. I found out a good tutorial on multi threading which describes most of the things about multi threading including synchronization and deadlocks. I seriously find this topic to be hardest of java.

Here are the links:

  1. http://www.herongyang.com/Java/Thread-Execution-and-Multi-Threading-Programs.html : Thread Introduction with extremely good example giving output with explanation. Really awesome.
  2. http://www.herongyang.com/Java/Thread-Group-Class-and-system-ThreadGroup-Tree.html: About Thread Groups.
  3. http://www.herongyang.com/Java/Synchronization-Technique-and-Synchronized-Code-Blocks.html : Synchronization : Really Awesome with real world example.
  4. http://www.herongyang.com/Java/Deadlock-Condition-Example-Programs.html : A Good DeadLock Tutorial. Really Important . There are 2 real world examples. A Must look.


Good Programming Sites

The time when i joined my college i am crazy about programming. I have searched google a lot and came up with the list of these websites which i feel one should look. There are many other which i don’t know but still i know some of them.

Here’s the list:

  1. http://www.codechef.com : This site despite of giving the knowledge on various upcoming problems , also provides many prizes and exposure to industry oriented competitions. This is really a must have look site.
  2. http://www.java2s.com : About this site is that , it’s really must see site. It can be used as a reference website for projects and students can learn many concepts from here too.
  3. http://www.happycodings.com : This site is really a cool site. For beginners and fun loving programmer, this a must look up site.
  4. http://uva.onlinejudge.org : This is really a must for real and genius programmer. Its really a tough site for beginners but hard core programmers must see it. It consists of some really good and hard problems.