Submission #486086

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
4860862021-11-10 13:57:54Koosha_mvRailway (BOI17_railway)C++14
100 / 100
432 ms79460 KiB
#include <bits/stdc++.h>
using namespace std;
#define erorp(x) cout<<#x<<"={"<<(x.F)<<" , "<<x.S<<"}"<<endl
#define print(v,r) f(i,0,r) cout<<v[i]<<" "; cout<<endl
#define eror(x) cout<<#x<<'='<<(x)<<endl
#define f_(i,a,b) for(int i=a;i>=b;i--)
#define f(i,a,b) for(int i=a;i<b;i++)
#define nb(x) __builtin_popcount(x)
#define maxm(a,b) a=max(a,b)
#define minm(a,b) a=min(a,b)
#define Add(x,y) x=(x+y)%mod
#define lst(x) x[x.size()-1]
#define sz(x) int(x.size())
#define mp make_pair
#define ll long long
#define pb push_back
#define S second
#define F first
const int N=1e6+99;
int n,m,res,k,a[N],sz[N],cnt[N];
vector<int> v[N],g[N];
vector<pair<int,int> > ans;
map<int,int> mark;
map<pair<int,int>,int> edge;
void dfssz(int x,int par){
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

railway.cpp: In function 'void dfssz(int, int)':
railway.cpp:7:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    7 | #define f(i,a,b) for(int i=a;i<b;i++)
......
   30 |  f(i,0,g[x].size()){
      |    ~~~~~~~~~~~~~~~             
railway.cpp:30:2: note: in expansion of macro 'f'
   30 |  f(i,0,g[x].size()){
      |  ^
railway.cpp: In function 'void dfs1(int, int, int)':
railway.cpp:7:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    7 | #define f(i,a,b) for(int i=a;i<b;i++)
......
   38 |  f(j,0,v[x].size()){
      |    ~~~~~~~~~~~~~~~             
railway.cpp:38:2: note: in expansion of macro 'f'
   38 |  f(j,0,v[x].size()){
      |  ^
railway.cpp:7:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    7 | #define f(i,a,b) for(int i=a;i<b;i++)
......
   44 |  f(i,0,g[x].size()){
      |    ~~~~~~~~~~~~~~~             
railway.cpp:44:2: note: in expansion of macro 'f'
   44 |  f(i,0,g[x].size()){
      |  ^
railway.cpp: In function 'void dfs(int, int)':
railway.cpp:7:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    7 | #define f(i,a,b) for(int i=a;i<b;i++)
......
   52 |  f(i,0,g[x].size()){
      |    ~~~~~~~~~~~~~~~             
railway.cpp:52:2: note: in expansion of macro 'f'
   52 |  f(i,0,g[x].size()){
      |  ^
railway.cpp:7:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    7 | #define f(i,a,b) for(int i=a;i<b;i++)
......
   57 |  f(i,0,g[x].size()){
      |    ~~~~~~~~~~~~~~~             
railway.cpp:57:2: note: in expansion of macro 'f'
   57 |  f(i,0,g[x].size()){
      |  ^
railway.cpp:75:20: warning: comparison of integer expressions of different signedness: 'std::map<int, int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   75 |  if(mark.size()-res>=k){
      |     ~~~~~~~~~~~~~~~^~~
railway.cpp: In function 'int main()':
railway.cpp:7:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    7 | #define f(i,a,b) for(int i=a;i<b;i++)
......
  102 |  f(i,0,ans.size()){
      |    ~~~~~~~~~~~~~~              
railway.cpp:102:2: note: in expansion of macro 'f'
  102 |  f(i,0,ans.size()){
      |  ^
railway.cpp:7:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    7 | #define f(i,a,b) for(int i=a;i<b;i++)
......
  106 |  f(i,0,v.size()) cout<<v[i]<<" ";
      |    ~~~~~~~~~~~~                
railway.cpp:106:2: note: in expansion of macro 'f'
  106 |  f(i,0,v.size()) cout<<v[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...