| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 645621 | Kiarat | Chessboard (IZhO18_chessboard) | C++17 | 62 ms | 212 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
 
using namespace std;
typedef long long ll;
ll a[100001 * 4];
int main()
{
   ll n,k;
   cin >> n >> k;
   ll oo = 0;
   ll qwe = 0;
    if(n % 2 == 0)
        oo =  n / 2 * n;
    else if(n % 2 == 1)
        qwe = n / 2 * n + (n/2);
   
   if(k == 0)
    {
    if(n % 2 == 0)
        cout <<   n / 2 * n;
    else if(n % 2 == 1)
        cout << n / 2 * n + (n/2);
    }
   else
   {
    ll ans = 0,sum = 0,cnt = 0,ss = 0,ww = 0;
    ll x = k;
    while(k--)
    {
        ll x1,y1,x2,y2;
        cin >> x1 >> y1 >> x2 >> y2;
        if(x1 == x2 && y1 == y2)
        {
            if(x1 % 2 == 1 && x1 % 2 == y1 % 2)
                ss++;
            else if(x1 % 2 == 0 && x1 % 2 == y1 % 2)
            {
                ss++;
            }
        }
    }
    ww = x - ss;
    ans = oo - ss + ww;
    sum = qwe - ww + ss;
    cout << min(ans,sum);
   }
}
/// cout << fixes << serprecision(x) << " "
컴파일 시 표준 에러 (stderr) 메시지
| # | 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... | ||||
