Submission #1021515

#TimeUsernameProblemLanguageResultExecution timeMemory
1021515vjudge1Vision Program (IOI19_vision)C++17
33 / 100
76 ms1240 KiB
#include "vision.h" #include <bits/stdc++.h> using namespace std; using ll = long long; using vll = vector <ll>; using vi = vector <int>; void construct_network (int h, int w, int k) { vi th; auto toLine = [&](ll i, ll j) { return i*w+j; }; for (ll i = 0; i < h; i++) { for (ll j = 0; j < w; j++) { for (ll i2 = 0; i2 < h; i2++) { for (ll j2 = 0; j2 < w; j2++) { if (abs(i-i2)+abs(j-j2) == k) { th.push_back(add_and({ toLine(i, j), toLine(i2, j2) })); } } } } } add_or(th); // for (ll i = 0; i < h+w; i++) { // cerr << freq[i]/2 << ' '; // } // cerr << '\n'; // cerr << ans/2 << '\n'; // vi 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); }

Compilation message (stderr)

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:16:54: warning: narrowing conversion of 'toLine.construct_network(int, int, int)::<lambda(ll, ll)>(i, j)' from 'long long int' to 'int' [-Wnarrowing]
   16 |                         th.push_back(add_and({ toLine(i, j), toLine(i2, j2) }));
      |                                                ~~~~~~^~~~~~
vision.cpp:16:54: warning: narrowing conversion of 'toLine.construct_network(int, int, int)::<lambda(ll, ll)>(i, j)' from 'long long int' to 'int' [-Wnarrowing]
vision.cpp:16:68: warning: narrowing conversion of 'toLine.construct_network(int, int, int)::<lambda(ll, ll)>(i2, j2)' from 'long long int' to 'int' [-Wnarrowing]
   16 |                         th.push_back(add_and({ toLine(i, j), toLine(i2, j2) }));
      |                                                              ~~~~~~^~~~~~~~
vision.cpp:16:68: warning: narrowing conversion of 'toLine.construct_network(int, int, int)::<lambda(ll, ll)>(i2, j2)' from 'long long int' to 'int' [-Wnarrowing]
#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...