제출 #202634

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
2026342020-02-17 11:37:51theStaticMindDesignated Cities (JOI19_designated_cities)C++14
39 / 100
1972 ms67488 KiB
#include<bits/stdc++.h>
#define pb push_back
#define ii pair<int,int>
#define all(x) (x).begin(),(x).end()
#define INF 100000000000000000
#define modulo 1000000007
#define mod 998244353
#define int long long int
using namespace std;
vector<int> adj[200005];
vector<int> val(200005);
vector<int> Ans(200005, 0);
vector<int> sub(200005, 1);
vector<int> anc(200005, 0);
vector<pair<ii, int> > V(200005);
vector<int> P(200005, 0);
vector<bool> mark(200005, false);
vector<bool> vis(200005, false);
unordered_map<int, int> cost;
ii Q = {-INF, -1};
int S = 0;
int _hash(ii a){
return a.first * 1e6 + a.second;
}
void dfs1(int x, int pre, int& v){
for(int i = 0; i < adj[x].size(); i++){
int y = adj[x][i];
if(y == pre) continue;
v += cost[_hash({y, x})];
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

designated_cities.cpp: In function 'void dfs1(long long int, long long int, long long int&)':
designated_cities.cpp:27:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for(int i = 0; i < adj[x].size(); i++){
                      ~~^~~~~~~~~~~~~~~
designated_cities.cpp: In function 'void dfs2(long long int, long long int, long long int)':
designated_cities.cpp:36:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for(int i = 0; i < adj[x].size(); i++){
                      ~~^~~~~~~~~~~~~~~
designated_cities.cpp: In function 'void dfs3(long long int, long long int)':
designated_cities.cpp:44:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for(int i = 0; i < adj[x].size(); i++){
                      ~~^~~~~~~~~~~~~~~
designated_cities.cpp: In function 'void dfs4(long long int, long long int, long long int, std::pair<long long int, long long int>&)':
designated_cities.cpp:55:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for(int i = 0; i < adj[x].size(); i++){
                      ~~^~~~~~~~~~~~~~~
designated_cities.cpp: In function 'void dfs5(long long int, long long int)':
designated_cities.cpp:62:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for(int i = 0; i < adj[x].size(); i++){
                      ~~^~~~~~~~~~~~~~~
designated_cities.cpp: In function 'long long int find_centroid(long long int, long long int, long long int)':
designated_cities.cpp:81:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for(int i = 0; i < adj[x].size(); i++){
                      ~~^~~~~~~~~~~~~~~
designated_cities.cpp: In function 'void solve(long long int)':
designated_cities.cpp:93:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for(int i = 0; i < adj[x].size(); i++){
                      ~~^~~~~~~~~~~~~~~
designated_cities.cpp:108:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for(int i = 0; i < adj[x].size(); i++){
                      ~~^~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...