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
CXX := g++ | |
CXX_FLAGS := -std=c++17 -ggdb -Wall | |
BIN := bin | |
INCLUDE := include | |
LIBRARIES := | |
EXECUTABLE := main | |
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 "function.h" | |
char* reverseString(char *str) { | |
const int N = strlen(str); | |
for(int i = 0; i < N / 2; i++) { | |
swap(str[i], str[N - i - 1]); | |
} | |
return str; |
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
char* humanlizeString(const char *str) { | |
char *result = new char[strlen(str) * 10]; | |
const char *name[] = { | |
"nghin", "trieu", "ti" | |
}; | |
const char *number[] = { | |
"khong", "mot", "hai", "ba", "bon", | |
"nam", "sau", "bay", "tam", "chin" | |
}; |
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 "Dice.h" | |
#include "../Random/Random.cpp" | |
using namespace std; | |
int main() | |
{ | |
Dice dice; | |
char option; |
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 "Dice.h" | |
Dice::Dice() | |
{ | |
m_rollTime = 0; | |
m_totalRoll = 0; | |
m_rollValues[0] = -1; | |
memset(m_rollValues, 0, sizeof(m_rollValues)); |
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
"An","Anh","Ao","Ánh","Ân","Âu Dương","Ấu","Bá","Bạc","Bạch","Bàn","Bàng","Bành","Bảo", | |
"Bế","Bì","Biện","Bình","Bồ","Chriêng","Ca","Cái","Cai","Cam","Cảnh","Cao","Cáp","Cát", | |
"Cầm","Cấn","Chế","Chiêm","Chu/Châu","Chung","Chúng","Chương","Chử","Cồ","Cổ","Công", | |
"Cống","Cung","Cù","Cự","Dã","Danh","Diêm","Diệp","Doãn","Dư","Đái","Điều","Đan","Đàm", | |
"Đào","Đầu","Đậu","Đèo","Điền","Đinh","Điêu","Đoàn","Đôn","Đống","Đồ","Đồng","Đổng","Đới", | |
"Đương","Đường","Đức","Đăng","Giả","Giao","Giang","Giàng","Giáp","H'","H'ma","H'nia","Hầu", | |
"Hà","Hạ","Hàn","Hán","Hề","Hi","Hình","Hoa","Hồng","Hùng","Hứa","Hướng","Kông","Kiểu","Kha", | |
"Khà","Khương","Khâu","Khiếu","Khoa","Khổng","Khu","Khuất","Khúc","Kiều","Kim","Khai","Lyly", | |
"La","Lã","Lãnh","Lạc","Lại","Lăng","Lâm","Lèng","Lều","Liêu","Liễu","Lò","Lô","Lỗ","Lộ","Luyện", | |
"Lục","Lư","Lương","Lưu","Lý","Mùa","Ma","Mai","Mang","Mã","Mạc","Mạch","Mạnh","Mâu","Mầu/Màu", |
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
std::sort(students.begin(), students.end(), [](std::shared_ptr<Student> a, std::shared_ptr<Student> b) { | |
return a->getAvgMark() > b->getAvgMark(); | |
}); |
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 <windows.h> | |
#include <stdio.h> | |
#include <string> | |
#include <typeinfo> | |
#include <iostream> | |
using namespace std; | |
int ReadSector(LPCWSTR drive, int readPoint, BYTE sector[512]) | |
{ |
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
from PIL import Image | |
import numpy as np | |
import re | |
IMG_PATH = "map.bmp" | |
INPUT_PATH = "input.txt" | |
OUTPUT_PATH = "output.txt" | |
def bitmapToArray(path): | |
image = Image.open("map.bmp") |
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
// SPDX-License-Identifier: MIT | |
import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | |
// File: contracts/IUniswapV2Router01.sol | |
pragma solidity >=0.6.2; | |
interface IUniswapV2Router01 { |