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 <algorithm> | |
#include <cmath> | |
using namespace std; | |
long double sec(long double a, long double b, long double c) | |
{ | |
long double del = b*b - 4 * a *c; | |
long double x1 = (-sqrt(del) - b) / 2*a; | |
long double x2 = (sqrt(del) - b) / 2*a; | |
if (x1 > 0 && x1 < 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 <vector> | |
using namespace std; | |
int main() | |
{ | |
double h=0; | |
double p1, p2, p3; | |
int n; | |
cin >> p1; |
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() | |
{ | |
double h=0; | |
double p1, p2, p3; | |
int n; | |
cin >> p1; |
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() | |
{ | |
vector <int> a; | |
vector <int> ans; | |
int n,maxx=0,t; | |
cin >> 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 <vector> | |
using namespace std; | |
int main() | |
{ | |
char m; | |
int xs, ys,n1,n2,tx,ty,coun=0; | |
vector < vector <int> > a; |
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 calcpr(int n) | |
{ | |
if (n == 1) | |
return 0; | |
int summ = 0; | |
for (int i = 1; i*i <= n; 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 <string> | |
using namespace std; | |
int main() | |
{ | |
int t; | |
long long x, y,z; | |
cin >> x >> y >> z; | |
while (x!=0||y!=0||z!=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> | |
using namespace std; | |
int main() | |
{ | |
int t, x,tem,tem2; | |
cin >> t; | |
while (t--) | |
{ | |
tem = 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> | |
using namespace std; | |
int main() | |
{ | |
int x; | |
cin >> x; | |
if (x % 10 == 0) | |
cout << 2 << endl; | |
else | |
cout << 1 << endl << x % 10 << endl; |
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 Bmode(int x, int p, int m) | |
{ | |
long long tempo; | |
if (p == 0) | |
return 1; | |
if (p % 2 == 0) | |
{ | |
tempo = Bmode(x, p / 2, m); |
NewerOlder