Friday, December 30, 2016

UVa 10926 How many dependencies

UVa 10926 How many dependencies



#include <cstdio>
#include <iostream>

using namespace std;

#define init(n) { for (int i=0 ; i<=n ; i++) { visit[i] = false; for (int j=0 ; j<=n ; j++) adj[i][j] = adj[j][i] = false; } }

int n, dep[200], root[200], adj[200][200];
bool visit[200];

int dfs_visit(int s, int src) {

root[s] = src;
dep[s] = 0;
for (int i=1 ; i<=n ; i++) {
if (!visit[i] && adj[s][i]) {
visit[i] = true;
dep[s] += (dfs_visit(i,src)+1);
}
}
return dep[s];
}

void dfs() {

for (int i=1 ; i<=n ; i++) {
for (int j=0 ; j<=n ; j++) visit[j] = false;
dfs_visit(i,i);
}

}

int main( void ) {

int t, x, maxdepi, maxdep;

while (scanf("%d",&n)==1 && n) {

init(n);

for (int i=1 ; i<=n ; i++) {
scanf("%d",&t);
for (int j=0 ; j<t ; j++) {
scanf("%d",&x);
adj[i][x] = true;
}
}


dfs();

maxdep = -1000;

for (int i=1 ; i<=n ; i++) {


if (dep[i]>maxdep) {
maxdep = dep[i];
maxdepi = i;

}
}

printf("%d ",maxdepi);

}


return 0;
}



Go to link download

Read more »

Thursday, December 29, 2016

RockChip Batch Tool Latest Version V1 8 Full Setup Free Download

RockChip Batch Tool Latest Version V1 8 Full Setup Free Download


Download Rockchip batch tool software latest updated version v1.8 free download for Windows 7/8/8.1/10/XP/Vista. Rockchip batch tool is a great and useful application made by Fuzhou Rockchip that helps you to flash IMG firmware on the Rockchipset devices. Today you can download Rockchip Batch tool latest version full setup installer for windows directly from here. Before downloading Rockchip Batch tool software lets have a look about its latest features.

RockChip Batch Tool Latest Version V1.8 Full Setup Free Download


Cool Features Of RockChip Batch Tool:

  1. Flash Stock Firmware easily.
  2. Easy interface.
  3. Multiple upgrade.
  4. Many more......

Download Here v1.8
Download Here v1.7

If you are interested to download Rockchip Factory Tool, Then Click Here.

Go to link download

Read more »

Korban Kebakaran di Tambora Masih Bertahan di Pinggir Rel Kereta Api

Korban Kebakaran di Tambora Masih Bertahan di Pinggir Rel Kereta Api


Para korban kebakaran masih bertahan di jalur rel kereta api, karena belum adanya tenda darurat.
Pascakebakaran yang meludeskan ratusan rumah di Tambora, Jakarta Barat, para korban kebakaran masih bertahan di jalur rel kereta api, karena belum adanya tenda darurat.
Seperti ditayangkan Liputan 6 Siang SCTV, Minggu (27/9/2015), setelah berjibaku 5 jam lebih, kobaran api yang menghanguskan kawasan padat penduduk di Jembatan Besi, Tambora, akhirnya berhasil dipadamkan Minggu dini hari.
Akibat rumah ludes dilalap api, korban kebakaran terpaksa bermalam di jalur rel kereta api dan sungai yang letaknya tak jauh dari lokasi kebakaran. Mereka tidur hanya beralaskan terpal plastik dan tikar.
Wakil Camat Tambora Suryanto berjanji akan mendirikan tenda pengungsian di dekat Puskesmas dan tempat ibadah terdekat.
Kebakaran yang menghanguskan 100 rumah di Jembatan Besi, Tambora terjadi Sabtu malam. Dugaan sementara, api dipicu hubungan pendek arus listrik di salah satu rumah kontrakan. (Nda/Yus)
Sumber: Liputan6.COM 

Go to link download

Read more »

How to get your lost Linux OS after Installing a Windows crap

How to get your lost Linux OS after Installing a Windows crap


Requirement: An Ubuntu Linux Live CD / USB. In this case you can make do with anything that has GRUB-INSTALL package with the Live CD. But if you have access to the internet using that Live session then you can just Google things down and dont even need this post, right?

Method:
1. Launch the Live Session.
2. Bring up terminal and type: sudo su
this gives you the privilege of a root in the live session
3. Now type: fdisk -l
Lists up all the partitions present in your system. Look for the partition that has "Linux" in the rightmost column. Note its /dev/sdx name from the left most column.
4. Type : mount /dev/sdx /mnt
Here /dev/sdx is the partition name that you noted. This command mounts that partition in mnt
5. Now type: grub-install --root-directory=/mnt/ /dev/sdx
Here /dev/sdx is the same thing as the previous command. Look at the output, the last line should say that the Installation went successful. VIOLA!!!

Reboot your system from your hard drive (normally) and hopefully the OSs should be there listed beautifully by GRUB. Smile!!!! Dont have to miss your favorite Linux distro.

Go to link download

Read more »

Gila Cewek Seksi Ini Menawarkan Tubuhnya Pada Polisi Agar Tidak Ditilang

Gila Cewek Seksi Ini Menawarkan Tubuhnya Pada Polisi Agar Tidak Ditilang



Ditilang polisi memang perkara yang tidak enak apalagi kalau kita memang terbukti bersalah dan ditambah tak membawa uang lebih untuk ‘berdamai’. Pilihan lain pun jatuh pada sidang, bukan? Namun, seorang wanita asal Florida ini tidak mau di tilang dan malah menawarkan hal yang tidak senonoh pada polisinya.

Wanita itu bernama Arielle Engert, ia memang seksi. Meski baru 24 tahun, tapi jiwa muda belasan tahunnya masih membara. Ia pun tertangkap basah melakukan pelanggaran lalu lintas. Sehingga, atas tindakannya ini ia pun ditahan dengan beberapa tuduhan pelanggaran.

Namun, karena takut terbukti menggunakan obat-obatan terlarang, ia pun mencari jalan pintas agar bisa lolos dari jeratan hukum. Dan caranya pun sangat ekstrim serta amat tidak terpuji.

Karena menganggap keseksian dirinya bisa meloloskannya, ia pun menawarkan polisi tersebut agar mau beretubuh dengannya tapi dengan catatan, ia akan terbebas. Untungnya, keimanan polisi itu kuat, polisi yang bernama Brian Sudbrink itu pun menolak mentah-mentah demi meneggakan keadilan.

Tapi malah, semakin polisi itu menolak, cewek seksi ini malah semakin gencar membujuknya dan bercerita bahwa rekan-rekan sesame polisinya saja banyak yang membiarkan dirinya lolos dengan tawaran yang sama. Namun sayang, sekali tidak tetap tidak.

Dan wanita seksi itu pun langsung dibawa ke kantor polisi!

"Berbagi Itu Indah"

Go to link download

Read more »