This file contains hidden or 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<string> v; | |
| int paseInt(char c) { | |
| switch (c) { |
This file contains hidden or 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
| void displayCoupleOfNumber(int n){ | |
| int b = 0; | |
| int tmp = sqrt(n); | |
| int a = tmp; | |
| while(true){ | |
| if(a<=0 || b >= tmp){ | |
| break; | |
| } | |
| if(a*a + b*b < n){ | |
| cout << "(" << a << ", "<< b<< ")" << endl; |
This file contains hidden or 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; | |
| /* | |
| S = 1/0! + 1/1! + 1/2! + ... 1/n! | |
| mau chung se bang n! | |
| ta tinh theo kieu quy dong len roi gian uoc dan dan | |
| */ |
This file contains hidden or 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; | |
| struct Time | |
| { | |
| int h,m,s; | |
| }; | |
| Time t1,t2; |
This file contains hidden or 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; | |
| struct Time | |
| { | |
| int h,m,s; | |
| }; | |
| Time t1,t2; |
This file contains hidden or 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 <math.h> | |
| #include <iomanip> | |
| using namespace std; | |
| /* | |
| e^x = x^0/0! + x^1/1! + ... x^n/n! | |
| */ | |
| double chia(double x, double ep, int n){ |
This file contains hidden or 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 <fstream> | |
| using namespace std; | |
| ifstream fi ("/Users/toan/ued/GOMIN.INP"); | |
| ofstream fo ("/Users/toan/ued/GOMIN.OUT"); | |
| int timerIndex = -1; |
This file contains hidden or 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 <math.h> | |
| #include <vector> | |
| using namespace std; | |
| bool isPrime(long int n){ | |
| if(n < 2){ | |
| return false; | |
| } |
This file contains hidden or 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 <fstream> | |
| #include <vector> | |
| #import <cstdlib> // khai báo để tí nữa dùng hàm abs | |
| using namespace std; | |
| ifstream fi ("/Users/toan/ued/18-10-2018/GOMIN.INP"); | |
| ofstream fo ("/Users/toan/ued/18-10-2018/GOMIN.OUT"); |
This file contains hidden or 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 <fstream> | |
| #include <vector> | |
| #include <math.h> | |
| using namespace std; | |
| ifstream fi ("/Users/toan/ued/18-10-2018/SCARD.INP"); | |
| ofstream fo ("/Users/toan/ued/18-10-2018/SCARD.OUT"); |