QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#226559 | #1418. Mountain Rescue Team | keisuke6 | 0 | 1ms | 3544kb | C++14 | 1.4kb | 2023-10-26 06:40:46 | 2023-10-26 06:40:47 |
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%