| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 16230 | eaststar | 탐사 (KOI13_probe) | C++14 | 3 ms | 376 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <stdio.h>
#include <algorithm>
using namespace std;
struct data{
int s,e,w;
}a[1010];
int ans[41];
int main(){
int i,j,k,n;
scanf("%d%d",&k,&n);
for(i=1;i<=n;++i){
scanf("%d%d%d",&a[i].s,&a[i].e,&a[i].w);
--a[i].s;
}
for(i=1;i<=k;++i)ans[i]=i;
for(i=1;i<=k;++i){
for(j=0;j<k;++j){
ans[j+1]=min(ans[j+1],ans[j]+1);
ans[j]=min(ans[j],ans[j+1]);
}
for(j=1;j<=n;++j){
ans[a[j].e]=min(ans[a[j].e],ans[a[j].s]+a[j].w);
ans[a[j].s]=min(ans[a[j].s],ans[a[j].e]-a[j].w);
}
}
for(i=1;i<=k;++i)if(ans[i]<0||ans[i]-ans[i-1]>1)break;
if(i>k)for(i=1;i<=k;++i)printf("%c",ans[i]-ans[i-1]?'#':'-');
else puts("NONE");
return 0;
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
