답안 #336162

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
336162 2020-12-14T22:53:34 Z aryan12 Vision Program (IOI19_vision) C++17
12 / 100
1 ms 512 KB
#include "vision.h"
#include <bits/stdc++.h>
using namespace std;
const int N = 1e5;
int a[N];

void MakeItGood(int h, int w) {
    for(int i = 0; i < h * w - 1; i++) {
        a[i] = 0;
    }
}

/*int add_and(vector<int> x) {
    int ans = 1;
    for(int i = 0; i < x.size(); i++) {
        ans &= a[x[i]];
    }
    return ans;
}

int add_or(vector<int> x) {
    int ans = 0;
    for(int i = 0; i < x.size(); i++) {
        ans |= a[x[i]];
    }
    return ans;
}*/

void construct_network(int H, int W, int K) {
    //doing for 12 points
    int curPos = H * W;
    if(H > W)
        swap(H, W);
    /*for(int i = 0; i < H * W; i++) {
        cout << a[i];
    }
    cout << endl;*/
    vector<int> x;
    if(H == 1) {
        vector<int> lol;
        lol.push_back(0);
        lol.push_back(K);
        int z = 0;
        while(lol[1] < W) {
            x.push_back(add_and(lol));
            if(z == 1)
                break;
            lol[0]++;
            lol[1]++;
        }
        add_or(x);
        //cout << z << endl;
        return;
    }
	/*std::vector<int> Ns;
	Ns = {0, 1};
	int a = add_and(Ns);
	Ns = {0, a};
	int b = add_or(Ns);
	Ns = {0, 1, b};
	int c = add_xor(Ns);
	add_not(c);*/
}

/*int main() {
    int h, w, k;
    cin >> h >> w >> k;
    while(true) {
        int r1;
        cin >> r1;
        if(r1 == -1)
            break;
        int c1, r2, c2;
        cin >> c1 >> r2 >> c2;
        MakeItGood(h, w);
        a[r1 * w + c1] = 1;
        a[r2 * w + c2] = 1;
        construct_network(h, w, k);
    }
}*/

Compilation message

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:31:9: warning: unused variable 'curPos' [-Wunused-variable]
   31 |     int curPos = H * W;
      |         ^~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 492 KB Output is correct
4 Correct 1 ms 364 KB Output is correct
5 Incorrect 1 ms 364 KB Integer parameter [name=num_gates] equals to 0, violates the range [1, 10000]
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 492 KB Output is correct
4 Correct 1 ms 364 KB Output is correct
5 Incorrect 1 ms 364 KB Integer parameter [name=num_gates] equals to 0, violates the range [1, 10000]
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 492 KB Output is correct
4 Correct 1 ms 364 KB Output is correct
5 Incorrect 1 ms 364 KB Integer parameter [name=num_gates] equals to 0, violates the range [1, 10000]
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 492 KB Output is correct
4 Correct 1 ms 364 KB Output is correct
5 Incorrect 1 ms 364 KB Integer parameter [name=num_gates] equals to 0, violates the range [1, 10000]
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
4 Correct 1 ms 364 KB Output is correct
5 Correct 1 ms 364 KB Output is correct
6 Correct 1 ms 364 KB Output is correct
7 Correct 1 ms 492 KB Output is correct
8 Correct 1 ms 364 KB Output is correct
9 Correct 1 ms 364 KB Output is correct
10 Correct 1 ms 364 KB Output is correct
11 Correct 1 ms 512 KB Output is correct
12 Correct 1 ms 364 KB Output is correct
13 Correct 1 ms 364 KB Output is correct
14 Correct 1 ms 364 KB Output is correct
15 Correct 1 ms 364 KB Output is correct
16 Correct 1 ms 364 KB Output is correct
17 Correct 1 ms 364 KB Output is correct
18 Correct 1 ms 364 KB Output is correct
19 Correct 1 ms 364 KB Output is correct
20 Correct 1 ms 364 KB Output is correct
21 Correct 1 ms 364 KB Output is correct
22 Correct 1 ms 364 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 364 KB Integer parameter [name=num_gates] equals to 0, violates the range [1, 10000]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 364 KB Integer parameter [name=num_gates] equals to 0, violates the range [1, 10000]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 492 KB Output is correct
4 Correct 1 ms 364 KB Output is correct
5 Incorrect 1 ms 364 KB Integer parameter [name=num_gates] equals to 0, violates the range [1, 10000]
6 Halted 0 ms 0 KB -