This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "vision.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef pair<int,int> pi;
typedef pair<ll,ll> pl;
#define F first
#define S second
#define endl '\n'
#define all(x) (x).begin(),(x).end()
#ifdef dremix
#define p(x) cerr<<#x<<" = "<<x<<endl;
#define p2(x,y) cerr<<#x<<" , "<<#y<<" = "<<x<<" , "<<y<<endl;
#define pp(x) cerr<<#x<<" = ("<<x.F<<" , "<<x.S<<")"<<endl;
#define pv(x) cerr<<#x<<" = {";for(auto u : x)cerr<<u<<", ";cerr<<"}"<<endl;
#define ppv(x) cerr<<#x<<" = {";for(auto u : x)cerr<<u.F<<"-"<<u.S<<", ";cerr<<"}"<<endl;
#else
#define p(x)
#define p2(x,y)
#define pp(x)
#define pv(x)
#define ppv(x)
#endif
#define fastio ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
const int maxp = 22;
const ld EPS = 1e-18;
const ll INF = 1e18;
const int MOD = 1e9+7;
int N,M;
bool valid(int i, int j){
return (i>=0 && i<N && j>=0 && j<M);
}
void construct_network(int n, int m, int k) {
N = n;
M = m;
int arr[n][m];
int i,j,di;
//int temp = add_not(0);
vector<int> asks;
for(i=0;i<n;i++)
for(j=0;j<m;j++){
vector<int> idx;
idx.push_back(i*m+j);
for(di=0;di<=k;di++){
int dj = k - di;
if(valid(i+di,j+dj))
idx.push_back((i+di)*m+j+dj);
//if(dj && valid(i+di,j-dj))
// idx.push_back((i+di)*m+j-dj);
}
p2(i,j)
pv(idx)
asks.push_back(add_xor(idx));
asks.push_back(add_or(idx));
}
pv(asks)
vector<int> fin;
for(i=0;i<asks.size();i+=2)
fin.push_back(add_xor({asks[i],asks[i+1]}));
pv(fin)
int temp = add_or(fin);
return;
}
Compilation message (stderr)
vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:65:14: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
65 | for(i=0;i<asks.size();i+=2)
| ~^~~~~~~~~~~~
vision.cpp:41:6: warning: unused variable 'arr' [-Wunused-variable]
41 | int arr[n][m];
| ^~~
vision.cpp:68:9: warning: unused variable 'temp' [-Wunused-variable]
68 | int temp = add_or(fin);
| ^~~~
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |