Skip to content

Instantly share code, notes, and snippets.

View WildfootW's full-sized avatar

Andrew Shen WildfootW

View GitHub Profile
@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;//小於:由小而大 ,大於:由大而小
}
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;
#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*/