이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define ll long long int
#define pb push_back
#define ui unsigned int
#define ld long double
#define pl pair<long long int, long long int>
#define boost ios_base::sync_with_stdio(NULL);cin.tie(0);cout.tie(0);
#define ff first
#define ss second
using namespace std;
const ll maxn = 1e6 + 101;
// const ll inf = 1e17 + 9;
// const ll mod = 1e9 + 7;
// const double eps = 1e-10;
// const ll num = 4294967295;
void solve()
{
ll n, k;
cin >> n >> k;
for(ll i = 1; i <= k; i++){
ll x1, y1, x2, y2;
cin >> x1 >> y1 >> x2 >> y2;
}
ll ans = 0;
for(ll i = 1; i <= n; i++){
for(ll j = 1; j <= n; j++){
if(i % 2 == j % 2){
ans++;
}
}
}
cout << min(ans, n * n - ans);
}
int main()
{
solve();
}
# | 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... |