Submission #633342

# Submission time Handle Problem Language Result Execution time Memory
633342 2022-08-22T06:58:42 Z minhcool 산악 구조대 (JOI13_mountain) C++17
Compilation error
0 ms 0 KB
#include "grader.h"
#include<bits/stdc++.h>
using namespace std;
 
//#define int long long
#define fi first
#define se second
#define pb push_back
#define mp make_pair
 
typedef pair<int, int> ii;
typedef pair<ii, int> iii;
typedef pair<ii, ii> iiii;
 
const int oo = 1e18 + 7, mod = 1e9 + 7;
 
const int N = 1e5 + 5;

void rescue(int R, int C, int Rm, int Cm, int X){
    int cur_itr = R;
    for(int i = Cm; i >= 1; i--){
        int temp = Measure(cur_itr, i);
        while(cur_itr >= Rm && temp < X){
            cur_itr--;
            if(cur_itr < Rm) break;
            temp = Measure(cur_itr, i);
        }
        if(cur_itr < Rm) break;
        if(temp == X){
            Pinpoint(cur_itr, i);
        }
    }
    cur_itr = 1;
    for(int i = Cm; i >= 1; i--){
        int temp = Measure(cur_itr, i);
        while(cur_itr <= Rm && temp < X){
            cur_itr++;
            if(cur_itr > Rm) break;
            temp = Measure(cur_itr, i);
        }
        if(cur_itr > Rm) break;
        if(temp == X){
            Pinpoint(cur_itr, i);
        }
    }
    cur_itr = R;
    for(int i = Cm; i <= C; i--){
        int temp = Measure(cur_itr, i);
        while(cur_itr >= Rm && temp < X){
            cur_itr--;
            if(cur_itr < Rm) break;
            temp = Measure(cur_itr, i);
        }
        if(cur_itr < Rm) break;
        if(temp == X){
            Pinpoint(cur_itr, i);
        }
    }
    cur_itr = 1;
    for(int i = Cm; i <= C; i++){
        int temp = Measure(cur_itr, i);
        while(cur_itr <= Rm && temp < X){
            cur_itr++;
            if(cur_itr > Rm) break;
            temp = Measure(cur_itr, i);
        }
        if(cur_itr > Rm) break;
        if(temp == X){
            Pinpoint(cur_itr, i);
        }
    }
}

Compilation message

mountain.cpp:15:21: warning: overflow in conversion from 'double' to 'int' changes value from '1.0e+18' to '2147483647' [-Woverflow]
   15 | const int oo = 1e18 + 7, mod = 1e9 + 7;
      |                ~~~~~^~~
/usr/bin/ld: /tmp/cciQ2YaO.o: in function `main':
grader.cpp:(.text.startup+0x151): undefined reference to `Rescue(int, int, int, int, int)'
collect2: error: ld returned 1 exit status