#include "vision.h"
#include <bits/stdc++.h>
#pragma GCC optimize("O3", "Ofast")
#define ll long long
#define se second
#define fi first
#define pb push_back
#define lf (id<<1)
#define rg ((id<<1)|1)
#define md ((l+r)>>1)
using namespace std;
typedef pair<int,int> pii;
typedef pair<pii,pii> ipii;
const int MAXN = 5e5+100;
const int MAXA = 2e5+10;
const int SQRT = 450;
const ll INF = 2e9;
const int MOD = 998244353;
const int LOG = 60;
ll sum(auto a, auto b){
ll te = a+MOD+b;
for(; te >= MOD; ) te -= MOD;
return te;
}
void chsum(int &a, auto b){ a = sum(a,b); }
ll mul(auto a, auto b){ return 1ll*a*b%MOD; }
void chmul(auto &a, auto b){ a = mul(a,b); }
void chmn(auto &a, auto b){ a = min(a, b); }
void chmx(auto &a, auto b){ a = max(a, b); }
int h, w, k;
int row, col, r[MAXN], c[MAXN];
void construct_network(int H, int W, int K) {
h = H; w = W; k = K;
// bikin per row, jarak row
row = h*w;
for(int i=0; i<h; i++){
vector<int> vec;
for(int j=0; j<w; j++) vec.pb(i*w+j);
int las = add_or(vec);
}
col = -1;
for(int i=0; i<w; i++){
vector<int> vec;
for(int j=0; j<h; j++) vec.pb(j*w+i);
int las = add_or(vec);
if(col == -1) col = las;
}
vector<int> rows;
for(int i=0; i+1<h; i++){
vector<int> vec = {row+i, row+i+1};
rows.pb(add_and(vec));
}
int nxr = add_or(rows);
vector<int> cols;
for(int i=0; i+1<w; i++){
vector<int> vec = {col+i, col+i+1};
cols.pb(add_and(vec));
}
int nxc = add_or(cols);
int nx = add_or({nxr, nxc});
vector<int> all;
for(int i=0; i<h; i++) all.pb(row+i);
for(int i=0; i<w; i++) all.pb(col+i);
int ALL = add_xor(all);
add_and({nx, ALL});
}
| # | 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... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |