# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
960311 |
2024-04-10T08:35:00 Z |
Alfraganus |
Mars (APIO22_mars) |
C++17 |
|
1 ms |
352 KB |
#include "mars.h"
// #include "grader.cpp"
#include <bits/stdc++.h>
using namespace std;
#define str string
str process(vector<vector<str>> a, int i, int j, int k, int n){
vector<vector<bool>> used(3, vector<bool> (3));
queue<array<int, 2>> q;
int ans = 0;
for(int i = 0; i < 3; i ++)
for(int j = 0; j < 3; j ++){
if(!used[i][j]){
q.push({i, j});
used[i][j] = true;
ans ++;
while(!q.empty()){
array<int, 2> x = q.front();
q.pop();
int dx[4] = {-1, -1, 1, 1};
int dy[4] = {-1, 1, -1, 1};
for(int p = 0; p < 4; p ++){
int new_x = x[0] + dx[p], new_y = x[1] + dy[p];
if(0 <= new_x and new_x <= 3 and 0 <= new_y and new_y <= 3){
if(!used[new_x][new_y]){
used[new_x][new_y] = 1;
q.push({new_x, new_y});
}
}
}
}
}
}
str h = "";
for(int i = 0; i < 100; i ++)
h += ans % 2 + '0', ans >>= 1;
return h;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
352 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
352 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
352 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
352 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
352 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
352 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
352 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
352 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
352 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
352 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |