Skip to content

Instantly share code, notes, and snippets.

View lychees's full-sized avatar
🌴
People, Fund, Strategy ...

minakokojima lychees

🌴
People, Fund, Strategy ...
View GitHub Profile
/**
*Submitted for verification at Etherscan.io on 2020-09-16
*/
/**
*Submitted for verification at Etherscan.io on 2020-09-15
*/
pragma solidity ^0.5.16;
pragma experimental ABIEncoderV2;
pragma solidity ^0.5.0;
contract DSMath {
function add(uint x, uint y) internal pure returns (uint z) {
require((z = x + y) >= x, "ds-math-add-overflow");
}
function sub(uint x, uint y) internal pure returns (uint z) {
require((z = x - y) <= x, "ds-math-sub-underflow");
}
function mul(uint x, uint y) internal pure returns (uint z) {
00000000000000000000000012e2fcfa079fc23ae82ab82707b402410321103f0000000000000000000000003e40fbee56d2298c8762770917315d748f74cf97000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000002a30783030303030303030303030303030303030303030303030303030303030303030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a30783135334630376232636332613265336133464435354562343437394132326631643638303832324200000000000000000000000000000000000000000000
@lychees
lychees / Go
Created October 20, 2020 04:25
Pool...
// Dependency file: @openzeppelin/contracts/GSN/Context.sol
// SPDX-License-Identifier: MIT
// pragma solidity ^0.6.0;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
@lychees
lychees / yUniswap_ETH_USDT_LP.sol
Created September 18, 2020 11:43
yUniswap_ETH_USDT_LP.sol
// Dependency file: contracts/interfaces/IERC20.sol
// SPDX-License-Identifier: MIT
// pragma solidity ^0.6.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/*
___ ___ ________ ________
|\ \ / /|\_____ \|\ ___ \
\ \ \/ / \|____|\ /\ \ \_|\ \
\ \ / / \|\ \ \ \ \\ \
\/ / / __\_\ \ \ \_\\ \
__/ / / |\_______\ \_______\
|\___/ / \|_______|\|_______|
\|___|/
*/
pragma solidity ^0.5.0;
import './y3dPool.sol';
import './y3dToken.sol';
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
contract y3dFactory {
y3dToken public y3d;
/* &*#()&*#)&E*F& */
#include <iostream>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <cmath>
#include <algorithm>
#include <sstream>
#include <string>
/**
* @param {string} word1
* @param {string} word2
* @return {number}
*/
let minDistance = function(word1, word2) {
let a = word1.split("")
let b = word2.split("")
let n = a.length
let m = b.length
// https://paste.ubuntu.com/p/g7hk9rjTkc
#include<bits/stdc++.h>
#define mset(a,b) memset(a,b,sizeof(a))
using namespace std;
const int N=2e3+50;
long long xx[N],yy[N];
//long long qx[N],qy[N];
long long res[N];
struct Point //向量,但是主要判断方向与自己平行的多少个
{