Submission #448383

#TimeUsernameProblemLanguageResultExecution timeMemory
448383tredsused70Detecting Molecules (IOI16_molecules)C11
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; int find_subset(int l,int u,int mas_[],int n,int ans[]) { int used[100100]={0},m=0,pos; array<int,2> mas[100100]; ll sum=0; for(int i=0;i<n;i++) mas[i]={mas_[i],i+1}; sort(mas,mas+n); for(int i=0;i<n;i++) { sum+=mas[i][0]; if(sum>u) { sum-=mas[i][0]; break; } used[mas[i][1]]=1; ans[m]=mas[i][1]; m++; if(sum>=l) return m; } for(int i=m-1;i>=0;i--) { if(used[mas[n-m+i][1]]) continue; used[mas[i][1]]=0; used[mas[n-m+i][1]]=1; sum-=mas[i][0]; sum+=mas[n-m+i][0]; ans[i]=mas[n-m+i][1]; if(sum>=l) return m; } return 0; }

Compilation message (stderr)

molecules.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.