| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1368165 | mikasa | Hack (APIO25_hack) | C++20 | 1 ms | 344 KiB |
#include "hack.h"
#include <vector>
using namespace std;
long long m = 0;
int hack(){
volatile int* bss = (volatile int*)&m;
const int RADI = 200;
vector<int> snap(RADI*2);
for (int i=-RADI;i<RADI;++i) {
snap[i+RADI]=bss[i];
}
collisions({1});
volatile int* ptr=nullptr;
for (int i=-RADI;i<RADI;++i) {
if (bss[i]==snap[i+RADI]+1){
ptr=&bss[i];
break;
}
}
if (ptr!=nullptr) {
*ptr=0;
int n = *(ptr-1);
if (n<=0) {
n=*(ptr+1);
}
return n;
}
}Compilation message (stderr)
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
