답안 #974711

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
974711 2024-05-03T16:46:33 Z NemanjaSo2005 Vision Program (IOI19_vision) C++17
14 / 100
17 ms 2164 KB
#include "vision.h"
#include<bits/stdc++.h>
#define ll long long
using namespace std;
int N,M,K,rxor[205],cxor[205],ror[205],cor[205];
vector<int> bigor;
int getbit(int x,int y){
   return (x-1)*M+(y-1);
}
void construct_network(int h, int w, int k){
	N=h;
	M=w;
	K=k;
	int aaa=add_or({0});
	int bbb=add_not({aaa});
	int zero=add_and({aaa,bbb});

	for(int i=1;i<=N;i++){
      vector<int> A;
      for(int j=1;j<=M;j++)
         A.push_back(getbit(i,j));
      rxor[i]=add_xor(A);
      ror[i]=add_or(A);
	}
	for(int j=1;j<=M;j++){
      vector<int> A;
      for(int i=1;i<=N;i++)
         A.push_back(getbit(i,j));
      cxor[j]=add_xor(A);
      cor[j]=add_or(A);
	}
	vector<int> rx,cx;
	for(int i=1;i<=N;i++)
      rx.push_back(ror[i]);
   int brr=add_xor(rx);
   for(int i=1;i<=M;i++)
      cx.push_back(cor[i]);
   int brc=add_xor(cx);

	vector<int> ra,ca;
	for(int i=2;i<=N;i++){
      ra.push_back(add_and({rxor[i],rxor[i-1]}));
	}
	int in2r;
	if(ra.size()==0)
      in2r=add_or({zero});
   else
      in2r=add_or(ra);

	for(int i=2;i<=M;i++){
      ca.push_back(add_and({cxor[i],cxor[i-1]}));
	}
	int in2c;
	if(ca.size()==0)
      in2c=add_or({zero});
   else
      in2c=add_or(ca);


	int u1=add_and({in2c,brr});
	int u2=add_and({in2r,brc});
	add_or({u1,u2});
}
# 결과 실행 시간 메모리 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 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 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 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 1 ms 344 KB Output is correct
2 Incorrect 1 ms 348 KB on inputs (0, 0), (0, 1), expected 0, but computed 1
3 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 17 ms 2164 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 2 ms 604 KB Output is correct
5 Correct 1 ms 348 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 7 ms 1200 KB Output is correct
8 Correct 7 ms 1116 KB Output is correct
9 Correct 15 ms 1884 KB Output is correct
10 Correct 0 ms 344 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
# 결과 실행 시간 메모리 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 -