답안 #1111037

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1111037 2024-11-11T10:54:37 Z epicci23 Vision Program (IOI19_vision) C++17
12 / 100
2 ms 508 KB
#include "vision.h"
#include "bits/stdc++.h"
//#define int long long
#define all(v) v.begin() , v.end()
#define sz(a) (int)a.size()
using namespace std;

int N,M;

inline int get_ind(int a,int b){
  return a*M+b;
}

inline bool is_valid(int a,int b){
  return a>=0 && a<N && b>=0 && b<M;
}

void construct_network(int n, int m, int k){
  N=n,M=m;
  if(min(n,m)!=1){
  	vector<int> query;
  	int a = 0, b = k; 
  	for(int u=0;u<3*max(N,M);u++){
      if(is_valid(a,b)){
      	vector<int> xd;
      	xd.push_back(get_ind(0,0));
      	xd.push_back(get_ind(a,b));
      	query.push_back(add_and(xd));
      }
      a++,b--;
  	}
  	add_or(query);
  }
  if(n==1){
  	vector<int> query;
    for(int i=0;i+k<m;i++){
     vector<int> xd;
     xd.push_back(i);
     xd.push_back(i+k);
     query.push_back(add_and(xd));
    }
    add_or(query);
  }
  else{
    vector<int> query;
    for(int i=0;i+k<n;i++){
     vector<int> xd;
     xd.push_back(i);
     xd.push_back(i+k);
     query.push_back(add_and(xd));
    }
    add_or(query);
  }
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 336 KB Output is correct
2 Correct 1 ms 336 KB Output is correct
3 Correct 1 ms 336 KB Output is correct
4 Correct 1 ms 336 KB Output is correct
5 Incorrect 1 ms 336 KB on inputs (0, 0), (1, 0), expected 1, but computed 0
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 336 KB Output is correct
2 Correct 1 ms 336 KB Output is correct
3 Correct 1 ms 336 KB Output is correct
4 Correct 1 ms 336 KB Output is correct
5 Incorrect 1 ms 336 KB on inputs (0, 0), (1, 0), expected 1, but computed 0
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 336 KB Output is correct
2 Correct 1 ms 336 KB Output is correct
3 Correct 1 ms 336 KB Output is correct
4 Correct 1 ms 336 KB Output is correct
5 Incorrect 1 ms 336 KB on inputs (0, 0), (1, 0), expected 1, but computed 0
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 336 KB Output is correct
2 Correct 1 ms 336 KB Output is correct
3 Correct 1 ms 336 KB Output is correct
4 Correct 1 ms 336 KB Output is correct
5 Incorrect 1 ms 336 KB on inputs (0, 0), (1, 0), expected 1, but computed 0
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 504 KB Output is correct
2 Correct 1 ms 336 KB Output is correct
3 Correct 1 ms 336 KB Output is correct
4 Correct 1 ms 336 KB Output is correct
5 Correct 1 ms 336 KB Output is correct
6 Correct 1 ms 336 KB Output is correct
7 Correct 1 ms 336 KB Output is correct
8 Correct 1 ms 336 KB Output is correct
9 Correct 1 ms 336 KB Output is correct
10 Correct 1 ms 336 KB Output is correct
11 Correct 1 ms 336 KB Output is correct
12 Correct 1 ms 336 KB Output is correct
13 Correct 1 ms 508 KB Output is correct
14 Correct 1 ms 336 KB Output is correct
15 Correct 1 ms 336 KB Output is correct
16 Correct 1 ms 336 KB Output is correct
17 Correct 1 ms 336 KB Output is correct
18 Correct 1 ms 336 KB Output is correct
19 Correct 1 ms 336 KB Output is correct
20 Correct 1 ms 336 KB Output is correct
21 Correct 1 ms 336 KB Output is correct
22 Correct 1 ms 336 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 336 KB on inputs (0, 0), (1, 0), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 336 KB on inputs (80, 199), (81, 199), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 336 KB Output is correct
2 Correct 1 ms 336 KB Output is correct
3 Correct 1 ms 336 KB Output is correct
4 Correct 1 ms 336 KB Output is correct
5 Incorrect 1 ms 336 KB on inputs (0, 0), (1, 0), expected 1, but computed 0
6 Halted 0 ms 0 KB -