Submission #472425

#TimeUsernameProblemLanguageResultExecution timeMemory
472425yasseenkamelRailway (BOI17_railway)C++14
0 / 100
119 ms1828 KiB
#pragma GCC optimize ("O3") #pragma GCC optimize ("unroll-loops") #pragma GCC optimize("-Ofast") #include <bits/stdc++.h> using namespace std; typedef int in; #define int long long #define s second #define f first const long double EPS=1e-9; const int MOD=1e9+7; const int N=1e6; int n,m,k; int f[100005]; in main(){ cin >> n >> m >> k; for(int i = 0 ; i < n - 1 ; i ++){ int x,y; cin >> x >> y; } for(int i = 0 ; i < m ; i ++){ int x; cin >> x; for(int j = 0 ; j < x ; j ++){ int y; cin >> y; f[y] ++; } } vector<int> v; for(int i = 1 ; i <= n ; i ++){ if(f[i] >= k){ v.push_back(i); } } cout << v.size() << endl; for(int i = 0 ; i < v.size() ; i ++){ cout << v[i] << " "; } return 0; }

Compilation message (stderr)

railway.cpp: In function 'in main()':
railway.cpp:41:20: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   41 |  for(int i = 0 ; i < v.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...