제출 #347025

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
3470252021-01-11 14:27:52andriiChessboard (IZhO18_chessboard)C++14
100 / 100
1016 ms15596 KiB
// -- //
#include <bits/stdc++.h>
#define pll pair<ll, ll>
#define ppll pair<pll, pll>
#define x first
#define y second
using namespace std;
typedef long long ll;
const ll N = 1e5+228;
ppll a[N];
vector<pll> add[N], del[N];
ll res, n, k;
inline void ch(ll m) __attribute__((always_inline));
inline void ch(ll m){
ll bob=0, bow=0;
//wbw
//bwb
ll no[2]={0};
bool fl=0;
ll kk=0;
for(ll i = 1;i<=n;i++, kk++){
for(auto &j : add[i]){
ll s = j.x, e = j.y;
--s, e--;
ll bs = s/m, be = e/m, bse = (bs+1)*m-1, bes = (be)*m;
if(bs==be) no[bs&1] += e-s+1;
else if(bs+1==be){
no[bs&1] += bse-s+1;
no[be&1] += e-bes+1;
}else{
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

컴파일 시 표준 에러 (stderr) 메시지

chessboard.cpp: In function 'void ch(ll)':
chessboard.cpp:19:10: warning: unused variable 'fl' [-Wunused-variable]
   19 |     bool fl=0;
      |          ^~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...