Skip to content

Instantly share code, notes, and snippets.

View thuzhf's full-sized avatar
🎯
Focusing

Fang Zhang thuzhf

🎯
Focusing
  • Tsinghua University
  • Beijing, China.
View GitHub Profile
/*
* @Author: Fang Zhang <thuzhf@gmail.com>
* @Date: 2016-09-24 16:03:32
*/
#include <iostream>
using namespace std;
using ull = unsigned long long;
@thuzhf
thuzhf / ugly.sh
Last active August 29, 2015 14:22
#!/usr/bin/env bash
TMP=/tmp/thuzhf
TMP_I=$TMP + /usr/include
rm -rf $TMP_I
mkdir -p $TMP_I
touch $TMP_I/cstdlib
touch $TMP_I/iostream
touch $TMP_I/vector
touch $TMP_I/map
@thuzhf
thuzhf / tmp.hpp
Last active August 29, 2015 14:22
namespace zf {
using ll = long long;
using ull = unsigned long long;
}
namespace zf {
template <class T>
std::vector<std::vector<T> > matrix_multiply( const std::vector<std::vector<T> > &ml, const std::vector<std::vector<T> > &mr) {
unsigned ml_row_n = ml.size();
unsigned ml_col_n = ml[0].size();
unsigned mr_row_n = mr.size();
/*
* This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
* http://www.gnu.org/licenses/gpl-3.0.html
*
* $Revision: 9441 $
* $Id: nativeparser.cpp 9441 2013-11-09 12:59:13Z mortenmacfly $
* $HeadURL: http://svn.code.sf.net/p/codeblocks/code/branches/release-xx.yy/src/plugins/codecompletion/nativeparser.cpp $
*/
#include <sdk.h>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using xna = Microsoft.Xna.Framework;
using URWPGSim2D.Common;
using URWPGSim2D.StrategyLoader;
using URWPGSim2D.Core;
using Microsoft.Xna.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using xna = Microsoft.Xna.Framework;
using URWPGSim2D.Common;
using URWPGSim2D.StrategyLoader;
using URWPGSim2D.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using xna = Microsoft.Xna.Framework;
using URWPGSim2D.Common;
using URWPGSim2D.StrategyLoader;
using URWPGSim2D.Core;
if (state == State.center_area)
{
if (ballsPm.X < -500)
{
state = (goal == 0 ? State.defense_area : State.attack_area);
}
else if (ballsPm.X > 500)
{
state = (goal == 0 ? State.attack_area : State.defense_area);
}
@thuzhf
thuzhf / 3v3-backup.cs
Created July 17, 2014 01:26
我的备份
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using xna = Microsoft.Xna.Framework;
using URWPGSim2D.Common;
using URWPGSim2D.StrategyLoader;
using URWPGSim2D.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using xna = Microsoft.Xna.Framework;
using URWPGSim2D.Common;
using URWPGSim2D.StrategyLoader;
using URWPGSim2D.Core;