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 <sys/types.h> | |
#include <dirent.h> | |
#include <stdio.h> | |
int main(int argc, char** argv) { | |
for (int i = 1; i < argc; i++) { | |
DIR* dir = opendir(argv[i]); | |
if (!dir) { | |
fprintf(stderr, "failed top open directory %s\n", argv[i]); | |
continue; |
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 <iostream> | |
#include <vector> | |
#include <algorithm> | |
using namespace std; | |
/* Recovers k increasing disjoint subsequences that cover the maximum possible | |
* number of elements from A. Runs in O(MN) time where M is the resulting | |
* number of elements on all subsequences. Based on the method | |
* described in section 4 of Greene's "An Extension of Schensted's Theorem". |
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
asm( | |
" .file \"queen2.cpp\"\n" | |
" .section .text._ZN2IO10skip_spaceEv,\"axG\",@progbits,_ZN2IO10skip_spaceEv,comdat\n" | |
" .align 2\n" | |
" .p2align 4,,15\n" | |
" .weak _ZN2IO10skip_spaceEv\n" | |
" .type _ZN2IO10skip_spaceEv, @function\n" | |
"_ZN2IO10skip_spaceEv:\n" | |
".LFB685:\n" | |
" .cfi_startproc\n" |
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 <sys/mman.h> | |
#include <sys/stat.h> | |
#include <sys/types.h> | |
#include <unistd.h> | |
#include <string> | |
#include <cstring> | |
#include <cctype> | |
#include <cstdio> | |
#include <cstdlib> |
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 <sys/mman.h> | |
#include <sys/stat.h> | |
#include <sys/types.h> | |
#include <unistd.h> | |
#include <string> | |
#include <cstring> | |
#include <cctype> | |
#include <cstdio> |
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 <algorithm> | |
#include <vector> | |
#include <complex> | |
#include <cmath> | |
using namespace std; | |
static bool geoerror; | |
// #define USE_FLOAT |
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 <iostream> | |
#include <cstring> | |
#include <cstdio> | |
#include <numeric> | |
using namespace std; | |
typedef unsigned int u4; | |
#define MAXN 15 |
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 <iostream> | |
#include <vector> | |
#include <algorithm> | |
#include <cstring> | |
#include <cstdlib> | |
#include <cstdio> | |
#include <set> | |
#include <map> | |
#include <numeric> | |
#include <queue> |
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 <iostream> | |
#include <vector> | |
#include <cstring> | |
#include <cstdio> | |
#include <set> | |
#include <algorithm> | |
#include <map> | |
using namespace std; |
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 <algorithm> | |
#include <vector> | |
#include <complex> | |
#include <cmath> | |
using namespace std; | |
/* A flag used by some geometry routines to indicate exceptional circumstances. | |
*/ | |
static bool geoerror; |