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 <vector> | |
#include <iostream> | |
using namespace std; | |
const int abc_size = 26; | |
int main() | |
{ | |
vector<int> lval(abc_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> | |
#include <vector> | |
using namespace std; | |
bool less_than( | |
const string& a, | |
int ai, | |
int bi, | |
int 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 <vector> | |
#include <iostream> | |
using namespace std; | |
const int _1e6 = 1000000; | |
void print(const vector<vector<int> >& lines) { | |
cout << endl; | |
for (int i = 0; i < lines.size(); 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
#define Do0 16 | |
#define Do_0 17 | |
#define Re0 18 | |
#define Re_0 19 | |
#define Mi0 20 | |
#define Fa0 21 | |
#define Fa_0 23 | |
#define Sol0 24 | |
#define Sol_0 25 | |
#define La0 27 |
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
# Source: https://milq.github.io/install-opencv-ubuntu-debian/ | |
###################################### | |
# INSTALL OPENCV ON UBUNTU OR DEBIAN # | |
###################################### | |
# | THIS SCRIPT IS TESTED CORRECTLY ON | | |
# |----------------------------------------------------| | |
# | OS | OpenCV | Test | Last test | | |
# |----------------|--------------|------|-------------| |
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 "[FORM NAME].h" | |
using namespace System; | |
using namespace System::Windows::Forms; | |
[STAThread] | |
void main(array<String^>^ args) | |
{ | |
Application::EnableVisualStyles(); | |
Application::SetCompatibleTextRenderingDefault(false); |
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
pyTriples :: Integer -> [(Integer, Integer, Integer)] | |
pyTriples n = [(a, b, c) | a <- [1..n], b <- [1..n], c <- [1..n], a^2 + b^2 == c^2] |
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
import sys | |
def err(section): | |
print("ERROR [{section}]: Bad input (not a number)".format(section=section)) | |
sys.exit(1) | |
def stoi(s): | |
return int("".join(("0" + s))) | |
def int_repeat(n, k): |
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 <deque> | |
#include <array> | |
#include <algorithm> | |
#include <cmath> | |
using namespace std; |
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
// Use N <= 30 (good luck to calculate that) | |
#include <iostream> | |
#include <vector> | |
#include <algorithm> | |
#include <cmath> | |
using namespace std; | |
// bits values for bit arrays: | |
// 1 = free | |
// 0 = used |
OlderNewer