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
From 4beb792e846212d6eac1b7f7bfe49d91128bbe43 Mon Sep 17 00:00:00 2001 | |
From: Yang Keao <[email protected]> | |
Date: Mon, 18 Mar 2019 23:12:01 +0800 | |
Subject: [PATCH 1/2] Map window when shake cursor | |
--- | |
dwm.c | 26 +++++++++++++++++++++++++- | |
1 file changed, 25 insertions(+), 1 deletion(-) | |
diff --git a/dwm.c b/dwm.c |
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 <semaphore.h> | |
#include <random> | |
sem_t begin_sem1; | |
sem_t begin_sem2; | |
sem_t end_sem; | |
int X, Y; | |
int r1, r2; |
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://acm.hdu.edu.cn/showproblem.php?pid=1166 | |
#include <iostream> | |
#include <stdio.h> | |
#include <string.h> | |
#define N 50005 | |
using namespace std; | |
int M; | |
int T[N*4]; | |
int Query(int s,int t){ |
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
template <class T> | |
static void read(T &rec) | |
{ | |
rec=0; | |
char c; | |
while((c=getchar())<'0' || c>'9'); | |
while(c>='0' && c<='9') | |
{ | |
rec=(rec<<3)+(rec<<1)+(c-'0'); | |
c=getchar(); |
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> | |
#include<cstdio> | |
#include<ctype.h> | |
using namespace std; | |
inline int readint() | |
{ | |
char c=getchar(); | |
while(!isdigit(c))c=getchar(); | |
int x=0; |
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> | |
#include <cstdio> | |
using namespace std; | |
const int | |
d[4][2]={0,1, | |
0,-1, | |
1,0, |
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 <stdio.h> | |
#include <iostream> | |
using namespace std; | |
struct Node | |
{ | |
long long left; | |
long long right; | |
long long delta; | |
long long sum; | |
Node *lc; |
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 n,c[1000000],m; | |
int t,g,l; | |
int low(int x){ | |
return x&(-x); | |
} | |
int sum(int x){ | |
int sum=0; | |
while(x>0){ |
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<stdio.h> | |
using namespace std; | |
long long q; | |
float CarmSqrt(float x){ | |
union{ | |
int intPart; | |
float floatPart; | |
} convertor; | |
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 a,b,c; | |
int t,g; | |
int father[6000]; | |
int getfather(int a){ | |
if(father[a]==a) return a; | |
else father[a]=getfather(father[a]); | |
return father[a]; | |
} |