답안 #1026205

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1026205 2024-07-17T17:16:32 Z HD1 Vision Program (IOI19_vision) C++14
0 / 100
12 ms 1880 KB
#include "vision.h"
#include<bits/stdc++.h>
#define sz(x) ll(x.size())
#define all(x) x.begin(),x.end()
#define pb push_back
#define ff first
#define ss second
using namespace std;
typedef long long ll;
typedef pair<ll,ll> ii;
const ll MAX=1e6;
int n, m, k;
vector<int>s,p,q;
void construct_network(int H, int W, int K){
	n=H;
	m=W;
	k=K;
	for(int j=0; j<m; j++){
		for(int i=0; i<n; i++){
			p.pb(i*m+j);
		}
        q.pb(add_or(p));
        p.clear();
	}
    for(int i=0; i<sz(q)-1; i++){
        p.pb(q[i]);
        p.pb(q[i+1]);
        s.pb(add_and(p));
        p.pop_back();
        p.pop_back();
    }
    int pos=add_or(s);//si hay 2 juntitos columnas
    s.clear();
    p.clear();
    q.clear();

    // esto dbe xor 1 si estan en la misma fila
    for(int i=0; i<n; i++){
        for(int j=0; j<m; j++){
            p.pb(i*m+j);
        }
        q.pb(add_or(p));
        p.clear();
    }
	s.pb(add_xor(q));
    s.pb(pos);
    int a=add_and(s);

    s.clear();
    p.clear();
    q.clear();

    for(int i=0; i<n; i++){
        for(int j=0; j<m; j++){
            p.pb(i*m+j);
        }
        q.pb(add_or(p));
        p.clear();
    }
    for(int i=0; i<sz(q)-1; i++){
        p.pb(q[i]);
        p.pb(q[i+1]);
        s.pb(add_and(p));
        p.pop_back();
        p.pop_back();
    }
    pos=add_or(s);//si hay 2 juntitos en la misma fila
    s.clear();
    p.clear();
    q.clear();

    // esto dbe xor 1 si estan en la misma columna
    for(int j=0; j<m; j++){
        for(int i=0; i<n; i++){
            p.pb(i*m+j);
        }
        q.pb(add_or(p));
        p.clear();
    }
    s.pb(add_xor(q));
    s.pb(pos);
    int b=add_and(s);
    add_or({b,a});
	return;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 344 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB on inputs (0, 0), (0, 1), expected 0, but computed 1
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 12 ms 1880 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 2 ms 692 KB Output is correct
5 Incorrect 0 ms 348 KB WA in grader: Instruction with no inputs
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -