This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//http://www.spoj.com/problems/PATULJCI/ | |
#include <bits/stdc++.h> | |
#include <ext/pb_ds/assoc_container.hpp> | |
using namespace __gnu_pbds; | |
using namespace std; | |
#define gc getchar unlocked | |
#ifndef ONLINE JUDGE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Clue : | |
* The number of deer is unimportant and is not needed for any calculation | |
* If the number of tigers are odd then .. there is no way to make all the | |
tigers disappear .. and so I will never be sure that if i try to leave | |
the island i will not be killed .. so in this case the probability is zero(0); | |
* If the number of tigers are even then the tigers will die by fighting each | |
other .. And as the question says that we need to maximize the probability | |
of my winning .. so I would assume that every day two tigers will die .. | |
and i need to find the probability according to that .. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
//#include <ext/pb_ds/assoc_container.hpp> | |
//using namespace __gnu_pbds; | |
using namespace std; | |
#define gc getchar unlocked | |
#ifndef ONLINE JUDGE | |
#define gc getchar | |
#endif // ONLINE JUDGE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
//#include <ext/pb_ds/assoc_container.hpp> | |
//using namespace __gnu_pbds; | |
using namespace std; | |
#define gc getchar unlocked | |
#ifndef ONLINE JUDGE | |
#define gc getchar | |
#endif // ONLINE JUDGE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
//#include <ext/pb_ds/assoc_container.hpp> | |
//using namespace __gnu_pbds; | |
using namespace std; | |
#define gc getchar unlocked | |
#ifndef ONLINE JUDGE | |
#define gc getchar | |
#endif // ONLINE JUDGE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
//#include <ext/pb_ds/assoc_container.hpp> | |
//using namespace __gnu_pbds; | |
using namespace std; | |
#define gc getchar unlocked | |
#ifndef ONLINE JUDGE | |
#define gc getchar | |
#endif // ONLINE JUDGE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
//#include <ext/pb_ds/assoc_container.hpp> | |
//using namespace __gnu_pbds; | |
using namespace std; | |
#define gc getchar unlocked | |
#ifndef ONLINE JUDGE | |
#define gc getchar | |
#endif // ONLINE JUDGE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
//#include <ext/pb_ds/assoc_container.hpp> | |
//using namespace __gnu_pbds; | |
using namespace std; | |
#define gc getchar unlocked | |
#ifndef ONLINE JUDGE | |
#define gc getchar | |
#endif // ONLINE JUDGE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
//#include <ext/pb_ds/assoc_container.hpp> | |
//using namespace __gnu_pbds; | |
using namespace std; | |
#define gc getchar unlocked | |
#ifndef ONLINE JUDGE | |
#define gc getchar | |
#endif // ONLINE JUDGE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
//#include <ext/pb_ds/assoc_container.hpp> | |
//using namespace __gnu_pbds; | |
using namespace std; | |
#define gc getchar unlocked | |
#ifndef ONLINE JUDGE | |
#define gc getchar | |
#endif // ONLINE JUDGE |
NewerOlder