Submission #633343

# Submission time Handle Problem Language Result Execution time Memory
633343 2022-08-22T06:59:18 Z minhcool 산악 구조대 (JOI13_mountain) C++17
0 / 100
5 ms 804 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;
      |                ~~~~~^~~
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 0 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Incorrect 0 ms 212 KB Wrong Answer [1]
12 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 5 ms 724 KB Output is correct
2 Correct 5 ms 796 KB Output is correct
3 Correct 4 ms 724 KB Output is correct
4 Correct 4 ms 724 KB Output is correct
5 Incorrect 4 ms 804 KB Wrong Answer [1]
6 Halted 0 ms 0 KB -