# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1075101 | 2024-08-25T18:21:27 Z | Maite_Morale | 봉쇄 시간 (IOI23_closing) | C++17 | 113 ms | 32576 KB |
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define vi vector<int> #define vll vector<ll> #define pll pair<ll,ll> #define vpll vector<pll> #define MAX 500005 #define F first #define S second vpll v[MAX]; ll pass[MAX]; int max_score(int N, int X, int Y, long long K,vi U, vi V, vi W){ for(int i=0;i<=N;i++){v[i]={};pass[i]=0;} for(int i=0;i<V.size();i++){ v[V[i]].push_back({U[i],W[i]}); v[U[i]].push_back({V[i],W[i]}); } priority_queue<pll> q={};ll r=0; q.push({0,X});q.push({0,Y}); while(!q.empty()){ pll u=q.top();q.pop(); if(pass[u.S]==1)continue; pass[u.S]=1; // cout<<u.S<<" "<<u.F<<"\n"; if(K+u.F<0)continue; r++;K+=u.F; for(auto w : v[u.S]){ if(pass[w.F]!=1)q.push({u.F-w.S,w.F}); // if(pass[w.F]!=1)cout<<"\t"<<u.F-w.S<<" "<<w.F<<"\n"; } } return r; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 7 ms | 12124 KB | 1st lines differ - on the 1st token, expected: '6', found: '5' |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 113 ms | 28612 KB | Output is correct |
2 | Correct | 85 ms | 32576 KB | Output is correct |
3 | Correct | 40 ms | 17232 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 8 ms | 12120 KB | Output is correct |
2 | Incorrect | 6 ms | 12124 KB | 1st lines differ - on the 1st token, expected: '30', found: '17' |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 8 ms | 12120 KB | Output is correct |
2 | Incorrect | 6 ms | 12124 KB | 1st lines differ - on the 1st token, expected: '30', found: '17' |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 8 ms | 12120 KB | Output is correct |
2 | Incorrect | 6 ms | 12124 KB | 1st lines differ - on the 1st token, expected: '30', found: '17' |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 7 ms | 12124 KB | 1st lines differ - on the 1st token, expected: '6', found: '5' |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 7 ms | 12124 KB | 1st lines differ - on the 1st token, expected: '6', found: '5' |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 7 ms | 12124 KB | 1st lines differ - on the 1st token, expected: '6', found: '5' |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 7 ms | 12124 KB | 1st lines differ - on the 1st token, expected: '6', found: '5' |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 7 ms | 12124 KB | 1st lines differ - on the 1st token, expected: '6', found: '5' |
2 | Halted | 0 ms | 0 KB | - |