제출 #473171

#제출 시각아이디문제언어결과실행 시간메모리
473171ZaZo_Genetics (BOI18_genetics)C++14
0 / 100
2075 ms119708 KiB
#include <bits/stdc++.h> #define ZAZO ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); //#define int long long using namespace std; int n , m , k; int32_t main() { ZAZO cin >> n >> m >> k; vector<set<pair<char,int>>>v(m); vector<multiset<int>>ans(n); for(int i = 0 ; i < n ; i ++) { for(int j = 0 ; j < m ; j ++) { char x; cin>>x; v[j].insert({x,i}); } } for(int i = 0 ; i < m ; i ++) { set<int>ad; auto itt = v[i].begin(); for(; itt!=v[i].end() ; itt++) { if((*itt).first=='A') ad.insert((*itt).second); else { if(ad.size()) { auto it=ad.begin(); for(;it!=ad.end();it++) { ans[(*itt).second].insert(*it); ans[*it].insert((*itt).second); } } } } } for(int i = 0 ; i < n ; i++) { if(ans[i].size()==k*(n-1)) {cout<<i+1; return 0;} } }

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

genetics.cpp: In function 'int32_t main()':
genetics.cpp:44:21: warning: comparison of integer expressions of different signedness: 'std::multiset<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   44 |     if(ans[i].size()==k*(n-1)) {cout<<i+1; return 0;}
      |        ~~~~~~~~~~~~~^~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...