This file contains hidden or 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
var g_code=(()=>{ | |
// BEGIN | |
var qapsort=(arr,cb)=>{if(typeof cb=='undefined')cb=e=>e;return arr.sort((a,b)=>cb(b)-cb(a));} | |
var mapaddfront=(obj,n)=>{for(var k in obj)n[k]=obj[k];return n;} | |
var mapclone=obj=>mapaddfront(obj,{}); | |
var mapvals=m=>Object.values(m); | |
var mapkeys=m=>Object.keys(m); | |
var FToS=n=>(n+0).toFixed(2);var limit0=x=>x<0?0:x; | |
var drop_last_nums=s=>isNaN(s.slice(-1))?s:drop_last_nums(s.slice(0,-1)); | |
var sn2i={}; |
This file contains hidden or 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
// Author: }:+()___ [Smile] | |
#include <memory> | |
#include <cassert> | |
class Solver | |
{ | |
int mat_size, max_coeff, cur_row, cur_coeff; | |
std::unique_ptr<int []> row_start, col_index; | |
std::unique_ptr<double []> mat, residue, result; |
This file contains hidden or 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
#include <iostream> | |
using namespace std; | |
int main() { | |
auto sqr=[](int x){return x*x;}; | |
auto sqrt=[sqr](int x){ | |
auto center=[](int a,int b){return (a+b)>>1;}; | |
int low=0<<(sizeof(x)*8/2); | |
int top=1<<(sizeof(x)*8/2); | |
cout<<"top = "<<top<<endl; |
This file contains hidden or 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
void AVISceneRenderEx() | |
{ | |
auto&Dev=D9Dev; | |
vec2i ClientSize=win.GetClientSize(); | |
if(!Dev.BeginScene())return; | |
{ | |
D3DVIEWPORT9 ViewPort={0,0,ClientSize.x,ClientSize.y,-1.f,+1.f}; | |
Dev.pDev->SetViewport(&ViewPort); | |
Dev.Set2D(vec2i(0,0),1.0,0,&ClientSize); | |
Dev.Clear2D(0xffc8c8c8); |
This file contains hidden or 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
inline string IToS(const int&val) | |
{ | |
if(!val)return "0";char c[16]={0};int p=0;int v=val;int n=10;if(val<0){v*=-1;} | |
for(;v;){c[p++]='0'+v%n;v/=n;}if(val<0)c[p++]='-'; | |
string s;s.resize(p);for(int i=0;i<p;i++)s[i]=c[(p-1)-i]; | |
return s; | |
} |
This file contains hidden or 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
// http://ideone.com/H2uNwE | |
#include <iostream> | |
#include <vector> | |
using namespace std; | |
vector<vector<int>> out; | |
void f(int N,int L,const vector<int>&prefix){ | |
auto arr=prefix; | |
for(auto i=arr.empty()?0:arr.back()+1;i<N;i++){ | |
arr.push_back(i); |
This file contains hidden or 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
//execSync("cl -EP -DUnix -DPREPROC main.cpp"); | |
return POST.data.split("\r").join("").split("\n").filter(e=>e.split(" ").join("").length).join("\n"); |
This file contains hidden or 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
diff --git a/build.bat b/build.bat | |
new file mode 100644 | |
index 0000000..6d470d4 | |
--- /dev/null | |
+++ b/build.bat | |
@@ -0,0 +1,6 @@ | |
+@if "%DevEnvDir%" == "" ( | |
+ @call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\vsvars32.bat" | |
+) | |
+@cl /nologo main.cpp /FeGUP.exe /Os /EHsc |
This file contains hidden or 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
struct i_type{TSelfPtr<SelfClass> self;}; | |
//struct t_string:i_type{}; | |
struct t_bit:i_type{}; | |
struct t_autoptr:i_type{TWeakPtr<i_type> elem_type;}; | |
struct t_weakptr:i_type{TWeakPtr<i_type> elem_type;}; | |
struct t_selfptr:i_type{TWeakPtr<i_type> elem_type;}; | |
struct t_vector:i_type{TWeakPtr<i_type> elem_type;}; | |
struct t_field{ |
This file contains hidden or 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
{"saveStratsActive":"[1,1,1,1,1,1,1,1]","saveGame":"{\"resetFlag\":2,\"dismantle\":0,\"endTimer1\":0,\"endTimer2\":0,\"endTimer3\":0,\"endTimer4\":0,\"endTimer5\":0,\"endTimer6\":0,\"testFlag\":0,\"finalClips\":0,\"wireBuyerStatus\":1,\"wirePriceTimer\":198,\"qFade\":-70.79699999997399,\"autoTourneyStatus\":1,\"driftKingMessageCost\":1,\"sliderPos\":\"200\",\"tempOps\":0,\"standardOps\":44341.00000000114,\"opFade\":6.183029078175459,\"entertainCost\":30000,\"boredomLevel\":0,\"boredomFlag\":0,\"boredomMsg\":0,\"unitSize\":0,\"driftersKilled\":0,\"battleEndDelay\":0,\"battleEndTimer\":100,\"masterBattleClock\":0,\"honorCount\":0,\"threnodyTitle\":\"Durenstein 1\",\"bonusHonor\":0,\"honorReward\":0,\"resultsTimer\":0,\"resultsFlag\":0,\"honor\":0,\"maxTrust\":20,\"maxTrustCost\":91117.99,\"disorgCounter\":0.994136617487994,\"disorgFlag\":0,\"synchCost\":5000,\"disorgMsg\":0,\"threnodyCost\":50000,\"farmRate\":50,\"batterySize\":10000,\"factoryPowerRate\":200,\"dronePowerRate\":1,\"farmLevel\":1,\"batteryLevel\" |
OlderNewer