답안 #147456

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
147456 2019-08-29T15:21:52 Z Nucleist Vision Program (IOI19_vision) C++14
0 / 100
11 ms 1528 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);
     }
  } 
  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;
  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);
  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;
  result.pb(lasto),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:45:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for (int i = 1; i < indexcol.size(); ++i)
                   ~~^~~~~~~~~~~~~~~~~
vision.cpp:61:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for (int i = 1; i < indexrow.size(); ++i)
                   ~~^~~~~~~~~~~~~~~~~
vision.cpp:78:7: warning: unused variable 'rep' [-Wunused-variable]
   int rep = add_or(result);
       ^~~
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 256 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 256 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 256 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 256 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 376 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 256 KB Output is correct
2 Incorrect 2 ms 396 KB on inputs (0, 0), (0, 1), expected 0, but computed 1
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 11 ms 1528 KB Output is correct
2 Correct 2 ms 256 KB Output is correct
3 Correct 3 ms 376 KB Output is correct
4 Correct 4 ms 508 KB Output is correct
5 Incorrect 2 ms 400 KB WA in grader: Instruction with no inputs
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 256 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -