QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#226559#1418. Mountain Rescue Teamkeisuke60 1ms3544kbC++141.4kb2023-10-26 06:40:462023-10-26 06:40:47

Judging History

你现在查看的是最新测评结果

  • [2023-10-26 06:40:47]
  • 评测
  • 测评结果:0
  • 用时:1ms
  • 内存:3544kb
  • [2023-10-26 06:40:46]
  • 提交

answer

#include <bits/stdc++.h>
#include "grader.h"
using namespace std;
void Rescue(int H, int W, int x, int y, int X){
    x--;
    y--;
    int l = x, r = x;
    int aa = 0, bb = 0;
    while(r != W-1){
        r++;
        int a = Measure(x+1,r+1);
        if(a < X){
            r--;
            break;
        }
        else if(a == X){
            Pinpoint(x+1,r+1);
        }
    }
    while(l){
        l--;
        int a = Measure(x+1,r+1);
        if(a < X){
            l++;
            break;
        }
        else if(a == X){
            Pinpoint(x+1,l+1);
        }
    }
    if(l == r) Pinpoint(x+1,l+1);
    int ll = l, rr = r;
    for(int i=x-1;i>=0;i--){
        while(l <= r){
            int a = Measure(i+1,l+1);
            if(a > X) break;
            else if(a == X) Pinpoint(i+1,l+1);
            l++;
        }
        while(l <= r){
            int a = Measure(i+1,r+1);
            if(a > X) break;
            else if(a == X) Pinpoint(i+1,r+1);
            r--;
        }
    }
    l = ll, r = rr;
    for(int i=x+1;i<H;i++){
        while(l <= r){
            int a = Measure(i+1,l+1);
            if(a > X) break;
            else if(a == X) Pinpoint(i+1,l+1);
            l++;
        }
        while(l <= r){
            int a = Measure(i+1,r+1);
            if(a > X) break;
            else if(a == X) Pinpoint(i+1,r+1);
            r--;
        }
    }
}

詳細信息

Subtask #1:

score: 0
Runtime Error

Test #1:

score: 20
Accepted
time: 1ms
memory: 3532kb

input:

1 1 1 1 1
1

output:

Accepted

Test #2:

score: 0
Accepted
time: 0ms
memory: 3496kb

input:

2 2 2 2 1
1 2
3 4

output:

Accepted

Test #3:

score: 0
Accepted
time: 0ms
memory: 3544kb

input:

2 2 2 2 2
1 2
3 4

output:

Accepted

Test #4:

score: -20
Runtime Error

input:

2 2 2 2 3
1 2
3 4

output:

Unauthorized output

Subtask #2:

score: 0
Skipped

Dependency #1:

0%