Submission #282829

#TimeUsernameProblemLanguageResultExecution timeMemory
282829muhammad_hokimiyonVision Program (IOI19_vision)C++14
0 / 100
469 ms1956 KiB
#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 (stderr)

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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...