# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
747054 | heeheeheehaaw | Chessboard (IZhO18_chessboard) | C++17 | 101 ms | 13604 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <iostream>
#include <vector>
using namespace std;
int a[1005][1005];
int spw[1005][1005], spb[1005][1005];
int main()
{
int n, k;
cin>>n>>k;
for(int i = 1; i <= k; i++)
{
int x1, y1, x2, y2;
cin>>x1>>y1>>x2>>y2;
a[x1][y1] = 1;
}
for(int i = 1; i <= n; i++)
for(int j = 1; j <= n; j++)
{
if(a[i][j] == 0) spw[i][j]++;
else spb[i][j]++;
spw[i][j] += spw[i][j - 1] + spw[i - 1][j] - spw[i - 1][j - 1];
spb[i][j] += spb[i][j - 1] + spb[i - 1][j] - spb[i - 1][j - 1];
}
vector<int> divs;
for(int i = 1; i * i <= n; i++)
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |