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<iostream> | |
using namespace std; | |
long long n,k,p,i; | |
long long f[100001]; | |
long long inf[100001]; | |
long long fpow(long long base, long long power) | |
{ | |
long long w=1; | |
while(power>0) | |
{ |
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<iostream> | |
#include<stdio.h> | |
#include<cmath> | |
using namespace std; | |
int main() | |
{ | |
long long int t; | |
scanf("%lld",&t); | |
while(t--) | |
{ |
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<iostream> | |
#include<stdio.h> | |
#include<vector> | |
using namespace std; | |
int main() | |
{ | |
while(1) | |
{ | |
int t,n=1; | |
scanf("%d",&t); |
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<iostream> | |
#define MOD 1000000007 | |
using namespace std; | |
void multiply(long long int F[2][2], long long int M[2][2]); | |
void power(long long int F[2][2],long long int n); | |
long long int fib(long long int n) | |
{ | |
long long int F[2][2]={{1,1},{1,0}}; | |
if(n==0) |
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> | |
using namespace std; | |
int main() | |
{ | |
string a,b; | |
while(cin>>a) | |
{ | |
cin>>b; | |
int i,j,x=a.size(),y=b.size(); |
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<iostream> | |
using namespace std; | |
int _max(int a,int b,int c) | |
{ | |
if(a>=b && a>=c) | |
{ | |
return a; | |
} | |
else if(b>=a && b>=c) | |
{ |
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<iostream> | |
using namespace std; | |
long long int fastPower(long long base,long long power,long long MOD) | |
{ | |
long long result=1; | |
while (power>0) | |
{ | |
if (power%2==1) | |
{ |
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
//HOTELS - Hotels Along the Croatian Coast | |
/* | |
Author | |
-Sukeesh | |
*/ | |
#include<iostream> | |
#include<cstdio> | |
#include<limits.h> | |
using namespace std; | |
int main(){ |
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
/* | |
Author | |
-Sukeesh | |
*/ | |
#include<iostream> | |
#include<algorithm> | |
using namespace std; | |
string str; | |
long long rem(long long x) | |
{ |
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<iostream> | |
#include<cmath> | |
#include<stdio.h> | |
using namespace std; | |
#define MAX 31627 | |
#define sq 178 | |
int check[32000]; | |
int prime[10000]; | |
#define ll long long | |
ll temp; |
OlderNewer