제출 #28637

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
286372017-07-16 08:15:21Official Fan of ACG (#68)Alternative Mart (FXCUP2_mart)C++14
1 / 1
3349 ms39448 KiB
#include<cstdio>
#include<algorithm>
#include<queue>
#include<functional>
#include<set>
#include<iterator>
using namespace std;
const int INF = 0x3fFFffFF;
const int NMAX = 50000, KMAX = 11;
typedef pair<int, int> pii;
typedef pair<pii, int> tri;
set<pii> dp[NMAX + 1];
vector<pii> g[NMAX + 1];
vector<int> S;
int main() {
int N, M, K, Q; scanf("%d%d%d%d", &N, &M, &K, &Q);
for (int i = 0; i < K; i++) {
int x; scanf("%d", &x); S.push_back(x);
}
for (int i = 0; i < M; i++) {
int u, v, w; scanf("%d%d%d", &u, &v, &w);
g[u].push_back({ v,w });
g[v].push_back({ u,w });
}
priority_queue<tri, vector<tri>, greater<tri>> pq;
for (int s : S) {
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

컴파일 시 표준 에러 (stderr) 메시지

mart.cpp: In function 'int main()':
mart.cpp:18:51: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  int N, M, K, Q; scanf("%d%d%d%d", &N, &M, &K, &Q);
                                                   ^
mart.cpp:20:25: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   int x; scanf("%d", &x); S.push_back(x);
                         ^
mart.cpp:24:43: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   int u, v, w; scanf("%d%d%d", &u, &v, &w);
                                           ^
mart.cpp:66:36: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   int st, X; scanf("%d%d", &st, &X);
                                    ^
mart.cpp:69:26: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
    int f; scanf("%d", &f); fails.insert(f);
                          ^
#Verdict Execution timeMemoryGrader output
Fetching results...