답안 #147459

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
147459 2019-08-29T15:26:00 Z Nucleist Vision Program (IOI19_vision) C++14
0 / 100
4 ms 1144 KB
#include <bits/stdc++.h> 
#include "vision.h"
using namespace std; 
#define flash ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0)
#define debug(x) cerr << " - " << #x << ": " << x << endl;
#define debugs(x, y) cerr << " - " << #x << ": " << x << " " << #y << ": " << y << endl;
#define all(x) (x).begin(),(x).end()
#define sz(x) (ll)x.size()
#define ll long long
#define INF 1000000000
#define pb push_back
struct greateri
{
    template<class T>
    bool operator()(T const &a, T const &b) const { return a > b; }
};
map<pair<int,int>,int>gg;
void construct_network(int H,int W,int K)
{
  //flash;
  vector<int>cols[W];
  vector<int>rows[H];
  for (int i = 0; i < H; ++i)
  {
     for (int j = 0; j < W; ++j)
     {
       int cell=i*W+j;
       cols[j].pb(cell);
       rows[i].pb(cell);
     }
  } 
  int lasto,lasto1;
  bool ka=false,ka1=false;
  vector<int>indexcol;
  for (int i = 0; i < W; ++i)
  {
  	int last = add_xor(cols[i]);
  	indexcol.pb(last);
  }
  vector<int>indexrow;
  for (int i = 0; i < H; ++i)
  {
  	int last = add_xor(rows[i]);
  	indexrow.pb(last);
  }
  vector<int>lasti;
  if(indexcol.size()>=2)
  {
  	ka=true;
  	for (int i = 1; i < indexcol.size(); ++i)
  {
  	vector<int>now;
  	now.pb(indexcol[i]);
  	now.pb(indexcol[i]-1);
  	int yo = add_and(now);
  	lasti.pb(yo);
  }
  int doi = add_or(lasti);
  int kol = add_or(indexrow);
  int zol = add_not(doi);
  vector<int>hey;
  hey.pb(zol),hey.pb(kol);
  int fo = add_or(hey);
  int lasto = add_not(fo);}
  if(indexrow.size()>=2)
  {
  	ka1=true;
  	vector<int>lasti1;
  for (int i = 1; i < indexrow.size(); ++i)
  {
  	vector<int>now;
  	now.pb(indexrow[i]);
  	now.pb(indexrow[i]-1);
  	int yo = add_and(now);
  	lasti1.pb(yo);
  }
  int doi1 = add_or(lasti1);
  int kol1 = add_or(indexcol);
  int zol1 = add_not(doi1);
  vector<int>hey1;
  hey1.pb(zol1),hey1.pb(kol1);
  int fo1 = add_or(hey1);
  int lasto1 = add_not(fo1);}
  vector<int>result;
  if(ka)
  result.pb(lasto);
  if(ka1)
  result.pb(lasto1);
  int rep = add_or(result);
    //int xo = add_not(doi);
  return;
}
//code the AC sol !
// BS/queue/map

Compilation message

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:50:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    for (int i = 1; i < indexcol.size(); ++i)
                    ~~^~~~~~~~~~~~~~~~~
vision.cpp:64:7: warning: unused variable 'lasto' [-Wunused-variable]
   int lasto = add_not(fo);}
       ^~~~~
vision.cpp:69:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for (int i = 1; i < indexrow.size(); ++i)
                   ~~^~~~~~~~~~~~~~~~~
vision.cpp:83:7: warning: unused variable 'lasto1' [-Wunused-variable]
   int lasto1 = add_not(fo1);}
       ^~~~~~
vision.cpp:89:7: warning: unused variable 'rep' [-Wunused-variable]
   int rep = add_or(result);
       ^~~
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 256 KB on inputs (0, 0), (0, 1), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 256 KB on inputs (0, 0), (0, 1), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 256 KB on inputs (0, 0), (0, 1), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 256 KB on inputs (0, 0), (0, 1), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 376 KB on inputs (0, 0), (0, 1), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 376 KB WA in grader: Invalid index
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 4 ms 1144 KB WA in grader: Invalid index
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 256 KB on inputs (0, 0), (0, 1), expected 1, but computed 0
2 Halted 0 ms 0 KB -