# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
703632 | kinope | From Hacks to Snitches (BOI21_watchmen) | C++14 | 6059 ms | 291572 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define ff first
#define ss second
using namespace std;
typedef pair<int, int> pii;
struct info{
int x, k, mod;
info(){}
info(int x, int k, int mod) : x(x), k(k), mod(mod) {}
};void get(int &a){
char c = getchar_unlocked(); a = 0;
while(c<'0'||'9'<c) c = getchar_unlocked();
while('0'<=c&&c<='9') a = (a<<3)+(a<<1)+c-'0', c = getchar_unlocked();
}
int main(){
int n, m, a, b; get(n), get(m);
vector<vector<int>> g(n+1);
for(int i = 0; i < m; ++i) get(a), get(b), g[a].emplace_back(b), g[b].emplace_back(a);
int k; get(k);
vector<pii> ktcykl(n+1);
vector<int> sz(k+1); sz[0] = 1;
vector<vector<vector<int>>> dp(n+1);
for(int i = 1; i <= n; ++i) dp[i].resize(k+1);
for(int i = 1; i <= n; ++i) dp[i][0].emplace_back(2e09);
for(int i = 1; i <= k; ++i){
get(b), sz[i] = b;
for(int j = 1; j <= n; ++j) dp[j][i].resize(b, 2e09);
for(int j = 0; j < b; ++j) get(a), ktcykl[a] = pii(i, j);
}
queue<info> q;
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |