Submission #498250

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
4982502021-12-24 17:05:51XIIRace (IOI11_race)C++17
100 / 100
402 ms33072 KiB
#include <bits/stdc++.h>
#include <race.h>
using namespace std;
using ll = long long;
#define fi first
#define se second
#define mp make_pair
#define eb emplace_back
#define ALL(x) (x).begin(), (x).end()
#define FOR(i, a, b) for(int i = (a); i < (b); ++i)
#define FORU(i, a, b) for(int i = (a); i <= (b); ++i)
#define FORD(i, a, b) for(int i = (a); i >= (b); --i)
//#define IOS cin.tie(0)->sync_with_stdio(false);
//#define PROB "IOI11_race"
//void Fi(){
// if(fopen(PROB".inp", "r")){
// freopen(PROB".inp", "r", stdin);
// freopen(PROB".out", "w", stdout);
// }
//}
const int INF = 1e9;
const int N = 2e5 + 1;
const int K = 1e6 + 1;
vector<int> adj[N], wei[N];
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

race.cpp: In function 'int bfs(int)':
race.cpp:13:41: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   13 | #define FOR(i, a, b) for(int i = (a); i < (b); ++i)
      |                                         ^
race.cpp:47:9: note: in expansion of macro 'FOR'
   47 |         FOR(i, 0, adj[u].size()){
      |         ^~~
race.cpp: In function 'void dfs(int)':
race.cpp:13:41: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   13 | #define FOR(i, a, b) for(int i = (a); i < (b); ++i)
      |                                         ^
race.cpp:80:5: note: in expansion of macro 'FOR'
   80 |     FOR(i, 0, adj[c].size()){
      |     ^~~
race.cpp:13:41: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   13 | #define FOR(i, a, b) for(int i = (a); i < (b); ++i)
      |                                         ^
race.cpp:84:5: note: in expansion of macro 'FOR'
   84 |     FOR(i, 0, adj[c].size()){
      |     ^~~
race.cpp: In function 'int bfs(int)':
race.cpp:39:9: warning: 'cur' may be used uninitialized in this function [-Wmaybe-uninitialized]
   39 |     int cur, top = 0;
      |         ^~~
race.cpp: In function 'int properCentroid(int)':
race.cpp:69:12: warning: 'c' may be used uninitialized in this function [-Wmaybe-uninitialized]
   69 |     return c;
      |            ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...