# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
796165 |
2023-07-28T07:17:54 Z |
이성호(#10070) |
Security Guard (JOI23_guard) |
C++17 |
|
102 ms |
5832 KB |
#include <iostream>
#include <vector>
using namespace std;
vector<int> adj[100005];
int S[100005];
int N, M, Q;
int main()
{
cin >> N >> M >> Q;
int cnt[2] = {};
for (int i = 1; i <= N; i++) {
cin >> S[i];
cnt[S[i]-1]++;
}
int t;
for (int i = 0; i < 2 * N - 2; i++) cin >> t;
cout << (N - 1) + max(cnt[1] - 1, 0) << '\n';
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2644 KB |
Output is correct |
2 |
Runtime error |
102 ms |
5832 KB |
Execution killed with signal 11 |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2644 KB |
Output is correct |
2 |
Runtime error |
102 ms |
5832 KB |
Execution killed with signal 11 |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2644 KB |
Output is correct |
2 |
Runtime error |
102 ms |
5832 KB |
Execution killed with signal 11 |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2644 KB |
Output is correct |
2 |
Runtime error |
102 ms |
5832 KB |
Execution killed with signal 11 |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
3 ms |
5204 KB |
Execution killed with signal 6 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
3 ms |
5204 KB |
Execution killed with signal 6 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2644 KB |
Output is correct |
2 |
Runtime error |
102 ms |
5832 KB |
Execution killed with signal 11 |
3 |
Halted |
0 ms |
0 KB |
- |