Submission #892840

# Submission time Handle Problem Language Result Execution time Memory
892840 2023-12-26T04:45:22 Z Sir_Ahmed_Imran Vision Program (IOI19_vision) C++17
0 / 100
1 ms 604 KB
                              ///~~~LOTA~~~///
#include "vision.h"
#include <bits/stdc++.h>
using namespace std;
#define nl '\n'
#define ff first
#define ss second
#define ll long long 
#define append push_back
#define pii pair<int,int>
#define all(x) (x).begin(),(x).end()
#define N 100001
void construct_network(int n,int m,int o){
    int p,q,r;
    int a[n*m];
    int b[n*m];
    vector<int> u,v;
    for(int i=0;i<n;i++){
        for(int j=0;j<m;j++){
            u={i*m+j};
            a[i*m+j]=add_or(u);
            u.clear();
            for(int k=0;k<n;k++){
                if(abs(i-k)>o || o-abs(i-k)>=m) continue;
                u.append(k*m+o-abs(i-k));
            }
            b[i*m+j]=add_or(u);
            u={a[i*m+j],b[i*m+j]};
            v.append(add_and(u));
            if(n*m>3500) return; 
        }
    }
    r=add_or(v);
}

Compilation message

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:14:9: warning: unused variable 'p' [-Wunused-variable]
   14 |     int p,q,r;
      |         ^
vision.cpp:14:11: warning: unused variable 'q' [-Wunused-variable]
   14 |     int p,q,r;
      |           ^
vision.cpp:14:13: warning: variable 'r' set but not used [-Wunused-but-set-variable]
   14 |     int p,q,r;
      |             ^
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB on inputs (0, 1), (0, 2), expected 0, but computed 1
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB on inputs (0, 1), (0, 2), expected 0, but computed 1
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB on inputs (0, 1), (0, 2), expected 0, but computed 1
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB on inputs (0, 1), (0, 2), expected 0, but computed 1
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB on inputs (0, 1), (0, 3), expected 0, but computed 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB on inputs (0, 0), (1, 1), expected 0, but computed 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 604 KB on inputs (80, 199), (81, 199), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB on inputs (0, 1), (0, 2), expected 0, but computed 1
3 Halted 0 ms 0 KB -