# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
197189 | junseo | 물탱크 (KOI18_watertank) | C++17 | 1020 ms | 91444 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define pb push_back
using namespace std;
typedef pair<int, int> pii;
const int maxn = 1010;
int n, m, k;
int d[maxn * maxn];
vector<pii> adj[maxn * maxn];
int get_idx(int i, int j) {
if(i == 0 || i == n+1 || j == 0 || j == m+1) return 0;
return (i - 1) * m + j;
}
int main(void) {
ios_base::sync_with_stdio(0); cin.tie(0);
cin >> n >> m >> k;
for(int i = 1; i <= n+1; ++i) {
for(int j = 1; j <= m; ++j) {
int now; cin >> now;
now = ~now ? now : 1e9 + 7;
int i1 = get_idx(i - 1, j), i2 = get_idx(i, j);
adj[i1].pb({i2, now});
adj[i2].pb({i1, now});
}
}
for(int i = 1; i <= n; ++i) {
for(int j = 1; j <= m+1; ++j) {
# | 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... |