| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 16843 | gs14004 | 탐사 (KOI13_probe) | C++14 | 3 ms | 380 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <limits.h>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <algorithm>
#include <string>
#include <functional>
#include <vector>
#include <numeric>
#include <deque>
#include <utility>
#include <bitset>
#include <iostream>
using namespace std;
typedef long long lint;
typedef long double llf;
typedef pair<int, int> pi;
int adj[105][105];
int n, k;
map<pi, int> mp;
int main(){
scanf("%d %d",&n,&k);
memset(adj,0x3f,sizeof(adj));
for(int i=1; i<=n; i++){
adj[i][i+1] = 1;
adj[i+1][i] = 0;
}
for(int i=0; i<k; i++){
int s, e, x;
scanf("%d %d %d",&s,&e,&x);
if(mp.find(pi(s, e)) != mp.end()){
if(mp[pi(s, e)] != x){
puts("NONE");
return 0;
}
else continue;
}
mp[pi(s, e)] = x;
adj[s-1][e] = x;
}
for(int i=0; i<=n; i++){
for(int j=0; j<=n; j++){
for(int k=0; k<=n; k++){
adj[j][k] = min(adj[j][k], adj[j][i] + adj[i][k]);
}
}
}
for(int i=0; i<=n; i++){
if(adj[i][i] < 0){
puts("NONE");
return 0;
}
}
for(int i=1; i<=n; i++){
putchar(adj[i-1][i] ? '#' : '-');
}
}
컴파일 시 표준 에러 (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... | ||||
