제출 #498270

#제출 시각아이디문제언어결과실행 시간메모리
498270OrazBDetecting Molecules (IOI16_molecules)C++14
0 / 100
1 ms276 KiB
#include <bits/stdc++.h> #define N 100005 #define ll long long int #define pii pair <int, int> #define pb push_back #define ff first #define ss second using namespace std; vector <int> find_subset(int l, int u, vector <int> w){ int sm = 0; vector <pii> v; vector <int> ans; for (int i = 0; i < w.size(); i++) v.pb({w[i], i}); sort (v.begin(), v.end()); for (int i = 0; i < v.size(); i++){ sm += v[i].ff; ans.pb(v[i].ss); if (sm >= l and sm <= u) break; } return ans; }

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

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