Submission #834390

# Submission time Handle Problem Language Result Execution time Memory
834390 2023-08-22T13:55:19 Z Marco_Escandon Vision Program (IOI19_vision) C++17
0 / 100
1 ms 340 KB
#include<bits/stdc++.h>
using namespace std;
#include "vision.h"
typedef int ll;
void construct_network(int H, int W, int K) {
    vector<int> inst;
	for(int i=0; i<H; i++)
	{
	    for(int j=0; j<W; j++)
        {
            vector<ll> query;
            for(int l=-K-1; l<=K; l++)
            {
                if(i+l<H&& i+l>=0 && j+K-abs(l)<W)
                {
                    query.push_back((i+l)*W+ j+K-abs(l));
                    //cout<<(i+l)*W+ j+K-abs(l)<<" ";
                }
            }
            if(query.size()!=0)
            {
                ll a= query[0];
                if(query.size()!=1)
                    a=add_or(query);
                inst.push_back(add_and({(i*W+j),a}));
            }
            //cout<<"\n";
        }
	}
	ll a=add_or(inst);
}

Compilation message

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:31:5: warning: unused variable 'a' [-Wunused-variable]
   31 |  ll a=add_or(inst);
      |     ^
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Incorrect 1 ms 212 KB WA in grader: Invalid index
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Incorrect 1 ms 212 KB WA in grader: Invalid index
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Incorrect 1 ms 212 KB WA in grader: Invalid index
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Incorrect 1 ms 212 KB WA in grader: Invalid index
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Incorrect 0 ms 212 KB WA in grader: Invalid index
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Incorrect 0 ms 212 KB WA in grader: Invalid index
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 340 KB WA in grader: Invalid index
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Incorrect 1 ms 212 KB WA in grader: Invalid index
4 Halted 0 ms 0 KB -