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;

Website Beginners…:)

Website Beginners always got confused when they read lot of stuffs about HTML and CSS but when it’s time to apply it all got messed up. They thought of creating websites like they see everyday on net. But i want to tell them that there is a difference in reading and application. Its all about experience. The more you build and practice the more you get perfect. This is the key for a Website Developer and Programmer and may be its true in every aspect of life.

One can start learning HTML and CSS at http://www.w3schools.org . It’s the first site every beginner finds cool and amazing.

After that practice is the key to success but in addition to that there are few tricks that beginners should learn to reach the level of expert. I don’t know all of them but some. Below are some of them:

  • Visit as many sites and try to build small parts of them so that u can practice.
  • Some software will come in handy while developing like Adobe Photoshop , Adobe FireWorks, Adobe Dreamweaver. Those who don’t like copyright Aptana Studio , GIMP, Eclipse PHP by Zend are useful. These will surely speed up the development process and enhance your site behaviour.
  • Some blogs that beginners should visit are http://veerle.duoh.com and http://www.sohtanaka.com.
  • Some sites for finding tips and tricks are http://css.maxdesign.com.au/ (best list tutorials and layouting techniques). http://css-tricks.com/ (best site for new plugin tricks and specially video screencasts are also given) .
  • I also request that beginners should explore as much plugins as they can because they can come in handy and cut short the development time. Some of them i can suggest are SimpleViewer, TiltViewer, FlowPlayer, Jquery Tools, cooliris, Apple dock menu, apycom menu bars, flash-xml.net etc.
  • Also visit as many forums as you can and try searching new tips and tricks.

That’s it from my side …Bye and Develop everyday as if u have never done it before.

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………