제출 #737800

#제출 시각아이디문제언어결과실행 시간메모리
737800Elvin_FritlDetecting Molecules (IOI16_molecules)C++17
0 / 100
1 ms300 KiB
#include <bits/stdc++.h> using namespace std; #include "molecules.h" vector<int> find_subset(int l, int u, vector<int> w){ int toto=u-l; vector<pair<int,int>>m; vector<int>res; for(int i=0;i<w.size();i++){ m.push_back({w[i],i}); } sort(m.begin(),m.end()); for(int i=0;i<w.size()-1;i++){ if(abs(m[i].first - m[i+1].first)<=toto){ res.push_back(m[i].second); res.push_back(m[i+1].second); break; } } return res; }

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

molecules.cpp: In function 'std::vector<int> find_subset(int, int, std::vector<int>)':
molecules.cpp:9:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    9 |     for(int i=0;i<w.size();i++){
      |                 ~^~~~~~~~~
molecules.cpp:13:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   13 |     for(int i=0;i<w.size()-1;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...