Skip to content

Instantly share code, notes, and snippets.

View WildfootW's full-sized avatar

Andrew Shen WildfootW

View GitHub Profile
@WildfootW
WildfootW / workdays_cycle_allocation.py
Created July 17, 2024 15:59
Workdays-Cycle-Allocation
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyleft (ɔ) 2024 wildfootw <wildfootw@wildfoo.tw>
#
# Distributed under terms of the MIT license.
import pandas as pd
from datetime import datetime, timedelta
#ifndef SUN_MOON_BIG_INT
#define SUN_MOON_BIG_INT
#define SM_BASE 1000000000
#define SM_BASE_DIGITS 9
/*SM_BASE 0 的個數為SM_BASE_DIGITS*/
#include<vector>
#include<iostream>
#include<iomanip>
#include<string>
#include<utility>/*for pair*/
queue<int> q;
q.push (1);
while(! q.empty())
{
for(int j=0;j<q[i].size();j++)
{
if(!u[g[i][j]])
{
q.push(g[i][j]);
u[g[i][j]]=1;
@WildfootW
WildfootW / 1-sort.cpp
Created August 1, 2015 12:18
2015 C++ note by domen111
//sort, reverse
#include <algorithm>
#include <cstdio>
using namespace std;
int cmp(int a,int b){
return a>b;//小於:由小而大 ,大於:由大而小
}