제출 #291434

#제출 시각아이디문제언어결과실행 시간메모리
291434mohammadVision Program (IOI19_vision)C++14
0 / 100
3 ms1148 KiB
#include "vision.h" #include<bits/stdc++.h> using namespace std; #define endl "\n" // #define int long long typedef long long ll ; const ll ooo = 1e14 ; const ll oo = 2e9 ; const double PI = acos(-1) ; const ll M = 1e9 + 7 ; const int N = 10000010 ; map<pair<int , int> , int > mp , use; vector<pair<int,int>> v[410] ; int d[222][222] ; void construct_network(int H, int W, int K) { vector<int> Ns , f; // for(int i = 0 ; i < H ; ++i){ // for(int j = 0 ; j < W ; ++j){ // for(int l = 0 ; l <= K ; l++){ // int u = K - l ; // int nx = i + l , ny = j + u ; // int vl = i * W + j , vl1 = nx * W + ny; // if(min(nx , ny) >= 0 && nx < H && ny < W && !mp[{vl , vl1}]){ // mp[{vl , vl1}] = 1; // mp[{vl1 , vl}] = 1; // d[nx][ny]++; // d[i][j]++; // } // nx = i - l , ny = j + u; // vl1 = nx * W + ny; // if(min(nx , ny) >= 0 && nx < H && ny < W && !mp[{vl , vl1}]){ // mp[{vl , vl1}] = 1; // mp[{vl1 , vl}] = 1; // d[nx][ny]++; // d[i][j]++; // } // nx = i - l , ny = j - u; // vl1 = nx * W + ny; // if(min(nx , ny) >= 0 && nx < H && ny < W && !mp[{vl , vl1}]){ // mp[{vl , vl1}] = 1; // mp[{vl1 , vl}] = 1; // d[nx][ny]++; // d[i][j]++; // } // nx = i + l , ny = j - u; // vl1 = nx * W + ny; // if(min(nx , ny) >= 0 && nx < H && ny < W && !mp[{vl , vl1}]){ // mp[{vl , vl1}] = 1; // mp[{vl1 , vl}] = 1; // d[nx][ny]++; // d[i][j]++; // } // } // } // } int mx = 0 ; for(int i = 0 ; i < H ; ++i) for(int j = 0 ; j < W ; ++j){ int a = add_not(i * W + j); f.push_back(a); // v[d[i][j]].push_back({i , j}); // mx = max(mx , d[i][j]); } // for(int k = mx ; k ; --k){ // while(v[k].size()){ // int i = v[k].back().first , j = v[k].back().second; // v[k].erase(v[k].begin() + v[k].size() - 1); // if(d[i][j] != k) { // if(d[i][j] > 0) v[d[i][j]].push_back({i , j}); // continue ; // } // int vl = i * W + j; // Ns.clear(); // for(int l = 0 ; l <= K ; l++){ // int u = K - l ; // int nx = i + l , ny = j + u ; // int vl1 = nx * W + ny; // if(min(nx , ny) >= 0 && nx < H && ny < W && !use[{vl,vl1}]){ // use[{vl,vl1}] = 1; // use[{vl1,vl}] = 1; // d[nx][ny]--; // if(d[i][j] <= 2){ // Ns = {vl , vl1}; // int a = add_and(Ns); // f.push_back(a); // }else{ // Ns.push_back(vl1); // } // } // nx = i - l , ny = j + u; // vl1 = nx * W + ny; // if(min(nx , ny) >= 0 && nx < H && ny < W && !use[{vl,vl1}]){ // use[{vl,vl1}] = 1; // use[{vl1,vl}] = 1; // if(d[i][j] <= 2){ // Ns = {vl , vl1}; // int a = add_and(Ns); // f.push_back(a); // }else{ // Ns.push_back(vl1); // } // d[nx][ny]--; // } // nx = i - l , ny = j - u; // vl1 = nx * W + ny; // if(min(nx , ny) >= 0 && nx < H && ny < W && !use[{vl,vl1}]){ // use[{vl,vl1}] = 1; // use[{vl1,vl}] = 1; // if(d[i][j] <= 2){ // Ns = {vl , vl1}; // int a = add_and(Ns); // f.push_back(a); // }else{ // Ns.push_back(vl1); // } // d[nx][ny]--; // } // nx = i + l , ny = j - u; // vl1 = nx * W + ny; // if(min(nx , ny) >= 0 && nx < H && ny < W && !use[{vl,vl1}]){ // use[{vl,vl1}] = 1; // use[{vl1,vl}] = 1; // if(d[i][j] <= 2){ // Ns = {vl , vl1}; // int a = add_and(Ns); // f.push_back(a); // }else{ // Ns.push_back(vl1); // } // d[nx][ny]--; // } // } // if(d[i][j] > 2){ // int a = add_or(Ns); // Ns = {vl , a}; // a = add_and(Ns); // f.push_back(a); // } // d[i][j] = 0; // } // } add_or(f); return ; } // freopen("C:\\Users\\mhmdsa\\Documents\\c++\\input.txt" , "r" , stdin ); // freopen("C:\\Users\\mhmdsa\\Documents\\c++\\output.txt" , "w" , stdout );

컴파일 시 표준 에러 (stderr) 메시지

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:60:6: warning: unused variable 'mx' [-Wunused-variable]
   60 |  int mx = 0 ;
      |      ^~
#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...