| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1280391 | jackofall718 | Square or Rectangle? (NOI19_squarerect) | C++20 | 1 ms | 340 KiB |
#include <bits/stdc++.h>
using namespace std;
extern bool inside_shape(int X, int Y);
bool am_i_square(int n, int Q) { // must use int, not long long
int start_x = -1;
int start_y = -1;
bool found = false;
for (int i = 1; i <= n; i++) {
for (int j = 1; j <= n; j++) {
if (inside_shape(i, j)) {
found = true;
start_x = i;
start_y = j;
break;
}
}
if (found) break;
}
bool check = true;
while (start_x <= n && start_y <= n) {
if (inside_shape(start_x + 1, start_y + 1)) {
start_x++;
start_y++;
} else {
check = false;
break;
}
}
return check;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
