Cod sursa(job #1848030)

Utilizator Ionut.popescuLiviu Rebreanu Ionut.popescu Data 15 ianuarie 2017 13:17:42
Problema A+B Scor 0
Compilator cpp Status done
Runda teme_upb Marime 0.53 kb
#include <bits/stdc++.h>
using namespace std;

void main2() {
	freopen("adunare.in", "r", stdin);
	freopen("adunare.out", "w", stdout);
	int a, b;
	printf("%d\n", a+b);
}

int main() {
    static long long eord, enew;
    const int sz = 256*1024*1024;
    static unsigned char *p = (unsigned char*)malloc(sz);
    enew = ((long long)(p+sz-1) & ~0xff);
    __asm__ volatile("mov %%rsp, %0" : "=r"(eord));
    __asm__ volatile("mov %0, %%rsp" : : "r"(enew));
    main2();
    __asm__ volatile("mov %0, %%rsp" : : "r"(eord));
    return 0;
}