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
#include "rapidjson/document.h" | |
#include "rapidjson/writer.h" | |
#include "rapidjson/stringbuffer.h" | |
#include <algorithm> | |
#include <iostream> | |
using namespace rapidjson; | |
int main () { | |
Document d; |
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
#include <stdio.h> | |
#include <windows.h> | |
#include <wincrypt.h> | |
#include <cryptuiapi.h> | |
#include <io.h> | |
#include <tchar.h> | |
#include <stdlib.h> | |
#pragma comment (lib, "crypt32.lib") |
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
#include <tchar.h> | |
#include <Windows.h> | |
#include <tlhelp32.h> | |
#pragma comment(linker, "/subsystem:\"windows\" /entry:\"mainCRTStartup\"") | |
bool findProcess(const TCHAR* processName) | |
{ | |
PROCESSENTRY32 pe32; | |
pe32.dwSize = sizeof(PROCESSENTRY32); | |
HANDLE hProcess = INVALID_HANDLE_VALUE; |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
unsigned int get_rand(int x) | |
{ | |
unsigned int i,res,mask=0; | |
if (x<=0) return 0; | |
for (i=0; x>=(1<<i); i++) | |
mask=(mask<<1)+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
/*[*/#include<stdio.h>// | |
#include<stdlib.h>//]++++[->++[->+>++++<<]<][(c)2013] | |
#ifndef e//[o | |
#include<string.h>//]![misaka.c,size=3808,crc=d0ec3b36][ | |
#define e 0x1// | |
typedef struct{int d,b,o,P;char*q,*p;}f;int p,q,d,b,_=0//| | |
#include __FILE__//]>>>[->+>++<<]<[-<<+>>>++<]>>+MISAKA*IMOUTO | |
#undef e//[->[-<<+<+<+>>>>]<<<<<++[->>+>>>+<<<<<]>+>+++>+++[>]]b | |
#define e(c)/**/if((_!=__LINE__?(_=__LINE__):0)){c;}//[20002,+[-.+] | |
,O,i=0,Q=sizeof(f);static f*P;static FILE*t;static const char*o[]={// |
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
int clean_subdir(TCHAR *szPath) | |
{ | |
HANDLE hFind; | |
BOOL bContinue = TRUE; | |
WIN32_FIND_DATA FindData; | |
TCHAR szFile[MAX_PATH]; | |
wsprintf(szFile, TEXT("%s\\*"), szPath); | |
hFind = FindFirstFile(szFile, &FindData); | |
if (hFind==INVALID_HANDLE_VALUE) |
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
// http://poj.org/problem?id=1051 | |
#include <stdio.h> | |
#include <string.h> | |
char hash[32][6]={{".-"},{"-..."},{"-.-."},{"-.."},{"."},{"..-."},{"--."}, | |
{"...."},{".."},{".---"},{"-.-"},{".-.."},{"--"},{"-."}, | |
{"---"},{".--."},{"--.-"},{".-."},{"..."},{"-"},{"..-"}, | |
{"...-"},{".--"},{"-..-"},{"-.--"},{"--.."},{"..--"},{".-.-"}, | |
{"---."},{"----"}}; | |
int len[32]={2,4,4,3,1,4,3,4,2,4,3,4,2,2,3,4,4,3,3,1,3,4,3,4,4,4,4,4,4,4}; |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
#define LEN 10 /* 链表长度 */ | |
#define MAX 99 /* 链表元素最大值 */ | |
struct node { | |
int data; | |
struct node* next; | |
}; |
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
#include <cstdio> | |
#include <cstdlib> | |
#include <cstring> | |
int g_life[5]={0}; | |
int red_next[5]={2,0,3,4,1}; | |
int blue_next[5]={1,2,4,0,3}; | |
const char* g_name[5]={"dragon","ninja","iceman","lion","wolf"}; | |
struct warrior{ |
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
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <time.h> | |
#include <conio.h> | |
#include <windows.h> | |
struct node { | |
int x; | |
int y; |
NewerOlder