# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
673332 | 2022-12-20T08:41:18 Z | Cutebol | Chessboard (IZhO18_chessboard) | C++17 | 20 ms | 1268 KB |
#include <bits/stdc++.h> using namespace std; void fopn(string name){freopen((name+".in").c_str(),"r",stdin); freopen((name+".out").c_str(),"w",stdout);} #define Scaramouche ios_base::sync_with_stdio(0) ; cin.tie(0) ; cout.tie(0); #define int long long #define itn int #define endl "\n" #define ff first #define ss second const int N = 2e5 + 5 ; const int mod = 1e9 + 7 ; const int inf = 1e12 ; int n , k , m , sum ; int x[N] , y[N] , cnt1[2] ; void solve(){ cin >> n >> m ; int cnt[2] ; cnt[1] = n*n/2 , cnt[0] = (n*n+1)/2 ; for ( int i = 0 ; i < m ; i ++ ){ cin >> x[i] >> y[i] >> x[i] >> y[i] ; cnt[((x[i]%2)+(y[i]%2))%2] -- ; cnt1[((x[i]%2)+(y[i]%2))%2] ++ ; } cout << cnt[1] ; cerr << min ( cnt[0] + cnt1[1] , cnt[1] + cnt1[0] ) ; } signed main(){ // fopn("blocks") ; Scaramouche ; int t = 1 ; // cin >> t ; while ( t -- ) solve() ; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Incorrect | 1 ms | 212 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 20 ms | 1268 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 340 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 340 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 20 ms | 1268 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Incorrect | 1 ms | 212 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |