Last active
December 18, 2017 06:55
-
-
Save aqzlpm11/dbe3b034f9de412d475af47654ab6b8e to your computer and use it in GitHub Desktop.
ACM 开栈黑魔法
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
// Reference: | |
// https://www.cnblogs.com/HarryGuo2012/p/4722784.html | |
// http://blog.csdn.net/fcxxzux/article/details/40053937 | |
#include <cstring> | |
#include <cstdio> | |
#include <cstdlib> | |
int dfs(int i) { | |
int a[100]; | |
if (i == 1000000) { | |
return 0; | |
} | |
return dfs(i+1); | |
} | |
void solve() { | |
/// Write your code here | |
/// ... | |
dfs(0); | |
} | |
int main() { | |
int size = 128 << 20; // 128MB | |
char *p = (char*)malloc(size) + size; | |
__asm__("movl %0, %%esp\n" :: "r"(p)); | |
solve(); | |
exit(0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment