Submission #282829

# Submission time Handle Problem Language Result Execution time Memory
282829 2020-08-25T03:54:24 Z muhammad_hokimiyon Vision Program (IOI19_vision) C++14
0 / 100
469 ms 1956 KB
#include "vision.h"
#include <bits/stdc++.h>

using namespace std;

int dist( int x1 , int y1 , int x2 , int y2 )
{
    return abs(x1 - x2) + abs(y1 - y2);
}

void construct_network(int H, int W, int K)
{
    int n = H;
    int m = W;
    vector < pair < int , int > > ask;
	for( int i = 0; i < n; i++ ){
        for( int j = 0; j < m; j++ ){
            for( int h = i; h < n; h++ ){
                for( int g = j; g < m; g++ ){
                    int x = dist( i , j , h , g );
                    if( x == K ){
                        ask.push_back({ i * m + j , h * m + g });
                    }
                }
            }
        }
	}
	vector < int > res;
	int cur = n * m;
	for( auto x : ask ){
        vector < int > g;
        g.push_back(x.first);
        g.push_back(x.second);
        res.push_back( add_and( g ) );
	}
    vector < int > g;
    for( int i = cur; i < cur + (int)g.size(); i++ )g.push_back(i);
	int ans = add_or( g );
}

Compilation message

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:38:6: warning: unused variable 'ans' [-Wunused-variable]
   38 |  int ans = add_or( g );
      |      ^~~
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 256 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 256 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 256 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 256 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 384 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 256 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 469 ms 1956 KB WA in grader: Too many instructions
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 256 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -