답안 #892810

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
892810 2023-12-26T03:02:12 Z Sir_Ahmed_Imran Vision Program (IOI19_vision) C++17
0 / 100
4 ms 856 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 k){
    int p,q,r,s;
    r=n*m-1;
    vector<int> u,v;
    for(int i=0;i<n;i++){
        r++;
        u.clear();
        for(int j=0;j<m;j++)
            u.append(i*m+j);
        if(add_or(u)) v.append(i);
    }
    p=v[0];
    q=v.back();
    v.clear();
    if(k<q-p){
        u={0,1,2};
        s=add_and(u);
        return;
    }
    for(int i=0;i<m-k+q-p;i++){
        r++;
        u={p*m+i,q*m+i+k-q+p};
        s=add_and(u);
        v.append(r);
        r++;
        u={p*m+i+k-q+p,q*m+i};
        s=add_and(u);
        v.append(r);
    }
    s=add_or(v);
}

Compilation message

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:14:15: warning: variable 's' set but not used [-Wunused-but-set-variable]
   14 |     int p,q,r,s;
      |               ^
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Incorrect 0 ms 348 KB on inputs (0, 0), (1, 0), expected 1, but computed 0
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Incorrect 0 ms 348 KB on inputs (0, 0), (1, 0), expected 1, but computed 0
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Incorrect 0 ms 348 KB on inputs (0, 0), (1, 0), expected 1, but computed 0
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Incorrect 0 ms 348 KB on inputs (0, 0), (1, 0), expected 1, but computed 0
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Incorrect 1 ms 348 KB on inputs (0, 0), (2, 0), expected 1, but computed 0
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 348 KB on inputs (0, 0), (0, 1), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 4 ms 856 KB on inputs (80, 199), (81, 199), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Incorrect 0 ms 348 KB on inputs (0, 0), (1, 0), expected 1, but computed 0
4 Halted 0 ms 0 KB -