# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
7413 | 2014-08-05T04:31:12 Z | gs13068 | 탐사 (KOI13_probe) | C++ | 2 ms | 376 KB |
#include<cstdio> int a[41][41]; int main() { int x,y,r; int i,j,k,n,m; scanf("%d%d",&n,&m); for(i=0;i<=n;i++)for(j=0;j<=n;j++)if(i!=j)a[i][j]=1e9; for(i=0;i<n;i++) { a[i][i+1]=1; a[i+1][i]=0; } for(i=0;i<m;i++) { scanf("%d%d%d",&x,&y,&r); if(a[x-1][y]>r)a[x-1][y]=r; if(a[y][x-1]>-r)a[y][x-1]=-r; } for(k=0;k<=n;k++)for(i=0;i<=n;i++)for(j=0;j<=n;j++)if(a[i][j]>a[i][k]+a[k][j])a[i][j]=a[i][k]+a[k][j]; for(k=0;k<=n;k++)for(i=0;i<=n;i++)for(j=0;j<=n;j++)if(a[i][j]>a[i][k]+a[k][j]) { puts("NONE"); return 0; } for(i=1;i<=n;i++)putchar(a[0][i]-a[0][i-1]?'#':'-'); }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 256 KB | Output is correct |
2 | Correct | 2 ms | 256 KB | Output is correct |
3 | Correct | 2 ms | 256 KB | Output is correct |
4 | Correct | 2 ms | 348 KB | Output is correct |
5 | Correct | 2 ms | 376 KB | Output is correct |
6 | Correct | 2 ms | 256 KB | Output is correct |
7 | Correct | 2 ms | 256 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 256 KB | Output is correct |
2 | Correct | 2 ms | 376 KB | Output is correct |
3 | Correct | 2 ms | 348 KB | Output is correct |
4 | Correct | 2 ms | 256 KB | Output is correct |
5 | Correct | 2 ms | 256 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | Output is correct |
2 | Correct | 2 ms | 256 KB | Output is correct |
3 | Correct | 2 ms | 256 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | Output is correct |
2 | Correct | 2 ms | 348 KB | Output is correct |
3 | Incorrect | 2 ms | 128 KB | Output isn't correct |
4 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 256 KB | Output is correct |
2 | Correct | 2 ms | 256 KB | Output is correct |
3 | Correct | 2 ms | 376 KB | Output is correct |
4 | Correct | 2 ms | 296 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 256 KB | Output is correct |
2 | Correct | 2 ms | 256 KB | Output is correct |
3 | Correct | 2 ms | 252 KB | Output is correct |
4 | Correct | 2 ms | 256 KB | Output is correct |