Submission #521329

#TimeUsernameProblemLanguageResultExecution timeMemory
521329MateGiorbelidzeDetecting Molecules (IOI16_molecules)C++14
9 / 100
1 ms296 KiB
#include "molecules.h"
#include <bits/stdc++.h>
using namespace std;

#define ll unsigned long long
#define pb push_back


std::vector<int> find_subset(int l, int u, std::vector<int> a) {
	
	vector <int> ans(0);	int n = a.size();
	
	ll x = u / a[0];
	
	if (x <= n && x * a[0] >= l) {
		
		ll j = 0;
		
		while (j < x) {
			
			ans.pb(j); j++;
			
		}
		
	}
	
    return ans;
}

Compilation message (stderr)

molecules.cpp: In function 'std::vector<int> find_subset(int, int, std::vector<int>)':
molecules.cpp:15:8: warning: comparison of integer expressions of different signedness: 'long long unsigned int' and 'int' [-Wsign-compare]
   15 |  if (x <= n && x * a[0] >= l) {
      |      ~~^~~~
molecules.cpp:15:25: warning: comparison of integer expressions of different signedness: 'long long unsigned int' and 'int' [-Wsign-compare]
   15 |  if (x <= n && x * a[0] >= l) {
      |                ~~~~~~~~~^~~~
#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...