이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "vision.h"
#include <bits/stdc++.h>
using namespace std;
typedef int ll;
typedef pair<ll , ll> ii;
#define ff first
#define ss second
#define pb push_back
#define in insert
ii num(ll m, ll x){
return {x/m, x%m};
}
void construct_network(int H, int W, int K) {
ll n = H * W - 1;
vector < ll > a(n, 0);
ll tot = 0;
vector < ll > v;
for(ll i = 0; i < n - 1; i++){
ll t = add_not(i); t = 1 - t;
if(t) tot++, v.pb(i);
a[i] = t;
}
if(tot == 1) a[n - 1] = 1, v.pb(n - 1);
auto [x1, y1] = num(W, v[0]);
auto [x2, y2] = num(W, v[1]);
//cout << x1 << ' ' << y1 << ' ' << x2 << ' ' << y2 << '\n';
if(abs(x1 - x2) + abs(y1 - y2) == K){
vector < int > t = {v[0], v[1]};
add_and(t);
}else{
add_not(v[0]);
}
}
# | 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... |