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 <string> | |
#include <vector> | |
#include <cmath> | |
using namespace std; | |
const int MAX_N = 1000000; | |
vector <int> primes; | |
int Bsearche(int f, int e, int tar) | |
{ | |
if (f > e) |
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 <vector> | |
#include <algorithm> | |
#include <string> | |
using namespace std; | |
int main() | |
{ | |
vector <int> a1, a2; | |
int n,tempp; | |
string 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 <vector> | |
using namespace std; | |
int comp(int a, int b ,int c) | |
{ | |
if (a >= b) | |
{ | |
if (a >= c) | |
return a; | |
else |
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 <vector> | |
using namespace std; | |
void checkprint(vector <bool>a) | |
{ | |
int tempp = 0; | |
for (int i = a.size()-1; i >= 0; i--) | |
{ | |
if (a[i]) | |
tempp++; |
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 <string> | |
#include <vector> | |
using namespace std; | |
vector <vector <int> > a; | |
vector < int > al; | |
void makearr() | |
{ | |
a.resize(5); | |
int tt = 2,t2; |
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 <string> | |
using namespace std; | |
int main() | |
{ | |
int t; | |
double d,x,y; | |
cin >> t; | |
int i = 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
#include <iostream> | |
#include <vector> | |
using namespace std; | |
vector <vector <char> > a; | |
int count(int x,int y) | |
{ | |
int coux=0, couy=0; | |
for (int i = 0; i < a[x].size(); i++) | |
{ | |
if (a[x][i] == 'H') |
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; | |
class rec | |
{ | |
int Length; | |
int width; | |
public: | |
// This add a new value for rec | |
void add(int a,int b) | |
{ |
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 <vector> | |
using namespace std; | |
int main() | |
{ | |
int m = 0; | |
vector <long long > a(64001); | |
a[0] = 0; | |
for (int i = 1; i < 64001; i++) | |
{ |
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 <vector> | |
#include <algorithm> | |
using namespace std; | |
void allsubset(vector<int>a,int y) | |
{ | |
vector <int>all; | |
vector <bool> sumset; | |
vector <bool> Tsumset; | |
sort(a.begin(), a.end()); |