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
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# vim:fenc=utf-8 | |
# | |
# Copyleft (ɔ) 2024 wildfootw <[email protected]> | |
# | |
# Distributed under terms of the MIT license. | |
import pandas as pd | |
from datetime import datetime, timedelta |
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
#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*/ |
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
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; |
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
//sort, reverse | |
#include <algorithm> | |
#include <cstdio> | |
using namespace std; | |
int cmp(int a,int b){ | |
return a>b;//小於:由小而大 ,大於:由大而小 | |
} |