結果
問題 | No.92 逃走経路 |
ユーザー |
|
提出日時 | 2018-03-06 08:15:14 |
言語 | C++11 (gcc 11.4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,067 bytes |
コンパイル時間 | 923 ms |
コンパイル使用メモリ | 82,184 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-14 20:55:23 |
合計ジャッジ時間 | 1,458 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
ソースコード
#define _USE_MATH_DEFINES #define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<string> #include<iostream> #include<iostream> #include<cctype> #include<cstdio> #include<vector> #include<stack> #include<queue> #include <algorithm> #include<math.h> #include<set> #include<map> #include <sstream> #include<iomanip> #include <ctype.h> using namespace std; //#include<bits/stdc++.h> long long int f[105][105]; int main() { for (int i = 0; i <= 100; i++) { for (int j = 0; j <= 100; j++) { f[i][j] = 100000000000; } } int n, m, k; cout << 1; cin >> n >> m >> k; for (int i = 0; i < m; i++) { int a, b, c; cin >> a >> b >> c; f[a][b] = c; f[b][a] = c; } int x = n; bool g[105] = {}; for (int i = 0; i < k; i++) { int d; cin >> d; for (int i = 1; i <= n; i++) { if (g[i])continue; bool r = 1; for (int j = 0; j <= n; j++) { if (f[i][j] == d)r = 0; } if (r) { g[i] = 1; x--; } } } cout << x << endl; for (int i = 1; i <= n; i++) { if (g[i])continue; cout << i << " "; } cout << endl; return 0; }